chargebee 2.46.0 → 2.47.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"chargebee",
3
- "version":"2.46.0",
3
+ "version":"2.47.0",
4
4
  "description":"A library for integrating with ChargeBee.",
5
5
  "keywords":[
6
6
  "payments",
package/types/core.d.ts CHANGED
@@ -42,9 +42,9 @@ declare module 'chargebee' {
42
42
  type EinvoicingMethod = 'automatic' | 'manual' | 'site_default'
43
43
  type EndScheduleOn = 'after_number_of_intervals' | 'specific_date' | 'subscription_end'
44
44
  type EntityCode = 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'p' | 'q' | 'r' | 'med1' | 'med2'
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'
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' | 'recorded_purchase'
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' | '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'
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' | 'rule_created' | 'rule_updated' | 'rule_deleted' | 'record_purchase_failed' | '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
@@ -65,6 +65,7 @@
65
65
  ///<reference path='./resources/Ramp.d.ts' />
66
66
  ///<reference path='./resources/RecordedPurchase.d.ts' />
67
67
  ///<reference path='./resources/ResourceMigration.d.ts' />
68
+ ///<reference path='./resources/Rule.d.ts' />
68
69
  ///<reference path='./resources/SiteMigrationDetail.d.ts' />
69
70
  ///<reference path='./resources/Subscription.d.ts' />
70
71
  ///<reference path='./resources/SubscriptionEntitlement.d.ts' />
@@ -76,6 +77,7 @@
76
77
  ///<reference path='./resources/Transaction.d.ts' />
77
78
  ///<reference path='./resources/UnbilledCharge.d.ts' />
78
79
  ///<reference path='./resources/Usage.d.ts' />
80
+ ///<reference path='./resources/UsageEvent.d.ts' />
79
81
  ///<reference path='./resources/VirtualBankAccount.d.ts' />
80
82
 
81
83
  declare module 'chargebee' {
@@ -125,6 +127,7 @@ declare module 'chargebee' {
125
127
  static ramp: Ramp.RampResource;
126
128
  static recorded_purchase: RecordedPurchase.RecordedPurchaseResource;
127
129
  static resource_migration: ResourceMigration.ResourceMigrationResource;
130
+ static rule: Rule.RuleResource;
128
131
  static site_migration_detail: SiteMigrationDetail.SiteMigrationDetailResource;
129
132
  static subscription: Subscription.SubscriptionResource;
130
133
  static subscription_entitlement: SubscriptionEntitlement.SubscriptionEntitlementResource;
@@ -132,6 +135,7 @@ declare module 'chargebee' {
132
135
  static transaction: Transaction.TransactionResource;
133
136
  static unbilled_charge: UnbilledCharge.UnbilledChargeResource;
134
137
  static usage: Usage.UsageResource;
138
+ static usage_event: UsageEvent.UsageEventResource;
135
139
  static virtual_bank_account: VirtualBankAccount.VirtualBankAccountResource;
136
140
 
137
141
  }
@@ -1,143 +1,52 @@
1
1
  ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
2
3
  declare module 'chargebee' {
3
4
  export interface AttachedItem {
4
5
 
5
- /**
6
- * @description The unique id for the attached item. Set to a random, immutable value automatically when the attached item is created.
7
6
 
8
- */
9
-
10
7
  id:string;
11
-
12
- /**
13
- * @description The id of the plan-item to which the item is attached.
14
8
 
15
- */
16
-
17
9
  parent_item_id:string;
18
-
19
- /**
20
- * @description The id of the item being attached.
21
10
 
22
- */
23
-
24
11
  item_id:string;
25
-
26
- /**
27
- * @description The type of attachment for the addon. Only applicable for addon-items. \* recommended - The addon is recommended to go with the plan-item when using [Checkout](https://www.chargebee.com/docs/2.0/configure-inapp.html#fundamental-settings_recommending-addons-in-checkout) or [Portal](https://www.chargebee.com/docs/2.0/inapp-self-serve-portal.html#allow-change-subscription). \* optional - The addon is neither mandatory, nor recommended. This allows you to attach an addon so you can specify a &#x60;quantity&#x60; and &#x60;billing_cycles&#x60; for the addon, for when it is applied to subscriptions with the plan. \* mandatory - The addon is attached automatically to the subscription for the plan-item unless [explicitly removed](./subscriptions?prod_cat_ver&#x3D;2) via API.
28
12
 
29
- */
30
-
31
- type:'optional' | 'mandatory' | 'recommended';
32
-
33
- /**
34
- * @description The item state. \* active - New subscriptions can be created with the item. \* deleted - No subscriptions allowed for the item. \* archived - No new subscriptions allowed for the item.
13
+ type:'recommended' | 'mandatory' | 'optional';
35
14
 
36
- */
37
-
38
- status?:'archived' | 'deleted' | 'active';
39
-
40
- /**
41
- * @description The default quantity of the addon to be attached when the quantity is not specified while [creating](subscriptions?prod_cat_ver&#x3D;2#create_subscription_for_items)/[updating](subscriptions?prod_cat_ver&#x3D;2#update_subscription_for_items) the subscription.
15
+ status?:'active' | 'archived' | 'deleted';
42
16
 
43
- */
44
-
45
17
  quantity?:number;
46
-
47
- /**
48
- * @description The decimal representation of the quantity of the addon. Returned for quantity-based addons when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled.
49
18
 
50
- */
51
-
52
19
  quantity_in_decimal?:string;
53
-
54
- /**
55
- * @description The number of subscription billing cycles for which this item is attached when applied to a subscription. Applicable only for items of type addon. Requires [addon billing cycles](https://www.chargebee.com/docs/2.0/addons-billingcycle.html) to be enabled for the site.
56
- The value set explicitly for &#x60;billing_cycles&#x60; while [applying the addon to a subscription](./subscriptions?prod_cat_ver&#x3D;2#subscription_subscription_items) takes precedence over this attribute. This attribute, in turn, has a higher precedence than [the value set for the addon-item price](./item_prices?prod_cat_ver&#x3D;2).
57
20
 
58
- */
59
-
60
21
  billing_cycles?:number;
61
-
62
- /**
63
- * @description Indicates when the item is charged. This attribute only applies to charge-items. \* contract_termination - when a contract term is [terminated](./subscriptions?prod_cat_ver&#x3D;2#cancel_subscription_for_items_contract_term_cancel_option). \* subscription_creation - the time of creation of the subscription. \* subscription_trial_start - the time when the trial period of the subscription begins. \* on_demand - Item can be charged on demand \* plan_activation - same as subscription activation, but also includes the case when the plan-item of the subscription is changed. \* subscription_activation - the moment a subscription enters an &#x60;active&#x60; or &#x60;non-renewing&#x60; state. Also includes reactivations of canceled subscriptions.
64
22
 
65
- */
66
-
67
23
  charge_on_event:ChargeOnEvent;
68
-
69
- /**
70
- * @description Indicates if the charge-item is to be charged only once or each time the &#x60;charge_on_event&#x60; occurs. This attribute only applies to charge-items.
71
24
 
72
- */
73
-
74
25
  charge_once:boolean;
75
-
76
- /**
77
- * @description The time at which this attached item was created.
78
26
 
79
- */
80
-
81
27
  created_at:number;
82
-
83
- /**
84
- * @description Version number of this resource. The &#x60;resource_version&#x60; is updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.
85
28
 
86
- */
87
-
88
29
  resource_version?:number;
89
-
90
- /**
91
- * @description The time at which this attached item was last updated.
92
30
 
93
- */
94
-
95
31
  updated_at?:number;
96
-
97
- /**
98
- * @description The subscription channel this object originated from and is maintained in. \* web - The object was created (and is maintained) for the web channel directly in Chargebee via API or UI. \* app_store - The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Apple App Store. Direct manipulation of this object via UI or API is disallowed. \* play_store - The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Google Play Store. Direct manipulation of this object via UI or API is disallowed.
99
32
 
100
- */
101
-
102
33
  channel?:Channel;
103
34
 
104
35
  business_entity_id?:string;
36
+
37
+ deleted:boolean;
38
+
105
39
  }
106
40
  export namespace AttachedItem {
107
41
  export class AttachedItemResource {
108
- /**
109
- * @description Creates an attached addon or a charge item for a plan.
110
-
111
- */
112
-
113
42
  create(item_id:string, input:CreateInputParam):ChargebeeRequest<CreateResponse>;
114
43
 
115
- /**
116
- * @description Updates an attached addon or a charge item for a plan.
117
-
118
- */
119
-
120
44
  update(attached_item_id:string, input:UpdateInputParam):ChargebeeRequest<UpdateResponse>;
121
45
 
122
- /**
123
- * @description Retrieves details of an attached addon or a charge item.
124
-
125
- */
126
-
127
46
  retrieve(attached_item_id:string, input:RetrieveInputParam):ChargebeeRequest<RetrieveResponse>;
128
47
 
129
- /**
130
- * @description Deletes an attached addon or a charge item.
131
-
132
- */
133
-
134
48
  delete(attached_item_id:string, input:DeleteInputParam):ChargebeeRequest<DeleteResponse>;
135
49
 
136
- /**
137
- * @description Returns a list of attached items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
138
-
139
- */
140
-
141
50
  list(item_id:string, input?:ListInputParam):ChargebeeRequest<ListResponse>;
142
51
  }
143
52
  export interface CreateResponse {
@@ -145,57 +54,20 @@ The value set explicitly for &#x60;billing_cycles&#x60; while [applying the addo
145
54
  }
146
55
  export interface CreateInputParam {
147
56
 
148
- /**
149
- * @description The id of the addon or charge that is being attached to the plan-item.
150
-
151
- */
152
-
153
57
  item_id:string;
154
58
 
155
- /**
156
- * @description The type of attachment for the addon. Only applicable for addon-items and is a required parameter as well for addon-items. \* recommended - The addon is recommended to go with the plan-item when using [Checkout](https://www.chargebee.com/docs/2.0/configure-inapp.html#fundamental-settings_recommending-addons-in-checkout) or [Portal](https://www.chargebee.com/docs/2.0/inapp-self-serve-portal.html#allow-change-subscription). \* optional - The addon is neither mandatory, nor recommended. This allows you to attach an addon so you can specify a &#x60;quantity&#x60; and &#x60;billing_cycles&#x60; for the addon, for when it is applied to subscriptions with the plan. \* mandatory - The addon is attached automatically to the subscription for the plan-item unless [explicitly removed](./subscriptions?prod_cat_ver&#x3D;2) via API.
157
-
158
- */
159
-
160
- type?:'optional' | 'mandatory' | 'recommended';
161
-
162
- /**
163
- * @description The number of subscription billing cycles for which this item is attached when applied to a subscription. Applicable only for items of type addon. Requires [addon billing cycles](https://www.chargebee.com/docs/2.0/addons-billingcycle.html) to be enabled for the site.
164
-
165
- The value set explicitly for &#x60;billing_cycles&#x60; while [applying the addon to a subscription](./subscriptions?prod_cat_ver&#x3D;2#subscription_subscription_items) takes precedence over this parameter. This parameter, in turn, has a higher precedence than [the value set for the addon-item price](./item_prices?prod_cat_ver&#x3D;2).
166
-
167
- */
59
+ type?:'recommended' | 'mandatory' | 'optional';
168
60
 
169
61
  billing_cycles?:number;
170
62
 
171
- /**
172
- * @description The default quantity of the addon to be attached when the quantity is not specified while [creating](subscriptions?prod_cat_ver&#x3D;2#create_subscription_for_items)/[updating](subscriptions?prod_cat_ver&#x3D;2#update_subscription_for_items) the subscription.
173
-
174
- */
175
-
176
63
  quantity?:number;
177
64
 
178
- /**
179
- * @description The decimal representation of the quantity of the addon. Returned for quantity-based addons when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled.
180
-
181
- */
182
-
183
65
  quantity_in_decimal?:string;
184
66
 
185
- /**
186
- * @description Indicates when the item is charged. This parameter only applies to charge-items. \* contract_termination - when a contract term is [terminated](./subscriptions?prod_cat_ver&#x3D;2#cancel_subscription_for_items_contract_term_cancel_option). \* subscription_creation - the time of creation of the subscription. \* subscription_trial_start - the time when the trial period of the subscription begins. \* on_demand - Item can be charged on demand \* plan_activation - same as subscription activation, but also includes the case when the plan-item of the subscription is changed. \* subscription_activation - the moment a subscription enters an &#x60;active&#x60; or &#x60;non-renewing&#x60; state. Also includes reactivations of canceled subscriptions.
187
-
188
- */
189
-
190
67
  charge_on_event?:ChargeOnEvent;
191
68
 
192
- /**
193
- * @description Indicates if the charge-item is to be charged only once or each time the &#x60;charge_on_event&#x60; occurs. This parameter only applies to charge-items.
194
-
195
- */
196
-
197
69
  charge_once?:boolean;
198
-
70
+
199
71
  business_entity_id?:string;
200
72
  }
201
73
  export interface UpdateResponse {
@@ -203,55 +75,18 @@ The value set explicitly for &#x60;billing_cycles&#x60; while [applying the addo
203
75
  }
204
76
  export interface UpdateInputParam {
205
77
 
206
- /**
207
- * @description The id of the parent item in the attachment relationship.
208
-
209
- */
210
-
211
78
  parent_item_id:string;
212
79
 
213
- /**
214
- * @description The type of attachment for the addon. Only applicable for addon-items and is a required parameter as well for addon-items. \* recommended - The addon is recommended to go with the plan-item when using [Checkout](https://www.chargebee.com/docs/2.0/configure-inapp.html#fundamental-settings_recommending-addons-in-checkout) or [Portal](https://www.chargebee.com/docs/2.0/inapp-self-serve-portal.html#allow-change-subscription). \* optional - The addon is neither mandatory, nor recommended. This allows you to attach an addon so you can specify a &#x60;quantity&#x60; and &#x60;billing_cycles&#x60; for the addon, for when it is applied to subscriptions with the plan. \* mandatory - The addon is attached automatically to the subscription for the plan-item unless [explicitly removed](./subscriptions?prod_cat_ver&#x3D;2) via API.
215
-
216
- */
217
-
218
- type?:'optional' | 'mandatory' | 'recommended';
219
-
220
- /**
221
- * @description The number of subscription billing cycles for which this item is attached when applied to a subscription. Applicable only for items of type addon. Requires [addon billing cycles](https://www.chargebee.com/docs/2.0/addons-billingcycle.html) to be enabled for the site.
222
-
223
- The value set explicitly for &#x60;billing_cycles&#x60; while [applying the addon to a subscription](./subscriptions?prod_cat_ver&#x3D;2#subscription_subscription_items) takes precedence over this parameter. This parameter, in turn, has a higher precedence than [the value set for the addon-item price](./item_prices?prod_cat_ver&#x3D;2).
224
-
225
- */
80
+ type?:'recommended' | 'mandatory' | 'optional';
226
81
 
227
82
  billing_cycles?:number;
228
83
 
229
- /**
230
- * @description The default quantity of the addon to be attached when the quantity is not specified while [creating](subscriptions?prod_cat_ver&#x3D;2#create_subscription_for_items)/[updating](subscriptions?prod_cat_ver&#x3D;2#update_subscription_for_items) the subscription.
231
-
232
- */
233
-
234
84
  quantity?:number;
235
85
 
236
- /**
237
- * @description The decimal representation of the quantity of the addon. Returned for quantity-based addons when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled.
238
-
239
- */
240
-
241
86
  quantity_in_decimal?:string;
242
87
 
243
- /**
244
- * @description Indicates when the item is charged. This parameter only applies to charge-items. \* contract_termination - when a contract term is [terminated](./subscriptions?prod_cat_ver&#x3D;2#cancel_subscription_for_items_contract_term_cancel_option). \* subscription_creation - the time of creation of the subscription. \* subscription_trial_start - the time when the trial period of the subscription begins. \* on_demand - Item can be charged on demand \* plan_activation - same as subscription activation, but also includes the case when the plan-item of the subscription is changed. \* subscription_activation - the moment a subscription enters an &#x60;active&#x60; or &#x60;non-renewing&#x60; state. Also includes reactivations of canceled subscriptions.
245
-
246
- */
247
-
248
88
  charge_on_event?:ChargeOnEvent;
249
89
 
250
- /**
251
- * @description Indicates if the charge-item is to be charged only once or each time the &#x60;charge_on_event&#x60; occurs. This parameter only applies to charge-items.
252
-
253
- */
254
-
255
90
  charge_once?:boolean;
256
91
  }
257
92
  export interface RetrieveResponse {
@@ -259,11 +94,6 @@ The value set explicitly for &#x60;billing_cycles&#x60; while [applying the addo
259
94
  }
260
95
  export interface RetrieveInputParam {
261
96
 
262
- /**
263
- * @description Retrieves details of an attached addon or a charge item.
264
-
265
- */
266
-
267
97
  parent_item_id:string;
268
98
  }
269
99
  export interface DeleteResponse {
@@ -271,81 +101,66 @@ The value set explicitly for &#x60;billing_cycles&#x60; while [applying the addo
271
101
  }
272
102
  export interface DeleteInputParam {
273
103
 
274
- /**
275
- * @description The id of the addon or charge that is being attached to the plan-item.
276
-
277
- */
278
-
279
104
  parent_item_id:string;
280
105
  }
281
106
  export interface ListResponse {
282
- /**
283
- * @description Returns a list of attached items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
284
-
285
- */
286
-
287
107
  list:{attached_item:AttachedItem}[];
288
108
 
289
- /**
290
- * @description Returns a list of attached items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
291
-
292
- */
293
-
294
109
  next_offset?:string;
295
110
  }
296
111
  export interface ListInputParam {
297
112
  [key : string]: any;
298
113
  /**
299
- * @description Returns a list of attached items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
114
+ * @description The number of resources to be returned.
300
115
 
301
116
  */
302
117
 
303
118
  limit?:number;
304
119
 
305
120
  /**
306
- * @description Returns a list of attached items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
121
+ * @description Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set \&#x60;offset\&#x60; to the value of \&#x60;next_offset\&#x60; obtained in the previous iteration of the API call.
307
122
 
308
123
  */
309
124
 
310
125
  offset?:string;
311
126
 
312
127
  /**
313
- * @description Returns a list of attached items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
128
+ * @description Filter attached items based on their id.
314
129
 
315
130
  */
316
131
 
317
132
  id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
318
133
 
319
134
  /**
320
- * @description Returns a list of attached items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
135
+ * @description Filter attached items based on the &#x60;item_id&#x60; of the item being attached.
321
136
 
322
137
  */
323
138
 
324
139
  item_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
325
140
 
326
141
  /**
327
- * @description Returns a list of attached items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
142
+ * @description Filter attached items based on the &#x60;type&#x60; of attached item. Possible values are : &#x60;recommended&#x60;, &#x60;mandatory&#x60;, &#x60;optional&#x60;.
328
143
 
329
144
  */
330
145
 
331
- type?:{in?:string,is?:'optional' | 'mandatory' | 'recommended',is_not?:'optional' | 'mandatory' | 'recommended',not_in?:string};
146
+ type?:{in?:string,is?:'recommended' | 'mandatory' | 'optional',is_not?:'recommended' | 'mandatory' | 'optional',not_in?:string};
332
147
 
333
148
  /**
334
- * @description Returns a list of attached items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
149
+ * @description To filter based on the type of of the attached item. Possible values are : &#x60;addon&#x60;, &#x60;charge&#x60;.
335
150
 
336
151
  */
337
152
 
338
- item_type?:{in?:string,is?:'charge' | 'addon' | 'plan',is_not?:'charge' | 'addon' | 'plan',not_in?:string};
153
+ item_type?:{in?:string,is?:'plan' | 'addon' | 'charge',is_not?:'plan' | 'addon' | 'charge',not_in?:string};
339
154
 
340
155
  /**
341
- * @description Returns a list of attached items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
156
+ * @description Indicates when the item is charged. This attribute only applies to charge-items.
342
157
 
343
158
  */
344
159
 
345
- charge_on_event?:{in?:string,is?:'subscription_creation' | 'subscription_activation' | 'subscription_trial_start' | 'contract_termination' | 'plan_activation' | 'on_demand',is_not?:'subscription_creation' | 'subscription_activation' | 'subscription_trial_start' | 'contract_termination' | 'plan_activation' | 'on_demand',not_in?:string};
160
+ charge_on_event?:{in?:string,is?:'subscription_creation' | 'subscription_trial_start' | 'plan_activation' | 'subscription_activation' | 'contract_termination' | 'on_demand',is_not?:'subscription_creation' | 'subscription_trial_start' | 'plan_activation' | 'subscription_activation' | 'contract_termination' | 'on_demand',not_in?:string};
346
161
 
347
162
  /**
348
- * @description Returns a list of attached items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
163
+ * @description Filter attached items based on when the attached items were last updated.
349
164
 
350
165
  */
351
166
 
@@ -70,6 +70,8 @@ declare module 'chargebee' {
70
70
 
71
71
  coupon_constraints?:Coupon.CouponConstraint[];
72
72
 
73
+ deleted:boolean;
74
+
73
75
  }
74
76
  export namespace Coupon {
75
77
  export class CouponResource {