Merge pull request #3000 from Safelite/nation/CASH-1952
Nation/cash 1952
This commit is contained in:
commit
e6ebeff8a8
2 changed files with 16 additions and 32 deletions
|
|
@ -158,7 +158,7 @@ const endpoints = {
|
||||||
},
|
},
|
||||||
TaxOrderItems: {
|
TaxOrderItems: {
|
||||||
url: "/price/api/v1/price/taxed-order-items",
|
url: "/price/api/v1/price/taxed-order-items",
|
||||||
method: "GET",
|
method: "POST",
|
||||||
},
|
},
|
||||||
LogExperimentExposureIfAssigned: {
|
LogExperimentExposureIfAssigned: {
|
||||||
url: "/experiments/api/v1/experiments/log-exposure",
|
url: "/experiments/api/v1/experiments/log-exposure",
|
||||||
|
|
|
||||||
|
|
@ -3125,40 +3125,24 @@ export const actions = {
|
||||||
promoCode: lineItem.promoCode ?? null,
|
promoCode: lineItem.promoCode ?? null,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const pricedLineItemsFormattedForRequest =
|
const order = context.getters.order;
|
||||||
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 response = await globalMethods.callHttpClient({
|
const response = await globalMethods.callHttpClient({
|
||||||
method: endpoints.TaxOrderItems.method,
|
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,
|
logApiCall: true,
|
||||||
pageNameToLog: pageNameToLog,
|
pageNameToLog: pageNameToLog,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue