chargebee 2.38.0 → 2.40.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,41 @@
1
+ ### v2.40.0 (2024-08-14)
2
+ * * *
3
+
4
+ #### New Attributes:
5
+ * feature_type has been added in SubscriptionEntitlement.
6
+ * business_entity_id has been made optional in Quote.
7
+ * business_entity_id has been made optional in CreditNote.
8
+
9
+ #### New Input parameters:
10
+ * invoice_usages has been added in Subscription#UpdateForItemsRequest.
11
+ * invoice_usages has been added in Estimate#UpdateSubscriptionForItemsRequest.
12
+
13
+ ### v2.39.0 (2024-07-31)
14
+ * * *
15
+
16
+ #### New Resource:
17
+ * Metadata has been added.
18
+
19
+ #### New Attributes:
20
+ * variant_group has been added in PriceVariant resource.
21
+ * effective_from & schedule_status have been added in EntitlementOverride resource.
22
+ * effective_from & schedule_status have been added in SubscriptionEntitlement resource.
23
+ * status_transition_reason has been added in Ramp subresource.
24
+ * billing_period & billing_period_unit have been added in SubscriptionItem subresource.
25
+
26
+ #### New Input parameters:
27
+ * variant_group has been added to PriceVariant#CreateRequest, PriceVariant#UpdateRequest.
28
+ * include_scheduled_overrides has been added to SubscriptionEntitlement#SubscriptionEntitlementsForSubscriptionRequest.
29
+ * entitlement_overrides[effective_from] has been added to SubscriptionEntitlement#SubscriptionEntitlementsForSubscriptionRequest.
30
+ * entitlement_overrides[effective_from] has been added to EntitlementOverride#AddEntitlementOverrideForSubscriptionRequest.
31
+ * include_scheduled_overrides has been added to EntitlementOverride#ListEntitlementOverrideForSubscriptionRequest.
32
+ * updated_at has been added to Usage#ListRequest.
33
+
34
+ #### New Enum values:
35
+ * SUBSCRIPTION_ITEMS_RENEWED has been added in EventType enum.
36
+ * SUBSCRIPTION_RAMP_DRAFTED has been added in EventType enum.
37
+ * SUBSCRIPTION_RAMP_UPDATED has been added in EventType enum.
38
+
1
39
  ### v2.38.0 (2024-07-19)
2
40
  * * *
3
41
 
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.38.0',
14
+ clientVersion: 'v2.40.0',
15
15
  port: 443,
16
16
  timemachineWaitInMillis: 3000,
17
17
  exportWaitInMillis: 3000
@@ -2598,6 +2598,7 @@ var _endpoints = {
2598
2598
  "impacted_subscription": [],
2599
2599
  "impacted_item": [],
2600
2600
  "impacted_item_price": [],
2601
+ "metadata": [],
2601
2602
  "subscription_entitlement": [
2602
2603
  [
2603
2604
  "subscription_entitlements_for_subscription",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"chargebee",
3
- "version":"2.38.0",
3
+ "version":"2.40.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'
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_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' | 'invoice_installments_created' | 'invoice_installment_updated' | 'installment_config_created' | 'installment_config_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' | 'ramp_created' | 'ramp_deleted' | 'ramp_applied' | 'price_variant_created' | 'price_variant_updated' | 'price_variant_deleted' | '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' | 'invoice_installments_created' | 'invoice_installment_updated' | 'installment_config_created' | 'installment_config_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' | 'ramp_created' | 'ramp_deleted' | 'ramp_applied' | 'subscription_ramp_drafted' | 'subscription_ramp_updated' | 'price_variant_created' | 'price_variant_updated' | 'price_variant_deleted' | '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'
package/types/index.d.ts CHANGED
@@ -41,6 +41,7 @@
41
41
  ///<reference path='./resources/ItemEntitlement.d.ts' />
42
42
  ///<reference path='./resources/ItemFamily.d.ts' />
43
43
  ///<reference path='./resources/ItemPrice.d.ts' />
44
+ ///<reference path='./resources/Metadata.d.ts' />
44
45
  ///<reference path='./resources/NonSubscription.d.ts' />
45
46
  ///<reference path='./resources/Order.d.ts' />
46
47
  ///<reference path='./resources/PaymentIntent.d.ts' />
@@ -1,4 +1,6 @@
1
1
  ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
3
+
2
4
  declare module 'chargebee' {
3
5
  export interface CreditNote {
4
6
 
@@ -240,7 +242,7 @@ Ireland** . The first two characters of the VAT number in such a case is &#x60;X
240
242
 
241
243
  */
242
244
 
243
- business_entity_id:string;
245
+ business_entity_id?:string;
244
246
 
245
247
  /**
246
248
  * @description An e-invoice or electronic invoice is a structured representation of an invoice that is interoperable between computerized invoicing systems. Depending on the country, e-invoicing can be necessary to meet financial/taxation authority regulations.
@@ -1,4 +1,5 @@
1
1
  ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
2
3
  declare module 'chargebee' {
3
4
  export interface EntitlementOverride {
4
5
 
@@ -73,6 +74,11 @@ declare module 'chargebee' {
73
74
  */
74
75
 
75
76
  expires_at?:number;
77
+
78
+ effective_from?:number;
79
+
80
+ schedule_status?:'activated' | 'scheduled' | 'failed';
81
+
76
82
  }
77
83
  export namespace EntitlementOverride {
78
84
  export class EntitlementOverrideResource {
@@ -139,6 +145,12 @@ declare module 'chargebee' {
139
145
  */
140
146
 
141
147
  offset?:string;
148
+
149
+ embed?:string;
150
+
151
+ include_drafts?:boolean;
152
+
153
+ include_scheduled_overrides?:boolean;
142
154
  }
143
155
 
144
156
  }
@@ -316,6 +316,8 @@ declare module 'chargebee' {
316
316
  use_existing_balances?:boolean;
317
317
 
318
318
  invoice_immediately?:boolean;
319
+
320
+ invoice_usages?:boolean;
319
321
  }
320
322
  export interface RenewalEstimateResponse {
321
323
  estimate:Estimate;
@@ -0,0 +1,10 @@
1
+ ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
3
+ declare module 'chargebee' {
4
+ export interface Metadata {
5
+
6
+
7
+ change_type?:string;
8
+
9
+ }
10
+ }
@@ -1,4 +1,5 @@
1
1
  ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
2
3
  declare module 'chargebee' {
3
4
  export interface PriceVariant {
4
5
 
@@ -27,7 +28,7 @@ declare module 'chargebee' {
27
28
  * @description Description of the price variant.
28
29
 
29
30
  */
30
-
31
+ variant_group?:string;
31
32
  description?:string;
32
33
 
33
34
  /**
@@ -152,6 +153,8 @@ Attributes can be used to store additional information about the price variant.
152
153
  */
153
154
 
154
155
  attributes:{name:string,value:string}[];
156
+
157
+ variant_group?:string;
155
158
  }
156
159
  export interface RetrieveResponse {
157
160
  price_variant:PriceVariant;
@@ -182,6 +185,8 @@ Attributes can be used to store additional information about the price variant.
182
185
  */
183
186
 
184
187
  description?:string;
188
+
189
+ variant_group?:string;
185
190
 
186
191
  /**
187
192
  * @description Status of a price variant. \* active - Active price variant. This price variant can be attached to [item prices](https://apidocs.chargebee.com/docs/api/item_prices?lang&#x3D;curl). \* deleted - Deleted price variant. The &#x60;id&#x60; and &#x60;name&#x60; of the deleted price variant can be reused. \* archived - Archived price variant. This price variant is no longer &#x60;active&#x60; and cannot be attached to new [item prices](https://apidocs.chargebee.com/docs/api/item_prices?lang&#x3D;curl). Existing item prices that already have this price variant attached will continue to remain as is.
@@ -1,4 +1,6 @@
1
1
  ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
3
+
2
4
  declare module 'chargebee' {
3
5
  export interface Quote {
4
6
 
@@ -76,7 +78,7 @@ declare module 'chargebee' {
76
78
 
77
79
  contract_term_termination_fee?:number;
78
80
 
79
- business_entity_id:string;
81
+ business_entity_id?:string;
80
82
  }
81
83
  export namespace Quote {
82
84
  export class QuoteResource {
@@ -383,6 +383,10 @@ If [addon billing cycles](https://www.chargebee.com/docs/2.0/addons-billingcycle
383
383
  */
384
384
 
385
385
  proration_type?:'partial_term' | 'full_term' | 'none';
386
+
387
+ billing_period?:number;
388
+
389
+ billing_period_unit?:'day' | 'week' | 'month' | 'year';
386
390
  }
387
391
  export interface ItemTier {
388
392
  /**
@@ -131,6 +131,8 @@ Overrides the [item_tiers](subscriptions#subscription_item_tiers) for specific &
131
131
  */
132
132
 
133
133
  item_tiers?:Ramp.ItemTier[];
134
+
135
+ status_transition_reason?:Ramp.StatusTransitionReason;
134
136
  }
135
137
  export namespace Ramp {
136
138
  export class RampResource {
@@ -740,5 +742,10 @@ If [addon billing cycles](https://www.chargebee.com/docs/2.0/addons-billingcycle
740
742
 
741
743
  index:number;
742
744
  }
745
+ export interface StatusTransitionReason {
746
+ code?:string;
747
+
748
+ message?:string;
749
+ }
743
750
  }
744
751
  }
@@ -2752,6 +2752,7 @@ Updates the specified subscription by setting the parameters passed. Any paramet
2752
2752
  */
2753
2753
 
2754
2754
  item_tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,item_price_id?:string,price?:number,price_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string}[];
2755
+ invoice_usages?:boolean;
2755
2756
  }
2756
2757
  export interface ChangeTermEndResponse {
2757
2758
  subscription:Subscription;
@@ -3841,6 +3842,10 @@ If [addon billing cycles](https://www.chargebee.com/docs/2.0/addons-billingcycle
3841
3842
  */
3842
3843
 
3843
3844
  proration_type?:'partial_term' | 'full_term' | 'none';
3845
+
3846
+ billing_period?:number;
3847
+
3848
+ billing_period_unit?:'day' | 'week' | 'month' | 'year';
3844
3849
  }
3845
3850
  export interface ItemTier {
3846
3851
  /**
@@ -1,4 +1,5 @@
1
1
  ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
2
3
  declare module 'chargebee' {
3
4
  export interface SubscriptionEntitlement {
4
5
 
@@ -66,7 +67,10 @@ declare module 'chargebee' {
66
67
  * @description Timestamp when the subscription entitlements are going to expire.
67
68
 
68
69
  */
69
-
70
+ effective_from?:number;
71
+
72
+ schedule_status?:'activated' | 'scheduled' | 'failed';
73
+
70
74
  expires_at?:number;
71
75
 
72
76
  /**
@@ -75,6 +79,7 @@ declare module 'chargebee' {
75
79
  */
76
80
 
77
81
  components?:SubscriptionEntitlement.Component;
82
+ feature_type?:string;
78
83
  }
79
84
  export namespace SubscriptionEntitlement {
80
85
  export class SubscriptionEntitlementResource {
@@ -137,6 +142,12 @@ The &#x60;components&#x60; attribute is not returned for any of the &#x60;subscr
137
142
  */
138
143
 
139
144
  offset?:string;
145
+
146
+ include_drafts?:boolean;
147
+
148
+ embed?:string;
149
+
150
+ include_scheduled_overrides?:boolean;
140
151
  }
141
152
  export interface SetSubscriptionEntitlementAvailabilityResponse {
142
153
  subscription_entitlement:SubscriptionEntitlement;
@@ -271,6 +271,13 @@ The maximum number of usages that can be recorded for the entire lifetime of a s
271
271
  */
272
272
 
273
273
  sort_by?:{asc?:'usage_date',desc?:'usage_date'};
274
+
275
+ /**
276
+ * @description Indicates the date at which this credit note is last updated.
277
+
278
+ */
279
+
280
+ updated_at?:{after?:string,before?:string,between?:string,on?:string};
274
281
  }
275
282
  export interface PdfResponse {
276
283
  download:Download;