chargebee 3.5.0 → 3.6.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 (34) hide show
  1. package/CHANGELOG.md +139 -0
  2. package/README.md +6 -3
  3. package/cjs/environment.js +1 -1
  4. package/cjs/resources/api_endpoints.js +13 -1
  5. package/esm/environment.js +1 -1
  6. package/esm/resources/api_endpoints.js +13 -1
  7. package/package.json +1 -1
  8. package/types/core.d.ts +15 -4
  9. package/types/index.d.ts +6 -0
  10. package/types/resources/Addon.d.ts +283 -0
  11. package/types/resources/Comment.d.ts +2 -0
  12. package/types/resources/CreditNote.d.ts +26 -1
  13. package/types/resources/CreditNoteEstimate.d.ts +4 -1
  14. package/types/resources/DifferentialPrice.d.ts +6 -0
  15. package/types/resources/Estimate.d.ts +19 -0
  16. package/types/resources/HostedPage.d.ts +6 -0
  17. package/types/resources/Invoice.d.ts +32 -1
  18. package/types/resources/InvoiceEstimate.d.ts +26 -1
  19. package/types/resources/Item.d.ts +2 -0
  20. package/types/resources/ItemPrice.d.ts +6 -0
  21. package/types/resources/OmnichannelSubscription.d.ts +5 -5
  22. package/types/resources/OmnichannelSubscriptionItem.d.ts +38 -2
  23. package/types/resources/OmnichannelSubscriptionItemScheduledChange.d.ts +27 -0
  24. package/types/resources/OmnichannelTransaction.d.ts +4 -4
  25. package/types/resources/PaymentSource.d.ts +1 -0
  26. package/types/resources/Plan.d.ts +401 -0
  27. package/types/resources/Quote.d.ts +22 -1
  28. package/types/resources/QuoteLineGroup.d.ts +2 -1
  29. package/types/resources/QuotedCharge.d.ts +2 -0
  30. package/types/resources/QuotedSubscription.d.ts +2 -0
  31. package/types/resources/Ramp.d.ts +6 -0
  32. package/types/resources/RecordedPurchase.d.ts +7 -1
  33. package/types/resources/Subscription.d.ts +8 -0
  34. package/types/resources/UnbilledCharge.d.ts +4 -0
package/CHANGELOG.md CHANGED
@@ -1,3 +1,142 @@
1
+ ### v3.6.0 (2025-04-23)
2
+ * * *
3
+
4
+ ### New Resources:
5
+ * OmnichannelSubscriptionItemScheduledChange has been added.
6
+
7
+ ### New Attributes:
8
+ * pricing_type has been added to DifferentialPrice#Tier.
9
+ * package_size has been added to DifferentialPrice#Tier.
10
+ * pricing_type has been added to ItemPrice#Tier.
11
+ * package_size has been added to ItemPrice#Tier.
12
+ * pricing_type has been added to Addon#Tier.
13
+ * package_size has been added to Addon#Tier.
14
+ * pricing_type has been added to Plan#Tier.
15
+ * package_size has been added to Plan#Tier.
16
+ * pricing_type has been added to CreditNote#LineItemTier.
17
+ * package_size has been added to CreditNote#LineItemTier.
18
+ * pricing_type has been added to CreditNoteEstimate#LineItemTier.
19
+ * package_size has been added to CreditNoteEstimate#LineItemTier.
20
+ * pricing_type has been added to DifferentialPrice#Tier.
21
+ * package_size has been added to DifferentialPrice#Tier.
22
+ * pricing_type has been added to Invoice#LineItemTier.
23
+ * package_size has been added to Invoice#LineItemTier.
24
+ * pricing_type has been added to InvoiceEstimate#LineItemTier.
25
+ * package_size has been added to InvoiceEstimate#LineItemTier.
26
+ * pricing_type has been added to Quote#LineItemTier.
27
+ * package_size has been added to Quote#LineItemTier.
28
+ * pricing_type has been added to QuotedCharge#LineItemTier.
29
+ * package_size has been added to QuotedCharge#LineItemTier.
30
+ * pricing_type has been added to QuotedSubscription#LineItemTier.
31
+ * package_size has been added to QuotedSubscription#LineItemTier.
32
+ * pricing_type has been added to Ramp#ItemTier.
33
+ * package_size has been added to Ramp#ItemTier.
34
+ * pricing_type has been added to Subscription#ItemTier.
35
+ * package_size has been added to Subscription#ItemTier.
36
+ * pricing_type has been added to UnbilledCharges#Tier.
37
+ * package_size has been added to UnbilledCharges#Tier.
38
+ * metered has been added to CreditNote#LineItem.
39
+ * metered has been added to CreditNoteEstimate#LineItem.
40
+ * metered has been added to Invoice#LineItem.
41
+ * metered has been added to Quote#LineItem.
42
+ * metered has been added to QuoteLineGroup#LineItem.
43
+ * usage_percentage has been changed to percentage in CreditNote#LineItem.
44
+ * usage_percentage has been changed to percentage in CreditNoteEstimate#LineItem.
45
+ * usage_percentage has been changed to percentage in Invoice#LineItem.
46
+ * usage_percentage has been changed to percentage in Quote#LineItem.
47
+ * usage_percentage has been changed to percentage in QuoteLineGroup#LineItem.
48
+ * line_item_addresses has been added to CreditNote.
49
+ * line_item_addresses has been added to Invoices.
50
+ * line_item_addresses has been added to InvoiceEstimate.
51
+ * has_scheduled_changes has been added on OmnichannelSubscriptionItem.
52
+ * item_parent_id_at_source has been added to OmnichannelSubscriptionItem.
53
+ * auto_renew_status has been added to OmnichannelSubscriptionItem.
54
+ * upcoming_renewal has been added to OmnichannelSubscriptionItem.
55
+ * is_percentage_pricing has been added to Item.
56
+
57
+ ### New Action:
58
+ * listOmniSubItemScheduleChanges has been added to OmnichannelSubscriptionItem.
59
+
60
+ ### Optional Attribute:
61
+ * price_currency has been made optional from requried in OmnichannelTransaction.
62
+ * price_units has been made optional from requried in OmnichannelTransaction.
63
+ * price_nanos has been made optional from requried in OmnichannelTransaction.
64
+ * transacted_at has been made optional from requried in OmnichannelTransaction.
65
+
66
+ ### New Input Params:
67
+ * item_tiers[pricing_type] has been added to DifferentialPrice#CreateInputParam.
68
+ * item_tiers[package_size] has been added to DifferentialPrice#CreateInputParam.
69
+ * item_tiers[pricing_type] has been added to ItemPrice#CreateInputParam.
70
+ * item_tiers[package_size] has been added to ItemPrice#CreateInputParam.
71
+ * tiers[pricing_type] has been added to DifferentialPrice#CreateInputParam.
72
+ * tiers[package_size] has been added to DifferentialPrice#CreateInputParam.
73
+ * item_tiers[pricing_type] has been added to Estimate#CreateSubItemEstimateRequestInputParam.
74
+ * item_tiers[package_size] has been added to Estimate#CreateSubItemEstimateRequestInputParam.
75
+ * item_tiers[pricing_type] has been added to Estimate#CreateSubItemForCustomerRequestInputParam.
76
+ * item_tiers[package_size] has been added to Estimate#CreateSubItemForCustomerRequestInputParam.
77
+ * item_tiers[pricing_type] has been added to Estimate#UpdateSubscriptionForItemsRequestInputParam.
78
+ * item_tiers[package_size] has been added to Estimate#UpdateSubscriptionForItemsRequestInputParam.
79
+ * item_tiers[pricing_type] has been added to Estimate#CreateInvoiceForItemsRequestInputParam.
80
+ * item_tiers[package_size] has been added to Estimate#CreateInvoiceForItemsRequestInputParam.
81
+ * item_tiers[pricing_type] has been added to Estimate#CheckoutNewForItemsRequestInputParam.
82
+ * item_tiers[package_size] has been added to Estimate#CheckoutNewForItemsRequestInputParam.
83
+ * item_tiers[pricing_type] has been added to Estimate#CheckoutOneTimeForItemsRequestInputParam.
84
+ * item_tiers[package_size] has been added to Estimate#CheckoutOneTimeForItemsRequestInputParam.
85
+ * item_tiers[pricing_type] has been added to Estimate#CheckoutExistingForItemsRequestInputParam.
86
+ * item_tiers[package_size] has been added to Estimate#CheckoutExistingForItemsRequestInputParam.
87
+ * item_tiers[pricing_type] has been added to Invoice#CreateForChargeItemsAndChargesRequestInputParam.
88
+ * item_tiers[package_size] has been added to Invoice#CreateForChargeItemsAndChargesRequestInputParam.
89
+ * item_tiers[pricing_type] has been added to Invoice#CreateForChargeItemRequestInputParam.
90
+ * item_tiers[package_size] has been added to Invoice#CreateForChargeItemRequestInputParam.
91
+ * item_tiers[pricing_type] has been added to Invoice#AddChargeItemRequestInputParam.
92
+ * item_tiers[package_size] has been added to Invoice#AddChargeItemRequestInputParam.
93
+ * item_tiers[pricing_type] has been added to Quote#CreateSubItemsForCustomerQuoteRequestInputParam.
94
+ * item_tiers[package_size] has been added to Quote#CreateSubItemsForCustomerQuoteRequestInputParam.
95
+ * item_tiers[pricing_type] has been added to Quote#EditCreateSubCustomerQuoteForItemsRequestInputParam.
96
+ * item_tiers[package_size] has been added to Quote#EditCreateSubCustomerQuoteForItemsRequestInputParam.
97
+ * item_tiers[pricing_type] has been added to Quote#UpdateSubscriptionQuoteForItemsRequestInputParam.
98
+ * item_tiers[package_size] has been added to Quote#UpdateSubscriptionQuoteForItemsRequestInputParam.
99
+ * item_tiers[pricing_type] has been added to Quote#EditUpdateSubscriptionQuoteForItemsRequestInputParam.
100
+ * item_tiers[package_size] has been added to Quote#EditUpdateSubscriptionQuoteForItemsRequestInputParam.
101
+ * item_tiers[pricing_type] has been added to Quote#CreateForChargeItemsAndChargesRequestInputParam.
102
+ * item_tiers[package_size] has been added to Quote#CreateForChargeItemsAndChargesRequestInputParam.
103
+ * item_tiers[pricing_type] has been added to Quote#EditForChargeItemsAndChargesRequestInputParam.
104
+ * item_tiers[package_size] has been added to Quote#EditForChargeItemsAndChargesRequestInputParam.
105
+ * item_tiers[pricing_type] has been added to Ramp#CreateForSubscriptionRequestInputParam.
106
+ * item_tiers[package_size] has been added to Ramp#CreateForSubscriptionRequestInputParam.
107
+ * item_tiers[pricing_type] has been added to Ramp#UpdateRequestInputParam.
108
+ * item_tiers[package_size] has been added to Ramp#UpdateRequestInputParam.
109
+ * item_tiers[pricing_type] has been added to Subscription#CreateWithItemsRequestInputParam.
110
+ * item_tiers[package_size] has been added to Subscription#CreateWithItemsRequestInputParam.
111
+ * item_tiers[pricing_type] has been added to Subscription#UpdateForItemsRequestInputParam.
112
+ * item_tiers[package_size] has been added to Subscription#UpdateForItemsRequestInputParam.
113
+ * item_tiers[pricing_type] has been added to Subscription#ImportForItemsRequestInputParam.
114
+ * item_tiers[package_size] has been added to Subscription#ImportForItemsRequestInputParam.
115
+ * item_tiers[pricing_type] has been added to UnbilledCharged#CreateRequestInputParam.
116
+ * item_tiers[package_size] has been added to UnbilledCharged#CreateRequestInputParam.
117
+ * billing_address has been added to Estimate#CreateInvoiceForItemsRequestInputParam.
118
+ * google_play_store[purchase_token] has been added to RecordedPurchase#CreateRequestInputParam.
119
+ * is_percentage_pricing has been added to Item#CreateRequest.
120
+ * include_deleted has been added to PaymentSource#ListRequest.
121
+
122
+ ### New Enums:
123
+ * OMNICHANNEL_SUBSCRIPTION_ITEM_SCHEDULED_CHANGE has been added to EntityType#Enum.
124
+ * OMNICHANNEL_SUBSCRIPTION_ITEM_CHANGE_SCHEDULED has been added to EventType#Enum.
125
+ * OMNICHANNEL_SUBSCRIPTION_ITEM_SCHEDULED_CHANGE_REMOVED has been added to EventType#Enum.
126
+ * OMNICHANNEL_SUBSCRIPTION_ITEM_REACTIVATED has been added to EventType#Enum.
127
+ * GOOGLE_PLAY_STORE has been added to OminchannelSubscription#SourceEnum.
128
+ * SPECIFIC_DATE has been added to ContractTermCancelOption.
129
+ * END_OF_SUBSCRIPTION_BILLING_TERM has been added to ContractTermCancelOption.
130
+ * PAYSTACK has been added to GatewayEnum.
131
+ * PricingType Enum has been added.
132
+ * JP_MORGAN has been added to GatewayEnum.
133
+
134
+ ### Deprecated Enums:
135
+ * OMNICHANNEL_SUBSCRIPTION_ITEM_DOWNGRADE_SCHEDULED has been deprecated from EntityType#Enum.
136
+ * OMNICHANNEL_SUBSCRIPTION_ITEM_SCHEDULED_DOWNGRADE_REMOVED has been deprecated from EntityType#Enum.
137
+ * REFUNDED_DUE_TO_APP_ISSUE has been added to OmnichannelSubscriptionItem#CancellationReasonEnum.
138
+ * REFUNDED_FOR_OTHER_REASON has been added to OmnichannelSubscriptionItem#CancellationReasonEnum.
139
+
1
140
  ### v3.5.0 (2025-03-06)
2
141
  * * *
3
142
 
package/README.md CHANGED
@@ -1,8 +1,11 @@
1
- # Chargebee Node.js / TypeScript client library
1
+ # Chargebee Node.js / TypeScript Client Library
2
2
 
3
- This is the [Node.js](http://nodejs.org/) library for integrating with Chargebee. Sign up for a Chargebee account [here](https://www.chargebee.com).
3
+ This is the official [Node.js](http://nodejs.org/) library for integrating with Chargebee.
4
4
 
5
- Please refer to the [migration guide](https://github.com/chargebee/chargebee-node/wiki/Migration-guide-for-v3) if you are migrating from the older versions of [chargebee-typescript](https://www.npmjs.com/package/chargebee-typescript) or [chargebee](https://www.npmjs.com/package/chargebee/v/2.40.0).
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
 
@@ -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.5.0',
14
+ clientVersion: 'v3.6.0',
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
  };
@@ -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.5.0',
11
+ clientVersion: 'v3.6.0',
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chargebee",
3
- "version": "3.5.0",
3
+ "version": "3.6.0",
4
4
  "description": "A library for integrating with Chargebee.",
5
5
  "scripts": {
6
6
  "prepack": "npm install && npm run build",
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
+ }
@@ -80,6 +80,8 @@ declare module 'chargebee' {
80
80
  | 'omnichannel_subscription_item'
81
81
  | 'omnichannel_transaction'
82
82
  | 'recorded_purchase'
83
+ | 'omnichannel_subscription_item_scheduled_change'
84
+ | 'sales_order'
83
85
  | 'item_family'
84
86
  | 'item'
85
87
  | 'item_price'