chargebee 2.23.1 → 2.25.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.
Files changed (67) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/README.md +2 -2
  3. package/lib/chargebee.js +1 -1
  4. package/lib/resources/api_endpoints.js +15 -0
  5. package/package.json +2 -1
  6. package/types/core.d.ts +80 -0
  7. package/types/index.d.ts +92 -0
  8. package/types/resources/Address.d.ts +58 -0
  9. package/types/resources/AdvanceInvoiceSchedule.d.ts +26 -0
  10. package/types/resources/AttachedItem.d.ts +84 -0
  11. package/types/resources/Card.d.ts +88 -0
  12. package/types/resources/Comment.d.ts +52 -0
  13. package/types/resources/Contact.d.ts +15 -0
  14. package/types/resources/ContractTerm.d.ts +18 -0
  15. package/types/resources/Coupon.d.ts +150 -0
  16. package/types/resources/CouponCode.d.ts +25 -0
  17. package/types/resources/CouponSet.d.ts +75 -0
  18. package/types/resources/CreditNote.d.ts +337 -0
  19. package/types/resources/CreditNoteEstimate.d.ts +96 -0
  20. package/types/resources/Customer.d.ts +440 -0
  21. package/types/resources/DifferentialPrice.d.ts +88 -0
  22. package/types/resources/Discount.d.ts +23 -0
  23. package/types/resources/Download.d.ts +9 -0
  24. package/types/resources/EntitlementOverride.d.ts +37 -0
  25. package/types/resources/Estimate.d.ts +214 -0
  26. package/types/resources/Event.d.ts +42 -0
  27. package/types/resources/Export.d.ts +182 -0
  28. package/types/resources/Feature.d.ts +90 -0
  29. package/types/resources/Gift.d.ts +97 -0
  30. package/types/resources/Hierarchy.d.ts +11 -0
  31. package/types/resources/HostedPage.d.ts +242 -0
  32. package/types/resources/ImpactedItem.d.ts +17 -0
  33. package/types/resources/ImpactedSubscription.d.ts +17 -0
  34. package/types/resources/InAppSubscription.d.ts +52 -0
  35. package/types/resources/Invoice.d.ts +590 -0
  36. package/types/resources/InvoiceEstimate.d.ts +96 -0
  37. package/types/resources/Item.d.ts +118 -0
  38. package/types/resources/ItemEntitlement.d.ts +55 -0
  39. package/types/resources/ItemFamily.d.ts +59 -0
  40. package/types/resources/ItemPrice.d.ts +195 -0
  41. package/types/resources/Media.d.ts +10 -0
  42. package/types/resources/NonSubscription.d.ts +23 -0
  43. package/types/resources/Order.d.ts +305 -0
  44. package/types/resources/PaymentIntent.d.ts +71 -0
  45. package/types/resources/PaymentReferenceNumber.d.ts +10 -0
  46. package/types/resources/PaymentSource.d.ts +264 -0
  47. package/types/resources/PaymentVoucher.d.ts +74 -0
  48. package/types/resources/PortalSession.d.ts +57 -0
  49. package/types/resources/PromotionalCredit.d.ts +86 -0
  50. package/types/resources/Purchase.d.ts +46 -0
  51. package/types/resources/Quote.d.ts +388 -0
  52. package/types/resources/QuoteLineGroup.d.ts +83 -0
  53. package/types/resources/QuotedCharge.d.ts +57 -0
  54. package/types/resources/QuotedSubscription.d.ts +82 -0
  55. package/types/resources/ResourceMigration.d.ts +27 -0
  56. package/types/resources/SiteMigrationDetail.d.ts +31 -0
  57. package/types/resources/Subscription.d.ts +619 -0
  58. package/types/resources/SubscriptionEntitlement.d.ts +41 -0
  59. package/types/resources/SubscriptionEstimate.d.ts +49 -0
  60. package/types/resources/TaxWithheld.d.ts +13 -0
  61. package/types/resources/ThirdPartyPaymentMethod.d.ts +10 -0
  62. package/types/resources/TimeMachine.d.ts +38 -0
  63. package/types/resources/Token.d.ts +50 -0
  64. package/types/resources/Transaction.d.ts +170 -0
  65. package/types/resources/UnbilledCharge.d.ts +91 -0
  66. package/types/resources/Usage.d.ts +76 -0
  67. package/types/resources/VirtualBankAccount.d.ts +75 -0
@@ -0,0 +1,83 @@
1
+ declare module 'chargebee' {
2
+ export interface QuoteLineGroup {
3
+
4
+ version?:number;
5
+ id?:string;
6
+ sub_total:number;
7
+ total?:number;
8
+ credits_applied?:number;
9
+ amount_paid?:number;
10
+ amount_due?:number;
11
+ charge_event?:'subscription_cancel' | 'immediate' | 'subscription_creation' | 'trial_start' | 'subscription_renewal' | 'subscription_change';
12
+ billing_cycle_number?:number;
13
+ line_items?:QuoteLineGroup.LineItem[];
14
+ discounts?:QuoteLineGroup.Discount[];
15
+ line_item_discounts?:QuoteLineGroup.LineItemDiscount[];
16
+ taxes?:QuoteLineGroup.Tax[];
17
+ line_item_taxes?:QuoteLineGroup.LineItemTax[];
18
+ }
19
+ export namespace QuoteLineGroup {
20
+
21
+
22
+ export interface LineItem {
23
+ id?:string;
24
+ subscription_id?:string;
25
+ date_from?:number;
26
+ date_to?:number;
27
+ unit_amount?:number;
28
+ quantity?:number;
29
+ amount?:number;
30
+ pricing_model?:'volume' | 'per_unit' | 'tiered' | 'flat_fee' | 'stairstep';
31
+ is_taxed?:boolean;
32
+ tax_amount?:number;
33
+ tax_rate?:number;
34
+ unit_amount_in_decimal?:string;
35
+ quantity_in_decimal?:string;
36
+ amount_in_decimal?:string;
37
+ discount_amount?:number;
38
+ item_level_discount_amount?:number;
39
+ reference_line_item_id?:string;
40
+ description?:string;
41
+ entity_description?:string;
42
+ entity_type?:'addon_item_price' | 'plan_item_price' | 'charge_item_price' | 'adhoc';
43
+ tax_exempt_reason?:'high_value_physical_goods' | 'tax_not_configured' | 'reverse_charge' | 'zero_rated' | 'customer_exempt' | 'region_non_taxable' | 'zero_value_item' | 'export' | 'product_exempt';
44
+ entity_id?:string;
45
+ customer_id?:string;
46
+ }
47
+ export interface Discount {
48
+ amount?:number;
49
+ description?:string;
50
+ line_item_id?:string;
51
+ entity_type?:'item_level_coupon' | 'promotional_credits' | 'item_level_discount' | 'prorated_credits' | 'document_level_discount' | 'document_level_coupon';
52
+ discount_type?:'fixed_amount' | 'percentage';
53
+ entity_id?:string;
54
+ coupon_set_code?:string;
55
+ }
56
+ export interface LineItemDiscount {
57
+ line_item_id?:string;
58
+ discount_type?:'item_level_coupon' | 'promotional_credits' | 'item_level_discount' | 'prorated_credits' | 'document_level_discount' | 'document_level_coupon';
59
+ coupon_id?:string;
60
+ entity_id?:string;
61
+ discount_amount?:number;
62
+ }
63
+ export interface Tax {
64
+ name?:string;
65
+ amount?:number;
66
+ description?:string;
67
+ }
68
+ export interface LineItemTax {
69
+ line_item_id?:string;
70
+ tax_name?:string;
71
+ tax_rate?:number;
72
+ is_partial_tax_applied?:boolean;
73
+ is_non_compliance_tax?:boolean;
74
+ taxable_amount?:number;
75
+ tax_amount?:number;
76
+ tax_juris_type?:'special' | 'country' | 'unincorporated' | 'other' | 'city' | 'federal' | 'county' | 'state';
77
+ tax_juris_name?:string;
78
+ tax_juris_code?:string;
79
+ tax_amount_in_local_currency?:number;
80
+ local_currency_code?:string;
81
+ }
82
+ }
83
+ }
@@ -0,0 +1,57 @@
1
+ declare module 'chargebee' {
2
+ export interface QuotedCharge {
3
+
4
+ charges?:QuotedCharge.Charge[];
5
+ invoice_items?:QuotedCharge.ItemPrice[];
6
+ item_tiers?:QuotedCharge.ItemTier[];
7
+ coupons?:QuotedCharge.Coupon[];
8
+ discounts?:QuotedCharge.Discount[];
9
+ }
10
+ export namespace QuotedCharge {
11
+
12
+
13
+ export interface Charge {
14
+ amount?:number;
15
+ amount_in_decimal?:string;
16
+ description?:string;
17
+ service_period_in_days?:number;
18
+ avalara_sale_type?:'consumed' | 'wholesale' | 'vendor_use' | 'retail';
19
+ avalara_transaction_type?:number;
20
+ avalara_service_type?:number;
21
+ }
22
+ export interface ItemPrice {
23
+ item_price_id?:string;
24
+ quantity?:number;
25
+ quantity_in_decimal?:string;
26
+ unit_price?:number;
27
+ unit_price_in_decimal?:string;
28
+ service_period_days?:number;
29
+ }
30
+ export interface ItemTier {
31
+ item_price_id?:string;
32
+ starting_unit?:number;
33
+ ending_unit?:number;
34
+ price?:number;
35
+ starting_unit_in_decimal?:string;
36
+ ending_unit_in_decimal?:string;
37
+ price_in_decimal?:string;
38
+ index?:number;
39
+ }
40
+ export interface Coupon {
41
+ coupon_id?:string;
42
+ }
43
+ export interface Discount {
44
+ id?:string;
45
+ invoice_name?:string;
46
+ type?:'fixed_amount' | 'percentage';
47
+ percentage?:number;
48
+ amount?:number;
49
+ currency_code?:string;
50
+ apply_on?:'specific_item_price' | 'invoice_amount';
51
+ item_price_id?:string;
52
+ created_at?:number;
53
+ coupon_id?:string;
54
+ index?:number;
55
+ }
56
+ }
57
+ }
@@ -0,0 +1,82 @@
1
+ declare module 'chargebee' {
2
+ export interface QuotedSubscription {
3
+
4
+ id:string;
5
+ start_date?:number;
6
+ trial_end?:number;
7
+ remaining_billing_cycles?:number;
8
+ po_number?:string;
9
+ plan_quantity_in_decimal?:string;
10
+ plan_unit_price_in_decimal?:string;
11
+ changes_scheduled_at?:number;
12
+ change_option?:'end_of_term' | 'immediately' | 'specific_date';
13
+ contract_term_billing_cycle_on_renewal?:number;
14
+ coupons?:QuotedSubscription.Coupon[];
15
+ discounts?:QuotedSubscription.Discount[];
16
+ subscription_items?:QuotedSubscription.SubscriptionItem[];
17
+ item_tiers?:QuotedSubscription.ItemTier[];
18
+ quoted_contract_term?:QuotedSubscription.QuotedContractTerm;
19
+ }
20
+ export namespace QuotedSubscription {
21
+
22
+
23
+ export interface Coupon {
24
+ coupon_id?:string;
25
+ }
26
+ export interface Discount {
27
+ id?:string;
28
+ invoice_name?:string;
29
+ type?:'fixed_amount' | 'percentage';
30
+ percentage?:number;
31
+ amount?:number;
32
+ currency_code?:string;
33
+ duration_type?:'limited_period' | 'one_time' | 'forever';
34
+ period?:number;
35
+ period_unit?:'week' | 'month' | 'year' | 'day';
36
+ included_in_mrr?:boolean;
37
+ apply_on?:'specific_item_price' | 'invoice_amount';
38
+ item_price_id?:string;
39
+ created_at?:number;
40
+ apply_till?:number;
41
+ applied_count?:number;
42
+ coupon_id?:string;
43
+ index?:number;
44
+ }
45
+ export interface SubscriptionItem {
46
+ item_price_id?:string;
47
+ item_type?:'charge' | 'addon' | 'plan';
48
+ quantity?:number;
49
+ quantity_in_decimal?:string;
50
+ unit_price?:number;
51
+ unit_price_in_decimal?:string;
52
+ amount?:number;
53
+ amount_in_decimal?:string;
54
+ free_quantity?:number;
55
+ free_quantity_in_decimal?:string;
56
+ trial_end?:number;
57
+ billing_cycles?:number;
58
+ service_period_days?:number;
59
+ charge_on_event?:'subscription_creation' | 'subscription_activation' | 'subscription_trial_start' | 'contract_termination' | 'plan_activation';
60
+ charge_once?:boolean;
61
+ charge_on_option?:'on_event' | 'immediately';
62
+ }
63
+ export interface ItemTier {
64
+ item_price_id?:string;
65
+ starting_unit?:number;
66
+ ending_unit?:number;
67
+ price?:number;
68
+ starting_unit_in_decimal?:string;
69
+ ending_unit_in_decimal?:string;
70
+ price_in_decimal?:string;
71
+ index?:number;
72
+ }
73
+ export interface QuotedContractTerm {
74
+ contract_start?:number;
75
+ contract_end?:number;
76
+ billing_cycle?:number;
77
+ action_at_term_end?:'cancel' | 'renew_once' | 'renew' | 'evergreen';
78
+ total_contract_value?:number;
79
+ cancellation_cutoff_period?:number;
80
+ }
81
+ }
82
+ }
@@ -0,0 +1,27 @@
1
+ declare module 'chargebee' {
2
+ export interface ResourceMigration {
3
+
4
+ from_site:string;
5
+ entity_type:'customer';
6
+ entity_id:string;
7
+ status:'scheduled' | 'failed' | 'succeeded';
8
+ errors?:string;
9
+ created_at:number;
10
+ updated_at:number;
11
+ }
12
+ export namespace ResourceMigration {
13
+ export class ResourceMigrationResource {
14
+ retrieve_latest(input:RetrieveLatestInputParam):ChargebeeRequest<RetrieveLatestResponse>;
15
+ }
16
+ export interface RetrieveLatestResponse {
17
+ resource_migration:ResourceMigration;
18
+ }
19
+ export interface RetrieveLatestInputParam {
20
+
21
+ from_site:string;
22
+ entity_type:'customer';
23
+ entity_id:string;
24
+ }
25
+
26
+ }
27
+ }
@@ -0,0 +1,31 @@
1
+ declare module 'chargebee' {
2
+ export interface SiteMigrationDetail {
3
+
4
+ entity_id:string;
5
+ other_site_name:string;
6
+ entity_id_at_other_site:string;
7
+ migrated_at:number;
8
+ entity_type:'credit_note' | 'subscription' | 'invoice' | 'transaction' | 'customer' | 'order';
9
+ status:'moving_out' | 'moved_in' | 'moved_out';
10
+ }
11
+ export namespace SiteMigrationDetail {
12
+ export class SiteMigrationDetailResource {
13
+ list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
14
+ }
15
+ export interface ListResponse {
16
+ list:{site_migration_detail:SiteMigrationDetail}[];
17
+ next_offset?:string;
18
+ }
19
+ export interface ListInputParam {
20
+ [key: string]: string | number | object | boolean;
21
+ limit?:number;
22
+ offset?:string;
23
+ entity_id_at_other_site?:{is?:string,is_not?:string,starts_with?:string};
24
+ other_site_name?:{is?:string,is_not?:string,starts_with?:string};
25
+ entity_id?:{is?:string,is_not?:string,starts_with?:string};
26
+ entity_type?:{in?:string,is?:'credit_note' | 'subscription' | 'invoice' | 'transaction' | 'customer' | 'order',is_not?:'credit_note' | 'subscription' | 'invoice' | 'transaction' | 'customer' | 'order',not_in?:string};
27
+ status?:{in?:string,is?:'moving_out' | 'moved_in' | 'moved_out',is_not?:'moving_out' | 'moved_in' | 'moved_out',not_in?:string};
28
+ }
29
+
30
+ }
31
+ }