orb-billing
Version:
The official TypeScript library for the Orb API
31 lines • 1.28 kB
JavaScript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../../resource.mjs";
import * as ExternalPlanIDAPI from "./external-plan-id.mjs";
import { ExternalPlanID, } from "./external-plan-id.mjs";
export class Beta extends APIResource {
constructor() {
super(...arguments);
this.externalPlanId = new ExternalPlanIDAPI.ExternalPlanID(this._client);
}
/**
* This endpoint allows the creation of a new plan version for an existing plan.
*/
createPlanVersion(planId, body, options) {
return this._client.post(`/plans/${planId}/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(planId, version, options) {
return this._client.get(`/plans/${planId}/versions/${version}`, options);
}
/**
* This endpoint allows setting the default version of a plan.
*/
setDefaultPlanVersion(planId, body, options) {
return this._client.post(`/plans/${planId}/set_default_version`, { body, ...options });
}
}
Beta.ExternalPlanID = ExternalPlanID;
//# sourceMappingURL=beta.mjs.map