UNPKG

chargebee-typescript

Version:

A library in typescript for integrating with Chargebee.

329 lines (328 loc) 10.5 kB
import { ListResult } from '../list_result'; import { RequestWrapper } from "../request_wrapper"; import { Model } from "./model"; import { filter } from "../filter"; export declare class Ramp extends Model { id: string; description?: string; subscription_id: string; effective_from: number; status: string; created_at: number; resource_version?: number; updated_at?: number; items_to_add?: Array<ItemsToAdd>; items_to_update?: Array<ItemsToUpdate>; coupons_to_add?: Array<CouponsToAdd>; discounts_to_add?: Array<DiscountsToAdd>; item_tiers?: Array<ItemTier>; items_to_remove?: Array<string>; coupons_to_remove?: Array<string>; discounts_to_remove?: Array<string>; deleted: boolean; status_transition_reason?: StatusTransitionReason; static create_for_subscription(subscription_id: string, params?: _ramp.create_for_subscription_params): RequestWrapper; static update(ramp_id: string, params?: _ramp.update_params): RequestWrapper; static retrieve(ramp_id: string, params?: any): RequestWrapper; static delete(ramp_id: string, params?: any): RequestWrapper; static list(params?: _ramp.ramp_list_params): RequestWrapper<ListResult>; } export declare class ItemsToAdd extends Model { item_price_id: string; item_type: string; quantity?: number; quantity_in_decimal?: string; unit_price?: number; unit_price_in_decimal?: string; amount?: number; amount_in_decimal?: string; free_quantity?: number; free_quantity_in_decimal?: string; billing_cycles?: number; service_period_days?: number; metered_quantity?: string; } export declare class ItemsToUpdate extends Model { item_price_id: string; item_type: string; quantity?: number; quantity_in_decimal?: string; unit_price?: number; unit_price_in_decimal?: string; amount?: number; amount_in_decimal?: string; free_quantity?: number; free_quantity_in_decimal?: string; billing_cycles?: number; service_period_days?: number; metered_quantity?: string; } export declare class CouponsToAdd extends Model { coupon_id: string; apply_till?: number; } export declare class DiscountsToAdd extends Model { id: string; invoice_name?: string; type: string; percentage?: number; amount?: number; duration_type: string; period?: number; period_unit?: string; included_in_mrr: boolean; apply_on: string; item_price_id?: string; created_at: number; } export declare class ItemTier extends Model { item_price_id: string; 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; index: number; } export declare class StatusTransitionReason extends Model { code?: string; message?: string; } export declare namespace _ramp { interface create_for_subscription_params { effective_from: number; description?: string; coupons_to_remove?: Array<string>; discounts_to_remove?: Array<string>; items_to_remove?: Array<string>; items_to_add?: Array<items_to_add_create_for_subscription_params>; items_to_update?: Array<items_to_update_create_for_subscription_params>; item_tiers?: Array<item_tiers_create_for_subscription_params>; coupons_to_add?: Array<coupons_to_add_create_for_subscription_params>; discounts_to_add?: Array<discounts_to_add_create_for_subscription_params>; } interface update_params { effective_from: number; description?: string; coupons_to_remove?: Array<string>; discounts_to_remove?: Array<string>; items_to_remove?: Array<string>; items_to_add?: Array<items_to_add_update_params>; items_to_update?: Array<items_to_update_update_params>; item_tiers?: Array<item_tiers_update_params>; coupons_to_add?: Array<coupons_to_add_update_params>; discounts_to_add?: Array<discounts_to_add_update_params>; } interface ramp_list_params { limit?: number; offset?: string; include_deleted?: boolean; status?: filter._enum; subscription_id: filter._string; effective_from?: filter._timestamp; updated_at?: filter._timestamp; "sort_by[asc]"?: string; "sort_by[desc]"?: string; } interface items_to_add_create_for_subscription_params { item_price_id: string; } interface items_to_add_create_for_subscription_params { quantity?: number; } interface items_to_add_create_for_subscription_params { quantity_in_decimal?: string; } interface items_to_add_create_for_subscription_params { unit_price?: number; } interface items_to_add_create_for_subscription_params { unit_price_in_decimal?: string; } interface items_to_add_create_for_subscription_params { billing_cycles?: number; } interface items_to_add_create_for_subscription_params { service_period_days?: number; } interface items_to_update_create_for_subscription_params { item_price_id: string; } interface items_to_update_create_for_subscription_params { quantity?: number; } interface items_to_update_create_for_subscription_params { quantity_in_decimal?: string; } interface items_to_update_create_for_subscription_params { unit_price?: number; } interface items_to_update_create_for_subscription_params { unit_price_in_decimal?: string; } interface items_to_update_create_for_subscription_params { billing_cycles?: number; } interface items_to_update_create_for_subscription_params { service_period_days?: number; } interface item_tiers_create_for_subscription_params { item_price_id?: string; } interface item_tiers_create_for_subscription_params { starting_unit?: number; } interface item_tiers_create_for_subscription_params { ending_unit?: number; } interface item_tiers_create_for_subscription_params { price?: number; } interface item_tiers_create_for_subscription_params { starting_unit_in_decimal?: string; } interface item_tiers_create_for_subscription_params { ending_unit_in_decimal?: string; } interface item_tiers_create_for_subscription_params { price_in_decimal?: string; } interface item_tiers_create_for_subscription_params { pricing_type?: string; } interface item_tiers_create_for_subscription_params { package_size?: number; } interface coupons_to_add_create_for_subscription_params { coupon_id?: string; } interface coupons_to_add_create_for_subscription_params { apply_till?: number; } interface discounts_to_add_create_for_subscription_params { apply_on: string; } interface discounts_to_add_create_for_subscription_params { duration_type: string; } interface discounts_to_add_create_for_subscription_params { percentage?: number; } interface discounts_to_add_create_for_subscription_params { amount?: number; } interface discounts_to_add_create_for_subscription_params { period?: number; } interface discounts_to_add_create_for_subscription_params { period_unit?: string; } interface discounts_to_add_create_for_subscription_params { included_in_mrr?: boolean; } interface discounts_to_add_create_for_subscription_params { item_price_id?: string; } interface items_to_add_update_params { item_price_id: string; } interface items_to_add_update_params { quantity?: number; } interface items_to_add_update_params { quantity_in_decimal?: string; } interface items_to_add_update_params { unit_price?: number; } interface items_to_add_update_params { unit_price_in_decimal?: string; } interface items_to_add_update_params { billing_cycles?: number; } interface items_to_add_update_params { service_period_days?: number; } interface items_to_update_update_params { item_price_id: string; } interface items_to_update_update_params { quantity?: number; } interface items_to_update_update_params { quantity_in_decimal?: string; } interface items_to_update_update_params { unit_price?: number; } interface items_to_update_update_params { unit_price_in_decimal?: string; } interface items_to_update_update_params { billing_cycles?: number; } interface items_to_update_update_params { service_period_days?: number; } interface item_tiers_update_params { item_price_id?: string; } interface item_tiers_update_params { starting_unit?: number; } interface item_tiers_update_params { ending_unit?: number; } interface item_tiers_update_params { price?: number; } interface item_tiers_update_params { starting_unit_in_decimal?: string; } interface item_tiers_update_params { ending_unit_in_decimal?: string; } interface item_tiers_update_params { price_in_decimal?: string; } interface item_tiers_update_params { pricing_type?: string; } interface item_tiers_update_params { package_size?: number; } interface coupons_to_add_update_params { coupon_id?: string; } interface coupons_to_add_update_params { apply_till?: number; } interface discounts_to_add_update_params { apply_on: string; } interface discounts_to_add_update_params { duration_type: string; } interface discounts_to_add_update_params { percentage?: number; } interface discounts_to_add_update_params { amount?: number; } interface discounts_to_add_update_params { period?: number; } interface discounts_to_add_update_params { period_unit?: string; } interface discounts_to_add_update_params { included_in_mrr?: boolean; } interface discounts_to_add_update_params { item_price_id?: string; } }