payloads

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Address

func Address(address *models.Address) *supportmessages.Address

Address converts Address model to payload

func ClientError

func ClientError(title string, detail string, instance uuid.UUID) *supportmessages.ClientError

ClientError payload contains the default information we send to the client on errors

func Customer

func Customer(customer *models.ServiceMember) *supportmessages.Customer

Customer payload

func CustomerModel

func CustomerModel(customer *supportmessages.Customer) *models.ServiceMember

CustomerModel converts payload to model - currently does not tackle addresses

func Document

func Document(document *models.Document) *supportmessages.Document

Document converts Document model to payload

func DutyLocation

func DutyLocation(dutyLocation *models.DutyLocation) *supportmessages.DutyLocation

DutyLocation converts DutyLocation model to payload Only includes ID and duty location name

func Entitlement

func Entitlement(entitlement *models.Entitlement) *supportmessages.Entitlement

Entitlement payload

func EntitlementModel

func EntitlementModel(entitlementPayload *supportmessages.Entitlement) *models.Entitlement

EntitlementModel converts the payload to model

func InternalServerError

func InternalServerError(detail *string, traceID uuid.UUID) *supportmessages.Error

InternalServerError describes errors in a standard structure to be returned in the payload. If detail is nil, string defaults to "An internal server error has occurred."

func MTOAgent

func MTOAgent(mtoAgent *models.MTOAgent) *supportmessages.MTOAgent

MTOAgent converts MTOAgent model to payload

func MTOAgents

func MTOAgents(mtoAgents *models.MTOAgents) *supportmessages.MTOAgents

MTOAgents converts an array of MTOAgent models to payload array

func MTOHideMove

func MTOHideMove(hiddenMove services.HiddenMove) *supportmessages.MTOHideMove

MTOHideMove translate from service HiddenMove type to API swagger MTOHideMove type

func MTOHideMovesResponse

func MTOHideMovesResponse(hiddenMoves services.HiddenMoves) *supportmessages.MTOHideMovesResponse

MTOHideMovesResponse payload

func MTOServiceItem

func MTOServiceItem(mtoServiceItem *models.MTOServiceItem) supportmessages.MTOServiceItem

MTOServiceItem converts MTOServiceItem model to payload

func MTOServiceItems

func MTOServiceItems(mtoServiceItems *models.MTOServiceItems) *[]supportmessages.MTOServiceItem

MTOServiceItems converts an array of MTOServiceItem models to their payload version

func MTOShipment

func MTOShipment(mtoShipment *models.MTOShipment) *supportmessages.MTOShipment

MTOShipment converts MTOShipment model to payload

func MTOShipments

func MTOShipments(mtoShipments *models.MTOShipments) *supportmessages.MTOShipments

MTOShipments converts an array of MTOShipment models to a payload

func MoveTaskOrder

func MoveTaskOrder(moveTaskOrder *models.Move) *supportmessages.MoveTaskOrder

MoveTaskOrder payload

func MoveTaskOrderModel

func MoveTaskOrderModel(mtoPayload *supportmessages.MoveTaskOrder) *models.Move

MoveTaskOrderModel return an MTO model constructed from the payload. Does not create nested mtoServiceItems, mtoShipments, or paymentRequests

func MoveTaskOrders

func MoveTaskOrders(moveTaskOrders *models.Moves) []*supportmessages.MoveTaskOrder

MoveTaskOrders payload

func Order

func Order(order *models.Order) *supportmessages.Order

Order payload

func OrderModel

func OrderModel(orderPayload *supportmessages.Order) *models.Order

OrderModel converts payload to model - it does not convert nested duty locations but will preserve the ID if provided. It will create nested customer and entitlement models if those are provided in the payload

func PaymentRequest

PaymentRequest converts PaymentRequest model to payload

func PaymentRequests

func PaymentRequests(paymentRequests *models.PaymentRequests) *supportmessages.PaymentRequests

PaymentRequests converts an array of PaymentRequest models to payload array

func ValidationError

func ValidationError(detail string, instance uuid.UUID, validationErrors *validate.Errors) *supportmessages.ValidationError

ValidationError payload describes validation errors from the model or properties

func WebhookNotification

WebhookNotification converts a WebhookNotification model to a payload

func WebhookNotificationModel

func WebhookNotificationModel(payload *supportmessages.WebhookNotification, traceID uuid.UUID) (*models.WebhookNotification, *validate.Errors)

WebhookNotificationModel converts payload to model

Types

This section is empty.

Jump to

Keyboard shortcuts

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