UNPKG

ongkir

Version:

Shipping charges from logistic services in Indonesia

35 lines (34 loc) 1.1 kB
import { AxiosInstance } from 'axios'; import { ExpeditionType } from '.'; import { LocationType } from '../Geolocation'; export declare type FeeDataType = { service: string; price: string; etd?: string | null; }; export declare type ShippingChargeType = { expedition: string; customerService: string; description: string; fees?: FeeDataType[]; }; export declare class BaseExpedition { protected axios: AxiosInstance; protected expedition: ExpeditionType; protected mappingTableResult: { service: number; price: number; etd: number; }; protected weight: number; protected origin?: LocationType; protected destination?: LocationType; constructor(expedition: ExpeditionType); queryOrigins(query: string): Promise<LocationType[]>; queryDestinations(query: string): Promise<LocationType[]>; setOrigin(location: LocationType): void; setDestination(location: LocationType): void; setWeight(weight: number): void; getShippingCharges(): Promise<ShippingChargeType>; protected buildParams(): any; }