Merge pull request #3148 from Safelite/feature/CASH-2501
CASH-2501 - updated to v2 parts/getwipers endpoint
This commit is contained in:
commit
26128a9de3
6 changed files with 9 additions and 7 deletions
|
|
@ -61,7 +61,7 @@ const endpoints = {
|
|||
method: "POST",
|
||||
},
|
||||
GetWipers: {
|
||||
url: "/parts/api/v1/parts/wipers",
|
||||
url: "/parts/api/v2/parts/wipers",
|
||||
method: "GET",
|
||||
},
|
||||
GetRainRepel: {
|
||||
|
|
|
|||
|
|
@ -169,8 +169,8 @@ export default {
|
|||
const wipersPromise = baseMixin.methods.dispatchStoreActionWithLogging(
|
||||
storeActions.GET_WIPERS,
|
||||
{
|
||||
serviceZipCode: submittedOrder.serviceLocation.zipCode,
|
||||
carId: submittedOrder.vehicle.carId,
|
||||
accountNumber: submittedOrder.payment?.parentAccountNumber,
|
||||
},
|
||||
"confirmation"
|
||||
);
|
||||
|
|
|
|||
|
|
@ -226,8 +226,8 @@ export default {
|
|||
const wipersPromise = baseMixin.methods.dispatchStoreActionWithLogging(
|
||||
storeActions.GET_WIPERS,
|
||||
{
|
||||
serviceZipCode: store.getters.order.serviceLocation.zipCode,
|
||||
carId: store.getters.vehicle.carId,
|
||||
accountNumber: store.getters.order.payment?.parentAccountNumber,
|
||||
},
|
||||
"payment-method"
|
||||
);
|
||||
|
|
|
|||
|
|
@ -35,8 +35,8 @@ export default {
|
|||
const wipersPromise = baseMixin.methods.dispatchStoreActionWithLogging(
|
||||
storeActions.GET_WIPERS,
|
||||
{
|
||||
serviceZipCode: store.getters.order.serviceLocation.zipCode,
|
||||
carId: store.getters.vehicle.carId,
|
||||
accountNumber: store.getters.order.payment?.parentAccountNumber,
|
||||
},
|
||||
"review"
|
||||
);
|
||||
|
|
|
|||
|
|
@ -217,8 +217,10 @@ export default {
|
|||
const wipersPromise = baseMixin.methods.dispatchStoreActionWithLogging(
|
||||
storeActions.GET_WIPERS,
|
||||
{
|
||||
serviceZipCode: store.getters.order.serviceLocation.zipCode,
|
||||
carId: store.getters.vehicle.carId,
|
||||
accountNumber:
|
||||
store.getters.order.payment?.parentAccountNumber ??
|
||||
applicationConfig.CASH_PARENT_ACCOUNT_NUMBER,
|
||||
},
|
||||
"quote"
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1961,12 +1961,12 @@ export const actions = {
|
|||
|
||||
async getWipers(context, { payload, pageNameToLog }) {
|
||||
const carId = payload.carId;
|
||||
const serviceZipCode = payload.serviceZipCode;
|
||||
const accountNumber = payload.accountNumber;
|
||||
|
||||
const response = await globalMethods
|
||||
.callHttpClient({
|
||||
method: endpoints.GetWipers.method,
|
||||
endpoint: `${endpoints.GetWipers.url}/${carId}/${serviceZipCode}`,
|
||||
endpoint: `${endpoints.GetWipers.url}/${carId}/${accountNumber}`,
|
||||
logApiCall: true,
|
||||
pageNameToLog: pageNameToLog,
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue