amberflo-metering-typescript
Version:
Amberflo metering client for TypeScript
30 lines (29 loc) • 1.31 kB
TypeScript
import { IAxiosRetryConfig } from "axios-retry";
import BaseClient from "./baseClient";
import { CustomerProductPlanApiPayload, CustomerProductPlan } from "./model/customerProductPlanApiPayload";
/**
* See: https://docs.amberflo.io/reference/post_payments-pricing-amberflo-customer-pricing
*/
export declare class CustomerProductPlanClient extends BaseClient {
private readonly path;
private readonly pathAll;
/**
* Initialize a new `CustomerProductPlanClient`
* `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 the entire history of product plans of the given customer.
*/
list(customerId: string): Promise<CustomerProductPlan[]>;
/**
* Get the latest product plan of the given customer.
*/
get(customerId: string): Promise<CustomerProductPlan>;
/**
* Relates the customer to a product plan.
* See https://docs.amberflo.io/reference/post_payments-pricing-amberflo-customer-pricing
*/
addOrUpdate(payload: CustomerProductPlanApiPayload): Promise<CustomerProductPlan>;
}