UNPKG

@phasesdk/api-client-for-economic

Version:

e-conomic REST API Library for Node.js is a powerful tool designed to simplify integration with the e-conomic platform for developers building Node.js applications. With this library, developers can effortlessly leverage the full functionality of the e-co

54 lines (53 loc) 1.87 kB
import OpenApi from "../../OpenApi"; import { AuthToken, SubscriptionResponse } from "../../../types/Economic.type"; import { HttpResponse } from "../../../types/Http.type"; export type Subscription = { collection: 0 | 1; interval: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13; name: string; accrue: boolean; allowMoreThanOnePerCustomer: boolean; description: string | null; includeName: boolean; includePeriod: boolean; isBarred: boolean; isCalendarBased: boolean; lastUpdated: string | null; number: number; objectVersion: string | null; }; export default class Subscriptions extends OpenApi { private version; getVersion(): string; setVersion(version: string): this; getUrlSegment(): string; constructor(authToken: AuthToken); /** * Use this endpoint to load a page of Subscriptions. * * @see https://apis.e-conomic.com/#Subscriptions..tag/Subscriptions/operation/GetAllSubscriptions * * @param {number} cursorValue * @returns {Promise<HttpResponse>} */ getAll(cursorValue?: number): Promise<HttpResponse<SubscriptionResponse<Subscription[]>>>; /** * This endpoint is to load a page of Subscriptions. * * @see https://apis.e-conomic.com/#Subscriptions..tag/Subscriptions/operation/GetPageOfSubscriptions * * @param {number} offset * @param {number} limit * @returns {Promise<HttpResponse>} */ get(offset?: number, limit?: number): Promise<HttpResponse<Subscription[]>>; /** * This endpoint is to load a single Subscription by number. * * @see https://apis.e-conomic.com/#Subscriptions..tag/Subscriptions/operation/GetSubscriptionById * * @param {number} id * @returns {Promise<HttpResponse>} */ getFor(id: number): Promise<HttpResponse<Subscription>>; }