UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

30 lines • 1.16 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 BasePayInvoice = /* @__PURE__ */ (() => { class BasePayInvoice extends APIResource { /** * Pays an outstanding invoice for an account. Returns a Stripe client secret when * Strong Customer Authentication (SCA) is required to complete the payment. * * @example * ```ts * const payInvoice = await client.accounts.payInvoice.create({ * account_id: '023e105f4ecef8ad9ca31a8372d0c353', * }); * ``` */ create(params, options) { const { account_id, ...body } = params; return this._client.post(path `/accounts/${account_id}/pay-invoice`, { body, ...options })._thenUnwrap((obj) => obj.result); } } BasePayInvoice._key = Object.freeze([ 'accounts', 'payInvoice', ]); return BasePayInvoice; })(); export class PayInvoice extends BasePayInvoice { } //# sourceMappingURL=pay-invoice.mjs.map