CASH-1952
CASH-1952 change endpoint to POST
This commit is contained in:
parent
f196fb3fa1
commit
1e84f8c15a
2 changed files with 16 additions and 32 deletions
|
|
@ -158,7 +158,7 @@ const endpoints = {
|
|||
},
|
||||
TaxOrderItems: {
|
||||
url: "/price/api/v1/price/taxed-order-items",
|
||||
method: "GET",
|
||||
method: "POST",
|
||||
},
|
||||
LogExperimentExposureIfAssigned: {
|
||||
url: "/experiments/api/v1/experiments/log-exposure",
|
||||
|
|
|
|||
|
|
@ -3125,40 +3125,24 @@ export const actions = {
|
|||
promoCode: lineItem.promoCode ?? null,
|
||||
}));
|
||||
|
||||
const pricedLineItemsFormattedForRequest =
|
||||
buildQueryStringParameterFromArrayOfComplexObjects(
|
||||
lineItemsWithOnlyPriceInfo,
|
||||
"lineItems"
|
||||
);
|
||||
|
||||
let queryString = "";
|
||||
if (appointmentType == "Mobile") {
|
||||
queryString =
|
||||
`ParentAccountNumber=${context.getters.order.payment.parentAccountNumber}` +
|
||||
`&BillToAccountNumber=${billToAccountNumber}` +
|
||||
`&ProviderNumber=${providerNumber}` +
|
||||
`&AppointmentType=${appointmentType}` +
|
||||
`&ServiceLocation.City=${serviceLocationCity}` +
|
||||
`&ServiceLocation.State=${serviceLocationState}` +
|
||||
`&ServiceLocation.ZipCode=${serviceLocationZipCode}` +
|
||||
`&${pricedLineItemsFormattedForRequest}`;
|
||||
} else {
|
||||
queryString =
|
||||
`ParentAccountNumber=${context.getters.order.payment.parentAccountNumber}` +
|
||||
`&BillToAccountNumber=${billToAccountNumber}` +
|
||||
`&ProviderNumber=${providerNumber}` +
|
||||
`&AppointmentType=${appointmentType}` +
|
||||
`&${pricedLineItemsFormattedForRequest}`;
|
||||
}
|
||||
|
||||
const lineItemServerData = context.getters.order.lineItems.serverData;
|
||||
if (lineItemServerData) {
|
||||
queryString += `&ServerData=${encodeURIComponent(lineItemServerData)}`;
|
||||
}
|
||||
const order = context.getters.order;
|
||||
|
||||
const response = await globalMethods.callHttpClient({
|
||||
method: endpoints.TaxOrderItems.method,
|
||||
endpoint: `${endpoints.TaxOrderItems.url}?${queryString}`,
|
||||
endpoint: endpoints.TaxOrderItems.url,
|
||||
payload: {
|
||||
parentAccountNumber: order.payment.parentAccountNumber,
|
||||
billToAccountNumber: billToAccountNumber,
|
||||
providerNumber: providerNumber,
|
||||
appointmentType: appointmentType,
|
||||
pricedLineItems: lineItemsWithOnlyPriceInfo,
|
||||
serviceLocation: {
|
||||
city: appointmentType == "Mobile" ? serviceLocationCity : null,
|
||||
state: appointmentType == "Mobile" ? serviceLocationState : null,
|
||||
zipCode: appointmentType == "Mobile" ? serviceLocationZipCode : null,
|
||||
},
|
||||
serverData: order.lineItems.serverData ? order.lineItems.serverData : "",
|
||||
},
|
||||
logApiCall: true,
|
||||
pageNameToLog: pageNameToLog,
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue