chargebee 2.45.0 → 2.46.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,44 @@
1
+ ### v2.46.0 (2024-12-19)
2
+ * * *
3
+
4
+ #### New Resource:
5
+ * Configuration has been added.
6
+
7
+ #### New Attribute:
8
+ * discount_type has been added to CreditNote#Discount.
9
+ * discount_type has been added to CreditNoteEstimate#Discount.
10
+ * discount_type has been added to Invoice#Discount.
11
+ * discount_type has been added to InvoiceEstimate#Discount.
12
+ * discount_type has been added to QuoteLineGroup#Discount.
13
+ * initial_purchase_transaction has been added to OmnichannelSubscription.
14
+ * error_cause_id has been added to GatewayErrorDetail.
15
+ * error_cause_id has been added to Transaction#GatewayErrorDetail.
16
+ * error_cause_id has been added to APIError.
17
+ * deleted has been added to Quote.
18
+ * current_term_start has been added to QuotedSubscripiton#SubscriptionItem.
19
+ * current_term_end has been added to QuotedSubscripiton#SubscriptionItem.
20
+ * next_billing_at has been added to QuotedSubscripiton#SubscriptionItem.
21
+ * current_term_start has been added to Subscription#SubscriptionItem.
22
+ * current_term_end has been added to Subscription#SubscriptionItem.
23
+ * next_billing_at has been added to Subscription#SubscriptionItem.
24
+ * billing_override has been added to Subscription.
25
+ * grace_period_expires_at has been added to OmnichannelSubscriptionItem.
26
+
27
+ #### New Input Params:
28
+ * billing_override has been added to Subscription#CreateWithItemsInputParam.
29
+ * billing_override has been added to Subscription#UpdateForItemsInputParam.
30
+
31
+ #### New Enum Values:
32
+ * OMNICHANNEL_SUBSCRIPTION_IMPORTED has been added to EventTypeEnum.
33
+ * DISABLED has been added to Event#WebhookStatus.
34
+ * OMNICHANNEL_SUBSCRIPTION_ITEM_GRACE_PERIOD_STARTED has been added to EventTypeEnum.
35
+ * OMNICHANNEL_SUBSCRIPTION_ITEM_GRACE_PERIOD_EXPIRED has been added to EventTypeEnum.
36
+ * OMNICHANNEL_SUBSCRIPTION_ITEM_DUNNING_STARTED has been added to EventTypeEnum.
37
+ * OMNICHANNEL_SUBSCRIPTION_ITEM_DUNNING_EXPIRED has been added to EventTypeEnum.
38
+ * IGNORED has been added to RecordedPurchase#StatusEnum.
39
+ * IN_DUNNING & IN_GRACE_PERIOD have been added to OmnichannelSubscriptionItem#StatusEnum.
40
+
41
+
1
42
  ### v2.45.0 (2024-11-27)
2
43
  * * *
3
44
 
package/lib/chargebee.js CHANGED
@@ -11,7 +11,7 @@ ChargeBee._env = {
11
11
  hostSuffix: '.chargebee.com',
12
12
  apiPath: '/api/v2',
13
13
  timeout: 80000,
14
- clientVersion: 'v2.45.0',
14
+ clientVersion: 'v2.46.0',
15
15
  port: 443,
16
16
  timemachineWaitInMillis: 3000,
17
17
  exportWaitInMillis: 3000
@@ -2559,6 +2559,15 @@ var _endpoints = {
2559
2559
  false
2560
2560
  ]
2561
2561
  ],
2562
+ "configuration": [
2563
+ [
2564
+ "list",
2565
+ "GET",
2566
+ "/configurations",
2567
+ null,
2568
+ false
2569
+ ]
2570
+ ],
2562
2571
  "feature": [
2563
2572
  [
2564
2573
  "list",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"chargebee",
3
- "version":"2.45.0",
3
+ "version":"2.46.0",
4
4
  "description":"A library for integrating with ChargeBee.",
5
5
  "keywords":[
6
6
  "payments",
package/types/core.d.ts CHANGED
@@ -44,7 +44,7 @@ declare module 'chargebee' {
44
44
  type EntityCode = 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'p' | 'q' | 'r' | 'med1' | 'med2'
45
45
  type EntityType = 'customer' | 'subscription' | 'coupon' | 'plan_item_price' | 'addon_item_price' | 'charge_item_price' | 'invoice' | 'quote' | 'credit_note' | 'transaction' | 'plan' | 'addon' | 'order' | 'item_family' | 'item' | 'item_price' | 'plan_item' | 'addon_item' | 'charge_item' | 'plan_price' | 'addon_price' | 'charge_price' | 'differential_price' | 'attached_item' | 'feature' | 'subscription_entitlement' | 'item_entitlement' | 'business_entity' | 'price_variant' | 'omnichannel_subscription' | 'omnichannel_subscription_item' | 'omnichannel_transaction'
46
46
  type EventName = 'cancellation_page_loaded'
47
- type EventType = 'coupon_created' | 'coupon_updated' | 'coupon_deleted' | 'coupon_set_created' | 'coupon_set_updated' | 'coupon_set_deleted' | 'coupon_codes_added' | 'coupon_codes_deleted' | 'coupon_codes_updated' | 'customer_created' | 'customer_changed' | 'customer_deleted' | 'customer_moved_out' | 'customer_moved_in' | 'promotional_credits_added' | 'promotional_credits_deducted' | 'subscription_created' | 'subscription_created_with_backdating' | 'subscription_started' | 'subscription_trial_end_reminder' | 'subscription_activated' | 'subscription_activated_with_backdating' | 'subscription_changed' | 'subscription_trial_extended' | 'mrr_updated' | 'subscription_changed_with_backdating' | 'subscription_cancellation_scheduled' | 'subscription_cancellation_reminder' | 'subscription_cancelled' | 'subscription_canceled_with_backdating' | 'subscription_reactivated' | 'subscription_reactivated_with_backdating' | 'subscription_renewed' | 'subscription_items_renewed' | 'subscription_scheduled_cancellation_removed' | 'subscription_changes_scheduled' | 'subscription_scheduled_changes_removed' | 'subscription_shipping_address_updated' | 'subscription_deleted' | 'subscription_paused' | 'subscription_pause_scheduled' | 'subscription_scheduled_pause_removed' | 'subscription_resumed' | 'subscription_resumption_scheduled' | 'subscription_scheduled_resumption_removed' | 'subscription_advance_invoice_schedule_added' | 'subscription_advance_invoice_schedule_updated' | 'subscription_advance_invoice_schedule_removed' | 'pending_invoice_created' | 'pending_invoice_updated' | 'invoice_generated' | 'invoice_generated_with_backdating' | 'invoice_updated' | 'invoice_deleted' | 'credit_note_created' | 'credit_note_created_with_backdating' | 'credit_note_updated' | 'credit_note_deleted' | 'payment_schedules_created' | 'payment_schedules_updated' | 'payment_schedule_scheme_created' | 'payment_schedule_scheme_deleted' | 'subscription_renewal_reminder' | 'add_usages_reminder' | 'transaction_created' | 'transaction_updated' | 'transaction_deleted' | 'payment_succeeded' | 'payment_failed' | 'payment_refunded' | 'payment_initiated' | 'refund_initiated' | 'authorization_succeeded' | 'authorization_voided' | 'card_added' | 'card_updated' | 'card_expiry_reminder' | 'card_expired' | 'card_deleted' | 'payment_source_added' | 'payment_source_updated' | 'payment_source_deleted' | 'payment_source_expiring' | 'payment_source_expired' | 'payment_source_locally_deleted' | 'virtual_bank_account_added' | 'virtual_bank_account_updated' | 'virtual_bank_account_deleted' | 'token_created' | 'token_consumed' | 'token_expired' | 'unbilled_charges_created' | 'unbilled_charges_voided' | 'unbilled_charges_deleted' | 'unbilled_charges_invoiced' | 'order_created' | 'order_updated' | 'order_cancelled' | 'order_delivered' | 'order_returned' | 'order_ready_to_process' | 'order_ready_to_ship' | 'order_deleted' | 'order_resent' | 'quote_created' | 'quote_updated' | 'quote_deleted' | 'tax_withheld_recorded' | 'tax_withheld_deleted' | 'tax_withheld_refunded' | 'gift_scheduled' | 'gift_unclaimed' | 'gift_claimed' | 'gift_expired' | 'gift_cancelled' | 'gift_updated' | 'hierarchy_created' | 'hierarchy_deleted' | 'payment_intent_created' | 'payment_intent_updated' | 'contract_term_created' | 'contract_term_renewed' | 'contract_term_terminated' | 'contract_term_completed' | 'contract_term_cancelled' | 'item_family_created' | 'item_family_updated' | 'item_family_deleted' | 'item_created' | 'item_updated' | 'item_deleted' | 'item_price_created' | 'item_price_updated' | 'item_price_deleted' | 'attached_item_created' | 'attached_item_updated' | 'attached_item_deleted' | 'differential_price_created' | 'differential_price_updated' | 'differential_price_deleted' | 'feature_created' | 'feature_updated' | 'feature_deleted' | 'feature_activated' | 'feature_reactivated' | 'feature_archived' | 'item_entitlements_updated' | 'entitlement_overrides_updated' | 'entitlement_overrides_removed' | 'item_entitlements_removed' | 'entitlement_overrides_auto_removed' | 'subscription_entitlements_created' | 'business_entity_created' | 'business_entity_updated' | 'business_entity_deleted' | 'customer_business_entity_changed' | 'subscription_business_entity_changed' | 'purchase_created' | 'voucher_created' | 'voucher_expired' | 'voucher_create_failed' | 'item_price_entitlements_updated' | 'item_price_entitlements_removed' | 'subscription_ramp_created' | 'subscription_ramp_deleted' | 'subscription_ramp_applied' | 'subscription_ramp_drafted' | 'subscription_ramp_updated' | 'price_variant_created' | 'price_variant_updated' | 'price_variant_deleted' | 'customer_entitlements_updated' | 'subscription_moved_in' | 'subscription_moved_out' | 'subscription_movement_failed' | 'omnichannel_subscription_created' | 'omnichannel_subscription_item_renewed' | 'omnichannel_subscription_item_downgrade_scheduled' | 'omnichannel_subscription_item_scheduled_downgrade_removed' | 'omnichannel_subscription_item_downgraded' | 'omnichannel_subscription_item_expired' | 'omnichannel_subscription_item_cancellation_scheduled' | 'omnichannel_subscription_item_scheduled_cancellation_removed' | 'omnichannel_subscription_item_resubscribed' | 'omnichannel_subscription_item_upgraded' | 'omnichannel_subscription_item_cancelled' | 'plan_created' | 'plan_updated' | 'plan_deleted' | 'addon_created' | 'addon_updated' | 'addon_deleted'
47
+ type EventType = 'coupon_created' | 'coupon_updated' | 'coupon_deleted' | 'coupon_set_created' | 'coupon_set_updated' | 'coupon_set_deleted' | 'coupon_codes_added' | 'coupon_codes_deleted' | 'coupon_codes_updated' | 'customer_created' | 'customer_changed' | 'customer_deleted' | 'customer_moved_out' | 'customer_moved_in' | 'promotional_credits_added' | 'promotional_credits_deducted' | 'subscription_created' | 'subscription_created_with_backdating' | 'subscription_started' | 'subscription_trial_end_reminder' | 'subscription_activated' | 'subscription_activated_with_backdating' | 'subscription_changed' | 'subscription_trial_extended' | 'mrr_updated' | 'subscription_changed_with_backdating' | 'subscription_cancellation_scheduled' | 'subscription_cancellation_reminder' | 'subscription_cancelled' | 'subscription_canceled_with_backdating' | 'subscription_reactivated' | 'subscription_reactivated_with_backdating' | 'subscription_renewed' | 'subscription_items_renewed' | 'subscription_scheduled_cancellation_removed' | 'subscription_changes_scheduled' | 'subscription_scheduled_changes_removed' | 'subscription_shipping_address_updated' | 'subscription_deleted' | 'subscription_paused' | 'subscription_pause_scheduled' | 'subscription_scheduled_pause_removed' | 'subscription_resumed' | 'subscription_resumption_scheduled' | 'subscription_scheduled_resumption_removed' | 'subscription_advance_invoice_schedule_added' | 'subscription_advance_invoice_schedule_updated' | 'subscription_advance_invoice_schedule_removed' | 'pending_invoice_created' | 'pending_invoice_updated' | 'invoice_generated' | 'invoice_generated_with_backdating' | 'invoice_updated' | 'invoice_deleted' | 'credit_note_created' | 'credit_note_created_with_backdating' | 'credit_note_updated' | 'credit_note_deleted' | 'payment_schedules_created' | 'payment_schedules_updated' | 'payment_schedule_scheme_created' | 'payment_schedule_scheme_deleted' | 'subscription_renewal_reminder' | 'add_usages_reminder' | 'transaction_created' | 'transaction_updated' | 'transaction_deleted' | 'payment_succeeded' | 'payment_failed' | 'payment_refunded' | 'payment_initiated' | 'refund_initiated' | 'authorization_succeeded' | 'authorization_voided' | 'card_added' | 'card_updated' | 'card_expiry_reminder' | 'card_expired' | 'card_deleted' | 'payment_source_added' | 'payment_source_updated' | 'payment_source_deleted' | 'payment_source_expiring' | 'payment_source_expired' | 'payment_source_locally_deleted' | 'virtual_bank_account_added' | 'virtual_bank_account_updated' | 'virtual_bank_account_deleted' | 'token_created' | 'token_consumed' | 'token_expired' | 'unbilled_charges_created' | 'unbilled_charges_voided' | 'unbilled_charges_deleted' | 'unbilled_charges_invoiced' | 'order_created' | 'order_updated' | 'order_cancelled' | 'order_delivered' | 'order_returned' | 'order_ready_to_process' | 'order_ready_to_ship' | 'order_deleted' | 'order_resent' | 'quote_created' | 'quote_updated' | 'quote_deleted' | 'tax_withheld_recorded' | 'tax_withheld_deleted' | 'tax_withheld_refunded' | 'gift_scheduled' | 'gift_unclaimed' | 'gift_claimed' | 'gift_expired' | 'gift_cancelled' | 'gift_updated' | 'hierarchy_created' | 'hierarchy_deleted' | 'payment_intent_created' | 'payment_intent_updated' | 'contract_term_created' | 'contract_term_renewed' | 'contract_term_terminated' | 'contract_term_completed' | 'contract_term_cancelled' | 'item_family_created' | 'item_family_updated' | 'item_family_deleted' | 'item_created' | 'item_updated' | 'item_deleted' | 'item_price_created' | 'item_price_updated' | 'item_price_deleted' | 'attached_item_created' | 'attached_item_updated' | 'attached_item_deleted' | 'differential_price_created' | 'differential_price_updated' | 'differential_price_deleted' | 'feature_created' | 'feature_updated' | 'feature_deleted' | 'feature_activated' | 'feature_reactivated' | 'feature_archived' | 'item_entitlements_updated' | 'entitlement_overrides_updated' | 'entitlement_overrides_removed' | 'item_entitlements_removed' | 'entitlement_overrides_auto_removed' | 'subscription_entitlements_created' | 'business_entity_created' | 'business_entity_updated' | 'business_entity_deleted' | 'customer_business_entity_changed' | 'subscription_business_entity_changed' | 'purchase_created' | 'voucher_created' | 'voucher_expired' | 'voucher_create_failed' | 'item_price_entitlements_updated' | 'item_price_entitlements_removed' | 'subscription_ramp_created' | 'subscription_ramp_deleted' | 'subscription_ramp_applied' | 'subscription_ramp_drafted' | 'subscription_ramp_updated' | 'price_variant_created' | 'price_variant_updated' | 'price_variant_deleted' | 'customer_entitlements_updated' | 'subscription_moved_in' | 'subscription_moved_out' | 'subscription_movement_failed' | 'omnichannel_subscription_created' | 'omnichannel_subscription_item_renewed' | 'omnichannel_subscription_item_downgrade_scheduled' | 'omnichannel_subscription_item_scheduled_downgrade_removed' | 'omnichannel_subscription_item_downgraded' | 'omnichannel_subscription_item_expired' | 'omnichannel_subscription_item_cancellation_scheduled' | 'omnichannel_subscription_item_scheduled_cancellation_removed' | 'omnichannel_subscription_item_resubscribed' | 'omnichannel_subscription_item_upgraded' | 'omnichannel_subscription_item_cancelled' | 'omnichannel_subscription_imported' | 'omnichannel_subscription_item_grace_period_started' | 'omnichannel_subscription_item_grace_period_expired' | 'omnichannel_subscription_item_dunning_started' | 'omnichannel_subscription_item_dunning_expired' | 'plan_created' | 'plan_updated' | 'plan_deleted' | 'addon_created' | 'addon_updated' | 'addon_deleted'
48
48
  type ExportType = 'data' | 'import_friendly_data'
49
49
  type FreePeriodUnit = 'day' | 'week' | 'month' | 'year'
50
50
  type FriendOfferType = 'none' | 'coupon' | 'coupon_code'
@@ -66,6 +66,7 @@ declare module 'chargebee' {
66
66
  type PeriodUnit = 'day' | 'week' | 'month' | 'year'
67
67
  type PriceType = 'tax_exclusive' | 'tax_inclusive'
68
68
  type PricingModel = 'flat_fee' | 'per_unit' | 'tiered' | 'volume' | 'stairstep'
69
+ type ProductCatalogVersion = 'v1' | 'v2'
69
70
  type ProrationType = 'full_term' | 'partial_term' | 'none'
70
71
  type ReferralSystem = 'referral_candy' | 'referral_saasquatch' | 'friendbuy'
71
72
  type ReferrerRewardType = 'none' | 'referral_direct_reward' | 'custom_promotional_credit' | 'custom_revenue_percent_based'
package/types/index.d.ts CHANGED
@@ -6,6 +6,7 @@
6
6
  ///<reference path='./resources/BusinessEntityTransfer.d.ts' />
7
7
  ///<reference path='./resources/Card.d.ts' />
8
8
  ///<reference path='./resources/Comment.d.ts' />
9
+ ///<reference path='./resources/Configuration.d.ts' />
9
10
  ///<reference path='./resources/Contact.d.ts' />
10
11
  ///<reference path='./resources/ContractTerm.d.ts' />
11
12
  ///<reference path='./resources/Coupon.d.ts' />
@@ -85,6 +86,7 @@ declare module 'chargebee' {
85
86
  static business_entity: BusinessEntity.BusinessEntityResource;
86
87
  static card: Card.CardResource;
87
88
  static comment: Comment.CommentResource;
89
+ static configuration: Configuration.ConfigurationResource;
88
90
  static coupon: Coupon.CouponResource;
89
91
  static coupon_code: CouponCode.CouponCodeResource;
90
92
  static coupon_set: CouponSet.CouponSetResource;
@@ -0,0 +1,22 @@
1
+ ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
3
+ declare module 'chargebee' {
4
+ export interface Configuration {
5
+
6
+
7
+ domain?:string;
8
+
9
+ product_catalog_version?:ProductCatalogVersion;
10
+
11
+ }
12
+ export namespace Configuration {
13
+ export class ConfigurationResource {
14
+ list():ChargebeeRequest<ListResponse>;
15
+ }
16
+ export interface ListResponse {
17
+ configurations:Configuration[];
18
+ }
19
+
20
+
21
+ }
22
+ }
@@ -1,38 +1,41 @@
1
1
  ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
2
3
  declare module 'chargebee' {
3
4
  export interface CreditNoteEstimate {
4
5
 
6
+
5
7
  reference_invoice_id:string;
6
-
8
+
7
9
  type:'adjustment' | 'refundable';
8
-
10
+
9
11
  price_type:PriceType;
10
-
12
+
11
13
  currency_code:string;
12
-
14
+
13
15
  sub_total:number;
14
-
16
+
15
17
  total:number;
16
-
18
+
17
19
  amount_allocated:number;
18
-
20
+
19
21
  amount_available:number;
20
-
22
+
21
23
  line_items?:CreditNoteEstimate.LineItem[];
22
-
24
+
23
25
  discounts?:CreditNoteEstimate.Discount[];
24
-
26
+
25
27
  taxes?:CreditNoteEstimate.Tax[];
26
-
28
+
27
29
  line_item_taxes?:CreditNoteEstimate.LineItemTax[];
28
-
30
+
29
31
  line_item_discounts?:CreditNoteEstimate.LineItemDiscount[];
30
-
32
+
31
33
  line_item_tiers?:CreditNoteEstimate.LineItemTier[];
32
-
34
+
33
35
  round_off_amount?:number;
34
-
36
+
35
37
  customer_id?:string;
38
+
36
39
  }
37
40
  export namespace CreditNoteEstimate {
38
41
 
@@ -93,6 +96,8 @@ declare module 'chargebee' {
93
96
 
94
97
  entity_type:'item_level_coupon' | 'document_level_coupon' | 'promotional_credits' | 'prorated_credits' | 'item_level_discount' | 'document_level_discount';
95
98
 
99
+ discount_type?:'fixed_amount' | 'percentage';
100
+
96
101
  entity_id?:string;
97
102
 
98
103
  coupon_set_code?:string;
@@ -133,7 +133,7 @@ declare module 'chargebee' {
133
133
 
134
134
  */
135
135
 
136
- webhook_status?:{in?:string,is?:'not_configured' | 're_scheduled' | 'scheduled' | 'failed' | 'not_applicable' | 'succeeded' | 'skipped',is_not?:'not_configured' | 're_scheduled' | 'scheduled' | 'failed' | 'not_applicable' | 'succeeded' | 'skipped',not_in?:string};
136
+ webhook_status?:{in?:string,is?:'not_configured' | 're_scheduled' | 'scheduled' | 'failed' | 'not_applicable' | 'succeeded' | 'skipped' | 'disabled',is_not?:'not_configured' | 're_scheduled' | 'scheduled' | 'failed' | 'not_applicable' | 'succeeded' | 'skipped',not_in?:string};
137
137
 
138
138
  /**
139
139
  * @description Retrieves list of events.
@@ -186,7 +186,7 @@ declare module 'chargebee' {
186
186
 
187
187
  */
188
188
 
189
- webhook_status:'not_configured' | 're_scheduled' | 'scheduled' | 'failed' | 'not_applicable' | 'succeeded' | 'skipped';
189
+ webhook_status:'not_configured' | 're_scheduled' | 'scheduled' | 'failed' | 'not_applicable' | 'succeeded' | 'skipped' | 'disabled';
190
190
  }
191
191
  }
192
192
  }
@@ -72,5 +72,7 @@ declare module 'chargebee' {
72
72
  processor_error_code?:string;
73
73
 
74
74
  processor_error_message?:string;
75
+
76
+ error_cause_id?:string;
75
77
  }
76
78
  }
@@ -1,38 +1,41 @@
1
1
  ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
2
3
  declare module 'chargebee' {
3
4
  export interface InvoiceEstimate {
4
5
 
6
+
5
7
  recurring:boolean;
6
-
8
+
7
9
  price_type:PriceType;
8
-
10
+
9
11
  currency_code:string;
10
-
12
+
11
13
  sub_total:number;
12
-
14
+
13
15
  total?:number;
14
-
16
+
15
17
  credits_applied?:number;
16
-
18
+
17
19
  amount_paid?:number;
18
-
20
+
19
21
  amount_due?:number;
20
-
21
- round_off_amount?:number;
22
-
23
- customer_id?:string;
24
-
22
+
25
23
  line_items?:InvoiceEstimate.LineItem[];
26
-
24
+
27
25
  discounts?:InvoiceEstimate.Discount[];
28
-
26
+
29
27
  taxes?:InvoiceEstimate.Tax[];
30
-
28
+
31
29
  line_item_taxes?:InvoiceEstimate.LineItemTax[];
32
-
30
+
33
31
  line_item_tiers?:InvoiceEstimate.LineItemTier[];
34
-
32
+
35
33
  line_item_discounts?:InvoiceEstimate.LineItemDiscount[];
34
+
35
+ round_off_amount?:number;
36
+
37
+ customer_id?:string;
38
+
36
39
  }
37
40
  export namespace InvoiceEstimate {
38
41
 
@@ -52,7 +55,7 @@ declare module 'chargebee' {
52
55
 
53
56
  amount?:number;
54
57
 
55
- pricing_model?:'volume' | 'per_unit' | 'tiered' | 'flat_fee' | 'stairstep';
58
+ pricing_model?:'flat_fee' | 'per_unit' | 'tiered' | 'volume' | 'stairstep';
56
59
 
57
60
  is_taxed:boolean;
58
61
 
@@ -69,7 +72,7 @@ declare module 'chargebee' {
69
72
  discount_amount?:number;
70
73
 
71
74
  item_level_discount_amount?:number;
72
-
75
+
73
76
  usage_percentage?:string;
74
77
 
75
78
  reference_line_item_id?:string;
@@ -78,9 +81,9 @@ declare module 'chargebee' {
78
81
 
79
82
  entity_description?:string;
80
83
 
81
- entity_type:'addon_item_price' | 'plan_item_price' | 'charge_item_price' | 'adhoc';
84
+ entity_type:'adhoc' | 'plan_item_price' | 'addon_item_price' | 'charge_item_price' | 'plan_setup' | 'plan' | 'addon';
82
85
 
83
- tax_exempt_reason?:'high_value_physical_goods' | 'tax_not_configured' | 'reverse_charge' | 'zero_rated' | 'tax_not_configured_external_provider' | 'customer_exempt' | 'region_non_taxable' | 'zero_value_item' | 'export' | 'product_exempt';
86
+ tax_exempt_reason?:'tax_not_configured' | 'region_non_taxable' | 'export' | 'customer_exempt' | 'product_exempt' | 'zero_rated' | 'reverse_charge' | 'high_value_physical_goods' | 'zero_value_item' | 'tax_not_configured_external_provider';
84
87
 
85
88
  entity_id?:string;
86
89
 
@@ -91,9 +94,7 @@ declare module 'chargebee' {
91
94
 
92
95
  description?:string;
93
96
 
94
- line_item_id?:string;
95
-
96
- entity_type:'item_level_coupon' | 'promotional_credits' | 'item_level_discount' | 'prorated_credits' | 'document_level_discount' | 'document_level_coupon';
97
+ entity_type:'item_level_coupon' | 'document_level_coupon' | 'promotional_credits' | 'prorated_credits' | 'item_level_discount' | 'document_level_discount';
97
98
 
98
99
  discount_type?:'fixed_amount' | 'percentage';
99
100
 
@@ -129,7 +130,7 @@ declare module 'chargebee' {
129
130
 
130
131
  tax_amount:number;
131
132
 
132
- tax_juris_type?:'special' | 'country' | 'unincorporated' | 'other' | 'city' | 'federal' | 'county' | 'state';
133
+ tax_juris_type?:'country' | 'federal' | 'state' | 'county' | 'city' | 'special' | 'unincorporated' | 'other';
133
134
 
134
135
  tax_juris_name?:string;
135
136
 
@@ -161,7 +162,7 @@ declare module 'chargebee' {
161
162
  export interface LineItemDiscount {
162
163
  line_item_id:string;
163
164
 
164
- discount_type:'item_level_coupon' | 'promotional_credits' | 'item_level_discount' | 'prorated_credits' | 'document_level_discount' | 'document_level_coupon';
165
+ discount_type:'item_level_coupon' | 'document_level_coupon' | 'promotional_credits' | 'prorated_credits' | 'item_level_discount' | 'document_level_discount';
165
166
 
166
167
  coupon_id?:string;
167
168
 
@@ -20,6 +20,8 @@ declare module 'chargebee' {
20
20
 
21
21
  omnichannel_subscription_items:OmnichannelSubscriptionItem[];
22
22
 
23
+ initial_purchase_transaction?:OmnichannelSubscription.OmnichannelTransaction;
24
+
23
25
  }
24
26
  export namespace OmnichannelSubscription {
25
27
  export class OmnichannelSubscriptionResource {
@@ -82,6 +84,26 @@ declare module 'chargebee' {
82
84
 
83
85
  offset?:string;
84
86
  }
85
-
87
+ export interface OmnichannelTransaction {
88
+ id:string;
89
+
90
+ id_at_source:string;
91
+
92
+ app_id:string;
93
+
94
+ price_currency:string;
95
+
96
+ price_units:number;
97
+
98
+ price_nanos:number;
99
+
100
+ type:'purchase' | 'renewal';
101
+
102
+ transacted_at:number;
103
+
104
+ created_at:number;
105
+
106
+ resource_version?:number;
107
+ }
86
108
  }
87
109
  }
@@ -8,7 +8,7 @@ declare module 'chargebee' {
8
8
 
9
9
  item_id_at_source:string;
10
10
 
11
- status:'active' | 'expired' | 'cancelled';
11
+ status:'active' | 'expired' | 'cancelled' | 'in_dunning' | 'in_grace_period';
12
12
 
13
13
  current_term_start?:number;
14
14
 
@@ -22,6 +22,8 @@ declare module 'chargebee' {
22
22
 
23
23
  cancellation_reason?:'customer_cancelled' | 'customer_did_not_consent_to_price_increase';
24
24
 
25
+ grace_period_expires_at?:number;
26
+
25
27
  resource_version?:number;
26
28
 
27
29
  }
@@ -80,6 +80,8 @@ declare module 'chargebee' {
80
80
 
81
81
  business_entity_id?:string;
82
82
 
83
+ deleted:boolean;
84
+
83
85
  }
84
86
  export namespace Quote {
85
87
  export class QuoteResource {
@@ -814,6 +816,8 @@ NOTE: Not to be used if *consolidated invoicing* feature is enabled.
814
816
 
815
817
  entity_type:'item_level_coupon' | 'document_level_coupon' | 'promotional_credits' | 'prorated_credits' | 'item_level_discount' | 'document_level_discount';
816
818
 
819
+ discount_type?:'fixed_amount' | 'percentage';
820
+
817
821
  entity_id?:string;
818
822
 
819
823
  coupon_set_code?:string;
@@ -114,6 +114,12 @@ declare module 'chargebee' {
114
114
 
115
115
  amount?:number;
116
116
 
117
+ current_term_start?:number;
118
+
119
+ current_term_end?:number;
120
+
121
+ next_billing_at?:number;
122
+
117
123
  amount_in_decimal?:string;
118
124
 
119
125
  billing_period?:number;
@@ -134,6 +134,8 @@ declare module 'chargebee' {
134
134
 
135
135
  referral_info?:Subscription.ReferralInfo;
136
136
 
137
+ billing_override?:Subscription.BillingOverride;
138
+
137
139
  invoice_notes?:string;
138
140
 
139
141
  meta_data?:object;
@@ -450,6 +452,8 @@ declare module 'chargebee' {
450
452
 
451
453
  contract_term?:{action_at_term_end?:'renew' | 'evergreen' | 'cancel',cancellation_cutoff_period?:number,contract_start?:number};
452
454
 
455
+ billing_override?:{max_excess_payment_usage?:number,max_refundable_credits_usage?:number};
456
+
453
457
  subscription_items:{billing_cycles?:number,charge_on_event?:ChargeOnEvent,charge_on_option?:ChargeOnOption,charge_once?:boolean,item_price_id:string,item_type?:ItemType,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string,usage_accumulation_reset_frequency?:UsageAccumulationResetFrequency}[];
454
458
 
455
459
  discounts:{amount?:number,apply_on:ApplyOn,duration_type:DurationType,included_in_mrr?:boolean,item_price_id?:string,percentage?:number,period?:number,period_unit?:PeriodUnit}[];
@@ -944,6 +948,8 @@ The ID of the business entity created for the site. For Product Catalog 1.0, all
944
948
 
945
949
  contract_term?:{action_at_term_end?:'renew' | 'evergreen' | 'cancel' | 'renew_once',cancellation_cutoff_period?:number,contract_start?:number};
946
950
 
951
+ billing_override?:{max_excess_payment_usage?:number,max_refundable_credits_usage?:number};
952
+
947
953
  subscription_items:{billing_cycles?:number,charge_on_event?:ChargeOnEvent,charge_on_option?:ChargeOnOption,charge_once?:boolean,item_price_id:string,item_type?:ItemType,proration_type?:ProrationType,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string,usage_accumulation_reset_frequency?:UsageAccumulationResetFrequency}[];
948
954
 
949
955
  discounts:{amount?:number,apply_on:ApplyOn,duration_type:DurationType,id?:string,included_in_mrr?:boolean,item_price_id?:string,operation_type:OperationType,percentage?:number,period?:number,period_unit?:PeriodUnit}[];
@@ -1644,6 +1650,12 @@ The ID of the business entity created for the site. For Product Catalog 1.0, all
1644
1650
 
1645
1651
  amount?:number;
1646
1652
 
1653
+ current_term_start?:number;
1654
+
1655
+ current_term_end?:number;
1656
+
1657
+ next_billing_at?:number;
1658
+
1647
1659
  amount_in_decimal?:string;
1648
1660
 
1649
1661
  billing_period?:number;
@@ -1804,6 +1816,11 @@ The ID of the business entity created for the site. For Product Catalog 1.0, all
1804
1816
 
1805
1817
  post_purchase_widget_enabled:boolean;
1806
1818
  }
1819
+ export interface BillingOverride {
1820
+ max_excess_payment_usage?:number;
1821
+
1822
+ max_refundable_credits_usage?:number;
1823
+ }
1807
1824
  export interface ContractTerm {
1808
1825
  id:string;
1809
1826
 
@@ -461,6 +461,7 @@ declare module 'chargebee' {
461
461
 
462
462
  processor_error_message?:string;
463
463
 
464
+ error_cause_id?:string;
464
465
  }
465
466
  }
466
467
  }