amberflo-metering-typescript
Version:
Amberflo metering client for TypeScript
27 lines (26 loc) • 1.36 kB
TypeScript
import { IAxiosRetryConfig } from "axios-retry";
import BaseClient from "./baseClient";
import { AllInvoicesQuery, InvoiceQuery, LatestInvoiceQuery, CustomerProductInvoice } from "./model/customerProductInvoiceApiPayload";
/**
* See https://docs.amberflo.io/reference/get_payments-billing-customer-product-invoice
*/
export declare class CustomerProductInvoiceClient extends BaseClient {
private readonly path;
private readonly pathAll;
/**
* Initialize a new `CustomerProductInvoiceClient`
* `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);
/**
* Get all invoices of the specified customer.
* See https://docs.amberflo.io/reference/get_payments-billing-customer-product-invoice-all
*/
getAll(query: AllInvoicesQuery): Promise<CustomerProductInvoice[]>;
/**
* Get a existing invoice of the specified customer: either the latest (currently open) or a previous one.
* See https://docs.amberflo.io/reference/get_payments-billing-customer-product-invoice
*/
get(query: InvoiceQuery | LatestInvoiceQuery): Promise<CustomerProductInvoice | null>;
}