chargebee 3.0.0-beta.4 → 3.0.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 (84) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +4 -3
  3. package/cjs/environment.js +1 -1
  4. package/cjs/util.js +1 -1
  5. package/esm/environment.js +1 -1
  6. package/esm/util.js +1 -1
  7. package/package.json +1 -1
  8. package/types/core.d.ts +0 -564
  9. package/types/index.d.ts +0 -167
  10. package/types/resources/Address.d.ts +0 -71
  11. package/types/resources/AdvanceInvoiceSchedule.d.ts +0 -29
  12. package/types/resources/AttachedItem.d.ts +0 -114
  13. package/types/resources/Attribute.d.ts +0 -9
  14. package/types/resources/BusinessEntity.d.ts +0 -64
  15. package/types/resources/BusinessEntityTransfer.d.ts +0 -15
  16. package/types/resources/Card.d.ts +0 -171
  17. package/types/resources/Comment.d.ts +0 -89
  18. package/types/resources/Contact.d.ts +0 -16
  19. package/types/resources/ContractTerm.d.ts +0 -19
  20. package/types/resources/Coupon.d.ts +0 -314
  21. package/types/resources/CouponCode.d.ts +0 -70
  22. package/types/resources/CouponSet.d.ts +0 -111
  23. package/types/resources/CreditNote.d.ts +0 -628
  24. package/types/resources/CreditNoteEstimate.d.ts +0 -143
  25. package/types/resources/Currency.d.ts +0 -91
  26. package/types/resources/Customer.d.ts +0 -962
  27. package/types/resources/CustomerEntitlement.d.ts +0 -36
  28. package/types/resources/DifferentialPrice.d.ts +0 -142
  29. package/types/resources/Discount.d.ts +0 -24
  30. package/types/resources/Download.d.ts +0 -10
  31. package/types/resources/Entitlement.d.ts +0 -66
  32. package/types/resources/EntitlementOverride.d.ts +0 -76
  33. package/types/resources/Estimate.d.ts +0 -1237
  34. package/types/resources/Event.d.ts +0 -81
  35. package/types/resources/Export.d.ts +0 -607
  36. package/types/resources/Feature.d.ts +0 -142
  37. package/types/resources/GatewayErrorDetail.d.ts +0 -20
  38. package/types/resources/Gift.d.ts +0 -296
  39. package/types/resources/Hierarchy.d.ts +0 -12
  40. package/types/resources/HostedPage.d.ts +0 -1112
  41. package/types/resources/ImpactedItem.d.ts +0 -20
  42. package/types/resources/ImpactedItemPrice.d.ts +0 -20
  43. package/types/resources/ImpactedSubscription.d.ts +0 -20
  44. package/types/resources/InAppSubscription.d.ts +0 -116
  45. package/types/resources/Invoice.d.ts +0 -1691
  46. package/types/resources/InvoiceEstimate.d.ts +0 -143
  47. package/types/resources/Item.d.ts +0 -204
  48. package/types/resources/ItemEntitlement.d.ts +0 -103
  49. package/types/resources/ItemFamily.d.ts +0 -89
  50. package/types/resources/ItemPrice.d.ts +0 -328
  51. package/types/resources/Metadata.d.ts +0 -8
  52. package/types/resources/NonSubscription.d.ts +0 -48
  53. package/types/resources/Order.d.ts +0 -586
  54. package/types/resources/PaymentIntent.d.ts +0 -178
  55. package/types/resources/PaymentReferenceNumber.d.ts +0 -11
  56. package/types/resources/PaymentSchedule.d.ts +0 -28
  57. package/types/resources/PaymentScheduleEstimate.d.ts +0 -25
  58. package/types/resources/PaymentScheduleScheme.d.ts +0 -62
  59. package/types/resources/PaymentSource.d.ts +0 -529
  60. package/types/resources/PaymentVoucher.d.ts +0 -107
  61. package/types/resources/PortalSession.d.ts +0 -88
  62. package/types/resources/PriceVariant.d.ts +0 -112
  63. package/types/resources/PricingPageSession.d.ts +0 -130
  64. package/types/resources/PromotionalCredit.d.ts +0 -111
  65. package/types/resources/Purchase.d.ts +0 -202
  66. package/types/resources/Quote.d.ts +0 -1467
  67. package/types/resources/QuoteLineGroup.d.ts +0 -136
  68. package/types/resources/QuotedCharge.d.ts +0 -56
  69. package/types/resources/QuotedSubscription.d.ts +0 -114
  70. package/types/resources/Ramp.d.ts +0 -260
  71. package/types/resources/ResourceMigration.d.ts +0 -36
  72. package/types/resources/SiteMigrationDetail.d.ts +0 -46
  73. package/types/resources/Subscription.d.ts +0 -2443
  74. package/types/resources/SubscriptionEntitlement.d.ts +0 -79
  75. package/types/resources/SubscriptionEstimate.d.ts +0 -59
  76. package/types/resources/TaxWithheld.d.ts +0 -19
  77. package/types/resources/ThirdPartyPaymentMethod.d.ts +0 -11
  78. package/types/resources/TimeMachine.d.ts +0 -57
  79. package/types/resources/Token.d.ts +0 -19
  80. package/types/resources/Transaction.d.ts +0 -313
  81. package/types/resources/UnbilledCharge.d.ts +0 -209
  82. package/types/resources/Usage.d.ts +0 -113
  83. package/types/resources/VirtualBankAccount.d.ts +0 -125
  84. package/types/resources/filter.d.ts +0 -52
@@ -1,112 +0,0 @@
1
- ///<reference path='./../core.d.ts'/>
2
- ///<reference path='./../index.d.ts'/>
3
- ///<reference path='./filter.d.ts'/>
4
- declare module 'chargebee' {
5
- export interface PriceVariant {
6
- id: string;
7
- name: string;
8
- external_name?: string;
9
- variant_group?: string;
10
- description?: string;
11
- status?: 'active' | 'archived' | 'deleted';
12
- created_at: number;
13
- resource_version?: number;
14
- updated_at?: number;
15
- archived_at?: number;
16
- attributes?: PriceVariant.Attribute[];
17
- }
18
-
19
- export namespace PriceVariant {
20
- export class PriceVariantResource {
21
- create(
22
- input: CreateInputParam,
23
- headers?: ChargebeeRequestHeader,
24
- ): Promise<ChargebeeResponse<CreateResponse>>;
25
-
26
- retrieve(
27
- price_variant_id: string,
28
- headers?: ChargebeeRequestHeader,
29
- ): Promise<ChargebeeResponse<RetrieveResponse>>;
30
-
31
- update(
32
- price_variant_id: string,
33
- input: UpdateInputParam,
34
- headers?: ChargebeeRequestHeader,
35
- ): Promise<ChargebeeResponse<UpdateResponse>>;
36
-
37
- delete(
38
- price_variant_id: string,
39
- headers?: ChargebeeRequestHeader,
40
- ): Promise<ChargebeeResponse<DeleteResponse>>;
41
-
42
- list(
43
- input?: ListInputParam,
44
- headers?: ChargebeeRequestHeader,
45
- ): Promise<ChargebeeResponse<ListResponse>>;
46
- }
47
-
48
- export interface CreateResponse {
49
- price_variant: PriceVariant;
50
- }
51
-
52
- export interface RetrieveResponse {
53
- price_variant: PriceVariant;
54
- }
55
-
56
- export interface UpdateResponse {
57
- price_variant: PriceVariant;
58
- }
59
-
60
- export interface DeleteResponse {
61
- price_variant: PriceVariant;
62
- }
63
-
64
- export interface ListResponse {
65
- list: { price_variant: PriceVariant }[];
66
- next_offset?: string;
67
- }
68
-
69
- export interface Attribute {
70
- name: string;
71
- value: string;
72
- }
73
- // REQUEST PARAMS
74
- //---------------
75
-
76
- export interface CreateInputParam {
77
- id: string;
78
- name: string;
79
- external_name?: string;
80
- description?: string;
81
- variant_group?: string;
82
- attributes?: AttributesCreateInputParam[];
83
- }
84
- export interface UpdateInputParam {
85
- name?: string;
86
- external_name?: string;
87
- description?: string;
88
- variant_group?: string;
89
- status?: 'active' | 'archived';
90
- attributes?: AttributesUpdateInputParam[];
91
- }
92
- export interface ListInputParam {
93
- limit?: number;
94
- offset?: string;
95
- id?: filter.String;
96
- name?: filter.String;
97
- status?: filter.Enum;
98
- updated_at?: filter.Timestamp;
99
- created_at?: filter.Timestamp;
100
- 'sort_by[asc]'?: string;
101
- 'sort_by[desc]'?: string;
102
- }
103
- export interface AttributesCreateInputParam {
104
- name: string;
105
- value: string;
106
- }
107
- export interface AttributesUpdateInputParam {
108
- name: string;
109
- value: string;
110
- }
111
- }
112
- }
@@ -1,130 +0,0 @@
1
- ///<reference path='./../core.d.ts'/>
2
- ///<reference path='./../index.d.ts'/>
3
-
4
- declare module 'chargebee' {
5
- export interface PricingPageSession {
6
- id?: string;
7
- url?: string;
8
- created_at?: number;
9
- expires_at?: number;
10
- }
11
-
12
- export namespace PricingPageSession {
13
- export class PricingPageSessionResource {
14
- createForNewSubscription(
15
- input: CreateForNewSubscriptionInputParam,
16
- headers?: ChargebeeRequestHeader,
17
- ): Promise<ChargebeeResponse<CreateForNewSubscriptionResponse>>;
18
-
19
- createForExistingSubscription(
20
- input: CreateForExistingSubscriptionInputParam,
21
- headers?: ChargebeeRequestHeader,
22
- ): Promise<ChargebeeResponse<CreateForExistingSubscriptionResponse>>;
23
- }
24
-
25
- export interface CreateForNewSubscriptionResponse {
26
- pricing_page_session: PricingPageSession;
27
- }
28
-
29
- export interface CreateForExistingSubscriptionResponse {
30
- pricing_page_session: PricingPageSession;
31
- }
32
-
33
- // REQUEST PARAMS
34
- //---------------
35
-
36
- export interface CreateForNewSubscriptionInputParam {
37
- redirect_url?: string;
38
- business_entity_id?: string;
39
- pricing_page?: PricingPageCreateForNewSubscriptionInputParam;
40
- subscription?: SubscriptionCreateForNewSubscriptionInputParam;
41
- customer?: CustomerCreateForNewSubscriptionInputParam;
42
- billing_address?: BillingAddressCreateForNewSubscriptionInputParam;
43
- shipping_address?: ShippingAddressCreateForNewSubscriptionInputParam;
44
- discounts?: DiscountsCreateForNewSubscriptionInputParam[];
45
- }
46
- export interface CreateForExistingSubscriptionInputParam {
47
- redirect_url?: string;
48
- pricing_page?: PricingPageCreateForExistingSubscriptionInputParam;
49
- subscription?: SubscriptionCreateForExistingSubscriptionInputParam;
50
- discounts?: DiscountsCreateForExistingSubscriptionInputParam[];
51
- }
52
- export interface BillingAddressCreateForNewSubscriptionInputParam {
53
- first_name?: string;
54
- last_name?: string;
55
- email?: string;
56
- company?: string;
57
- phone?: string;
58
- line1?: string;
59
- line2?: string;
60
- line3?: string;
61
- city?: string;
62
- state_code?: string;
63
- state?: string;
64
- zip?: string;
65
- country?: string;
66
- validation_status?: ValidationStatus;
67
- }
68
- export interface PricingPageCreateForNewSubscriptionInputParam {
69
- id: string;
70
- }
71
- export interface CustomerCreateForNewSubscriptionInputParam {
72
- id?: string;
73
- email?: string;
74
- first_name?: string;
75
- last_name?: string;
76
- company?: string;
77
- phone?: string;
78
- locale?: string;
79
- }
80
- export interface ShippingAddressCreateForNewSubscriptionInputParam {
81
- first_name?: string;
82
- last_name?: string;
83
- email?: string;
84
- company?: string;
85
- phone?: string;
86
- line1?: string;
87
- line2?: string;
88
- line3?: string;
89
- city?: string;
90
- state_code?: string;
91
- state?: string;
92
- zip?: string;
93
- country?: string;
94
- validation_status?: ValidationStatus;
95
- }
96
- export interface SubscriptionCreateForNewSubscriptionInputParam {
97
- id?: string;
98
- }
99
-
100
- export interface DiscountsCreateForNewSubscriptionInputParam {
101
- apply_on: ApplyOn;
102
- duration_type: DurationType;
103
- percentage?: number;
104
- amount?: number;
105
- period?: number;
106
- period_unit?: PeriodUnit;
107
- included_in_mrr?: boolean;
108
- item_price_id?: string;
109
- label?: string;
110
- }
111
- export interface PricingPageCreateForExistingSubscriptionInputParam {
112
- id: string;
113
- }
114
- export interface SubscriptionCreateForExistingSubscriptionInputParam {
115
- id: string;
116
- }
117
-
118
- export interface DiscountsCreateForExistingSubscriptionInputParam {
119
- apply_on: ApplyOn;
120
- duration_type: DurationType;
121
- percentage?: number;
122
- amount?: number;
123
- period?: number;
124
- period_unit?: PeriodUnit;
125
- included_in_mrr?: boolean;
126
- item_price_id?: string;
127
- label?: string;
128
- }
129
- }
130
- }
@@ -1,111 +0,0 @@
1
- ///<reference path='./../core.d.ts'/>
2
- ///<reference path='./../index.d.ts'/>
3
- ///<reference path='./filter.d.ts'/>
4
- declare module 'chargebee' {
5
- export interface PromotionalCredit {
6
- id: string;
7
- customer_id: string;
8
- type: 'increment' | 'decrement';
9
- amount_in_decimal?: string;
10
- amount: number;
11
- currency_code: string;
12
- description: string;
13
- credit_type: CreditType;
14
- reference?: string;
15
- closing_balance: number;
16
- done_by?: string;
17
- created_at: number;
18
- }
19
-
20
- export namespace PromotionalCredit {
21
- export class PromotionalCreditResource {
22
- add(
23
- input: AddInputParam,
24
- headers?: ChargebeeRequestHeader,
25
- ): Promise<ChargebeeResponse<AddResponse>>;
26
-
27
- deduct(
28
- input: DeductInputParam,
29
- headers?: ChargebeeRequestHeader,
30
- ): Promise<ChargebeeResponse<DeductResponse>>;
31
-
32
- set(
33
- input: SetInputParam,
34
- headers?: ChargebeeRequestHeader,
35
- ): Promise<ChargebeeResponse<SetResponse>>;
36
-
37
- list(
38
- input?: ListInputParam,
39
- headers?: ChargebeeRequestHeader,
40
- ): Promise<ChargebeeResponse<ListResponse>>;
41
-
42
- retrieve(
43
- account_credit_id: string,
44
- headers?: ChargebeeRequestHeader,
45
- ): Promise<ChargebeeResponse<RetrieveResponse>>;
46
- }
47
-
48
- export interface AddResponse {
49
- customer: Customer;
50
- promotional_credit: PromotionalCredit;
51
- }
52
-
53
- export interface DeductResponse {
54
- customer: Customer;
55
- promotional_credit: PromotionalCredit;
56
- }
57
-
58
- export interface SetResponse {
59
- customer: Customer;
60
- promotional_credit: PromotionalCredit;
61
- }
62
-
63
- export interface ListResponse {
64
- list: { promotional_credit: PromotionalCredit }[];
65
- next_offset?: string;
66
- }
67
-
68
- export interface RetrieveResponse {
69
- promotional_credit: PromotionalCredit;
70
- }
71
-
72
- // REQUEST PARAMS
73
- //---------------
74
-
75
- export interface AddInputParam {
76
- customer_id: string;
77
- amount?: number;
78
- amount_in_decimal?: string;
79
- currency_code?: string;
80
- description: string;
81
- credit_type?: CreditType;
82
- reference?: string;
83
- }
84
- export interface DeductInputParam {
85
- customer_id: string;
86
- amount?: number;
87
- amount_in_decimal?: string;
88
- currency_code?: string;
89
- description: string;
90
- credit_type?: CreditType;
91
- reference?: string;
92
- }
93
- export interface SetInputParam {
94
- customer_id: string;
95
- amount?: number;
96
- amount_in_decimal?: string;
97
- currency_code?: string;
98
- description: string;
99
- credit_type?: CreditType;
100
- reference?: string;
101
- }
102
- export interface ListInputParam {
103
- limit?: number;
104
- offset?: string;
105
- id?: filter.String;
106
- created_at?: filter.Timestamp;
107
- type?: filter.Enum;
108
- customer_id?: filter.String;
109
- }
110
- }
111
- }
@@ -1,202 +0,0 @@
1
- ///<reference path='./../core.d.ts'/>
2
- ///<reference path='./../index.d.ts'/>
3
-
4
- declare module 'chargebee' {
5
- export interface Purchase {
6
- id?: string;
7
- customer_id: string;
8
- created_at?: number;
9
- modified_at?: number;
10
- subscription_ids?: string[];
11
- invoice_ids?: string[];
12
- }
13
-
14
- export namespace Purchase {
15
- export class PurchaseResource {
16
- create(
17
- input: CreateInputParam,
18
- headers?: ChargebeeRequestHeader,
19
- ): Promise<ChargebeeResponse<CreateResponse>>;
20
-
21
- estimate(
22
- input: EstimateInputParam,
23
- headers?: ChargebeeRequestHeader,
24
- ): Promise<ChargebeeResponse<EstimateResponse>>;
25
- }
26
-
27
- export interface CreateResponse {
28
- purchase: Purchase;
29
- }
30
-
31
- export interface EstimateResponse {
32
- estimate: Estimate;
33
- }
34
-
35
- // REQUEST PARAMS
36
- //---------------
37
-
38
- export interface CreateInputParam {
39
- customer_id: string;
40
- payment_source_id?: string;
41
- invoice_info?: InvoiceInfoCreateInputParam;
42
- payment_schedule?: PaymentScheduleCreateInputParam;
43
- statement_descriptor?: StatementDescriptorCreateInputParam;
44
- purchase_items?: PurchaseItemsCreateInputParam[];
45
- item_tiers?: ItemTiersCreateInputParam[];
46
- shipping_addresses?: ShippingAddressesCreateInputParam[];
47
- discounts?: DiscountsCreateInputParam[];
48
- subscription_info?: SubscriptionInfoCreateInputParam[];
49
- contract_terms?: ContractTermsCreateInputParam[];
50
- }
51
- export interface EstimateInputParam {
52
- client_profile_id?: string;
53
- customer_id?: string;
54
- customer?: CustomerEstimateInputParam;
55
- billing_address?: BillingAddressEstimateInputParam;
56
- purchase_items?: PurchaseItemsEstimateInputParam[];
57
- item_tiers?: ItemTiersEstimateInputParam[];
58
- shipping_addresses?: ShippingAddressesEstimateInputParam[];
59
- discounts?: DiscountsEstimateInputParam[];
60
- subscription_info?: SubscriptionInfoEstimateInputParam[];
61
- contract_terms?: ContractTermsEstimateInputParam[];
62
- }
63
- export interface StatementDescriptorCreateInputParam {
64
- descriptor?: string;
65
- }
66
- export interface PaymentScheduleCreateInputParam {
67
- scheme_id?: string;
68
- amount?: number;
69
- }
70
- export interface InvoiceInfoCreateInputParam {
71
- po_number?: string;
72
- notes?: string;
73
- }
74
-
75
- export interface SubscriptionInfoCreateInputParam {
76
- index: number;
77
- subscription_id?: string;
78
- billing_cycles?: number;
79
- contract_term_billing_cycle_on_renewal?: number;
80
- meta_data?: any;
81
- }
82
- export interface PurchaseItemsCreateInputParam {
83
- index: number;
84
- item_price_id: string;
85
- quantity?: number;
86
- unit_amount?: number;
87
- unit_amount_in_decimal?: string;
88
- quantity_in_decimal?: string;
89
- }
90
- export interface DiscountsCreateInputParam {
91
- index?: number;
92
- coupon_id?: string;
93
- percentage?: number;
94
- amount?: number;
95
- included_in_mrr?: boolean;
96
- }
97
- export interface ContractTermsCreateInputParam {
98
- index: number;
99
- action_at_term_end?: 'renew' | 'evergreen' | 'cancel' | 'renew_once';
100
- cancellation_cutoff_period?: number;
101
- }
102
- export interface ItemTiersCreateInputParam {
103
- index: number;
104
- item_price_id?: string;
105
- starting_unit?: number;
106
- ending_unit?: number;
107
- price?: number;
108
- starting_unit_in_decimal?: string;
109
- ending_unit_in_decimal?: string;
110
- price_in_decimal?: string;
111
- }
112
- export interface ShippingAddressesCreateInputParam {
113
- first_name?: string;
114
- last_name?: string;
115
- email?: string;
116
- company?: string;
117
- phone?: string;
118
- line1?: string;
119
- line2?: string;
120
- line3?: string;
121
- city?: string;
122
- state?: string;
123
- state_code?: string;
124
- country?: string;
125
- zip?: string;
126
- validation_status?: ValidationStatus;
127
- }
128
- export interface BillingAddressEstimateInputParam {
129
- line1?: string;
130
- line2?: string;
131
- line3?: string;
132
- city?: string;
133
- state_code?: string;
134
- zip?: string;
135
- country?: string;
136
- validation_status?: ValidationStatus;
137
- }
138
- export interface CustomerEstimateInputParam {
139
- vat_number?: string;
140
- vat_number_prefix?: string;
141
- registered_for_gst?: boolean;
142
- taxability?: Taxability;
143
- entity_code?: EntityCode;
144
- exempt_number?: string;
145
- exemption_details?: any;
146
- customer_type?: CustomerType;
147
- }
148
-
149
- export interface SubscriptionInfoEstimateInputParam {
150
- index: number;
151
- subscription_id?: string;
152
- billing_cycles?: number;
153
- contract_term_billing_cycle_on_renewal?: number;
154
- }
155
- export interface PurchaseItemsEstimateInputParam {
156
- index: number;
157
- item_price_id: string;
158
- quantity?: number;
159
- unit_amount?: number;
160
- unit_amount_in_decimal?: string;
161
- quantity_in_decimal?: string;
162
- }
163
- export interface DiscountsEstimateInputParam {
164
- index?: number;
165
- coupon_id?: string;
166
- percentage?: number;
167
- amount?: number;
168
- included_in_mrr?: boolean;
169
- }
170
- export interface ContractTermsEstimateInputParam {
171
- index: number;
172
- action_at_term_end?: 'renew' | 'evergreen' | 'cancel' | 'renew_once';
173
- cancellation_cutoff_period?: number;
174
- }
175
- export interface ItemTiersEstimateInputParam {
176
- index: number;
177
- item_price_id?: string;
178
- starting_unit?: number;
179
- ending_unit?: number;
180
- price?: number;
181
- starting_unit_in_decimal?: string;
182
- ending_unit_in_decimal?: string;
183
- price_in_decimal?: string;
184
- }
185
- export interface ShippingAddressesEstimateInputParam {
186
- first_name?: string;
187
- last_name?: string;
188
- email?: string;
189
- company?: string;
190
- phone?: string;
191
- line1?: string;
192
- line2?: string;
193
- line3?: string;
194
- city?: string;
195
- state?: string;
196
- state_code?: string;
197
- country?: string;
198
- zip?: string;
199
- validation_status?: ValidationStatus;
200
- }
201
- }
202
- }