cloudflare
Version:
The official TypeScript library for the Cloudflare API
29 lines • 1.02 kB
JavaScript
// 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 BaseInvoices = /* @__PURE__ */ (() => {
class BaseInvoices extends APIResource {
/**
* Toggles PDF invoice generation for an account.
*
* @example
* ```ts
* const response = await client.accounts.invoices.edit({
* account_id: '023e105f4ecef8ad9ca31a8372d0c353',
* });
* ```
*/
edit(params, options) {
const { account_id, ...body } = params;
return this._client.patch(path `/accounts/${account_id}/invoices`, { body, ...options })._thenUnwrap((obj) => obj.result);
}
}
BaseInvoices._key = Object.freeze([
'accounts',
'invoices',
]);
return BaseInvoices;
})();
export class Invoices extends BaseInvoices {
}
//# sourceMappingURL=invoices.mjs.map