CASH-2501 - updated to v2 parts/getwipers endpoint
This commit is contained in:
parent
841853d346
commit
110a1e771b
6 changed files with 9 additions and 7 deletions
|
|
@ -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: {
|
||||||
|
|
|
||||||
|
|
@ -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"
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -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"
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -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"
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -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"
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -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,
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue