@eleva-io/erp-sdk
Version:
SDK oficial para el ERP de Eleva
24 lines • 718 B
JavaScript
import { CRUD } from '../../../../utils/crud';
export class InvoicesAPI extends 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);
}
}
//# sourceMappingURL=invoices.js.map