cloudflare
Version:
The official TypeScript library for the Cloudflare API
33 lines • 1.19 kB
JavaScript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../../core/resource.mjs";
import { V4PagePaginationArray } from "../../core/pagination.mjs";
import { path } from "../../internal/utils/path.mjs";
export var BaseHistory = /* @__PURE__ */ (() => {
class BaseHistory extends APIResource {
/**
* Gets the billing history for an account.
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const historyListResponse of client.billing.history.list(
* { account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
* )) {
* // ...
* }
* ```
*/
list(params, options) {
const { account_id, ...query } = params;
return this._client.getAPIList(path `/accounts/${account_id}/billing/history`, (V4PagePaginationArray), { query, ...options });
}
}
BaseHistory._key = Object.freeze([
'billing',
'history',
]);
return BaseHistory;
})();
export class History extends BaseHistory {
}
//# sourceMappingURL=history.mjs.map