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

41 lines (40 loc) 1.28 kB
import RestApi from "../../modules/RestApi"; import { Accrual } from "./Accounts"; import { AuthToken, InvoiceResponse, Pagination } from "../../types/Economic.type"; import { HttpResponse } from "../../types/Http.type"; export type ProductGroup = { accrual: Accrual; inventoryEnabled: boolean; name: string; productGroupNumber: number; products: string; salesAccounts: string; self: string; }; export default class ProductGroups extends RestApi { /** * @constructor */ constructor(props: AuthToken); /** * This endpoint allows you to fetch a collection of all product groups. * * @see https://restdocs.e-conomic.com/#get-product-groups * * @param {number} offset * @param {number} limit * @returns {Promise<HttpResponse>} * */ get(offset?: number, limit?: number): Promise<HttpResponse<InvoiceResponse<ProductGroup[], Pagination>>>; /** * This endpoint allows you to fetch a specific product group. * * @see https://restdocs.e-conomic.com/#get-product-groups-productgroupnumber * * @param {number} productGroupNumber * @returns {Promise<HttpResponse>} * */ getFor(productGroupNumber: number): Promise<HttpResponse<ProductGroup>>; }