UNPKG

@eleva-io/erp-sdk

Version:

SDK oficial para el ERP de Eleva

28 lines 863 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.InvoicesAPI = void 0; const crud_1 = require("../../../../utils/crud"); class InvoicesAPI extends crud_1.CRUD { constructor(httpClient, baseUrl, invoiceId) { super(httpClient, { basePath: baseUrl, id: invoiceId }); } create(data) { const path = this._config.basePath; if (data.file) { return this._httpClient.form(path, data); } return super.create(data); } update(id, data) { const path = `${this._config.basePath}/${id}`; if (data.file) { return this._httpClient.form(path, data, 'PATCH'); } return super.update(id, data); } find(query) { return super.find(query); } } exports.InvoicesAPI = InvoicesAPI; //# sourceMappingURL=invoices.js.map