UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

30 lines • 1.1 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 BaseRatePlans = /* @__PURE__ */ (() => { class BaseRatePlans extends APIResource { /** * Gets a rate plan's details by its public key (e.g., 'teams_free', * 'cf_pro_20_20'). This is a public catalog endpoint, so authentication is not * enforced and credentials are accepted but not required. * * @example * ```ts * const ratePlan = await client.billing.ratePlans.get( * 'teams_free', * ); * ``` */ get(publicKey, options) { return this._client.get(path `/billing/rate_plans/${publicKey}`, options)._thenUnwrap((obj) => obj.result); } } BaseRatePlans._key = Object.freeze([ 'billing', 'ratePlans', ]); return BaseRatePlans; })(); export class RatePlans extends BaseRatePlans { } //# sourceMappingURL=rate-plans.mjs.map