UNPKG

orb-billing

Version:

The official TypeScript library for the Orb API

36 lines 1.4 kB
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from "../../resource.mjs"; import { isRequestOptions } from "../../core.mjs"; import { Page } from "../../pagination.mjs"; /** * 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). */ export class Migrations extends APIResource { /** * Fetch migration */ retrieve(planId, migrationId, options) { return this._client.get(`/plans/${planId}/migrations/${migrationId}`, options); } list(planId, query = {}, options) { if (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); } } export class MigrationListResponsesPage extends Page { } Migrations.MigrationListResponsesPage = MigrationListResponsesPage; //# sourceMappingURL=migrations.mjs.map