Skip to content

Commit

Permalink
Merge pull request #14447 from transcom/B-21557-Estimated-Price
Browse files Browse the repository at this point in the history
B 21557 estimated price
  • Loading branch information
pambecker authored Feb 19, 2025
2 parents 7e2045f + 036dede commit eaa12d1
Show file tree
Hide file tree
Showing 14 changed files with 402 additions and 51 deletions.
21 changes: 17 additions & 4 deletions pkg/handlers/ghcapi/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,22 @@ func NewGhcAPIHandler(handlerConfig handlers.HandlerConfig) *ghcops.MymoveAPI {
signedCertificationCreator := signedcertification.NewSignedCertificationCreator()
signedCertificationUpdater := signedcertification.NewSignedCertificationUpdater()
ppmEstimator := ppmshipment.NewEstimatePPM(handlerConfig.DTODPlanner(), &paymentrequesthelper.RequestPaymentHelper{})

mtoServiceItemCreator := mtoserviceitem.NewMTOServiceItemCreator(
handlerConfig.HHGPlanner(),
queryBuilder,
moveRouter,
ghcrateengine.NewDomesticUnpackPricer(),
ghcrateengine.NewDomesticPackPricer(),
ghcrateengine.NewDomesticLinehaulPricer(),
ghcrateengine.NewDomesticShorthaulPricer(),
ghcrateengine.NewDomesticOriginPricer(),
ghcrateengine.NewDomesticDestinationPricer(),
ghcrateengine.NewFuelSurchargePricer())

moveTaskOrderUpdater := movetaskorder.NewMoveTaskOrderUpdater(
queryBuilder,
mtoserviceitem.NewMTOServiceItemCreator(handlerConfig.HHGPlanner(), queryBuilder, moveRouter, ghcrateengine.NewDomesticUnpackPricer(), ghcrateengine.NewDomesticPackPricer(), ghcrateengine.NewDomesticLinehaulPricer(), ghcrateengine.NewDomesticShorthaulPricer(), ghcrateengine.NewDomesticOriginPricer(), ghcrateengine.NewDomesticDestinationPricer(), ghcrateengine.NewFuelSurchargePricer()),
mtoServiceItemCreator,
moveRouter, signedCertificationCreator, signedCertificationUpdater, ppmEstimator,
)

Expand Down Expand Up @@ -234,7 +247,7 @@ func NewGhcAPIHandler(handlerConfig handlers.HandlerConfig) *ghcops.MymoveAPI {
paymentRequestShipmentRecalculator,
addressUpdater,
addressCreator)
sitExtensionShipmentUpdater := shipment.NewShipmentUpdater(noCheckUpdater, ppmShipmentUpdater, boatShipmentUpdater, mobileHomeShipmentUpdater)
sitExtensionShipmentUpdater := shipment.NewShipmentUpdater(noCheckUpdater, ppmShipmentUpdater, boatShipmentUpdater, mobileHomeShipmentUpdater, mtoServiceItemCreator)

ghcAPI.MtoServiceItemUpdateServiceItemSitEntryDateHandler = UpdateServiceItemSitEntryDateHandler{
HandlerConfig: handlerConfig,
Expand Down Expand Up @@ -428,7 +441,7 @@ func NewGhcAPIHandler(handlerConfig handlers.HandlerConfig) *ghcops.MymoveAPI {
handlerConfig,
mtoshipment.NewShipmentApprover(
mtoshipment.NewShipmentRouter(),
mtoserviceitem.NewMTOServiceItemCreator(handlerConfig.HHGPlanner(), queryBuilder, moveRouter, ghcrateengine.NewDomesticUnpackPricer(), ghcrateengine.NewDomesticPackPricer(), ghcrateengine.NewDomesticLinehaulPricer(), ghcrateengine.NewDomesticShorthaulPricer(), ghcrateengine.NewDomesticOriginPricer(), ghcrateengine.NewDomesticDestinationPricer(), ghcrateengine.NewFuelSurchargePricer()),
mtoServiceItemCreator,
handlerConfig.HHGPlanner(),
move.NewMoveWeights(mtoshipment.NewShipmentReweighRequester(), waf),
moveTaskOrderUpdater,
Expand Down Expand Up @@ -499,7 +512,7 @@ func NewGhcAPIHandler(handlerConfig handlers.HandlerConfig) *ghcops.MymoveAPI {
addressCreator,
)

shipmentUpdater := shipment.NewShipmentUpdater(mtoShipmentUpdater, ppmShipmentUpdater, boatShipmentUpdater, mobileHomeShipmentUpdater)
shipmentUpdater := shipment.NewShipmentUpdater(mtoShipmentUpdater, ppmShipmentUpdater, boatShipmentUpdater, mobileHomeShipmentUpdater, mtoServiceItemCreator)

ghcAPI.MoveSearchMovesHandler = SearchMovesHandler{
HandlerConfig: handlerConfig,
Expand Down
4 changes: 2 additions & 2 deletions pkg/handlers/ghcapi/mto_service_items_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ func (suite *HandlerSuite) TestUpdateMTOServiceItemStatusHandler() {
ppmShipmentUpdater := ppmshipment.NewPPMShipmentUpdater(&ppmEstimator, addressCreator, addressUpdater)
boatShipmentUpdater := boatshipment.NewBoatShipmentUpdater()
mobileHomeShipmentUpdater := mobilehomeshipment.NewMobileHomeShipmentUpdater()
shipmentUpdater := shipmentorchestrator.NewShipmentUpdater(noCheckUpdater, ppmShipmentUpdater, boatShipmentUpdater, mobileHomeShipmentUpdater)
shipmentUpdater := shipmentorchestrator.NewShipmentUpdater(noCheckUpdater, ppmShipmentUpdater, boatShipmentUpdater, mobileHomeShipmentUpdater, nil)
shipmentFetcher := mtoshipment.NewMTOShipmentFetcher()

moveTaskOrderID, _ := uuid.NewV4()
Expand Down Expand Up @@ -877,7 +877,7 @@ func (suite *HandlerSuite) TestUpdateServiceItemSitEntryDateHandler() {
ppmShipmentUpdater := ppmshipment.NewPPMShipmentUpdater(&ppmEstimator, addressCreator, addressUpdater)
boatShipmentUpdater := boatshipment.NewBoatShipmentUpdater()
mobileHomeShipmentUpdater := mobilehomeshipment.NewMobileHomeShipmentUpdater()
shipmentUpdater := shipmentorchestrator.NewShipmentUpdater(noCheckUpdater, ppmShipmentUpdater, boatShipmentUpdater, mobileHomeShipmentUpdater)
shipmentUpdater := shipmentorchestrator.NewShipmentUpdater(noCheckUpdater, ppmShipmentUpdater, boatShipmentUpdater, mobileHomeShipmentUpdater, nil)
shipmentFetcher := mtoshipment.NewMTOShipmentFetcher()

suite.Run("200 - success response", func() {
Expand Down
22 changes: 11 additions & 11 deletions pkg/handlers/ghcapi/mto_shipment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3293,7 +3293,7 @@ func (suite *HandlerSuite) TestApproveSITExtensionHandler() {
boatShipmentUpdater := boatshipment.NewBoatShipmentUpdater()
mobileHomeShipmentUpdater := mobilehomeshipment.NewMobileHomeShipmentUpdater()

sitExtensionShipmentUpdater := shipmentorchestrator.NewShipmentUpdater(noCheckUpdater, ppmShipmentUpdater, boatShipmentUpdater, mobileHomeShipmentUpdater)
sitExtensionShipmentUpdater := shipmentorchestrator.NewShipmentUpdater(noCheckUpdater, ppmShipmentUpdater, boatShipmentUpdater, mobileHomeShipmentUpdater, nil)

handler := ApproveSITExtensionHandler{
handlerConfig,
Expand Down Expand Up @@ -3437,7 +3437,7 @@ func (suite *HandlerSuite) CreateApprovedSITDurationUpdate() {
boatShipmentUpdater := boatshipment.NewBoatShipmentUpdater()
mobileHomeShipmentUpdater := mobilehomeshipment.NewMobileHomeShipmentUpdater()

sitExtensionShipmentUpdater := shipmentorchestrator.NewShipmentUpdater(noCheckUpdater, ppmShipmentUpdater, boatShipmentUpdater, mobileHomeShipmentUpdater)
sitExtensionShipmentUpdater := shipmentorchestrator.NewShipmentUpdater(noCheckUpdater, ppmShipmentUpdater, boatShipmentUpdater, mobileHomeShipmentUpdater, nil)

handler := CreateApprovedSITDurationUpdateHandler{
handlerConfig,
Expand Down Expand Up @@ -3523,7 +3523,7 @@ func (suite *HandlerSuite) CreateApprovedSITDurationUpdate() {

mobilehomeshipmentUpdater := mobilehomeshipment.NewMobileHomeShipmentUpdater()

sitExtensionShipmentUpdater := shipmentorchestrator.NewShipmentUpdater(noCheckUpdater, ppmShipmentUpdater, boatShipmentUpdater, mobilehomeshipmentUpdater)
sitExtensionShipmentUpdater := shipmentorchestrator.NewShipmentUpdater(noCheckUpdater, ppmShipmentUpdater, boatShipmentUpdater, mobilehomeshipmentUpdater, nil)

handler := CreateApprovedSITDurationUpdateHandler{
handlerConfig,
Expand Down Expand Up @@ -4593,7 +4593,7 @@ func (suite *HandlerSuite) TestUpdateShipmentHandler() {
ppmShipmentUpdater := ppmshipment.NewPPMShipmentUpdater(&ppmEstimator, addressCreator, addressUpdater)
boatShipmentUpdater := boatshipment.NewBoatShipmentUpdater()
mobileHomeShipmentUpdater := mobilehomeshipment.NewMobileHomeShipmentUpdater()
shipmentUpdater := shipmentorchestrator.NewShipmentUpdater(mtoShipmentUpdater, ppmShipmentUpdater, boatShipmentUpdater, mobileHomeShipmentUpdater)
shipmentUpdater := shipmentorchestrator.NewShipmentUpdater(mtoShipmentUpdater, ppmShipmentUpdater, boatShipmentUpdater, mobileHomeShipmentUpdater, nil)
handler := UpdateShipmentHandler{
suite.HandlerConfig(),
shipmentUpdater,
Expand Down Expand Up @@ -4661,7 +4661,7 @@ func (suite *HandlerSuite) TestUpdateShipmentHandler() {

boatShipmentUpdater := boatshipment.NewBoatShipmentUpdater()
mobileHomeShipmentUpdater := mobilehomeshipment.NewMobileHomeShipmentUpdater()
shipmentUpdater := shipmentorchestrator.NewShipmentUpdater(mtoShipmentUpdater, ppmShipmentUpdater, boatShipmentUpdater, mobileHomeShipmentUpdater)
shipmentUpdater := shipmentorchestrator.NewShipmentUpdater(mtoShipmentUpdater, ppmShipmentUpdater, boatShipmentUpdater, mobileHomeShipmentUpdater, nil)
handler := UpdateShipmentHandler{
suite.HandlerConfig(),
shipmentUpdater,
Expand Down Expand Up @@ -4847,7 +4847,7 @@ func (suite *HandlerSuite) TestUpdateShipmentHandler() {

boatShipmentUpdater := boatshipment.NewBoatShipmentUpdater()
mobileHomeShipmentUpdater := mobilehomeshipment.NewMobileHomeShipmentUpdater()
shipmentUpdater := shipmentorchestrator.NewShipmentUpdater(mtoShipmentUpdater, ppmShipmentUpdater, boatShipmentUpdater, mobileHomeShipmentUpdater)
shipmentUpdater := shipmentorchestrator.NewShipmentUpdater(mtoShipmentUpdater, ppmShipmentUpdater, boatShipmentUpdater, mobileHomeShipmentUpdater, nil)
handler := UpdateShipmentHandler{
suite.HandlerConfig(),
shipmentUpdater,
Expand Down Expand Up @@ -4927,7 +4927,7 @@ func (suite *HandlerSuite) TestUpdateShipmentHandler() {

boatShipmentUpdater := boatshipment.NewBoatShipmentUpdater()
mobileHomeShipmentUpdater := mobilehomeshipment.NewMobileHomeShipmentUpdater()
shipmentUpdater := shipmentorchestrator.NewShipmentUpdater(mtoShipmentUpdater, ppmShipmentUpdater, boatShipmentUpdater, mobileHomeShipmentUpdater)
shipmentUpdater := shipmentorchestrator.NewShipmentUpdater(mtoShipmentUpdater, ppmShipmentUpdater, boatShipmentUpdater, mobileHomeShipmentUpdater, nil)
handler := UpdateShipmentHandler{
suite.HandlerConfig(),
shipmentUpdater,
Expand Down Expand Up @@ -5007,7 +5007,7 @@ func (suite *HandlerSuite) TestUpdateShipmentHandler() {

boatShipmentUpdater := boatshipment.NewBoatShipmentUpdater()
mobileHomeShipmentUpdater := mobilehomeshipment.NewMobileHomeShipmentUpdater()
shipmentUpdater := shipmentorchestrator.NewShipmentUpdater(mtoShipmentUpdater, ppmShipmentUpdater, boatShipmentUpdater, mobileHomeShipmentUpdater)
shipmentUpdater := shipmentorchestrator.NewShipmentUpdater(mtoShipmentUpdater, ppmShipmentUpdater, boatShipmentUpdater, mobileHomeShipmentUpdater, nil)
handler := UpdateShipmentHandler{
suite.HandlerConfig(),
shipmentUpdater,
Expand Down Expand Up @@ -5045,7 +5045,7 @@ func (suite *HandlerSuite) TestUpdateShipmentHandler() {

boatShipmentUpdater := boatshipment.NewBoatShipmentUpdater()
mobileHomeShipmentUpdater := mobilehomeshipment.NewMobileHomeShipmentUpdater()
shipmentUpdater := shipmentorchestrator.NewShipmentUpdater(mtoShipmentUpdater, ppmShipmentUpdater, boatShipmentUpdater, mobileHomeShipmentUpdater)
shipmentUpdater := shipmentorchestrator.NewShipmentUpdater(mtoShipmentUpdater, ppmShipmentUpdater, boatShipmentUpdater, mobileHomeShipmentUpdater, nil)
handler := UpdateShipmentHandler{
suite.HandlerConfig(),
shipmentUpdater,
Expand Down Expand Up @@ -5085,7 +5085,7 @@ func (suite *HandlerSuite) TestUpdateShipmentHandler() {

boatShipmentUpdater := boatshipment.NewBoatShipmentUpdater()
mobileHomeShipmentUpdater := mobilehomeshipment.NewMobileHomeShipmentUpdater()
shipmentUpdater := shipmentorchestrator.NewShipmentUpdater(mtoShipmentUpdater, ppmShipmentUpdater, boatShipmentUpdater, mobileHomeShipmentUpdater)
shipmentUpdater := shipmentorchestrator.NewShipmentUpdater(mtoShipmentUpdater, ppmShipmentUpdater, boatShipmentUpdater, mobileHomeShipmentUpdater, nil)
handler := UpdateShipmentHandler{
suite.HandlerConfig(),
shipmentUpdater,
Expand Down Expand Up @@ -5126,7 +5126,7 @@ func (suite *HandlerSuite) TestUpdateShipmentHandler() {

boatShipmentUpdater := boatshipment.NewBoatShipmentUpdater()
mobileHomeShipmentUpdater := mobilehomeshipment.NewMobileHomeShipmentUpdater()
shipmentUpdater := shipmentorchestrator.NewShipmentUpdater(mtoShipmentUpdater, ppmShipmentUpdater, boatShipmentUpdater, mobileHomeShipmentUpdater)
shipmentUpdater := shipmentorchestrator.NewShipmentUpdater(mtoShipmentUpdater, ppmShipmentUpdater, boatShipmentUpdater, mobileHomeShipmentUpdater, nil)
handler := UpdateShipmentHandler{
suite.HandlerConfig(),
shipmentUpdater,
Expand Down
15 changes: 14 additions & 1 deletion pkg/handlers/internalapi/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,23 @@ func NewInternalAPI(handlerConfig handlers.HandlerConfig) *internalops.MymoveAPI
postalcodeservice.NewPostalCodeValidator(clock.New()),
}

mtoServiceItemCreator := mtoserviceitem.NewMTOServiceItemCreator(
handlerConfig.HHGPlanner(),
builder,
moveRouter,
ghcrateengine.NewDomesticUnpackPricer(),
ghcrateengine.NewDomesticPackPricer(),
ghcrateengine.NewDomesticLinehaulPricer(),
ghcrateengine.NewDomesticShorthaulPricer(),
ghcrateengine.NewDomesticOriginPricer(),
ghcrateengine.NewDomesticDestinationPricer(),
ghcrateengine.NewFuelSurchargePricer())

mtoShipmentCreator := mtoshipment.NewMTOShipmentCreatorV1(builder, fetcher, moveRouter, addressCreator)
shipmentRouter := mtoshipment.NewShipmentRouter()
moveTaskOrderUpdater := movetaskorder.NewMoveTaskOrderUpdater(
builder,
mtoserviceitem.NewMTOServiceItemCreator(handlerConfig.HHGPlanner(), builder, moveRouter, ghcrateengine.NewDomesticUnpackPricer(), ghcrateengine.NewDomesticPackPricer(), ghcrateengine.NewDomesticLinehaulPricer(), ghcrateengine.NewDomesticShorthaulPricer(), ghcrateengine.NewDomesticOriginPricer(), ghcrateengine.NewDomesticDestinationPricer(), ghcrateengine.NewFuelSurchargePricer()),
mtoServiceItemCreator,
moveRouter, signedCertificationCreator, signedCertificationUpdater, ppmEstimator,
)
boatShipmentCreator := boatshipment.NewBoatShipmentCreator()
Expand Down Expand Up @@ -233,6 +245,7 @@ func NewInternalAPI(handlerConfig handlers.HandlerConfig) *internalops.MymoveAPI
ppmShipmentUpdater,
boatShipmentUpdater,
mobileHomeShipmentUpdater,
mtoServiceItemCreator,
)

internalAPI.MtoShipmentUpdateMTOShipmentHandler = UpdateMTOShipmentHandler{
Expand Down
2 changes: 1 addition & 1 deletion pkg/handlers/internalapi/mto_shipment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,7 @@ func (suite *HandlerSuite) TestUpdateMTOShipmentHandler() {
boatShipmentUpdater := boatshipment.NewBoatShipmentUpdater()
mobileHomeShipmentUpdater := mobilehomeshipment.NewMobileHomeShipmentUpdater()

shipmentUpdater := shipmentorchestrator.NewShipmentUpdater(mtoShipmentUpdater, ppmShipmentUpdater, boatShipmentUpdater, mobileHomeShipmentUpdater)
shipmentUpdater := shipmentorchestrator.NewShipmentUpdater(mtoShipmentUpdater, ppmShipmentUpdater, boatShipmentUpdater, mobileHomeShipmentUpdater, nil)

authRequestAndSetUpHandlerAndParams := func(originalShipment models.MTOShipment, mockShipmentUpdater *mocks.ShipmentUpdater) (UpdateMTOShipmentHandler, mtoshipmentops.UpdateMTOShipmentParams) {
endpoint := fmt.Sprintf("/mto-shipments/%s", originalShipment.ID.String())
Expand Down
17 changes: 15 additions & 2 deletions pkg/handlers/primeapiv2/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,21 @@ func NewPrimeAPI(handlerConfig handlers.HandlerConfig) *primev2operations.Mymove
signedCertificationUpdater := signedcertification.NewSignedCertificationUpdater()
ppmEstimator := ppmshipment.NewEstimatePPM(handlerConfig.DTODPlanner(), &paymentrequesthelper.RequestPaymentHelper{})

mtoServiceItemCreator := mtoserviceitem.NewMTOServiceItemCreator(
handlerConfig.HHGPlanner(),
queryBuilder,
moveRouter,
ghcrateengine.NewDomesticUnpackPricer(),
ghcrateengine.NewDomesticPackPricer(),
ghcrateengine.NewDomesticLinehaulPricer(),
ghcrateengine.NewDomesticShorthaulPricer(),
ghcrateengine.NewDomesticOriginPricer(),
ghcrateengine.NewDomesticDestinationPricer(),
ghcrateengine.NewFuelSurchargePricer())

moveTaskOrderUpdater := movetaskorder.NewMoveTaskOrderUpdater(
queryBuilder,
mtoserviceitem.NewMTOServiceItemCreator(handlerConfig.HHGPlanner(), queryBuilder, moveRouter, ghcrateengine.NewDomesticUnpackPricer(), ghcrateengine.NewDomesticPackPricer(), ghcrateengine.NewDomesticLinehaulPricer(), ghcrateengine.NewDomesticShorthaulPricer(), ghcrateengine.NewDomesticOriginPricer(), ghcrateengine.NewDomesticDestinationPricer(), ghcrateengine.NewFuelSurchargePricer()),
mtoServiceItemCreator,
moveRouter, signedCertificationCreator, signedCertificationUpdater, ppmEstimator,
)

Expand Down Expand Up @@ -97,10 +109,11 @@ func NewPrimeAPI(handlerConfig handlers.HandlerConfig) *primev2operations.Mymove
ppmShipmentUpdater := ppmshipment.NewPPMShipmentUpdater(ppmEstimator, addressCreator, addressUpdater)
boatShipmentUpdater := boatshipment.NewBoatShipmentUpdater()
mobileHomeShipmentUpdater := mobilehomeshipment.NewMobileHomeShipmentUpdater()
shipmentUpdater := shipment.NewShipmentUpdater(mtoShipmentUpdater, ppmShipmentUpdater, boatShipmentUpdater, mobileHomeShipmentUpdater)
shipmentUpdater := shipment.NewShipmentUpdater(mtoShipmentUpdater, ppmShipmentUpdater, boatShipmentUpdater, mobileHomeShipmentUpdater, mtoServiceItemCreator)
primeAPIV2.MtoShipmentUpdateMTOShipmentHandler = UpdateMTOShipmentHandler{
handlerConfig,
shipmentUpdater,
handlerConfig.DTODPlanner(),
}

return primeAPIV2
Expand Down
2 changes: 2 additions & 0 deletions pkg/handlers/primeapiv2/mto_shipment.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
"github.com/transcom/mymove/pkg/handlers/primeapi"
"github.com/transcom/mymove/pkg/handlers/primeapiv2/payloads"
"github.com/transcom/mymove/pkg/models"
"github.com/transcom/mymove/pkg/route"
"github.com/transcom/mymove/pkg/services"
mtoshipment "github.com/transcom/mymove/pkg/services/mto_shipment"
)
Expand Down Expand Up @@ -169,6 +170,7 @@ func (h CreateMTOShipmentHandler) Handle(params mtoshipmentops.CreateMTOShipment
type UpdateMTOShipmentHandler struct {
handlers.HandlerConfig
services.ShipmentUpdater
planner route.Planner
}

// Handle handler that updates a mto shipment
Expand Down
15 changes: 14 additions & 1 deletion pkg/handlers/primeapiv3/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,26 @@ func NewPrimeAPI(handlerConfig handlers.HandlerConfig) *primev3operations.Mymove
addressCreator,
)

mtoServiceItemCreator := mtoserviceitem.NewMTOServiceItemCreator(
handlerConfig.HHGPlanner(),
queryBuilder,
moveRouter,
ghcrateengine.NewDomesticUnpackPricer(),
ghcrateengine.NewDomesticPackPricer(),
ghcrateengine.NewDomesticLinehaulPricer(),
ghcrateengine.NewDomesticShorthaulPricer(),
ghcrateengine.NewDomesticOriginPricer(),
ghcrateengine.NewDomesticDestinationPricer(),
ghcrateengine.NewFuelSurchargePricer())

ppmShipmentUpdater := ppmshipment.NewPPMShipmentUpdater(ppmEstimator, addressCreator, addressUpdater)
boatShipmentUpdater := boatshipment.NewBoatShipmentUpdater()
mobileHomeShipmentUpdater := mobilehomeshipment.NewMobileHomeShipmentUpdater()
shipmentUpdater := shipment.NewShipmentUpdater(mtoShipmentUpdater, ppmShipmentUpdater, boatShipmentUpdater, mobileHomeShipmentUpdater)
shipmentUpdater := shipment.NewShipmentUpdater(mtoShipmentUpdater, ppmShipmentUpdater, boatShipmentUpdater, mobileHomeShipmentUpdater, mtoServiceItemCreator)
primeAPIV3.MtoShipmentUpdateMTOShipmentHandler = UpdateMTOShipmentHandler{
handlerConfig,
shipmentUpdater,
handlerConfig.DTODPlanner(),
}

return primeAPIV3
Expand Down
2 changes: 2 additions & 0 deletions pkg/handlers/primeapiv3/mto_shipment.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
"github.com/transcom/mymove/pkg/handlers/primeapi"
"github.com/transcom/mymove/pkg/handlers/primeapiv3/payloads"
"github.com/transcom/mymove/pkg/models"
"github.com/transcom/mymove/pkg/route"
"github.com/transcom/mymove/pkg/services"
mtoshipment "github.com/transcom/mymove/pkg/services/mto_shipment"
)
Expand Down Expand Up @@ -169,6 +170,7 @@ func (h CreateMTOShipmentHandler) Handle(params mtoshipmentops.CreateMTOShipment
type UpdateMTOShipmentHandler struct {
handlers.HandlerConfig
services.ShipmentUpdater
planner route.Planner
}

// Handle handler that updates a mto shipment
Expand Down
Loading

0 comments on commit eaa12d1

Please sign in to comment.