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,328 +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 ItemPrice {
6
- [key: string]: unknown;
7
- id: string;
8
- name: string;
9
- item_family_id?: string;
10
- item_id?: string;
11
- description?: string;
12
- status?: 'active' | 'archived' | 'deleted';
13
- external_name?: string;
14
- price_variant_id?: string;
15
- proration_type?: 'site_default' | 'partial_term' | 'full_term';
16
- pricing_model: PricingModel;
17
- price?: number;
18
- price_in_decimal?: string;
19
- period?: number;
20
- currency_code: string;
21
- period_unit?: 'day' | 'week' | 'month' | 'year';
22
- trial_period?: number;
23
- trial_period_unit?: 'day' | 'month';
24
- trial_end_action?:
25
- | 'site_default'
26
- | 'activate_subscription'
27
- | 'cancel_subscription';
28
- shipping_period?: number;
29
- shipping_period_unit?: 'day' | 'week' | 'month' | 'year';
30
- billing_cycles?: number;
31
- free_quantity: number;
32
- free_quantity_in_decimal?: string;
33
- channel?: Channel;
34
- resource_version?: number;
35
- updated_at?: number;
36
- created_at: number;
37
- usage_accumulation_reset_frequency?: UsageAccumulationResetFrequency;
38
- archived_at?: number;
39
- invoice_notes?: string;
40
- tiers?: ItemPrice.Tier[];
41
- is_taxable?: boolean;
42
- tax_detail?: ItemPrice.TaxDetail;
43
- tax_providers_fields?: ItemPrice.TaxProvidersField[];
44
- accounting_detail?: ItemPrice.AccountingDetail;
45
- metadata?: any;
46
- item_type?: ItemType;
47
- archivable?: boolean;
48
- parent_item_id?: string;
49
- show_description_in_invoices?: boolean;
50
- show_description_in_quotes?: boolean;
51
- }
52
-
53
- export namespace ItemPrice {
54
- export class ItemPriceResource {
55
- create(
56
- input: CreateInputParam,
57
- headers?: ChargebeeRequestHeader,
58
- ): Promise<ChargebeeResponse<CreateResponse>>;
59
-
60
- retrieve(
61
- item_price_id: string,
62
- headers?: ChargebeeRequestHeader,
63
- ): Promise<ChargebeeResponse<RetrieveResponse>>;
64
-
65
- update(
66
- item_price_id: string,
67
- input: UpdateInputParam,
68
- headers?: ChargebeeRequestHeader,
69
- ): Promise<ChargebeeResponse<UpdateResponse>>;
70
-
71
- list(
72
- input?: ListInputParam,
73
- headers?: ChargebeeRequestHeader,
74
- ): Promise<ChargebeeResponse<ListResponse>>;
75
-
76
- delete(
77
- item_price_id: string,
78
- headers?: ChargebeeRequestHeader,
79
- ): Promise<ChargebeeResponse<DeleteResponse>>;
80
-
81
- findApplicableItems(
82
- item_price_id: string,
83
- input?: FindApplicableItemsInputParam,
84
- headers?: ChargebeeRequestHeader,
85
- ): Promise<ChargebeeResponse<FindApplicableItemsResponse>>;
86
-
87
- findApplicableItemPrices(
88
- item_price_id: string,
89
- input?: FindApplicableItemPricesInputParam,
90
- headers?: ChargebeeRequestHeader,
91
- ): Promise<ChargebeeResponse<FindApplicableItemPricesResponse>>;
92
- }
93
-
94
- export interface CreateResponse {
95
- item_price: ItemPrice;
96
- }
97
-
98
- export interface RetrieveResponse {
99
- item_price: ItemPrice;
100
- }
101
-
102
- export interface UpdateResponse {
103
- item_price: ItemPrice;
104
- }
105
-
106
- export interface ListResponse {
107
- list: { item_price: ItemPrice }[];
108
- next_offset?: string;
109
- }
110
-
111
- export interface DeleteResponse {
112
- item_price: ItemPrice;
113
- }
114
-
115
- export interface FindApplicableItemsResponse {
116
- list: { item: Item }[];
117
- next_offset?: string;
118
- }
119
-
120
- export interface FindApplicableItemPricesResponse {
121
- list: { item_price: ItemPrice }[];
122
- next_offset?: string;
123
- }
124
-
125
- export interface Tier {
126
- starting_unit: number;
127
- ending_unit?: number;
128
- price: number;
129
- starting_unit_in_decimal?: string;
130
- ending_unit_in_decimal?: string;
131
- price_in_decimal?: string;
132
- }
133
- export interface TaxDetail {
134
- tax_profile_id?: string;
135
- avalara_sale_type?: AvalaraSaleType;
136
- avalara_transaction_type?: number;
137
- avalara_service_type?: number;
138
- avalara_tax_code?: string;
139
- hsn_code?: string;
140
- taxjar_product_code?: string;
141
- }
142
- export interface TaxProvidersField {
143
- provider_name: string;
144
- field_id: string;
145
- field_value: string;
146
- }
147
- export interface AccountingDetail {
148
- sku?: string;
149
- accounting_code?: string;
150
- accounting_category1?: string;
151
- accounting_category2?: string;
152
- accounting_category3?: string;
153
- accounting_category4?: string;
154
- }
155
- // REQUEST PARAMS
156
- //---------------
157
-
158
- export interface CreateInputParam {
159
- id: string;
160
- name: string;
161
- description?: string;
162
- item_id: string;
163
- invoice_notes?: string;
164
- proration_type?: 'site_default' | 'partial_term' | 'full_term';
165
- external_name?: string;
166
- currency_code?: string;
167
- price_variant_id?: string;
168
- is_taxable?: boolean;
169
- free_quantity?: number;
170
- free_quantity_in_decimal?: string;
171
- metadata?: any;
172
- show_description_in_invoices?: boolean;
173
- show_description_in_quotes?: boolean;
174
- usage_accumulation_reset_frequency?: UsageAccumulationResetFrequency;
175
- pricing_model?: PricingModel;
176
- price?: number;
177
- price_in_decimal?: string;
178
- period_unit?: 'day' | 'week' | 'month' | 'year';
179
- period?: number;
180
- trial_period_unit?: 'day' | 'month';
181
- trial_period?: number;
182
- shipping_period?: number;
183
- shipping_period_unit?: 'day' | 'week' | 'month' | 'year';
184
- billing_cycles?: number;
185
- trial_end_action?:
186
- | 'site_default'
187
- | 'activate_subscription'
188
- | 'cancel_subscription';
189
- tax_detail?: TaxDetailCreateInputParam;
190
- accounting_detail?: AccountingDetailCreateInputParam;
191
- tiers?: TiersCreateInputParam[];
192
- tax_providers_fields?: TaxProvidersFieldsCreateInputParam[];
193
- [key: `cf_${string}`]: unknown;
194
- }
195
- export interface UpdateInputParam {
196
- name?: string;
197
- description?: string;
198
- proration_type?: 'site_default' | 'partial_term' | 'full_term';
199
- price_variant_id?: string;
200
- status?: 'active' | 'archived';
201
- external_name?: string;
202
- usage_accumulation_reset_frequency?: UsageAccumulationResetFrequency;
203
- currency_code?: string;
204
- invoice_notes?: string;
205
- is_taxable?: boolean;
206
- free_quantity?: number;
207
- free_quantity_in_decimal?: string;
208
- metadata?: any;
209
- pricing_model?: PricingModel;
210
- price?: number;
211
- price_in_decimal?: string;
212
- period_unit?: 'day' | 'week' | 'month' | 'year';
213
- period?: number;
214
- trial_period_unit?: 'day' | 'month';
215
- trial_period?: number;
216
- shipping_period?: number;
217
- shipping_period_unit?: 'day' | 'week' | 'month' | 'year';
218
- billing_cycles?: number;
219
- trial_end_action?:
220
- | 'site_default'
221
- | 'activate_subscription'
222
- | 'cancel_subscription';
223
- show_description_in_invoices?: boolean;
224
- show_description_in_quotes?: boolean;
225
- tax_detail?: TaxDetailUpdateInputParam;
226
- accounting_detail?: AccountingDetailUpdateInputParam;
227
- tiers?: TiersUpdateInputParam[];
228
- tax_providers_fields?: TaxProvidersFieldsUpdateInputParam[];
229
- [key: `cf_${string}`]: unknown;
230
- }
231
- export interface ListInputParam {
232
- limit?: number;
233
- offset?: string;
234
- id?: filter.String;
235
- name?: filter.String;
236
- pricing_model?: filter.Enum;
237
- item_id?: filter.String;
238
- item_family_id?: filter.String;
239
- item_type?: filter.Enum;
240
- currency_code?: filter.String;
241
- price_variant_id?: filter.String;
242
- trial_period?: filter.Number;
243
- trial_period_unit?: filter.Enum;
244
- status?: filter.Enum;
245
- updated_at?: filter.Timestamp;
246
- period_unit?: filter.Enum;
247
- period?: filter.Number;
248
- channel?: filter.Enum;
249
- 'sort_by[asc]'?: string;
250
- 'sort_by[desc]'?: string;
251
- }
252
- export interface FindApplicableItemsInputParam {
253
- limit?: number;
254
- offset?: string;
255
- 'sort_by[asc]'?: string;
256
- 'sort_by[desc]'?: string;
257
- }
258
- export interface FindApplicableItemPricesInputParam {
259
- limit?: number;
260
- offset?: string;
261
- item_id?: string;
262
- 'sort_by[asc]'?: string;
263
- 'sort_by[desc]'?: string;
264
- }
265
- export interface TaxDetailCreateInputParam {
266
- tax_profile_id?: string;
267
- avalara_tax_code?: string;
268
- hsn_code?: string;
269
- avalara_sale_type?: AvalaraSaleType;
270
- avalara_transaction_type?: number;
271
- avalara_service_type?: number;
272
- taxjar_product_code?: string;
273
- }
274
- export interface AccountingDetailCreateInputParam {
275
- sku?: string;
276
- accounting_code?: string;
277
- accounting_category1?: string;
278
- accounting_category2?: string;
279
- accounting_category3?: string;
280
- accounting_category4?: string;
281
- }
282
-
283
- export interface TiersCreateInputParam {
284
- starting_unit?: number;
285
- ending_unit?: number;
286
- price?: number;
287
- starting_unit_in_decimal?: string;
288
- ending_unit_in_decimal?: string;
289
- price_in_decimal?: string;
290
- }
291
- export interface TaxProvidersFieldsCreateInputParam {
292
- provider_name: string;
293
- field_id: string;
294
- field_value: string;
295
- }
296
- export interface TaxDetailUpdateInputParam {
297
- tax_profile_id?: string;
298
- avalara_tax_code?: string;
299
- hsn_code?: string;
300
- avalara_sale_type?: AvalaraSaleType;
301
- avalara_transaction_type?: number;
302
- avalara_service_type?: number;
303
- taxjar_product_code?: string;
304
- }
305
- export interface AccountingDetailUpdateInputParam {
306
- sku?: string;
307
- accounting_code?: string;
308
- accounting_category1?: string;
309
- accounting_category2?: string;
310
- accounting_category3?: string;
311
- accounting_category4?: string;
312
- }
313
-
314
- export interface TiersUpdateInputParam {
315
- starting_unit?: number;
316
- ending_unit?: number;
317
- price?: number;
318
- starting_unit_in_decimal?: string;
319
- ending_unit_in_decimal?: string;
320
- price_in_decimal?: string;
321
- }
322
- export interface TaxProvidersFieldsUpdateInputParam {
323
- provider_name: string;
324
- field_id: string;
325
- field_value: string;
326
- }
327
- }
328
- }
@@ -1,8 +0,0 @@
1
- ///<reference path='./../core.d.ts'/>
2
- ///<reference path='./../index.d.ts'/>
3
-
4
- declare module 'chargebee' {
5
- export interface Metadata {
6
- change_type?: string;
7
- }
8
- }
@@ -1,48 +0,0 @@
1
- ///<reference path='./../core.d.ts'/>
2
- ///<reference path='./../index.d.ts'/>
3
-
4
- declare module 'chargebee' {
5
- export interface NonSubscription {
6
- app_id: string;
7
- invoice_id: string;
8
- customer_id?: string;
9
- charge_id: string;
10
- }
11
-
12
- export namespace NonSubscription {
13
- export class NonSubscriptionResource {
14
- processReceipt(
15
- non_subscription_app_id: string,
16
- input: ProcessReceiptInputParam,
17
- headers?: ChargebeeRequestHeader,
18
- ): Promise<ChargebeeResponse<ProcessReceiptResponse>>;
19
- }
20
-
21
- export interface ProcessReceiptResponse {
22
- non_subscription: NonSubscription;
23
- }
24
-
25
- // REQUEST PARAMS
26
- //---------------
27
-
28
- export interface ProcessReceiptInputParam {
29
- receipt: string;
30
- product?: ProductProcessReceiptInputParam;
31
- customer?: CustomerProcessReceiptInputParam;
32
- }
33
- export interface CustomerProcessReceiptInputParam {
34
- id?: string;
35
- email?: string;
36
- first_name?: string;
37
- last_name?: string;
38
- }
39
- export interface ProductProcessReceiptInputParam {
40
- id: string;
41
- currency_code: string;
42
- price: number;
43
- type: 'consumable' | 'non_consumable' | 'non_renewing_subscription';
44
- name?: string;
45
- price_in_decimal?: string;
46
- }
47
- }
48
- }