orb-billing
Version:
The official TypeScript library for the Orb API
36 lines • 1.56 kB
JavaScript
;
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.ExternalPlanID = void 0;
const resource_1 = require("../../resource.js");
/**
* The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a
* customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices
* in the [Price resource](/reference/price).
*/
class ExternalPlanID extends resource_1.APIResource {
/**
* This endpoint allows the creation of a new plan version for an existing plan.
*/
createPlanVersion(externalPlanId, body, options) {
return this._client.post(`/plans/external_plan_id/${externalPlanId}/versions`, { body, ...options });
}
/**
* This endpoint is used to fetch a plan version. It returns the phases, prices,
* and adjustments present on this version of the plan.
*/
fetchPlanVersion(externalPlanId, version, options) {
return this._client.get(`/plans/external_plan_id/${externalPlanId}/versions/${version}`, options);
}
/**
* This endpoint allows setting the default version of a plan.
*/
setDefaultPlanVersion(externalPlanId, body, options) {
return this._client.post(`/plans/external_plan_id/${externalPlanId}/set_default_version`, {
body,
...options,
});
}
}
exports.ExternalPlanID = ExternalPlanID;
//# sourceMappingURL=external-plan-id.js.map