feat: add sale flow with Boopos Cloud

This commit is contained in:
Luis Felipe Cadavid 2024-10-01 13:45:34 -05:00
parent 0a14fe8882
commit 9cb4302fc9
19 changed files with 449 additions and 398 deletions

View file

@ -1,4 +1,5 @@
import { GetTypeDNIOutputInterface } from "@interfaces/OutputInterfaces/Customer/GetTypeDNIOutputInterface";
import { CustomerDniTypeResponseInterface } from "@interfaces/ResponseInterfaces/Customer/DNITypeResponseInterface";
import { BASE_URL_CUSTOMER_TYPEDNI } from "@package/config/ApiPath";
import { FetchData } from "@package/config/FetchData";
import { ReturnService } from "@package/config/ReturnService"
@ -36,7 +37,7 @@ async function GetTypeDni(ae_object: GetTypeDNIOutputInterface) {
})
}
const data = await FetchData(BASE_URL_CUSTOMER_TYPEDNI, 'all', options)
const data: CustomerDniTypeResponseInterface = await FetchData(BASE_URL_CUSTOMER_TYPEDNI, 'all', options)
if (data.correct) {
return data.object

View file

@ -31,7 +31,7 @@ async function GetSale(ae_object: GetSaleOutputInterface) {
})
}
let data: GetSaleResponseInterface = await FetchData(BASE_URL_SALE, 'addProducts', options)
let data: GetSaleResponseInterface = await FetchData(BASE_URL_SALE, 'getSale', options)
if (data.correct) {
return data.object

View file

@ -42,7 +42,7 @@ async function StartSale(ae_object: StartSaleOutputInterface) {
})
}
let data : StartSaleResponseInterface = await FetchData(BASE_URL_SALE, 'addProducts', options)
let data : StartSaleResponseInterface = await FetchData(BASE_URL_SALE, 'startSale', options)
if (data.correct) {
return data.object