cloudflare
Version:
The official TypeScript library for the Cloudflare API
38 lines • 1.39 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.History = exports.BaseHistory = void 0;
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
const resource_1 = require("../../core/resource.js");
const pagination_1 = require("../../core/pagination.js");
const path_1 = require("../../internal/utils/path.js");
var BaseHistory = /* @__PURE__ */ (() => {
class BaseHistory extends resource_1.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((0, path_1.path) `/accounts/${account_id}/billing/history`, (pagination_1.V4PagePaginationArray), { query, ...options });
}
}
BaseHistory._key = Object.freeze([
'billing',
'history',
]);
return BaseHistory;
})();
exports.BaseHistory = BaseHistory;
class History extends BaseHistory {
}
exports.History = History;
//# sourceMappingURL=history.js.map