From 1e84f8c15a47e01c97c7490c263d8ec00fad8b0d Mon Sep 17 00:00:00 2001 From: CarlNation Date: Sat, 10 Jan 2026 14:39:18 -0500 Subject: [PATCH] CASH-1952 CASH-1952 change endpoint to POST --- src/constants/endpoints.js | 2 +- src/store/index.js | 46 +++++++++++++------------------------- 2 files changed, 16 insertions(+), 32 deletions(-) diff --git a/src/constants/endpoints.js b/src/constants/endpoints.js index c23de7766..d25fce6a3 100644 --- a/src/constants/endpoints.js +++ b/src/constants/endpoints.js @@ -158,7 +158,7 @@ const endpoints = { }, TaxOrderItems: { url: "/price/api/v1/price/taxed-order-items", - method: "GET", + method: "POST", }, LogExperimentExposureIfAssigned: { url: "/experiments/api/v1/experiments/log-exposure", diff --git a/src/store/index.js b/src/store/index.js index 1c1f4038f..6802ddb13 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -3125,40 +3125,24 @@ export const actions = { promoCode: lineItem.promoCode ?? null, })); - const pricedLineItemsFormattedForRequest = - 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 order = context.getters.order; const response = await globalMethods.callHttpClient({ 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, pageNameToLog: pageNameToLog, });