chargebee 3.13.0 → 3.14.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 (40) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/cjs/coreCommon.js +1 -1
  3. package/cjs/environment.js +1 -1
  4. package/cjs/resources/api_endpoints.js +66 -0
  5. package/esm/coreCommon.js +1 -1
  6. package/esm/environment.js +1 -1
  7. package/esm/resources/api_endpoints.js +66 -0
  8. package/package.json +1 -1
  9. package/types/core.d.ts +8 -1
  10. package/types/index.d.ts +7 -0
  11. package/types/resources/Comment.d.ts +0 -9
  12. package/types/resources/Content.d.ts +4 -0
  13. package/types/resources/CreditNote.d.ts +3 -1
  14. package/types/resources/CreditNoteEstimate.d.ts +31 -31
  15. package/types/resources/Currency.d.ts +11 -5
  16. package/types/resources/Customer.d.ts +1 -0
  17. package/types/resources/Estimate.d.ts +2 -0
  18. package/types/resources/Event.d.ts +2 -0
  19. package/types/resources/GatewayErrorDetail.d.ts +1 -0
  20. package/types/resources/HostedPage.d.ts +2 -0
  21. package/types/resources/Invoice.d.ts +5 -1
  22. package/types/resources/InvoiceEstimate.d.ts +42 -42
  23. package/types/resources/OfferEvent.d.ts +25 -0
  24. package/types/resources/OfferFulfillment.d.ts +77 -0
  25. package/types/resources/OmnichannelOneTimeOrder.d.ts +1 -13
  26. package/types/resources/OmnichannelSubscription.d.ts +13 -12
  27. package/types/resources/OmnichannelSubscriptionItem.d.ts +1 -0
  28. package/types/resources/OmnichannelSubscriptionItemOffer.d.ts +22 -0
  29. package/types/resources/OmnichannelTransaction.d.ts +13 -0
  30. package/types/resources/Order.d.ts +0 -1
  31. package/types/resources/PersonalizedOffer.d.ts +64 -0
  32. package/types/resources/Quote.d.ts +35 -34
  33. package/types/resources/QuoteLineGroup.d.ts +21 -21
  34. package/types/resources/Ramp.d.ts +46 -0
  35. package/types/resources/SalesOrder.d.ts +1 -1
  36. package/types/resources/Subscription.d.ts +1 -1
  37. package/types/resources/SubscriptionEstimate.d.ts +0 -1
  38. package/types/resources/Transaction.d.ts +1 -0
  39. package/types/resources/UsageFile.d.ts +2 -0
  40. package/types/resources/WebhookEvent.d.ts +12 -0
package/CHANGELOG.md CHANGED
@@ -1,3 +1,59 @@
1
+ ### v3.14.0 (2025-09-23)
2
+ * * *
3
+
4
+ ### New Resources:
5
+ * PersonalizedOffer has been added.
6
+ * OfferFulfillment has been added.
7
+ * OfferEvent has been added.
8
+ * OmnichannelSubscriptionItemOffer has been added.
9
+
10
+ ### New Attributes:
11
+ * business_entity_id has been added to Customer#Balance.
12
+ * processor_advice_code has been added to GatewayErrorDetail.
13
+ * processor_advice_code has been added to Transaction#GatewayErrorDetail.
14
+ * omnichannel_subscription_item_offers has been added to OmnichannelSubscriptionItem.
15
+ * linked_omnichannel_subscriptions has been added to OmnichannelTransaction.
16
+ * linked_omnichannel_one_time_orders has been added to OmnichannelTransaction.
17
+ * contract_term has been added to Ramp.
18
+ * charge_once has been added to Ramp#ItemsToAdd.
19
+ * charge_on_option has been added to Ramp#ItemsToAdd.
20
+ * charge_on_event has been added to Ramp#ItemsToAdd.
21
+ * charge_once has been added to Ramp#ItemsToUpdate.
22
+ * charge_on_option has been added to Ramp#ItemsToUpdate.
23
+ * charge_on_event has been added to Ramp#ItemsToUpdate.
24
+ * error_file_path has been added to UsageFile.
25
+ * error_file_url has been added to UsageFile.
26
+
27
+ ### New Endpoint:
28
+ * move has been added to OmnichannelSubscription.
29
+
30
+ ### New Parameters:
31
+ * offline_payment_method has been added to Estimate#CreateSubItemEstimateRequest.
32
+ * offline_payment_method has been added to Estimate#CreateSubItemForCustomerEstimateRequest.
33
+ * offline_payment_method has been added to HostedPage#CheckoutNewForItemsRequest.
34
+ * offline_payment_method has been added to Quote#SubscriptionCreateSubItemsForCustomerQuoteRequest.
35
+ * offline_payment_method has been added to Quote#SubscriptionEditCreateSubCustomerQuoteForItemsRequest.
36
+ * contract_term has been added to Ramp#CreateForSubscriptionRequest.
37
+ * items_to_add has been added to Ramp#CreateForSubscriptionRequest.
38
+ * items_to_update has been added to Ramp#CreateForSubscriptionRequest.
39
+ * contract_term has been added to Ramp#UpdateRequest.
40
+ * items_to_add has been added to Ramp#UpdateRequest.
41
+ * items_to_update has been added to Ramp#UpdateRequest.
42
+
43
+ ### New Enums:
44
+ * DUNNING_UPDATED has been added EventType.
45
+ * OMNICHANNEL_SUBSCRIPTION_MOVED_IN has been added to EventType.
46
+
47
+
48
+ ### Bug Fixes:
49
+ * currency list action has been marked as ListRequest.
50
+ * index has been removed from CreditNote#ShippingAddress.
51
+ * index has been removed from Invoice#ShippingAddress
52
+ * index has been removed from Order#ShippingAddress.
53
+ * index has been removed from Quote#ShippingAddress.
54
+ * index has been removed from SubscriptionEstimate#ShippingAddress.
55
+ * index has been removed from Subscription#ShippingAddress.
56
+
1
57
  ### v3.13.0 (2025-09-15)
2
58
  * * *
3
59
 
package/cjs/coreCommon.js CHANGED
@@ -21,7 +21,7 @@ function throwError(callBack, rawError, headers) {
21
21
  }
22
22
  const handleResponse = async (callback, response) => {
23
23
  try {
24
- const res = await response.toJson();
24
+ const res = response.getStatusCode() === 204 ? response : await response.toJson();
25
25
  const status = response.getStatusCode();
26
26
  const headers = response.getHeaders();
27
27
  if (status && (status < 200 || status > 299)) {
@@ -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.13.0',
14
+ clientVersion: 'v3.14.0',
15
15
  port: DEFAULT_PORT,
16
16
  timemachineWaitInMillis: DEFAULT_TIME_MACHINE_WAIT,
17
17
  exportWaitInMillis: DEFAULT_EXPORT_WAIT,
@@ -4645,6 +4645,19 @@ exports.Endpoints = {
4645
4645
  {},
4646
4646
  {},
4647
4647
  ],
4648
+ [
4649
+ 'move',
4650
+ 'POST',
4651
+ '/omnichannel_subscriptions',
4652
+ '/move',
4653
+ true,
4654
+ null,
4655
+ false,
4656
+ {},
4657
+ {
4658
+ isIdempotent: true,
4659
+ },
4660
+ ],
4648
4661
  ],
4649
4662
  omnichannelTransaction: [],
4650
4663
  omnichannelSubscriptionItem: [
@@ -4755,7 +4768,60 @@ exports.Endpoints = {
4755
4768
  {},
4756
4769
  ],
4757
4770
  ],
4771
+ personalizedOffer: [
4772
+ [
4773
+ 'personalizedOffers',
4774
+ 'POST',
4775
+ '/personalized_offers',
4776
+ null,
4777
+ false,
4778
+ 'grow',
4779
+ true,
4780
+ {
4781
+ custom: 0,
4782
+ },
4783
+ {},
4784
+ ],
4785
+ ],
4758
4786
  brand: [],
4787
+ offerFulfillment: [
4788
+ [
4789
+ 'offerFulfillments',
4790
+ 'POST',
4791
+ '/offer_fulfillments',
4792
+ null,
4793
+ false,
4794
+ 'grow',
4795
+ true,
4796
+ {},
4797
+ {},
4798
+ ],
4799
+ [
4800
+ 'offerFulfillmentsGet',
4801
+ 'GET',
4802
+ '/offer_fulfillments',
4803
+ null,
4804
+ true,
4805
+ 'grow',
4806
+ true,
4807
+ {},
4808
+ {},
4809
+ ],
4810
+ [
4811
+ 'offerFulfillmentsUpdate',
4812
+ 'POST',
4813
+ '/offer_fulfillments',
4814
+ null,
4815
+ true,
4816
+ 'grow',
4817
+ true,
4818
+ {},
4819
+ {},
4820
+ ],
4821
+ ],
4822
+ offerEvent: [
4823
+ ['offerEvents', 'POST', '/offer_events', null, false, 'grow', true, {}, {}],
4824
+ ],
4759
4825
  webhookEndpoint: [
4760
4826
  [
4761
4827
  'create',
package/esm/coreCommon.js CHANGED
@@ -17,7 +17,7 @@ export function throwError(callBack, rawError, headers) {
17
17
  }
18
18
  export const handleResponse = async (callback, response) => {
19
19
  try {
20
- const res = await response.toJson();
20
+ const res = response.getStatusCode() === 204 ? response : await response.toJson();
21
21
  const status = response.getStatusCode();
22
22
  const headers = response.getHeaders();
23
23
  if (status && (status < 200 || status > 299)) {
@@ -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.13.0',
11
+ clientVersion: 'v3.14.0',
12
12
  port: DEFAULT_PORT,
13
13
  timemachineWaitInMillis: DEFAULT_TIME_MACHINE_WAIT,
14
14
  exportWaitInMillis: DEFAULT_EXPORT_WAIT,
@@ -4642,6 +4642,19 @@ export const Endpoints = {
4642
4642
  {},
4643
4643
  {},
4644
4644
  ],
4645
+ [
4646
+ 'move',
4647
+ 'POST',
4648
+ '/omnichannel_subscriptions',
4649
+ '/move',
4650
+ true,
4651
+ null,
4652
+ false,
4653
+ {},
4654
+ {
4655
+ isIdempotent: true,
4656
+ },
4657
+ ],
4645
4658
  ],
4646
4659
  omnichannelTransaction: [],
4647
4660
  omnichannelSubscriptionItem: [
@@ -4752,7 +4765,60 @@ export const Endpoints = {
4752
4765
  {},
4753
4766
  ],
4754
4767
  ],
4768
+ personalizedOffer: [
4769
+ [
4770
+ 'personalizedOffers',
4771
+ 'POST',
4772
+ '/personalized_offers',
4773
+ null,
4774
+ false,
4775
+ 'grow',
4776
+ true,
4777
+ {
4778
+ custom: 0,
4779
+ },
4780
+ {},
4781
+ ],
4782
+ ],
4755
4783
  brand: [],
4784
+ offerFulfillment: [
4785
+ [
4786
+ 'offerFulfillments',
4787
+ 'POST',
4788
+ '/offer_fulfillments',
4789
+ null,
4790
+ false,
4791
+ 'grow',
4792
+ true,
4793
+ {},
4794
+ {},
4795
+ ],
4796
+ [
4797
+ 'offerFulfillmentsGet',
4798
+ 'GET',
4799
+ '/offer_fulfillments',
4800
+ null,
4801
+ true,
4802
+ 'grow',
4803
+ true,
4804
+ {},
4805
+ {},
4806
+ ],
4807
+ [
4808
+ 'offerFulfillmentsUpdate',
4809
+ 'POST',
4810
+ '/offer_fulfillments',
4811
+ null,
4812
+ true,
4813
+ 'grow',
4814
+ true,
4815
+ {},
4816
+ {},
4817
+ ],
4818
+ ],
4819
+ offerEvent: [
4820
+ ['offerEvents', 'POST', '/offer_events', null, false, 'grow', true, {}, {}],
4821
+ ],
4756
4822
  webhookEndpoint: [
4757
4823
  [
4758
4824
  'create',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chargebee",
3
- "version": "3.13.0",
3
+ "version": "3.14.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
@@ -45,6 +45,7 @@ declare module 'chargebee' {
45
45
  | 'end_of_term'
46
46
  | 'specific_date'
47
47
  | 'end_of_billing_term';
48
+ type CategoryEnum = 'introductory' | 'promotional' | 'developer_determined';
48
49
  type ChangeOptionEnum = 'immediately' | 'end_of_term' | 'specific_date';
49
50
  type ChannelEnum = 'web' | 'app_store' | 'play_store';
50
51
  type ChargeModelEnum = 'full_charge' | 'prorate';
@@ -80,6 +81,7 @@ declare module 'chargebee' {
80
81
  | 'becs_nz'
81
82
  | 'pad'
82
83
  | 'not_applicable';
84
+ type DiscountTypeEnum = 'fixed_amount' | 'percentage' | 'price';
83
85
  type DispositionTypeEnum = 'attachment' | 'inline';
84
86
  type DunningTypeEnum = 'auto_collect' | 'offline' | 'direct_debit';
85
87
  type DurationTypeEnum = 'one_time' | 'forever' | 'limited_period';
@@ -219,6 +221,7 @@ declare module 'chargebee' {
219
221
  | 'transaction_deleted'
220
222
  | 'payment_succeeded'
221
223
  | 'payment_failed'
224
+ | 'dunning_updated'
222
225
  | 'payment_refunded'
223
226
  | 'payment_initiated'
224
227
  | 'refund_initiated'
@@ -356,6 +359,7 @@ declare module 'chargebee' {
356
359
  | 'omnichannel_one_time_order_item_cancelled'
357
360
  | 'usage_file_ingested'
358
361
  | 'omnichannel_subscription_item_pause_scheduled'
362
+ | 'omnichannel_subscription_moved_in'
359
363
  | 'plan_created'
360
364
  | 'plan_updated'
361
365
  | 'plan_deleted'
@@ -611,7 +615,10 @@ declare module 'chargebee' {
611
615
  | 'automated_bank_transfer'
612
616
  | 'klarna_pay_now'
613
617
  | 'online_banking_poland'
614
- | 'payconiq_by_bancontact';
618
+ | 'payconiq_by_bancontact'
619
+ | 'free_trial'
620
+ | 'pay_up_front'
621
+ | 'pay_as_you_go';
615
622
  type UnbilledChargesHandlingEnum = 'no_action' | 'invoice';
616
623
  type UnbilledChargesOptionEnum = 'invoice' | 'delete';
617
624
  type UnpaidInvoicesHandlingEnum = 'no_action' | 'schedule_payment_collection';
package/types/index.d.ts CHANGED
@@ -47,10 +47,13 @@
47
47
  ///<reference path='./resources/ItemPrice.d.ts' />
48
48
  ///<reference path='./resources/Metadata.d.ts' />
49
49
  ///<reference path='./resources/NonSubscription.d.ts' />
50
+ ///<reference path='./resources/OfferEvent.d.ts' />
51
+ ///<reference path='./resources/OfferFulfillment.d.ts' />
50
52
  ///<reference path='./resources/OmnichannelOneTimeOrder.d.ts' />
51
53
  ///<reference path='./resources/OmnichannelOneTimeOrderItem.d.ts' />
52
54
  ///<reference path='./resources/OmnichannelSubscription.d.ts' />
53
55
  ///<reference path='./resources/OmnichannelSubscriptionItem.d.ts' />
56
+ ///<reference path='./resources/OmnichannelSubscriptionItemOffer.d.ts' />
54
57
  ///<reference path='./resources/OmnichannelSubscriptionItemScheduledChange.d.ts' />
55
58
  ///<reference path='./resources/OmnichannelTransaction.d.ts' />
56
59
  ///<reference path='./resources/Order.d.ts' />
@@ -61,6 +64,7 @@
61
64
  ///<reference path='./resources/PaymentScheduleScheme.d.ts' />
62
65
  ///<reference path='./resources/PaymentSource.d.ts' />
63
66
  ///<reference path='./resources/PaymentVoucher.d.ts' />
67
+ ///<reference path='./resources/PersonalizedOffer.d.ts' />
64
68
  ///<reference path='./resources/Plan.d.ts' />
65
69
  ///<reference path='./resources/PortalSession.d.ts' />
66
70
  ///<reference path='./resources/PriceVariant.d.ts' />
@@ -199,6 +203,8 @@ declare module 'chargebee' {
199
203
  itemFamily: ItemFamily.ItemFamilyResource;
200
204
  itemPrice: ItemPrice.ItemPriceResource;
201
205
  nonSubscription: NonSubscription.NonSubscriptionResource;
206
+ offerEvent: OfferEvent.OfferEventResource;
207
+ offerFulfillment: OfferFulfillment.OfferFulfillmentResource;
202
208
  omnichannelOneTimeOrder: OmnichannelOneTimeOrder.OmnichannelOneTimeOrderResource;
203
209
  omnichannelSubscription: OmnichannelSubscription.OmnichannelSubscriptionResource;
204
210
  omnichannelSubscriptionItem: OmnichannelSubscriptionItem.OmnichannelSubscriptionItemResource;
@@ -207,6 +213,7 @@ declare module 'chargebee' {
207
213
  paymentScheduleScheme: PaymentScheduleScheme.PaymentScheduleSchemeResource;
208
214
  paymentSource: PaymentSource.PaymentSourceResource;
209
215
  paymentVoucher: PaymentVoucher.PaymentVoucherResource;
216
+ personalizedOffer: PersonalizedOffer.PersonalizedOfferResource;
210
217
  plan: Plan.PlanResource;
211
218
  portalSession: PortalSession.PortalSessionResource;
212
219
  priceVariant: PriceVariant.PriceVariantResource;
@@ -77,15 +77,6 @@ declare module 'chargebee' {
77
77
  | 'coupon'
78
78
  | 'order'
79
79
  | 'business_entity'
80
- | 'omnichannel_subscription'
81
- | 'omnichannel_subscription_item'
82
- | 'omnichannel_transaction'
83
- | 'recorded_purchase'
84
- | 'omnichannel_subscription_item_scheduled_change'
85
- | 'sales_order'
86
- | 'omnichannel_one_time_order'
87
- | 'omnichannel_one_time_order_item'
88
- | 'usage_file'
89
80
  | 'item_family'
90
81
  | 'item'
91
82
  | 'item_price'
@@ -52,10 +52,13 @@ declare module 'chargebee' {
52
52
  item_price: ItemPrice;
53
53
  metadata: Metadata;
54
54
  non_subscription: NonSubscription;
55
+ offer_event: OfferEvent;
56
+ offer_fulfillment: OfferFulfillment;
55
57
  omnichannel_one_time_order: OmnichannelOneTimeOrder;
56
58
  omnichannel_one_time_order_item: OmnichannelOneTimeOrderItem;
57
59
  omnichannel_subscription: OmnichannelSubscription;
58
60
  omnichannel_subscription_item: OmnichannelSubscriptionItem;
61
+ omnichannel_subscription_item_offer: OmnichannelSubscriptionItemOffer;
59
62
  omnichannel_subscription_item_scheduled_change: OmnichannelSubscriptionItemScheduledChange;
60
63
  omnichannel_transaction: OmnichannelTransaction;
61
64
  order: Order;
@@ -66,6 +69,7 @@ declare module 'chargebee' {
66
69
  payment_schedule_scheme: PaymentScheduleScheme;
67
70
  payment_source: PaymentSource;
68
71
  payment_voucher: PaymentVoucher;
72
+ personalized_offer: PersonalizedOffer;
69
73
  plan: Plan;
70
74
  portal_session: PortalSession;
71
75
  price_variant: PriceVariant;
@@ -3,6 +3,7 @@
3
3
  ///<reference path='./filter.d.ts'/>
4
4
  declare module 'chargebee' {
5
5
  export interface CreditNote {
6
+ [key: string]: unknown;
6
7
  id: string;
7
8
  customer_id: string;
8
9
  subscription_id?: string;
@@ -395,7 +396,6 @@ declare module 'chargebee' {
395
396
  country?: string;
396
397
  zip?: string;
397
398
  validation_status?: ValidationStatusEnum;
398
- index: number;
399
399
  }
400
400
  export interface BillingAddress {
401
401
  first_name?: string;
@@ -450,6 +450,7 @@ declare module 'chargebee' {
450
450
  currency_code?: string;
451
451
  comment?: string;
452
452
  line_items?: LineItemsCreateInputParam[];
453
+ [key: `cf_${string}`]: unknown;
453
454
  }
454
455
  export interface RetrieveInputParam {
455
456
  line_item?: LineItemRetrieveInputParam;
@@ -528,6 +529,7 @@ declare module 'chargebee' {
528
529
  taxes?: TaxesImportCreditNoteInputParam[];
529
530
  allocations?: AllocationsImportCreditNoteInputParam[];
530
531
  linked_refunds?: LinkedRefundsImportCreditNoteInputParam[];
532
+ [key: `cf_${string}`]: unknown;
531
533
  }
532
534
  export interface LineItemsCreateInputParam {
533
535
  reference_line_item_id?: string;
@@ -12,11 +12,11 @@ declare module 'chargebee' {
12
12
  amount_allocated: number;
13
13
  amount_available: number;
14
14
  line_items?: CreditNoteEstimate.LineItem[];
15
+ line_item_tiers?: CreditNoteEstimate.LineItemTier[];
16
+ line_item_discounts?: CreditNoteEstimate.LineItemDiscount[];
17
+ line_item_taxes?: CreditNoteEstimate.LineItemTax[];
15
18
  discounts?: CreditNoteEstimate.Discount[];
16
19
  taxes?: CreditNoteEstimate.Tax[];
17
- line_item_taxes?: CreditNoteEstimate.LineItemTax[];
18
- line_item_discounts?: CreditNoteEstimate.LineItemDiscount[];
19
- line_item_tiers?: CreditNoteEstimate.LineItemTier[];
20
20
  round_off_amount?: number;
21
21
  customer_id?: string;
22
22
  }
@@ -71,24 +71,31 @@ declare module 'chargebee' {
71
71
  entity_id?: string;
72
72
  customer_id?: string;
73
73
  }
74
- export interface Discount {
75
- amount: number;
76
- description?: string;
77
- entity_type:
74
+ export interface LineItemTier {
75
+ line_item_id?: string;
76
+ starting_unit: number;
77
+ ending_unit?: number;
78
+ quantity_used: number;
79
+ unit_amount: number;
80
+ starting_unit_in_decimal?: string;
81
+ ending_unit_in_decimal?: string;
82
+ quantity_used_in_decimal?: string;
83
+ unit_amount_in_decimal?: string;
84
+ pricing_type?: 'per_unit' | 'flat_fee' | 'package';
85
+ package_size?: number;
86
+ }
87
+ export interface LineItemDiscount {
88
+ line_item_id: string;
89
+ discount_type:
78
90
  | 'item_level_coupon'
79
91
  | 'document_level_coupon'
80
92
  | 'promotional_credits'
81
93
  | 'prorated_credits'
82
94
  | 'item_level_discount'
83
95
  | 'document_level_discount';
84
- discount_type?: 'fixed_amount' | 'percentage';
96
+ coupon_id?: string;
85
97
  entity_id?: string;
86
- coupon_set_code?: string;
87
- }
88
- export interface Tax {
89
- name: string;
90
- amount: number;
91
- description?: string;
98
+ discount_amount: number;
92
99
  }
93
100
  export interface LineItemTax {
94
101
  line_item_id?: string;
@@ -115,31 +122,24 @@ declare module 'chargebee' {
115
122
  tax_amount_in_local_currency?: number;
116
123
  local_currency_code?: string;
117
124
  }
118
- export interface LineItemDiscount {
119
- line_item_id: string;
120
- discount_type:
125
+ export interface Discount {
126
+ amount: number;
127
+ description?: string;
128
+ entity_type:
121
129
  | 'item_level_coupon'
122
130
  | 'document_level_coupon'
123
131
  | 'promotional_credits'
124
132
  | 'prorated_credits'
125
133
  | 'item_level_discount'
126
134
  | 'document_level_discount';
127
- coupon_id?: string;
135
+ discount_type?: 'fixed_amount' | 'percentage';
128
136
  entity_id?: string;
129
- discount_amount: number;
137
+ coupon_set_code?: string;
130
138
  }
131
- export interface LineItemTier {
132
- line_item_id?: string;
133
- starting_unit: number;
134
- ending_unit?: number;
135
- quantity_used: number;
136
- unit_amount: number;
137
- starting_unit_in_decimal?: string;
138
- ending_unit_in_decimal?: string;
139
- quantity_used_in_decimal?: string;
140
- unit_amount_in_decimal?: string;
141
- pricing_type?: 'per_unit' | 'flat_fee' | 'package';
142
- package_size?: number;
139
+ export interface Tax {
140
+ name: string;
141
+ amount: number;
142
+ description?: string;
143
143
  }
144
144
  // REQUEST PARAMS
145
145
  //---------------
@@ -1,19 +1,20 @@
1
1
  ///<reference path='./../core.d.ts'/>
2
2
  ///<reference path='./../index.d.ts'/>
3
-
3
+ ///<reference path='./filter.d.ts'/>
4
4
  declare module 'chargebee' {
5
5
  export interface Currency {
6
- id?: string;
6
+ id: string;
7
7
  enabled: boolean;
8
8
  forex_type?: 'manual' | 'auto';
9
- currency_code?: string;
10
- is_base_currency?: boolean;
9
+ currency_code: string;
10
+ is_base_currency: boolean;
11
11
  manual_exchange_rate?: string;
12
12
  }
13
13
 
14
14
  export namespace Currency {
15
15
  export class CurrencyResource {
16
16
  list(
17
+ input?: ListInputParam,
17
18
  headers?: ChargebeeRequestHeader,
18
19
  ): Promise<ChargebeeResponse<ListResponse>>;
19
20
 
@@ -46,7 +47,8 @@ declare module 'chargebee' {
46
47
  }
47
48
 
48
49
  export interface ListResponse {
49
- currency: Currency;
50
+ list: { currency: Currency }[];
51
+ next_offset?: string;
50
52
  }
51
53
 
52
54
  export interface RetrieveResponse {
@@ -74,6 +76,10 @@ declare module 'chargebee' {
74
76
  // REQUEST PARAMS
75
77
  //---------------
76
78
 
79
+ export interface ListInputParam {
80
+ limit?: number;
81
+ offset?: string;
82
+ }
77
83
  export interface CreateInputParam {
78
84
  currency_code: string;
79
85
  forex_type: 'manual' | 'auto';
@@ -412,6 +412,7 @@ declare module 'chargebee' {
412
412
  unbilled_charges: number;
413
413
  currency_code: string;
414
414
  balance_currency_code: string;
415
+ business_entity_id?: string;
415
416
  }
416
417
  export interface EntityIdentifier {
417
418
  id: string;
@@ -593,6 +593,7 @@ declare module 'chargebee' {
593
593
  * @deprecated Please refer API docs to use other attributes
594
594
  */
595
595
  coupon?: string;
596
+ offline_payment_method?: OfflinePaymentMethodEnum;
596
597
  free_period?: number;
597
598
  free_period_unit?: FreePeriodUnitEnum;
598
599
  contract_term_billing_cycle_on_renewal?: number;
@@ -734,6 +735,7 @@ declare module 'chargebee' {
734
735
  */
735
736
  setup_fee?: number;
736
737
  start_date?: number;
738
+ offline_payment_method?: OfflinePaymentMethodEnum;
737
739
  free_period?: number;
738
740
  free_period_unit?: FreePeriodUnitEnum;
739
741
  contract_term_billing_cycle_on_renewal?: number;
@@ -73,6 +73,7 @@ declare module 'chargebee' {
73
73
  SubscriptionAdvanceInvoiceScheduleUpdatedContent &
74
74
  ItemDeletedContent &
75
75
  SubscriptionRampDraftedContent &
76
+ DunningUpdatedContent &
76
77
  ItemEntitlementsUpdatedContent &
77
78
  TokenConsumedContent &
78
79
  HierarchyDeletedContent &
@@ -166,6 +167,7 @@ declare module 'chargebee' {
166
167
  SubscriptionScheduledCancellationRemovedContent &
167
168
  PaymentRefundedContent &
168
169
  UsageFileIngestedContent &
170
+ OmnichannelSubscriptionMovedInContent &
169
171
  DifferentialPriceCreatedContent &
170
172
  TransactionCreatedContent &
171
173
  PaymentSucceededContent &
@@ -17,5 +17,6 @@ declare module 'chargebee' {
17
17
  processor_error_code?: string;
18
18
  processor_error_message?: string;
19
19
  error_cause_id?: string;
20
+ processor_advice_code?: string;
20
21
  }
21
22
  }
@@ -14,6 +14,7 @@ declare module 'chargebee' {
14
14
  | 'checkout_one_time'
15
15
  | 'pre_cancel'
16
16
  | 'view_voucher'
17
+ | 'accept_quote'
17
18
  | 'checkout_gift'
18
19
  | 'claim_gift';
19
20
  url?: string;
@@ -813,6 +814,7 @@ declare module 'chargebee' {
813
814
  start_date?: number;
814
815
  coupon?: string;
815
816
  auto_collection?: AutoCollectionEnum;
817
+ offline_payment_method?: OfflinePaymentMethodEnum;
816
818
  invoice_notes?: string;
817
819
  po_number?: string;
818
820
  contract_term_billing_cycle_on_renewal?: number;