Documentation
¶
Index ¶
- Constants
- Variables
- func BaseServiceItems(mtoShipmentID uuid.UUID) []models.MTOServiceItem
- func CalculateSITCost(appCtx appcontext.AppContext, ppmShipment *models.PPMShipment, ...) (*unit.Cents, error)
- func CalculateSITCostBreakdown(appCtx appcontext.AppContext, ppmShipment *models.PPMShipment, ...) (*models.PPMSITEstimatedCostInfo, error)
- func FetchPPMShipmentFromMTOShipmentID(appCtx appcontext.AppContext, mtoShipmentID uuid.UUID) (*models.PPMShipment, error)
- func FindPPMShipment(appCtx appcontext.AppContext, id uuid.UUID) (*models.PPMShipment, error)
- func FindPPMShipmentAndWeightTickets(appCtx appcontext.AppContext, id uuid.UUID) (*models.PPMShipment, error)
- func FindPPMShipmentByMTOID(appCtx appcontext.AppContext, mtoID uuid.UUID) (*models.PPMShipment, error)
- func FindPPMShipmentWithDocument(appCtx appcontext.AppContext, ppmShipmentID uuid.UUID, documentID uuid.UUID) error
- func GetListOfAllPostloadAssociations() []string
- func GetListOfAllPreloadAssociations() []string
- func IsPrimeCounseledPPM(appCtx appcontext.AppContext, mtoShipmentID uuid.UUID) (bool, error)
- func MapPPMShipmentEstimatedFields(appCtx appcontext.AppContext, ppmShipment models.PPMShipment) (models.MTOShipment, error)
- func MapPPMShipmentFinalFields(ppmShipment models.PPMShipment, totalWeight unit.Pound) models.MTOShipment
- func NewAOAPacketCreator(sswPPMGenerator services.SSWPPMGenerator, ...) services.AOAPacketCreator
- func NewEstimatePPM(planner route.Planner, paymentRequestHelper paymentrequesthelper.Helper) services.PPMEstimator
- func NewPPMDocumentFetcher() services.PPMDocumentFetcher
- func NewPPMShipmentCreator(estimator services.PPMEstimator, addressCreator services.AddressCreator) services.PPMShipmentCreator
- func NewPPMShipmentFetcher() services.PPMShipmentFetcher
- func NewPPMShipmentNewSubmitter(ppmShipmentFetcher services.PPMShipmentFetcher, ...) services.PPMShipmentNewSubmitter
- func NewPPMShipmentReviewDocuments(ppmShipmentRouter services.PPMShipmentRouter, ...) services.PPMShipmentReviewDocuments
- func NewPPMShipmentRouter(shipmentRouter services.ShipmentRouter) services.PPMShipmentRouter
- func NewPPMShipmentUpdatedSubmitter(signedCertificationUpdater services.SignedCertificationUpdater, ...) services.PPMShipmentUpdatedSubmitter
- func NewPPMShipmentUpdater(ppmEstimator services.PPMEstimator, addressCreator services.AddressCreator, ...) services.PPMShipmentUpdater
- func NewPaymentPacketCreator(ppmShipmentFetcher services.PPMShipmentFetcher, ...) services.PaymentPacketCreator
- func StorageServiceItems(mtoShipmentID uuid.UUID, locationType models.SITLocationType, ...) []models.MTOServiceItem
- func SumWeightTickets(ppmShipment, newPPMShipment models.PPMShipment) (originalTotalWeight, newTotalWeight unit.Pound)
Constants ¶
const ( // EagerPreloadAssociationShipment is the name of the association for the shipment EagerPreloadAssociationShipment = "Shipment" // EagerPreloadAssociationServiceMember is the name of the association for the service member EagerPreloadAssociationServiceMember = "Shipment.MoveTaskOrder.Orders.ServiceMember" // EagerPreloadAssociationWeightTickets is the name of the association for the weight tickets EagerPreloadAssociationWeightTickets = "WeightTickets" // EagerPreloadAssociationProgearWeightTickets is the name of the association for the pro-gear weight tickets EagerPreloadAssociationProgearWeightTickets = "ProgearWeightTickets" // EagerPreloadAssociationMovingExpenses is the name of the association for the moving expenses EagerPreloadAssociationMovingExpenses = "MovingExpenses" // EagerPreloadAssociationW2Address is the name of the association for the W2 address EagerPreloadAssociationW2Address = "W2Address" // EagerPreloadAssociationAOAPacket is the name of the association for the AOA packet EagerPreloadAssociationAOAPacket = "AOAPacket" // EagerPreloadAssociationPaymentPacket is the name of the association for the payment packet EagerPreloadAssociationPaymentPacket = "PaymentPacket" // EagerPreloadAssociationPickupAddress is the name of the association for the Pickup address EagerPreloadAssociationPickupAddress = "PickupAddress" // EagerPreloadAssociationSecondaryPickupAddress is the name of the association for the Secondary Pickup address EagerPreloadAssociationSecondaryPickupAddress = "SecondaryPickupAddress" // EagerPreloadAssociationSecondaryPickupAddress is the name of the association for the Tertiary Pickup address EagerPreloadAssociationTertiaryPickupAddress = "TertiaryPickupAddress" // EagerPreloadAssociationDestinationAddress is the name of the association for the Destination address EagerPreloadAssociationDestinationAddress = "DestinationAddress" // EagerPreloadAssociationSecondaryDestinationAddress is the name of the association for the Secondary Destination address EagerPreloadAssociationSecondaryDestinationAddress = "SecondaryDestinationAddress" // EagerPreloadAssociationSecondaryDestinationAddress is the name of the association for the Tertiary Destination address EagerPreloadAssociationTertiaryDestinationAddress = "TertiaryDestinationAddress" )
These are helper constants for requesting eager preload associations
const ( // PostLoadAssociationSignedCertification is the name of the association for the signed certification PostLoadAssociationSignedCertification = "SignedCertification" // PostLoadAssociationWeightTicketUploads is the name of the association for the weight ticket uploads PostLoadAssociationWeightTicketUploads = "WeightTicketUploads" // PostLoadAssociationProgearWeightTicketUploads is the name of the association for the pro-gear weight ticket uploads PostLoadAssociationProgearWeightTicketUploads = "ProgearWeightTicketUploads" // PostLoadAssociationMovingExpenseUploads is the name of the association for the moving expense uploads PostLoadAssociationMovingExpenseUploads = "MovingExpenseUploads" // PostLoadAssociationUploadedOrders is the name of the association for the orders uploaded by the service member PostLoadAssociationUploadedOrders = "UploadedOrders" )
These are helper constants for requesting post load associations, meaning associations that can't be eager pre-loaded due to bugs in pop
Variables ¶
var PPMShipmentUpdaterChecks = []ppmShipmentValidator{
checkShipmentType(),
checkShipmentID(),
checkPPMShipmentID(),
checkRequiredFields(),
checkAdvanceAmountRequested(),
}
Functions ¶
func BaseServiceItems ¶
func BaseServiceItems(mtoShipmentID uuid.UUID) []models.MTOServiceItem
baseServiceItems returns a list of the MTOServiceItems that makeup the price of the estimated incentive. These are the same non-accesorial service items that get auto-created and approved when the TOO approves an HHG shipment.
func CalculateSITCost ¶
func CalculateSITCost(appCtx appcontext.AppContext, ppmShipment *models.PPMShipment, contract models.ReContract) (*unit.Cents, error)
func CalculateSITCostBreakdown ¶
func CalculateSITCostBreakdown(appCtx appcontext.AppContext, ppmShipment *models.PPMShipment, contract models.ReContract) (*models.PPMSITEstimatedCostInfo, error)
func FetchPPMShipmentFromMTOShipmentID ¶
func FetchPPMShipmentFromMTOShipmentID(appCtx appcontext.AppContext, mtoShipmentID uuid.UUID) (*models.PPMShipment, error)
func FindPPMShipment ¶
func FindPPMShipment(appCtx appcontext.AppContext, id uuid.UUID) (*models.PPMShipment, error)
FindPPMShipment returns a PPMShipment with associations by ID
func FindPPMShipmentAndWeightTickets ¶
func FindPPMShipmentAndWeightTickets(appCtx appcontext.AppContext, id uuid.UUID) (*models.PPMShipment, error)
func FindPPMShipmentByMTOID ¶
func FindPPMShipmentByMTOID(appCtx appcontext.AppContext, mtoID uuid.UUID) (*models.PPMShipment, error)
func FindPPMShipmentWithDocument ¶
func FindPPMShipmentWithDocument(appCtx appcontext.AppContext, ppmShipmentID uuid.UUID, documentID uuid.UUID) error
func GetListOfAllPostloadAssociations ¶
func GetListOfAllPostloadAssociations() []string
GetListOfAllPostloadAssociations returns all associations for a PPMShipment that can't be eagerly preloaded due to bugs in pop
func GetListOfAllPreloadAssociations ¶
func GetListOfAllPreloadAssociations() []string
GetListOfAllPreloadAssociations returns all associations for a PPMShipment that can be eagerly preloaded for ease of use.
func IsPrimeCounseledPPM ¶
func IsPrimeCounseledPPM(appCtx appcontext.AppContext, mtoShipmentID uuid.UUID) (bool, error)
returns true if moves orders are from a location that does not provide service counseling
func MapPPMShipmentEstimatedFields ¶
func MapPPMShipmentEstimatedFields(appCtx appcontext.AppContext, ppmShipment models.PPMShipment) (models.MTOShipment, error)
mapPPMShipmentEstimatedFields remaps our PPMShipment specific information into the fields where the service param lookups expect to find them on the MTOShipment model. This is only in-memory and shouldn't get saved to the database.
func MapPPMShipmentFinalFields ¶
func MapPPMShipmentFinalFields(ppmShipment models.PPMShipment, totalWeight unit.Pound) models.MTOShipment
mapPPMShipmentFinalFields remaps our PPMShipment specific information into the fields where the service param lookups expect to find them on the MTOShipment model. This is only in-memory and shouldn't get saved to the database.
func NewAOAPacketCreator ¶
func NewAOAPacketCreator( sswPPMGenerator services.SSWPPMGenerator, sswPPMComputer services.SSWPPMComputer, primeDownloadMoveUploadPDFGenerator services.PrimeDownloadMoveUploadPDFGenerator, userUploader *uploader.UserUploader, pdfGenerator *paperwork.Generator, ) services.AOAPacketCreator
NewAOAPacketCreator creates a new AOAPacketCreator with all of its dependencies
func NewEstimatePPM ¶
func NewEstimatePPM(planner route.Planner, paymentRequestHelper paymentrequesthelper.Helper) services.PPMEstimator
NewEstimatePPM returns the estimatePPM (pass in checkRequiredFields() and checkEstimatedWeight)
func NewPPMDocumentFetcher ¶
func NewPPMDocumentFetcher() services.PPMDocumentFetcher
NewPPMDocumentFetcher creates a new struct
func NewPPMShipmentCreator ¶
func NewPPMShipmentCreator(estimator services.PPMEstimator, addressCreator services.AddressCreator) services.PPMShipmentCreator
NewPPMShipmentCreator creates a new struct with the service dependencies
func NewPPMShipmentFetcher ¶
func NewPPMShipmentFetcher() services.PPMShipmentFetcher
NewPPMShipmentFetcher creates a new PPMShipmentFetcher
func NewPPMShipmentNewSubmitter ¶
func NewPPMShipmentNewSubmitter( ppmShipmentFetcher services.PPMShipmentFetcher, signedCertificationCreator services.SignedCertificationCreator, ppmShipmentRouter services.PPMShipmentRouter, ) services.PPMShipmentNewSubmitter
NewPPMShipmentNewSubmitter creates a new ppmShipmentNewSubmitter
func NewPPMShipmentReviewDocuments ¶
func NewPPMShipmentReviewDocuments( ppmShipmentRouter services.PPMShipmentRouter, signedCertificationCreator services.SignedCertificationCreator, signedCertificationUpdater services.SignedCertificationUpdater, ) services.PPMShipmentReviewDocuments
NewPPMShipmentReviewDocuments creates a new ppmShipmentReviewDocuments
func NewPPMShipmentRouter ¶
func NewPPMShipmentRouter(shipmentRouter services.ShipmentRouter) services.PPMShipmentRouter
NewPPMShipmentRouter creates a new ppmShipmentRouter
func NewPPMShipmentUpdatedSubmitter ¶
func NewPPMShipmentUpdatedSubmitter( signedCertificationUpdater services.SignedCertificationUpdater, ppmShipmentRouter services.PPMShipmentRouter, ) services.PPMShipmentUpdatedSubmitter
NewPPMShipmentUpdatedSubmitter creates a new ppmShipmentUpdatedSubmitter
func NewPPMShipmentUpdater ¶
func NewPPMShipmentUpdater(ppmEstimator services.PPMEstimator, addressCreator services.AddressCreator, addressUpdater services.AddressUpdater) services.PPMShipmentUpdater
func NewPaymentPacketCreator ¶
func NewPaymentPacketCreator( ppmShipmentFetcher services.PPMShipmentFetcher, pdfGenerator *paperwork.Generator, aoaPacketCreator services.AOAPacketCreator, ) services.PaymentPacketCreator
NewPaymentPacketCreator creates a new PaymentPacketCreator with all of its dependencies
func StorageServiceItems ¶
func StorageServiceItems(mtoShipmentID uuid.UUID, locationType models.SITLocationType, additionalDaysInSIT int) []models.MTOServiceItem
func SumWeightTickets ¶
func SumWeightTickets(ppmShipment, newPPMShipment models.PPMShipment) (originalTotalWeight, newTotalWeight unit.Pound)
SumWeightTickets return the total weight of all weightTickets associated with a PPMShipment, returns 0 if there is no valid weight
Types ¶
This section is empty.
Source Files
¶
- aoa_packet_creator.go
- payment_packet_creator.go
- ppm_document_fetcher.go
- ppm_estimator.go
- ppm_shipment_creator.go
- ppm_shipment_fetcher.go
- ppm_shipment_new_submitter.go
- ppm_shipment_review_documents.go
- ppm_shipment_router.go
- ppm_shipment_updated_submitter.go
- ppm_shipment_updater.go
- rules.go
- validation.go