104 lines
2.6 KiB
JavaScript
104 lines
2.6 KiB
JavaScript
class Api {
|
|
constructor(apiImplementation) {
|
|
this.apiImplementation = apiImplementation;
|
|
}
|
|
|
|
getCustomers() {
|
|
return this.apiImplementation.getCustomers();
|
|
}
|
|
|
|
getProducts(active = 'all') {
|
|
return this.apiImplementation.getProducts(active);
|
|
}
|
|
|
|
updateProduct(productId, data) {
|
|
return this.apiImplementation.updateProduct(productId, data);
|
|
}
|
|
|
|
getPaymentMethods() {
|
|
return this.apiImplementation.getPaymentMethods();
|
|
}
|
|
|
|
getSummaryPurchase(purchaseId) {
|
|
return this.apiImplementation.getSummaryPurchase(purchaseId);
|
|
}
|
|
|
|
getSummaryCatalogPurchase(purchaseId) {
|
|
return this.apiImplementation.getSummaryCatalogPurchase(purchaseId);
|
|
}
|
|
|
|
getPurchasesForReconciliation() {
|
|
return this.apiImplementation.getPurchasesForReconciliation();
|
|
}
|
|
|
|
getListReconcliations(page = 1, itemsPerPage = 10) {
|
|
return this.apiImplementation.getListReconcliations(page, itemsPerPage);
|
|
}
|
|
|
|
getReconciliation(reconciliationId) {
|
|
return this.apiImplementation.getReconciliation(reconciliationId);
|
|
}
|
|
|
|
createPurchase(purchase) {
|
|
return this.apiImplementation.createPurchase(purchase);
|
|
}
|
|
|
|
createCatalogPurchase(purchase) {
|
|
return this.apiImplementation.createCatalogPurchase(purchase);
|
|
}
|
|
|
|
createReconciliationJar(reconciliation) {
|
|
return this.apiImplementation.createReconciliationJar(reconciliation);
|
|
}
|
|
|
|
createCustomer(customer) {
|
|
return this.apiImplementation.createCustomer(customer);
|
|
}
|
|
|
|
getCSVForTryton() {
|
|
return this.apiImplementation.getCSVForTryton();
|
|
}
|
|
|
|
getProductsFromTryton() {
|
|
return this.apiImplementation.getProductsFromTryton();
|
|
}
|
|
|
|
getCustomersFromTryton() {
|
|
return this.apiImplementation.getCustomersFromTryton();
|
|
}
|
|
|
|
sendSalesToTryton() {
|
|
return this.apiImplementation.sendSalesToTryton();
|
|
}
|
|
|
|
sendCatalogSalesToTryton() {
|
|
return this.apiImplementation.sendCatalogSalesToTryton();
|
|
}
|
|
|
|
getCatalogSales() {
|
|
return this.apiImplementation.getCatalogSales();
|
|
}
|
|
|
|
getCurrentUser() {
|
|
return this.apiImplementation.getCurrentUser();
|
|
}
|
|
|
|
getCatalogueImages() {
|
|
return this.apiImplementation.getCatalogueImages();
|
|
}
|
|
|
|
createCatalogueImage(data) {
|
|
return this.apiImplementation.createCatalogueImage(data);
|
|
}
|
|
|
|
updateCatalogueImage(id, data) {
|
|
return this.apiImplementation.updateCatalogueImage(id, data);
|
|
}
|
|
|
|
deleteCatalogueImage(id) {
|
|
return this.apiImplementation.deleteCatalogueImage(id);
|
|
}
|
|
}
|
|
|
|
export default Api;
|