UNPKG

amberflo-metering-typescript

Version:
32 lines (31 loc) 1.44 kB
import { IAxiosRetryConfig } from 'axios-retry'; import BaseClient from './baseClient'; import { CustomerPrepaidOrderApiPayload, CustomerPrepaidOrder } from './model/customerPrepaidOrderApiPayload'; /** * See: https://docs.amberflo.io/reference/post_payments-pricing-amberflo-customer-prepaid */ export declare class CustomerPrepaidOrderClient extends BaseClient { private readonly path; private readonly pathList; /** * Initialize a new `CustomerPrepaidOrderClient` * `debug`: Whether to issue debug level logs or not. * `retry`: Whether to retry idempotent requests on 5xx or network errors, or retry configuration (see https://github.com/softonic/axios-retry). */ constructor(apiKey: string, debug?: boolean, retry?: boolean | IAxiosRetryConfig); /** * List active prepaid orders of the given customer. * See https://docs.amberflo.io/reference/get_payments-pricing-amberflo-customer-prepaid-list */ listActive(customerId: string, productId?: string): Promise<CustomerPrepaidOrder[]>; /** * Add a new prepaid order to a customer. * See https://docs.amberflo.io/reference/post_payments-pricing-amberflo-customer-prepaid */ add(payload: CustomerPrepaidOrderApiPayload): Promise<CustomerPrepaidOrder>; /** * Make sure `BillingPeriod` is correctly instantiated. * See https://aflo.atlassian.net/browse/MET-1600 */ private deserialize; }