Documentation ¶
Index ¶
- Variables
- func FetchContract(appCtx appcontext.AppContext, date time.Time) (models.ReContract, error)
- func GetDestinationForDistanceLookup(appCtx appcontext.AppContext, mtoShipment models.MTOShipment, ...) (models.Address, error)
- func InitializeLookups(appCtx appcontext.AppContext, shipment models.MTOShipment, ...) map[models.ServiceItemParamName]ServiceItemParamKeyLookup
- type ActualPickupDateLookup
- type ContractCodeLookup
- type CubicFeetBilledLookup
- type CubicFeetCratingLookup
- type DimensionHeightLookup
- type DimensionLengthLookup
- type DimensionWidthLookup
- type DistanceZipLookup
- type DistanceZipSITDestLookup
- type DistanceZipSITOriginLookup
- type EIAFuelPriceLookup
- type FSCWeightBasedDistanceMultiplierLookup
- type LockedPriceCentsLookup
- type MTOAvailableToPrimeAtLookup
- type MTOShipmentParamKeyMap
- type NeedsParamKeyMap
- type NotImplementedLookup
- type NumberDaysSITLookup
- type PSILinehaulDomLookup
- type PSILinehaulDomPriceLookup
- type ParamKeyValue
- type ParamKeyValueCacheMap
- type ReferenceDateLookup
- type RequestedPickupDateLookup
- type SITScheduleLookup
- type ServiceAreaLookup
- type ServiceItemParamKeyData
- type ServiceItemParamKeyLookup
- type ServiceParamsCache
- type ServicesScheduleLookup
- type StandaloneCrateCapLookup
- type StandaloneCrateLookup
- type WeightAdjustedLookup
- type WeightBilledLookup
- type WeightEstimatedLookup
- type WeightOriginalLookup
- type WeightReweighLookup
- type ZipAddressLookup
- type ZipSITOriginHHGActualAddressLookup
- type ZipSITOriginHHGOriginalAddressLookup
Constants ¶
This section is empty.
Variables ¶
var ServiceItemParamsWithLookups = []models.ServiceItemParamName{ models.ServiceItemParamNameActualPickupDate, models.ServiceItemParamNameRequestedPickupDate, models.ServiceItemParamNameReferenceDate, models.ServiceItemParamNameDistanceZip, models.ServiceItemParamNameFSCWeightBasedDistanceMultiplier, models.ServiceItemParamNameWeightAdjusted, models.ServiceItemParamNameWeightBilled, models.ServiceItemParamNameWeightEstimated, models.ServiceItemParamNameWeightOriginal, models.ServiceItemParamNameWeightReweigh, models.ServiceItemParamNameZipPickupAddress, models.ServiceItemParamNameZipDestAddress, models.ServiceItemParamNameMTOAvailableToPrimeAt, models.ServiceItemParamNameServiceAreaOrigin, models.ServiceItemParamNameServiceAreaDest, models.ServiceItemParamNameContractCode, models.ServiceItemParamNameCubicFeetBilled, models.ServiceItemParamNamePSILinehaulDom, models.ServiceItemParamNamePSILinehaulDomPrice, models.ServiceItemParamNameEIAFuelPrice, models.ServiceItemParamNameServicesScheduleOrigin, models.ServiceItemParamNameServicesScheduleDest, models.ServiceItemParamNameSITScheduleOrigin, models.ServiceItemParamNameSITScheduleDest, models.ServiceItemParamNameSITServiceAreaDest, models.ServiceItemParamNameSITServiceAreaOrigin, models.ServiceItemParamNameNumberDaysSIT, models.ServiceItemParamNameZipSITDestHHGFinalAddress, models.ServiceItemParamNameZipSITDestHHGOriginalAddress, models.ServiceItemParamNameZipSITOriginHHGOriginalAddress, models.ServiceItemParamNameZipSITOriginHHGActualAddress, models.ServiceItemParamNameDistanceZipSITDest, models.ServiceItemParamNameDistanceZipSITOrigin, models.ServiceItemParamNameCubicFeetCrating, models.ServiceItemParamNameDimensionHeight, models.ServiceItemParamNameDimensionLength, models.ServiceItemParamNameDimensionWidth, models.ServiceItemParamNameStandaloneCrate, models.ServiceItemParamNameStandaloneCrateCap, models.ServiceItemParamNameLockedPriceCents, }
We don't have comprehensive lookups for all SYSTEM and PRIME params so we need a list of those that do exist.
Functions ¶
func FetchContract ¶
func FetchContract(appCtx appcontext.AppContext, date time.Time) (models.ReContract, error)
func GetDestinationForDistanceLookup ¶
func GetDestinationForDistanceLookup(appCtx appcontext.AppContext, mtoShipment models.MTOShipment, mtoServiceItem *models.MTOServiceItem) (models.Address, error)
func InitializeLookups ¶
func InitializeLookups(appCtx appcontext.AppContext, shipment models.MTOShipment, serviceItem models.MTOServiceItem) map[models.ServiceItemParamName]ServiceItemParamKeyLookup
Types ¶
type ActualPickupDateLookup ¶
type ActualPickupDateLookup struct {
MTOShipment models.MTOShipment
}
ActualPickupDateLookup does lookup on actual pickup date
type ContractCodeLookup ¶
type ContractCodeLookup struct { }
ContractCodeLookup looks up the appropriate contract code
type CubicFeetBilledLookup ¶
type CubicFeetBilledLookup struct {
Dimensions models.MTOServiceItemDimensions
}
CubicFeetBilledLookup does lookup for CubicFeetBilled
type CubicFeetCratingLookup ¶
type CubicFeetCratingLookup struct {
Dimensions models.MTOServiceItemDimensions
}
CubicFeetCratingLookup does lookup for CubicFeetCrating
type DimensionHeightLookup ¶
type DimensionHeightLookup struct {
Dimensions models.MTOServiceItemDimensions
}
DimensionHeightLookup does lookup for DimensionHeightLookup
type DimensionLengthLookup ¶
type DimensionLengthLookup struct {
Dimensions models.MTOServiceItemDimensions
}
DimensionLengthLookup does lookup for DimensionLengthLookup
type DimensionWidthLookup ¶
type DimensionWidthLookup struct {
Dimensions models.MTOServiceItemDimensions
}
DimensionWidthLookup does lookup for DimensionWidthLookup
type DistanceZipLookup ¶
DistanceZipLookup contains zip3 lookup
type DistanceZipSITDestLookup ¶
type DistanceZipSITDestLookup struct { DestinationAddress models.Address FinalDestinationAddress models.Address }
DistanceZipSITDestLookup does the lookup of distance for SIT at destination
type DistanceZipSITOriginLookup ¶
type DistanceZipSITOriginLookup struct {
ServiceItem models.MTOServiceItem
}
DistanceZipSITOriginLookup does the lookup of distance for SIT at origin
type EIAFuelPriceLookup ¶
type EIAFuelPriceLookup struct {
MTOShipment models.MTOShipment
}
EIAFuelPriceLookup does lookup on the ghc diesel fuel price
type FSCWeightBasedDistanceMultiplierLookup ¶
type FSCWeightBasedDistanceMultiplierLookup struct {
MTOShipment models.MTOShipment
}
FSCWeightBasedDistanceMultiplierLookup does lookup on fuel surcharge related weight based distance multiplier rate based on billed weight
type LockedPriceCentsLookup ¶
type LockedPriceCentsLookup struct {
ServiceItem models.MTOServiceItem
}
LockedPriceCents does lookup on serviceItem
type MTOAvailableToPrimeAtLookup ¶
type MTOAvailableToPrimeAtLookup struct { }
MTOAvailableToPrimeAtLookup does lookup on the MTOAvailableToPrime timestamp
type MTOShipmentParamKeyMap ¶
type MTOShipmentParamKeyMap map[uuid.UUID]ParamKeyValueCacheMap
MTOShipmentParamKeyMap maps an MTOShipmentID to a map of param caches for that shipment
type NeedsParamKeyMap ¶
type NeedsParamKeyMap map[models.ReServiceCode]keyExistMap
NeedsParamKeyMap param key maps, maps an ReService.Code to a list of param keys used for pricing
type NotImplementedLookup ¶
type NotImplementedLookup struct { }
NotImplementedLookup is the default for unimplemented service item param keys in look-ups
type NumberDaysSITLookup ¶
type NumberDaysSITLookup struct {
MTOShipment models.MTOShipment
}
NumberDaysSITLookup does lookup of the number of SIT days a Move Task Orders MTO Shipment can bill for
type PSILinehaulDomLookup ¶
type PSILinehaulDomLookup struct {
MTOShipment models.MTOShipment
}
PSILinehaulDomLookup does lookup of uuid of payment service item for dom linehaul
type PSILinehaulDomPriceLookup ¶
type PSILinehaulDomPriceLookup struct {
MTOShipment models.MTOShipment
}
PSILinehaulDomPriceLookup does lookup of price in cents of payment service item for dom linehaul
type ParamKeyValue ¶
type ParamKeyValue struct {
// contains filtered or unexported fields
}
ParamKeyValue param cache value
type ParamKeyValueCacheMap ¶
type ParamKeyValueCacheMap map[models.ServiceItemParamName]ParamKeyValue
ParamKeyValueCacheMap maps service param key string to the param cached value
type ReferenceDateLookup ¶
type ReferenceDateLookup struct {
MTOShipment models.MTOShipment
}
ReferenceDateLookup determines the reference date to use for billing (e.g., determining peak vs. non peak, escalations, etc.)
type RequestedPickupDateLookup ¶
type RequestedPickupDateLookup struct {
MTOShipment models.MTOShipment
}
RequestedPickupDateLookup does lookup on requested pickup date
type SITScheduleLookup ¶
SITScheduleLookup does lookup on services schedule origin
type ServiceAreaLookup ¶
ServiceAreaLookup does lookup of service area based on address postal code
func (ServiceAreaLookup) ParamValue ¶
func (r ServiceAreaLookup) ParamValue(appCtx appcontext.AppContext, contractCode string) (string, error)
type ServiceItemParamKeyData ¶
type ServiceItemParamKeyData struct { MTOServiceItemID uuid.UUID MTOServiceItem models.MTOServiceItem PaymentRequestID uuid.UUID MoveTaskOrderID uuid.UUID ContractCode string // contains filtered or unexported fields }
ServiceItemParamKeyData contains service item parameter keys
func NewServiceItemParamKeyData ¶
func NewServiceItemParamKeyData(planner route.Planner, lookups map[models.ServiceItemParamName]ServiceItemParamKeyLookup, mtoServiceItem models.MTOServiceItem, mtoShipment models.MTOShipment, contractCode string) ServiceItemParamKeyData
func ServiceParamLookupInitialize ¶
func ServiceParamLookupInitialize( appCtx appcontext.AppContext, planner route.Planner, mtoServiceItem models.MTOServiceItem, paymentRequestID uuid.UUID, moveTaskOrderID uuid.UUID, paramCache *ServiceParamsCache, ) (*ServiceItemParamKeyData, error)
ServiceParamLookupInitialize initializes service parameter lookup
func (*ServiceItemParamKeyData) ServiceParamValue ¶
func (s *ServiceItemParamKeyData) ServiceParamValue(appCtx appcontext.AppContext, key models.ServiceItemParamName) (string, error)
ServiceParamValue returns a service parameter value from a key
type ServiceItemParamKeyLookup ¶
type ServiceItemParamKeyLookup interface {
// contains filtered or unexported methods
}
ServiceItemParamKeyLookup does lookup on service item parameter keys
type ServiceParamsCache ¶
type ServiceParamsCache struct {
// contains filtered or unexported fields
}
ServiceParamsCache contains service item parameter keys
func NewServiceParamsCache ¶
func NewServiceParamsCache() ServiceParamsCache
NewServiceParamsCache creates a ServiceParamCache with initialized fields
func (*ServiceParamsCache) ParamValue ¶
func (spc *ServiceParamsCache) ParamValue(mtoShipmentID uuid.UUID, paramKey models.ServiceItemParamName) *string
ParamValue returns the caches param value for the given MTOShipmentID
func (*ServiceParamsCache) ServiceItemNeedsParamKey ¶
func (spc *ServiceParamsCache) ServiceItemNeedsParamKey(appCtx appcontext.AppContext, code models.ReServiceCode, paramKey models.ServiceItemParamName) (bool, error)
ServiceItemNeedsParamKey returns true/false if the ReServiceCode uses the particular ServiceItemParamKey for calculating the service item price
type ServicesScheduleLookup ¶
ServicesScheduleLookup does lookup on services schedule origin
type StandaloneCrateCapLookup ¶
type StandaloneCrateCapLookup struct {
ServiceItem models.MTOServiceItem
}
StandaloneCrateCapLookup does lookup on application parameters
type StandaloneCrateLookup ¶
type StandaloneCrateLookup struct {
ServiceItem models.MTOServiceItem
}
StandaloneCrateLookup does lookup on standaloneCrate
type WeightAdjustedLookup ¶
type WeightAdjustedLookup struct {
MTOShipment models.MTOShipment
}
WeightAdjustedLookup does lookup on adjusted weight billed
type WeightBilledLookup ¶
type WeightBilledLookup struct {
MTOShipment models.MTOShipment
}
WeightBilledLookup does lookup on weight billed
type WeightEstimatedLookup ¶
type WeightEstimatedLookup struct {
MTOShipment models.MTOShipment
}
WeightEstimatedLookup does lookup on estimated weight billed
type WeightOriginalLookup ¶
type WeightOriginalLookup struct {
MTOShipment models.MTOShipment
}
WeightOriginalLookup does lookup on original weight
type WeightReweighLookup ¶
type WeightReweighLookup struct {
MTOShipment models.MTOShipment
}
WeightReweighLookup does lookup on estimated weight billed
type ZipAddressLookup ¶
ZipAddressLookup does lookup on the postal code for the pickup address
type ZipSITOriginHHGActualAddressLookup ¶
type ZipSITOriginHHGActualAddressLookup struct {
ServiceItem models.MTOServiceItem
}
ZipSITOriginHHGActualAddressLookup does lookup on the postal code HHG shipment's actual (new) pickup address
type ZipSITOriginHHGOriginalAddressLookup ¶
type ZipSITOriginHHGOriginalAddressLookup struct {
ServiceItem models.MTOServiceItem
}
ZipSITOriginHHGOriginalAddressLookup does lookup on the postal code HHG shipment's original pickup address
Source Files ¶
- actual_pickup_date_lookup.go
- contract_code_lookup.go
- cubic_feet_billed_lookup.go
- cubic_feet_crating_lookup.go
- dimension_height_lookup.go
- dimension_length_lookup.go
- dimension_width_lookup.go
- distance_zip_lookup.go
- distance_zip_sit_dest_lookup.go
- distance_zip_sit_origin_lookup.go
- eia_fuel_price_lookup.go
- fsc_weight_based_distance_multiplier_lookup.go
- locked_price_cents_lookup.go
- lookup_query_helpers.go
- mto_available_to_prime_at_lookup.go
- not_implemented_lookup.go
- number_days_sit_lookup.go
- psi_domestic_linehaul_lookup.go
- reference_date_lookup.go
- requested_pickup_date_lookup.go
- service_area_lookup.go
- service_param_value_lookups.go
- service_params_cache.go
- services_schedule_lookup.go
- sit_schedule_lookup.go
- standalone_crate_cap_lookup.go
- standalone_crate_lookup.go
- weight_adjusted_lookup.go
- weight_billed_lookup.go
- weight_estimated_lookup.go
- weight_original_lookup.go
- weight_reweigh_lookup.go
- zip_address_lookup.go
- zip_sit_origin_hhg_actual_address_lookup.go
- zip_sit_origin_hhg_original_address_lookup.go