CSR-1600 new endpoint from mule for applicable fees
This commit is contained in:
CarlNation 2024-09-26 11:59:28 -04:00
parent 63880eb135
commit daf9ecba0d

View file

@ -1537,9 +1537,30 @@ export const actions = {
? context.getters.payment.billToAccountNumber
: applicationConfig.CASH_DEFAULT_BILL_TO_ACCOUNT_NUMBER;
const order = context.getters.order;
const coverageStatus = order.payment?.insuranceCoverage?.coverageStatus;
const coverageSubStatus = order.payment?.insuranceCoverage?.coverageSubStatus;
const isItac = order.policy?.isItac ?? false;
const zipCode = order.serviceLocation?.provider?.address?.zipCode ?? order.serviceLocation?.zipCode;
var providerNumber =
order.serviceLocation?.provider?.providerNumber ?? order.serviceLocation?.zipCodeCtu;
if (providerNumber.startsWith("00") && providerNumber.length > 5) {
providerNumber = providerNumber.substring(1);
}
var endPoint = `${endpoints.GetMobileFeePart.url}/?damageType=${damageType}&parentAccountNumber=${parentAccountNumber}&billToAccountNumber=${billToAccountNumber}&providerNumber=${providerNumber}&isItac=${isItac}&zipCode=${zipCode}`;
if (coverageStatus) {
endPoint = `${endPoint}&coverageStatus=${coverageStatus}`;
}
if (coverageSubStatus) {
endPoint = `${endPoint}&coverageSubStatus=${coverageSubStatus}`;
}
return globalMethods.callHttpClient({
method: endpoints.GetMobileFeePart.method,
endpoint: `${endpoints.GetMobileFeePart.url}/${damageType}/${parentAccountNumber}/${billToAccountNumber}`,
endpoint: endPoint,
logApiCall: true,
pageNameToLog: pageNameToLog,
});