chargebee 3.5.0 → 3.6.1
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 +146 -0
- package/README.md +6 -3
- package/cjs/environment.js +1 -1
- package/cjs/resources/api_endpoints.js +13 -1
- package/esm/environment.js +1 -1
- package/esm/resources/api_endpoints.js +13 -1
- package/package.json +1 -1
- package/types/core.d.ts +15 -4
- package/types/index.d.ts +6 -0
- package/types/resources/Addon.d.ts +283 -0
- package/types/resources/Comment.d.ts +2 -0
- package/types/resources/CreditNote.d.ts +26 -1
- package/types/resources/CreditNoteEstimate.d.ts +4 -1
- package/types/resources/DifferentialPrice.d.ts +6 -0
- package/types/resources/Estimate.d.ts +19 -0
- package/types/resources/HostedPage.d.ts +6 -0
- package/types/resources/Invoice.d.ts +32 -1
- package/types/resources/InvoiceEstimate.d.ts +26 -1
- package/types/resources/Item.d.ts +3 -1
- package/types/resources/ItemPrice.d.ts +6 -0
- package/types/resources/OmnichannelSubscription.d.ts +5 -5
- package/types/resources/OmnichannelSubscriptionItem.d.ts +38 -2
- package/types/resources/OmnichannelSubscriptionItemScheduledChange.d.ts +27 -0
- package/types/resources/OmnichannelTransaction.d.ts +4 -4
- package/types/resources/PaymentSource.d.ts +1 -0
- package/types/resources/Plan.d.ts +401 -0
- package/types/resources/Quote.d.ts +22 -1
- package/types/resources/QuoteLineGroup.d.ts +2 -1
- package/types/resources/QuotedCharge.d.ts +2 -0
- package/types/resources/QuotedSubscription.d.ts +2 -0
- package/types/resources/Ramp.d.ts +6 -0
- package/types/resources/RecordedPurchase.d.ts +7 -1
- package/types/resources/Subscription.d.ts +8 -0
- package/types/resources/UnbilledCharge.d.ts +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,149 @@
|
|
|
1
|
+
### v3.6.1 (2025-04-25)
|
|
2
|
+
* * *
|
|
3
|
+
|
|
4
|
+
### Bug fixes:
|
|
5
|
+
* Fixed an issue where the optional boolean field is_percentage_pricing at Item Model was incorrectly marked as required.
|
|
6
|
+
* Fixed an issue where the optional enum field item_applicability at Item Model was incorrectly marked as required.
|
|
7
|
+
|
|
8
|
+
### v3.6.0 (2025-04-23)
|
|
9
|
+
* * *
|
|
10
|
+
|
|
11
|
+
### New Resources:
|
|
12
|
+
* OmnichannelSubscriptionItemScheduledChange has been added.
|
|
13
|
+
|
|
14
|
+
### New Attributes:
|
|
15
|
+
* pricing_type has been added to DifferentialPrice#Tier.
|
|
16
|
+
* package_size has been added to DifferentialPrice#Tier.
|
|
17
|
+
* pricing_type has been added to ItemPrice#Tier.
|
|
18
|
+
* package_size has been added to ItemPrice#Tier.
|
|
19
|
+
* pricing_type has been added to Addon#Tier.
|
|
20
|
+
* package_size has been added to Addon#Tier.
|
|
21
|
+
* pricing_type has been added to Plan#Tier.
|
|
22
|
+
* package_size has been added to Plan#Tier.
|
|
23
|
+
* pricing_type has been added to CreditNote#LineItemTier.
|
|
24
|
+
* package_size has been added to CreditNote#LineItemTier.
|
|
25
|
+
* pricing_type has been added to CreditNoteEstimate#LineItemTier.
|
|
26
|
+
* package_size has been added to CreditNoteEstimate#LineItemTier.
|
|
27
|
+
* pricing_type has been added to DifferentialPrice#Tier.
|
|
28
|
+
* package_size has been added to DifferentialPrice#Tier.
|
|
29
|
+
* pricing_type has been added to Invoice#LineItemTier.
|
|
30
|
+
* package_size has been added to Invoice#LineItemTier.
|
|
31
|
+
* pricing_type has been added to InvoiceEstimate#LineItemTier.
|
|
32
|
+
* package_size has been added to InvoiceEstimate#LineItemTier.
|
|
33
|
+
* pricing_type has been added to Quote#LineItemTier.
|
|
34
|
+
* package_size has been added to Quote#LineItemTier.
|
|
35
|
+
* pricing_type has been added to QuotedCharge#LineItemTier.
|
|
36
|
+
* package_size has been added to QuotedCharge#LineItemTier.
|
|
37
|
+
* pricing_type has been added to QuotedSubscription#LineItemTier.
|
|
38
|
+
* package_size has been added to QuotedSubscription#LineItemTier.
|
|
39
|
+
* pricing_type has been added to Ramp#ItemTier.
|
|
40
|
+
* package_size has been added to Ramp#ItemTier.
|
|
41
|
+
* pricing_type has been added to Subscription#ItemTier.
|
|
42
|
+
* package_size has been added to Subscription#ItemTier.
|
|
43
|
+
* pricing_type has been added to UnbilledCharges#Tier.
|
|
44
|
+
* package_size has been added to UnbilledCharges#Tier.
|
|
45
|
+
* metered has been added to CreditNote#LineItem.
|
|
46
|
+
* metered has been added to CreditNoteEstimate#LineItem.
|
|
47
|
+
* metered has been added to Invoice#LineItem.
|
|
48
|
+
* metered has been added to Quote#LineItem.
|
|
49
|
+
* metered has been added to QuoteLineGroup#LineItem.
|
|
50
|
+
* usage_percentage has been changed to percentage in CreditNote#LineItem.
|
|
51
|
+
* usage_percentage has been changed to percentage in CreditNoteEstimate#LineItem.
|
|
52
|
+
* usage_percentage has been changed to percentage in Invoice#LineItem.
|
|
53
|
+
* usage_percentage has been changed to percentage in Quote#LineItem.
|
|
54
|
+
* usage_percentage has been changed to percentage in QuoteLineGroup#LineItem.
|
|
55
|
+
* line_item_addresses has been added to CreditNote.
|
|
56
|
+
* line_item_addresses has been added to Invoices.
|
|
57
|
+
* line_item_addresses has been added to InvoiceEstimate.
|
|
58
|
+
* has_scheduled_changes has been added on OmnichannelSubscriptionItem.
|
|
59
|
+
* item_parent_id_at_source has been added to OmnichannelSubscriptionItem.
|
|
60
|
+
* auto_renew_status has been added to OmnichannelSubscriptionItem.
|
|
61
|
+
* upcoming_renewal has been added to OmnichannelSubscriptionItem.
|
|
62
|
+
* is_percentage_pricing has been added to Item.
|
|
63
|
+
|
|
64
|
+
### New Action:
|
|
65
|
+
* listOmniSubItemScheduleChanges has been added to OmnichannelSubscriptionItem.
|
|
66
|
+
|
|
67
|
+
### Optional Attribute:
|
|
68
|
+
* price_currency has been made optional from requried in OmnichannelTransaction.
|
|
69
|
+
* price_units has been made optional from requried in OmnichannelTransaction.
|
|
70
|
+
* price_nanos has been made optional from requried in OmnichannelTransaction.
|
|
71
|
+
* transacted_at has been made optional from requried in OmnichannelTransaction.
|
|
72
|
+
|
|
73
|
+
### New Input Params:
|
|
74
|
+
* item_tiers[pricing_type] has been added to DifferentialPrice#CreateInputParam.
|
|
75
|
+
* item_tiers[package_size] has been added to DifferentialPrice#CreateInputParam.
|
|
76
|
+
* item_tiers[pricing_type] has been added to ItemPrice#CreateInputParam.
|
|
77
|
+
* item_tiers[package_size] has been added to ItemPrice#CreateInputParam.
|
|
78
|
+
* tiers[pricing_type] has been added to DifferentialPrice#CreateInputParam.
|
|
79
|
+
* tiers[package_size] has been added to DifferentialPrice#CreateInputParam.
|
|
80
|
+
* item_tiers[pricing_type] has been added to Estimate#CreateSubItemEstimateRequestInputParam.
|
|
81
|
+
* item_tiers[package_size] has been added to Estimate#CreateSubItemEstimateRequestInputParam.
|
|
82
|
+
* item_tiers[pricing_type] has been added to Estimate#CreateSubItemForCustomerRequestInputParam.
|
|
83
|
+
* item_tiers[package_size] has been added to Estimate#CreateSubItemForCustomerRequestInputParam.
|
|
84
|
+
* item_tiers[pricing_type] has been added to Estimate#UpdateSubscriptionForItemsRequestInputParam.
|
|
85
|
+
* item_tiers[package_size] has been added to Estimate#UpdateSubscriptionForItemsRequestInputParam.
|
|
86
|
+
* item_tiers[pricing_type] has been added to Estimate#CreateInvoiceForItemsRequestInputParam.
|
|
87
|
+
* item_tiers[package_size] has been added to Estimate#CreateInvoiceForItemsRequestInputParam.
|
|
88
|
+
* item_tiers[pricing_type] has been added to Estimate#CheckoutNewForItemsRequestInputParam.
|
|
89
|
+
* item_tiers[package_size] has been added to Estimate#CheckoutNewForItemsRequestInputParam.
|
|
90
|
+
* item_tiers[pricing_type] has been added to Estimate#CheckoutOneTimeForItemsRequestInputParam.
|
|
91
|
+
* item_tiers[package_size] has been added to Estimate#CheckoutOneTimeForItemsRequestInputParam.
|
|
92
|
+
* item_tiers[pricing_type] has been added to Estimate#CheckoutExistingForItemsRequestInputParam.
|
|
93
|
+
* item_tiers[package_size] has been added to Estimate#CheckoutExistingForItemsRequestInputParam.
|
|
94
|
+
* item_tiers[pricing_type] has been added to Invoice#CreateForChargeItemsAndChargesRequestInputParam.
|
|
95
|
+
* item_tiers[package_size] has been added to Invoice#CreateForChargeItemsAndChargesRequestInputParam.
|
|
96
|
+
* item_tiers[pricing_type] has been added to Invoice#CreateForChargeItemRequestInputParam.
|
|
97
|
+
* item_tiers[package_size] has been added to Invoice#CreateForChargeItemRequestInputParam.
|
|
98
|
+
* item_tiers[pricing_type] has been added to Invoice#AddChargeItemRequestInputParam.
|
|
99
|
+
* item_tiers[package_size] has been added to Invoice#AddChargeItemRequestInputParam.
|
|
100
|
+
* item_tiers[pricing_type] has been added to Quote#CreateSubItemsForCustomerQuoteRequestInputParam.
|
|
101
|
+
* item_tiers[package_size] has been added to Quote#CreateSubItemsForCustomerQuoteRequestInputParam.
|
|
102
|
+
* item_tiers[pricing_type] has been added to Quote#EditCreateSubCustomerQuoteForItemsRequestInputParam.
|
|
103
|
+
* item_tiers[package_size] has been added to Quote#EditCreateSubCustomerQuoteForItemsRequestInputParam.
|
|
104
|
+
* item_tiers[pricing_type] has been added to Quote#UpdateSubscriptionQuoteForItemsRequestInputParam.
|
|
105
|
+
* item_tiers[package_size] has been added to Quote#UpdateSubscriptionQuoteForItemsRequestInputParam.
|
|
106
|
+
* item_tiers[pricing_type] has been added to Quote#EditUpdateSubscriptionQuoteForItemsRequestInputParam.
|
|
107
|
+
* item_tiers[package_size] has been added to Quote#EditUpdateSubscriptionQuoteForItemsRequestInputParam.
|
|
108
|
+
* item_tiers[pricing_type] has been added to Quote#CreateForChargeItemsAndChargesRequestInputParam.
|
|
109
|
+
* item_tiers[package_size] has been added to Quote#CreateForChargeItemsAndChargesRequestInputParam.
|
|
110
|
+
* item_tiers[pricing_type] has been added to Quote#EditForChargeItemsAndChargesRequestInputParam.
|
|
111
|
+
* item_tiers[package_size] has been added to Quote#EditForChargeItemsAndChargesRequestInputParam.
|
|
112
|
+
* item_tiers[pricing_type] has been added to Ramp#CreateForSubscriptionRequestInputParam.
|
|
113
|
+
* item_tiers[package_size] has been added to Ramp#CreateForSubscriptionRequestInputParam.
|
|
114
|
+
* item_tiers[pricing_type] has been added to Ramp#UpdateRequestInputParam.
|
|
115
|
+
* item_tiers[package_size] has been added to Ramp#UpdateRequestInputParam.
|
|
116
|
+
* item_tiers[pricing_type] has been added to Subscription#CreateWithItemsRequestInputParam.
|
|
117
|
+
* item_tiers[package_size] has been added to Subscription#CreateWithItemsRequestInputParam.
|
|
118
|
+
* item_tiers[pricing_type] has been added to Subscription#UpdateForItemsRequestInputParam.
|
|
119
|
+
* item_tiers[package_size] has been added to Subscription#UpdateForItemsRequestInputParam.
|
|
120
|
+
* item_tiers[pricing_type] has been added to Subscription#ImportForItemsRequestInputParam.
|
|
121
|
+
* item_tiers[package_size] has been added to Subscription#ImportForItemsRequestInputParam.
|
|
122
|
+
* item_tiers[pricing_type] has been added to UnbilledCharged#CreateRequestInputParam.
|
|
123
|
+
* item_tiers[package_size] has been added to UnbilledCharged#CreateRequestInputParam.
|
|
124
|
+
* billing_address has been added to Estimate#CreateInvoiceForItemsRequestInputParam.
|
|
125
|
+
* google_play_store[purchase_token] has been added to RecordedPurchase#CreateRequestInputParam.
|
|
126
|
+
* is_percentage_pricing has been added to Item#CreateRequest.
|
|
127
|
+
* include_deleted has been added to PaymentSource#ListRequest.
|
|
128
|
+
|
|
129
|
+
### New Enums:
|
|
130
|
+
* OMNICHANNEL_SUBSCRIPTION_ITEM_SCHEDULED_CHANGE has been added to EntityType#Enum.
|
|
131
|
+
* OMNICHANNEL_SUBSCRIPTION_ITEM_CHANGE_SCHEDULED has been added to EventType#Enum.
|
|
132
|
+
* OMNICHANNEL_SUBSCRIPTION_ITEM_SCHEDULED_CHANGE_REMOVED has been added to EventType#Enum.
|
|
133
|
+
* OMNICHANNEL_SUBSCRIPTION_ITEM_REACTIVATED has been added to EventType#Enum.
|
|
134
|
+
* GOOGLE_PLAY_STORE has been added to OminchannelSubscription#SourceEnum.
|
|
135
|
+
* SPECIFIC_DATE has been added to ContractTermCancelOption.
|
|
136
|
+
* END_OF_SUBSCRIPTION_BILLING_TERM has been added to ContractTermCancelOption.
|
|
137
|
+
* PAYSTACK has been added to GatewayEnum.
|
|
138
|
+
* PricingType Enum has been added.
|
|
139
|
+
* JP_MORGAN has been added to GatewayEnum.
|
|
140
|
+
|
|
141
|
+
### Deprecated Enums:
|
|
142
|
+
* OMNICHANNEL_SUBSCRIPTION_ITEM_DOWNGRADE_SCHEDULED has been deprecated from EntityType#Enum.
|
|
143
|
+
* OMNICHANNEL_SUBSCRIPTION_ITEM_SCHEDULED_DOWNGRADE_REMOVED has been deprecated from EntityType#Enum.
|
|
144
|
+
* REFUNDED_DUE_TO_APP_ISSUE has been added to OmnichannelSubscriptionItem#CancellationReasonEnum.
|
|
145
|
+
* REFUNDED_FOR_OTHER_REASON has been added to OmnichannelSubscriptionItem#CancellationReasonEnum.
|
|
146
|
+
|
|
1
147
|
### v3.5.0 (2025-03-06)
|
|
2
148
|
* * *
|
|
3
149
|
|
package/README.md
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
# Chargebee Node.js / TypeScript
|
|
1
|
+
# Chargebee Node.js / TypeScript Client Library
|
|
2
2
|
|
|
3
|
-
This is the [Node.js](http://nodejs.org/) library for integrating with Chargebee.
|
|
3
|
+
This is the official [Node.js](http://nodejs.org/) library for integrating with Chargebee.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
- 📘 For a complete reference of available APIs, check out our [API Documentation](https://apidocs.chargebee.com/docs/api/?lang=node).
|
|
6
|
+
- 🧪 To explore and test API capabilities interactively, head over to our [API Explorer](https://api-explorer.chargebee.com).
|
|
7
|
+
|
|
8
|
+
If you're upgrading from an older version of [`chargebee-typescript`](https://www.npmjs.com/package/chargebee-typescript) or [`chargebee`](https://www.npmjs.com/package/chargebee/v/2.40.0), please refer to the [Migration Guide](https://github.com/chargebee/chargebee-node/wiki/Migration-guide-for-v3).
|
|
6
9
|
|
|
7
10
|
## Requirements
|
|
8
11
|
|
package/cjs/environment.js
CHANGED
|
@@ -11,7 +11,7 @@ exports.Environment = {
|
|
|
11
11
|
hostSuffix: '.chargebee.com',
|
|
12
12
|
apiPath: '/api/v2',
|
|
13
13
|
timeout: DEFAULT_TIME_OUT,
|
|
14
|
-
clientVersion: 'v3.
|
|
14
|
+
clientVersion: 'v3.6.1',
|
|
15
15
|
port: DEFAULT_PORT,
|
|
16
16
|
timemachineWaitInMillis: DEFAULT_TIME_MACHINE_WAIT,
|
|
17
17
|
exportWaitInMillis: DEFAULT_EXPORT_WAIT,
|
|
@@ -2816,7 +2816,18 @@ exports.Endpoints = {
|
|
|
2816
2816
|
],
|
|
2817
2817
|
],
|
|
2818
2818
|
omnichannelTransaction: [],
|
|
2819
|
-
omnichannelSubscriptionItem: [
|
|
2819
|
+
omnichannelSubscriptionItem: [
|
|
2820
|
+
[
|
|
2821
|
+
'listOmniSubItemScheduleChanges',
|
|
2822
|
+
'GET',
|
|
2823
|
+
'/omnichannel_subscription_items',
|
|
2824
|
+
'/scheduled_changes',
|
|
2825
|
+
true,
|
|
2826
|
+
null,
|
|
2827
|
+
false,
|
|
2828
|
+
{},
|
|
2829
|
+
],
|
|
2830
|
+
],
|
|
2820
2831
|
recordedPurchase: [
|
|
2821
2832
|
['create', 'POST', '/recorded_purchases', null, false, null, false, {}],
|
|
2822
2833
|
['retrieve', 'GET', '/recorded_purchases', null, true, null, false, {}],
|
|
@@ -2848,4 +2859,5 @@ exports.Endpoints = {
|
|
|
2848
2859
|
},
|
|
2849
2860
|
],
|
|
2850
2861
|
],
|
|
2862
|
+
omnichannelSubscriptionItemScheduledChange: [],
|
|
2851
2863
|
};
|
package/esm/environment.js
CHANGED
|
@@ -8,7 +8,7 @@ export const Environment = {
|
|
|
8
8
|
hostSuffix: '.chargebee.com',
|
|
9
9
|
apiPath: '/api/v2',
|
|
10
10
|
timeout: DEFAULT_TIME_OUT,
|
|
11
|
-
clientVersion: 'v3.
|
|
11
|
+
clientVersion: 'v3.6.1',
|
|
12
12
|
port: DEFAULT_PORT,
|
|
13
13
|
timemachineWaitInMillis: DEFAULT_TIME_MACHINE_WAIT,
|
|
14
14
|
exportWaitInMillis: DEFAULT_EXPORT_WAIT,
|
|
@@ -2813,7 +2813,18 @@ export const Endpoints = {
|
|
|
2813
2813
|
],
|
|
2814
2814
|
],
|
|
2815
2815
|
omnichannelTransaction: [],
|
|
2816
|
-
omnichannelSubscriptionItem: [
|
|
2816
|
+
omnichannelSubscriptionItem: [
|
|
2817
|
+
[
|
|
2818
|
+
'listOmniSubItemScheduleChanges',
|
|
2819
|
+
'GET',
|
|
2820
|
+
'/omnichannel_subscription_items',
|
|
2821
|
+
'/scheduled_changes',
|
|
2822
|
+
true,
|
|
2823
|
+
null,
|
|
2824
|
+
false,
|
|
2825
|
+
{},
|
|
2826
|
+
],
|
|
2827
|
+
],
|
|
2817
2828
|
recordedPurchase: [
|
|
2818
2829
|
['create', 'POST', '/recorded_purchases', null, false, null, false, {}],
|
|
2819
2830
|
['retrieve', 'GET', '/recorded_purchases', null, true, null, false, {}],
|
|
@@ -2845,4 +2856,5 @@ export const Endpoints = {
|
|
|
2845
2856
|
},
|
|
2846
2857
|
],
|
|
2847
2858
|
],
|
|
2859
|
+
omnichannelSubscriptionItemScheduledChange: [],
|
|
2848
2860
|
};
|
package/package.json
CHANGED
package/types/core.d.ts
CHANGED
|
@@ -57,7 +57,9 @@ declare module 'chargebee' {
|
|
|
57
57
|
type ChargesHandlingEnum = 'invoice_immediately' | 'add_to_unbilled_charges';
|
|
58
58
|
type ContractTermCancelOptionEnum =
|
|
59
59
|
| 'terminate_immediately'
|
|
60
|
-
| 'end_of_contract_term'
|
|
60
|
+
| 'end_of_contract_term'
|
|
61
|
+
| 'specific_date'
|
|
62
|
+
| 'end_of_subscription_billing_term';
|
|
61
63
|
type CreditOptionForCurrentTermChargesEnum = 'none' | 'prorate' | 'full';
|
|
62
64
|
type CreditTypeEnum = 'loyalty_credits' | 'referral_rewards' | 'general';
|
|
63
65
|
type CustomerTypeEnum =
|
|
@@ -137,7 +139,9 @@ declare module 'chargebee' {
|
|
|
137
139
|
| 'omnichannel_subscription'
|
|
138
140
|
| 'omnichannel_subscription_item'
|
|
139
141
|
| 'omnichannel_transaction'
|
|
140
|
-
| 'recorded_purchase'
|
|
142
|
+
| 'recorded_purchase'
|
|
143
|
+
| 'omnichannel_subscription_item_scheduled_change'
|
|
144
|
+
| 'sales_order';
|
|
141
145
|
type EventNameEnum = 'cancellation_page_loaded';
|
|
142
146
|
type EventTypeEnum =
|
|
143
147
|
| 'coupon_created'
|
|
@@ -318,8 +322,6 @@ declare module 'chargebee' {
|
|
|
318
322
|
| 'subscription_movement_failed'
|
|
319
323
|
| 'omnichannel_subscription_created'
|
|
320
324
|
| 'omnichannel_subscription_item_renewed'
|
|
321
|
-
| 'omnichannel_subscription_item_downgrade_scheduled'
|
|
322
|
-
| 'omnichannel_subscription_item_scheduled_downgrade_removed'
|
|
323
325
|
| 'omnichannel_subscription_item_downgraded'
|
|
324
326
|
| 'omnichannel_subscription_item_expired'
|
|
325
327
|
| 'omnichannel_subscription_item_cancellation_scheduled'
|
|
@@ -336,6 +338,12 @@ declare module 'chargebee' {
|
|
|
336
338
|
| 'rule_updated'
|
|
337
339
|
| 'rule_deleted'
|
|
338
340
|
| 'record_purchase_failed'
|
|
341
|
+
| 'omnichannel_subscription_item_change_scheduled'
|
|
342
|
+
| 'omnichannel_subscription_item_scheduled_change_removed'
|
|
343
|
+
| 'omnichannel_subscription_item_reactivated'
|
|
344
|
+
| 'sales_order_created'
|
|
345
|
+
| 'sales_order_updated'
|
|
346
|
+
| 'omnichannel_subscription_item_changed'
|
|
339
347
|
| 'plan_created'
|
|
340
348
|
| 'plan_updated'
|
|
341
349
|
| 'plan_deleted'
|
|
@@ -396,6 +404,8 @@ declare module 'chargebee' {
|
|
|
396
404
|
| 'ebanx'
|
|
397
405
|
| 'dlocal'
|
|
398
406
|
| 'nuvei'
|
|
407
|
+
| 'paystack'
|
|
408
|
+
| 'jp_morgan'
|
|
399
409
|
| 'gocardless'
|
|
400
410
|
| 'not_applicable';
|
|
401
411
|
type HierarchyOperationTypeEnum =
|
|
@@ -504,6 +514,7 @@ declare module 'chargebee' {
|
|
|
504
514
|
| 'tiered'
|
|
505
515
|
| 'volume'
|
|
506
516
|
| 'stairstep';
|
|
517
|
+
type PricingTypeEnum = 'per_unit' | 'flat_fee' | 'package';
|
|
507
518
|
type ProductCatalogVersionEnum = 'v1' | 'v2';
|
|
508
519
|
type ProrationTypeEnum = 'full_term' | 'partial_term' | 'none';
|
|
509
520
|
type ReferralSystemEnum =
|
package/types/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
///<reference path='./resources/Addon.d.ts' />
|
|
1
2
|
///<reference path='./resources/Address.d.ts' />
|
|
2
3
|
///<reference path='./resources/AdvanceInvoiceSchedule.d.ts' />
|
|
3
4
|
///<reference path='./resources/AttachedItem.d.ts' />
|
|
@@ -44,6 +45,7 @@
|
|
|
44
45
|
///<reference path='./resources/NonSubscription.d.ts' />
|
|
45
46
|
///<reference path='./resources/OmnichannelSubscription.d.ts' />
|
|
46
47
|
///<reference path='./resources/OmnichannelSubscriptionItem.d.ts' />
|
|
48
|
+
///<reference path='./resources/OmnichannelSubscriptionItemScheduledChange.d.ts' />
|
|
47
49
|
///<reference path='./resources/OmnichannelTransaction.d.ts' />
|
|
48
50
|
///<reference path='./resources/Order.d.ts' />
|
|
49
51
|
///<reference path='./resources/PaymentIntent.d.ts' />
|
|
@@ -53,6 +55,7 @@
|
|
|
53
55
|
///<reference path='./resources/PaymentScheduleScheme.d.ts' />
|
|
54
56
|
///<reference path='./resources/PaymentSource.d.ts' />
|
|
55
57
|
///<reference path='./resources/PaymentVoucher.d.ts' />
|
|
58
|
+
///<reference path='./resources/Plan.d.ts' />
|
|
56
59
|
///<reference path='./resources/PortalSession.d.ts' />
|
|
57
60
|
///<reference path='./resources/PriceVariant.d.ts' />
|
|
58
61
|
///<reference path='./resources/PricingPageSession.d.ts' />
|
|
@@ -121,6 +124,7 @@ export type Config = {
|
|
|
121
124
|
declare module 'chargebee' {
|
|
122
125
|
export default class Chargebee {
|
|
123
126
|
constructor(config: Config);
|
|
127
|
+
addon: Addon.AddonResource;
|
|
124
128
|
address: Address.AddressResource;
|
|
125
129
|
attachedItem: AttachedItem.AttachedItemResource;
|
|
126
130
|
businessEntity: BusinessEntity.BusinessEntityResource;
|
|
@@ -151,11 +155,13 @@ declare module 'chargebee' {
|
|
|
151
155
|
itemPrice: ItemPrice.ItemPriceResource;
|
|
152
156
|
nonSubscription: NonSubscription.NonSubscriptionResource;
|
|
153
157
|
omnichannelSubscription: OmnichannelSubscription.OmnichannelSubscriptionResource;
|
|
158
|
+
omnichannelSubscriptionItem: OmnichannelSubscriptionItem.OmnichannelSubscriptionItemResource;
|
|
154
159
|
order: Order.OrderResource;
|
|
155
160
|
paymentIntent: PaymentIntent.PaymentIntentResource;
|
|
156
161
|
paymentScheduleScheme: PaymentScheduleScheme.PaymentScheduleSchemeResource;
|
|
157
162
|
paymentSource: PaymentSource.PaymentSourceResource;
|
|
158
163
|
paymentVoucher: PaymentVoucher.PaymentVoucherResource;
|
|
164
|
+
plan: Plan.PlanResource;
|
|
159
165
|
portalSession: PortalSession.PortalSessionResource;
|
|
160
166
|
priceVariant: PriceVariant.PriceVariantResource;
|
|
161
167
|
pricingPageSession: PricingPageSession.PricingPageSessionResource;
|
|
@@ -0,0 +1,283 @@
|
|
|
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 Addon {
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
invoice_name?: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
pricing_model: PricingModelEnum;
|
|
12
|
+
type: 'on_off' | 'quantity' | 'tiered' | 'volume' | 'stairstep';
|
|
13
|
+
charge_type: 'recurring' | 'non_recurring';
|
|
14
|
+
price?: number;
|
|
15
|
+
currency_code: string;
|
|
16
|
+
period?: number;
|
|
17
|
+
period_unit: 'day' | 'week' | 'month' | 'year' | 'not_applicable';
|
|
18
|
+
unit?: string;
|
|
19
|
+
status: 'active' | 'archived' | 'deleted';
|
|
20
|
+
archived_at?: number;
|
|
21
|
+
enabled_in_portal: boolean;
|
|
22
|
+
tax_code?: string;
|
|
23
|
+
hsn_code?: string;
|
|
24
|
+
taxjar_product_code?: string;
|
|
25
|
+
avalara_sale_type?: AvalaraSaleTypeEnum;
|
|
26
|
+
avalara_transaction_type?: number;
|
|
27
|
+
avalara_service_type?: number;
|
|
28
|
+
sku?: string;
|
|
29
|
+
accounting_code?: string;
|
|
30
|
+
accounting_category1?: string;
|
|
31
|
+
accounting_category2?: string;
|
|
32
|
+
accounting_category3?: string;
|
|
33
|
+
accounting_category4?: string;
|
|
34
|
+
is_shippable?: boolean;
|
|
35
|
+
shipping_frequency_period?: number;
|
|
36
|
+
shipping_frequency_period_unit?: 'year' | 'month' | 'week' | 'day';
|
|
37
|
+
resource_version?: number;
|
|
38
|
+
updated_at?: number;
|
|
39
|
+
price_in_decimal?: string;
|
|
40
|
+
included_in_mrr?: boolean;
|
|
41
|
+
channel?: ChannelEnum;
|
|
42
|
+
proration_type?: 'site_default' | 'partial_term' | 'full_term';
|
|
43
|
+
invoice_notes?: string;
|
|
44
|
+
taxable?: boolean;
|
|
45
|
+
tax_profile_id?: string;
|
|
46
|
+
meta_data?: any;
|
|
47
|
+
tiers?: Addon.Tier[];
|
|
48
|
+
tax_providers_fields?: Addon.TaxProvidersField[];
|
|
49
|
+
show_description_in_invoices?: boolean;
|
|
50
|
+
show_description_in_quotes?: boolean;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export namespace Addon {
|
|
54
|
+
export class AddonResource {
|
|
55
|
+
create(
|
|
56
|
+
input: CreateInputParam,
|
|
57
|
+
headers?: ChargebeeRequestHeader,
|
|
58
|
+
): Promise<ChargebeeResponse<CreateResponse>>;
|
|
59
|
+
|
|
60
|
+
update(
|
|
61
|
+
addon_id: string,
|
|
62
|
+
input: UpdateInputParam,
|
|
63
|
+
headers?: ChargebeeRequestHeader,
|
|
64
|
+
): Promise<ChargebeeResponse<UpdateResponse>>;
|
|
65
|
+
|
|
66
|
+
list(
|
|
67
|
+
input?: ListInputParam,
|
|
68
|
+
headers?: ChargebeeRequestHeader,
|
|
69
|
+
): Promise<ChargebeeResponse<ListResponse>>;
|
|
70
|
+
|
|
71
|
+
retrieve(
|
|
72
|
+
addon_id: string,
|
|
73
|
+
headers?: ChargebeeRequestHeader,
|
|
74
|
+
): Promise<ChargebeeResponse<RetrieveResponse>>;
|
|
75
|
+
|
|
76
|
+
delete(
|
|
77
|
+
addon_id: string,
|
|
78
|
+
headers?: ChargebeeRequestHeader,
|
|
79
|
+
): Promise<ChargebeeResponse<DeleteResponse>>;
|
|
80
|
+
|
|
81
|
+
copy(
|
|
82
|
+
input: CopyInputParam,
|
|
83
|
+
headers?: ChargebeeRequestHeader,
|
|
84
|
+
): Promise<ChargebeeResponse<CopyResponse>>;
|
|
85
|
+
|
|
86
|
+
unarchive(
|
|
87
|
+
addon_id: string,
|
|
88
|
+
headers?: ChargebeeRequestHeader,
|
|
89
|
+
): Promise<ChargebeeResponse<UnarchiveResponse>>;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export interface CreateResponse {
|
|
93
|
+
addon: Addon;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export interface UpdateResponse {
|
|
97
|
+
addon: Addon;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export interface ListResponse {
|
|
101
|
+
list: { addon: Addon }[];
|
|
102
|
+
next_offset?: string;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export interface RetrieveResponse {
|
|
106
|
+
addon: Addon;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export interface DeleteResponse {
|
|
110
|
+
addon: Addon;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export interface CopyResponse {
|
|
114
|
+
addon: Addon;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export interface UnarchiveResponse {
|
|
118
|
+
addon: Addon;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export interface Tier {
|
|
122
|
+
starting_unit: number;
|
|
123
|
+
ending_unit?: number;
|
|
124
|
+
price: number;
|
|
125
|
+
starting_unit_in_decimal?: string;
|
|
126
|
+
ending_unit_in_decimal?: string;
|
|
127
|
+
price_in_decimal?: string;
|
|
128
|
+
pricing_type?: 'per_unit' | 'flat_fee' | 'package';
|
|
129
|
+
package_size?: number;
|
|
130
|
+
}
|
|
131
|
+
export interface TaxProvidersField {
|
|
132
|
+
provider_name: string;
|
|
133
|
+
field_id: string;
|
|
134
|
+
field_value: string;
|
|
135
|
+
}
|
|
136
|
+
// REQUEST PARAMS
|
|
137
|
+
//---------------
|
|
138
|
+
|
|
139
|
+
export interface CreateInputParam {
|
|
140
|
+
id: string;
|
|
141
|
+
name: string;
|
|
142
|
+
invoice_name?: string;
|
|
143
|
+
description?: string;
|
|
144
|
+
charge_type: 'recurring' | 'non_recurring';
|
|
145
|
+
price?: number;
|
|
146
|
+
currency_code?: string;
|
|
147
|
+
period?: number;
|
|
148
|
+
period_unit?: 'day' | 'week' | 'month' | 'year' | 'not_applicable';
|
|
149
|
+
pricing_model?: PricingModelEnum /**
|
|
150
|
+
* @deprecated Please refer API docs to use other attributes
|
|
151
|
+
*/;
|
|
152
|
+
|
|
153
|
+
type?: 'on_off' | 'quantity' | 'tiered' | 'volume' | 'stairstep';
|
|
154
|
+
unit?: string;
|
|
155
|
+
enabled_in_portal?: boolean;
|
|
156
|
+
taxable?: boolean;
|
|
157
|
+
tax_profile_id?: string;
|
|
158
|
+
avalara_sale_type?: AvalaraSaleTypeEnum;
|
|
159
|
+
avalara_transaction_type?: number;
|
|
160
|
+
avalara_service_type?: number;
|
|
161
|
+
tax_code?: string;
|
|
162
|
+
hsn_code?: string;
|
|
163
|
+
taxjar_product_code?: string;
|
|
164
|
+
invoice_notes?: string;
|
|
165
|
+
meta_data?: any;
|
|
166
|
+
sku?: string;
|
|
167
|
+
accounting_code?: string;
|
|
168
|
+
accounting_category1?: string;
|
|
169
|
+
accounting_category2?: string;
|
|
170
|
+
accounting_category3?: string;
|
|
171
|
+
accounting_category4?: string;
|
|
172
|
+
is_shippable?: boolean;
|
|
173
|
+
shipping_frequency_period?: number;
|
|
174
|
+
shipping_frequency_period_unit?: 'year' | 'month' | 'week' | 'day';
|
|
175
|
+
included_in_mrr?: boolean;
|
|
176
|
+
show_description_in_invoices?: boolean;
|
|
177
|
+
show_description_in_quotes?: boolean;
|
|
178
|
+
price_in_decimal?: string;
|
|
179
|
+
proration_type?: 'site_default' | 'partial_term' | 'full_term';
|
|
180
|
+
status?: 'active' | 'archived';
|
|
181
|
+
tiers?: TiersCreateInputParam[];
|
|
182
|
+
tax_providers_fields?: TaxProvidersFieldsCreateInputParam[];
|
|
183
|
+
[key: `cf_${string}`]: unknown;
|
|
184
|
+
}
|
|
185
|
+
export interface UpdateInputParam {
|
|
186
|
+
name?: string;
|
|
187
|
+
invoice_name?: string;
|
|
188
|
+
description?: string;
|
|
189
|
+
charge_type?: 'recurring' | 'non_recurring';
|
|
190
|
+
price?: number;
|
|
191
|
+
currency_code?: string;
|
|
192
|
+
period?: number;
|
|
193
|
+
period_unit?: 'day' | 'week' | 'month' | 'year' | 'not_applicable';
|
|
194
|
+
pricing_model?: PricingModelEnum /**
|
|
195
|
+
* @deprecated Please refer API docs to use other attributes
|
|
196
|
+
*/;
|
|
197
|
+
|
|
198
|
+
type?: 'on_off' | 'quantity' | 'tiered' | 'volume' | 'stairstep';
|
|
199
|
+
unit?: string;
|
|
200
|
+
enabled_in_portal?: boolean;
|
|
201
|
+
taxable?: boolean;
|
|
202
|
+
tax_profile_id?: string;
|
|
203
|
+
avalara_sale_type?: AvalaraSaleTypeEnum;
|
|
204
|
+
avalara_transaction_type?: number;
|
|
205
|
+
avalara_service_type?: number;
|
|
206
|
+
tax_code?: string;
|
|
207
|
+
hsn_code?: string;
|
|
208
|
+
taxjar_product_code?: string;
|
|
209
|
+
invoice_notes?: string;
|
|
210
|
+
meta_data?: any;
|
|
211
|
+
sku?: string;
|
|
212
|
+
accounting_code?: string;
|
|
213
|
+
accounting_category1?: string;
|
|
214
|
+
accounting_category2?: string;
|
|
215
|
+
accounting_category3?: string;
|
|
216
|
+
accounting_category4?: string;
|
|
217
|
+
is_shippable?: boolean;
|
|
218
|
+
shipping_frequency_period?: number;
|
|
219
|
+
shipping_frequency_period_unit?: 'year' | 'month' | 'week' | 'day';
|
|
220
|
+
included_in_mrr?: boolean;
|
|
221
|
+
show_description_in_invoices?: boolean;
|
|
222
|
+
show_description_in_quotes?: boolean;
|
|
223
|
+
price_in_decimal?: string;
|
|
224
|
+
proration_type?: 'site_default' | 'partial_term' | 'full_term';
|
|
225
|
+
tiers?: TiersUpdateInputParam[];
|
|
226
|
+
tax_providers_fields?: TaxProvidersFieldsUpdateInputParam[];
|
|
227
|
+
[key: `cf_${string}`]: unknown;
|
|
228
|
+
}
|
|
229
|
+
export interface ListInputParam {
|
|
230
|
+
limit?: number;
|
|
231
|
+
offset?: string;
|
|
232
|
+
id?: filter.String;
|
|
233
|
+
name?: filter.String;
|
|
234
|
+
pricing_model?: filter.Enum /**
|
|
235
|
+
* @deprecated Please refer API docs to use other attributes
|
|
236
|
+
*/;
|
|
237
|
+
|
|
238
|
+
type?: filter.Enum;
|
|
239
|
+
charge_type?: filter.Enum;
|
|
240
|
+
price?: filter.Number;
|
|
241
|
+
period?: filter.Number;
|
|
242
|
+
period_unit?: filter.Enum;
|
|
243
|
+
status?: filter.Enum;
|
|
244
|
+
updated_at?: filter.Timestamp;
|
|
245
|
+
currency_code?: filter.String;
|
|
246
|
+
channel?: filter.Enum;
|
|
247
|
+
include_deleted?: boolean;
|
|
248
|
+
[key: `cf_${string}`]: unknown;
|
|
249
|
+
}
|
|
250
|
+
export interface CopyInputParam {
|
|
251
|
+
from_site: string;
|
|
252
|
+
id_at_from_site: string;
|
|
253
|
+
id?: string;
|
|
254
|
+
for_site_merging?: boolean;
|
|
255
|
+
}
|
|
256
|
+
export interface TiersCreateInputParam {
|
|
257
|
+
starting_unit?: number;
|
|
258
|
+
ending_unit?: number;
|
|
259
|
+
price?: number;
|
|
260
|
+
starting_unit_in_decimal?: string;
|
|
261
|
+
ending_unit_in_decimal?: string;
|
|
262
|
+
price_in_decimal?: string;
|
|
263
|
+
}
|
|
264
|
+
export interface TaxProvidersFieldsCreateInputParam {
|
|
265
|
+
provider_name: string;
|
|
266
|
+
field_id: string;
|
|
267
|
+
field_value: string;
|
|
268
|
+
}
|
|
269
|
+
export interface TiersUpdateInputParam {
|
|
270
|
+
starting_unit?: number;
|
|
271
|
+
ending_unit?: number;
|
|
272
|
+
price?: number;
|
|
273
|
+
starting_unit_in_decimal?: string;
|
|
274
|
+
ending_unit_in_decimal?: string;
|
|
275
|
+
price_in_decimal?: string;
|
|
276
|
+
}
|
|
277
|
+
export interface TaxProvidersFieldsUpdateInputParam {
|
|
278
|
+
provider_name: string;
|
|
279
|
+
field_id: string;
|
|
280
|
+
field_value: string;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
}
|