import * as Utils from '@datocms/rest-client-utils'; import BaseResource from '../../BaseResource.js'; import type * as ApiTypes from '../ApiTypes.js'; import type * as RawApiTypes from '../RawApiTypes.js'; export default class PerOwnerPricingPlan extends BaseResource { static readonly TYPE = 'per_owner_pricing_plan' as const; /** * Retrieve enabled plans for account * * @throws {ApiError} * @throws {TimeoutError} */ list() { return this.rawList().then((body) => Utils.deserializeResponseBody( body, ), ); } /** * Retrieve enabled plans for account * * @throws {ApiError} * @throws {TimeoutError} */ rawList(): Promise { return this.client.request( { method: 'GET', url: '/per-owner-pricing-plans', }, ); } /** * Retrieve plans that the organization can enable on other organizations given a mandate * * @throws {ApiError} * @throws {TimeoutError} */ activableAsAppointedOrganizationList() { return this.rawActivableAsAppointedOrganizationList().then((body) => Utils.deserializeResponseBody( body, ), ); } /** * Retrieve plans that the organization can enable on other organizations given a mandate * * @throws {ApiError} * @throws {TimeoutError} */ rawActivableAsAppointedOrganizationList(): Promise { return this.client.request( { method: 'GET', url: '/per-owner-pricing-plans/activable-as-appointed-organization', }, ); } }