chargebee-typescript
Version:
A library in typescript for integrating with Chargebee.
178 lines (177 loc) • 5.79 kB
TypeScript
import { ListResult } from '../list_result';
import { RequestWrapper } from "../request_wrapper";
import { Model } from "./model";
import { filter } from "../filter";
export declare class Item extends Model {
id: string;
name: string;
external_name?: string;
description?: string;
status?: string;
resource_version?: number;
updated_at?: number;
item_family_id?: string;
type: string;
is_shippable?: boolean;
is_giftable: boolean;
redirect_url?: string;
enabled_for_checkout: boolean;
enabled_in_portal: boolean;
included_in_mrr?: boolean;
item_applicability?: string;
gift_claim_redirect_url?: string;
unit?: string;
metered: boolean;
usage_calculation?: string;
is_percentage_pricing?: boolean;
archived_at?: number;
channel?: string;
applicable_items?: Array<ApplicableItem>;
bundle_items?: Array<BundleItem>;
bundle_configuration?: BundleConfiguration;
metadata?: any;
deleted: boolean;
business_entity_id?: string;
static create(params?: _item.create_params): RequestWrapper;
static retrieve(item_id: string, params?: any): RequestWrapper;
static update(item_id: string, params?: _item.update_params): RequestWrapper;
static list(params?: _item.item_list_params): RequestWrapper<ListResult>;
static delete(item_id: string, params?: any): RequestWrapper;
}
export declare class ApplicableItem extends Model {
id?: string;
}
export declare class BundleItem extends Model {
item_id: string;
item_type?: string;
quantity?: number;
price_allocation?: number;
}
export declare class BundleConfiguration extends Model {
type?: string;
}
export declare namespace _item {
interface create_params {
id: string;
name: string;
type: string;
description?: string;
item_family_id: string;
is_giftable?: boolean;
is_shippable?: boolean;
external_name?: string;
enabled_in_portal?: boolean;
redirect_url?: string;
enabled_for_checkout?: boolean;
item_applicability?: string;
applicable_items?: Array<string>;
unit?: string;
gift_claim_redirect_url?: string;
included_in_mrr?: boolean;
metered?: boolean;
usage_calculation?: string;
metadata?: any;
business_entity_id?: string;
is_percentage_pricing?: boolean;
bundle_configuration?: bundle_configuration_create_params;
bundle_items_to_add?: Array<bundle_items_to_add_create_params>;
}
interface update_params {
name?: string;
description?: string;
is_shippable?: boolean;
external_name?: string;
item_family_id?: string;
enabled_in_portal?: boolean;
redirect_url?: string;
enabled_for_checkout?: boolean;
item_applicability?: string;
/**
* @deprecated Please refer API docs to use other attributes
*/
clear_applicable_items?: boolean;
applicable_items?: Array<string>;
unit?: string;
gift_claim_redirect_url?: string;
metadata?: any;
included_in_mrr?: boolean;
status?: string;
bundle_configuration?: bundle_configuration_update_params;
bundle_items_to_add?: Array<bundle_items_to_add_update_params>;
bundle_items_to_update?: Array<bundle_items_to_update_update_params>;
bundle_items_to_remove?: Array<bundle_items_to_remove_update_params>;
}
interface item_list_params {
limit?: number;
offset?: string;
bundle_configuration?: bundle_configuration_item_list_params;
id?: filter._string;
item_family_id?: filter._string;
type?: filter._enum;
name?: filter._string;
item_applicability?: filter._enum;
status?: filter._enum;
is_giftable?: filter._boolean;
updated_at?: filter._timestamp;
enabled_for_checkout?: filter._boolean;
enabled_in_portal?: filter._boolean;
metered?: filter._boolean;
usage_calculation?: filter._enum;
channel?: filter._enum;
business_entity_id?: filter._string;
include_site_level_resources?: filter._boolean;
"sort_by[asc]"?: string;
"sort_by[desc]"?: string;
}
interface bundle_configuration_create_params {
type?: string;
}
interface bundle_items_to_add_create_params {
item_id?: string;
}
interface bundle_items_to_add_create_params {
item_type?: string;
}
interface bundle_items_to_add_create_params {
quantity?: number;
}
interface bundle_items_to_add_create_params {
price_allocation?: number;
}
interface bundle_configuration_update_params {
type?: string;
}
interface bundle_items_to_add_update_params {
item_id?: string;
}
interface bundle_items_to_add_update_params {
item_type?: string;
}
interface bundle_items_to_add_update_params {
quantity?: number;
}
interface bundle_items_to_add_update_params {
price_allocation?: number;
}
interface bundle_items_to_update_update_params {
item_id?: string;
}
interface bundle_items_to_update_update_params {
item_type?: string;
}
interface bundle_items_to_update_update_params {
quantity?: number;
}
interface bundle_items_to_update_update_params {
price_allocation?: number;
}
interface bundle_items_to_remove_update_params {
item_id?: string;
}
interface bundle_items_to_remove_update_params {
item_type?: string;
}
interface bundle_configuration_item_list_params {
type?: filter._enum;
}
}