UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

29 lines • 994 B
// 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 BaseCredits = /* @__PURE__ */ (() => { class BaseCredits extends APIResource { /** * Gets the credit balance and eligibility for an account. * * @example * ```ts * const credit = await client.billing.credits.get({ * account_id: '023e105f4ecef8ad9ca31a8372d0c353', * }); * ``` */ get(params, options) { const { account_id } = params; return this._client.get(path `/accounts/${account_id}/billing/credits`, options)._thenUnwrap((obj) => obj.result); } } BaseCredits._key = Object.freeze([ 'billing', 'credits', ]); return BaseCredits; })(); export class Credits extends BaseCredits { } //# sourceMappingURL=credits.mjs.map