mtoshipment

package
v0.0.0-...-0751cc3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2022 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const DestinationSITLocation = "DESTINATION"

DestinationSITLocation is the constant representing when the shipment in storage occurs at the destination

View Source
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

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

NewMTOShipmentUpdater creates a new struct with the service dependencies

func NewPrimeMTOShipmentUpdater

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL