UNPKG

chargebee-typescript

Version:

A library in typescript for integrating with Chargebee.

369 lines (368 loc) 11.5 kB
import { ListResult } from '../list_result'; import { RequestWrapper } from "../request_wrapper"; import { Model } from "./model"; import { filter } from "../filter"; export declare class Plan extends Model { id: string; name: string; invoice_name?: string; description?: string; price?: number; currency_code: string; period: number; period_unit: string; trial_period?: number; trial_period_unit?: string; trial_end_action?: string; pricing_model: string; charge_model: string; free_quantity: number; setup_cost?: number; downgrade_penalty?: number; status: string; archived_at?: number; billing_cycles?: number; redirect_url?: string; enabled_in_hosted_pages: boolean; enabled_in_portal: boolean; addon_applicability: string; tax_code?: string; hsn_code?: string; taxjar_product_code?: string; avalara_sale_type?: string; avalara_transaction_type?: number; avalara_service_type?: number; sku?: string; accounting_code?: string; accounting_category1?: string; accounting_category2?: string; accounting_category3?: string; accounting_category4?: string; is_shippable?: boolean; shipping_frequency_period?: number; shipping_frequency_period_unit?: string; resource_version?: number; updated_at?: number; giftable: boolean; claim_url?: string; free_quantity_in_decimal?: string; price_in_decimal?: string; channel?: string; invoice_notes?: string; taxable?: boolean; tax_profile_id?: string; meta_data?: any; tiers?: Array<Tier>; tax_providers_fields?: Array<TaxProvidersField>; applicable_addons?: Array<ApplicableAddon>; attached_addons?: Array<AttachedAddon>; event_based_addons?: Array<EventBasedAddon>; show_description_in_invoices?: boolean; show_description_in_quotes?: boolean; static create(params?: _plan.create_params): RequestWrapper; static update(plan_id: string, params?: _plan.update_params): RequestWrapper; static list(params?: _plan.plan_list_params): RequestWrapper<ListResult>; static retrieve(plan_id: string, params?: any): RequestWrapper; static delete(plan_id: string, params?: any): RequestWrapper; static copy(params?: _plan.copy_params): RequestWrapper; static unarchive(plan_id: string, params?: any): RequestWrapper; } export declare class Tier extends Model { starting_unit: number; ending_unit?: number; price: number; starting_unit_in_decimal?: string; ending_unit_in_decimal?: string; price_in_decimal?: string; pricing_type?: string; package_size?: number; } export declare class TaxProvidersField extends Model { provider_name: string; field_id: string; field_value: string; } export declare class ApplicableAddon extends Model { id: string; } export declare class AttachedAddon extends Model { id: string; quantity: number; billing_cycles?: number; type: string; quantity_in_decimal?: string; } export declare class EventBasedAddon extends Model { id: string; quantity: number; on_event: string; charge_once: boolean; quantity_in_decimal?: string; } export declare namespace _plan { interface create_params { id: string; name: string; invoice_name?: string; description?: string; trial_period?: number; trial_period_unit?: string; trial_end_action?: string; period?: number; period_unit?: string; setup_cost?: number; price?: number; price_in_decimal?: string; currency_code?: string; billing_cycles?: number; pricing_model?: string; /** * @deprecated Please refer API docs to use other attributes */ charge_model?: string; free_quantity?: number; free_quantity_in_decimal?: string; addon_applicability?: string; /** * @deprecated Please refer API docs to use other attributes */ downgrade_penalty?: number; redirect_url?: string; enabled_in_hosted_pages?: boolean; enabled_in_portal?: boolean; taxable?: boolean; tax_profile_id?: string; tax_code?: string; hsn_code?: string; taxjar_product_code?: string; avalara_sale_type?: string; avalara_transaction_type?: number; avalara_service_type?: number; sku?: string; accounting_code?: string; accounting_category1?: string; accounting_category2?: string; accounting_category3?: string; accounting_category4?: string; is_shippable?: boolean; shipping_frequency_period?: number; shipping_frequency_period_unit?: string; invoice_notes?: string; meta_data?: any; show_description_in_invoices?: boolean; show_description_in_quotes?: boolean; giftable?: boolean; status?: string; claim_url?: string; tiers?: Array<tiers_create_params>; tax_providers_fields?: Array<tax_providers_fields_create_params>; applicable_addons?: Array<applicable_addons_create_params>; event_based_addons?: Array<event_based_addons_create_params>; attached_addons?: Array<attached_addons_create_params>; } interface update_params { name?: string; invoice_name?: string; description?: string; trial_period?: number; trial_period_unit?: string; trial_end_action?: string; period?: number; period_unit?: string; setup_cost?: number; price?: number; price_in_decimal?: string; currency_code?: string; billing_cycles?: number; pricing_model?: string; /** * @deprecated Please refer API docs to use other attributes */ charge_model?: string; free_quantity?: number; free_quantity_in_decimal?: string; addon_applicability?: string; /** * @deprecated Please refer API docs to use other attributes */ downgrade_penalty?: number; redirect_url?: string; enabled_in_hosted_pages?: boolean; enabled_in_portal?: boolean; taxable?: boolean; tax_profile_id?: string; tax_code?: string; hsn_code?: string; taxjar_product_code?: string; avalara_sale_type?: string; avalara_transaction_type?: number; avalara_service_type?: number; sku?: string; accounting_code?: string; accounting_category1?: string; accounting_category2?: string; accounting_category3?: string; accounting_category4?: string; is_shippable?: boolean; shipping_frequency_period?: number; shipping_frequency_period_unit?: string; invoice_notes?: string; meta_data?: any; show_description_in_invoices?: boolean; show_description_in_quotes?: boolean; tiers?: Array<tiers_update_params>; tax_providers_fields?: Array<tax_providers_fields_update_params>; applicable_addons?: Array<applicable_addons_update_params>; attached_addons?: Array<attached_addons_update_params>; event_based_addons?: Array<event_based_addons_update_params>; } interface plan_list_params { limit?: number; offset?: string; id?: filter._string; name?: filter._string; price?: filter._number; period?: filter._number; period_unit?: filter._enum; trial_period?: filter._number; trial_period_unit?: filter._enum; addon_applicability?: filter._enum; giftable?: filter._boolean; /** * @deprecated Please refer API docs to use other attributes */ charge_model?: filter._enum; pricing_model?: filter._enum; status?: filter._enum; updated_at?: filter._timestamp; currency_code?: filter._string; channel?: filter._enum; include_deleted?: boolean; } interface copy_params { from_site: string; id_at_from_site: string; id?: string; for_site_merging?: boolean; } interface tiers_create_params { starting_unit?: number; } interface tiers_create_params { ending_unit?: number; } interface tiers_create_params { price?: number; } interface tiers_create_params { starting_unit_in_decimal?: string; } interface tiers_create_params { ending_unit_in_decimal?: string; } interface tiers_create_params { price_in_decimal?: string; } interface tax_providers_fields_create_params { provider_name: string; } interface tax_providers_fields_create_params { field_id: string; } interface tax_providers_fields_create_params { field_value: string; } interface applicable_addons_create_params { id?: string; } interface event_based_addons_create_params { id?: string; } interface event_based_addons_create_params { quantity?: number; } interface event_based_addons_create_params { quantity_in_decimal?: string; } interface event_based_addons_create_params { on_event?: string; } interface event_based_addons_create_params { charge_once?: boolean; } interface attached_addons_create_params { id?: string; } interface attached_addons_create_params { quantity?: number; } interface attached_addons_create_params { quantity_in_decimal?: string; } interface attached_addons_create_params { billing_cycles?: number; } interface attached_addons_create_params { type?: string; } interface tiers_update_params { starting_unit?: number; } interface tiers_update_params { ending_unit?: number; } interface tiers_update_params { price?: number; } interface tiers_update_params { starting_unit_in_decimal?: string; } interface tiers_update_params { ending_unit_in_decimal?: string; } interface tiers_update_params { price_in_decimal?: string; } interface tax_providers_fields_update_params { provider_name: string; } interface tax_providers_fields_update_params { field_id: string; } interface tax_providers_fields_update_params { field_value: string; } interface applicable_addons_update_params { id?: string; } interface attached_addons_update_params { id?: string; } interface attached_addons_update_params { quantity?: number; } interface attached_addons_update_params { quantity_in_decimal?: string; } interface attached_addons_update_params { billing_cycles?: number; } interface attached_addons_update_params { type?: string; } interface event_based_addons_update_params { id?: string; } interface event_based_addons_update_params { quantity?: number; } interface event_based_addons_update_params { quantity_in_decimal?: string; } interface event_based_addons_update_params { on_event?: string; } interface event_based_addons_update_params { charge_once?: boolean; } }