serviceparamvaluelookups

package
v0.0.0-...-c407d37 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

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)

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

type DistanceZipLookup struct {
	PickupAddress      models.Address
	DestinationAddress models.Address
}

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

type SITScheduleLookup struct {
	Address models.Address
}

SITScheduleLookup does lookup on services schedule origin

type ServiceAreaLookup

type ServiceAreaLookup struct {
	Address models.Address
}

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

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

type ServicesScheduleLookup struct {
	Address models.Address
}

ServicesScheduleLookup does lookup on services schedule origin

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

type ZipAddressLookup struct {
	Address models.Address
}

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

Jump to

Keyboard shortcuts

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