UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

38 lines • 1.38 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.RatePlans = exports.BaseRatePlans = void 0; // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. const resource_1 = require("../../core/resource.js"); const pagination_1 = require("../../core/pagination.js"); const path_1 = require("../../internal/utils/path.js"); var BaseRatePlans = /* @__PURE__ */ (() => { class BaseRatePlans extends resource_1.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((0, path_1.path) `/zones/${zone_id}/available_rate_plans`, (pagination_1.SinglePage), options); } } BaseRatePlans._key = Object.freeze([ 'zones', 'ratePlans', ]); return BaseRatePlans; })(); exports.BaseRatePlans = BaseRatePlans; class RatePlans extends BaseRatePlans { } exports.RatePlans = RatePlans; //# sourceMappingURL=rate-plans.js.map