CASH-2501 - updated to v2 parts/getwipers endpoint

This commit is contained in:
Minojhini Valaiyapathi 2026-04-21 10:55:45 -04:00
parent 841853d346
commit 110a1e771b
6 changed files with 9 additions and 7 deletions

View file

@ -61,7 +61,7 @@ const endpoints = {
method: "POST", method: "POST",
}, },
GetWipers: { GetWipers: {
url: "/parts/api/v1/parts/wipers", url: "/parts/api/v2/parts/wipers",
method: "GET", method: "GET",
}, },
GetRainRepel: { GetRainRepel: {

View file

@ -169,8 +169,8 @@ export default {
const wipersPromise = baseMixin.methods.dispatchStoreActionWithLogging( const wipersPromise = baseMixin.methods.dispatchStoreActionWithLogging(
storeActions.GET_WIPERS, storeActions.GET_WIPERS,
{ {
serviceZipCode: submittedOrder.serviceLocation.zipCode,
carId: submittedOrder.vehicle.carId, carId: submittedOrder.vehicle.carId,
accountNumber: submittedOrder.payment?.parentAccountNumber,
}, },
"confirmation" "confirmation"
); );

View file

@ -226,8 +226,8 @@ export default {
const wipersPromise = baseMixin.methods.dispatchStoreActionWithLogging( const wipersPromise = baseMixin.methods.dispatchStoreActionWithLogging(
storeActions.GET_WIPERS, storeActions.GET_WIPERS,
{ {
serviceZipCode: store.getters.order.serviceLocation.zipCode,
carId: store.getters.vehicle.carId, carId: store.getters.vehicle.carId,
accountNumber: store.getters.order.payment?.parentAccountNumber,
}, },
"payment-method" "payment-method"
); );

View file

@ -35,8 +35,8 @@ export default {
const wipersPromise = baseMixin.methods.dispatchStoreActionWithLogging( const wipersPromise = baseMixin.methods.dispatchStoreActionWithLogging(
storeActions.GET_WIPERS, storeActions.GET_WIPERS,
{ {
serviceZipCode: store.getters.order.serviceLocation.zipCode,
carId: store.getters.vehicle.carId, carId: store.getters.vehicle.carId,
accountNumber: store.getters.order.payment?.parentAccountNumber,
}, },
"review" "review"
); );

View file

@ -217,8 +217,10 @@ export default {
const wipersPromise = baseMixin.methods.dispatchStoreActionWithLogging( const wipersPromise = baseMixin.methods.dispatchStoreActionWithLogging(
storeActions.GET_WIPERS, storeActions.GET_WIPERS,
{ {
serviceZipCode: store.getters.order.serviceLocation.zipCode,
carId: store.getters.vehicle.carId, carId: store.getters.vehicle.carId,
accountNumber:
store.getters.order.payment?.parentAccountNumber ??
applicationConfig.CASH_PARENT_ACCOUNT_NUMBER,
}, },
"quote" "quote"
); );

View file

@ -1961,12 +1961,12 @@ export const actions = {
async getWipers(context, { payload, pageNameToLog }) { async getWipers(context, { payload, pageNameToLog }) {
const carId = payload.carId; const carId = payload.carId;
const serviceZipCode = payload.serviceZipCode; const accountNumber = payload.accountNumber;
const response = await globalMethods const response = await globalMethods
.callHttpClient({ .callHttpClient({
method: endpoints.GetWipers.method, method: endpoints.GetWipers.method,
endpoint: `${endpoints.GetWipers.url}/${carId}/${serviceZipCode}`, endpoint: `${endpoints.GetWipers.url}/${carId}/${accountNumber}`,
logApiCall: true, logApiCall: true,
pageNameToLog: pageNameToLog, pageNameToLog: pageNameToLog,
}) })