cloudflare
Version:
The official TypeScript library for the Cloudflare API
25 lines • 1.09 kB
JavaScript
;
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.AvailableRatePlansSinglePage = exports.Plans = void 0;
const resource_1 = require("cloudflare/resource");
const pagination_1 = require("cloudflare/pagination");
class Plans extends resource_1.APIResource {
/**
* Lists available plans the zone can subscribe to.
*/
list(zoneIdentifier, options) {
return this._client.getAPIList(`/zones/${zoneIdentifier}/available_plans`, AvailableRatePlansSinglePage, options);
}
/**
* Details of the available plan that the zone can subscribe to.
*/
get(zoneIdentifier, planIdentifier, options) {
return this._client.get(`/zones/${zoneIdentifier}/available_plans/${planIdentifier}`, options)._thenUnwrap((obj) => obj.result);
}
}
exports.Plans = Plans;
class AvailableRatePlansSinglePage extends pagination_1.SinglePage {
}
exports.AvailableRatePlansSinglePage = AvailableRatePlansSinglePage;
//# sourceMappingURL=plans.js.map