UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

33 lines • 1.15 kB
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from "../../core/resource.mjs"; import { SinglePage } from "../../core/pagination.mjs"; import { path } from "../../internal/utils/path.mjs"; export var BaseRatePlans = /* @__PURE__ */ (() => { class BaseRatePlans extends APIResource { /** * Lists all rate plans the zone can subscribe to. * * @example * ```ts * // Automatically fetches more pages as needed. * for await (const ratePlanGetResponse of client.zones.ratePlans.get( * { zone_id: '023e105f4ecef8ad9ca31a8372d0c353' }, * )) { * // ... * } * ``` */ get(params, options) { const { zone_id } = params; return this._client.getAPIList(path `/zones/${zone_id}/available_rate_plans`, (SinglePage), options); } } BaseRatePlans._key = Object.freeze([ 'zones', 'ratePlans', ]); return BaseRatePlans; })(); export class RatePlans extends BaseRatePlans { } //# sourceMappingURL=rate-plans.mjs.map