Documentation ¶
Index ¶
- Constants
- func CalculateRequiredDeliveryDate(appCtx appcontext.AppContext, planner route.Planner, ...) (*time.Time, error)
- func FindShipment(appCtx appcontext.AppContext, shipmentID uuid.UUID, ...) (*models.MTOShipment, error)
- func NewCreateSITExtensionAsTOO() services.SITExtensionCreatorAsTOO
- func NewCustomerMTOShipmentUpdater(builder UpdateMTOShipmentQueryBuilder, fetcher services.Fetcher, ...) services.MTOShipmentUpdater
- func NewMTOShipmentAddressUpdater() services.MTOShipmentAddressUpdater
- func NewMTOShipmentCreator(builder createMTOShipmentQueryBuilder, fetcher services.Fetcher, ...) services.MTOShipmentCreator
- func NewMTOShipmentFetcher() services.MTOShipmentFetcher
- func NewMTOShipmentStatusUpdater(builder UpdateMTOShipmentQueryBuilder, ...) services.MTOShipmentStatusUpdater
- func NewMTOShipmentUpdater(builder UpdateMTOShipmentQueryBuilder, fetcher services.Fetcher, ...) services.MTOShipmentUpdater
- func NewOfficeMTOShipmentUpdater(builder UpdateMTOShipmentQueryBuilder, fetcher services.Fetcher, ...) services.MTOShipmentUpdater
- func NewPrimeMTOShipmentUpdater(builder UpdateMTOShipmentQueryBuilder, fetcher services.Fetcher, ...) services.MTOShipmentUpdater
- func NewPrimeShipmentDeleter() services.ShipmentDeleter
- func NewSITExtensionApprover(moveRouter services.MoveRouter) services.SITExtensionApprover
- func NewSITExtensionDenier(moveRouter services.MoveRouter) services.SITExtensionDenier
- func NewShipmentApprover(router services.ShipmentRouter, siCreator services.MTOServiceItemCreator, ...) services.ShipmentApprover
- func NewShipmentBillableWeightCalculator() services.ShipmentBillableWeightCalculator
- func NewShipmentCancellationRequester(router services.ShipmentRouter) services.ShipmentCancellationRequester
- func NewShipmentDeleter() services.ShipmentDeleter
- func NewShipmentDiversionApprover(router services.ShipmentRouter) services.ShipmentDiversionApprover
- func NewShipmentDiversionRequester(router services.ShipmentRouter) services.ShipmentDiversionRequester
- func NewShipmentRejecter(router services.ShipmentRouter) services.ShipmentRejecter
- func NewShipmentReweighRequester() services.ShipmentReweighRequester
- func NewShipmentRouter() services.ShipmentRouter
- func NewShipmentSITStatus() services.ShipmentSITStatus
- type ConflictStatusError
- type StaleIdentifierError
- type UpdateMTOShipmentQueryBuilder
Constants ¶
const DestinationSITLocation = "DESTINATION"
DestinationSITLocation is the constant representing when the shipment in storage occurs at the destination
const OriginSITLocation = "ORIGIN"
OriginSITLocation is the constant representing when the shipment in storage occurs at the origin
Variables ¶
This section is empty.
Functions ¶
func CalculateRequiredDeliveryDate ¶
func CalculateRequiredDeliveryDate(appCtx appcontext.AppContext, planner route.Planner, pickupAddress models.Address, destinationAddress models.Address, pickupDate time.Time, weight int) (*time.Time, error)
CalculateRequiredDeliveryDate function is used to get a distance calculation using the pickup and destination addresses. It then uses the value returned to make a fetch on the ghc_domestic_transit_times table and returns a required delivery date based on the max_days_transit_time.
func FindShipment ¶
func FindShipment(appCtx appcontext.AppContext, shipmentID uuid.UUID, eagerAssociations ...string) (*models.MTOShipment, error)
func NewCreateSITExtensionAsTOO ¶
func NewCreateSITExtensionAsTOO() services.SITExtensionCreatorAsTOO
NewCreateSITExtensionAsTOO creates a new struct with the service dependencies
func NewCustomerMTOShipmentUpdater ¶
func NewCustomerMTOShipmentUpdater(builder UpdateMTOShipmentQueryBuilder, fetcher services.Fetcher, planner route.Planner, moveRouter services.MoveRouter, moveWeights services.MoveWeights, sender notifications.NotificationSender, recalculator services.PaymentRequestShipmentRecalculator) services.MTOShipmentUpdater
TODO: apply the subset of business logic validations that would be appropriate for the CUSTOMER
func NewMTOShipmentAddressUpdater ¶
func NewMTOShipmentAddressUpdater() services.MTOShipmentAddressUpdater
NewMTOShipmentAddressUpdater updates the address for an MTO Shipment
func NewMTOShipmentCreator ¶
func NewMTOShipmentCreator(builder createMTOShipmentQueryBuilder, fetcher services.Fetcher, moveRouter services.MoveRouter) services.MTOShipmentCreator
NewMTOShipmentCreator creates a new struct with the service dependencies
func NewMTOShipmentFetcher ¶
func NewMTOShipmentFetcher() services.MTOShipmentFetcher
NewMTOShipmentFetcher creates a new MTOShipmentFetcher struct that supports ListMTOShipments
func NewMTOShipmentStatusUpdater ¶
func NewMTOShipmentStatusUpdater(builder UpdateMTOShipmentQueryBuilder, siCreator services.MTOServiceItemCreator, planner route.Planner) services.MTOShipmentStatusUpdater
NewMTOShipmentStatusUpdater creates a new MTO Shipment Status Updater
func NewMTOShipmentUpdater ¶
func NewMTOShipmentUpdater(builder UpdateMTOShipmentQueryBuilder, fetcher services.Fetcher, planner route.Planner, moveRouter services.MoveRouter, moveWeights services.MoveWeights, sender notifications.NotificationSender, recalculator services.PaymentRequestShipmentRecalculator) services.MTOShipmentUpdater
NewMTOShipmentUpdater creates a new struct with the service dependencies
func NewOfficeMTOShipmentUpdater ¶
func NewOfficeMTOShipmentUpdater(builder UpdateMTOShipmentQueryBuilder, fetcher services.Fetcher, planner route.Planner, moveRouter services.MoveRouter, moveWeights services.MoveWeights, sender notifications.NotificationSender, recalculator services.PaymentRequestShipmentRecalculator) services.MTOShipmentUpdater
func NewPrimeMTOShipmentUpdater ¶
func NewPrimeMTOShipmentUpdater(builder UpdateMTOShipmentQueryBuilder, fetcher services.Fetcher, planner route.Planner, moveRouter services.MoveRouter, moveWeights services.MoveWeights, sender notifications.NotificationSender, recalculator services.PaymentRequestShipmentRecalculator) services.MTOShipmentUpdater
TODO: apply the subset of business logic validations that would be appropriate for the PRIME
func NewPrimeShipmentDeleter ¶
func NewPrimeShipmentDeleter() services.ShipmentDeleter
NewPrimeShipmentDeleter creates a new struct with the service dependencies
func NewSITExtensionApprover ¶
func NewSITExtensionApprover(moveRouter services.MoveRouter) services.SITExtensionApprover
NewSITExtensionApprover creates a new struct with the service dependencies
func NewSITExtensionDenier ¶
func NewSITExtensionDenier(moveRouter services.MoveRouter) services.SITExtensionDenier
NewSITExtensionDenier creates a new struct with the service dependencies
func NewShipmentApprover ¶
func NewShipmentApprover(router services.ShipmentRouter, siCreator services.MTOServiceItemCreator, planner route.Planner) services.ShipmentApprover
NewShipmentApprover creates a new struct with the service dependencies
func NewShipmentBillableWeightCalculator ¶
func NewShipmentBillableWeightCalculator() services.ShipmentBillableWeightCalculator
NewShipmentBillableWeightCalculator updates the address for an MTO Shipment
func NewShipmentCancellationRequester ¶
func NewShipmentCancellationRequester(router services.ShipmentRouter) services.ShipmentCancellationRequester
NewShipmentCancellationRequester creates a new struct with the service dependencies
func NewShipmentDeleter ¶
func NewShipmentDeleter() services.ShipmentDeleter
NewShipmentDeleter creates a new struct with the service dependencies
func NewShipmentDiversionApprover ¶
func NewShipmentDiversionApprover(router services.ShipmentRouter) services.ShipmentDiversionApprover
NewShipmentDiversionApprover creates a new struct with the service dependencies
func NewShipmentDiversionRequester ¶
func NewShipmentDiversionRequester(router services.ShipmentRouter) services.ShipmentDiversionRequester
NewShipmentDiversionRequester creates a new struct with the service dependencies
func NewShipmentRejecter ¶
func NewShipmentRejecter(router services.ShipmentRouter) services.ShipmentRejecter
NewShipmentRejecter creates a new struct with the service dependencies
func NewShipmentReweighRequester ¶
func NewShipmentReweighRequester() services.ShipmentReweighRequester
NewShipmentReweighRequester creates a new struct with the service dependencies
func NewShipmentRouter ¶
func NewShipmentRouter() services.ShipmentRouter
NewShipmentRouter creates a new shipmentRouter service
func NewShipmentSITStatus ¶
func NewShipmentSITStatus() services.ShipmentSITStatus
NewShipmentSITStatus creates a new instance of the service object that implements calculating a shipments SIT summary
Types ¶
type ConflictStatusError ¶
type ConflictStatusError struct {
// contains filtered or unexported fields
}
ConflictStatusError returns an error for a conflict in status
func (ConflictStatusError) Error ¶
func (e ConflictStatusError) Error() string
Error is the string representation of the error
type StaleIdentifierError ¶
type StaleIdentifierError struct {
StaleIdentifier string
}
StaleIdentifierError is used when optimistic locking determines that the identifier refers to stale data
func (StaleIdentifierError) Error ¶
func (e StaleIdentifierError) Error() string
type UpdateMTOShipmentQueryBuilder ¶
type UpdateMTOShipmentQueryBuilder interface { FetchOne(appCtx appcontext.AppContext, model interface{}, filters []services.QueryFilter) error CreateOne(appCtx appcontext.AppContext, model interface{}) (*validate.Errors, error) UpdateOne(appCtx appcontext.AppContext, model interface{}, eTag *string) (*validate.Errors, error) Count(appCtx appcontext.AppContext, model interface{}, filters []services.QueryFilter) (int, error) FetchMany(appCtx appcontext.AppContext, model interface{}, filters []services.QueryFilter, associations services.QueryAssociations, pagination services.Pagination, ordering services.QueryOrder) error }
UpdateMTOShipmentQueryBuilder is the query builder for updating MTO Shipments
Source Files ¶
- mto_shipment_address_updater.go
- mto_shipment_creator.go
- mto_shipment_fetcher.go
- mto_shipment_updater.go
- shipment_approver.go
- shipment_billable_weight.go
- shipment_cancellation_requester.go
- shipment_deleter.go
- shipment_diversion_approver.go
- shipment_diversion_requester.go
- shipment_rejecter.go
- shipment_reweigh_requester.go
- shipment_router.go
- shipment_sit_status.go
- sit_extension_approver.go
- sit_extension_creator_as_too.go
- sit_extension_denier.go
- validation.go