@apihawk/billia-sdk
Version:
The ApiHawk Billia SDK
176 lines • 4.19 kB
TypeScript
export interface ICurrencyInformation {
currency: string;
convertedFrom: string;
rate: number;
}
export interface IProductPriceTax {
amount_without_tax: number;
amount: number;
country_code: string;
percent: number;
tax_included: boolean;
}
export interface IPrice {
unit_price: number;
install_price: number;
redemption_price: number;
amount: number;
quantity: number;
quantity_type: string;
tax: IProductPriceTax;
display: {
amount: number;
unit_price: number;
};
_currency: ICurrencyInformation;
total: IPriceTotal;
}
export interface IPriceTotal {
amount: number;
tax: number;
group: any;
metadata: any;
discount: any;
}
export interface ICustomerProductPrice {
unit_price: number;
install_price: number;
redemption_price: number;
amount: number;
quantity: number;
quantity_type: string;
tax: IProductPriceTax;
display: {
amount: number;
unit_price: number;
};
_currency: ICurrencyInformation;
}
export interface ITranslations {
translations: {
[prop: string]: {
[lang: string]: {
identifier: number;
value: string;
missing: boolean;
};
};
};
}
export interface ITranslationsWithExtraFields {
translations: {
name: {
[key: string]: {
value: string;
};
};
description: {
[key: string]: {
value: {
descriptors: any[];
extra_fields: any;
};
};
};
};
}
export interface ICatalogProductBase {
product_id: number;
product_type: string;
name: string;
status: 'active' | 'inactive' | 'hidden';
billing_type: string;
module: string;
description: string;
min_quantity: number;
max_quantity: number;
default_quantity: number;
visible_quantity: string;
quantity_type: string;
suspend_days: number;
redemption_days: number;
terminate_days: number;
next_due_days: number;
category_id: number;
sort_weight: number;
tax: number;
price: IPrice;
}
export interface ICatalogProduct extends ICatalogProductBase {
_language: ITranslations;
category?: ICatalogCategory;
options?: ICatalogOption[];
fields?: ICatalogField[];
label?: IBilliaLabel[];
_populated?: boolean;
_settings?: any;
_images?: any;
}
export interface ICatalogCategory {
id: number;
trash?: number;
parent_category_id: number;
name: string;
system_key: string;
description: string;
layout: string;
sort_weight: number;
state: 'active' | 'hidden' | 'disabled';
child?: ICatalogCategory[];
_language?: any;
_images?: any;
}
export interface ICatalogOption {
option_id: number;
trash?: number;
parent_category_id: number;
name: string;
namespace: string;
option_key: string;
default: string;
instruction: string;
required: number;
post_configuration: string;
provider: string;
option_type: string;
option_type_value: string;
product_identifier: number;
validator: string;
autopopulate: number;
calc_strategy_on_zero_price: string;
behavior: string;
relation_identifier?: number;
sort_weight: number;
visibility: string[];
_language?: any;
_images?: any;
_populated?: boolean;
choices?: any;
group?: any[];
}
export interface ICatalogField {
id: number | string;
product_id: number | string;
trash: number | string;
field_key: string;
name: string;
value: string;
_images?: any;
}
export interface IBilliaLabel {
label_id: number | string;
key: string;
trash: number | string;
value: string;
resource: string;
metadata: string;
identifier: number | string;
user_id: number | string;
reseller: string;
date_created: string;
date_updated?: string;
}
export interface IPaymentGatewayRedirect {
redirect_url: string;
}
//# sourceMappingURL=billia-sdk.types.d.ts.map