Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

chargebee

Package Overview
Dependencies
Maintainers
1
Versions
160
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chargebee - npm Package Compare versions

Comparing version 2.41.1 to 2.42.0

types/resources/PaymentSchedule.d.ts

2

lib/chargebee.js

@@ -14,3 +14,3 @@ var ChargeBee = {};

timeout: 80000,
clientVersion: 'v2.41.1',
clientVersion: 'v2.42.0',
port: 443,

@@ -17,0 +17,0 @@ timemachineWaitInMillis: 3000,

@@ -920,9 +920,16 @@ var _endpoints = {

[
"installments",
"apply_payment_schedule_scheme",
"POST",
"/invoices",
"/installments",
"/apply_payment_schedule_scheme",
true
],
[
"payment_schedules",
"GET",
"/invoices",
"/payment_schedules",
true
],
[
"resend_einvoice",

@@ -943,2 +950,3 @@ "POST",

"payment_reference_number": [],
"payment_schedule": [],
"tax_withheld": [],

@@ -2880,7 +2888,7 @@ "credit_note": [

],
"installment_config": [
"payment_schedule_scheme": [
[
"create",
"POST",
"/installment_configs",
"/payment_schedule_schemes",
null,

@@ -2892,3 +2900,3 @@ false

"GET",
"/installment_configs",
"/payment_schedule_schemes",
null,

@@ -2900,3 +2908,3 @@ true

"POST",
"/installment_configs",
"/payment_schedule_schemes",
"/delete",

@@ -2906,19 +2914,2 @@ true

],
"installment": [
[
"retrieve",
"GET",
"/installments",
null,
true
],
[
"list",
"GET",
"/installments",
null,
false
]
],
"installment_detail": [],
"pricing_page_session": [

@@ -2925,0 +2916,0 @@ [

{
"name":"chargebee",
"version":"2.41.1",
"version":"2.42.0",
"description":"A library for integrating with ChargeBee.",

@@ -5,0 +5,0 @@ "keywords":[

@@ -47,3 +47,3 @@ declare module 'chargebee' {

type EventName = 'cancellation_page_loaded'
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' | 'customer_entitlements_updated' | 'subscription_moved_in' | 'subscription_moved_out' | 'subscription_movement_failed' | 'plan_created' | 'plan_updated' | 'plan_deleted' | 'addon_created' | 'addon_updated' | 'addon_deleted'
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' | 'ramp_created' | 'ramp_deleted' | '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' | 'plan_created' | 'plan_updated' | 'plan_deleted' | 'addon_created' | 'addon_updated' | 'addon_deleted'
type ExportType = 'data' | 'import_friendly_data'

@@ -50,0 +50,0 @@ type FreePeriodUnit = 'day' | 'week' | 'month' | 'year'

@@ -36,5 +36,2 @@ ///<reference path='./resources/Address.d.ts' />

///<reference path='./resources/InAppSubscription.d.ts' />
///<reference path='./resources/Installment.d.ts' />
///<reference path='./resources/InstallmentConfig.d.ts' />
///<reference path='./resources/InstallmentDetail.d.ts' />
///<reference path='./resources/Invoice.d.ts' />

@@ -51,2 +48,4 @@ ///<reference path='./resources/InvoiceEstimate.d.ts' />

///<reference path='./resources/PaymentReferenceNumber.d.ts' />
///<reference path='./resources/PaymentSchedule.d.ts' />
///<reference path='./resources/PaymentScheduleScheme.d.ts' />
///<reference path='./resources/PaymentSource.d.ts' />

@@ -103,4 +102,2 @@ ///<reference path='./resources/PaymentVoucher.d.ts' />

static in_app_subscription: InAppSubscription.InAppSubscriptionResource;
static installment: Installment.InstallmentResource;
static installment_config: InstallmentConfig.InstallmentConfigResource;
static invoice: Invoice.InvoiceResource;

@@ -114,2 +111,3 @@ static item: Item.ItemResource;

static payment_intent: PaymentIntent.PaymentIntentResource;
static payment_schedule_scheme: PaymentScheduleScheme.PaymentScheduleSchemeResource;
static payment_source: PaymentSource.PaymentSourceResource;

@@ -116,0 +114,0 @@ static payment_voucher: PaymentVoucher.PaymentVoucherResource;

///<reference path='./../core.d.ts'/>
///<reference path='./../index.d.ts'/>
declare module 'chargebee' {
export interface Item {
[key : string] : any;
/**
* @description The identifier for the item. It is unique and immutable.
*/
id:string;
/**
* @description A unique display name for the item. This is visible only in Chargebee and not to customers.
*/
name:string;
/**
* @description A unique display name for the item.
*/
external_name?:string;
/**
* @description Description of the item. This is visible only in Chargebee and not to customers.
*/
description?:string;
/**
* @description The status of the item. \* archived - The item is no longer active and no new item prices can be created \* active - The item can be used to create new item prices. \* deleted - Indicates that the item has been [deleted](./items?prod_cat_ver&#x3D;2#delete_an_item). The &#x60;id&#x60; and &#x60;name&#x60; can be reused. Deleted items can be retrieved using [List items](./items?prod_cat_ver&#x3D;2#list_items).
*/
status?:'archived' | 'deleted' | 'active';
/**
* @description The version number of this resource. For every change made to the resource, &#x60;resource_version&#x60; is updated with a new timestamp in milliseconds.
status?:'active' | 'archived' | 'deleted';
*/
resource_version?:number;
/**
* @description Timestamp indicating when the item was last updated.
*/
updated_at?:number;
/**
* @description The &#x60;id&#x60; of the [Item family](./item_families?prod_cat_ver&#x3D;2) that the item belongs to. Is mandatory when [Product Families](https://www.chargebee.com/docs/2.0/product-families.html) have been enabled.
*/
item_family_id?:string;
/**
* @description The type of the item. \* plan - An essential component of a subscription. Every subscription has exactly one plan. It has a recurring charge and its period defines the billing period of the subscription. \* charge - A non-recurring component that can be added to a subscription in addition to its plan. An charge can also be applied to a customer [directly](./invoices?prod_cat_ver&#x3D;2#create_invoice_for_a_charge-item) without being applied to a subscription. \* addon - A recurring component that can be added to a subscription in addition to its plan.
*/
type:'charge' | 'addon' | 'plan';
/**
* @description Indicates that the item is a physical product. If Orders are enabled in Chargebee, subscriptions created for this item will have orders associated with them.
type:'plan' | 'addon' | 'charge';
*/
is_shippable?:boolean;
/**
* @description Specifies if gift subscriptions can be created for this item.
*/
is_giftable:boolean;
/**
* @description If &#x60;enabled_for_checkout&#x60;, then the URL to be redirected to once the checkout is complete. This attribute is only available for plan-items.
*/
redirect_url?:string;
/**
* @description Allow the plan to subscribed to via Checkout. Applies only for plan-items.
**Note:** Only the in-app version of Checkout is supported for Product Catalog v2.
*/
enabled_for_checkout:boolean;
/**
* @description Allow customers to change their subscription to this plan via the [Self-Serve Portal](https://www.chargebee.com/docs/2.0/inapp-self-serve-portal.html). Applies only for plan-items. This requires the Portal configuration to [allow changing subscriptions](https://www.chargebee.com/docs/2.0/inapp-self-serve-portal.html#allow-change-subscription).
*/
enabled_in_portal:boolean;
/**
* @description The item is included in MRR calculations for your site. This attribute is only applicable for items of &#x60;type &#x3D; charge&#x60; and when the feature is enabled in Chargebee. Note: If the site-level setting is to exclude charge-items from MRR calculations, this value is always returned &#x60;false&#x60;.
*/
included_in_mrr?:boolean;
/**
* @description Indicates which addon-items and charge-items can be applied to the item. Only meant for plan-items. Other details of attaching items such as whether to attach as a mandatory item or to attach on a certain event, can be specified using the [Create](./attached_items?prod_cat_ver&#x3D;2#create_an_attached_item) or [Update an attached item](./attached_items?prod_cat_ver&#x3D;2#update_an_attached_item) API. \* all - all addon-items and charge-items are applicable to this plan-item. \* restricted - only the addon-items or charge-items provided in &#x60;applicable_items&#x60; can be applied to this plan-item.
*/
item_applicability:'all' | 'restricted';
/**
* @description The URL to redirect to once the gift has been claimed by the receiver.
*/
gift_claim_redirect_url?:string;
/**
* @description The unit of measure for a quantity-based item. This is displayed on the Chargebee UI and on customer facing documents/pages. The latter includes [hosted pages](./hosted_pages?prod_cat_ver&#x3D;2), [invoices](./invoices?prod_cat_ver&#x3D;2) and [quotes](./quotes?prod_cat_ver&#x3D;2#). Examples follow:
* &quot;user&quot; for a cloud-collaboration platform.
* &quot;GB&quot; for a data service.
* &quot;issue&quot; for a magazine.
**Note:** &#x60;unit&#x60; is only exposed via the API to quantity-based addons; it is however NOT exposed to quantity-based plans.
*/
unit?:string;
/**
* @description Specifies whether the item undergoes metered billing. When &#x60;true&#x60;, the quantity is calculated from [usage records](/docs/api/usages?prod_cat_ver&#x3D;2). When &#x60;false&#x60;, the &#x60;quantity&#x60; is as determined while adding an item price to the subscription. Applicable only for items of &#x60;type&#x60; &#x60;plan&#x60; or &#x60;addon&#x60; and when [Metered Billing](https://www.chargebee.com/docs/2.0/metered_billing.html) is enabled. The value of this attribute cannot be changed.
*/
metered:boolean;
/**
* @description How the quantity is calculated from usage data for the item prices belonging to this item. Only applicable when the item is &#x60;metered&#x60;. This value overrides the one [set at the site level](https://www.chargebee.com/docs/2.0/metered_billing.html#configuring-metered-billing). \* sum_of_usages - the net quantity is the sum of the &#x60;quantity&#x60; of all usages for the current term. \* last_usage - from among the usage records for the [item price](/docs/api/subscriptions?prod_cat_ver&#x3D;2#subscription_subscription_items_item_price_id) with &#x60;usage_date&#x60; within the relevant billing period, the &#x60;quantity&#x60; of the usage record with the most recent &#x60;usage_date&#x60; is taken as the net quantity consumed. \* max_usage - from among the usage records for the [item price](/docs/api/subscriptions?prod_cat_ver&#x3D;2#subscription_subscription_items_item_price_id) with &#x60;usage_date&#x60; within the relevant billing period, the &#x60;quantity&#x60; of the usage record with the maximum value is taken as the net quantity consumed.
*/
usage_calculation?:'max_usage' | 'sum_of_usages' | 'last_usage';
/**
* @description Timestamp indicating when this item was archived.
usage_calculation?:'sum_of_usages' | 'last_usage' | 'max_usage';
*/
archived_at?:number;
/**
* @description The subscription channel this object originated from and is maintained in. \* 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. \* web - The object was created (and is maintained) for the web channel directly in Chargebee via API or UI. \* 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.
In-App Subscriptions is currently in early access. Contact [eap@chargebee.com](mailto:eap@chargebee.com) for more information.
*/
channel?:Channel;
/**
* @description A collection of key-value pairs that provides extra information about the item. [Learn more](advanced-features#metadata).
*/
applicable_items?:Item.ApplicableItem[];
bundle_items?:Item.BundleItem[];
bundle_configuration?:Item.BundleConfiguration;
metadata?:object;
/**
* @description The list of addons and charges that are allowed to be applied to the plan. This attribute is applicable only for plan-items and that too when &#x60;item_applicability&#x60; is &#x60;restricted&#x60;.
Other details of attaching items can be specified using the [Create](./attached_items?prod_cat_ver&#x3D;2#create_an_attached_item) or [Update an attached item](./attached_items?prod_cat_ver&#x3D;2#update_an_attached_item) API.
*/
applicable_items?:Item.ApplicableItem[];
}
export namespace Item {
export class ItemResource {
/**
* @description Creates a new item.
*/
create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
/**
* @description Retrieve an item resource.
*/
retrieve(item_id:string):ChargebeeRequest<RetrieveResponse>;
/**
* @description Updates an item with the changes specified. Unspecified item parameters are not modified.
*/
update(item_id:string, input?:UpdateInputParam):ChargebeeRequest<UpdateResponse>;
/**
* @description Returns a list of items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
*/
list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
/**
* @description Deletes an item, marking its &#x60;status&#x60; as deleted. This is not allowed if there are &#x60;active&#x60; or &#x60;archived&#x60; item prices under the item. Once deleted, the id and name of the item can be reused.
*/
delete(item_id:string):ChargebeeRequest<DeleteResponse>;

@@ -226,142 +77,42 @@ }

[key : string] : any;
/**
* @description The identifier for the item. Must be unique and is immutable once set.
*/
bundle_configuration?:{type?:'fixed'};
bundle_items_to_add?:{item_id?:string,item_type?:ItemType,price_allocation?:number,quantity?:number}[];
id:string;
/**
* @description A unique display name for the item. Must be unique. This is visible only in Chargebee and not to customers.
*/
name:string;
/**
* @description The type of the item. \* plan - An essential component of a subscription. Every subscription has exactly one plan. It has a recurring charge and its period defines the billing period of the subscription. \* charge - A non-recurring component that can be added to a subscription in addition to its plan. An charge can also be applied to a customer [directly](./invoices?prod_cat_ver&#x3D;2#create_invoice_for_a_charge-item) without being applied to a subscription. \* addon - A recurring component that can be added to a subscription in addition to its plan.
*/
type:'plan' | 'addon' | 'charge';
type:'charge' | 'addon' | 'plan';
/**
* @description Description of the item. This is visible only in Chargebee and not to customers.
*/
description?:string;
/**
* @description The &#x60;id&#x60; of the [Item family](./item_families?prod_cat_ver&#x3D;2) that the item belongs to. Is mandatory when [Product Families](https://www.chargebee.com/docs/2.0/product-families.html) have been enabled.
*/
item_family_id:string;
/**
* @description Specifies if gift subscriptions can be created for this item.
*/
is_giftable?:boolean;
/**
* @description Indicates that the item is a physical product. If Orders are enabled in Chargebee, subscriptions created for this item will have orders associated with them.
*/
is_shippable?:boolean;
/**
* @description A unique display name for the item.
*/
external_name?:string;
/**
* @description Allow customers to change their subscription to this plan via the [Self-Serve Portal](https://www.chargebee.com/docs/2.0/inapp-self-serve-portal.html). Applies only for plan-items. This requires the Portal configuration to [allow changing subscriptions](https://www.chargebee.com/docs/2.0/inapp-self-serve-portal.html#allow-change-subscription). Only the in-app version of the Portal is supported for Product Catalog v2.
*/
enabled_in_portal?:boolean;
/**
* @description If &#x60;enabled_for_checkout&#x60;, then the URL to be redirected to once the checkout is complete. This attribute is only available for plan-items.
*/
redirect_url?:string;
/**
* @description Allow the plan to subscribed to via Checkout. Applies only for plan-items.
**Note:** Only the in-app version of Checkout is supported for Product Catalog v2.
*/
enabled_for_checkout?:boolean;
/**
* @description Indicates which addon-items and charge-items can be applied to the item. Only possible for plan-items. Other details of attaching items such as whether to attach as a mandatory item or to attach on a certain event, can be specified using the [Create](./attached_items?prod_cat_ver&#x3D;2#create_an_attached_item) or [Update an attached item](./attached_items?prod_cat_ver&#x3D;2#update_an_attached_item) API. \* all - all addon-items and charge-items are applicable to this plan-item. \* restricted - only the addon-items or charge-items provided in &#x60;applicable_items&#x60; can be applied to this plan-item.
*/
item_applicability?:'all' | 'restricted';
/**
* @description The list of ids of addon-items and charge-items that can be applied to the plan-item. This parameter can be provided only for plan-items and that too when item_applicability is restricted. Other details of attaching items can be specified using the [Create](./attached_items?prod_cat_ver&#x3D;2#create_an_attached_item) or [Update an attached item](./attached_items?prod_cat_ver&#x3D;2#update_an_attached_item) API.
*/
applicable_items?:string[];
/**
* @description The unit of measure for a quantity-based item. This is displayed on the Chargebee UI and on customer facing documents/pages. The latter includes [hosted pages](./hosted_pages?prod_cat_ver&#x3D;2), [invoices](./invoices?prod_cat_ver&#x3D;2) and [quotes](./quotes?prod_cat_ver&#x3D;2#). Examples follow:
* &quot;user&quot; for a cloud-collaboration platform.
* &quot;GB&quot; for a data service.
* &quot;issue&quot; for a magazine.
**Note:** &#x60;unit&#x60; is only exposed via the API to quantity-based addons; it is however NOT exposed to quantity-based plans. .
*/
unit?:string;
/**
* @description The URL to redirect to once the gift has been claimed by the receiver.
*/
gift_claim_redirect_url?:string;
/**
* @description The item is included in MRR calculations for your site. This attribute is only applicable for items of &#x60;type &#x3D; charge&#x60; and when the feature is enabled in Chargebee. Note: If the site-level setting is to exclude charge-items from MRR calculations, this value is always returned &#x60;false&#x60;.
*/
included_in_mrr?:boolean;
/**
* @description Specifies whether the item undergoes metered billing. When &#x60;true&#x60;, the quantity is calculated from [usage records](/docs/api/usages?prod_cat_ver&#x3D;2). When &#x60;false&#x60;, the &#x60;quantity&#x60; is as determined while adding an item price to the subscription. Applicable only for items of &#x60;type&#x60; &#x60;plan&#x60; or &#x60;addon&#x60; and when [Metered Billing](https://www.chargebee.com/docs/2.0/metered_billing.html) is enabled. The value of this attribute cannot be changed.
*/
metered?:boolean;
/**
* @description How the quantity is calculated from usage data for the item prices belonging to this item. Only applicable when the item is &#x60;metered&#x60;. This value overrides the one [set at the site level](https://www.chargebee.com/docs/2.0/metered_billing.html#configuring-metered-billing). . \* sum_of_usages - the net quantity is the sum of the &#x60;quantity&#x60; of all usages for the current term. \* last_usage - from among the usage records for the [item price](/docs/api/subscriptions?prod_cat_ver&#x3D;2#subscription_subscription_items_item_price_id) with &#x60;usage_date&#x60; within the relevant billing period, the &#x60;quantity&#x60; of the usage record with the most recent &#x60;usage_date&#x60; is taken as the net quantity consumed. \* max_usage - from among the usage records for the [item price](/docs/api/subscriptions?prod_cat_ver&#x3D;2#subscription_subscription_items_item_price_id) with &#x60;usage_date&#x60; within the relevant billing period, the &#x60;quantity&#x60; of the usage record with the maximum value is taken as the net quantity consumed.
*/
usage_calculation?:'sum_of_usages' | 'last_usage' | 'max_usage';
usage_calculation?:'max_usage' | 'sum_of_usages' | 'last_usage';
/**
* @description A collection of key-value pairs that provides extra information about the item.
**Note:** There&#x27;s a character limit of 65,535.
[Learn more](advanced-features#metadata).
*/
metadata?:object;

@@ -378,127 +129,45 @@ }

[key : string] : any;
/**
* @description The display name for the item. Must be unique. This is visible only in Chargebee and not to customers.
*/
bundle_configuration?:{type?:'fixed'};
bundle_items_to_add?:{item_id?:string,item_type?:ItemType,price_allocation?:number,quantity?:number}[];
bundle_items_to_update?:{item_id?:string,item_type?:ItemType,price_allocation?:number,quantity?:number}[];
bundle_items_to_remove?:{item_id?:string,item_type?:ItemType}[];
name?:string;
/**
* @description Description of the item. This is visible only in Chargebee and not to customers.
*/
description?:string;
/**
* @description Indicates that the item is a physical product. If Orders are enabled in Chargebee, subscriptions created for this item will have orders associated with them.
*/
is_shippable?:boolean;
/**
* @description A unique display name for the item.
*/
external_name?:string;
/**
* @description The &#x60;id&#x60; of the [Item family](./item_families?prod_cat_ver&#x3D;2) that the item belongs to. Is mandatory when [Product Families](https://www.chargebee.com/docs/2.0/product-families.html) have been enabled.
*/
item_family_id?:string;
/**
* @description Allow customers to change their subscription to this plan via the [Self-Serve Portal](https://www.chargebee.com/docs/2.0/inapp-self-serve-portal.html). Applies only for plan-items. This requires the Portal configuration to [allow changing subscriptions](https://www.chargebee.com/docs/2.0/inapp-self-serve-portal.html#allow-change-subscription).
*/
enabled_in_portal?:boolean;
/**
* @description If &#x60;enabled_for_checkout&#x60;, then the URL to be redirected to once the checkout is complete. This parameter is only meant for plan-items.
*/
redirect_url?:string;
/**
* @description Allow the plan to subscribed to via Checkout. Applies only for plan-items.
**Note:** Only the in-app version of Checkout is supported for Product Catalog v2.
*/
enabled_for_checkout?:boolean;
/**
* @description Indicates which addon-items and charge-items can be applied to the item. Only possible for plan-items. Other details of attaching items such as whether to attach as a mandatory item or to attach on a certain event, can be specified using the [Create](./attached_items?prod_cat_ver&#x3D;2#create_an_attached_item) or [Update an attached item](./attached_items?prod_cat_ver&#x3D;2#update_an_attached_item) API. \* all - all addon-items and charge-items are applicable to this plan-item. \* restricted - only the addon-items or charge-items provided in &#x60;applicable_items&#x60; can be applied to this plan-item.
*/
item_applicability?:'all' | 'restricted';
/**
* @description The list of ids of addon-items and charge-items that can be applied to the plan-item. This parameter can be provided only for plan-items and that too when item_applicability is restricted. Other details of attaching items can be specified using the [Create](./attached_items?prod_cat_ver&#x3D;2#create_an_attached_item) or [Update an attached item](./attached_items?prod_cat_ver&#x3D;2#update_an_attached_item) API.
*/
clear_applicable_items?:boolean;
applicable_items?:string[];
/**
* @description The unit of measure for a quantity-based item. This is displayed on the Chargebee UI and on customer facing documents/pages. The latter includes [hosted pages](./hosted_pages?prod_cat_ver&#x3D;2), [invoices](./invoices?prod_cat_ver&#x3D;2) and [quotes](./quotes?prod_cat_ver&#x3D;2#). Examples follow:
* &quot;user&quot; for a cloud-collaboration platform.
* &quot;GB&quot; for a data service.
* &quot;issue&quot; for a magazine.
**Note:** &#x60;unit&#x60; is only exposed via the API to quantity-based addons; it is however NOT exposed to quantity-based plans. .
*/
unit?:string;
/**
* @description The URL to redirect to once the gift has been claimed by the receiver.
*/
gift_claim_redirect_url?:string;
/**
* @description A collection of key-value pairs that provides extra information about the item. [Learn more](advanced-features#metadata).
*/
metadata?:object;
/**
* @description The item is included in MRR calculations for your site. This attribute is only applicable for items of &#x60;type &#x3D; charge&#x60; and when the feature is enabled in Chargebee. Note: If the site-level setting is to exclude charge-items from MRR calculations, this value is always returned &#x60;false&#x60;.
*/
included_in_mrr?:boolean;
/**
* @description The status of the item. \* active - The item can be used to create new item prices. \* deleted - Indicates that the item has been [deleted](./items?prod_cat_ver&#x3D;2#delete_an_item). The &#x60;id&#x60; and &#x60;name&#x60; can be reused. Deleted items can be retrieved using [List items](./items?prod_cat_ver&#x3D;2#list_items). \* archived - The item is no longer active and no new item prices can be created
*/
status?:'archived' | 'active';
status?:'active' | 'archived';
}
export interface ListResponse {
/**
* @description Returns a list of items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
*/
list:{item:Item}[];
/**
* @description Returns a list of items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
*/
next_offset?:string;

@@ -509,3 +178,3 @@ }

/**
* @description Returns a list of items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
* @description The number of resources to be returned.

@@ -517,3 +186,3 @@ */

/**
* @description Returns a list of items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
* @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.

@@ -525,10 +194,17 @@ */

/**
* @description Returns a list of items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
* @description Parameters for bundle_configuration
*/
bundle_configuration?:{type?:{in?:string,is?:'fixed',is_not?:'fixed',not_in?:string}};
/**
* @description Filter items based on item id.
*/
id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
/**
* @description Returns a list of items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
* @description Filter items based on &#x60;item_family_id&#x60;.

@@ -540,10 +216,10 @@ */

/**
* @description Returns a list of items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
* @description Filter items based on item &#x60;type&#x60;.
*/
type?:{in?:string,is?:'charge' | 'addon' | 'plan',is_not?:'charge' | 'addon' | 'plan',not_in?:string};
type?:{in?:string,is?:'plan' | 'addon' | 'charge',is_not?:'plan' | 'addon' | 'charge',not_in?:string};
/**
* @description Returns a list of items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
* @description Filter items based on item &#x60;name&#x60;.

@@ -555,3 +231,3 @@ */

/**
* @description Returns a list of items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
* @description Filter items based on &#x60;item_applicability&#x60;.

@@ -563,10 +239,10 @@ */

/**
* @description Returns a list of items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
* @description Filter items based on item &#x60;status&#x60;.
*/
status?:{in?:string,is?:'archived' | 'deleted' | 'active',is_not?:'archived' | 'deleted' | 'active',not_in?:string};
status?:{in?:string,is?:'active' | 'archived' | 'deleted',is_not?:'active' | 'archived' | 'deleted',not_in?:string};
/**
* @description Returns a list of items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
* @description Specifies if gift subscriptions can be created for this item.

@@ -578,3 +254,3 @@ */

/**
* @description Returns a list of items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
* @description Filter items based on when the items were last updated.

@@ -586,3 +262,4 @@ */

/**
* @description Returns a list of items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
* @description Allow the plan to subscribed to via Checkout. Applies only for plan-items.
**Note:** Only the in-app version of Checkout is supported for Product Catalog v2.

@@ -594,3 +271,3 @@ */

/**
* @description Returns a list of items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
* @description Allow customers to change their subscription to this plan via the [Self-Serve Portal](https://www.chargebee.com/docs/2.0/inapp-self-serve-portal.html). Applies only for plan-items. This requires the Portal configuration to [allow changing subscriptions](https://www.chargebee.com/docs/2.0/inapp-self-serve-portal.html#allow-change-subscription).

@@ -602,3 +279,3 @@ */

/**
* @description Returns a list of items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
* @description Specifies whether the item undergoes metered billing. When &#x60;true&#x60;, the quantity is calculated from [usage records](/docs/api/usages?prod_cat_ver&#x3D;2). When &#x60;false&#x60;, the &#x60;quantity&#x60; is as determined while adding an item price to the subscription. Applicable only for items of &#x60;type&#x60; &#x60;plan&#x60; or &#x60;addon&#x60; and when [Metered Billing](https://www.chargebee.com/docs/2.0/metered_billing.html) is enabled. The value of this attribute cannot be changed.

@@ -610,21 +287,23 @@ */

/**
* @description Returns a list of items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
* @description How the quantity is calculated from usage data for the item prices belonging to this item. Only applicable when the item is &#x60;metered&#x60;. This value overrides the one [set at the site level](https://www.chargebee.com/docs/2.0/metered_billing.html#configuring-metered-billing).
*/
usage_calculation?:{in?:string,is?:'max_usage' | 'sum_of_usages' | 'last_usage',is_not?:'max_usage' | 'sum_of_usages' | 'last_usage',not_in?:string};
usage_calculation?:{in?:string,is?:'sum_of_usages' | 'last_usage' | 'max_usage',is_not?:'sum_of_usages' | 'last_usage' | 'max_usage',not_in?:string};
/**
* @description Returns a list of items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
* @description Indicates Whether a plan is grouped(bundle) or not. If it is grouped, it gives us the type of group.
*/
channel?:{in?:string,is?:'app_store' | 'web' | 'play_store',is_not?:'app_store' | 'web' | 'play_store',not_in?:string};
item_grouping_category?:{in?:string,is?:'non_bundle' | 'fixed',is_not?:'non_bundle' | 'fixed',not_in?:string};
/**
* @description Returns a list of items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
* @description The subscription channel this object originated from and is maintained in.
*/
sort_by?:{asc?:'updated_at' | 'name' | 'id',desc?:'updated_at' | 'name' | 'id'};
channel?:{in?:string,is?:'web' | 'app_store' | 'play_store',is_not?:'web' | 'app_store' | 'play_store',not_in?:string};
sort_by?:{asc?:'name' | 'id' | 'updated_at',desc?:'name' | 'id' | 'updated_at'};
}

@@ -636,10 +315,17 @@ export interface DeleteResponse {

export interface ApplicableItem {
/**
* @description Id of the addon-item or plan-item that can be applied to the plan-item.
*/
id?:string;
}
export interface BundleItem {
item_id:string;
item_type?:'plan' | 'addon' | 'charge';
quantity?:number;
price_allocation?:number;
}
export interface BundleConfiguration {
type?:'fixed';
}
}
}
///<reference path='./../core.d.ts'/>
///<reference path='./../index.d.ts'/>
declare module 'chargebee' {

@@ -148,9 +149,2 @@ export interface Purchase {

/**
* @description Parameters for installment_info
*/
installment_info?:{amount?:number,config_id?:string};
/**
* @description Parameters for purchase_items

@@ -255,2 +249,3 @@

statement_descriptor?:{descriptor?:string};
payment_schedule?:{amount?:number,scheme_id?:string};
}

@@ -257,0 +252,0 @@ export interface EstimateResponse {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc