UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

30 lines • 1.12 kB
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from "../../core/resource.mjs"; import { path } from "../../internal/utils/path.mjs"; export var BasePayBadDebt = /* @__PURE__ */ (() => { class BasePayBadDebt extends APIResource { /** * Pays outstanding bad debt for an account. Discovers all debt automatically and * handles invoice deduplication. * * @example * ```ts * const payBadDebt = await client.accounts.payBadDebt.create({ * account_id: '023e105f4ecef8ad9ca31a8372d0c353', * }); * ``` */ create(params, options) { const { account_id, ...body } = params; return this._client.post(path `/accounts/${account_id}/pay-bad-debt`, { body, ...options })._thenUnwrap((obj) => obj.result); } } BasePayBadDebt._key = Object.freeze([ 'accounts', 'payBadDebt', ]); return BasePayBadDebt; })(); export class PayBadDebt extends BasePayBadDebt { } //# sourceMappingURL=pay-bad-debt.mjs.map