primeapi

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: 52 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

CreateableServiceItemMap is a map of MTOServiceItemModelTypes and their allowed statuses THIS WILL NEED TO BE UPDATED AS WE CONTINUE TO ADD MORE SERVICE ITEMS. We will eventually remove this when all service items are added.

Functions

func GetMapKeys

GetMapKeys is a helper function that returns the keys that are MTOServiceItemModelTypes from the map

func NewPrimeAPI

func NewPrimeAPI(handlerConfig handlers.HandlerConfig) *primeoperations.MymoveAPI

NewPrimeAPI returns the Prime API

Types

type AllowedParamKeys

type AllowedParamKeys map[models.ReServiceCode][]models.ServiceItemParamName

AllowedParamKeys contains a list of param keys that are permitted in a particular context

var (
	// AllowedParamKeysPaymentRequest includes the param keys that we allow to be set by the prime while
	// creating a payment request
	AllowedParamKeysPaymentRequest AllowedParamKeys = map[models.ReServiceCode][]models.ServiceItemParamName{
		models.ReServiceCodeDOASIT: {
			models.ServiceItemParamNameSITPaymentRequestStart,
			models.ServiceItemParamNameSITPaymentRequestEnd,
			models.ServiceItemParamNameWeightBilled,
		},
		models.ReServiceCodeDDASIT: {
			models.ServiceItemParamNameSITPaymentRequestStart,
			models.ServiceItemParamNameSITPaymentRequestEnd,
			models.ServiceItemParamNameWeightBilled,
		},
		models.ReServiceCodeDOFSIT: {
			models.ServiceItemParamNameWeightBilled,
		},
		models.ReServiceCodeDLH: {
			models.ServiceItemParamNameWeightBilled,
		},
		models.ReServiceCodeFSC: {
			models.ServiceItemParamNameWeightBilled,
		},
		models.ReServiceCodeDSH: {
			models.ServiceItemParamNameWeightBilled,
		},
		models.ReServiceCodeDUPK: {
			models.ServiceItemParamNameWeightBilled,
		},
		models.ReServiceCodeDNPK: {
			models.ServiceItemParamNameWeightBilled,
		},
		models.ReServiceCodeDOPSIT: {
			models.ServiceItemParamNameWeightBilled,
		},
		models.ReServiceCodeDDDSIT: {
			models.ServiceItemParamNameWeightBilled,
		},
		models.ReServiceCodeDDSHUT: {
			models.ServiceItemParamNameWeightBilled,
		},
		models.ReServiceCodeDOSHUT: {
			models.ServiceItemParamNameWeightBilled,
		},
		models.ReServiceCodeDDFSIT: {
			models.ServiceItemParamNameWeightBilled,
		},
		models.ReServiceCodeDOP: {
			models.ServiceItemParamNameWeightBilled,
		},
		models.ReServiceCodeDDP: {
			models.ServiceItemParamNameWeightBilled,
		},
		models.ReServiceCodeDPK: {
			models.ServiceItemParamNameWeightBilled,
		},
		models.ReServiceCodeDDSFSC: {
			models.ServiceItemParamNameWeightBilled,
		},
		models.ReServiceCodeDOSFSC: {
			models.ServiceItemParamNameWeightBilled,
		},
	}
)

func (AllowedParamKeys) Contains

func (apk AllowedParamKeys) Contains(serviceCode models.ReServiceCode, paramKeyName string) bool

Contains checks to see if the provided param key is valid for the given service code

type CreateExcessWeightRecordHandler

type CreateExcessWeightRecordHandler struct {
	handlers.HandlerConfig
	// contains filtered or unexported fields
}

CreateExcessWeightRecordHandler uploads an excess weight record file

func (CreateExcessWeightRecordHandler) Handle

Handle uploads the file passed into the request and updates the move

type CreateMTOAgentHandler

type CreateMTOAgentHandler struct {
	handlers.HandlerConfig
	MTOAgentCreator services.MTOAgentCreator
}

CreateMTOAgentHandler is the handler to create an agent

func (CreateMTOAgentHandler) Handle

Handle created an MTO Agent for a shipment

type CreateMTOServiceItemHandler

type CreateMTOServiceItemHandler struct {
	handlers.HandlerConfig
	// contains filtered or unexported fields
}

CreateMTOServiceItemHandler is the handler to create MTO service items

func (CreateMTOServiceItemHandler) Handle

Handle handler that creates a mto service item

type CreateMTOShipmentHandler

type CreateMTOShipmentHandler struct {
	handlers.HandlerConfig
	services.ShipmentCreator
	// contains filtered or unexported fields
}

CreateMTOShipmentHandler is the handler to create MTO shipments

func (CreateMTOShipmentHandler) Handle

Handle creates the mto shipment

type CreatePaymentRequestHandler

type CreatePaymentRequestHandler struct {
	handlers.HandlerConfig
	services.PaymentRequestCreator
}

CreatePaymentRequestHandler is the handler for creating payment requests

func (CreatePaymentRequestHandler) Handle

Handle creates the payment request

type CreateSITAddressUpdateRequestHandler

type CreateSITAddressUpdateRequestHandler struct {
	handlers.HandlerConfig
	SITAddressUpdateRequestCreator services.SITAddressUpdateRequestCreator
}

CreateSITAddressUpdateRequestHandler is the handler to create a address update request

func (CreateSITAddressUpdateRequestHandler) Handle

Handle creates the address update request

type CreateSITExtensionHandler

type CreateSITExtensionHandler struct {
	handlers.HandlerConfig
	SITExtensionCreator services.SITExtensionCreator
}

CreateSITExtensionHandler is the handler to create a sit extension

func (CreateSITExtensionHandler) Handle

Handle created a sit extension for a shipment

type CreateUploadHandler

type CreateUploadHandler struct {
	handlers.HandlerConfig
	services.PaymentRequestUploadCreator
}

CreateUploadHandler is the create upload handler

func (CreateUploadHandler) Handle

Handle creates uploads

type DeleteMTOShipmentHandler

type DeleteMTOShipmentHandler struct {
	handlers.HandlerConfig
	services.ShipmentDeleter
}

DeleteMTOShipmentHandler is the handler to soft delete MTO shipments

func (DeleteMTOShipmentHandler) Handle

Handle handler that updates a mto shipment

type DownloadMoveOrderHandler

DownloadMoveOrderHandler is the struct to download all move orders by locator as a PDF

func (DownloadMoveOrderHandler) Handle

Handler for downloading move order by locator as a PDF

type GetMoveTaskOrderHandler

type GetMoveTaskOrderHandler struct {
	handlers.HandlerConfig
	// contains filtered or unexported fields
}

GetMoveTaskOrderHandler returns the details for a particular move

func (GetMoveTaskOrderHandler) Handle

Handle fetches a move from the database using its UUID or move code

type ListMovesHandler

type ListMovesHandler struct {
	handlers.HandlerConfig
	services.MoveTaskOrderFetcher
}

ListMovesHandler lists moves with the option to filter since a particular date. Optimized ver.

func (ListMovesHandler) Handle

Handle fetches all moves with the option to filter since a particular date. Optimized version.

type UpdateMTOAgentHandler

type UpdateMTOAgentHandler struct {
	handlers.HandlerConfig
	MTOAgentUpdater services.MTOAgentUpdater
}

UpdateMTOAgentHandler is the handler to update an agent

func (UpdateMTOAgentHandler) Handle

Handle updates an MTO Agent for a shipment

type UpdateMTOPostCounselingInformationHandler

type UpdateMTOPostCounselingInformationHandler struct {
	handlers.HandlerConfig
	services.Fetcher
	services.MoveTaskOrderUpdater
	// contains filtered or unexported fields
}

UpdateMTOPostCounselingInformationHandler updates the move with post-counseling information

func (UpdateMTOPostCounselingInformationHandler) Handle

Handle updates to move post-counseling

type UpdateMTOServiceItemHandler

type UpdateMTOServiceItemHandler struct {
	handlers.HandlerConfig
	services.MTOServiceItemUpdater
}

UpdateMTOServiceItemHandler is the handler to update MTO service items

func (UpdateMTOServiceItemHandler) Handle

Handle handler that updates an MTOServiceItem. Only a limited number of service items and fields may be updated.

type UpdateMTOShipmentAddressHandler

type UpdateMTOShipmentAddressHandler struct {
	handlers.HandlerConfig
	MTOShipmentAddressUpdater services.MTOShipmentAddressUpdater
}

UpdateMTOShipmentAddressHandler is the handler to update an address

func (UpdateMTOShipmentAddressHandler) Handle

Handle updates an address on a shipment

type UpdateMTOShipmentHandler

type UpdateMTOShipmentHandler struct {
	handlers.HandlerConfig
	services.ShipmentUpdater
}

UpdateMTOShipmentHandler is the handler to update MTO shipments

func (UpdateMTOShipmentHandler) Handle

Handle handler that updates a mto shipment

type UpdateMTOShipmentStatusHandler

type UpdateMTOShipmentStatusHandler struct {
	handlers.HandlerConfig
	// contains filtered or unexported fields
}

UpdateMTOShipmentStatusHandler is the handler to update MTO Shipments' status

func (UpdateMTOShipmentStatusHandler) Handle

Handle handler that updates a mto shipment's status

type UpdateReweighHandler

type UpdateReweighHandler struct {
	handlers.HandlerConfig
	ReweighUpdater services.ReweighUpdater
}

UpdateReweighHandler is the handler to update a reweigh

func (UpdateReweighHandler) Handle

Handle updates on a reweigh

type UpdateShipmentDestinationAddressHandler

type UpdateShipmentDestinationAddressHandler struct {
	handlers.HandlerConfig
	services.ShipmentAddressUpdateRequester
}

UpdateShipmentDestinationAddressHandler is the handler to create address update request for non-SIT

func (UpdateShipmentDestinationAddressHandler) Handle

Handle creates the address update request for non-SIT

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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