Documentation ¶
Index ¶
- Constants
- Variables
- func FetchContractCode(appCtx appcontext.AppContext, date time.Time) (string, error)
- func LookupEIAFuelPrice(appCtx appcontext.AppContext, pickupDate time.Time) (unit.Millicents, error)
- func LookupFSCWeightBasedDistanceMultiplier(appCtx appcontext.AppContext, primeEstimatedWeight unit.Pound) (string, error)
- func NewMTOServiceItemCreator(planner route.Planner, builder createMTOServiceItemQueryBuilder, ...) services.MTOServiceItemCreator
- func NewMTOServiceItemFetcher() services.MTOServiceItemFetcher
- func NewMTOServiceItemUpdater(planner route.Planner, builder mtoServiceItemQueryBuilder, ...) services.MTOServiceItemUpdater
- func NewServiceRequestDocumentUploadCreator(fileStorer storage.FileStorer) services.ServiceRequestDocumentUploadCreator
- func ValidateUpdateMTOServiceItem(appCtx appcontext.AppContext, serviceItemData *updateMTOServiceItemData, ...) (*models.MTOServiceItem, error)
Constants ¶
const DestinationSITLocation = "DESTINATION"
DestinationSITLocation is the constant representing when the shipment in storage occurs at the destination
const GracePeriodDays = 5
Number of days of grace period after customer contacts prime for delivery out of SIT
const OriginSITLocation = "ORIGIN"
OriginSITLocation is the constant representing when the shipment in storage occurs at the origin
const UpdateMTOServiceItemBasicValidator string = "UpdateMTOServiceItemBasicValidator"
UpdateMTOServiceItemBasicValidator is the key for generic validation on the MTO Service Item
const UpdateMTOServiceItemPrimeValidator string = "UpdateMTOServiceItemPrimeValidator"
UpdateMTOServiceItemPrimeValidator is the key for validating the MTO Service Item for the Prime contractor
const ( // VersionTimeFormat is the Go time format for creating a version number. VersionTimeFormat string = "20060102150405" )
Variables ¶
var ( OriginReServiceCodesAllowedForSITDepartureDateUpdate = []models.ReServiceCode{models.ReServiceCodeDOPSIT, models.ReServiceCodeDOFSIT, models.ReServiceCodeDOASIT} DestinationReServiceCodesAllowedForSITDepartureDateUpdate = []models.ReServiceCode{models.ReServiceCodeDDDSIT, models.ReServiceCodeDDASIT} ReServiceCodesAllowedForSITDepartureDateUpdate = append(DestinationReServiceCodesAllowedForSITDepartureDateUpdate, OriginReServiceCodesAllowedForSITDepartureDateUpdate...) )
Manual updates to SIT Departure dates are allowed for these service items
var UpdateMTOServiceItemValidators = map[string]updateMTOServiceItemValidator{ UpdateMTOServiceItemBasicValidator: new(basicUpdateMTOServiceItemValidator), UpdateMTOServiceItemPrimeValidator: new(primeUpdateMTOServiceItemValidator), }
UpdateMTOServiceItemValidators is the map connecting the constant keys to the correct validator
Functions ¶
func FetchContractCode ¶
func FetchContractCode(appCtx appcontext.AppContext, date time.Time) (string, error)
func LookupEIAFuelPrice ¶
func LookupEIAFuelPrice(appCtx appcontext.AppContext, pickupDate time.Time) (unit.Millicents, error)
func LookupFSCWeightBasedDistanceMultiplier ¶
func LookupFSCWeightBasedDistanceMultiplier(appCtx appcontext.AppContext, primeEstimatedWeight unit.Pound) (string, error)
func NewMTOServiceItemCreator ¶
func NewMTOServiceItemCreator(planner route.Planner, builder createMTOServiceItemQueryBuilder, moveRouter services.MoveRouter, unpackPricer services.DomesticUnpackPricer, packPricer services.DomesticPackPricer, linehaulPricer services.DomesticLinehaulPricer, shorthaulPricer services.DomesticShorthaulPricer, originPricer services.DomesticOriginPricer, destinationPricer services.DomesticDestinationPricer, fuelSurchargePricer services.FuelSurchargePricer) services.MTOServiceItemCreator
NewMTOServiceItemCreator returns a new MTO service item creator
func NewMTOServiceItemFetcher ¶
func NewMTOServiceItemFetcher() services.MTOServiceItemFetcher
NewMTOServiceItemFetcher creates a new MTOServiceItemFetcher struct
func NewMTOServiceItemUpdater ¶
func NewMTOServiceItemUpdater(planner route.Planner, builder mtoServiceItemQueryBuilder, moveRouter services.MoveRouter, shipmentFetcher services.MTOShipmentFetcher, addressCreator services.AddressCreator) services.MTOServiceItemUpdater
NewMTOServiceItemUpdater returns a new mto service item updater
func NewServiceRequestDocumentUploadCreator ¶
func NewServiceRequestDocumentUploadCreator(fileStorer storage.FileStorer) services.ServiceRequestDocumentUploadCreator
NewServiceRequestDocumentUploadCreator returns a new payment request upload creator
func ValidateUpdateMTOServiceItem ¶
func ValidateUpdateMTOServiceItem(appCtx appcontext.AppContext, serviceItemData *updateMTOServiceItemData, validatorKey string) (*models.MTOServiceItem, error)
ValidateUpdateMTOServiceItem checks the provided serviceItemData struct against the validator indicated by validatorKey. Defaults to base validation if the empty string is entered as the key. Returns an MTOServiceItem that has been set up for update.
Types ¶
This section is empty.