chargebee 3.0.1 → 3.1.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 (86) hide show
  1. package/CHANGELOG.md +65 -0
  2. package/cjs/environment.js +1 -1
  3. package/cjs/resources/api_endpoints.js +16 -0
  4. package/esm/environment.js +1 -1
  5. package/esm/resources/api_endpoints.js +16 -0
  6. package/package.json +1 -1
  7. package/types/core.d.ts +588 -0
  8. package/types/index.d.ts +172 -0
  9. package/types/resources/Address.d.ts +71 -0
  10. package/types/resources/AdvanceInvoiceSchedule.d.ts +29 -0
  11. package/types/resources/AttachedItem.d.ts +116 -0
  12. package/types/resources/Attribute.d.ts +9 -0
  13. package/types/resources/BusinessEntity.d.ts +64 -0
  14. package/types/resources/BusinessEntityTransfer.d.ts +15 -0
  15. package/types/resources/Card.d.ts +172 -0
  16. package/types/resources/Comment.d.ts +92 -0
  17. package/types/resources/Contact.d.ts +16 -0
  18. package/types/resources/ContractTerm.d.ts +19 -0
  19. package/types/resources/Coupon.d.ts +329 -0
  20. package/types/resources/CouponCode.d.ts +70 -0
  21. package/types/resources/CouponSet.d.ts +111 -0
  22. package/types/resources/CreditNote.d.ts +629 -0
  23. package/types/resources/CreditNoteEstimate.d.ts +143 -0
  24. package/types/resources/Currency.d.ts +91 -0
  25. package/types/resources/Customer.d.ts +964 -0
  26. package/types/resources/CustomerEntitlement.d.ts +36 -0
  27. package/types/resources/DifferentialPrice.d.ts +144 -0
  28. package/types/resources/Discount.d.ts +24 -0
  29. package/types/resources/Download.d.ts +10 -0
  30. package/types/resources/Entitlement.d.ts +66 -0
  31. package/types/resources/EntitlementOverride.d.ts +76 -0
  32. package/types/resources/Estimate.d.ts +1237 -0
  33. package/types/resources/Event.d.ts +81 -0
  34. package/types/resources/Export.d.ts +615 -0
  35. package/types/resources/Feature.d.ts +142 -0
  36. package/types/resources/GatewayErrorDetail.d.ts +20 -0
  37. package/types/resources/Gift.d.ts +296 -0
  38. package/types/resources/Hierarchy.d.ts +12 -0
  39. package/types/resources/HostedPage.d.ts +1112 -0
  40. package/types/resources/ImpactedItem.d.ts +20 -0
  41. package/types/resources/ImpactedItemPrice.d.ts +20 -0
  42. package/types/resources/ImpactedSubscription.d.ts +20 -0
  43. package/types/resources/InAppSubscription.d.ts +116 -0
  44. package/types/resources/Invoice.d.ts +1695 -0
  45. package/types/resources/InvoiceEstimate.d.ts +143 -0
  46. package/types/resources/Item.d.ts +208 -0
  47. package/types/resources/ItemEntitlement.d.ts +103 -0
  48. package/types/resources/ItemFamily.d.ts +93 -0
  49. package/types/resources/ItemPrice.d.ts +332 -0
  50. package/types/resources/Metadata.d.ts +8 -0
  51. package/types/resources/NonSubscription.d.ts +48 -0
  52. package/types/resources/OmnichannelSubscription.d.ts +75 -0
  53. package/types/resources/OmnichannelTransaction.d.ts +16 -0
  54. package/types/resources/Order.d.ts +586 -0
  55. package/types/resources/PaymentIntent.d.ts +178 -0
  56. package/types/resources/PaymentReferenceNumber.d.ts +11 -0
  57. package/types/resources/PaymentSchedule.d.ts +28 -0
  58. package/types/resources/PaymentScheduleEstimate.d.ts +25 -0
  59. package/types/resources/PaymentScheduleScheme.d.ts +67 -0
  60. package/types/resources/PaymentSource.d.ts +530 -0
  61. package/types/resources/PaymentVoucher.d.ts +107 -0
  62. package/types/resources/PortalSession.d.ts +88 -0
  63. package/types/resources/PriceVariant.d.ts +116 -0
  64. package/types/resources/PricingPageSession.d.ts +130 -0
  65. package/types/resources/PromotionalCredit.d.ts +111 -0
  66. package/types/resources/Purchase.d.ts +202 -0
  67. package/types/resources/Quote.d.ts +1467 -0
  68. package/types/resources/QuoteLineGroup.d.ts +136 -0
  69. package/types/resources/QuotedCharge.d.ts +56 -0
  70. package/types/resources/QuotedSubscription.d.ts +114 -0
  71. package/types/resources/Ramp.d.ts +260 -0
  72. package/types/resources/RecordedPurchase.d.ts +60 -0
  73. package/types/resources/ResourceMigration.d.ts +36 -0
  74. package/types/resources/SiteMigrationDetail.d.ts +46 -0
  75. package/types/resources/Subscription.d.ts +2447 -0
  76. package/types/resources/SubscriptionEntitlement.d.ts +79 -0
  77. package/types/resources/SubscriptionEstimate.d.ts +59 -0
  78. package/types/resources/TaxWithheld.d.ts +19 -0
  79. package/types/resources/ThirdPartyPaymentMethod.d.ts +11 -0
  80. package/types/resources/TimeMachine.d.ts +57 -0
  81. package/types/resources/Token.d.ts +19 -0
  82. package/types/resources/Transaction.d.ts +316 -0
  83. package/types/resources/UnbilledCharge.d.ts +209 -0
  84. package/types/resources/Usage.d.ts +113 -0
  85. package/types/resources/VirtualBankAccount.d.ts +125 -0
  86. package/types/resources/filter.d.ts +52 -0
@@ -0,0 +1,143 @@
1
+ ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
3
+
4
+ declare module 'chargebee' {
5
+ export interface CreditNoteEstimate {
6
+ reference_invoice_id: string;
7
+ type: 'adjustment' | 'refundable';
8
+ price_type: PriceTypeEnum;
9
+ currency_code: string;
10
+ sub_total: number;
11
+ total: number;
12
+ amount_allocated: number;
13
+ amount_available: number;
14
+ line_items?: CreditNoteEstimate.LineItem[];
15
+ discounts?: CreditNoteEstimate.Discount[];
16
+ taxes?: CreditNoteEstimate.Tax[];
17
+ line_item_taxes?: CreditNoteEstimate.LineItemTax[];
18
+ line_item_discounts?: CreditNoteEstimate.LineItemDiscount[];
19
+ line_item_tiers?: CreditNoteEstimate.LineItemTier[];
20
+ round_off_amount?: number;
21
+ customer_id?: string;
22
+ }
23
+
24
+ export namespace CreditNoteEstimate {
25
+ export interface LineItem {
26
+ id?: string;
27
+ subscription_id?: string;
28
+ date_from: number;
29
+ date_to: number;
30
+ unit_amount: number;
31
+ quantity?: number;
32
+ amount?: number;
33
+ pricing_model?:
34
+ | 'flat_fee'
35
+ | 'per_unit'
36
+ | 'tiered'
37
+ | 'volume'
38
+ | 'stairstep';
39
+ is_taxed: boolean;
40
+ tax_amount?: number;
41
+ tax_rate?: number;
42
+ unit_amount_in_decimal?: string;
43
+ quantity_in_decimal?: string;
44
+ amount_in_decimal?: string;
45
+ discount_amount?: number;
46
+ item_level_discount_amount?: number;
47
+ usage_percentage?: string;
48
+ reference_line_item_id?: string;
49
+ description: string;
50
+ entity_description?: string;
51
+ entity_type:
52
+ | 'adhoc'
53
+ | 'plan_item_price'
54
+ | 'addon_item_price'
55
+ | 'charge_item_price'
56
+ | 'plan_setup'
57
+ | 'plan'
58
+ | 'addon';
59
+ tax_exempt_reason?:
60
+ | 'tax_not_configured'
61
+ | 'region_non_taxable'
62
+ | 'export'
63
+ | 'customer_exempt'
64
+ | 'product_exempt'
65
+ | 'zero_rated'
66
+ | 'reverse_charge'
67
+ | 'high_value_physical_goods'
68
+ | 'zero_value_item'
69
+ | 'tax_not_configured_external_provider';
70
+ entity_id?: string;
71
+ customer_id?: string;
72
+ }
73
+ export interface Discount {
74
+ amount: number;
75
+ description?: string;
76
+ entity_type:
77
+ | 'item_level_coupon'
78
+ | 'document_level_coupon'
79
+ | 'promotional_credits'
80
+ | 'prorated_credits'
81
+ | 'item_level_discount'
82
+ | 'document_level_discount';
83
+ entity_id?: string;
84
+ coupon_set_code?: string;
85
+ }
86
+ export interface Tax {
87
+ name: string;
88
+ amount: number;
89
+ description?: string;
90
+ }
91
+ export interface LineItemTax {
92
+ line_item_id?: string;
93
+ tax_name: string;
94
+ tax_rate: number;
95
+ date_to?: number;
96
+ date_from?: number;
97
+ prorated_taxable_amount?: number;
98
+ is_partial_tax_applied?: boolean;
99
+ is_non_compliance_tax?: boolean;
100
+ taxable_amount: number;
101
+ tax_amount: number;
102
+ tax_juris_type?:
103
+ | 'country'
104
+ | 'federal'
105
+ | 'state'
106
+ | 'county'
107
+ | 'city'
108
+ | 'special'
109
+ | 'unincorporated'
110
+ | 'other';
111
+ tax_juris_name?: string;
112
+ tax_juris_code?: string;
113
+ tax_amount_in_local_currency?: number;
114
+ local_currency_code?: string;
115
+ }
116
+ export interface LineItemDiscount {
117
+ line_item_id: string;
118
+ discount_type:
119
+ | 'item_level_coupon'
120
+ | 'document_level_coupon'
121
+ | 'promotional_credits'
122
+ | 'prorated_credits'
123
+ | 'item_level_discount'
124
+ | 'document_level_discount';
125
+ coupon_id?: string;
126
+ entity_id?: string;
127
+ discount_amount: number;
128
+ }
129
+ export interface LineItemTier {
130
+ line_item_id?: string;
131
+ starting_unit: number;
132
+ ending_unit?: number;
133
+ quantity_used: number;
134
+ unit_amount: number;
135
+ starting_unit_in_decimal?: string;
136
+ ending_unit_in_decimal?: string;
137
+ quantity_used_in_decimal?: string;
138
+ unit_amount_in_decimal?: string;
139
+ }
140
+ // REQUEST PARAMS
141
+ //---------------
142
+ }
143
+ }
@@ -0,0 +1,91 @@
1
+ ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
3
+
4
+ declare module 'chargebee' {
5
+ export interface Currency {
6
+ id?: string;
7
+ enabled: boolean;
8
+ forex_type?: 'manual' | 'auto';
9
+ currency_code?: string;
10
+ is_base_currency?: boolean;
11
+ manual_exchange_rate?: string;
12
+ }
13
+
14
+ export namespace Currency {
15
+ export class CurrencyResource {
16
+ list(
17
+ headers?: ChargebeeRequestHeader,
18
+ ): Promise<ChargebeeResponse<ListResponse>>;
19
+
20
+ retrieve(
21
+ site_currency_id: string,
22
+ headers?: ChargebeeRequestHeader,
23
+ ): Promise<ChargebeeResponse<RetrieveResponse>>;
24
+
25
+ create(
26
+ input: CreateInputParam,
27
+ headers?: ChargebeeRequestHeader,
28
+ ): Promise<ChargebeeResponse<CreateResponse>>;
29
+
30
+ update(
31
+ site_currency_id: string,
32
+ input: UpdateInputParam,
33
+ headers?: ChargebeeRequestHeader,
34
+ ): Promise<ChargebeeResponse<UpdateResponse>>;
35
+
36
+ addSchedule(
37
+ site_currency_id: string,
38
+ input: AddScheduleInputParam,
39
+ headers?: ChargebeeRequestHeader,
40
+ ): Promise<ChargebeeResponse<AddScheduleResponse>>;
41
+
42
+ removeSchedule(
43
+ site_currency_id: string,
44
+ headers?: ChargebeeRequestHeader,
45
+ ): Promise<ChargebeeResponse<RemoveScheduleResponse>>;
46
+ }
47
+
48
+ export interface ListResponse {
49
+ currency: Currency;
50
+ }
51
+
52
+ export interface RetrieveResponse {
53
+ currency: Currency;
54
+ }
55
+
56
+ export interface CreateResponse {
57
+ currency: Currency;
58
+ }
59
+
60
+ export interface UpdateResponse {
61
+ currency: Currency;
62
+ }
63
+
64
+ export interface AddScheduleResponse {
65
+ scheduled_at: number;
66
+ currency: Currency;
67
+ }
68
+
69
+ export interface RemoveScheduleResponse {
70
+ scheduled_at: number;
71
+ currency: Currency;
72
+ }
73
+
74
+ // REQUEST PARAMS
75
+ //---------------
76
+
77
+ export interface CreateInputParam {
78
+ currency_code: string;
79
+ forex_type: 'manual' | 'auto';
80
+ manual_exchange_rate?: string;
81
+ }
82
+ export interface UpdateInputParam {
83
+ forex_type: 'manual' | 'auto';
84
+ manual_exchange_rate?: string;
85
+ }
86
+ export interface AddScheduleInputParam {
87
+ manual_exchange_rate: string;
88
+ schedule_at: number;
89
+ }
90
+ }
91
+ }