cloudflare
Version:
The official TypeScript library for the Cloudflare API
35 lines • 1.24 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.BadDebt = exports.BaseBadDebt = void 0;
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
const resource_1 = require("../../core/resource.js");
const path_1 = require("../../internal/utils/path.js");
var BaseBadDebt = /* @__PURE__ */ (() => {
class BaseBadDebt extends resource_1.APIResource {
/**
* Gets bad debt information for an account, including outstanding invoices and
* total debt amount.
*
* @example
* ```ts
* const badDebt = await client.billing.badDebt.get({
* account_id: '023e105f4ecef8ad9ca31a8372d0c353',
* });
* ```
*/
get(params, options) {
const { account_id } = params;
return this._client.get((0, path_1.path) `/accounts/${account_id}/billing/bad-debt`, options)._thenUnwrap((obj) => obj.result);
}
}
BaseBadDebt._key = Object.freeze([
'billing',
'badDebt',
]);
return BaseBadDebt;
})();
exports.BaseBadDebt = BaseBadDebt;
class BadDebt extends BaseBadDebt {
}
exports.BadDebt = BadDebt;
//# sourceMappingURL=bad-debt.js.map