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

43 lines (42 loc) 1.19 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const RestApi_1 = __importDefault(require("../../modules/RestApi")); class VatAccounts extends RestApi_1.default { /** * @constructor */ constructor(props) { super(props); } /** * fetch a collection of all vat accounts * * @see https://restdocs.e-conomic.com/#vat-accounts * @returns {Promise<HttpResponse>} * */ getVatAccounts(offset = 0, limit = 100) { const requestObj = { method: "get", url: `/vat-accounts?skippages=${offset}&pagesize=${limit}`, }; return this._httpRequest(requestObj); } /** * Fetch a specific vat account * * @see https://restdocs.e-conomic.com/#get-vat-accounts-id * */ getVatAccount(vatCode) { const requestObj = { method: "get", url: `/vat-accounts/${vatCode}`, }; return this._httpRequest(requestObj); } } exports.default = VatAccounts;