cloudflare
Version:
The official TypeScript library for the Cloudflare API
35 lines • 1.3 kB
JavaScript
;
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 path_1 = require("../../internal/utils/path.js");
var BaseRatePlans = /* @__PURE__ */ (() => {
class BaseRatePlans extends resource_1.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((0, path_1.path) `/billing/rate_plans/${publicKey}`, options)._thenUnwrap((obj) => obj.result);
}
}
BaseRatePlans._key = Object.freeze([
'billing',
'ratePlans',
]);
return BaseRatePlans;
})();
exports.BaseRatePlans = BaseRatePlans;
class RatePlans extends BaseRatePlans {
}
exports.RatePlans = RatePlans;
//# sourceMappingURL=rate-plans.js.map