Skip to content

Commit

Permalink
Merge pull request #14448 from transcom/B-21557-INT-Estimated-Price
Browse files Browse the repository at this point in the history
B 21557 INT find Estimated price when shipment is updated with an estimated weight where there isn't one previously
  • Loading branch information
joeydoyecaci authored Jan 3, 2025
2 parents 0f9035b + ec9c0a8 commit b3502d3
Show file tree
Hide file tree
Showing 18 changed files with 165 additions and 57 deletions.
21 changes: 17 additions & 4 deletions pkg/handlers/ghcapi/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,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 @@ -232,7 +245,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 @@ -411,7 +424,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()),
),
Expand Down Expand Up @@ -479,7 +492,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.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ func (h UpdateServiceItemSitEntryDateHandler) Handle(params mtoserviceitemop.Upd

existingETag := etag.GenerateEtag(shipment.UpdatedAt)

shipment, err = h.UpdateShipment(appCtx, &shipmentWithSITInfo, existingETag, "ghc")
shipment, err = h.UpdateShipment(appCtx, &shipmentWithSITInfo, existingETag, "ghc", nil)
if err != nil {
appCtx.Logger().Error(fmt.Sprintf("Could not update the shipment SIT auth end date for shipment ID: %s: %s", shipment.ID, err))
}
Expand Down Expand Up @@ -266,7 +266,7 @@ func (h UpdateMTOServiceItemStatusHandler) Handle(params mtoserviceitemop.Update

existingETag := etag.GenerateEtag(shipment.UpdatedAt)

shipment, err = h.UpdateShipment(appCtx, &shipmentWithSITInfo, existingETag, "ghc")
shipment, err = h.UpdateShipment(appCtx, &shipmentWithSITInfo, existingETag, "ghc", nil)
if err != nil {
appCtx.Logger().Error(fmt.Sprintf("Could not update the shipment SIT auth end date for shipment ID: %s: %s", shipment.ID, err))
}
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 @@ -332,7 +332,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 @@ -785,7 +785,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
6 changes: 3 additions & 3 deletions pkg/handlers/ghcapi/mto_shipment.go
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ func (h UpdateShipmentHandler) Handle(params mtoshipmentops.UpdateMTOShipmentPar
mtoShipment.PrimeEstimatedWeight = &previouslyRecordedWeight
}

updatedMtoShipment, err := h.ShipmentUpdater.UpdateShipment(appCtx, mtoShipment, params.IfMatch, "ghc")
updatedMtoShipment, err := h.ShipmentUpdater.UpdateShipment(appCtx, mtoShipment, params.IfMatch, "ghc", nil)
if err != nil {
return handleError(err)
}
Expand Down Expand Up @@ -1124,7 +1124,7 @@ func (h ApproveSITExtensionHandler) Handle(params shipmentops.ApproveSITExtensio

existingETag := etag.GenerateEtag(updatedShipment.UpdatedAt)

updatedShipment, err = h.UpdateShipment(appCtx, &shipmentWithSITInfo, existingETag, "ghc")
updatedShipment, err = h.UpdateShipment(appCtx, &shipmentWithSITInfo, existingETag, "ghc", nil)
if err != nil {
return handleError(err)
}
Expand Down Expand Up @@ -1371,7 +1371,7 @@ func (h CreateApprovedSITDurationUpdateHandler) Handle(params shipmentops.Create

existingETag := etag.GenerateEtag(shipment.UpdatedAt)

shipment, err = h.UpdateShipment(appCtx, &shipmentWithSITInfo, existingETag, "ghc")
shipment, err = h.UpdateShipment(appCtx, &shipmentWithSITInfo, existingETag, "ghc", nil)
if err != nil {
return handleError(err)
}
Expand Down
23 changes: 12 additions & 11 deletions pkg/handlers/ghcapi/mto_shipment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2778,7 +2778,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 @@ -2921,7 +2921,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 @@ -3008,7 +3008,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 @@ -4086,7 +4086,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 @@ -4154,7 +4154,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 @@ -4342,7 +4342,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 @@ -4422,7 +4422,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 @@ -4502,7 +4502,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 @@ -4540,7 +4540,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 @@ -4580,7 +4580,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 @@ -4621,7 +4621,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 @@ -4665,6 +4665,7 @@ func (suite *HandlerSuite) TestUpdateShipmentHandler() {
mock.Anything,
mock.Anything,
mock.Anything,
nil,
).Return(nil, err)

oldShipment := factory.BuildMTOShipment(suite.DB(), []factory.Customization{
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 @@ -192,11 +192,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 @@ -232,6 +244,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.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ func (h UpdateMTOShipmentHandler) Handle(params mtoshipmentops.UpdateMTOShipment
h.GetTraceIDFromRequest(params.HTTPRequest))), invalidShipmentStatusErr
}

updatedMTOShipment, err := h.shipmentUpdater.UpdateShipment(appCtx, mtoShipment, params.IfMatch, "internal")
updatedMTOShipment, err := h.shipmentUpdater.UpdateShipment(appCtx, mtoShipment, params.IfMatch, "internal", nil)

if err != nil {
appCtx.Logger().Error("internalapi.UpdateMTOShipmentHandler", zap.Error(err))
Expand Down
3 changes: 2 additions & 1 deletion pkg/handlers/internalapi/mto_shipment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,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 Expand Up @@ -1486,6 +1486,7 @@ func (suite *HandlerSuite) TestUpdateMTOShipmentHandler() {
mock.AnythingOfType("*models.MTOShipment"),
mock.AnythingOfType("string"),
mock.AnythingOfType("string"),
nil,
).Return(nil, err)

subtestData := getDefaultMTOShipmentAndParams(&mockUpdater)
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 @@ -51,9 +51,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 @@ -95,10 +107,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
Loading

0 comments on commit b3502d3

Please sign in to comment.