@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
70 lines (69 loc) • 2.31 kB
TypeScript
import OpenApi from "../../OpenApi";
import { AuthToken } from "../../../types/Economic.type";
import { HttpResponse } from "../../../types/Http.type";
export type SupplierGroup = {
accountNumber: number;
name: string;
number: number;
objectVersion: string | null;
};
export type AllSupplierGroups = {
items: SupplierGroup[];
};
export default class SupplierGroups extends OpenApi {
private version;
getVersion(): string;
setVersion(version: string): this;
getUrlSegment(): string;
constructor(authToken: AuthToken);
/**
*
* @see https://apis.e-conomic.com/#Suppliers..tag/Groups/operation/GetNumberOfGroups
* @param {number} cursorValue
* @returns {Promise<HttpResponse>}
*/
count(): Promise<HttpResponse>;
/**
* Get all supplier groups
*
* @see https://apis.e-conomic.com/#Suppliers..tag/Groups/operation/GetAllGroups
* @param {number} cursorValue
* @returns {Promise<HttpResponse<AllSupplierGroups>>}
*/
getAll(cursorValue?: number): Promise<HttpResponse<AllSupplierGroups>>;
/**
* This endpoint is to load a page of Supplier Groups.
*
* @see https://apis.e-conomic.com/#Suppliers..tag/Groups/operation/GetPageOfGroups
*
* @param {number} offset
* @param {number} limit
* @returns {Promise<HttpResponse>}
*/
get(skipPages?: number, limit?: number): Promise<HttpResponse<SupplierGroup[]>>;
/**
* Get single supplier group.
*
* @see https://apis.e-conomic.com/#Suppliers..tag/Groups/operation/GetGroupById
*
* @param {number} id
* @returns {Promise<HttpResponse>}
*/
getFor(id: number): Promise<HttpResponse<SupplierGroup>>;
/**
* Create a new supplier group
*
* @see https://apis.e-conomic.com/#Suppliers..tag/Groups/operation/CreateGroup
* @param {SupplierGroup} SupplierGroup
* @returns {Promise<HttpResponse>}
*/
create(data: SupplierGroup): Promise<HttpResponse<SupplierGroup>>;
/**
* supplier group update
*
* @see https://apis.e-conomic.com/#Suppliers..tag/Groups/operation/UpdateGroupById
* @param {SupplierGroup} data
* @returns {Promise<HttpResponse>}
*/
update(data: SupplierGroup): Promise<HttpResponse<SupplierGroup>>;
}