UNPKG

orb-billing

Version:

The official TypeScript library for the Orb API

41 lines 1.66 kB
"use strict"; // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. Object.defineProperty(exports, "__esModule", { value: true }); exports.MigrationListResponsesPage = exports.Migrations = void 0; const resource_1 = require("../../resource.js"); const core_1 = require("../../core.js"); const pagination_1 = require("../../pagination.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 Migrations extends resource_1.APIResource { /** * Fetch migration */ retrieve(planId, migrationId, options) { return this._client.get(`/plans/${planId}/migrations/${migrationId}`, options); } list(planId, query = {}, options) { if ((0, core_1.isRequestOptions)(query)) { return this.list(planId, {}, query); } return this._client.getAPIList(`/plans/${planId}/migrations`, MigrationListResponsesPage, { query, ...options, }); } /** * This endpoint cancels a migration. */ cancel(planId, migrationId, options) { return this._client.post(`/plans/${planId}/migrations/${migrationId}/cancel`, options); } } exports.Migrations = Migrations; class MigrationListResponsesPage extends pagination_1.Page { } exports.MigrationListResponsesPage = MigrationListResponsesPage; Migrations.MigrationListResponsesPage = MigrationListResponsesPage; //# sourceMappingURL=migrations.js.map