From 8029ea9e707c35ad9d180c5442d0d444de09e0b4 Mon Sep 17 00:00:00 2001
From: TevinAdams
Date: Tue, 23 Jan 2024 18:49:58 +0000
Subject: [PATCH 01/67] Created swagger endpoint all_moves
---
pkg/gen/internalapi/configure_mymove.go | 5 +
pkg/gen/internalapi/embedded_spec.go | 3859 +++++++++++++++--
.../internaloperations/moves/get_all_moves.go | 58 +
.../moves/get_all_moves_parameters.go | 91 +
.../moves/get_all_moves_responses.go | 194 +
.../moves/get_all_moves_urlbuilder.go | 101 +
.../internaloperations/mymove_api.go | 12 +
pkg/gen/internalmessages/customer.go | 208 +
pkg/gen/internalmessages/destination_type.go | 85 +
pkg/gen/internalmessages/duty_location.go | 173 +
pkg/gen/internalmessages/entitlements.go | 141 +
pkg/gen/internalmessages/m_t_o_agent2.go | 306 ++
pkg/gen/internalmessages/m_t_o_agent_type2.go | 82 +
pkg/gen/internalmessages/m_t_o_agents2.go | 85 +
.../internalmessages/m_t_o_service_item.go | 465 ++
.../m_t_o_service_item_model_type.go | 95 +
.../m_t_o_service_item_status.go | 90 +
.../internalmessages/m_t_o_shipment_type2.go | 107 +
.../m_t_o_shipment_without_service_items.go | 1165 +++++
...m_t_o_shipments_without_service_objects.go | 78 +
pkg/gen/internalmessages/move_task_order.go | 842 ++++
pkg/gen/internalmessages/moves_list.go | 183 +
pkg/gen/internalmessages/order.go | 444 ++
pkg/gen/internalmessages/p_p_m_shipment2.go | 670 +++
pkg/gen/internalmessages/payment_request.go | 322 ++
.../payment_request_status.go | 96 +
pkg/gen/internalmessages/payment_requests.go | 78 +
.../internalmessages/payment_service_item.go | 266 ++
.../payment_service_item_param.go | 274 ++
.../payment_service_item_params.go | 78 +
.../payment_service_item_status.go | 90 +
.../internalmessages/payment_service_items.go | 78 +
.../internalmessages/proof_of_service_doc.go | 121 +
.../internalmessages/proof_of_service_docs.go | 78 +
pkg/gen/internalmessages/reweigh.go | 280 ++
pkg/gen/internalmessages/reweigh_requester.go | 84 +
pkg/gen/internalmessages/s_i_t_extension.go | 291 ++
pkg/gen/internalmessages/s_i_t_extensions.go | 78 +
.../service_item_param_name.go | 270 ++
.../service_item_param_origin.go | 84 +
.../service_item_param_type.go | 93 +
.../service_request_document.go | 121 +
.../service_request_documents.go | 78 +
.../shipment_address_update.go | 315 ++
.../shipment_address_update_status.go | 90 +
pkg/gen/internalmessages/storage_facility.go | 194 +
.../internalmessages/upload_with_omissions.go | 276 ++
swagger-def/internal.yaml | 41 +
swagger/internal.yaml | 1613 ++++++-
49 files changed, 14521 insertions(+), 407 deletions(-)
create mode 100644 pkg/gen/internalapi/internaloperations/moves/get_all_moves.go
create mode 100644 pkg/gen/internalapi/internaloperations/moves/get_all_moves_parameters.go
create mode 100644 pkg/gen/internalapi/internaloperations/moves/get_all_moves_responses.go
create mode 100644 pkg/gen/internalapi/internaloperations/moves/get_all_moves_urlbuilder.go
create mode 100644 pkg/gen/internalmessages/customer.go
create mode 100644 pkg/gen/internalmessages/destination_type.go
create mode 100644 pkg/gen/internalmessages/duty_location.go
create mode 100644 pkg/gen/internalmessages/entitlements.go
create mode 100644 pkg/gen/internalmessages/m_t_o_agent2.go
create mode 100644 pkg/gen/internalmessages/m_t_o_agent_type2.go
create mode 100644 pkg/gen/internalmessages/m_t_o_agents2.go
create mode 100644 pkg/gen/internalmessages/m_t_o_service_item.go
create mode 100644 pkg/gen/internalmessages/m_t_o_service_item_model_type.go
create mode 100644 pkg/gen/internalmessages/m_t_o_service_item_status.go
create mode 100644 pkg/gen/internalmessages/m_t_o_shipment_type2.go
create mode 100644 pkg/gen/internalmessages/m_t_o_shipment_without_service_items.go
create mode 100644 pkg/gen/internalmessages/m_t_o_shipments_without_service_objects.go
create mode 100644 pkg/gen/internalmessages/move_task_order.go
create mode 100644 pkg/gen/internalmessages/moves_list.go
create mode 100644 pkg/gen/internalmessages/order.go
create mode 100644 pkg/gen/internalmessages/p_p_m_shipment2.go
create mode 100644 pkg/gen/internalmessages/payment_request.go
create mode 100644 pkg/gen/internalmessages/payment_request_status.go
create mode 100644 pkg/gen/internalmessages/payment_requests.go
create mode 100644 pkg/gen/internalmessages/payment_service_item.go
create mode 100644 pkg/gen/internalmessages/payment_service_item_param.go
create mode 100644 pkg/gen/internalmessages/payment_service_item_params.go
create mode 100644 pkg/gen/internalmessages/payment_service_item_status.go
create mode 100644 pkg/gen/internalmessages/payment_service_items.go
create mode 100644 pkg/gen/internalmessages/proof_of_service_doc.go
create mode 100644 pkg/gen/internalmessages/proof_of_service_docs.go
create mode 100644 pkg/gen/internalmessages/reweigh.go
create mode 100644 pkg/gen/internalmessages/reweigh_requester.go
create mode 100644 pkg/gen/internalmessages/s_i_t_extension.go
create mode 100644 pkg/gen/internalmessages/s_i_t_extensions.go
create mode 100644 pkg/gen/internalmessages/service_item_param_name.go
create mode 100644 pkg/gen/internalmessages/service_item_param_origin.go
create mode 100644 pkg/gen/internalmessages/service_item_param_type.go
create mode 100644 pkg/gen/internalmessages/service_request_document.go
create mode 100644 pkg/gen/internalmessages/service_request_documents.go
create mode 100644 pkg/gen/internalmessages/shipment_address_update.go
create mode 100644 pkg/gen/internalmessages/shipment_address_update_status.go
create mode 100644 pkg/gen/internalmessages/storage_facility.go
create mode 100644 pkg/gen/internalmessages/upload_with_omissions.go
diff --git a/pkg/gen/internalapi/configure_mymove.go b/pkg/gen/internalapi/configure_mymove.go
index a5a94d9b495..465ab6df10c 100644
--- a/pkg/gen/internalapi/configure_mymove.go
+++ b/pkg/gen/internalapi/configure_mymove.go
@@ -192,6 +192,11 @@ func configureAPI(api *internaloperations.MymoveAPI) http.Handler {
return middleware.NotImplemented("operation ppm.DeleteWeightTicket has not yet been implemented")
})
}
+ if api.MovesGetAllMovesHandler == nil {
+ api.MovesGetAllMovesHandler = moves.GetAllMovesHandlerFunc(func(params moves.GetAllMovesParams) middleware.Responder {
+ return middleware.NotImplemented("operation moves.GetAllMoves has not yet been implemented")
+ })
+ }
if api.TransportationOfficesGetTransportationOfficesHandler == nil {
api.TransportationOfficesGetTransportationOfficesHandler = transportation_offices.GetTransportationOfficesHandlerFunc(func(params transportation_offices.GetTransportationOfficesParams) middleware.Responder {
return middleware.NotImplemented("operation transportation_offices.GetTransportationOffices has not yet been implemented")
diff --git a/pkg/gen/internalapi/embedded_spec.go b/pkg/gen/internalapi/embedded_spec.go
index f13223db818..0e95106c6e0 100644
--- a/pkg/gen/internalapi/embedded_spec.go
+++ b/pkg/gen/internalapi/embedded_spec.go
@@ -79,6 +79,46 @@ func init() {
}
}
},
+ "/all_moves/{serviceMemberId}": {
+ "get": {
+ "description": "Gets all moves that belongs to the serviceMember\n",
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "moves"
+ ],
+ "summary": "Return the current and previous moves of a service member",
+ "operationId": "getAllMoves",
+ "parameters": [
+ {
+ "type": "string",
+ "format": "uuid",
+ "description": "UUID of the service member",
+ "name": "serviceMemberId",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successfully retrieved moves. A successful fetch might still return zero moves.",
+ "schema": {
+ "$ref": "#/definitions/MovesList"
+ }
+ },
+ "401": {
+ "$ref": "#/responses/PermissionDenied"
+ },
+ "403": {
+ "$ref": "#/responses/PermissionDenied"
+ },
+ "500": {
+ "$ref": "#/responses/ServerError"
+ }
+ }
+ }
+ },
"/backup_contacts/{backupContactId}": {
"get": {
"description": "Returns the given service member backup contact",
@@ -4296,6 +4336,53 @@ func init() {
}
}
},
+ "Customer": {
+ "type": "object",
+ "properties": {
+ "branch": {
+ "type": "string",
+ "example": "COAST_GUARD"
+ },
+ "currentAddress": {
+ "$ref": "#/definitions/Address"
+ },
+ "dodID": {
+ "type": "string"
+ },
+ "eTag": {
+ "type": "string",
+ "readOnly": true
+ },
+ "email": {
+ "type": "string",
+ "format": "x-email",
+ "pattern": "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$",
+ "example": "fake@example.com"
+ },
+ "firstName": {
+ "type": "string",
+ "example": "Vanya"
+ },
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "example": "c56a4180-65aa-42ec-a945-5fd21dec0538"
+ },
+ "lastName": {
+ "type": "string",
+ "example": "Petrovna"
+ },
+ "phone": {
+ "type": "string",
+ "format": "telephone"
+ },
+ "userID": {
+ "type": "string",
+ "format": "uuid",
+ "example": "c56a4180-65aa-42ec-a945-5fd21dec0538"
+ }
+ }
+ },
"DeptIndicator": {
"type": "string",
"title": "Dept. indicator",
@@ -4317,6 +4404,18 @@ func init() {
},
"x-nullable": true
},
+ "DestinationType": {
+ "type": "string",
+ "title": "Destination Type",
+ "enum": [
+ "HOME_OF_RECORD",
+ "HOME_OF_SELECTION",
+ "PLACE_ENTERED_ACTIVE_DUTY",
+ "OTHER_THAN_AUTHORIZED"
+ ],
+ "x-nullable": true,
+ "example": "OTHER_THAN_AUTHORIZED"
+ },
"Document": {
"type": "object",
"required": [
@@ -4343,6 +4442,32 @@ func init() {
}
}
},
+ "DutyLocation": {
+ "type": "object",
+ "properties": {
+ "address": {
+ "$ref": "#/definitions/Address"
+ },
+ "addressID": {
+ "type": "string",
+ "format": "uuid",
+ "example": "c56a4180-65aa-42ec-a945-5fd21dec0538"
+ },
+ "eTag": {
+ "type": "string",
+ "readOnly": true
+ },
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "example": "c56a4180-65aa-42ec-a945-5fd21dec0538"
+ },
+ "name": {
+ "type": "string",
+ "example": "Fort Bragg North Station"
+ }
+ }
+ },
"DutyLocationPayload": {
"type": "object",
"required": [
@@ -4416,6 +4541,73 @@ func init() {
}
}
},
+ "Entitlements": {
+ "type": "object",
+ "properties": {
+ "authorizedWeight": {
+ "type": "integer",
+ "x-formatting": "weight",
+ "x-nullable": true,
+ "example": 2000
+ },
+ "dependentsAuthorized": {
+ "type": "boolean",
+ "x-nullable": true,
+ "example": true
+ },
+ "eTag": {
+ "type": "string",
+ "readOnly": true
+ },
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "example": "571008b1-b0de-454d-b843-d71be9f02c04"
+ },
+ "nonTemporaryStorage": {
+ "type": "boolean",
+ "x-nullable": true,
+ "example": false
+ },
+ "organizationalClothingAndIndividualEquipment": {
+ "type": "boolean",
+ "example": false
+ },
+ "privatelyOwnedVehicle": {
+ "type": "boolean",
+ "x-nullable": true,
+ "example": false
+ },
+ "proGearWeight": {
+ "type": "integer",
+ "x-formatting": "weight",
+ "example": 2000
+ },
+ "proGearWeightSpouse": {
+ "type": "integer",
+ "x-formatting": "weight",
+ "example": 500
+ },
+ "requiredMedicalEquipmentWeight": {
+ "type": "integer",
+ "x-formatting": "weight",
+ "example": 500
+ },
+ "storageInTransit": {
+ "type": "integer",
+ "example": 90
+ },
+ "totalDependents": {
+ "type": "integer",
+ "example": 2
+ },
+ "totalWeight": {
+ "type": "integer",
+ "x-formatting": "weight",
+ "example": 500
+ }
+ }
+ },
"Error": {
"type": "object",
"required": [
@@ -4624,94 +4816,54 @@ func init() {
}
}
},
- "MTOAgentType": {
- "type": "string",
- "title": "MTO Agent Type",
- "enum": [
- "RELEASING_AGENT",
- "RECEIVING_AGENT"
- ],
- "example": "RELEASING_AGENT"
- },
- "MTOAgents": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/MTOAgent"
- }
- },
- "MTOShipment": {
+ "MTOAgent-2": {
+ "type": "object",
"properties": {
- "agents": {
- "$ref": "#/definitions/MTOAgents"
+ "agentType": {
+ "$ref": "#/definitions/MTOAgentType-2"
},
"createdAt": {
"type": "string",
"format": "date-time",
"readOnly": true
},
- "customerRemarks": {
- "type": "string",
- "x-nullable": true,
- "readOnly": true,
- "example": "handle with care"
- },
- "destinationAddress": {
- "$ref": "#/definitions/Address"
- },
"eTag": {
- "type": "string"
+ "type": "string",
+ "readOnly": true
},
- "hasSecondaryDeliveryAddress": {
- "type": "boolean",
- "x-nullable": true,
- "x-omitempty": false
+ "email": {
+ "type": "string",
+ "format": "x-email",
+ "pattern": "^([a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,})?$",
+ "x-nullable": true
},
- "hasSecondaryPickupAddress": {
- "type": "boolean",
- "x-nullable": true,
- "x-omitempty": false
+ "firstName": {
+ "type": "string",
+ "x-nullable": true
},
"id": {
+ "description": "The ID of the agent.",
"type": "string",
"format": "uuid",
"readOnly": true,
"example": "1f2270c7-7166-40ae-981e-b200ebdf3054"
},
- "moveTaskOrderID": {
+ "lastName": {
+ "type": "string",
+ "x-nullable": true
+ },
+ "mtoShipmentID": {
+ "description": "The ID of the shipment this agent is permitted to release/receive.",
"type": "string",
"format": "uuid",
"readOnly": true,
"example": "1f2270c7-7166-40ae-981e-b200ebdf3054"
},
- "pickupAddress": {
- "$ref": "#/definitions/Address"
- },
- "ppmShipment": {
- "$ref": "#/definitions/PPMShipment"
- },
- "requestedDeliveryDate": {
- "type": "string",
- "format": "date",
- "x-nullable": true,
- "readOnly": true
- },
- "requestedPickupDate": {
+ "phone": {
"type": "string",
- "format": "date",
- "x-nullable": true,
- "readOnly": true
- },
- "secondaryDeliveryAddress": {
- "$ref": "#/definitions/Address"
- },
- "secondaryPickupAddress": {
- "$ref": "#/definitions/Address"
- },
- "shipmentType": {
- "$ref": "#/definitions/MTOShipmentType"
- },
- "status": {
- "$ref": "#/definitions/MTOShipmentStatus"
+ "format": "telephone",
+ "pattern": "^([2-9]\\d{2}-\\d{3}-\\d{4})?$",
+ "x-nullable": true
},
"updatedAt": {
"type": "string",
@@ -4720,25 +4872,216 @@ func init() {
}
}
},
- "MTOShipmentStatus": {
+ "MTOAgentType": {
"type": "string",
+ "title": "MTO Agent Type",
"enum": [
- "DRAFT",
- "APPROVED",
- "SUBMITTED",
- "REJECTED"
+ "RELEASING_AGENT",
+ "RECEIVING_AGENT"
],
- "readOnly": true
+ "example": "RELEASING_AGENT"
},
- "MTOShipmentType": {
+ "MTOAgentType-2": {
+ "description": "The type for this agent. ` + "`" + `RELEASING` + "`" + ` means they have authority on pickup, ` + "`" + `RECEIVING` + "`" + ` means they can receive the shipment on delivery.\n",
"type": "string",
- "title": "Shipment Type",
+ "title": "Agent Type",
"enum": [
- "HHG",
- "HHG_INTO_NTS_DOMESTIC",
- "HHG_OUTOF_NTS_DOMESTIC",
- "PPM"
- ],
+ "RELEASING_AGENT",
+ "RECEIVING_AGENT"
+ ],
+ "example": "RELEASING_AGENT"
+ },
+ "MTOAgents": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/MTOAgent"
+ }
+ },
+ "MTOAgents-2": {
+ "description": "A list of the agents for a shipment. Agents are the people who the Prime contractor recognize as permitted to release (in the case of pickup) or receive (on delivery) a shipment.\n",
+ "type": "array",
+ "maxItems": 2,
+ "items": {
+ "$ref": "#/definitions/MTOAgent-2"
+ }
+ },
+ "MTOServiceItem": {
+ "description": "MTOServiceItem describes a base type of a service item. Polymorphic type.",
+ "type": "object",
+ "required": [
+ "modelType",
+ "moveTaskOrderID"
+ ],
+ "properties": {
+ "eTag": {
+ "description": "A hash unique to this service item that should be used as the \"If-Match\" header for any updates.",
+ "type": "string",
+ "readOnly": true
+ },
+ "id": {
+ "description": "The ID of the service item.",
+ "type": "string",
+ "format": "uuid",
+ "readOnly": true,
+ "example": "1f2270c7-7166-40ae-981e-b200ebdf3054"
+ },
+ "modelType": {
+ "$ref": "#/definitions/MTOServiceItemModelType"
+ },
+ "moveTaskOrderID": {
+ "description": "The ID of the move for this service item.",
+ "type": "string",
+ "format": "uuid",
+ "example": "1f2270c7-7166-40ae-981e-b200ebdf3054"
+ },
+ "mtoShipmentID": {
+ "description": "The ID of the shipment this service is for, if any. Optional.",
+ "type": "string",
+ "format": "uuid",
+ "example": "1f2270c7-7166-40ae-981e-b200ebdf3054"
+ },
+ "reServiceName": {
+ "description": "The full descriptive name of the service.",
+ "type": "string",
+ "readOnly": true
+ },
+ "rejectionReason": {
+ "description": "The reason why this service item was rejected by the TOO.",
+ "type": "string",
+ "x-nullable": true,
+ "readOnly": true,
+ "example": "item was too heavy"
+ },
+ "serviceRequestDocuments": {
+ "$ref": "#/definitions/ServiceRequestDocuments"
+ },
+ "status": {
+ "$ref": "#/definitions/MTOServiceItemStatus"
+ }
+ },
+ "discriminator": "modelType"
+ },
+ "MTOServiceItemModelType": {
+ "description": "Describes all model sub-types for a MTOServiceItem model.\n\nUsing this list, choose the correct modelType in the dropdown, corresponding to the service item type.\n * DOFSIT, DOASIT - MTOServiceItemOriginSIT\n * DDFSIT, DDASIT - MTOServiceItemDestSIT\n * DOSHUT, DDSHUT - MTOServiceItemShuttle\n * DCRT, DUCRT - MTOServiceItemDomesticCrating\n\nThe documentation will then update with the supported fields.\n",
+ "type": "string",
+ "enum": [
+ "MTOServiceItemBasic",
+ "MTOServiceItemOriginSIT",
+ "MTOServiceItemDestSIT",
+ "MTOServiceItemShuttle",
+ "MTOServiceItemDomesticCrating"
+ ]
+ },
+ "MTOServiceItemStatus": {
+ "description": "The status of a service item, indicating where it is in the TOO's approval process.",
+ "type": "string",
+ "enum": [
+ "SUBMITTED",
+ "APPROVED",
+ "REJECTED"
+ ],
+ "readOnly": true
+ },
+ "MTOShipment": {
+ "properties": {
+ "agents": {
+ "$ref": "#/definitions/MTOAgents"
+ },
+ "createdAt": {
+ "type": "string",
+ "format": "date-time",
+ "readOnly": true
+ },
+ "customerRemarks": {
+ "type": "string",
+ "x-nullable": true,
+ "readOnly": true,
+ "example": "handle with care"
+ },
+ "destinationAddress": {
+ "$ref": "#/definitions/Address"
+ },
+ "eTag": {
+ "type": "string"
+ },
+ "hasSecondaryDeliveryAddress": {
+ "type": "boolean",
+ "x-nullable": true,
+ "x-omitempty": false
+ },
+ "hasSecondaryPickupAddress": {
+ "type": "boolean",
+ "x-nullable": true,
+ "x-omitempty": false
+ },
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "readOnly": true,
+ "example": "1f2270c7-7166-40ae-981e-b200ebdf3054"
+ },
+ "moveTaskOrderID": {
+ "type": "string",
+ "format": "uuid",
+ "readOnly": true,
+ "example": "1f2270c7-7166-40ae-981e-b200ebdf3054"
+ },
+ "pickupAddress": {
+ "$ref": "#/definitions/Address"
+ },
+ "ppmShipment": {
+ "$ref": "#/definitions/PPMShipment"
+ },
+ "requestedDeliveryDate": {
+ "type": "string",
+ "format": "date",
+ "x-nullable": true,
+ "readOnly": true
+ },
+ "requestedPickupDate": {
+ "type": "string",
+ "format": "date",
+ "x-nullable": true,
+ "readOnly": true
+ },
+ "secondaryDeliveryAddress": {
+ "$ref": "#/definitions/Address"
+ },
+ "secondaryPickupAddress": {
+ "$ref": "#/definitions/Address"
+ },
+ "shipmentType": {
+ "$ref": "#/definitions/MTOShipmentType"
+ },
+ "status": {
+ "$ref": "#/definitions/MTOShipmentStatus"
+ },
+ "updatedAt": {
+ "type": "string",
+ "format": "date-time",
+ "readOnly": true
+ }
+ }
+ },
+ "MTOShipmentStatus": {
+ "type": "string",
+ "enum": [
+ "DRAFT",
+ "APPROVED",
+ "SUBMITTED",
+ "REJECTED"
+ ],
+ "readOnly": true
+ },
+ "MTOShipmentType": {
+ "type": "string",
+ "title": "Shipment Type",
+ "enum": [
+ "HHG",
+ "HHG_INTO_NTS_DOMESTIC",
+ "HHG_OUTOF_NTS_DOMESTIC",
+ "PPM"
+ ],
"x-display-value": {
"HHG": "HHG",
"INTERNATIONAL_HHG": "International HHG",
@@ -4747,12 +5090,270 @@ func init() {
},
"example": "HHG"
},
+ "MTOShipmentType-2": {
+ "description": "The type of shipment.\n * ` + "`" + `HHG` + "`" + ` = Household goods move\n * ` + "`" + `HHG_INTO_NTS_DOMESTIC` + "`" + ` = HHG into Non-temporary storage (NTS)\n * ` + "`" + `HHG_OUTOF_NTS_DOMESTIC` + "`" + ` = HHG out of Non-temporary storage (NTS Release)\n * ` + "`" + `PPM` + "`" + ` = Personally Procured Move also known as Do It Yourself (DITY)\n",
+ "type": "string",
+ "title": "Shipment Type",
+ "enum": [
+ "BOAT_HAUL_AWAY",
+ "BOAT_TOW_AWAY",
+ "HHG",
+ "HHG_INTO_NTS_DOMESTIC",
+ "HHG_OUTOF_NTS_DOMESTIC",
+ "INTERNATIONAL_HHG",
+ "INTERNATIONAL_UB",
+ "MOTORHOME",
+ "PPM"
+ ],
+ "x-display-value": {
+ "HHG": "Household goods move (HHG)",
+ "HHG_INTO_NTS_DOMESTIC": "HHG into Non-temporary storage (NTS)",
+ "HHG_OUTOF_NTS_DOMESTIC": "HHG out of Non-temporary storage (NTS Release)",
+ "PPM": "Personally Procured Move also known as Do It Yourself (DITY)"
+ },
+ "example": "HHG"
+ },
+ "MTOShipmentWithoutServiceItems": {
+ "type": "object",
+ "properties": {
+ "actualDeliveryDate": {
+ "description": "The date when the Prime contractor actually delivered the shipment. Updated after-the-fact.",
+ "type": "string",
+ "format": "date",
+ "x-nullable": true,
+ "x-omitempty": false
+ },
+ "actualPickupDate": {
+ "description": "The date when the Prime contractor actually picked up the shipment. Updated after-the-fact.",
+ "type": "string",
+ "format": "date",
+ "x-nullable": true,
+ "x-omitempty": false
+ },
+ "agents": {
+ "$ref": "#/definitions/MTOAgents-2"
+ },
+ "approvedDate": {
+ "description": "The date when the Transportation Ordering Officer first approved this shipment for the move.",
+ "type": "string",
+ "format": "date",
+ "x-nullable": true,
+ "x-omitempty": false,
+ "readOnly": true
+ },
+ "counselorRemarks": {
+ "description": "The counselor can use the counselor remarks field to inform the movers about any\nspecial circumstances for this shipment. Typical examples:\n * bulky or fragile items,\n * weapons,\n * access info for their address.\n\nCounselors enters this information when creating or editing an MTO Shipment. Optional field.\n",
+ "type": "string",
+ "x-nullable": true,
+ "readOnly": true,
+ "example": "handle with care"
+ },
+ "createdAt": {
+ "type": "string",
+ "format": "date-time",
+ "readOnly": true
+ },
+ "customerRemarks": {
+ "description": "The customer can use the customer remarks field to inform the services counselor and the movers about any\nspecial circumstances for this shipment. Typical examples:\n * bulky or fragile items,\n * weapons,\n * access info for their address.\n\nCustomer enters this information during onboarding. Optional field.\n",
+ "type": "string",
+ "x-nullable": true,
+ "readOnly": true,
+ "example": "handle with care"
+ },
+ "deliveryAddressUpdate": {
+ "$ref": "#/definitions/ShipmentAddressUpdate"
+ },
+ "destinationAddress": {
+ "description": "Where the movers should deliver this shipment. Often provided by the customer when they enter shipment details\nduring onboarding, if they know their new address already.\n\nMay be blank when entered by the customer, required when entered by the Prime. May not represent the true\nfinal destination due to the shipment being diverted or placed in SIT.\n",
+ "allOf": [
+ {
+ "$ref": "#/definitions/Address"
+ }
+ ]
+ },
+ "destinationType": {
+ "$ref": "#/definitions/DestinationType"
+ },
+ "diversion": {
+ "description": "This value indicates whether or not this shipment is part of a diversion. If yes, the shipment can be either the starting or ending segment of the diversion.\n",
+ "type": "boolean"
+ },
+ "eTag": {
+ "description": "A hash unique to this shipment that should be used as the \"If-Match\" header for any updates.",
+ "type": "string",
+ "readOnly": true
+ },
+ "firstAvailableDeliveryDate": {
+ "description": "The date the Prime provides to the customer as the first possible delivery date so that they can plan their travel accordingly.\n",
+ "type": "string",
+ "format": "date",
+ "x-nullable": true,
+ "x-omitempty": false
+ },
+ "id": {
+ "description": "The ID of the shipment.",
+ "type": "string",
+ "format": "uuid",
+ "readOnly": true,
+ "example": "1f2270c7-7166-40ae-981e-b200ebdf3054"
+ },
+ "moveTaskOrderID": {
+ "description": "The ID of the move for this shipment.",
+ "type": "string",
+ "format": "uuid",
+ "readOnly": true,
+ "example": "1f2270c7-7166-40ae-981e-b200ebdf3054"
+ },
+ "ntsRecordedWeight": {
+ "description": "The previously recorded weight for the NTS Shipment. Used for NTS Release to know what the previous primeActualWeight or billable weight was.",
+ "type": "integer",
+ "x-formatting": "weight",
+ "x-nullable": true,
+ "example": 4500
+ },
+ "pickupAddress": {
+ "description": "The address where the movers should pick up this shipment, entered by the customer during onboarding when they enter shipment details.\n",
+ "allOf": [
+ {
+ "$ref": "#/definitions/Address"
+ }
+ ]
+ },
+ "pointOfContact": {
+ "description": "Email or ID of the person who will be contacted in the event of questions or concerns about this update. May be the person performing the update, or someone else working with the Prime contractor.\n",
+ "type": "string"
+ },
+ "ppmShipment": {
+ "$ref": "#/definitions/PPMShipment-2"
+ },
+ "primeActualWeight": {
+ "description": "The actual weight of the shipment, provided after the Prime packs, picks up, and weighs a customer's shipment.",
+ "type": "integer",
+ "minimum": 1,
+ "x-nullable": true,
+ "example": 4500
+ },
+ "primeEstimatedWeight": {
+ "description": "The estimated weight of this shipment, determined by the movers during the pre-move survey. This value **can only be updated once.** If there was an issue with estimating the weight and a mistake was made, the Prime contracter will need to contact the TOO to change it.\n",
+ "type": "integer",
+ "minimum": 1,
+ "x-nullable": true,
+ "example": 4500
+ },
+ "primeEstimatedWeightRecordedDate": {
+ "description": "The date when the Prime contractor recorded the shipment's estimated weight.",
+ "type": "string",
+ "format": "date",
+ "x-nullable": true,
+ "x-omitempty": false,
+ "readOnly": true
+ },
+ "requestedDeliveryDate": {
+ "description": "The customer's preferred delivery date.",
+ "type": "string",
+ "format": "date",
+ "x-nullable": true,
+ "x-omitempty": false,
+ "readOnly": true
+ },
+ "requestedPickupDate": {
+ "description": "The date the customer selects during onboarding as their preferred pickup date. Other dates, such as required delivery date and (outside MilMove) the pack date, are derived from this date.\n",
+ "type": "string",
+ "format": "date",
+ "x-nullable": true,
+ "x-omitempty": false,
+ "readOnly": true
+ },
+ "requiredDeliveryDate": {
+ "description": "The latest date by which the Prime can deliver a customer's shipment without violating the contract. This is calculated based on weight, distance, and the scheduled pickup date. It cannot be modified.\n",
+ "type": "string",
+ "format": "date",
+ "x-nullable": true,
+ "x-omitempty": false,
+ "readOnly": true
+ },
+ "reweigh": {
+ "$ref": "#/definitions/Reweigh"
+ },
+ "scheduledDeliveryDate": {
+ "description": "The date the Prime contractor scheduled to deliver this shipment after consultation with the customer.",
+ "type": "string",
+ "format": "date",
+ "x-nullable": true,
+ "x-omitempty": false
+ },
+ "scheduledPickupDate": {
+ "description": "The date the Prime contractor scheduled to pick up this shipment after consultation with the customer.",
+ "type": "string",
+ "format": "date",
+ "x-nullable": true,
+ "x-omitempty": false
+ },
+ "secondaryDeliveryAddress": {
+ "description": "A second delivery address for this shipment, if the customer entered one. An optional field.",
+ "allOf": [
+ {
+ "$ref": "#/definitions/Address"
+ }
+ ]
+ },
+ "secondaryPickupAddress": {
+ "description": "A second pickup address for this shipment, if the customer entered one. An optional field.",
+ "allOf": [
+ {
+ "$ref": "#/definitions/Address"
+ }
+ ]
+ },
+ "shipmentType": {
+ "$ref": "#/definitions/MTOShipmentType-2"
+ },
+ "sitExtensions": {
+ "$ref": "#/definitions/SITExtensions"
+ },
+ "status": {
+ "description": "The status of a shipment, indicating where it is in the TOO's approval process. Can only be updated by the contractor in special circumstances.\n",
+ "type": "string",
+ "enum": [
+ "SUBMITTED",
+ "APPROVED",
+ "REJECTED",
+ "CANCELLATION_REQUESTED",
+ "CANCELED",
+ "DIVERSION_REQUESTED"
+ ],
+ "readOnly": true
+ },
+ "storageFacility": {
+ "allOf": [
+ {
+ "x-nullable": true
+ },
+ {
+ "$ref": "#/definitions/StorageFacility"
+ }
+ ]
+ },
+ "updatedAt": {
+ "type": "string",
+ "format": "date-time",
+ "readOnly": true
+ }
+ }
+ },
"MTOShipments": {
"type": "array",
"items": {
"$ref": "#/definitions/MTOShipment"
}
},
+ "MTOShipmentsWithoutServiceObjects": {
+ "description": "A list of shipments without their associated service items.",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/MTOShipmentWithoutServiceItems"
+ }
+ },
"MethodOfReceipt": {
"type": "string",
"title": "Method of Receipt",
@@ -5260,6 +5861,124 @@ func init() {
"SUBMITTED": "Submitted"
}
},
+ "MoveTaskOrder": {
+ "type": "object",
+ "required": [
+ "mtoShipments",
+ "mtoServiceItems",
+ "paymentRequests"
+ ],
+ "properties": {
+ "availableToPrimeAt": {
+ "type": "string",
+ "format": "date-time",
+ "x-nullable": true,
+ "readOnly": true
+ },
+ "createdAt": {
+ "type": "string",
+ "format": "date-time",
+ "readOnly": true
+ },
+ "eTag": {
+ "type": "string",
+ "readOnly": true
+ },
+ "excessWeightAcknowledgedAt": {
+ "type": "string",
+ "format": "date-time",
+ "x-nullable": true,
+ "x-omitempty": false,
+ "readOnly": true
+ },
+ "excessWeightQualifiedAt": {
+ "type": "string",
+ "format": "date-time",
+ "x-nullable": true,
+ "x-omitempty": false,
+ "readOnly": true
+ },
+ "excessWeightUploadId": {
+ "type": "string",
+ "format": "uuid",
+ "x-nullable": true,
+ "x-omitempty": false,
+ "readOnly": true
+ },
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "example": "a502b4f1-b9c4-4faf-8bdd-68292501bf26"
+ },
+ "moveCode": {
+ "type": "string",
+ "readOnly": true,
+ "example": "HYXFJF"
+ },
+ "mtoServiceItems": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/MTOServiceItem"
+ }
+ },
+ "mtoShipments": {
+ "$ref": "#/definitions/MTOShipmentsWithoutServiceObjects"
+ },
+ "order": {
+ "$ref": "#/definitions/Order"
+ },
+ "orderID": {
+ "type": "string",
+ "format": "uuid",
+ "example": "c56a4180-65aa-42ec-a945-5fd21dec0538"
+ },
+ "paymentRequests": {
+ "$ref": "#/definitions/PaymentRequests"
+ },
+ "ppmEstimatedWeight": {
+ "type": "integer"
+ },
+ "ppmType": {
+ "type": "string",
+ "enum": [
+ "PARTIAL",
+ "FULL"
+ ]
+ },
+ "primeCounselingCompletedAt": {
+ "type": "string",
+ "format": "date-time",
+ "x-nullable": true,
+ "readOnly": true
+ },
+ "referenceId": {
+ "type": "string",
+ "example": "1001-3456"
+ },
+ "updatedAt": {
+ "type": "string",
+ "format": "date-time",
+ "readOnly": true
+ }
+ }
+ },
+ "MovesList": {
+ "type": "object",
+ "properties": {
+ "currentMove": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/MoveTaskOrder"
+ }
+ },
+ "previousMoves": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/MoveTaskOrder"
+ }
+ }
+ }
+ },
"MovingExpense": {
"description": "Expense information and receipts of costs incurred that can be reimbursed while moving a PPM shipment.",
"type": "object",
@@ -5556,6 +6275,63 @@ func init() {
"x-nullable": true,
"x-omitempty": false
},
+ "Order": {
+ "type": "object",
+ "required": [
+ "orderNumber",
+ "rank",
+ "linesOfAccounting"
+ ],
+ "properties": {
+ "customer": {
+ "$ref": "#/definitions/Customer"
+ },
+ "customerID": {
+ "type": "string",
+ "format": "uuid",
+ "example": "c56a4180-65aa-42ec-a945-5fd21dec0538"
+ },
+ "destinationDutyLocation": {
+ "$ref": "#/definitions/DutyLocation"
+ },
+ "eTag": {
+ "type": "string",
+ "readOnly": true
+ },
+ "entitlement": {
+ "$ref": "#/definitions/Entitlements"
+ },
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "example": "c56a4180-65aa-42ec-a945-5fd21dec0538"
+ },
+ "linesOfAccounting": {
+ "type": "string"
+ },
+ "orderNumber": {
+ "type": "string"
+ },
+ "ordersType": {
+ "$ref": "#/definitions/OrdersType"
+ },
+ "originDutyLocation": {
+ "$ref": "#/definitions/DutyLocation"
+ },
+ "originDutyLocationGBLOC": {
+ "type": "string",
+ "example": "KKFA"
+ },
+ "rank": {
+ "type": "string",
+ "example": "E_5"
+ },
+ "reportByDate": {
+ "type": "string",
+ "format": "date"
+ }
+ }
+ },
"OrderPayGrade": {
"type": "string",
"title": "Rank",
@@ -5833,30 +6609,307 @@ func init() {
"type": "integer",
"title": "High estimate"
},
- "range_min": {
- "type": "integer",
- "title": "Low estimate"
- }
- }
- },
- "PPMIncentive": {
- "type": "object",
- "required": [
- "gcc",
- "incentive_percentage"
- ],
- "properties": {
- "gcc": {
+ "range_min": {
+ "type": "integer",
+ "title": "Low estimate"
+ }
+ }
+ },
+ "PPMIncentive": {
+ "type": "object",
+ "required": [
+ "gcc",
+ "incentive_percentage"
+ ],
+ "properties": {
+ "gcc": {
+ "type": "integer",
+ "title": "GCC"
+ },
+ "incentive_percentage": {
+ "type": "integer",
+ "title": "PPM Incentive @ 95%"
+ }
+ }
+ },
+ "PPMShipment": {
+ "description": "A personally procured move is a type of shipment that a service member moves themselves.",
+ "required": [
+ "id",
+ "shipmentId",
+ "createdAt",
+ "status",
+ "expectedDepartureDate",
+ "pickupPostalCode",
+ "destinationPostalCode",
+ "sitExpected",
+ "eTag"
+ ],
+ "properties": {
+ "actualDestinationPostalCode": {
+ "description": "The actual postal code where the PPM shipment ended. To be filled once the customer has moved the shipment.\n",
+ "type": "string",
+ "format": "zip",
+ "title": "ZIP",
+ "pattern": "^(\\d{5})$",
+ "x-nullable": true,
+ "x-omitempty": false,
+ "example": "90210"
+ },
+ "actualMoveDate": {
+ "description": "The actual start date of when the PPM shipment left the origin.",
+ "type": "string",
+ "format": "date",
+ "x-nullable": true,
+ "x-omitempty": false
+ },
+ "actualPickupPostalCode": {
+ "description": "The actual postal code where the PPM shipment started. To be filled once the customer has moved the shipment.\n",
+ "type": "string",
+ "format": "zip",
+ "title": "ZIP",
+ "pattern": "^(\\d{5})$",
+ "x-nullable": true,
+ "x-omitempty": false,
+ "example": "90210"
+ },
+ "advanceAmountReceived": {
+ "description": "The amount received for an advance, or null if no advance is received.\n",
+ "type": "integer",
+ "format": "cents",
+ "x-nullable": true,
+ "x-omitempty": false
+ },
+ "advanceAmountRequested": {
+ "description": "The amount requested as an advance by the service member up to a maximum percentage of the estimated incentive.\n",
+ "type": "integer",
+ "format": "cents",
+ "x-nullable": true,
+ "x-omitempty": false
+ },
+ "advanceStatus": {
+ "$ref": "#/definitions/PPMAdvanceStatus"
+ },
+ "approvedAt": {
+ "description": "The timestamp of when the shipment was approved and the service member can begin their move.",
+ "type": "string",
+ "format": "date-time",
+ "x-nullable": true,
+ "x-omitempty": false
+ },
+ "createdAt": {
+ "description": "Timestamp of when the PPM Shipment was initially created (UTC)",
+ "type": "string",
+ "format": "date-time",
+ "readOnly": true
+ },
+ "destinationPostalCode": {
+ "description": "The postal code of the destination location where goods are being delivered to.",
+ "type": "string",
+ "format": "zip",
+ "title": "ZIP",
+ "pattern": "^(\\d{5})$",
+ "example": "90210"
+ },
+ "eTag": {
+ "description": "A hash unique to this shipment that should be used as the \"If-Match\" header for any updates.",
+ "type": "string",
+ "readOnly": true
+ },
+ "estimatedIncentive": {
+ "description": "The estimated amount the government will pay the service member to move their belongings based on the moving date, locations, and shipment weight.",
+ "type": "integer",
+ "format": "cents",
+ "x-nullable": true,
+ "x-omitempty": false
+ },
+ "estimatedWeight": {
+ "description": "The estimated weight of the PPM shipment goods being moved.",
+ "type": "integer",
+ "x-nullable": true,
+ "x-omitempty": false,
+ "example": 4200
+ },
+ "expectedDepartureDate": {
+ "description": "Date the customer expects to begin their move.\n",
+ "type": "string",
+ "format": "date"
+ },
+ "finalIncentive": {
+ "description": "The final calculated incentive for the PPM shipment. This does not include **SIT** as it is a reimbursement.\n",
+ "type": "integer",
+ "format": "cents",
+ "x-nullable": true,
+ "x-omitempty": false,
+ "readOnly": true
+ },
+ "hasProGear": {
+ "description": "Indicates whether PPM shipment has pro gear for themselves or their spouse.\n",
+ "type": "boolean",
+ "x-nullable": true,
+ "x-omitempty": false
+ },
+ "hasReceivedAdvance": {
+ "description": "Indicates whether an advance was received for the PPM shipment.\n",
+ "type": "boolean",
+ "x-nullable": true,
+ "x-omitempty": false
+ },
+ "hasRequestedAdvance": {
+ "description": "Indicates whether an advance has been requested for the PPM shipment.\n",
+ "type": "boolean",
+ "x-nullable": true,
+ "x-omitempty": false
+ },
+ "id": {
+ "description": "Primary auto-generated unique identifier of the PPM shipment object",
+ "type": "string",
+ "format": "uuid",
+ "readOnly": true,
+ "example": "1f2270c7-7166-40ae-981e-b200ebdf3054"
+ },
+ "movingExpenses": {
+ "description": "All expense documentation receipt records of this PPM shipment.",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/MovingExpense"
+ }
+ },
+ "pickupPostalCode": {
+ "description": "The postal code of the origin location where goods are being moved from.",
+ "type": "string",
+ "format": "zip",
+ "title": "ZIP",
+ "pattern": "^(\\d{5})$",
+ "example": "90210"
+ },
+ "proGearWeight": {
+ "description": "The estimated weight of the pro-gear being moved belonging to the service member.",
+ "type": "integer",
+ "x-nullable": true,
+ "x-omitempty": false
+ },
+ "proGearWeightTickets": {
+ "description": "All pro-gear weight ticket documentation records for this PPM shipment.",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/ProGearWeightTicket"
+ }
+ },
+ "reviewedAt": {
+ "description": "The timestamp of when the Service Counselor has reviewed all of the closeout documents.",
+ "type": "string",
+ "format": "date-time",
+ "x-nullable": true,
+ "x-omitempty": false
+ },
+ "secondaryDestinationPostalCode": {
+ "description": "An optional secondary location near the destination where goods will be dropped off.",
+ "type": "string",
+ "format": "zip",
+ "title": "ZIP",
+ "pattern": "^(\\d{5})$",
+ "x-nullable": true,
+ "x-omitempty": false,
+ "example": "90210"
+ },
+ "secondaryPickupPostalCode": {
+ "type": "string",
+ "format": "An optional secondary pickup location near the origin where additional goods exist.",
+ "title": "ZIP",
+ "pattern": "^(\\d{5})$",
+ "x-nullable": true,
+ "x-omitempty": false,
+ "example": "90210"
+ },
+ "shipmentId": {
+ "description": "The id of the parent MTOShipment object",
+ "type": "string",
+ "format": "uuid",
+ "readOnly": true,
+ "example": "1f2270c7-7166-40ae-981e-b200ebdf3054"
+ },
+ "signedCertification": {
+ "$ref": "#/definitions/SignedCertification"
+ },
+ "sitEstimatedCost": {
+ "description": "The estimated amount that the government will pay the service member to put their goods into storage. This estimated storage cost is separate from the estimated incentive.",
+ "type": "integer",
+ "format": "cents",
+ "x-nullable": true,
+ "x-omitempty": false
+ },
+ "sitEstimatedDepartureDate": {
+ "description": "The date that goods will exit the storage location.",
+ "type": "string",
+ "format": "date",
+ "x-nullable": true,
+ "x-omitempty": false
+ },
+ "sitEstimatedEntryDate": {
+ "description": "The date that goods will first enter the storage location.",
+ "type": "string",
+ "format": "date",
+ "x-nullable": true,
+ "x-omitempty": false
+ },
+ "sitEstimatedWeight": {
+ "description": "The estimated weight of the goods being put into storage.",
"type": "integer",
- "title": "GCC"
+ "x-nullable": true,
+ "x-omitempty": false,
+ "example": 2000
},
- "incentive_percentage": {
+ "sitExpected": {
+ "description": "Captures whether some or all of the PPM shipment will require temporary storage at the origin or destination.\n\nMust be set to ` + "`" + `true` + "`" + ` when providing ` + "`" + `sitLocation` + "`" + `, ` + "`" + `sitEstimatedWeight` + "`" + `, ` + "`" + `sitEstimatedEntryDate` + "`" + `, and ` + "`" + `sitEstimatedDepartureDate` + "`" + ` values to calculate the ` + "`" + `sitEstimatedCost` + "`" + `.\n",
+ "type": "boolean"
+ },
+ "sitLocation": {
+ "allOf": [
+ {
+ "$ref": "#/definitions/SITLocationType"
+ },
+ {
+ "x-nullable": true
+ },
+ {
+ "x-omitempty": false
+ }
+ ]
+ },
+ "spouseProGearWeight": {
+ "description": "The estimated weight of the pro-gear being moved belonging to a spouse.",
"type": "integer",
- "title": "PPM Incentive @ 95%"
+ "x-nullable": true,
+ "x-omitempty": false
+ },
+ "status": {
+ "$ref": "#/definitions/PPMShipmentStatus"
+ },
+ "submittedAt": {
+ "description": "The timestamp of when the customer submitted their PPM documentation to the counselor for review.",
+ "type": "string",
+ "format": "date-time",
+ "x-nullable": true,
+ "x-omitempty": false
+ },
+ "updatedAt": {
+ "description": "Timestamp of when a property of this object was last updated (UTC)",
+ "type": "string",
+ "format": "date-time",
+ "readOnly": true
+ },
+ "w2Address": {
+ "x-nullable": true,
+ "$ref": "#/definitions/Address"
+ },
+ "weightTickets": {
+ "$ref": "#/definitions/WeightTickets"
}
- }
+ },
+ "x-nullable": true
},
- "PPMShipment": {
+ "PPMShipment-2": {
"description": "A personally procured move is a type of shipment that a service member moves themselves.",
"required": [
"id",
@@ -5905,15 +6958,12 @@ func init() {
"x-omitempty": false
},
"advanceAmountRequested": {
- "description": "The amount requested as an advance by the service member up to a maximum percentage of the estimated incentive.\n",
+ "description": "The amount requested as an advance by the service member, up to a maximum percentage of the estimated incentive.\n",
"type": "integer",
"format": "cents",
"x-nullable": true,
"x-omitempty": false
},
- "advanceStatus": {
- "$ref": "#/definitions/PPMAdvanceStatus"
- },
"approvedAt": {
"description": "The timestamp of when the shipment was approved and the service member can begin their move.",
"type": "string",
@@ -5922,7 +6972,7 @@ func init() {
"x-omitempty": false
},
"createdAt": {
- "description": "Timestamp of when the PPM Shipment was initially created (UTC)",
+ "description": "The timestamp of when the PPM shipment was created (UTC)",
"type": "string",
"format": "date-time",
"readOnly": true
@@ -5931,7 +6981,6 @@ func init() {
"description": "The postal code of the destination location where goods are being delivered to.",
"type": "string",
"format": "zip",
- "title": "ZIP",
"pattern": "^(\\d{5})$",
"example": "90210"
},
@@ -5948,25 +6997,17 @@ func init() {
"x-omitempty": false
},
"estimatedWeight": {
- "description": "The estimated weight of the PPM shipment goods being moved.",
+ "description": "The estimated weight of the PPM shipment goods being moved in pounds.",
"type": "integer",
"x-nullable": true,
"x-omitempty": false,
"example": 4200
},
"expectedDepartureDate": {
- "description": "Date the customer expects to begin their move.\n",
+ "description": "Date the customer expects to begin moving from their origin.\n",
"type": "string",
"format": "date"
},
- "finalIncentive": {
- "description": "The final calculated incentive for the PPM shipment. This does not include **SIT** as it is a reimbursement.\n",
- "type": "integer",
- "format": "cents",
- "x-nullable": true,
- "x-omitempty": false,
- "readOnly": true
- },
"hasProGear": {
"description": "Indicates whether PPM shipment has pro gear for themselves or their spouse.\n",
"type": "boolean",
@@ -5986,19 +7027,12 @@ func init() {
"x-omitempty": false
},
"id": {
- "description": "Primary auto-generated unique identifier of the PPM shipment object",
+ "description": "The primary unique identifier of this PPM shipment",
"type": "string",
"format": "uuid",
"readOnly": true,
"example": "1f2270c7-7166-40ae-981e-b200ebdf3054"
},
- "movingExpenses": {
- "description": "All expense documentation receipt records of this PPM shipment.",
- "type": "array",
- "items": {
- "$ref": "#/definitions/MovingExpense"
- }
- },
"pickupPostalCode": {
"description": "The postal code of the origin location where goods are being moved from.",
"type": "string",
@@ -6008,18 +7042,11 @@ func init() {
"example": "90210"
},
"proGearWeight": {
- "description": "The estimated weight of the pro-gear being moved belonging to the service member.",
+ "description": "The estimated weight of the pro-gear being moved belonging to the service member in pounds.",
"type": "integer",
"x-nullable": true,
"x-omitempty": false
},
- "proGearWeightTickets": {
- "description": "All pro-gear weight ticket documentation records for this PPM shipment.",
- "type": "array",
- "items": {
- "$ref": "#/definitions/ProGearWeightTicket"
- }
- },
"reviewedAt": {
"description": "The timestamp of when the Service Counselor has reviewed all of the closeout documents.",
"type": "string",
@@ -6031,31 +7058,27 @@ func init() {
"description": "An optional secondary location near the destination where goods will be dropped off.",
"type": "string",
"format": "zip",
- "title": "ZIP",
"pattern": "^(\\d{5})$",
"x-nullable": true,
"x-omitempty": false,
"example": "90210"
},
"secondaryPickupPostalCode": {
+ "description": "An optional secondary pickup location near the origin where additional goods exist.",
"type": "string",
- "format": "An optional secondary pickup location near the origin where additional goods exist.",
- "title": "ZIP",
+ "format": "zip",
"pattern": "^(\\d{5})$",
"x-nullable": true,
"x-omitempty": false,
"example": "90210"
},
"shipmentId": {
- "description": "The id of the parent MTOShipment object",
+ "description": "The id of the parent MTOShipment record",
"type": "string",
"format": "uuid",
"readOnly": true,
"example": "1f2270c7-7166-40ae-981e-b200ebdf3054"
},
- "signedCertification": {
- "$ref": "#/definitions/SignedCertification"
- },
"sitEstimatedCost": {
"description": "The estimated amount that the government will pay the service member to put their goods into storage. This estimated storage cost is separate from the estimated incentive.",
"type": "integer",
@@ -6078,7 +7101,7 @@ func init() {
"x-omitempty": false
},
"sitEstimatedWeight": {
- "description": "The estimated weight of the goods being put into storage.",
+ "description": "The estimated weight of the goods being put into storage in pounds.",
"type": "integer",
"x-nullable": true,
"x-omitempty": false,
@@ -6102,7 +7125,7 @@ func init() {
]
},
"spouseProGearWeight": {
- "description": "The estimated weight of the pro-gear being moved belonging to a spouse.",
+ "description": "The estimated weight of the pro-gear being moved belonging to a spouse in pounds.",
"type": "integer",
"x-nullable": true,
"x-omitempty": false
@@ -6118,17 +7141,10 @@ func init() {
"x-omitempty": false
},
"updatedAt": {
- "description": "Timestamp of when a property of this object was last updated (UTC)",
+ "description": "The timestamp of when a property of this object was last updated (UTC)",
"type": "string",
"format": "date-time",
"readOnly": true
- },
- "w2Address": {
- "x-nullable": true,
- "$ref": "#/definitions/Address"
- },
- "weightTickets": {
- "$ref": "#/definitions/WeightTickets"
}
},
"x-nullable": true
@@ -6349,80 +7365,254 @@ func init() {
"x-nullable": true,
"example": "John"
},
- "last_name": {
+ "last_name": {
+ "type": "string",
+ "title": "Last name",
+ "x-nullable": true,
+ "example": "Donut"
+ },
+ "middle_name": {
+ "type": "string",
+ "title": "Middle name",
+ "x-nullable": true,
+ "example": "L."
+ },
+ "personal_email": {
+ "type": "string",
+ "format": "x-email",
+ "title": "Personal Email",
+ "pattern": "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$",
+ "x-nullable": true,
+ "example": "john_bob@example.com"
+ },
+ "phone_is_preferred": {
+ "type": "boolean",
+ "title": "Phone",
+ "x-nullable": true
+ },
+ "rank": {
+ "$ref": "#/definitions/ServiceMemberRank"
+ },
+ "residential_address": {
+ "$ref": "#/definitions/Address"
+ },
+ "secondary_telephone": {
+ "type": "string",
+ "format": "telephone",
+ "title": "Alternate Phone",
+ "pattern": "^[2-9]\\d{2}-\\d{3}-\\d{4}$",
+ "x-nullable": true,
+ "example": "212-555-5555"
+ },
+ "suffix": {
+ "type": "string",
+ "title": "Suffix",
+ "x-nullable": true,
+ "example": "Jr."
+ },
+ "telephone": {
+ "type": "string",
+ "format": "telephone",
+ "title": "Best Contact Phone",
+ "pattern": "^[2-9]\\d{2}-\\d{3}-\\d{4}$",
+ "x-nullable": true,
+ "example": "212-555-5555"
+ },
+ "user_id": {
+ "type": "string",
+ "format": "uuid",
+ "example": "c56a4180-65aa-42ec-a945-5fd21dec0538"
+ }
+ }
+ },
+ "PaymentMethodsTotals": {
+ "type": "object",
+ "properties": {
+ "GTCC": {
+ "type": "integer"
+ },
+ "MIL_PAY": {
+ "type": "integer"
+ },
+ "OTHER": {
+ "type": "integer"
+ }
+ }
+ },
+ "PaymentRequest": {
+ "type": "object",
+ "properties": {
+ "eTag": {
+ "type": "string",
+ "readOnly": true
+ },
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "readOnly": true,
+ "example": "c56a4180-65aa-42ec-a945-5fd21dec0538"
+ },
+ "isFinal": {
+ "type": "boolean",
+ "default": false
+ },
+ "moveTaskOrderID": {
+ "type": "string",
+ "format": "uuid",
+ "example": "c56a4180-65aa-42ec-a945-5fd21dec0538"
+ },
+ "paymentRequestNumber": {
+ "type": "string",
+ "readOnly": true,
+ "example": "1234-5678-1"
+ },
+ "paymentServiceItems": {
+ "$ref": "#/definitions/PaymentServiceItems"
+ },
+ "proofOfServiceDocs": {
+ "$ref": "#/definitions/ProofOfServiceDocs"
+ },
+ "recalculationOfPaymentRequestID": {
+ "type": "string",
+ "format": "uuid",
+ "x-nullable": true,
+ "readOnly": true,
+ "example": "c56a4180-65aa-42ec-a945-5fd21dec0538"
+ },
+ "rejectionReason": {
+ "type": "string",
+ "x-nullable": true,
+ "example": "documentation was incomplete"
+ },
+ "status": {
+ "$ref": "#/definitions/PaymentRequestStatus"
+ }
+ }
+ },
+ "PaymentRequestStatus": {
+ "type": "string",
+ "title": "Payment Request Status",
+ "enum": [
+ "PENDING",
+ "REVIEWED",
+ "REVIEWED_AND_ALL_SERVICE_ITEMS_REJECTED",
+ "SENT_TO_GEX",
+ "RECEIVED_BY_GEX",
+ "PAID",
+ "EDI_ERROR",
+ "DEPRECATED"
+ ]
+ },
+ "PaymentRequests": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/PaymentRequest"
+ }
+ },
+ "PaymentServiceItem": {
+ "type": "object",
+ "properties": {
+ "eTag": {
+ "type": "string",
+ "readOnly": true
+ },
+ "id": {
"type": "string",
- "title": "Last name",
- "x-nullable": true,
- "example": "Donut"
+ "format": "uuid",
+ "readOnly": true,
+ "example": "c56a4180-65aa-42ec-a945-5fd21dec0538"
},
- "middle_name": {
+ "mtoServiceItemID": {
"type": "string",
- "title": "Middle name",
- "x-nullable": true,
- "example": "L."
+ "format": "uuid",
+ "example": "c56a4180-65aa-42ec-a945-5fd21dec0538"
},
- "personal_email": {
+ "paymentRequestID": {
"type": "string",
- "format": "x-email",
- "title": "Personal Email",
- "pattern": "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$",
- "x-nullable": true,
- "example": "john_bob@example.com"
+ "format": "uuid",
+ "example": "c56a4180-65aa-42ec-a945-5fd21dec0538"
},
- "phone_is_preferred": {
- "type": "boolean",
- "title": "Phone",
- "x-nullable": true
+ "paymentServiceItemParams": {
+ "$ref": "#/definitions/PaymentServiceItemParams"
},
- "rank": {
- "$ref": "#/definitions/ServiceMemberRank"
+ "priceCents": {
+ "type": "integer",
+ "format": "cents",
+ "title": "Price of the service item in cents",
+ "x-nullable": true
},
- "residential_address": {
- "$ref": "#/definitions/Address"
+ "referenceID": {
+ "format": "string",
+ "readOnly": true,
+ "example": "1234-5678-c56a4180"
},
- "secondary_telephone": {
+ "rejectionReason": {
"type": "string",
- "format": "telephone",
- "title": "Alternate Phone",
- "pattern": "^[2-9]\\d{2}-\\d{3}-\\d{4}$",
"x-nullable": true,
- "example": "212-555-5555"
+ "example": "documentation was incomplete"
},
- "suffix": {
+ "status": {
+ "$ref": "#/definitions/PaymentServiceItemStatus"
+ }
+ }
+ },
+ "PaymentServiceItemParam": {
+ "type": "object",
+ "properties": {
+ "eTag": {
"type": "string",
- "title": "Suffix",
- "x-nullable": true,
- "example": "Jr."
+ "readOnly": true
},
- "telephone": {
+ "id": {
"type": "string",
- "format": "telephone",
- "title": "Best Contact Phone",
- "pattern": "^[2-9]\\d{2}-\\d{3}-\\d{4}$",
- "x-nullable": true,
- "example": "212-555-5555"
+ "format": "uuid",
+ "readOnly": true,
+ "example": "c56a4180-65aa-42ec-a945-5fd21dec0538"
},
- "user_id": {
+ "key": {
+ "$ref": "#/definitions/ServiceItemParamName"
+ },
+ "origin": {
+ "$ref": "#/definitions/ServiceItemParamOrigin"
+ },
+ "paymentServiceItemID": {
"type": "string",
"format": "uuid",
"example": "c56a4180-65aa-42ec-a945-5fd21dec0538"
- }
- }
- },
- "PaymentMethodsTotals": {
- "type": "object",
- "properties": {
- "GTCC": {
- "type": "integer"
},
- "MIL_PAY": {
- "type": "integer"
+ "type": {
+ "$ref": "#/definitions/ServiceItemParamType"
},
- "OTHER": {
- "type": "integer"
+ "value": {
+ "type": "string",
+ "example": "3025"
}
}
},
+ "PaymentServiceItemParams": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/PaymentServiceItemParam"
+ }
+ },
+ "PaymentServiceItemStatus": {
+ "type": "string",
+ "title": "Payment Service Item Status",
+ "enum": [
+ "REQUESTED",
+ "APPROVED",
+ "DENIED",
+ "SENT_TO_GEX",
+ "PAID",
+ "EDI_ERROR"
+ ]
+ },
+ "PaymentServiceItems": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/PaymentServiceItem"
+ }
+ },
"PersonallyProcuredMovePayload": {
"type": "object",
"required": [
@@ -6721,6 +7911,23 @@ func init() {
}
}
},
+ "ProofOfServiceDoc": {
+ "type": "object",
+ "properties": {
+ "uploads": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/UploadWithOmissions"
+ }
+ }
+ }
+ },
+ "ProofOfServiceDocs": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/ProofOfServiceDoc"
+ }
+ },
"RateEnginePostalCodePayload": {
"type": "object",
"required": [
@@ -6796,6 +8003,70 @@ func init() {
],
"x-nullable": true
},
+ "Reweigh": {
+ "description": "A reweigh is when a shipment is weighed for a second time due to the request of a customer, the contractor, system or TOO.",
+ "properties": {
+ "createdAt": {
+ "type": "string",
+ "format": "date-time",
+ "readOnly": true
+ },
+ "eTag": {
+ "type": "string",
+ "readOnly": true
+ },
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "example": "1f2270c7-7166-40ae-981e-b200ebdf3054"
+ },
+ "requestedAt": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "requestedBy": {
+ "$ref": "#/definitions/ReweighRequester"
+ },
+ "shipmentID": {
+ "type": "string",
+ "format": "uuid",
+ "example": "1f2270c7-7166-40ae-981e-b200ebdf3054"
+ },
+ "updatedAt": {
+ "type": "string",
+ "format": "date-time",
+ "readOnly": true
+ },
+ "verificationProvidedAt": {
+ "type": "string",
+ "format": "date-time",
+ "x-nullable": true,
+ "x-omitempty": false
+ },
+ "verificationReason": {
+ "type": "string",
+ "x-nullable": true,
+ "x-omitempty": false,
+ "example": "The reweigh was not performed due to some justification provided by the Prime"
+ },
+ "weight": {
+ "type": "integer",
+ "x-formatting": "weight",
+ "x-nullable": true,
+ "x-omitempty": false,
+ "example": 2000
+ }
+ }
+ },
+ "ReweighRequester": {
+ "type": "string",
+ "enum": [
+ "CUSTOMER",
+ "PRIME",
+ "SYSTEM",
+ "TOO"
+ ]
+ },
"Role": {
"type": "object",
"required": [
@@ -6824,6 +8095,88 @@ func init() {
}
}
},
+ "SITExtension": {
+ "description": "A storage in transit (SIT) Extension is a request for an increase in the billable number of days a shipment is allowed to be in SIT.",
+ "type": "object",
+ "properties": {
+ "approvedDays": {
+ "type": "integer",
+ "x-nullable": true,
+ "x-omitempty": false,
+ "example": 30
+ },
+ "contractorRemarks": {
+ "type": "string",
+ "x-nullable": true,
+ "x-omitempty": false,
+ "example": "We need SIT additional days. The customer has not found a house yet."
+ },
+ "createdAt": {
+ "type": "string",
+ "format": "date-time",
+ "readOnly": true
+ },
+ "decisionDate": {
+ "type": "string",
+ "format": "date-time",
+ "x-nullable": true,
+ "x-omitempty": false
+ },
+ "eTag": {
+ "type": "string",
+ "readOnly": true
+ },
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "example": "1f2270c7-7166-40ae-981e-b200ebdf3054"
+ },
+ "mtoShipmentID": {
+ "type": "string",
+ "format": "uuid",
+ "example": "1f2270c7-7166-40ae-981e-b200ebdf3054"
+ },
+ "officeRemarks": {
+ "type": "string",
+ "x-nullable": true,
+ "x-omitempty": false
+ },
+ "requestReason": {
+ "type": "string",
+ "enum": [
+ "SERIOUS_ILLNESS_MEMBER",
+ "SERIOUS_ILLNESS_DEPENDENT",
+ "IMPENDING_ASSIGNEMENT",
+ "DIRECTED_TEMPORARY_DUTY",
+ "NONAVAILABILITY_OF_CIVILIAN_HOUSING",
+ "AWAITING_COMPLETION_OF_RESIDENCE",
+ "OTHER"
+ ]
+ },
+ "requestedDays": {
+ "type": "integer",
+ "example": 30
+ },
+ "status": {
+ "enum": [
+ "PENDING",
+ "APPROVED",
+ "DENIED"
+ ]
+ },
+ "updatedAt": {
+ "type": "string",
+ "format": "date-time",
+ "readOnly": true
+ }
+ }
+ },
+ "SITExtensions": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/SITExtension"
+ }
+ },
"SITLocationType": {
"description": "The list of SIT location types.",
"type": "string",
@@ -6855,6 +8208,98 @@ func init() {
}
}
},
+ "ServiceItemParamName": {
+ "type": "string",
+ "enum": [
+ "ActualPickupDate",
+ "ContractCode",
+ "ContractYearName",
+ "CubicFeetBilled",
+ "CubicFeetCrating",
+ "DimensionHeight",
+ "DimensionLength",
+ "DimensionWidth",
+ "DistanceZip",
+ "DistanceZipSITDest",
+ "DistanceZipSITOrigin",
+ "EIAFuelPrice",
+ "EscalationCompounded",
+ "FSCMultiplier",
+ "FSCPriceDifferenceInCents",
+ "FSCWeightBasedDistanceMultiplier",
+ "IsPeak",
+ "MarketDest",
+ "MarketOrigin",
+ "MTOAvailableToPrimeAt",
+ "NTSPackingFactor",
+ "NumberDaysSIT",
+ "PriceAreaDest",
+ "PriceAreaIntlDest",
+ "PriceAreaIntlOrigin",
+ "PriceAreaOrigin",
+ "PriceRateOrFactor",
+ "PSI_LinehaulDom",
+ "PSI_LinehaulDomPrice",
+ "PSI_LinehaulShort",
+ "PSI_LinehaulShortPrice",
+ "PSI_PriceDomDest",
+ "PSI_PriceDomDestPrice",
+ "PSI_PriceDomOrigin",
+ "PSI_PriceDomOriginPrice",
+ "PSI_ShippingLinehaulIntlCO",
+ "PSI_ShippingLinehaulIntlCOPrice",
+ "PSI_ShippingLinehaulIntlOC",
+ "PSI_ShippingLinehaulIntlOCPrice",
+ "PSI_ShippingLinehaulIntlOO",
+ "PSI_ShippingLinehaulIntlOOPrice",
+ "RateAreaNonStdDest",
+ "RateAreaNonStdOrigin",
+ "ReferenceDate",
+ "RequestedPickupDate",
+ "ServiceAreaDest",
+ "ServiceAreaOrigin",
+ "ServicesScheduleDest",
+ "ServicesScheduleOrigin",
+ "SITPaymentRequestEnd",
+ "SITPaymentRequestStart",
+ "SITScheduleDest",
+ "SITScheduleOrigin",
+ "SITServiceAreaDest",
+ "SITServiceAreaOrigin",
+ "WeightAdjusted",
+ "WeightBilled",
+ "WeightEstimated",
+ "WeightOriginal",
+ "WeightReweigh",
+ "ZipDestAddress",
+ "ZipPickupAddress",
+ "ZipSITDestHHGFinalAddress",
+ "ZipSITDestHHGOriginalAddress",
+ "ZipSITOriginHHGActualAddress",
+ "ZipSITOriginHHGOriginalAddress"
+ ]
+ },
+ "ServiceItemParamOrigin": {
+ "type": "string",
+ "enum": [
+ "PRIME",
+ "SYSTEM",
+ "PRICER",
+ "PAYMENT_REQUEST"
+ ]
+ },
+ "ServiceItemParamType": {
+ "type": "string",
+ "enum": [
+ "STRING",
+ "DATE",
+ "INTEGER",
+ "DECIMAL",
+ "TIMESTAMP",
+ "PaymentServiceItemUUID",
+ "BOOLEAN"
+ ]
+ },
"ServiceMemberBackupContactPayload": {
"type": "object",
"required": [
@@ -7108,7 +8553,88 @@ func init() {
"W_4": "W-4",
"W_5": "W-5"
},
- "x-nullable": true
+ "x-nullable": true
+ },
+ "ServiceRequestDocument": {
+ "type": "object",
+ "properties": {
+ "uploads": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/UploadWithOmissions"
+ }
+ }
+ }
+ },
+ "ServiceRequestDocuments": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/ServiceRequestDocument"
+ }
+ },
+ "ShipmentAddressUpdate": {
+ "description": "This represents a destination address change request made by the Prime that is either auto-approved or requires review if the pricing criteria has changed. If criteria has changed, then it must be approved or rejected by a TOO.\n",
+ "type": "object",
+ "required": [
+ "id",
+ "status",
+ "shipmentID",
+ "originalAddress",
+ "newAddress",
+ "contractorRemarks"
+ ],
+ "properties": {
+ "contractorRemarks": {
+ "description": "The reason there is an address change.",
+ "type": "string",
+ "title": "Contractor Remarks",
+ "readOnly": true,
+ "example": "This is a contractor remark"
+ },
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "readOnly": true,
+ "example": "c56a4180-65aa-42ec-a945-5fd21dec0538"
+ },
+ "newAddress": {
+ "$ref": "#/definitions/Address"
+ },
+ "officeRemarks": {
+ "description": "The TOO comment on approval or rejection.",
+ "type": "string",
+ "title": "Office Remarks",
+ "x-nullable": true,
+ "example": "This is an office remark"
+ },
+ "originalAddress": {
+ "$ref": "#/definitions/Address"
+ },
+ "shipmentID": {
+ "type": "string",
+ "format": "uuid",
+ "readOnly": true,
+ "example": "c56a4180-65aa-42ec-a945-5fd21dec0538"
+ },
+ "status": {
+ "$ref": "#/definitions/ShipmentAddressUpdateStatus"
+ }
+ }
+ },
+ "ShipmentAddressUpdateStatus": {
+ "type": "string",
+ "title": "Status",
+ "enum": [
+ "REQUESTED",
+ "REJECTED",
+ "APPROVED"
+ ],
+ "x-display-value": {
+ "APPROVED": "APPROVED",
+ "REJECTED": "REJECTED",
+ "REQUESTED": "REQUESTED"
+ },
+ "readOnly": true
},
"SignedCertification": {
"description": "Signed certification",
@@ -7266,6 +8792,43 @@ func init() {
"$ref": "#/definitions/SignedCertificationPayload"
}
},
+ "StorageFacility": {
+ "description": "The Storage Facility information for the shipment",
+ "type": "object",
+ "properties": {
+ "address": {
+ "$ref": "#/definitions/Address"
+ },
+ "eTag": {
+ "type": "string",
+ "readOnly": true
+ },
+ "email": {
+ "type": "string",
+ "format": "x-email",
+ "pattern": "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$",
+ "x-nullable": true
+ },
+ "facilityName": {
+ "type": "string"
+ },
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "example": "c56a4180-65aa-42ec-a945-5fd21dec0538"
+ },
+ "lotNumber": {
+ "type": "string",
+ "x-nullable": true
+ },
+ "phone": {
+ "type": "string",
+ "format": "telephone",
+ "pattern": "^[2-9]\\d{2}-\\d{3}-\\d{4}$",
+ "x-nullable": true
+ }
+ }
+ },
"SubmitMoveForApprovalPayload": {
"type": "object",
"properties": {
@@ -7863,6 +9426,57 @@ func init() {
}
}
},
+ "UploadWithOmissions": {
+ "description": "An uploaded file.",
+ "type": "object",
+ "required": [
+ "filename",
+ "contentType",
+ "bytes"
+ ],
+ "properties": {
+ "bytes": {
+ "type": "integer"
+ },
+ "contentType": {
+ "type": "string",
+ "format": "mime-type",
+ "example": "application/pdf"
+ },
+ "createdAt": {
+ "type": "string",
+ "format": "date-time",
+ "readOnly": true
+ },
+ "filename": {
+ "type": "string",
+ "example": "filename.pdf"
+ },
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "example": "c56a4180-65aa-42ec-a945-5fd21dec0538"
+ },
+ "status": {
+ "type": "string",
+ "enum": [
+ "INFECTED",
+ "CLEAN",
+ "PROCESSING"
+ ]
+ },
+ "updatedAt": {
+ "type": "string",
+ "format": "date-time",
+ "readOnly": true
+ },
+ "url": {
+ "type": "string",
+ "format": "uri",
+ "example": "https://uploads.domain.test/dir/c56a4180-65aa-42ec-a945-5fd21dec0538"
+ }
+ }
+ },
"ValidationError": {
"required": [
"invalidFields"
@@ -8316,6 +9930,55 @@ func init() {
}
}
},
+ "/all_moves/{serviceMemberId}": {
+ "get": {
+ "description": "Gets all moves that belongs to the serviceMember\n",
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "moves"
+ ],
+ "summary": "Return the current and previous moves of a service member",
+ "operationId": "getAllMoves",
+ "parameters": [
+ {
+ "type": "string",
+ "format": "uuid",
+ "description": "UUID of the service member",
+ "name": "serviceMemberId",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successfully retrieved moves. A successful fetch might still return zero moves.",
+ "schema": {
+ "$ref": "#/definitions/MovesList"
+ }
+ },
+ "401": {
+ "description": "The request was denied.",
+ "schema": {
+ "$ref": "#/definitions/ClientError"
+ }
+ },
+ "403": {
+ "description": "The request was denied.",
+ "schema": {
+ "$ref": "#/definitions/ClientError"
+ }
+ },
+ "500": {
+ "description": "A server error occurred.",
+ "schema": {
+ "$ref": "#/definitions/Error"
+ }
+ }
+ }
+ }
+ },
"/backup_contacts/{backupContactId}": {
"get": {
"description": "Returns the given service member backup contact",
@@ -12954,6 +14617,53 @@ func init() {
}
}
},
+ "Customer": {
+ "type": "object",
+ "properties": {
+ "branch": {
+ "type": "string",
+ "example": "COAST_GUARD"
+ },
+ "currentAddress": {
+ "$ref": "#/definitions/Address"
+ },
+ "dodID": {
+ "type": "string"
+ },
+ "eTag": {
+ "type": "string",
+ "readOnly": true
+ },
+ "email": {
+ "type": "string",
+ "format": "x-email",
+ "pattern": "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$",
+ "example": "fake@example.com"
+ },
+ "firstName": {
+ "type": "string",
+ "example": "Vanya"
+ },
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "example": "c56a4180-65aa-42ec-a945-5fd21dec0538"
+ },
+ "lastName": {
+ "type": "string",
+ "example": "Petrovna"
+ },
+ "phone": {
+ "type": "string",
+ "format": "telephone"
+ },
+ "userID": {
+ "type": "string",
+ "format": "uuid",
+ "example": "c56a4180-65aa-42ec-a945-5fd21dec0538"
+ }
+ }
+ },
"DeptIndicator": {
"type": "string",
"title": "Dept. indicator",
@@ -12975,6 +14685,18 @@ func init() {
},
"x-nullable": true
},
+ "DestinationType": {
+ "type": "string",
+ "title": "Destination Type",
+ "enum": [
+ "HOME_OF_RECORD",
+ "HOME_OF_SELECTION",
+ "PLACE_ENTERED_ACTIVE_DUTY",
+ "OTHER_THAN_AUTHORIZED"
+ ],
+ "x-nullable": true,
+ "example": "OTHER_THAN_AUTHORIZED"
+ },
"Document": {
"type": "object",
"required": [
@@ -13001,6 +14723,32 @@ func init() {
}
}
},
+ "DutyLocation": {
+ "type": "object",
+ "properties": {
+ "address": {
+ "$ref": "#/definitions/Address"
+ },
+ "addressID": {
+ "type": "string",
+ "format": "uuid",
+ "example": "c56a4180-65aa-42ec-a945-5fd21dec0538"
+ },
+ "eTag": {
+ "type": "string",
+ "readOnly": true
+ },
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "example": "c56a4180-65aa-42ec-a945-5fd21dec0538"
+ },
+ "name": {
+ "type": "string",
+ "example": "Fort Bragg North Station"
+ }
+ }
+ },
"DutyLocationPayload": {
"type": "object",
"required": [
@@ -13066,10 +14814,77 @@ func init() {
"x-nullable": true,
"example": 2000
},
- "proGearSpouse": {
- "description": "Spouse's pro-gear weight limit as set by an Office user, distinct from the service member's default weight allotment determined by rank\n",
+ "proGearSpouse": {
+ "description": "Spouse's pro-gear weight limit as set by an Office user, distinct from the service member's default weight allotment determined by rank\n",
+ "type": "integer",
+ "x-nullable": true,
+ "example": 500
+ }
+ }
+ },
+ "Entitlements": {
+ "type": "object",
+ "properties": {
+ "authorizedWeight": {
+ "type": "integer",
+ "x-formatting": "weight",
+ "x-nullable": true,
+ "example": 2000
+ },
+ "dependentsAuthorized": {
+ "type": "boolean",
+ "x-nullable": true,
+ "example": true
+ },
+ "eTag": {
+ "type": "string",
+ "readOnly": true
+ },
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "example": "571008b1-b0de-454d-b843-d71be9f02c04"
+ },
+ "nonTemporaryStorage": {
+ "type": "boolean",
+ "x-nullable": true,
+ "example": false
+ },
+ "organizationalClothingAndIndividualEquipment": {
+ "type": "boolean",
+ "example": false
+ },
+ "privatelyOwnedVehicle": {
+ "type": "boolean",
+ "x-nullable": true,
+ "example": false
+ },
+ "proGearWeight": {
+ "type": "integer",
+ "x-formatting": "weight",
+ "example": 2000
+ },
+ "proGearWeightSpouse": {
"type": "integer",
- "x-nullable": true,
+ "x-formatting": "weight",
+ "example": 500
+ },
+ "requiredMedicalEquipmentWeight": {
+ "type": "integer",
+ "x-formatting": "weight",
+ "example": 500
+ },
+ "storageInTransit": {
+ "type": "integer",
+ "example": 90
+ },
+ "totalDependents": {
+ "type": "integer",
+ "example": 2
+ },
+ "totalWeight": {
+ "type": "integer",
+ "x-formatting": "weight",
"example": 500
}
}
@@ -13282,6 +15097,62 @@ func init() {
}
}
},
+ "MTOAgent-2": {
+ "type": "object",
+ "properties": {
+ "agentType": {
+ "$ref": "#/definitions/MTOAgentType-2"
+ },
+ "createdAt": {
+ "type": "string",
+ "format": "date-time",
+ "readOnly": true
+ },
+ "eTag": {
+ "type": "string",
+ "readOnly": true
+ },
+ "email": {
+ "type": "string",
+ "format": "x-email",
+ "pattern": "^([a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,})?$",
+ "x-nullable": true
+ },
+ "firstName": {
+ "type": "string",
+ "x-nullable": true
+ },
+ "id": {
+ "description": "The ID of the agent.",
+ "type": "string",
+ "format": "uuid",
+ "readOnly": true,
+ "example": "1f2270c7-7166-40ae-981e-b200ebdf3054"
+ },
+ "lastName": {
+ "type": "string",
+ "x-nullable": true
+ },
+ "mtoShipmentID": {
+ "description": "The ID of the shipment this agent is permitted to release/receive.",
+ "type": "string",
+ "format": "uuid",
+ "readOnly": true,
+ "example": "1f2270c7-7166-40ae-981e-b200ebdf3054"
+ },
+ "phone": {
+ "type": "string",
+ "format": "telephone",
+ "pattern": "^([2-9]\\d{2}-\\d{3}-\\d{4})?$",
+ "x-nullable": true
+ },
+ "updatedAt": {
+ "type": "string",
+ "format": "date-time",
+ "readOnly": true
+ }
+ }
+ },
"MTOAgentType": {
"type": "string",
"title": "MTO Agent Type",
@@ -13291,16 +15162,272 @@ func init() {
],
"example": "RELEASING_AGENT"
},
+ "MTOAgentType-2": {
+ "description": "The type for this agent. ` + "`" + `RELEASING` + "`" + ` means they have authority on pickup, ` + "`" + `RECEIVING` + "`" + ` means they can receive the shipment on delivery.\n",
+ "type": "string",
+ "title": "Agent Type",
+ "enum": [
+ "RELEASING_AGENT",
+ "RECEIVING_AGENT"
+ ],
+ "example": "RELEASING_AGENT"
+ },
"MTOAgents": {
"type": "array",
"items": {
"$ref": "#/definitions/MTOAgent"
}
},
+ "MTOAgents-2": {
+ "description": "A list of the agents for a shipment. Agents are the people who the Prime contractor recognize as permitted to release (in the case of pickup) or receive (on delivery) a shipment.\n",
+ "type": "array",
+ "maxItems": 2,
+ "items": {
+ "$ref": "#/definitions/MTOAgent-2"
+ }
+ },
+ "MTOServiceItem": {
+ "description": "MTOServiceItem describes a base type of a service item. Polymorphic type.",
+ "type": "object",
+ "required": [
+ "modelType",
+ "moveTaskOrderID"
+ ],
+ "properties": {
+ "eTag": {
+ "description": "A hash unique to this service item that should be used as the \"If-Match\" header for any updates.",
+ "type": "string",
+ "readOnly": true
+ },
+ "id": {
+ "description": "The ID of the service item.",
+ "type": "string",
+ "format": "uuid",
+ "readOnly": true,
+ "example": "1f2270c7-7166-40ae-981e-b200ebdf3054"
+ },
+ "modelType": {
+ "$ref": "#/definitions/MTOServiceItemModelType"
+ },
+ "moveTaskOrderID": {
+ "description": "The ID of the move for this service item.",
+ "type": "string",
+ "format": "uuid",
+ "example": "1f2270c7-7166-40ae-981e-b200ebdf3054"
+ },
+ "mtoShipmentID": {
+ "description": "The ID of the shipment this service is for, if any. Optional.",
+ "type": "string",
+ "format": "uuid",
+ "example": "1f2270c7-7166-40ae-981e-b200ebdf3054"
+ },
+ "reServiceName": {
+ "description": "The full descriptive name of the service.",
+ "type": "string",
+ "readOnly": true
+ },
+ "rejectionReason": {
+ "description": "The reason why this service item was rejected by the TOO.",
+ "type": "string",
+ "x-nullable": true,
+ "readOnly": true,
+ "example": "item was too heavy"
+ },
+ "serviceRequestDocuments": {
+ "$ref": "#/definitions/ServiceRequestDocuments"
+ },
+ "status": {
+ "$ref": "#/definitions/MTOServiceItemStatus"
+ }
+ },
+ "discriminator": "modelType"
+ },
+ "MTOServiceItemModelType": {
+ "description": "Describes all model sub-types for a MTOServiceItem model.\n\nUsing this list, choose the correct modelType in the dropdown, corresponding to the service item type.\n * DOFSIT, DOASIT - MTOServiceItemOriginSIT\n * DDFSIT, DDASIT - MTOServiceItemDestSIT\n * DOSHUT, DDSHUT - MTOServiceItemShuttle\n * DCRT, DUCRT - MTOServiceItemDomesticCrating\n\nThe documentation will then update with the supported fields.\n",
+ "type": "string",
+ "enum": [
+ "MTOServiceItemBasic",
+ "MTOServiceItemOriginSIT",
+ "MTOServiceItemDestSIT",
+ "MTOServiceItemShuttle",
+ "MTOServiceItemDomesticCrating"
+ ]
+ },
+ "MTOServiceItemStatus": {
+ "description": "The status of a service item, indicating where it is in the TOO's approval process.",
+ "type": "string",
+ "enum": [
+ "SUBMITTED",
+ "APPROVED",
+ "REJECTED"
+ ],
+ "readOnly": true
+ },
"MTOShipment": {
"properties": {
"agents": {
- "$ref": "#/definitions/MTOAgents"
+ "$ref": "#/definitions/MTOAgents"
+ },
+ "createdAt": {
+ "type": "string",
+ "format": "date-time",
+ "readOnly": true
+ },
+ "customerRemarks": {
+ "type": "string",
+ "x-nullable": true,
+ "readOnly": true,
+ "example": "handle with care"
+ },
+ "destinationAddress": {
+ "$ref": "#/definitions/Address"
+ },
+ "eTag": {
+ "type": "string"
+ },
+ "hasSecondaryDeliveryAddress": {
+ "type": "boolean",
+ "x-nullable": true,
+ "x-omitempty": false
+ },
+ "hasSecondaryPickupAddress": {
+ "type": "boolean",
+ "x-nullable": true,
+ "x-omitempty": false
+ },
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "readOnly": true,
+ "example": "1f2270c7-7166-40ae-981e-b200ebdf3054"
+ },
+ "moveTaskOrderID": {
+ "type": "string",
+ "format": "uuid",
+ "readOnly": true,
+ "example": "1f2270c7-7166-40ae-981e-b200ebdf3054"
+ },
+ "pickupAddress": {
+ "$ref": "#/definitions/Address"
+ },
+ "ppmShipment": {
+ "$ref": "#/definitions/PPMShipment"
+ },
+ "requestedDeliveryDate": {
+ "type": "string",
+ "format": "date",
+ "x-nullable": true,
+ "readOnly": true
+ },
+ "requestedPickupDate": {
+ "type": "string",
+ "format": "date",
+ "x-nullable": true,
+ "readOnly": true
+ },
+ "secondaryDeliveryAddress": {
+ "$ref": "#/definitions/Address"
+ },
+ "secondaryPickupAddress": {
+ "$ref": "#/definitions/Address"
+ },
+ "shipmentType": {
+ "$ref": "#/definitions/MTOShipmentType"
+ },
+ "status": {
+ "$ref": "#/definitions/MTOShipmentStatus"
+ },
+ "updatedAt": {
+ "type": "string",
+ "format": "date-time",
+ "readOnly": true
+ }
+ }
+ },
+ "MTOShipmentStatus": {
+ "type": "string",
+ "enum": [
+ "DRAFT",
+ "APPROVED",
+ "SUBMITTED",
+ "REJECTED"
+ ],
+ "readOnly": true
+ },
+ "MTOShipmentType": {
+ "type": "string",
+ "title": "Shipment Type",
+ "enum": [
+ "HHG",
+ "HHG_INTO_NTS_DOMESTIC",
+ "HHG_OUTOF_NTS_DOMESTIC",
+ "PPM"
+ ],
+ "x-display-value": {
+ "HHG": "HHG",
+ "INTERNATIONAL_HHG": "International HHG",
+ "INTERNATIONAL_UB": "International UB",
+ "PPM": "PPM"
+ },
+ "example": "HHG"
+ },
+ "MTOShipmentType-2": {
+ "description": "The type of shipment.\n * ` + "`" + `HHG` + "`" + ` = Household goods move\n * ` + "`" + `HHG_INTO_NTS_DOMESTIC` + "`" + ` = HHG into Non-temporary storage (NTS)\n * ` + "`" + `HHG_OUTOF_NTS_DOMESTIC` + "`" + ` = HHG out of Non-temporary storage (NTS Release)\n * ` + "`" + `PPM` + "`" + ` = Personally Procured Move also known as Do It Yourself (DITY)\n",
+ "type": "string",
+ "title": "Shipment Type",
+ "enum": [
+ "BOAT_HAUL_AWAY",
+ "BOAT_TOW_AWAY",
+ "HHG",
+ "HHG_INTO_NTS_DOMESTIC",
+ "HHG_OUTOF_NTS_DOMESTIC",
+ "INTERNATIONAL_HHG",
+ "INTERNATIONAL_UB",
+ "MOTORHOME",
+ "PPM"
+ ],
+ "x-display-value": {
+ "HHG": "Household goods move (HHG)",
+ "HHG_INTO_NTS_DOMESTIC": "HHG into Non-temporary storage (NTS)",
+ "HHG_OUTOF_NTS_DOMESTIC": "HHG out of Non-temporary storage (NTS Release)",
+ "PPM": "Personally Procured Move also known as Do It Yourself (DITY)"
+ },
+ "example": "HHG"
+ },
+ "MTOShipmentWithoutServiceItems": {
+ "type": "object",
+ "properties": {
+ "actualDeliveryDate": {
+ "description": "The date when the Prime contractor actually delivered the shipment. Updated after-the-fact.",
+ "type": "string",
+ "format": "date",
+ "x-nullable": true,
+ "x-omitempty": false
+ },
+ "actualPickupDate": {
+ "description": "The date when the Prime contractor actually picked up the shipment. Updated after-the-fact.",
+ "type": "string",
+ "format": "date",
+ "x-nullable": true,
+ "x-omitempty": false
+ },
+ "agents": {
+ "$ref": "#/definitions/MTOAgents-2"
+ },
+ "approvedDate": {
+ "description": "The date when the Transportation Ordering Officer first approved this shipment for the move.",
+ "type": "string",
+ "format": "date",
+ "x-nullable": true,
+ "x-omitempty": false,
+ "readOnly": true
+ },
+ "counselorRemarks": {
+ "description": "The counselor can use the counselor remarks field to inform the movers about any\nspecial circumstances for this shipment. Typical examples:\n * bulky or fragile items,\n * weapons,\n * access info for their address.\n\nCounselors enters this information when creating or editing an MTO Shipment. Optional field.\n",
+ "type": "string",
+ "x-nullable": true,
+ "readOnly": true,
+ "example": "handle with care"
},
"createdAt": {
"type": "string",
@@ -13308,68 +15435,185 @@ func init() {
"readOnly": true
},
"customerRemarks": {
+ "description": "The customer can use the customer remarks field to inform the services counselor and the movers about any\nspecial circumstances for this shipment. Typical examples:\n * bulky or fragile items,\n * weapons,\n * access info for their address.\n\nCustomer enters this information during onboarding. Optional field.\n",
"type": "string",
"x-nullable": true,
"readOnly": true,
"example": "handle with care"
},
+ "deliveryAddressUpdate": {
+ "$ref": "#/definitions/ShipmentAddressUpdate"
+ },
"destinationAddress": {
- "$ref": "#/definitions/Address"
+ "description": "Where the movers should deliver this shipment. Often provided by the customer when they enter shipment details\nduring onboarding, if they know their new address already.\n\nMay be blank when entered by the customer, required when entered by the Prime. May not represent the true\nfinal destination due to the shipment being diverted or placed in SIT.\n",
+ "allOf": [
+ {
+ "$ref": "#/definitions/Address"
+ }
+ ]
},
- "eTag": {
- "type": "string"
+ "destinationType": {
+ "$ref": "#/definitions/DestinationType"
},
- "hasSecondaryDeliveryAddress": {
- "type": "boolean",
- "x-nullable": true,
- "x-omitempty": false
+ "diversion": {
+ "description": "This value indicates whether or not this shipment is part of a diversion. If yes, the shipment can be either the starting or ending segment of the diversion.\n",
+ "type": "boolean"
},
- "hasSecondaryPickupAddress": {
- "type": "boolean",
+ "eTag": {
+ "description": "A hash unique to this shipment that should be used as the \"If-Match\" header for any updates.",
+ "type": "string",
+ "readOnly": true
+ },
+ "firstAvailableDeliveryDate": {
+ "description": "The date the Prime provides to the customer as the first possible delivery date so that they can plan their travel accordingly.\n",
+ "type": "string",
+ "format": "date",
"x-nullable": true,
"x-omitempty": false
},
"id": {
+ "description": "The ID of the shipment.",
"type": "string",
"format": "uuid",
"readOnly": true,
"example": "1f2270c7-7166-40ae-981e-b200ebdf3054"
},
"moveTaskOrderID": {
+ "description": "The ID of the move for this shipment.",
"type": "string",
"format": "uuid",
"readOnly": true,
"example": "1f2270c7-7166-40ae-981e-b200ebdf3054"
},
+ "ntsRecordedWeight": {
+ "description": "The previously recorded weight for the NTS Shipment. Used for NTS Release to know what the previous primeActualWeight or billable weight was.",
+ "type": "integer",
+ "x-formatting": "weight",
+ "x-nullable": true,
+ "example": 4500
+ },
"pickupAddress": {
- "$ref": "#/definitions/Address"
+ "description": "The address where the movers should pick up this shipment, entered by the customer during onboarding when they enter shipment details.\n",
+ "allOf": [
+ {
+ "$ref": "#/definitions/Address"
+ }
+ ]
+ },
+ "pointOfContact": {
+ "description": "Email or ID of the person who will be contacted in the event of questions or concerns about this update. May be the person performing the update, or someone else working with the Prime contractor.\n",
+ "type": "string"
},
"ppmShipment": {
- "$ref": "#/definitions/PPMShipment"
+ "$ref": "#/definitions/PPMShipment-2"
+ },
+ "primeActualWeight": {
+ "description": "The actual weight of the shipment, provided after the Prime packs, picks up, and weighs a customer's shipment.",
+ "type": "integer",
+ "minimum": 1,
+ "x-nullable": true,
+ "example": 4500
+ },
+ "primeEstimatedWeight": {
+ "description": "The estimated weight of this shipment, determined by the movers during the pre-move survey. This value **can only be updated once.** If there was an issue with estimating the weight and a mistake was made, the Prime contracter will need to contact the TOO to change it.\n",
+ "type": "integer",
+ "minimum": 1,
+ "x-nullable": true,
+ "example": 4500
+ },
+ "primeEstimatedWeightRecordedDate": {
+ "description": "The date when the Prime contractor recorded the shipment's estimated weight.",
+ "type": "string",
+ "format": "date",
+ "x-nullable": true,
+ "x-omitempty": false,
+ "readOnly": true
},
"requestedDeliveryDate": {
+ "description": "The customer's preferred delivery date.",
"type": "string",
"format": "date",
"x-nullable": true,
+ "x-omitempty": false,
"readOnly": true
},
"requestedPickupDate": {
+ "description": "The date the customer selects during onboarding as their preferred pickup date. Other dates, such as required delivery date and (outside MilMove) the pack date, are derived from this date.\n",
+ "type": "string",
+ "format": "date",
+ "x-nullable": true,
+ "x-omitempty": false,
+ "readOnly": true
+ },
+ "requiredDeliveryDate": {
+ "description": "The latest date by which the Prime can deliver a customer's shipment without violating the contract. This is calculated based on weight, distance, and the scheduled pickup date. It cannot be modified.\n",
"type": "string",
"format": "date",
"x-nullable": true,
+ "x-omitempty": false,
"readOnly": true
},
+ "reweigh": {
+ "$ref": "#/definitions/Reweigh"
+ },
+ "scheduledDeliveryDate": {
+ "description": "The date the Prime contractor scheduled to deliver this shipment after consultation with the customer.",
+ "type": "string",
+ "format": "date",
+ "x-nullable": true,
+ "x-omitempty": false
+ },
+ "scheduledPickupDate": {
+ "description": "The date the Prime contractor scheduled to pick up this shipment after consultation with the customer.",
+ "type": "string",
+ "format": "date",
+ "x-nullable": true,
+ "x-omitempty": false
+ },
"secondaryDeliveryAddress": {
- "$ref": "#/definitions/Address"
+ "description": "A second delivery address for this shipment, if the customer entered one. An optional field.",
+ "allOf": [
+ {
+ "$ref": "#/definitions/Address"
+ }
+ ]
},
"secondaryPickupAddress": {
- "$ref": "#/definitions/Address"
+ "description": "A second pickup address for this shipment, if the customer entered one. An optional field.",
+ "allOf": [
+ {
+ "$ref": "#/definitions/Address"
+ }
+ ]
},
"shipmentType": {
- "$ref": "#/definitions/MTOShipmentType"
+ "$ref": "#/definitions/MTOShipmentType-2"
+ },
+ "sitExtensions": {
+ "$ref": "#/definitions/SITExtensions"
},
"status": {
- "$ref": "#/definitions/MTOShipmentStatus"
+ "description": "The status of a shipment, indicating where it is in the TOO's approval process. Can only be updated by the contractor in special circumstances.\n",
+ "type": "string",
+ "enum": [
+ "SUBMITTED",
+ "APPROVED",
+ "REJECTED",
+ "CANCELLATION_REQUESTED",
+ "CANCELED",
+ "DIVERSION_REQUESTED"
+ ],
+ "readOnly": true
+ },
+ "storageFacility": {
+ "allOf": [
+ {
+ "x-nullable": true
+ },
+ {
+ "$ref": "#/definitions/StorageFacility"
+ }
+ ]
},
"updatedAt": {
"type": "string",
@@ -13378,39 +15622,19 @@ func init() {
}
}
},
- "MTOShipmentStatus": {
- "type": "string",
- "enum": [
- "DRAFT",
- "APPROVED",
- "SUBMITTED",
- "REJECTED"
- ],
- "readOnly": true
- },
- "MTOShipmentType": {
- "type": "string",
- "title": "Shipment Type",
- "enum": [
- "HHG",
- "HHG_INTO_NTS_DOMESTIC",
- "HHG_OUTOF_NTS_DOMESTIC",
- "PPM"
- ],
- "x-display-value": {
- "HHG": "HHG",
- "INTERNATIONAL_HHG": "International HHG",
- "INTERNATIONAL_UB": "International UB",
- "PPM": "PPM"
- },
- "example": "HHG"
- },
"MTOShipments": {
"type": "array",
"items": {
"$ref": "#/definitions/MTOShipment"
}
},
+ "MTOShipmentsWithoutServiceObjects": {
+ "description": "A list of shipments without their associated service items.",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/MTOShipmentWithoutServiceItems"
+ }
+ },
"MethodOfReceipt": {
"type": "string",
"title": "Method of Receipt",
@@ -13920,6 +16144,124 @@ func init() {
"SUBMITTED": "Submitted"
}
},
+ "MoveTaskOrder": {
+ "type": "object",
+ "required": [
+ "mtoShipments",
+ "mtoServiceItems",
+ "paymentRequests"
+ ],
+ "properties": {
+ "availableToPrimeAt": {
+ "type": "string",
+ "format": "date-time",
+ "x-nullable": true,
+ "readOnly": true
+ },
+ "createdAt": {
+ "type": "string",
+ "format": "date-time",
+ "readOnly": true
+ },
+ "eTag": {
+ "type": "string",
+ "readOnly": true
+ },
+ "excessWeightAcknowledgedAt": {
+ "type": "string",
+ "format": "date-time",
+ "x-nullable": true,
+ "x-omitempty": false,
+ "readOnly": true
+ },
+ "excessWeightQualifiedAt": {
+ "type": "string",
+ "format": "date-time",
+ "x-nullable": true,
+ "x-omitempty": false,
+ "readOnly": true
+ },
+ "excessWeightUploadId": {
+ "type": "string",
+ "format": "uuid",
+ "x-nullable": true,
+ "x-omitempty": false,
+ "readOnly": true
+ },
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "example": "a502b4f1-b9c4-4faf-8bdd-68292501bf26"
+ },
+ "moveCode": {
+ "type": "string",
+ "readOnly": true,
+ "example": "HYXFJF"
+ },
+ "mtoServiceItems": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/MTOServiceItem"
+ }
+ },
+ "mtoShipments": {
+ "$ref": "#/definitions/MTOShipmentsWithoutServiceObjects"
+ },
+ "order": {
+ "$ref": "#/definitions/Order"
+ },
+ "orderID": {
+ "type": "string",
+ "format": "uuid",
+ "example": "c56a4180-65aa-42ec-a945-5fd21dec0538"
+ },
+ "paymentRequests": {
+ "$ref": "#/definitions/PaymentRequests"
+ },
+ "ppmEstimatedWeight": {
+ "type": "integer"
+ },
+ "ppmType": {
+ "type": "string",
+ "enum": [
+ "PARTIAL",
+ "FULL"
+ ]
+ },
+ "primeCounselingCompletedAt": {
+ "type": "string",
+ "format": "date-time",
+ "x-nullable": true,
+ "readOnly": true
+ },
+ "referenceId": {
+ "type": "string",
+ "example": "1001-3456"
+ },
+ "updatedAt": {
+ "type": "string",
+ "format": "date-time",
+ "readOnly": true
+ }
+ }
+ },
+ "MovesList": {
+ "type": "object",
+ "properties": {
+ "currentMove": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/MoveTaskOrder"
+ }
+ },
+ "previousMoves": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/MoveTaskOrder"
+ }
+ }
+ }
+ },
"MovingExpense": {
"description": "Expense information and receipts of costs incurred that can be reimbursed while moving a PPM shipment.",
"type": "object",
@@ -14216,6 +16558,63 @@ func init() {
"x-nullable": true,
"x-omitempty": false
},
+ "Order": {
+ "type": "object",
+ "required": [
+ "orderNumber",
+ "rank",
+ "linesOfAccounting"
+ ],
+ "properties": {
+ "customer": {
+ "$ref": "#/definitions/Customer"
+ },
+ "customerID": {
+ "type": "string",
+ "format": "uuid",
+ "example": "c56a4180-65aa-42ec-a945-5fd21dec0538"
+ },
+ "destinationDutyLocation": {
+ "$ref": "#/definitions/DutyLocation"
+ },
+ "eTag": {
+ "type": "string",
+ "readOnly": true
+ },
+ "entitlement": {
+ "$ref": "#/definitions/Entitlements"
+ },
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "example": "c56a4180-65aa-42ec-a945-5fd21dec0538"
+ },
+ "linesOfAccounting": {
+ "type": "string"
+ },
+ "orderNumber": {
+ "type": "string"
+ },
+ "ordersType": {
+ "$ref": "#/definitions/OrdersType"
+ },
+ "originDutyLocation": {
+ "$ref": "#/definitions/DutyLocation"
+ },
+ "originDutyLocationGBLOC": {
+ "type": "string",
+ "example": "KKFA"
+ },
+ "rank": {
+ "type": "string",
+ "example": "E_5"
+ },
+ "reportByDate": {
+ "type": "string",
+ "format": "date"
+ }
+ }
+ },
"OrderPayGrade": {
"type": "string",
"title": "Rank",
@@ -14493,30 +16892,307 @@ func init() {
"type": "integer",
"title": "High estimate"
},
- "range_min": {
- "type": "integer",
- "title": "Low estimate"
- }
- }
- },
- "PPMIncentive": {
- "type": "object",
- "required": [
- "gcc",
- "incentive_percentage"
- ],
- "properties": {
- "gcc": {
+ "range_min": {
+ "type": "integer",
+ "title": "Low estimate"
+ }
+ }
+ },
+ "PPMIncentive": {
+ "type": "object",
+ "required": [
+ "gcc",
+ "incentive_percentage"
+ ],
+ "properties": {
+ "gcc": {
+ "type": "integer",
+ "title": "GCC"
+ },
+ "incentive_percentage": {
+ "type": "integer",
+ "title": "PPM Incentive @ 95%"
+ }
+ }
+ },
+ "PPMShipment": {
+ "description": "A personally procured move is a type of shipment that a service member moves themselves.",
+ "required": [
+ "id",
+ "shipmentId",
+ "createdAt",
+ "status",
+ "expectedDepartureDate",
+ "pickupPostalCode",
+ "destinationPostalCode",
+ "sitExpected",
+ "eTag"
+ ],
+ "properties": {
+ "actualDestinationPostalCode": {
+ "description": "The actual postal code where the PPM shipment ended. To be filled once the customer has moved the shipment.\n",
+ "type": "string",
+ "format": "zip",
+ "title": "ZIP",
+ "pattern": "^(\\d{5})$",
+ "x-nullable": true,
+ "x-omitempty": false,
+ "example": "90210"
+ },
+ "actualMoveDate": {
+ "description": "The actual start date of when the PPM shipment left the origin.",
+ "type": "string",
+ "format": "date",
+ "x-nullable": true,
+ "x-omitempty": false
+ },
+ "actualPickupPostalCode": {
+ "description": "The actual postal code where the PPM shipment started. To be filled once the customer has moved the shipment.\n",
+ "type": "string",
+ "format": "zip",
+ "title": "ZIP",
+ "pattern": "^(\\d{5})$",
+ "x-nullable": true,
+ "x-omitempty": false,
+ "example": "90210"
+ },
+ "advanceAmountReceived": {
+ "description": "The amount received for an advance, or null if no advance is received.\n",
+ "type": "integer",
+ "format": "cents",
+ "x-nullable": true,
+ "x-omitempty": false
+ },
+ "advanceAmountRequested": {
+ "description": "The amount requested as an advance by the service member up to a maximum percentage of the estimated incentive.\n",
+ "type": "integer",
+ "format": "cents",
+ "x-nullable": true,
+ "x-omitempty": false
+ },
+ "advanceStatus": {
+ "$ref": "#/definitions/PPMAdvanceStatus"
+ },
+ "approvedAt": {
+ "description": "The timestamp of when the shipment was approved and the service member can begin their move.",
+ "type": "string",
+ "format": "date-time",
+ "x-nullable": true,
+ "x-omitempty": false
+ },
+ "createdAt": {
+ "description": "Timestamp of when the PPM Shipment was initially created (UTC)",
+ "type": "string",
+ "format": "date-time",
+ "readOnly": true
+ },
+ "destinationPostalCode": {
+ "description": "The postal code of the destination location where goods are being delivered to.",
+ "type": "string",
+ "format": "zip",
+ "title": "ZIP",
+ "pattern": "^(\\d{5})$",
+ "example": "90210"
+ },
+ "eTag": {
+ "description": "A hash unique to this shipment that should be used as the \"If-Match\" header for any updates.",
+ "type": "string",
+ "readOnly": true
+ },
+ "estimatedIncentive": {
+ "description": "The estimated amount the government will pay the service member to move their belongings based on the moving date, locations, and shipment weight.",
+ "type": "integer",
+ "format": "cents",
+ "x-nullable": true,
+ "x-omitempty": false
+ },
+ "estimatedWeight": {
+ "description": "The estimated weight of the PPM shipment goods being moved.",
+ "type": "integer",
+ "x-nullable": true,
+ "x-omitempty": false,
+ "example": 4200
+ },
+ "expectedDepartureDate": {
+ "description": "Date the customer expects to begin their move.\n",
+ "type": "string",
+ "format": "date"
+ },
+ "finalIncentive": {
+ "description": "The final calculated incentive for the PPM shipment. This does not include **SIT** as it is a reimbursement.\n",
+ "type": "integer",
+ "format": "cents",
+ "x-nullable": true,
+ "x-omitempty": false,
+ "readOnly": true
+ },
+ "hasProGear": {
+ "description": "Indicates whether PPM shipment has pro gear for themselves or their spouse.\n",
+ "type": "boolean",
+ "x-nullable": true,
+ "x-omitempty": false
+ },
+ "hasReceivedAdvance": {
+ "description": "Indicates whether an advance was received for the PPM shipment.\n",
+ "type": "boolean",
+ "x-nullable": true,
+ "x-omitempty": false
+ },
+ "hasRequestedAdvance": {
+ "description": "Indicates whether an advance has been requested for the PPM shipment.\n",
+ "type": "boolean",
+ "x-nullable": true,
+ "x-omitempty": false
+ },
+ "id": {
+ "description": "Primary auto-generated unique identifier of the PPM shipment object",
+ "type": "string",
+ "format": "uuid",
+ "readOnly": true,
+ "example": "1f2270c7-7166-40ae-981e-b200ebdf3054"
+ },
+ "movingExpenses": {
+ "description": "All expense documentation receipt records of this PPM shipment.",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/MovingExpense"
+ }
+ },
+ "pickupPostalCode": {
+ "description": "The postal code of the origin location where goods are being moved from.",
+ "type": "string",
+ "format": "zip",
+ "title": "ZIP",
+ "pattern": "^(\\d{5})$",
+ "example": "90210"
+ },
+ "proGearWeight": {
+ "description": "The estimated weight of the pro-gear being moved belonging to the service member.",
+ "type": "integer",
+ "x-nullable": true,
+ "x-omitempty": false
+ },
+ "proGearWeightTickets": {
+ "description": "All pro-gear weight ticket documentation records for this PPM shipment.",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/ProGearWeightTicket"
+ }
+ },
+ "reviewedAt": {
+ "description": "The timestamp of when the Service Counselor has reviewed all of the closeout documents.",
+ "type": "string",
+ "format": "date-time",
+ "x-nullable": true,
+ "x-omitempty": false
+ },
+ "secondaryDestinationPostalCode": {
+ "description": "An optional secondary location near the destination where goods will be dropped off.",
+ "type": "string",
+ "format": "zip",
+ "title": "ZIP",
+ "pattern": "^(\\d{5})$",
+ "x-nullable": true,
+ "x-omitempty": false,
+ "example": "90210"
+ },
+ "secondaryPickupPostalCode": {
+ "type": "string",
+ "format": "An optional secondary pickup location near the origin where additional goods exist.",
+ "title": "ZIP",
+ "pattern": "^(\\d{5})$",
+ "x-nullable": true,
+ "x-omitempty": false,
+ "example": "90210"
+ },
+ "shipmentId": {
+ "description": "The id of the parent MTOShipment object",
+ "type": "string",
+ "format": "uuid",
+ "readOnly": true,
+ "example": "1f2270c7-7166-40ae-981e-b200ebdf3054"
+ },
+ "signedCertification": {
+ "$ref": "#/definitions/SignedCertification"
+ },
+ "sitEstimatedCost": {
+ "description": "The estimated amount that the government will pay the service member to put their goods into storage. This estimated storage cost is separate from the estimated incentive.",
+ "type": "integer",
+ "format": "cents",
+ "x-nullable": true,
+ "x-omitempty": false
+ },
+ "sitEstimatedDepartureDate": {
+ "description": "The date that goods will exit the storage location.",
+ "type": "string",
+ "format": "date",
+ "x-nullable": true,
+ "x-omitempty": false
+ },
+ "sitEstimatedEntryDate": {
+ "description": "The date that goods will first enter the storage location.",
+ "type": "string",
+ "format": "date",
+ "x-nullable": true,
+ "x-omitempty": false
+ },
+ "sitEstimatedWeight": {
+ "description": "The estimated weight of the goods being put into storage.",
"type": "integer",
- "title": "GCC"
+ "x-nullable": true,
+ "x-omitempty": false,
+ "example": 2000
},
- "incentive_percentage": {
+ "sitExpected": {
+ "description": "Captures whether some or all of the PPM shipment will require temporary storage at the origin or destination.\n\nMust be set to ` + "`" + `true` + "`" + ` when providing ` + "`" + `sitLocation` + "`" + `, ` + "`" + `sitEstimatedWeight` + "`" + `, ` + "`" + `sitEstimatedEntryDate` + "`" + `, and ` + "`" + `sitEstimatedDepartureDate` + "`" + ` values to calculate the ` + "`" + `sitEstimatedCost` + "`" + `.\n",
+ "type": "boolean"
+ },
+ "sitLocation": {
+ "allOf": [
+ {
+ "$ref": "#/definitions/SITLocationType"
+ },
+ {
+ "x-nullable": true
+ },
+ {
+ "x-omitempty": false
+ }
+ ]
+ },
+ "spouseProGearWeight": {
+ "description": "The estimated weight of the pro-gear being moved belonging to a spouse.",
"type": "integer",
- "title": "PPM Incentive @ 95%"
+ "x-nullable": true,
+ "x-omitempty": false
+ },
+ "status": {
+ "$ref": "#/definitions/PPMShipmentStatus"
+ },
+ "submittedAt": {
+ "description": "The timestamp of when the customer submitted their PPM documentation to the counselor for review.",
+ "type": "string",
+ "format": "date-time",
+ "x-nullable": true,
+ "x-omitempty": false
+ },
+ "updatedAt": {
+ "description": "Timestamp of when a property of this object was last updated (UTC)",
+ "type": "string",
+ "format": "date-time",
+ "readOnly": true
+ },
+ "w2Address": {
+ "x-nullable": true,
+ "$ref": "#/definitions/Address"
+ },
+ "weightTickets": {
+ "$ref": "#/definitions/WeightTickets"
}
- }
+ },
+ "x-nullable": true
},
- "PPMShipment": {
+ "PPMShipment-2": {
"description": "A personally procured move is a type of shipment that a service member moves themselves.",
"required": [
"id",
@@ -14565,15 +17241,12 @@ func init() {
"x-omitempty": false
},
"advanceAmountRequested": {
- "description": "The amount requested as an advance by the service member up to a maximum percentage of the estimated incentive.\n",
+ "description": "The amount requested as an advance by the service member, up to a maximum percentage of the estimated incentive.\n",
"type": "integer",
"format": "cents",
"x-nullable": true,
"x-omitempty": false
},
- "advanceStatus": {
- "$ref": "#/definitions/PPMAdvanceStatus"
- },
"approvedAt": {
"description": "The timestamp of when the shipment was approved and the service member can begin their move.",
"type": "string",
@@ -14582,7 +17255,7 @@ func init() {
"x-omitempty": false
},
"createdAt": {
- "description": "Timestamp of when the PPM Shipment was initially created (UTC)",
+ "description": "The timestamp of when the PPM shipment was created (UTC)",
"type": "string",
"format": "date-time",
"readOnly": true
@@ -14591,7 +17264,6 @@ func init() {
"description": "The postal code of the destination location where goods are being delivered to.",
"type": "string",
"format": "zip",
- "title": "ZIP",
"pattern": "^(\\d{5})$",
"example": "90210"
},
@@ -14608,25 +17280,17 @@ func init() {
"x-omitempty": false
},
"estimatedWeight": {
- "description": "The estimated weight of the PPM shipment goods being moved.",
+ "description": "The estimated weight of the PPM shipment goods being moved in pounds.",
"type": "integer",
"x-nullable": true,
"x-omitempty": false,
"example": 4200
},
"expectedDepartureDate": {
- "description": "Date the customer expects to begin their move.\n",
+ "description": "Date the customer expects to begin moving from their origin.\n",
"type": "string",
"format": "date"
},
- "finalIncentive": {
- "description": "The final calculated incentive for the PPM shipment. This does not include **SIT** as it is a reimbursement.\n",
- "type": "integer",
- "format": "cents",
- "x-nullable": true,
- "x-omitempty": false,
- "readOnly": true
- },
"hasProGear": {
"description": "Indicates whether PPM shipment has pro gear for themselves or their spouse.\n",
"type": "boolean",
@@ -14646,19 +17310,12 @@ func init() {
"x-omitempty": false
},
"id": {
- "description": "Primary auto-generated unique identifier of the PPM shipment object",
+ "description": "The primary unique identifier of this PPM shipment",
"type": "string",
"format": "uuid",
"readOnly": true,
"example": "1f2270c7-7166-40ae-981e-b200ebdf3054"
},
- "movingExpenses": {
- "description": "All expense documentation receipt records of this PPM shipment.",
- "type": "array",
- "items": {
- "$ref": "#/definitions/MovingExpense"
- }
- },
"pickupPostalCode": {
"description": "The postal code of the origin location where goods are being moved from.",
"type": "string",
@@ -14668,18 +17325,11 @@ func init() {
"example": "90210"
},
"proGearWeight": {
- "description": "The estimated weight of the pro-gear being moved belonging to the service member.",
+ "description": "The estimated weight of the pro-gear being moved belonging to the service member in pounds.",
"type": "integer",
"x-nullable": true,
"x-omitempty": false
},
- "proGearWeightTickets": {
- "description": "All pro-gear weight ticket documentation records for this PPM shipment.",
- "type": "array",
- "items": {
- "$ref": "#/definitions/ProGearWeightTicket"
- }
- },
"reviewedAt": {
"description": "The timestamp of when the Service Counselor has reviewed all of the closeout documents.",
"type": "string",
@@ -14691,31 +17341,27 @@ func init() {
"description": "An optional secondary location near the destination where goods will be dropped off.",
"type": "string",
"format": "zip",
- "title": "ZIP",
"pattern": "^(\\d{5})$",
"x-nullable": true,
"x-omitempty": false,
"example": "90210"
},
"secondaryPickupPostalCode": {
+ "description": "An optional secondary pickup location near the origin where additional goods exist.",
"type": "string",
- "format": "An optional secondary pickup location near the origin where additional goods exist.",
- "title": "ZIP",
+ "format": "zip",
"pattern": "^(\\d{5})$",
"x-nullable": true,
"x-omitempty": false,
"example": "90210"
},
"shipmentId": {
- "description": "The id of the parent MTOShipment object",
+ "description": "The id of the parent MTOShipment record",
"type": "string",
"format": "uuid",
"readOnly": true,
"example": "1f2270c7-7166-40ae-981e-b200ebdf3054"
},
- "signedCertification": {
- "$ref": "#/definitions/SignedCertification"
- },
"sitEstimatedCost": {
"description": "The estimated amount that the government will pay the service member to put their goods into storage. This estimated storage cost is separate from the estimated incentive.",
"type": "integer",
@@ -14738,7 +17384,7 @@ func init() {
"x-omitempty": false
},
"sitEstimatedWeight": {
- "description": "The estimated weight of the goods being put into storage.",
+ "description": "The estimated weight of the goods being put into storage in pounds.",
"type": "integer",
"x-nullable": true,
"x-omitempty": false,
@@ -14762,7 +17408,7 @@ func init() {
]
},
"spouseProGearWeight": {
- "description": "The estimated weight of the pro-gear being moved belonging to a spouse.",
+ "description": "The estimated weight of the pro-gear being moved belonging to a spouse in pounds.",
"type": "integer",
"x-nullable": true,
"x-omitempty": false
@@ -14778,17 +17424,10 @@ func init() {
"x-omitempty": false
},
"updatedAt": {
- "description": "Timestamp of when a property of this object was last updated (UTC)",
+ "description": "The timestamp of when a property of this object was last updated (UTC)",
"type": "string",
"format": "date-time",
"readOnly": true
- },
- "w2Address": {
- "x-nullable": true,
- "$ref": "#/definitions/Address"
- },
- "weightTickets": {
- "$ref": "#/definitions/WeightTickets"
}
},
"x-nullable": true
@@ -15085,6 +17724,180 @@ func init() {
}
}
},
+ "PaymentRequest": {
+ "type": "object",
+ "properties": {
+ "eTag": {
+ "type": "string",
+ "readOnly": true
+ },
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "readOnly": true,
+ "example": "c56a4180-65aa-42ec-a945-5fd21dec0538"
+ },
+ "isFinal": {
+ "type": "boolean",
+ "default": false
+ },
+ "moveTaskOrderID": {
+ "type": "string",
+ "format": "uuid",
+ "example": "c56a4180-65aa-42ec-a945-5fd21dec0538"
+ },
+ "paymentRequestNumber": {
+ "type": "string",
+ "readOnly": true,
+ "example": "1234-5678-1"
+ },
+ "paymentServiceItems": {
+ "$ref": "#/definitions/PaymentServiceItems"
+ },
+ "proofOfServiceDocs": {
+ "$ref": "#/definitions/ProofOfServiceDocs"
+ },
+ "recalculationOfPaymentRequestID": {
+ "type": "string",
+ "format": "uuid",
+ "x-nullable": true,
+ "readOnly": true,
+ "example": "c56a4180-65aa-42ec-a945-5fd21dec0538"
+ },
+ "rejectionReason": {
+ "type": "string",
+ "x-nullable": true,
+ "example": "documentation was incomplete"
+ },
+ "status": {
+ "$ref": "#/definitions/PaymentRequestStatus"
+ }
+ }
+ },
+ "PaymentRequestStatus": {
+ "type": "string",
+ "title": "Payment Request Status",
+ "enum": [
+ "PENDING",
+ "REVIEWED",
+ "REVIEWED_AND_ALL_SERVICE_ITEMS_REJECTED",
+ "SENT_TO_GEX",
+ "RECEIVED_BY_GEX",
+ "PAID",
+ "EDI_ERROR",
+ "DEPRECATED"
+ ]
+ },
+ "PaymentRequests": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/PaymentRequest"
+ }
+ },
+ "PaymentServiceItem": {
+ "type": "object",
+ "properties": {
+ "eTag": {
+ "type": "string",
+ "readOnly": true
+ },
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "readOnly": true,
+ "example": "c56a4180-65aa-42ec-a945-5fd21dec0538"
+ },
+ "mtoServiceItemID": {
+ "type": "string",
+ "format": "uuid",
+ "example": "c56a4180-65aa-42ec-a945-5fd21dec0538"
+ },
+ "paymentRequestID": {
+ "type": "string",
+ "format": "uuid",
+ "example": "c56a4180-65aa-42ec-a945-5fd21dec0538"
+ },
+ "paymentServiceItemParams": {
+ "$ref": "#/definitions/PaymentServiceItemParams"
+ },
+ "priceCents": {
+ "type": "integer",
+ "format": "cents",
+ "title": "Price of the service item in cents",
+ "x-nullable": true
+ },
+ "referenceID": {
+ "format": "string",
+ "readOnly": true,
+ "example": "1234-5678-c56a4180"
+ },
+ "rejectionReason": {
+ "type": "string",
+ "x-nullable": true,
+ "example": "documentation was incomplete"
+ },
+ "status": {
+ "$ref": "#/definitions/PaymentServiceItemStatus"
+ }
+ }
+ },
+ "PaymentServiceItemParam": {
+ "type": "object",
+ "properties": {
+ "eTag": {
+ "type": "string",
+ "readOnly": true
+ },
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "readOnly": true,
+ "example": "c56a4180-65aa-42ec-a945-5fd21dec0538"
+ },
+ "key": {
+ "$ref": "#/definitions/ServiceItemParamName"
+ },
+ "origin": {
+ "$ref": "#/definitions/ServiceItemParamOrigin"
+ },
+ "paymentServiceItemID": {
+ "type": "string",
+ "format": "uuid",
+ "example": "c56a4180-65aa-42ec-a945-5fd21dec0538"
+ },
+ "type": {
+ "$ref": "#/definitions/ServiceItemParamType"
+ },
+ "value": {
+ "type": "string",
+ "example": "3025"
+ }
+ }
+ },
+ "PaymentServiceItemParams": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/PaymentServiceItemParam"
+ }
+ },
+ "PaymentServiceItemStatus": {
+ "type": "string",
+ "title": "Payment Service Item Status",
+ "enum": [
+ "REQUESTED",
+ "APPROVED",
+ "DENIED",
+ "SENT_TO_GEX",
+ "PAID",
+ "EDI_ERROR"
+ ]
+ },
+ "PaymentServiceItems": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/PaymentServiceItem"
+ }
+ },
"PersonallyProcuredMovePayload": {
"type": "object",
"required": [
@@ -15386,6 +18199,23 @@ func init() {
}
}
},
+ "ProofOfServiceDoc": {
+ "type": "object",
+ "properties": {
+ "uploads": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/UploadWithOmissions"
+ }
+ }
+ }
+ },
+ "ProofOfServiceDocs": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/ProofOfServiceDoc"
+ }
+ },
"RateEnginePostalCodePayload": {
"type": "object",
"required": [
@@ -15461,6 +18291,70 @@ func init() {
],
"x-nullable": true
},
+ "Reweigh": {
+ "description": "A reweigh is when a shipment is weighed for a second time due to the request of a customer, the contractor, system or TOO.",
+ "properties": {
+ "createdAt": {
+ "type": "string",
+ "format": "date-time",
+ "readOnly": true
+ },
+ "eTag": {
+ "type": "string",
+ "readOnly": true
+ },
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "example": "1f2270c7-7166-40ae-981e-b200ebdf3054"
+ },
+ "requestedAt": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "requestedBy": {
+ "$ref": "#/definitions/ReweighRequester"
+ },
+ "shipmentID": {
+ "type": "string",
+ "format": "uuid",
+ "example": "1f2270c7-7166-40ae-981e-b200ebdf3054"
+ },
+ "updatedAt": {
+ "type": "string",
+ "format": "date-time",
+ "readOnly": true
+ },
+ "verificationProvidedAt": {
+ "type": "string",
+ "format": "date-time",
+ "x-nullable": true,
+ "x-omitempty": false
+ },
+ "verificationReason": {
+ "type": "string",
+ "x-nullable": true,
+ "x-omitempty": false,
+ "example": "The reweigh was not performed due to some justification provided by the Prime"
+ },
+ "weight": {
+ "type": "integer",
+ "x-formatting": "weight",
+ "x-nullable": true,
+ "x-omitempty": false,
+ "example": 2000
+ }
+ }
+ },
+ "ReweighRequester": {
+ "type": "string",
+ "enum": [
+ "CUSTOMER",
+ "PRIME",
+ "SYSTEM",
+ "TOO"
+ ]
+ },
"Role": {
"type": "object",
"required": [
@@ -15489,6 +18383,88 @@ func init() {
}
}
},
+ "SITExtension": {
+ "description": "A storage in transit (SIT) Extension is a request for an increase in the billable number of days a shipment is allowed to be in SIT.",
+ "type": "object",
+ "properties": {
+ "approvedDays": {
+ "type": "integer",
+ "x-nullable": true,
+ "x-omitempty": false,
+ "example": 30
+ },
+ "contractorRemarks": {
+ "type": "string",
+ "x-nullable": true,
+ "x-omitempty": false,
+ "example": "We need SIT additional days. The customer has not found a house yet."
+ },
+ "createdAt": {
+ "type": "string",
+ "format": "date-time",
+ "readOnly": true
+ },
+ "decisionDate": {
+ "type": "string",
+ "format": "date-time",
+ "x-nullable": true,
+ "x-omitempty": false
+ },
+ "eTag": {
+ "type": "string",
+ "readOnly": true
+ },
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "example": "1f2270c7-7166-40ae-981e-b200ebdf3054"
+ },
+ "mtoShipmentID": {
+ "type": "string",
+ "format": "uuid",
+ "example": "1f2270c7-7166-40ae-981e-b200ebdf3054"
+ },
+ "officeRemarks": {
+ "type": "string",
+ "x-nullable": true,
+ "x-omitempty": false
+ },
+ "requestReason": {
+ "type": "string",
+ "enum": [
+ "SERIOUS_ILLNESS_MEMBER",
+ "SERIOUS_ILLNESS_DEPENDENT",
+ "IMPENDING_ASSIGNEMENT",
+ "DIRECTED_TEMPORARY_DUTY",
+ "NONAVAILABILITY_OF_CIVILIAN_HOUSING",
+ "AWAITING_COMPLETION_OF_RESIDENCE",
+ "OTHER"
+ ]
+ },
+ "requestedDays": {
+ "type": "integer",
+ "example": 30
+ },
+ "status": {
+ "enum": [
+ "PENDING",
+ "APPROVED",
+ "DENIED"
+ ]
+ },
+ "updatedAt": {
+ "type": "string",
+ "format": "date-time",
+ "readOnly": true
+ }
+ }
+ },
+ "SITExtensions": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/SITExtension"
+ }
+ },
"SITLocationType": {
"description": "The list of SIT location types.",
"type": "string",
@@ -15520,6 +18496,98 @@ func init() {
}
}
},
+ "ServiceItemParamName": {
+ "type": "string",
+ "enum": [
+ "ActualPickupDate",
+ "ContractCode",
+ "ContractYearName",
+ "CubicFeetBilled",
+ "CubicFeetCrating",
+ "DimensionHeight",
+ "DimensionLength",
+ "DimensionWidth",
+ "DistanceZip",
+ "DistanceZipSITDest",
+ "DistanceZipSITOrigin",
+ "EIAFuelPrice",
+ "EscalationCompounded",
+ "FSCMultiplier",
+ "FSCPriceDifferenceInCents",
+ "FSCWeightBasedDistanceMultiplier",
+ "IsPeak",
+ "MarketDest",
+ "MarketOrigin",
+ "MTOAvailableToPrimeAt",
+ "NTSPackingFactor",
+ "NumberDaysSIT",
+ "PriceAreaDest",
+ "PriceAreaIntlDest",
+ "PriceAreaIntlOrigin",
+ "PriceAreaOrigin",
+ "PriceRateOrFactor",
+ "PSI_LinehaulDom",
+ "PSI_LinehaulDomPrice",
+ "PSI_LinehaulShort",
+ "PSI_LinehaulShortPrice",
+ "PSI_PriceDomDest",
+ "PSI_PriceDomDestPrice",
+ "PSI_PriceDomOrigin",
+ "PSI_PriceDomOriginPrice",
+ "PSI_ShippingLinehaulIntlCO",
+ "PSI_ShippingLinehaulIntlCOPrice",
+ "PSI_ShippingLinehaulIntlOC",
+ "PSI_ShippingLinehaulIntlOCPrice",
+ "PSI_ShippingLinehaulIntlOO",
+ "PSI_ShippingLinehaulIntlOOPrice",
+ "RateAreaNonStdDest",
+ "RateAreaNonStdOrigin",
+ "ReferenceDate",
+ "RequestedPickupDate",
+ "ServiceAreaDest",
+ "ServiceAreaOrigin",
+ "ServicesScheduleDest",
+ "ServicesScheduleOrigin",
+ "SITPaymentRequestEnd",
+ "SITPaymentRequestStart",
+ "SITScheduleDest",
+ "SITScheduleOrigin",
+ "SITServiceAreaDest",
+ "SITServiceAreaOrigin",
+ "WeightAdjusted",
+ "WeightBilled",
+ "WeightEstimated",
+ "WeightOriginal",
+ "WeightReweigh",
+ "ZipDestAddress",
+ "ZipPickupAddress",
+ "ZipSITDestHHGFinalAddress",
+ "ZipSITDestHHGOriginalAddress",
+ "ZipSITOriginHHGActualAddress",
+ "ZipSITOriginHHGOriginalAddress"
+ ]
+ },
+ "ServiceItemParamOrigin": {
+ "type": "string",
+ "enum": [
+ "PRIME",
+ "SYSTEM",
+ "PRICER",
+ "PAYMENT_REQUEST"
+ ]
+ },
+ "ServiceItemParamType": {
+ "type": "string",
+ "enum": [
+ "STRING",
+ "DATE",
+ "INTEGER",
+ "DECIMAL",
+ "TIMESTAMP",
+ "PaymentServiceItemUUID",
+ "BOOLEAN"
+ ]
+ },
"ServiceMemberBackupContactPayload": {
"type": "object",
"required": [
@@ -15775,6 +18843,87 @@ func init() {
},
"x-nullable": true
},
+ "ServiceRequestDocument": {
+ "type": "object",
+ "properties": {
+ "uploads": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/UploadWithOmissions"
+ }
+ }
+ }
+ },
+ "ServiceRequestDocuments": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/ServiceRequestDocument"
+ }
+ },
+ "ShipmentAddressUpdate": {
+ "description": "This represents a destination address change request made by the Prime that is either auto-approved or requires review if the pricing criteria has changed. If criteria has changed, then it must be approved or rejected by a TOO.\n",
+ "type": "object",
+ "required": [
+ "id",
+ "status",
+ "shipmentID",
+ "originalAddress",
+ "newAddress",
+ "contractorRemarks"
+ ],
+ "properties": {
+ "contractorRemarks": {
+ "description": "The reason there is an address change.",
+ "type": "string",
+ "title": "Contractor Remarks",
+ "readOnly": true,
+ "example": "This is a contractor remark"
+ },
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "readOnly": true,
+ "example": "c56a4180-65aa-42ec-a945-5fd21dec0538"
+ },
+ "newAddress": {
+ "$ref": "#/definitions/Address"
+ },
+ "officeRemarks": {
+ "description": "The TOO comment on approval or rejection.",
+ "type": "string",
+ "title": "Office Remarks",
+ "x-nullable": true,
+ "example": "This is an office remark"
+ },
+ "originalAddress": {
+ "$ref": "#/definitions/Address"
+ },
+ "shipmentID": {
+ "type": "string",
+ "format": "uuid",
+ "readOnly": true,
+ "example": "c56a4180-65aa-42ec-a945-5fd21dec0538"
+ },
+ "status": {
+ "$ref": "#/definitions/ShipmentAddressUpdateStatus"
+ }
+ }
+ },
+ "ShipmentAddressUpdateStatus": {
+ "type": "string",
+ "title": "Status",
+ "enum": [
+ "REQUESTED",
+ "REJECTED",
+ "APPROVED"
+ ],
+ "x-display-value": {
+ "APPROVED": "APPROVED",
+ "REJECTED": "REJECTED",
+ "REQUESTED": "REQUESTED"
+ },
+ "readOnly": true
+ },
"SignedCertification": {
"description": "Signed certification",
"type": "object",
@@ -15931,6 +19080,43 @@ func init() {
"$ref": "#/definitions/SignedCertificationPayload"
}
},
+ "StorageFacility": {
+ "description": "The Storage Facility information for the shipment",
+ "type": "object",
+ "properties": {
+ "address": {
+ "$ref": "#/definitions/Address"
+ },
+ "eTag": {
+ "type": "string",
+ "readOnly": true
+ },
+ "email": {
+ "type": "string",
+ "format": "x-email",
+ "pattern": "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$",
+ "x-nullable": true
+ },
+ "facilityName": {
+ "type": "string"
+ },
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "example": "c56a4180-65aa-42ec-a945-5fd21dec0538"
+ },
+ "lotNumber": {
+ "type": "string",
+ "x-nullable": true
+ },
+ "phone": {
+ "type": "string",
+ "format": "telephone",
+ "pattern": "^[2-9]\\d{2}-\\d{3}-\\d{4}$",
+ "x-nullable": true
+ }
+ }
+ },
"SubmitMoveForApprovalPayload": {
"type": "object",
"properties": {
@@ -16536,6 +19722,57 @@ func init() {
}
}
},
+ "UploadWithOmissions": {
+ "description": "An uploaded file.",
+ "type": "object",
+ "required": [
+ "filename",
+ "contentType",
+ "bytes"
+ ],
+ "properties": {
+ "bytes": {
+ "type": "integer"
+ },
+ "contentType": {
+ "type": "string",
+ "format": "mime-type",
+ "example": "application/pdf"
+ },
+ "createdAt": {
+ "type": "string",
+ "format": "date-time",
+ "readOnly": true
+ },
+ "filename": {
+ "type": "string",
+ "example": "filename.pdf"
+ },
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "example": "c56a4180-65aa-42ec-a945-5fd21dec0538"
+ },
+ "status": {
+ "type": "string",
+ "enum": [
+ "INFECTED",
+ "CLEAN",
+ "PROCESSING"
+ ]
+ },
+ "updatedAt": {
+ "type": "string",
+ "format": "date-time",
+ "readOnly": true
+ },
+ "url": {
+ "type": "string",
+ "format": "uri",
+ "example": "https://uploads.domain.test/dir/c56a4180-65aa-42ec-a945-5fd21dec0538"
+ }
+ }
+ },
"ValidationError": {
"required": [
"invalidFields"
diff --git a/pkg/gen/internalapi/internaloperations/moves/get_all_moves.go b/pkg/gen/internalapi/internaloperations/moves/get_all_moves.go
new file mode 100644
index 00000000000..8ea11457d43
--- /dev/null
+++ b/pkg/gen/internalapi/internaloperations/moves/get_all_moves.go
@@ -0,0 +1,58 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package moves
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the generate command
+
+import (
+ "net/http"
+
+ "github.com/go-openapi/runtime/middleware"
+)
+
+// GetAllMovesHandlerFunc turns a function with the right signature into a get all moves handler
+type GetAllMovesHandlerFunc func(GetAllMovesParams) middleware.Responder
+
+// Handle executing the request and returning a response
+func (fn GetAllMovesHandlerFunc) Handle(params GetAllMovesParams) middleware.Responder {
+ return fn(params)
+}
+
+// GetAllMovesHandler interface for that can handle valid get all moves params
+type GetAllMovesHandler interface {
+ Handle(GetAllMovesParams) middleware.Responder
+}
+
+// NewGetAllMoves creates a new http.Handler for the get all moves operation
+func NewGetAllMoves(ctx *middleware.Context, handler GetAllMovesHandler) *GetAllMoves {
+ return &GetAllMoves{Context: ctx, Handler: handler}
+}
+
+/*
+ GetAllMoves swagger:route GET /all_moves/{serviceMemberId} moves getAllMoves
+
+# Return the current and previous moves of a service member
+
+Gets all moves that belongs to the serviceMember
+*/
+type GetAllMoves struct {
+ Context *middleware.Context
+ Handler GetAllMovesHandler
+}
+
+func (o *GetAllMoves) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
+ route, rCtx, _ := o.Context.RouteInfo(r)
+ if rCtx != nil {
+ *r = *rCtx
+ }
+ var Params = NewGetAllMovesParams()
+ if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params
+ o.Context.Respond(rw, r, route.Produces, route, err)
+ return
+ }
+
+ res := o.Handler.Handle(Params) // actually handle the request
+ o.Context.Respond(rw, r, route.Produces, route, res)
+
+}
diff --git a/pkg/gen/internalapi/internaloperations/moves/get_all_moves_parameters.go b/pkg/gen/internalapi/internaloperations/moves/get_all_moves_parameters.go
new file mode 100644
index 00000000000..dc7953b2274
--- /dev/null
+++ b/pkg/gen/internalapi/internaloperations/moves/get_all_moves_parameters.go
@@ -0,0 +1,91 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package moves
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime/middleware"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/validate"
+)
+
+// NewGetAllMovesParams creates a new GetAllMovesParams object
+//
+// There are no default values defined in the spec.
+func NewGetAllMovesParams() GetAllMovesParams {
+
+ return GetAllMovesParams{}
+}
+
+// GetAllMovesParams contains all the bound params for the get all moves operation
+// typically these are obtained from a http.Request
+//
+// swagger:parameters getAllMoves
+type GetAllMovesParams struct {
+
+ // HTTP Request Object
+ HTTPRequest *http.Request `json:"-"`
+
+ /*UUID of the service member
+ Required: true
+ In: path
+ */
+ ServiceMemberID strfmt.UUID
+}
+
+// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface
+// for simple values it will use straight method calls.
+//
+// To ensure default values, the struct must have been initialized with NewGetAllMovesParams() beforehand.
+func (o *GetAllMovesParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error {
+ var res []error
+
+ o.HTTPRequest = r
+
+ rServiceMemberID, rhkServiceMemberID, _ := route.Params.GetOK("serviceMemberId")
+ if err := o.bindServiceMemberID(rServiceMemberID, rhkServiceMemberID, route.Formats); err != nil {
+ res = append(res, err)
+ }
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+// bindServiceMemberID binds and validates parameter ServiceMemberID from path.
+func (o *GetAllMovesParams) bindServiceMemberID(rawData []string, hasKey bool, formats strfmt.Registry) error {
+ var raw string
+ if len(rawData) > 0 {
+ raw = rawData[len(rawData)-1]
+ }
+
+ // Required: true
+ // Parameter is provided by construction from the route
+
+ // Format: uuid
+ value, err := formats.Parse("uuid", raw)
+ if err != nil {
+ return errors.InvalidType("serviceMemberId", "path", "strfmt.UUID", raw)
+ }
+ o.ServiceMemberID = *(value.(*strfmt.UUID))
+
+ if err := o.validateServiceMemberID(formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// validateServiceMemberID carries on validations for parameter ServiceMemberID
+func (o *GetAllMovesParams) validateServiceMemberID(formats strfmt.Registry) error {
+
+ if err := validate.FormatOf("serviceMemberId", "path", "uuid", o.ServiceMemberID.String(), formats); err != nil {
+ return err
+ }
+ return nil
+}
diff --git a/pkg/gen/internalapi/internaloperations/moves/get_all_moves_responses.go b/pkg/gen/internalapi/internaloperations/moves/get_all_moves_responses.go
new file mode 100644
index 00000000000..f6f638eee3f
--- /dev/null
+++ b/pkg/gen/internalapi/internaloperations/moves/get_all_moves_responses.go
@@ -0,0 +1,194 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package moves
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+
+ "github.com/go-openapi/runtime"
+
+ "github.com/transcom/mymove/pkg/gen/internalmessages"
+)
+
+// GetAllMovesOKCode is the HTTP code returned for type GetAllMovesOK
+const GetAllMovesOKCode int = 200
+
+/*
+GetAllMovesOK Successfully retrieved moves. A successful fetch might still return zero moves.
+
+swagger:response getAllMovesOK
+*/
+type GetAllMovesOK struct {
+
+ /*
+ In: Body
+ */
+ Payload *internalmessages.MovesList `json:"body,omitempty"`
+}
+
+// NewGetAllMovesOK creates GetAllMovesOK with default headers values
+func NewGetAllMovesOK() *GetAllMovesOK {
+
+ return &GetAllMovesOK{}
+}
+
+// WithPayload adds the payload to the get all moves o k response
+func (o *GetAllMovesOK) WithPayload(payload *internalmessages.MovesList) *GetAllMovesOK {
+ o.Payload = payload
+ return o
+}
+
+// SetPayload sets the payload to the get all moves o k response
+func (o *GetAllMovesOK) SetPayload(payload *internalmessages.MovesList) {
+ o.Payload = payload
+}
+
+// WriteResponse to the client
+func (o *GetAllMovesOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
+
+ rw.WriteHeader(200)
+ if o.Payload != nil {
+ payload := o.Payload
+ if err := producer.Produce(rw, payload); err != nil {
+ panic(err) // let the recovery middleware deal with this
+ }
+ }
+}
+
+// GetAllMovesUnauthorizedCode is the HTTP code returned for type GetAllMovesUnauthorized
+const GetAllMovesUnauthorizedCode int = 401
+
+/*
+GetAllMovesUnauthorized The request was denied.
+
+swagger:response getAllMovesUnauthorized
+*/
+type GetAllMovesUnauthorized struct {
+
+ /*
+ In: Body
+ */
+ Payload *internalmessages.ClientError `json:"body,omitempty"`
+}
+
+// NewGetAllMovesUnauthorized creates GetAllMovesUnauthorized with default headers values
+func NewGetAllMovesUnauthorized() *GetAllMovesUnauthorized {
+
+ return &GetAllMovesUnauthorized{}
+}
+
+// WithPayload adds the payload to the get all moves unauthorized response
+func (o *GetAllMovesUnauthorized) WithPayload(payload *internalmessages.ClientError) *GetAllMovesUnauthorized {
+ o.Payload = payload
+ return o
+}
+
+// SetPayload sets the payload to the get all moves unauthorized response
+func (o *GetAllMovesUnauthorized) SetPayload(payload *internalmessages.ClientError) {
+ o.Payload = payload
+}
+
+// WriteResponse to the client
+func (o *GetAllMovesUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
+
+ rw.WriteHeader(401)
+ if o.Payload != nil {
+ payload := o.Payload
+ if err := producer.Produce(rw, payload); err != nil {
+ panic(err) // let the recovery middleware deal with this
+ }
+ }
+}
+
+// GetAllMovesForbiddenCode is the HTTP code returned for type GetAllMovesForbidden
+const GetAllMovesForbiddenCode int = 403
+
+/*
+GetAllMovesForbidden The request was denied.
+
+swagger:response getAllMovesForbidden
+*/
+type GetAllMovesForbidden struct {
+
+ /*
+ In: Body
+ */
+ Payload *internalmessages.ClientError `json:"body,omitempty"`
+}
+
+// NewGetAllMovesForbidden creates GetAllMovesForbidden with default headers values
+func NewGetAllMovesForbidden() *GetAllMovesForbidden {
+
+ return &GetAllMovesForbidden{}
+}
+
+// WithPayload adds the payload to the get all moves forbidden response
+func (o *GetAllMovesForbidden) WithPayload(payload *internalmessages.ClientError) *GetAllMovesForbidden {
+ o.Payload = payload
+ return o
+}
+
+// SetPayload sets the payload to the get all moves forbidden response
+func (o *GetAllMovesForbidden) SetPayload(payload *internalmessages.ClientError) {
+ o.Payload = payload
+}
+
+// WriteResponse to the client
+func (o *GetAllMovesForbidden) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
+
+ rw.WriteHeader(403)
+ if o.Payload != nil {
+ payload := o.Payload
+ if err := producer.Produce(rw, payload); err != nil {
+ panic(err) // let the recovery middleware deal with this
+ }
+ }
+}
+
+// GetAllMovesInternalServerErrorCode is the HTTP code returned for type GetAllMovesInternalServerError
+const GetAllMovesInternalServerErrorCode int = 500
+
+/*
+GetAllMovesInternalServerError A server error occurred.
+
+swagger:response getAllMovesInternalServerError
+*/
+type GetAllMovesInternalServerError struct {
+
+ /*
+ In: Body
+ */
+ Payload *internalmessages.Error `json:"body,omitempty"`
+}
+
+// NewGetAllMovesInternalServerError creates GetAllMovesInternalServerError with default headers values
+func NewGetAllMovesInternalServerError() *GetAllMovesInternalServerError {
+
+ return &GetAllMovesInternalServerError{}
+}
+
+// WithPayload adds the payload to the get all moves internal server error response
+func (o *GetAllMovesInternalServerError) WithPayload(payload *internalmessages.Error) *GetAllMovesInternalServerError {
+ o.Payload = payload
+ return o
+}
+
+// SetPayload sets the payload to the get all moves internal server error response
+func (o *GetAllMovesInternalServerError) SetPayload(payload *internalmessages.Error) {
+ o.Payload = payload
+}
+
+// WriteResponse to the client
+func (o *GetAllMovesInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
+
+ rw.WriteHeader(500)
+ if o.Payload != nil {
+ payload := o.Payload
+ if err := producer.Produce(rw, payload); err != nil {
+ panic(err) // let the recovery middleware deal with this
+ }
+ }
+}
diff --git a/pkg/gen/internalapi/internaloperations/moves/get_all_moves_urlbuilder.go b/pkg/gen/internalapi/internaloperations/moves/get_all_moves_urlbuilder.go
new file mode 100644
index 00000000000..24cb4d4346f
--- /dev/null
+++ b/pkg/gen/internalapi/internaloperations/moves/get_all_moves_urlbuilder.go
@@ -0,0 +1,101 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package moves
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the generate command
+
+import (
+ "errors"
+ "net/url"
+ golangswaggerpaths "path"
+ "strings"
+
+ "github.com/go-openapi/strfmt"
+)
+
+// GetAllMovesURL generates an URL for the get all moves operation
+type GetAllMovesURL struct {
+ ServiceMemberID strfmt.UUID
+
+ _basePath string
+ // avoid unkeyed usage
+ _ struct{}
+}
+
+// WithBasePath sets the base path for this url builder, only required when it's different from the
+// base path specified in the swagger spec.
+// When the value of the base path is an empty string
+func (o *GetAllMovesURL) WithBasePath(bp string) *GetAllMovesURL {
+ o.SetBasePath(bp)
+ return o
+}
+
+// SetBasePath sets the base path for this url builder, only required when it's different from the
+// base path specified in the swagger spec.
+// When the value of the base path is an empty string
+func (o *GetAllMovesURL) SetBasePath(bp string) {
+ o._basePath = bp
+}
+
+// Build a url path and query string
+func (o *GetAllMovesURL) Build() (*url.URL, error) {
+ var _result url.URL
+
+ var _path = "/all_moves/{serviceMemberId}"
+
+ serviceMemberID := o.ServiceMemberID.String()
+ if serviceMemberID != "" {
+ _path = strings.Replace(_path, "{serviceMemberId}", serviceMemberID, -1)
+ } else {
+ return nil, errors.New("serviceMemberId is required on GetAllMovesURL")
+ }
+
+ _basePath := o._basePath
+ if _basePath == "" {
+ _basePath = "/internal"
+ }
+ _result.Path = golangswaggerpaths.Join(_basePath, _path)
+
+ return &_result, nil
+}
+
+// Must is a helper function to panic when the url builder returns an error
+func (o *GetAllMovesURL) Must(u *url.URL, err error) *url.URL {
+ if err != nil {
+ panic(err)
+ }
+ if u == nil {
+ panic("url can't be nil")
+ }
+ return u
+}
+
+// String returns the string representation of the path with query string
+func (o *GetAllMovesURL) String() string {
+ return o.Must(o.Build()).String()
+}
+
+// BuildFull builds a full url with scheme, host, path and query string
+func (o *GetAllMovesURL) BuildFull(scheme, host string) (*url.URL, error) {
+ if scheme == "" {
+ return nil, errors.New("scheme is required for a full url on GetAllMovesURL")
+ }
+ if host == "" {
+ return nil, errors.New("host is required for a full url on GetAllMovesURL")
+ }
+
+ base, err := o.Build()
+ if err != nil {
+ return nil, err
+ }
+
+ base.Scheme = scheme
+ base.Host = host
+ return base, nil
+}
+
+// StringFull returns the string representation of a complete url
+func (o *GetAllMovesURL) StringFull(scheme, host string) string {
+ return o.Must(o.BuildFull(scheme, host)).String()
+}
diff --git a/pkg/gen/internalapi/internaloperations/mymove_api.go b/pkg/gen/internalapi/internaloperations/mymove_api.go
index f7ee6bd6355..0a908162c78 100644
--- a/pkg/gen/internalapi/internaloperations/mymove_api.go
+++ b/pkg/gen/internalapi/internaloperations/mymove_api.go
@@ -141,6 +141,9 @@ func NewMymoveAPI(spec *loads.Document) *MymoveAPI {
PpmDeleteWeightTicketHandler: ppm.DeleteWeightTicketHandlerFunc(func(params ppm.DeleteWeightTicketParams) middleware.Responder {
return middleware.NotImplemented("operation ppm.DeleteWeightTicket has not yet been implemented")
}),
+ MovesGetAllMovesHandler: moves.GetAllMovesHandlerFunc(func(params moves.GetAllMovesParams) middleware.Responder {
+ return middleware.NotImplemented("operation moves.GetAllMoves has not yet been implemented")
+ }),
TransportationOfficesGetTransportationOfficesHandler: transportation_offices.GetTransportationOfficesHandlerFunc(func(params transportation_offices.GetTransportationOfficesParams) middleware.Responder {
return middleware.NotImplemented("operation transportation_offices.GetTransportationOffices has not yet been implemented")
}),
@@ -373,6 +376,8 @@ type MymoveAPI struct {
UploadsDeleteUploadsHandler uploads.DeleteUploadsHandler
// PpmDeleteWeightTicketHandler sets the operation handler for the delete weight ticket operation
PpmDeleteWeightTicketHandler ppm.DeleteWeightTicketHandler
+ // MovesGetAllMovesHandler sets the operation handler for the get all moves operation
+ MovesGetAllMovesHandler moves.GetAllMovesHandler
// TransportationOfficesGetTransportationOfficesHandler sets the operation handler for the get transportation offices operation
TransportationOfficesGetTransportationOfficesHandler transportation_offices.GetTransportationOfficesHandler
// EntitlementsIndexEntitlementsHandler sets the operation handler for the index entitlements operation
@@ -621,6 +626,9 @@ func (o *MymoveAPI) Validate() error {
if o.PpmDeleteWeightTicketHandler == nil {
unregistered = append(unregistered, "ppm.DeleteWeightTicketHandler")
}
+ if o.MovesGetAllMovesHandler == nil {
+ unregistered = append(unregistered, "moves.GetAllMovesHandler")
+ }
if o.TransportationOfficesGetTransportationOfficesHandler == nil {
unregistered = append(unregistered, "transportation_offices.GetTransportationOfficesHandler")
}
@@ -951,6 +959,10 @@ func (o *MymoveAPI) initHandlerCache() {
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
+ o.handlers["GET"]["/all_moves/{serviceMemberId}"] = moves.NewGetAllMoves(o.context, o.MovesGetAllMovesHandler)
+ if o.handlers["GET"] == nil {
+ o.handlers["GET"] = make(map[string]http.Handler)
+ }
o.handlers["GET"]["/transportation-offices"] = transportation_offices.NewGetTransportationOffices(o.context, o.TransportationOfficesGetTransportationOfficesHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
diff --git a/pkg/gen/internalmessages/customer.go b/pkg/gen/internalmessages/customer.go
new file mode 100644
index 00000000000..f9093b9eb58
--- /dev/null
+++ b/pkg/gen/internalmessages/customer.go
@@ -0,0 +1,208 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package internalmessages
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// Customer customer
+//
+// swagger:model Customer
+type Customer struct {
+
+ // branch
+ // Example: COAST_GUARD
+ Branch string `json:"branch,omitempty"`
+
+ // current address
+ CurrentAddress *Address `json:"currentAddress,omitempty"`
+
+ // dod ID
+ DodID string `json:"dodID,omitempty"`
+
+ // e tag
+ // Read Only: true
+ ETag string `json:"eTag,omitempty"`
+
+ // email
+ // Example: fake@example.com
+ // Pattern: ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$
+ Email string `json:"email,omitempty"`
+
+ // first name
+ // Example: Vanya
+ FirstName string `json:"firstName,omitempty"`
+
+ // id
+ // Example: c56a4180-65aa-42ec-a945-5fd21dec0538
+ // Format: uuid
+ ID strfmt.UUID `json:"id,omitempty"`
+
+ // last name
+ // Example: Petrovna
+ LastName string `json:"lastName,omitempty"`
+
+ // phone
+ Phone string `json:"phone,omitempty"`
+
+ // user ID
+ // Example: c56a4180-65aa-42ec-a945-5fd21dec0538
+ // Format: uuid
+ UserID strfmt.UUID `json:"userID,omitempty"`
+}
+
+// Validate validates this customer
+func (m *Customer) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCurrentAddress(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateEmail(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateUserID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *Customer) validateCurrentAddress(formats strfmt.Registry) error {
+ if swag.IsZero(m.CurrentAddress) { // not required
+ return nil
+ }
+
+ if m.CurrentAddress != nil {
+ if err := m.CurrentAddress.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("currentAddress")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("currentAddress")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Customer) validateEmail(formats strfmt.Registry) error {
+ if swag.IsZero(m.Email) { // not required
+ return nil
+ }
+
+ if err := validate.Pattern("email", "body", m.Email, `^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Customer) validateID(formats strfmt.Registry) error {
+ if swag.IsZero(m.ID) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("id", "body", "uuid", m.ID.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Customer) validateUserID(formats strfmt.Registry) error {
+ if swag.IsZero(m.UserID) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("userID", "body", "uuid", m.UserID.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// ContextValidate validate this customer based on the context it is used
+func (m *Customer) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.contextValidateCurrentAddress(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateETag(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *Customer) contextValidateCurrentAddress(ctx context.Context, formats strfmt.Registry) error {
+
+ if m.CurrentAddress != nil {
+
+ if swag.IsZero(m.CurrentAddress) { // not required
+ return nil
+ }
+
+ if err := m.CurrentAddress.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("currentAddress")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("currentAddress")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Customer) contextValidateETag(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "eTag", "body", string(m.ETag)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *Customer) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *Customer) UnmarshalBinary(b []byte) error {
+ var res Customer
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/pkg/gen/internalmessages/destination_type.go b/pkg/gen/internalmessages/destination_type.go
new file mode 100644
index 00000000000..d15212a21fe
--- /dev/null
+++ b/pkg/gen/internalmessages/destination_type.go
@@ -0,0 +1,85 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package internalmessages
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+ "encoding/json"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/validate"
+)
+
+// DestinationType Destination Type
+// Example: OTHER_THAN_AUTHORIZED
+//
+// swagger:model DestinationType
+type DestinationType string
+
+func NewDestinationType(value DestinationType) *DestinationType {
+ return &value
+}
+
+// Pointer returns a pointer to a freshly-allocated DestinationType.
+func (m DestinationType) Pointer() *DestinationType {
+ return &m
+}
+
+const (
+
+ // DestinationTypeHOMEOFRECORD captures enum value "HOME_OF_RECORD"
+ DestinationTypeHOMEOFRECORD DestinationType = "HOME_OF_RECORD"
+
+ // DestinationTypeHOMEOFSELECTION captures enum value "HOME_OF_SELECTION"
+ DestinationTypeHOMEOFSELECTION DestinationType = "HOME_OF_SELECTION"
+
+ // DestinationTypePLACEENTEREDACTIVEDUTY captures enum value "PLACE_ENTERED_ACTIVE_DUTY"
+ DestinationTypePLACEENTEREDACTIVEDUTY DestinationType = "PLACE_ENTERED_ACTIVE_DUTY"
+
+ // DestinationTypeOTHERTHANAUTHORIZED captures enum value "OTHER_THAN_AUTHORIZED"
+ DestinationTypeOTHERTHANAUTHORIZED DestinationType = "OTHER_THAN_AUTHORIZED"
+)
+
+// for schema
+var destinationTypeEnum []interface{}
+
+func init() {
+ var res []DestinationType
+ if err := json.Unmarshal([]byte(`["HOME_OF_RECORD","HOME_OF_SELECTION","PLACE_ENTERED_ACTIVE_DUTY","OTHER_THAN_AUTHORIZED"]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ destinationTypeEnum = append(destinationTypeEnum, v)
+ }
+}
+
+func (m DestinationType) validateDestinationTypeEnum(path, location string, value DestinationType) error {
+ if err := validate.EnumCase(path, location, value, destinationTypeEnum, true); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Validate validates this destination type
+func (m DestinationType) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ // value enum
+ if err := m.validateDestinationTypeEnum("", "body", m); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+// ContextValidate validates this destination type based on context it is used
+func (m DestinationType) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ return nil
+}
diff --git a/pkg/gen/internalmessages/duty_location.go b/pkg/gen/internalmessages/duty_location.go
new file mode 100644
index 00000000000..759ecb63d2c
--- /dev/null
+++ b/pkg/gen/internalmessages/duty_location.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package internalmessages
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// DutyLocation duty location
+//
+// swagger:model DutyLocation
+type DutyLocation struct {
+
+ // address
+ Address *Address `json:"address,omitempty"`
+
+ // address ID
+ // Example: c56a4180-65aa-42ec-a945-5fd21dec0538
+ // Format: uuid
+ AddressID strfmt.UUID `json:"addressID,omitempty"`
+
+ // e tag
+ // Read Only: true
+ ETag string `json:"eTag,omitempty"`
+
+ // id
+ // Example: c56a4180-65aa-42ec-a945-5fd21dec0538
+ // Format: uuid
+ ID strfmt.UUID `json:"id,omitempty"`
+
+ // name
+ // Example: Fort Bragg North Station
+ Name string `json:"name,omitempty"`
+}
+
+// Validate validates this duty location
+func (m *DutyLocation) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateAddress(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateAddressID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *DutyLocation) validateAddress(formats strfmt.Registry) error {
+ if swag.IsZero(m.Address) { // not required
+ return nil
+ }
+
+ if m.Address != nil {
+ if err := m.Address.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("address")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("address")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *DutyLocation) validateAddressID(formats strfmt.Registry) error {
+ if swag.IsZero(m.AddressID) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("addressID", "body", "uuid", m.AddressID.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *DutyLocation) validateID(formats strfmt.Registry) error {
+ if swag.IsZero(m.ID) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("id", "body", "uuid", m.ID.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// ContextValidate validate this duty location based on the context it is used
+func (m *DutyLocation) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.contextValidateAddress(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateETag(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *DutyLocation) contextValidateAddress(ctx context.Context, formats strfmt.Registry) error {
+
+ if m.Address != nil {
+
+ if swag.IsZero(m.Address) { // not required
+ return nil
+ }
+
+ if err := m.Address.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("address")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("address")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *DutyLocation) contextValidateETag(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "eTag", "body", string(m.ETag)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *DutyLocation) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *DutyLocation) UnmarshalBinary(b []byte) error {
+ var res DutyLocation
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/pkg/gen/internalmessages/entitlements.go b/pkg/gen/internalmessages/entitlements.go
new file mode 100644
index 00000000000..65873a5ca10
--- /dev/null
+++ b/pkg/gen/internalmessages/entitlements.go
@@ -0,0 +1,141 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package internalmessages
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// Entitlements entitlements
+//
+// swagger:model Entitlements
+type Entitlements struct {
+
+ // authorized weight
+ // Example: 2000
+ AuthorizedWeight *int64 `json:"authorizedWeight,omitempty"`
+
+ // dependents authorized
+ // Example: true
+ DependentsAuthorized *bool `json:"dependentsAuthorized,omitempty"`
+
+ // e tag
+ // Read Only: true
+ ETag string `json:"eTag,omitempty"`
+
+ // id
+ // Example: 571008b1-b0de-454d-b843-d71be9f02c04
+ // Format: uuid
+ ID strfmt.UUID `json:"id,omitempty"`
+
+ // non temporary storage
+ // Example: false
+ NonTemporaryStorage *bool `json:"nonTemporaryStorage,omitempty"`
+
+ // organizational clothing and individual equipment
+ // Example: false
+ OrganizationalClothingAndIndividualEquipment bool `json:"organizationalClothingAndIndividualEquipment,omitempty"`
+
+ // privately owned vehicle
+ // Example: false
+ PrivatelyOwnedVehicle *bool `json:"privatelyOwnedVehicle,omitempty"`
+
+ // pro gear weight
+ // Example: 2000
+ ProGearWeight int64 `json:"proGearWeight,omitempty"`
+
+ // pro gear weight spouse
+ // Example: 500
+ ProGearWeightSpouse int64 `json:"proGearWeightSpouse,omitempty"`
+
+ // required medical equipment weight
+ // Example: 500
+ RequiredMedicalEquipmentWeight int64 `json:"requiredMedicalEquipmentWeight,omitempty"`
+
+ // storage in transit
+ // Example: 90
+ StorageInTransit int64 `json:"storageInTransit,omitempty"`
+
+ // total dependents
+ // Example: 2
+ TotalDependents int64 `json:"totalDependents,omitempty"`
+
+ // total weight
+ // Example: 500
+ TotalWeight int64 `json:"totalWeight,omitempty"`
+}
+
+// Validate validates this entitlements
+func (m *Entitlements) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *Entitlements) validateID(formats strfmt.Registry) error {
+ if swag.IsZero(m.ID) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("id", "body", "uuid", m.ID.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// ContextValidate validate this entitlements based on the context it is used
+func (m *Entitlements) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.contextValidateETag(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *Entitlements) contextValidateETag(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "eTag", "body", string(m.ETag)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *Entitlements) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *Entitlements) UnmarshalBinary(b []byte) error {
+ var res Entitlements
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/pkg/gen/internalmessages/m_t_o_agent2.go b/pkg/gen/internalmessages/m_t_o_agent2.go
new file mode 100644
index 00000000000..e24b7178425
--- /dev/null
+++ b/pkg/gen/internalmessages/m_t_o_agent2.go
@@ -0,0 +1,306 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package internalmessages
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// MTOAgent2 m t o agent 2
+//
+// swagger:model MTOAgent-2
+type MTOAgent2 struct {
+
+ // agent type
+ AgentType MTOAgentType2 `json:"agentType,omitempty"`
+
+ // created at
+ // Read Only: true
+ // Format: date-time
+ CreatedAt strfmt.DateTime `json:"createdAt,omitempty"`
+
+ // e tag
+ // Read Only: true
+ ETag string `json:"eTag,omitempty"`
+
+ // email
+ // Pattern: ^([a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,})?$
+ Email *string `json:"email,omitempty"`
+
+ // first name
+ FirstName *string `json:"firstName,omitempty"`
+
+ // The ID of the agent.
+ // Example: 1f2270c7-7166-40ae-981e-b200ebdf3054
+ // Read Only: true
+ // Format: uuid
+ ID strfmt.UUID `json:"id,omitempty"`
+
+ // last name
+ LastName *string `json:"lastName,omitempty"`
+
+ // The ID of the shipment this agent is permitted to release/receive.
+ // Example: 1f2270c7-7166-40ae-981e-b200ebdf3054
+ // Read Only: true
+ // Format: uuid
+ MtoShipmentID strfmt.UUID `json:"mtoShipmentID,omitempty"`
+
+ // phone
+ // Pattern: ^([2-9]\d{2}-\d{3}-\d{4})?$
+ Phone *string `json:"phone,omitempty"`
+
+ // updated at
+ // Read Only: true
+ // Format: date-time
+ UpdatedAt strfmt.DateTime `json:"updatedAt,omitempty"`
+}
+
+// Validate validates this m t o agent 2
+func (m *MTOAgent2) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateAgentType(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateCreatedAt(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateEmail(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateMtoShipmentID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validatePhone(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateUpdatedAt(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *MTOAgent2) validateAgentType(formats strfmt.Registry) error {
+ if swag.IsZero(m.AgentType) { // not required
+ return nil
+ }
+
+ if err := m.AgentType.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("agentType")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("agentType")
+ }
+ return err
+ }
+
+ return nil
+}
+
+func (m *MTOAgent2) validateCreatedAt(formats strfmt.Registry) error {
+ if swag.IsZero(m.CreatedAt) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("createdAt", "body", "date-time", m.CreatedAt.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MTOAgent2) validateEmail(formats strfmt.Registry) error {
+ if swag.IsZero(m.Email) { // not required
+ return nil
+ }
+
+ if err := validate.Pattern("email", "body", *m.Email, `^([a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,})?$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MTOAgent2) validateID(formats strfmt.Registry) error {
+ if swag.IsZero(m.ID) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("id", "body", "uuid", m.ID.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MTOAgent2) validateMtoShipmentID(formats strfmt.Registry) error {
+ if swag.IsZero(m.MtoShipmentID) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("mtoShipmentID", "body", "uuid", m.MtoShipmentID.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MTOAgent2) validatePhone(formats strfmt.Registry) error {
+ if swag.IsZero(m.Phone) { // not required
+ return nil
+ }
+
+ if err := validate.Pattern("phone", "body", *m.Phone, `^([2-9]\d{2}-\d{3}-\d{4})?$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MTOAgent2) validateUpdatedAt(formats strfmt.Registry) error {
+ if swag.IsZero(m.UpdatedAt) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("updatedAt", "body", "date-time", m.UpdatedAt.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// ContextValidate validate this m t o agent 2 based on the context it is used
+func (m *MTOAgent2) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.contextValidateAgentType(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateCreatedAt(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateETag(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateID(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateMtoShipmentID(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateUpdatedAt(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *MTOAgent2) contextValidateAgentType(ctx context.Context, formats strfmt.Registry) error {
+
+ if swag.IsZero(m.AgentType) { // not required
+ return nil
+ }
+
+ if err := m.AgentType.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("agentType")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("agentType")
+ }
+ return err
+ }
+
+ return nil
+}
+
+func (m *MTOAgent2) contextValidateCreatedAt(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "createdAt", "body", strfmt.DateTime(m.CreatedAt)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MTOAgent2) contextValidateETag(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "eTag", "body", string(m.ETag)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MTOAgent2) contextValidateID(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "id", "body", strfmt.UUID(m.ID)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MTOAgent2) contextValidateMtoShipmentID(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "mtoShipmentID", "body", strfmt.UUID(m.MtoShipmentID)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MTOAgent2) contextValidateUpdatedAt(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "updatedAt", "body", strfmt.DateTime(m.UpdatedAt)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *MTOAgent2) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *MTOAgent2) UnmarshalBinary(b []byte) error {
+ var res MTOAgent2
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/pkg/gen/internalmessages/m_t_o_agent_type2.go b/pkg/gen/internalmessages/m_t_o_agent_type2.go
new file mode 100644
index 00000000000..f3ac5993211
--- /dev/null
+++ b/pkg/gen/internalmessages/m_t_o_agent_type2.go
@@ -0,0 +1,82 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package internalmessages
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+ "encoding/json"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/validate"
+)
+
+// MTOAgentType2 Agent Type
+//
+// The type for this agent. `RELEASING` means they have authority on pickup, `RECEIVING` means they can receive the shipment on delivery.
+//
+// Example: RELEASING_AGENT
+//
+// swagger:model MTOAgentType-2
+type MTOAgentType2 string
+
+func NewMTOAgentType2(value MTOAgentType2) *MTOAgentType2 {
+ return &value
+}
+
+// Pointer returns a pointer to a freshly-allocated MTOAgentType2.
+func (m MTOAgentType2) Pointer() *MTOAgentType2 {
+ return &m
+}
+
+const (
+
+ // MTOAgentType2RELEASINGAGENT captures enum value "RELEASING_AGENT"
+ MTOAgentType2RELEASINGAGENT MTOAgentType2 = "RELEASING_AGENT"
+
+ // MTOAgentType2RECEIVINGAGENT captures enum value "RECEIVING_AGENT"
+ MTOAgentType2RECEIVINGAGENT MTOAgentType2 = "RECEIVING_AGENT"
+)
+
+// for schema
+var mTOAgentType2Enum []interface{}
+
+func init() {
+ var res []MTOAgentType2
+ if err := json.Unmarshal([]byte(`["RELEASING_AGENT","RECEIVING_AGENT"]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ mTOAgentType2Enum = append(mTOAgentType2Enum, v)
+ }
+}
+
+func (m MTOAgentType2) validateMTOAgentType2Enum(path, location string, value MTOAgentType2) error {
+ if err := validate.EnumCase(path, location, value, mTOAgentType2Enum, true); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Validate validates this m t o agent type 2
+func (m MTOAgentType2) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ // value enum
+ if err := m.validateMTOAgentType2Enum("", "body", m); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+// ContextValidate validates this m t o agent type 2 based on context it is used
+func (m MTOAgentType2) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ return nil
+}
diff --git a/pkg/gen/internalmessages/m_t_o_agents2.go b/pkg/gen/internalmessages/m_t_o_agents2.go
new file mode 100644
index 00000000000..5bec41e9499
--- /dev/null
+++ b/pkg/gen/internalmessages/m_t_o_agents2.go
@@ -0,0 +1,85 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package internalmessages
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+ "strconv"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// MTOAgents2 A list of the agents for a shipment. Agents are the people who the Prime contractor recognize as permitted to release (in the case of pickup) or receive (on delivery) a shipment.
+//
+// swagger:model MTOAgents-2
+type MTOAgents2 []*MTOAgent2
+
+// Validate validates this m t o agents 2
+func (m MTOAgents2) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ iMTOAgents2Size := int64(len(m))
+
+ if err := validate.MaxItems("", "body", iMTOAgents2Size, 2); err != nil {
+ return err
+ }
+
+ for i := 0; i < len(m); i++ {
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+// ContextValidate validate this m t o agents 2 based on the context it is used
+func (m MTOAgents2) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if m[i] != nil {
+
+ if swag.IsZero(m[i]) { // not required
+ return nil
+ }
+
+ if err := m[i].ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/pkg/gen/internalmessages/m_t_o_service_item.go b/pkg/gen/internalmessages/m_t_o_service_item.go
new file mode 100644
index 00000000000..e5c0918e820
--- /dev/null
+++ b/pkg/gen/internalmessages/m_t_o_service_item.go
@@ -0,0 +1,465 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package internalmessages
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "bytes"
+ "context"
+ "encoding/json"
+ "io"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// MTOServiceItem MTOServiceItem describes a base type of a service item. Polymorphic type.
+//
+// swagger:discriminator MTOServiceItem modelType
+type MTOServiceItem interface {
+ runtime.Validatable
+ runtime.ContextValidatable
+
+ // A hash unique to this service item that should be used as the "If-Match" header for any updates.
+ // Read Only: true
+ ETag() string
+ SetETag(string)
+
+ // The ID of the service item.
+ // Example: 1f2270c7-7166-40ae-981e-b200ebdf3054
+ // Read Only: true
+ // Format: uuid
+ ID() strfmt.UUID
+ SetID(strfmt.UUID)
+
+ // model type
+ // Required: true
+ ModelType() MTOServiceItemModelType
+ SetModelType(MTOServiceItemModelType)
+
+ // The ID of the move for this service item.
+ // Example: 1f2270c7-7166-40ae-981e-b200ebdf3054
+ // Required: true
+ // Format: uuid
+ MoveTaskOrderID() *strfmt.UUID
+ SetMoveTaskOrderID(*strfmt.UUID)
+
+ // The ID of the shipment this service is for, if any. Optional.
+ // Example: 1f2270c7-7166-40ae-981e-b200ebdf3054
+ // Format: uuid
+ MtoShipmentID() strfmt.UUID
+ SetMtoShipmentID(strfmt.UUID)
+
+ // The full descriptive name of the service.
+ // Read Only: true
+ ReServiceName() string
+ SetReServiceName(string)
+
+ // The reason why this service item was rejected by the TOO.
+ // Example: item was too heavy
+ // Read Only: true
+ RejectionReason() *string
+ SetRejectionReason(*string)
+
+ // service request documents
+ ServiceRequestDocuments() ServiceRequestDocuments
+ SetServiceRequestDocuments(ServiceRequestDocuments)
+
+ // status
+ Status() MTOServiceItemStatus
+ SetStatus(MTOServiceItemStatus)
+
+ // AdditionalProperties in base type shoud be handled just like regular properties
+ // At this moment, the base type property is pushed down to the subtype
+}
+
+type mTOServiceItem struct {
+ eTagField string
+
+ idField strfmt.UUID
+
+ modelTypeField MTOServiceItemModelType
+
+ moveTaskOrderIdField *strfmt.UUID
+
+ mtoShipmentIdField strfmt.UUID
+
+ reServiceNameField string
+
+ rejectionReasonField *string
+
+ serviceRequestDocumentsField ServiceRequestDocuments
+
+ statusField MTOServiceItemStatus
+}
+
+// ETag gets the e tag of this polymorphic type
+func (m *mTOServiceItem) ETag() string {
+ return m.eTagField
+}
+
+// SetETag sets the e tag of this polymorphic type
+func (m *mTOServiceItem) SetETag(val string) {
+ m.eTagField = val
+}
+
+// ID gets the id of this polymorphic type
+func (m *mTOServiceItem) ID() strfmt.UUID {
+ return m.idField
+}
+
+// SetID sets the id of this polymorphic type
+func (m *mTOServiceItem) SetID(val strfmt.UUID) {
+ m.idField = val
+}
+
+// ModelType gets the model type of this polymorphic type
+func (m *mTOServiceItem) ModelType() MTOServiceItemModelType {
+ return "MTOServiceItem"
+}
+
+// SetModelType sets the model type of this polymorphic type
+func (m *mTOServiceItem) SetModelType(val MTOServiceItemModelType) {
+}
+
+// MoveTaskOrderID gets the move task order ID of this polymorphic type
+func (m *mTOServiceItem) MoveTaskOrderID() *strfmt.UUID {
+ return m.moveTaskOrderIdField
+}
+
+// SetMoveTaskOrderID sets the move task order ID of this polymorphic type
+func (m *mTOServiceItem) SetMoveTaskOrderID(val *strfmt.UUID) {
+ m.moveTaskOrderIdField = val
+}
+
+// MtoShipmentID gets the mto shipment ID of this polymorphic type
+func (m *mTOServiceItem) MtoShipmentID() strfmt.UUID {
+ return m.mtoShipmentIdField
+}
+
+// SetMtoShipmentID sets the mto shipment ID of this polymorphic type
+func (m *mTOServiceItem) SetMtoShipmentID(val strfmt.UUID) {
+ m.mtoShipmentIdField = val
+}
+
+// ReServiceName gets the re service name of this polymorphic type
+func (m *mTOServiceItem) ReServiceName() string {
+ return m.reServiceNameField
+}
+
+// SetReServiceName sets the re service name of this polymorphic type
+func (m *mTOServiceItem) SetReServiceName(val string) {
+ m.reServiceNameField = val
+}
+
+// RejectionReason gets the rejection reason of this polymorphic type
+func (m *mTOServiceItem) RejectionReason() *string {
+ return m.rejectionReasonField
+}
+
+// SetRejectionReason sets the rejection reason of this polymorphic type
+func (m *mTOServiceItem) SetRejectionReason(val *string) {
+ m.rejectionReasonField = val
+}
+
+// ServiceRequestDocuments gets the service request documents of this polymorphic type
+func (m *mTOServiceItem) ServiceRequestDocuments() ServiceRequestDocuments {
+ return m.serviceRequestDocumentsField
+}
+
+// SetServiceRequestDocuments sets the service request documents of this polymorphic type
+func (m *mTOServiceItem) SetServiceRequestDocuments(val ServiceRequestDocuments) {
+ m.serviceRequestDocumentsField = val
+}
+
+// Status gets the status of this polymorphic type
+func (m *mTOServiceItem) Status() MTOServiceItemStatus {
+ return m.statusField
+}
+
+// SetStatus sets the status of this polymorphic type
+func (m *mTOServiceItem) SetStatus(val MTOServiceItemStatus) {
+ m.statusField = val
+}
+
+// UnmarshalMTOServiceItemSlice unmarshals polymorphic slices of MTOServiceItem
+func UnmarshalMTOServiceItemSlice(reader io.Reader, consumer runtime.Consumer) ([]MTOServiceItem, error) {
+ var elements []json.RawMessage
+ if err := consumer.Consume(reader, &elements); err != nil {
+ return nil, err
+ }
+
+ var result []MTOServiceItem
+ for _, element := range elements {
+ obj, err := unmarshalMTOServiceItem(element, consumer)
+ if err != nil {
+ return nil, err
+ }
+ result = append(result, obj)
+ }
+ return result, nil
+}
+
+// UnmarshalMTOServiceItem unmarshals polymorphic MTOServiceItem
+func UnmarshalMTOServiceItem(reader io.Reader, consumer runtime.Consumer) (MTOServiceItem, error) {
+ // we need to read this twice, so first into a buffer
+ data, err := io.ReadAll(reader)
+ if err != nil {
+ return nil, err
+ }
+ return unmarshalMTOServiceItem(data, consumer)
+}
+
+func unmarshalMTOServiceItem(data []byte, consumer runtime.Consumer) (MTOServiceItem, error) {
+ buf := bytes.NewBuffer(data)
+ buf2 := bytes.NewBuffer(data)
+
+ // the first time this is read is to fetch the value of the modelType property.
+ var getType struct {
+ ModelType string `json:"modelType"`
+ }
+ if err := consumer.Consume(buf, &getType); err != nil {
+ return nil, err
+ }
+
+ if err := validate.RequiredString("modelType", "body", getType.ModelType); err != nil {
+ return nil, err
+ }
+
+ // The value of modelType is used to determine which type to create and unmarshal the data into
+ switch getType.ModelType {
+ case "MTOServiceItem":
+ var result mTOServiceItem
+ if err := consumer.Consume(buf2, &result); err != nil {
+ return nil, err
+ }
+ return &result, nil
+ }
+ return nil, errors.New(422, "invalid modelType value: %q", getType.ModelType)
+}
+
+// Validate validates this m t o service item
+func (m *mTOServiceItem) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateMoveTaskOrderID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateMtoShipmentID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateServiceRequestDocuments(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateStatus(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *mTOServiceItem) validateID(formats strfmt.Registry) error {
+ if swag.IsZero(m.ID()) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("id", "body", "uuid", m.ID().String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *mTOServiceItem) validateMoveTaskOrderID(formats strfmt.Registry) error {
+
+ if err := validate.Required("moveTaskOrderID", "body", m.MoveTaskOrderID()); err != nil {
+ return err
+ }
+
+ if err := validate.FormatOf("moveTaskOrderID", "body", "uuid", m.MoveTaskOrderID().String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *mTOServiceItem) validateMtoShipmentID(formats strfmt.Registry) error {
+ if swag.IsZero(m.MtoShipmentID()) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("mtoShipmentID", "body", "uuid", m.MtoShipmentID().String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *mTOServiceItem) validateServiceRequestDocuments(formats strfmt.Registry) error {
+ if swag.IsZero(m.ServiceRequestDocuments()) { // not required
+ return nil
+ }
+
+ if err := m.ServiceRequestDocuments().Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("serviceRequestDocuments")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("serviceRequestDocuments")
+ }
+ return err
+ }
+
+ return nil
+}
+
+func (m *mTOServiceItem) validateStatus(formats strfmt.Registry) error {
+ if swag.IsZero(m.Status()) { // not required
+ return nil
+ }
+
+ if err := m.Status().Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("status")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("status")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// ContextValidate validate this m t o service item based on the context it is used
+func (m *mTOServiceItem) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.contextValidateETag(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateID(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateModelType(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateReServiceName(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateRejectionReason(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateServiceRequestDocuments(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateStatus(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *mTOServiceItem) contextValidateETag(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "eTag", "body", string(m.ETag())); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *mTOServiceItem) contextValidateID(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "id", "body", strfmt.UUID(m.ID())); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *mTOServiceItem) contextValidateModelType(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := m.ModelType().ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("modelType")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("modelType")
+ }
+ return err
+ }
+
+ return nil
+}
+
+func (m *mTOServiceItem) contextValidateReServiceName(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "reServiceName", "body", string(m.ReServiceName())); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *mTOServiceItem) contextValidateRejectionReason(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "rejectionReason", "body", m.RejectionReason()); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *mTOServiceItem) contextValidateServiceRequestDocuments(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := m.ServiceRequestDocuments().ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("serviceRequestDocuments")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("serviceRequestDocuments")
+ }
+ return err
+ }
+
+ return nil
+}
+
+func (m *mTOServiceItem) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Status()) { // not required
+ return nil
+ }
+
+ if err := m.Status().ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("status")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("status")
+ }
+ return err
+ }
+
+ return nil
+}
diff --git a/pkg/gen/internalmessages/m_t_o_service_item_model_type.go b/pkg/gen/internalmessages/m_t_o_service_item_model_type.go
new file mode 100644
index 00000000000..07ae886028e
--- /dev/null
+++ b/pkg/gen/internalmessages/m_t_o_service_item_model_type.go
@@ -0,0 +1,95 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package internalmessages
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+ "encoding/json"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/validate"
+)
+
+// MTOServiceItemModelType Describes all model sub-types for a MTOServiceItem model.
+//
+// Using this list, choose the correct modelType in the dropdown, corresponding to the service item type.
+// - DOFSIT, DOASIT - MTOServiceItemOriginSIT
+// - DDFSIT, DDASIT - MTOServiceItemDestSIT
+// - DOSHUT, DDSHUT - MTOServiceItemShuttle
+// - DCRT, DUCRT - MTOServiceItemDomesticCrating
+//
+// The documentation will then update with the supported fields.
+//
+// swagger:model MTOServiceItemModelType
+type MTOServiceItemModelType string
+
+func NewMTOServiceItemModelType(value MTOServiceItemModelType) *MTOServiceItemModelType {
+ return &value
+}
+
+// Pointer returns a pointer to a freshly-allocated MTOServiceItemModelType.
+func (m MTOServiceItemModelType) Pointer() *MTOServiceItemModelType {
+ return &m
+}
+
+const (
+
+ // MTOServiceItemModelTypeMTOServiceItemBasic captures enum value "MTOServiceItemBasic"
+ MTOServiceItemModelTypeMTOServiceItemBasic MTOServiceItemModelType = "MTOServiceItemBasic"
+
+ // MTOServiceItemModelTypeMTOServiceItemOriginSIT captures enum value "MTOServiceItemOriginSIT"
+ MTOServiceItemModelTypeMTOServiceItemOriginSIT MTOServiceItemModelType = "MTOServiceItemOriginSIT"
+
+ // MTOServiceItemModelTypeMTOServiceItemDestSIT captures enum value "MTOServiceItemDestSIT"
+ MTOServiceItemModelTypeMTOServiceItemDestSIT MTOServiceItemModelType = "MTOServiceItemDestSIT"
+
+ // MTOServiceItemModelTypeMTOServiceItemShuttle captures enum value "MTOServiceItemShuttle"
+ MTOServiceItemModelTypeMTOServiceItemShuttle MTOServiceItemModelType = "MTOServiceItemShuttle"
+
+ // MTOServiceItemModelTypeMTOServiceItemDomesticCrating captures enum value "MTOServiceItemDomesticCrating"
+ MTOServiceItemModelTypeMTOServiceItemDomesticCrating MTOServiceItemModelType = "MTOServiceItemDomesticCrating"
+)
+
+// for schema
+var mTOServiceItemModelTypeEnum []interface{}
+
+func init() {
+ var res []MTOServiceItemModelType
+ if err := json.Unmarshal([]byte(`["MTOServiceItemBasic","MTOServiceItemOriginSIT","MTOServiceItemDestSIT","MTOServiceItemShuttle","MTOServiceItemDomesticCrating"]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ mTOServiceItemModelTypeEnum = append(mTOServiceItemModelTypeEnum, v)
+ }
+}
+
+func (m MTOServiceItemModelType) validateMTOServiceItemModelTypeEnum(path, location string, value MTOServiceItemModelType) error {
+ if err := validate.EnumCase(path, location, value, mTOServiceItemModelTypeEnum, true); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Validate validates this m t o service item model type
+func (m MTOServiceItemModelType) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ // value enum
+ if err := m.validateMTOServiceItemModelTypeEnum("", "body", m); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+// ContextValidate validates this m t o service item model type based on context it is used
+func (m MTOServiceItemModelType) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ return nil
+}
diff --git a/pkg/gen/internalmessages/m_t_o_service_item_status.go b/pkg/gen/internalmessages/m_t_o_service_item_status.go
new file mode 100644
index 00000000000..654ca780746
--- /dev/null
+++ b/pkg/gen/internalmessages/m_t_o_service_item_status.go
@@ -0,0 +1,90 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package internalmessages
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+ "encoding/json"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/validate"
+)
+
+// MTOServiceItemStatus The status of a service item, indicating where it is in the TOO's approval process.
+//
+// swagger:model MTOServiceItemStatus
+type MTOServiceItemStatus string
+
+func NewMTOServiceItemStatus(value MTOServiceItemStatus) *MTOServiceItemStatus {
+ return &value
+}
+
+// Pointer returns a pointer to a freshly-allocated MTOServiceItemStatus.
+func (m MTOServiceItemStatus) Pointer() *MTOServiceItemStatus {
+ return &m
+}
+
+const (
+
+ // MTOServiceItemStatusSUBMITTED captures enum value "SUBMITTED"
+ MTOServiceItemStatusSUBMITTED MTOServiceItemStatus = "SUBMITTED"
+
+ // MTOServiceItemStatusAPPROVED captures enum value "APPROVED"
+ MTOServiceItemStatusAPPROVED MTOServiceItemStatus = "APPROVED"
+
+ // MTOServiceItemStatusREJECTED captures enum value "REJECTED"
+ MTOServiceItemStatusREJECTED MTOServiceItemStatus = "REJECTED"
+)
+
+// for schema
+var mTOServiceItemStatusEnum []interface{}
+
+func init() {
+ var res []MTOServiceItemStatus
+ if err := json.Unmarshal([]byte(`["SUBMITTED","APPROVED","REJECTED"]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ mTOServiceItemStatusEnum = append(mTOServiceItemStatusEnum, v)
+ }
+}
+
+func (m MTOServiceItemStatus) validateMTOServiceItemStatusEnum(path, location string, value MTOServiceItemStatus) error {
+ if err := validate.EnumCase(path, location, value, mTOServiceItemStatusEnum, true); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Validate validates this m t o service item status
+func (m MTOServiceItemStatus) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ // value enum
+ if err := m.validateMTOServiceItemStatusEnum("", "body", m); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+// ContextValidate validate this m t o service item status based on the context it is used
+func (m MTOServiceItemStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ var res []error
+
+ if err := validate.ReadOnly(ctx, "", "body", MTOServiceItemStatus(m)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/pkg/gen/internalmessages/m_t_o_shipment_type2.go b/pkg/gen/internalmessages/m_t_o_shipment_type2.go
new file mode 100644
index 00000000000..2dd1c50b017
--- /dev/null
+++ b/pkg/gen/internalmessages/m_t_o_shipment_type2.go
@@ -0,0 +1,107 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package internalmessages
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+ "encoding/json"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/validate"
+)
+
+// MTOShipmentType2 Shipment Type
+//
+// The type of shipment.
+// - `HHG` = Household goods move
+// - `HHG_INTO_NTS_DOMESTIC` = HHG into Non-temporary storage (NTS)
+// - `HHG_OUTOF_NTS_DOMESTIC` = HHG out of Non-temporary storage (NTS Release)
+// - `PPM` = Personally Procured Move also known as Do It Yourself (DITY)
+//
+// Example: HHG
+//
+// swagger:model MTOShipmentType-2
+type MTOShipmentType2 string
+
+func NewMTOShipmentType2(value MTOShipmentType2) *MTOShipmentType2 {
+ return &value
+}
+
+// Pointer returns a pointer to a freshly-allocated MTOShipmentType2.
+func (m MTOShipmentType2) Pointer() *MTOShipmentType2 {
+ return &m
+}
+
+const (
+
+ // MTOShipmentType2BOATHAULAWAY captures enum value "BOAT_HAUL_AWAY"
+ MTOShipmentType2BOATHAULAWAY MTOShipmentType2 = "BOAT_HAUL_AWAY"
+
+ // MTOShipmentType2BOATTOWAWAY captures enum value "BOAT_TOW_AWAY"
+ MTOShipmentType2BOATTOWAWAY MTOShipmentType2 = "BOAT_TOW_AWAY"
+
+ // MTOShipmentType2HHG captures enum value "HHG"
+ MTOShipmentType2HHG MTOShipmentType2 = "HHG"
+
+ // MTOShipmentType2HHGINTONTSDOMESTIC captures enum value "HHG_INTO_NTS_DOMESTIC"
+ MTOShipmentType2HHGINTONTSDOMESTIC MTOShipmentType2 = "HHG_INTO_NTS_DOMESTIC"
+
+ // MTOShipmentType2HHGOUTOFNTSDOMESTIC captures enum value "HHG_OUTOF_NTS_DOMESTIC"
+ MTOShipmentType2HHGOUTOFNTSDOMESTIC MTOShipmentType2 = "HHG_OUTOF_NTS_DOMESTIC"
+
+ // MTOShipmentType2INTERNATIONALHHG captures enum value "INTERNATIONAL_HHG"
+ MTOShipmentType2INTERNATIONALHHG MTOShipmentType2 = "INTERNATIONAL_HHG"
+
+ // MTOShipmentType2INTERNATIONALUB captures enum value "INTERNATIONAL_UB"
+ MTOShipmentType2INTERNATIONALUB MTOShipmentType2 = "INTERNATIONAL_UB"
+
+ // MTOShipmentType2MOTORHOME captures enum value "MOTORHOME"
+ MTOShipmentType2MOTORHOME MTOShipmentType2 = "MOTORHOME"
+
+ // MTOShipmentType2PPM captures enum value "PPM"
+ MTOShipmentType2PPM MTOShipmentType2 = "PPM"
+)
+
+// for schema
+var mTOShipmentType2Enum []interface{}
+
+func init() {
+ var res []MTOShipmentType2
+ if err := json.Unmarshal([]byte(`["BOAT_HAUL_AWAY","BOAT_TOW_AWAY","HHG","HHG_INTO_NTS_DOMESTIC","HHG_OUTOF_NTS_DOMESTIC","INTERNATIONAL_HHG","INTERNATIONAL_UB","MOTORHOME","PPM"]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ mTOShipmentType2Enum = append(mTOShipmentType2Enum, v)
+ }
+}
+
+func (m MTOShipmentType2) validateMTOShipmentType2Enum(path, location string, value MTOShipmentType2) error {
+ if err := validate.EnumCase(path, location, value, mTOShipmentType2Enum, true); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Validate validates this m t o shipment type 2
+func (m MTOShipmentType2) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ // value enum
+ if err := m.validateMTOShipmentType2Enum("", "body", m); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+// ContextValidate validates this m t o shipment type 2 based on context it is used
+func (m MTOShipmentType2) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ return nil
+}
diff --git a/pkg/gen/internalmessages/m_t_o_shipment_without_service_items.go b/pkg/gen/internalmessages/m_t_o_shipment_without_service_items.go
new file mode 100644
index 00000000000..bc38f51b9d8
--- /dev/null
+++ b/pkg/gen/internalmessages/m_t_o_shipment_without_service_items.go
@@ -0,0 +1,1165 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package internalmessages
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+ "encoding/json"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// MTOShipmentWithoutServiceItems m t o shipment without service items
+//
+// swagger:model MTOShipmentWithoutServiceItems
+type MTOShipmentWithoutServiceItems struct {
+
+ // The date when the Prime contractor actually delivered the shipment. Updated after-the-fact.
+ // Format: date
+ ActualDeliveryDate *strfmt.Date `json:"actualDeliveryDate"`
+
+ // The date when the Prime contractor actually picked up the shipment. Updated after-the-fact.
+ // Format: date
+ ActualPickupDate *strfmt.Date `json:"actualPickupDate"`
+
+ // agents
+ Agents MTOAgents2 `json:"agents,omitempty"`
+
+ // The date when the Transportation Ordering Officer first approved this shipment for the move.
+ // Read Only: true
+ // Format: date
+ ApprovedDate *strfmt.Date `json:"approvedDate"`
+
+ // The counselor can use the counselor remarks field to inform the movers about any
+ // special circumstances for this shipment. Typical examples:
+ // * bulky or fragile items,
+ // * weapons,
+ // * access info for their address.
+ //
+ // Counselors enters this information when creating or editing an MTO Shipment. Optional field.
+ //
+ // Example: handle with care
+ // Read Only: true
+ CounselorRemarks *string `json:"counselorRemarks,omitempty"`
+
+ // created at
+ // Read Only: true
+ // Format: date-time
+ CreatedAt strfmt.DateTime `json:"createdAt,omitempty"`
+
+ // The customer can use the customer remarks field to inform the services counselor and the movers about any
+ // special circumstances for this shipment. Typical examples:
+ // * bulky or fragile items,
+ // * weapons,
+ // * access info for their address.
+ //
+ // Customer enters this information during onboarding. Optional field.
+ //
+ // Example: handle with care
+ // Read Only: true
+ CustomerRemarks *string `json:"customerRemarks,omitempty"`
+
+ // delivery address update
+ DeliveryAddressUpdate *ShipmentAddressUpdate `json:"deliveryAddressUpdate,omitempty"`
+
+ // Where the movers should deliver this shipment. Often provided by the customer when they enter shipment details
+ // during onboarding, if they know their new address already.
+ //
+ // May be blank when entered by the customer, required when entered by the Prime. May not represent the true
+ // final destination due to the shipment being diverted or placed in SIT.
+ //
+ DestinationAddress struct {
+ Address
+ } `json:"destinationAddress,omitempty"`
+
+ // destination type
+ DestinationType *DestinationType `json:"destinationType,omitempty"`
+
+ // This value indicates whether or not this shipment is part of a diversion. If yes, the shipment can be either the starting or ending segment of the diversion.
+ //
+ Diversion bool `json:"diversion,omitempty"`
+
+ // A hash unique to this shipment that should be used as the "If-Match" header for any updates.
+ // Read Only: true
+ ETag string `json:"eTag,omitempty"`
+
+ // The date the Prime provides to the customer as the first possible delivery date so that they can plan their travel accordingly.
+ //
+ // Format: date
+ FirstAvailableDeliveryDate *strfmt.Date `json:"firstAvailableDeliveryDate"`
+
+ // The ID of the shipment.
+ // Example: 1f2270c7-7166-40ae-981e-b200ebdf3054
+ // Read Only: true
+ // Format: uuid
+ ID strfmt.UUID `json:"id,omitempty"`
+
+ // The ID of the move for this shipment.
+ // Example: 1f2270c7-7166-40ae-981e-b200ebdf3054
+ // Read Only: true
+ // Format: uuid
+ MoveTaskOrderID strfmt.UUID `json:"moveTaskOrderID,omitempty"`
+
+ // The previously recorded weight for the NTS Shipment. Used for NTS Release to know what the previous primeActualWeight or billable weight was.
+ // Example: 4500
+ NtsRecordedWeight *int64 `json:"ntsRecordedWeight,omitempty"`
+
+ // The address where the movers should pick up this shipment, entered by the customer during onboarding when they enter shipment details.
+ //
+ PickupAddress struct {
+ Address
+ } `json:"pickupAddress,omitempty"`
+
+ // Email or ID of the person who will be contacted in the event of questions or concerns about this update. May be the person performing the update, or someone else working with the Prime contractor.
+ //
+ PointOfContact string `json:"pointOfContact,omitempty"`
+
+ // ppm shipment
+ PpmShipment *PPMShipment2 `json:"ppmShipment,omitempty"`
+
+ // The actual weight of the shipment, provided after the Prime packs, picks up, and weighs a customer's shipment.
+ // Example: 4500
+ // Minimum: 1
+ PrimeActualWeight *int64 `json:"primeActualWeight,omitempty"`
+
+ // The estimated weight of this shipment, determined by the movers during the pre-move survey. This value **can only be updated once.** If there was an issue with estimating the weight and a mistake was made, the Prime contracter will need to contact the TOO to change it.
+ //
+ // Example: 4500
+ // Minimum: 1
+ PrimeEstimatedWeight *int64 `json:"primeEstimatedWeight,omitempty"`
+
+ // The date when the Prime contractor recorded the shipment's estimated weight.
+ // Read Only: true
+ // Format: date
+ PrimeEstimatedWeightRecordedDate *strfmt.Date `json:"primeEstimatedWeightRecordedDate"`
+
+ // The customer's preferred delivery date.
+ // Read Only: true
+ // Format: date
+ RequestedDeliveryDate *strfmt.Date `json:"requestedDeliveryDate"`
+
+ // The date the customer selects during onboarding as their preferred pickup date. Other dates, such as required delivery date and (outside MilMove) the pack date, are derived from this date.
+ //
+ // Read Only: true
+ // Format: date
+ RequestedPickupDate *strfmt.Date `json:"requestedPickupDate"`
+
+ // The latest date by which the Prime can deliver a customer's shipment without violating the contract. This is calculated based on weight, distance, and the scheduled pickup date. It cannot be modified.
+ //
+ // Read Only: true
+ // Format: date
+ RequiredDeliveryDate *strfmt.Date `json:"requiredDeliveryDate"`
+
+ // reweigh
+ Reweigh *Reweigh `json:"reweigh,omitempty"`
+
+ // The date the Prime contractor scheduled to deliver this shipment after consultation with the customer.
+ // Format: date
+ ScheduledDeliveryDate *strfmt.Date `json:"scheduledDeliveryDate"`
+
+ // The date the Prime contractor scheduled to pick up this shipment after consultation with the customer.
+ // Format: date
+ ScheduledPickupDate *strfmt.Date `json:"scheduledPickupDate"`
+
+ // A second delivery address for this shipment, if the customer entered one. An optional field.
+ SecondaryDeliveryAddress struct {
+ Address
+ } `json:"secondaryDeliveryAddress,omitempty"`
+
+ // A second pickup address for this shipment, if the customer entered one. An optional field.
+ SecondaryPickupAddress struct {
+ Address
+ } `json:"secondaryPickupAddress,omitempty"`
+
+ // shipment type
+ ShipmentType MTOShipmentType2 `json:"shipmentType,omitempty"`
+
+ // sit extensions
+ SitExtensions SITExtensions `json:"sitExtensions,omitempty"`
+
+ // The status of a shipment, indicating where it is in the TOO's approval process. Can only be updated by the contractor in special circumstances.
+ //
+ // Read Only: true
+ // Enum: [SUBMITTED APPROVED REJECTED CANCELLATION_REQUESTED CANCELED DIVERSION_REQUESTED]
+ Status string `json:"status,omitempty"`
+
+ // storage facility
+ StorageFacility *StorageFacility `json:"storageFacility,omitempty"`
+
+ // updated at
+ // Read Only: true
+ // Format: date-time
+ UpdatedAt strfmt.DateTime `json:"updatedAt,omitempty"`
+}
+
+// Validate validates this m t o shipment without service items
+func (m *MTOShipmentWithoutServiceItems) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateActualDeliveryDate(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateActualPickupDate(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateAgents(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateApprovedDate(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateCreatedAt(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateDeliveryAddressUpdate(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateDestinationAddress(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateDestinationType(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateFirstAvailableDeliveryDate(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateMoveTaskOrderID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validatePickupAddress(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validatePpmShipment(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validatePrimeActualWeight(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validatePrimeEstimatedWeight(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validatePrimeEstimatedWeightRecordedDate(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateRequestedDeliveryDate(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateRequestedPickupDate(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateRequiredDeliveryDate(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateReweigh(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateScheduledDeliveryDate(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateScheduledPickupDate(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateSecondaryDeliveryAddress(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateSecondaryPickupAddress(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateShipmentType(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateSitExtensions(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateStatus(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateStorageFacility(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateUpdatedAt(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) validateActualDeliveryDate(formats strfmt.Registry) error {
+ if swag.IsZero(m.ActualDeliveryDate) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("actualDeliveryDate", "body", "date", m.ActualDeliveryDate.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) validateActualPickupDate(formats strfmt.Registry) error {
+ if swag.IsZero(m.ActualPickupDate) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("actualPickupDate", "body", "date", m.ActualPickupDate.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) validateAgents(formats strfmt.Registry) error {
+ if swag.IsZero(m.Agents) { // not required
+ return nil
+ }
+
+ if err := m.Agents.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("agents")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("agents")
+ }
+ return err
+ }
+
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) validateApprovedDate(formats strfmt.Registry) error {
+ if swag.IsZero(m.ApprovedDate) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("approvedDate", "body", "date", m.ApprovedDate.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) validateCreatedAt(formats strfmt.Registry) error {
+ if swag.IsZero(m.CreatedAt) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("createdAt", "body", "date-time", m.CreatedAt.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) validateDeliveryAddressUpdate(formats strfmt.Registry) error {
+ if swag.IsZero(m.DeliveryAddressUpdate) { // not required
+ return nil
+ }
+
+ if m.DeliveryAddressUpdate != nil {
+ if err := m.DeliveryAddressUpdate.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("deliveryAddressUpdate")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("deliveryAddressUpdate")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) validateDestinationAddress(formats strfmt.Registry) error {
+ if swag.IsZero(m.DestinationAddress) { // not required
+ return nil
+ }
+
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) validateDestinationType(formats strfmt.Registry) error {
+ if swag.IsZero(m.DestinationType) { // not required
+ return nil
+ }
+
+ if m.DestinationType != nil {
+ if err := m.DestinationType.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("destinationType")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("destinationType")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) validateFirstAvailableDeliveryDate(formats strfmt.Registry) error {
+ if swag.IsZero(m.FirstAvailableDeliveryDate) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("firstAvailableDeliveryDate", "body", "date", m.FirstAvailableDeliveryDate.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) validateID(formats strfmt.Registry) error {
+ if swag.IsZero(m.ID) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("id", "body", "uuid", m.ID.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) validateMoveTaskOrderID(formats strfmt.Registry) error {
+ if swag.IsZero(m.MoveTaskOrderID) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("moveTaskOrderID", "body", "uuid", m.MoveTaskOrderID.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) validatePickupAddress(formats strfmt.Registry) error {
+ if swag.IsZero(m.PickupAddress) { // not required
+ return nil
+ }
+
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) validatePpmShipment(formats strfmt.Registry) error {
+ if swag.IsZero(m.PpmShipment) { // not required
+ return nil
+ }
+
+ if m.PpmShipment != nil {
+ if err := m.PpmShipment.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("ppmShipment")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("ppmShipment")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) validatePrimeActualWeight(formats strfmt.Registry) error {
+ if swag.IsZero(m.PrimeActualWeight) { // not required
+ return nil
+ }
+
+ if err := validate.MinimumInt("primeActualWeight", "body", *m.PrimeActualWeight, 1, false); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) validatePrimeEstimatedWeight(formats strfmt.Registry) error {
+ if swag.IsZero(m.PrimeEstimatedWeight) { // not required
+ return nil
+ }
+
+ if err := validate.MinimumInt("primeEstimatedWeight", "body", *m.PrimeEstimatedWeight, 1, false); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) validatePrimeEstimatedWeightRecordedDate(formats strfmt.Registry) error {
+ if swag.IsZero(m.PrimeEstimatedWeightRecordedDate) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("primeEstimatedWeightRecordedDate", "body", "date", m.PrimeEstimatedWeightRecordedDate.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) validateRequestedDeliveryDate(formats strfmt.Registry) error {
+ if swag.IsZero(m.RequestedDeliveryDate) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("requestedDeliveryDate", "body", "date", m.RequestedDeliveryDate.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) validateRequestedPickupDate(formats strfmt.Registry) error {
+ if swag.IsZero(m.RequestedPickupDate) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("requestedPickupDate", "body", "date", m.RequestedPickupDate.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) validateRequiredDeliveryDate(formats strfmt.Registry) error {
+ if swag.IsZero(m.RequiredDeliveryDate) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("requiredDeliveryDate", "body", "date", m.RequiredDeliveryDate.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) validateReweigh(formats strfmt.Registry) error {
+ if swag.IsZero(m.Reweigh) { // not required
+ return nil
+ }
+
+ if m.Reweigh != nil {
+ if err := m.Reweigh.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("reweigh")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("reweigh")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) validateScheduledDeliveryDate(formats strfmt.Registry) error {
+ if swag.IsZero(m.ScheduledDeliveryDate) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("scheduledDeliveryDate", "body", "date", m.ScheduledDeliveryDate.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) validateScheduledPickupDate(formats strfmt.Registry) error {
+ if swag.IsZero(m.ScheduledPickupDate) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("scheduledPickupDate", "body", "date", m.ScheduledPickupDate.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) validateSecondaryDeliveryAddress(formats strfmt.Registry) error {
+ if swag.IsZero(m.SecondaryDeliveryAddress) { // not required
+ return nil
+ }
+
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) validateSecondaryPickupAddress(formats strfmt.Registry) error {
+ if swag.IsZero(m.SecondaryPickupAddress) { // not required
+ return nil
+ }
+
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) validateShipmentType(formats strfmt.Registry) error {
+ if swag.IsZero(m.ShipmentType) { // not required
+ return nil
+ }
+
+ if err := m.ShipmentType.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("shipmentType")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("shipmentType")
+ }
+ return err
+ }
+
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) validateSitExtensions(formats strfmt.Registry) error {
+ if swag.IsZero(m.SitExtensions) { // not required
+ return nil
+ }
+
+ if err := m.SitExtensions.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("sitExtensions")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("sitExtensions")
+ }
+ return err
+ }
+
+ return nil
+}
+
+var mTOShipmentWithoutServiceItemsTypeStatusPropEnum []interface{}
+
+func init() {
+ var res []string
+ if err := json.Unmarshal([]byte(`["SUBMITTED","APPROVED","REJECTED","CANCELLATION_REQUESTED","CANCELED","DIVERSION_REQUESTED"]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ mTOShipmentWithoutServiceItemsTypeStatusPropEnum = append(mTOShipmentWithoutServiceItemsTypeStatusPropEnum, v)
+ }
+}
+
+const (
+
+ // MTOShipmentWithoutServiceItemsStatusSUBMITTED captures enum value "SUBMITTED"
+ MTOShipmentWithoutServiceItemsStatusSUBMITTED string = "SUBMITTED"
+
+ // MTOShipmentWithoutServiceItemsStatusAPPROVED captures enum value "APPROVED"
+ MTOShipmentWithoutServiceItemsStatusAPPROVED string = "APPROVED"
+
+ // MTOShipmentWithoutServiceItemsStatusREJECTED captures enum value "REJECTED"
+ MTOShipmentWithoutServiceItemsStatusREJECTED string = "REJECTED"
+
+ // MTOShipmentWithoutServiceItemsStatusCANCELLATIONREQUESTED captures enum value "CANCELLATION_REQUESTED"
+ MTOShipmentWithoutServiceItemsStatusCANCELLATIONREQUESTED string = "CANCELLATION_REQUESTED"
+
+ // MTOShipmentWithoutServiceItemsStatusCANCELED captures enum value "CANCELED"
+ MTOShipmentWithoutServiceItemsStatusCANCELED string = "CANCELED"
+
+ // MTOShipmentWithoutServiceItemsStatusDIVERSIONREQUESTED captures enum value "DIVERSION_REQUESTED"
+ MTOShipmentWithoutServiceItemsStatusDIVERSIONREQUESTED string = "DIVERSION_REQUESTED"
+)
+
+// prop value enum
+func (m *MTOShipmentWithoutServiceItems) validateStatusEnum(path, location string, value string) error {
+ if err := validate.EnumCase(path, location, value, mTOShipmentWithoutServiceItemsTypeStatusPropEnum, true); err != nil {
+ return err
+ }
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) validateStatus(formats strfmt.Registry) error {
+ if swag.IsZero(m.Status) { // not required
+ return nil
+ }
+
+ // value enum
+ if err := m.validateStatusEnum("status", "body", m.Status); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) validateStorageFacility(formats strfmt.Registry) error {
+ if swag.IsZero(m.StorageFacility) { // not required
+ return nil
+ }
+
+ if m.StorageFacility != nil {
+ if err := m.StorageFacility.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("storageFacility")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("storageFacility")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) validateUpdatedAt(formats strfmt.Registry) error {
+ if swag.IsZero(m.UpdatedAt) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("updatedAt", "body", "date-time", m.UpdatedAt.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// ContextValidate validate this m t o shipment without service items based on the context it is used
+func (m *MTOShipmentWithoutServiceItems) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.contextValidateAgents(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateApprovedDate(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateCounselorRemarks(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateCreatedAt(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateCustomerRemarks(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateDeliveryAddressUpdate(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateDestinationAddress(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateDestinationType(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateETag(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateID(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateMoveTaskOrderID(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidatePickupAddress(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidatePpmShipment(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidatePrimeEstimatedWeightRecordedDate(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateRequestedDeliveryDate(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateRequestedPickupDate(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateRequiredDeliveryDate(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateReweigh(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateSecondaryDeliveryAddress(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateSecondaryPickupAddress(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateShipmentType(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateSitExtensions(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateStatus(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateStorageFacility(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateUpdatedAt(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) contextValidateAgents(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := m.Agents.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("agents")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("agents")
+ }
+ return err
+ }
+
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) contextValidateApprovedDate(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "approvedDate", "body", m.ApprovedDate); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) contextValidateCounselorRemarks(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "counselorRemarks", "body", m.CounselorRemarks); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) contextValidateCreatedAt(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "createdAt", "body", strfmt.DateTime(m.CreatedAt)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) contextValidateCustomerRemarks(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "customerRemarks", "body", m.CustomerRemarks); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) contextValidateDeliveryAddressUpdate(ctx context.Context, formats strfmt.Registry) error {
+
+ if m.DeliveryAddressUpdate != nil {
+
+ if swag.IsZero(m.DeliveryAddressUpdate) { // not required
+ return nil
+ }
+
+ if err := m.DeliveryAddressUpdate.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("deliveryAddressUpdate")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("deliveryAddressUpdate")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) contextValidateDestinationAddress(ctx context.Context, formats strfmt.Registry) error {
+
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) contextValidateDestinationType(ctx context.Context, formats strfmt.Registry) error {
+
+ if m.DestinationType != nil {
+
+ if swag.IsZero(m.DestinationType) { // not required
+ return nil
+ }
+
+ if err := m.DestinationType.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("destinationType")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("destinationType")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) contextValidateETag(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "eTag", "body", string(m.ETag)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) contextValidateID(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "id", "body", strfmt.UUID(m.ID)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) contextValidateMoveTaskOrderID(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "moveTaskOrderID", "body", strfmt.UUID(m.MoveTaskOrderID)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) contextValidatePickupAddress(ctx context.Context, formats strfmt.Registry) error {
+
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) contextValidatePpmShipment(ctx context.Context, formats strfmt.Registry) error {
+
+ if m.PpmShipment != nil {
+
+ if swag.IsZero(m.PpmShipment) { // not required
+ return nil
+ }
+
+ if err := m.PpmShipment.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("ppmShipment")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("ppmShipment")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) contextValidatePrimeEstimatedWeightRecordedDate(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "primeEstimatedWeightRecordedDate", "body", m.PrimeEstimatedWeightRecordedDate); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) contextValidateRequestedDeliveryDate(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "requestedDeliveryDate", "body", m.RequestedDeliveryDate); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) contextValidateRequestedPickupDate(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "requestedPickupDate", "body", m.RequestedPickupDate); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) contextValidateRequiredDeliveryDate(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "requiredDeliveryDate", "body", m.RequiredDeliveryDate); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) contextValidateReweigh(ctx context.Context, formats strfmt.Registry) error {
+
+ if m.Reweigh != nil {
+
+ if swag.IsZero(m.Reweigh) { // not required
+ return nil
+ }
+
+ if err := m.Reweigh.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("reweigh")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("reweigh")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) contextValidateSecondaryDeliveryAddress(ctx context.Context, formats strfmt.Registry) error {
+
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) contextValidateSecondaryPickupAddress(ctx context.Context, formats strfmt.Registry) error {
+
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) contextValidateShipmentType(ctx context.Context, formats strfmt.Registry) error {
+
+ if swag.IsZero(m.ShipmentType) { // not required
+ return nil
+ }
+
+ if err := m.ShipmentType.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("shipmentType")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("shipmentType")
+ }
+ return err
+ }
+
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) contextValidateSitExtensions(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := m.SitExtensions.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("sitExtensions")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("sitExtensions")
+ }
+ return err
+ }
+
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "status", "body", string(m.Status)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) contextValidateStorageFacility(ctx context.Context, formats strfmt.Registry) error {
+
+ if m.StorageFacility != nil {
+
+ if swag.IsZero(m.StorageFacility) { // not required
+ return nil
+ }
+
+ if err := m.StorageFacility.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("storageFacility")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("storageFacility")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *MTOShipmentWithoutServiceItems) contextValidateUpdatedAt(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "updatedAt", "body", strfmt.DateTime(m.UpdatedAt)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *MTOShipmentWithoutServiceItems) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *MTOShipmentWithoutServiceItems) UnmarshalBinary(b []byte) error {
+ var res MTOShipmentWithoutServiceItems
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/pkg/gen/internalmessages/m_t_o_shipments_without_service_objects.go b/pkg/gen/internalmessages/m_t_o_shipments_without_service_objects.go
new file mode 100644
index 00000000000..34d53a70165
--- /dev/null
+++ b/pkg/gen/internalmessages/m_t_o_shipments_without_service_objects.go
@@ -0,0 +1,78 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package internalmessages
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+ "strconv"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/swag"
+)
+
+// MTOShipmentsWithoutServiceObjects A list of shipments without their associated service items.
+//
+// swagger:model MTOShipmentsWithoutServiceObjects
+type MTOShipmentsWithoutServiceObjects []*MTOShipmentWithoutServiceItems
+
+// Validate validates this m t o shipments without service objects
+func (m MTOShipmentsWithoutServiceObjects) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+// ContextValidate validate this m t o shipments without service objects based on the context it is used
+func (m MTOShipmentsWithoutServiceObjects) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if m[i] != nil {
+
+ if swag.IsZero(m[i]) { // not required
+ return nil
+ }
+
+ if err := m[i].ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/pkg/gen/internalmessages/move_task_order.go b/pkg/gen/internalmessages/move_task_order.go
new file mode 100644
index 00000000000..e8fffeb0248
--- /dev/null
+++ b/pkg/gen/internalmessages/move_task_order.go
@@ -0,0 +1,842 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package internalmessages
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "bytes"
+ "context"
+ "encoding/json"
+ "io"
+ "strconv"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// MoveTaskOrder move task order
+//
+// swagger:model MoveTaskOrder
+type MoveTaskOrder struct {
+
+ // available to prime at
+ // Read Only: true
+ // Format: date-time
+ AvailableToPrimeAt *strfmt.DateTime `json:"availableToPrimeAt,omitempty"`
+
+ // created at
+ // Read Only: true
+ // Format: date-time
+ CreatedAt strfmt.DateTime `json:"createdAt,omitempty"`
+
+ // e tag
+ // Read Only: true
+ ETag string `json:"eTag,omitempty"`
+
+ // excess weight acknowledged at
+ // Read Only: true
+ // Format: date-time
+ ExcessWeightAcknowledgedAt *strfmt.DateTime `json:"excessWeightAcknowledgedAt"`
+
+ // excess weight qualified at
+ // Read Only: true
+ // Format: date-time
+ ExcessWeightQualifiedAt *strfmt.DateTime `json:"excessWeightQualifiedAt"`
+
+ // excess weight upload Id
+ // Read Only: true
+ // Format: uuid
+ ExcessWeightUploadID *strfmt.UUID `json:"excessWeightUploadId"`
+
+ // id
+ // Example: a502b4f1-b9c4-4faf-8bdd-68292501bf26
+ // Format: uuid
+ ID strfmt.UUID `json:"id,omitempty"`
+
+ // move code
+ // Example: HYXFJF
+ // Read Only: true
+ MoveCode string `json:"moveCode,omitempty"`
+
+ mtoServiceItemsField []MTOServiceItem
+
+ // mto shipments
+ // Required: true
+ MtoShipments MTOShipmentsWithoutServiceObjects `json:"mtoShipments"`
+
+ // order
+ Order *Order `json:"order,omitempty"`
+
+ // order ID
+ // Example: c56a4180-65aa-42ec-a945-5fd21dec0538
+ // Format: uuid
+ OrderID strfmt.UUID `json:"orderID,omitempty"`
+
+ // payment requests
+ // Required: true
+ PaymentRequests PaymentRequests `json:"paymentRequests"`
+
+ // ppm estimated weight
+ PpmEstimatedWeight int64 `json:"ppmEstimatedWeight,omitempty"`
+
+ // ppm type
+ // Enum: [PARTIAL FULL]
+ PpmType string `json:"ppmType,omitempty"`
+
+ // prime counseling completed at
+ // Read Only: true
+ // Format: date-time
+ PrimeCounselingCompletedAt *strfmt.DateTime `json:"primeCounselingCompletedAt,omitempty"`
+
+ // reference Id
+ // Example: 1001-3456
+ ReferenceID string `json:"referenceId,omitempty"`
+
+ // updated at
+ // Read Only: true
+ // Format: date-time
+ UpdatedAt strfmt.DateTime `json:"updatedAt,omitempty"`
+}
+
+// MtoServiceItems gets the mto service items of this base type
+func (m *MoveTaskOrder) MtoServiceItems() []MTOServiceItem {
+ return m.mtoServiceItemsField
+}
+
+// SetMtoServiceItems sets the mto service items of this base type
+func (m *MoveTaskOrder) SetMtoServiceItems(val []MTOServiceItem) {
+ m.mtoServiceItemsField = val
+}
+
+// UnmarshalJSON unmarshals this object with a polymorphic type from a JSON structure
+func (m *MoveTaskOrder) UnmarshalJSON(raw []byte) error {
+ var data struct {
+ AvailableToPrimeAt *strfmt.DateTime `json:"availableToPrimeAt,omitempty"`
+
+ CreatedAt strfmt.DateTime `json:"createdAt,omitempty"`
+
+ ETag string `json:"eTag,omitempty"`
+
+ ExcessWeightAcknowledgedAt *strfmt.DateTime `json:"excessWeightAcknowledgedAt"`
+
+ ExcessWeightQualifiedAt *strfmt.DateTime `json:"excessWeightQualifiedAt"`
+
+ ExcessWeightUploadID *strfmt.UUID `json:"excessWeightUploadId"`
+
+ ID strfmt.UUID `json:"id,omitempty"`
+
+ MoveCode string `json:"moveCode,omitempty"`
+
+ MtoServiceItems json.RawMessage `json:"mtoServiceItems"`
+
+ MtoShipments MTOShipmentsWithoutServiceObjects `json:"mtoShipments"`
+
+ Order *Order `json:"order,omitempty"`
+
+ OrderID strfmt.UUID `json:"orderID,omitempty"`
+
+ PaymentRequests PaymentRequests `json:"paymentRequests"`
+
+ PpmEstimatedWeight int64 `json:"ppmEstimatedWeight,omitempty"`
+
+ PpmType string `json:"ppmType,omitempty"`
+
+ PrimeCounselingCompletedAt *strfmt.DateTime `json:"primeCounselingCompletedAt,omitempty"`
+
+ ReferenceID string `json:"referenceId,omitempty"`
+
+ UpdatedAt strfmt.DateTime `json:"updatedAt,omitempty"`
+ }
+ buf := bytes.NewBuffer(raw)
+ dec := json.NewDecoder(buf)
+ dec.UseNumber()
+
+ if err := dec.Decode(&data); err != nil {
+ return err
+ }
+
+ propMtoServiceItems, err := UnmarshalMTOServiceItemSlice(bytes.NewBuffer(data.MtoServiceItems), runtime.JSONConsumer())
+ if err != nil && err != io.EOF {
+ return err
+ }
+
+ var result MoveTaskOrder
+
+ // availableToPrimeAt
+ result.AvailableToPrimeAt = data.AvailableToPrimeAt
+
+ // createdAt
+ result.CreatedAt = data.CreatedAt
+
+ // eTag
+ result.ETag = data.ETag
+
+ // excessWeightAcknowledgedAt
+ result.ExcessWeightAcknowledgedAt = data.ExcessWeightAcknowledgedAt
+
+ // excessWeightQualifiedAt
+ result.ExcessWeightQualifiedAt = data.ExcessWeightQualifiedAt
+
+ // excessWeightUploadId
+ result.ExcessWeightUploadID = data.ExcessWeightUploadID
+
+ // id
+ result.ID = data.ID
+
+ // moveCode
+ result.MoveCode = data.MoveCode
+
+ // mtoServiceItems
+ result.mtoServiceItemsField = propMtoServiceItems
+
+ // mtoShipments
+ result.MtoShipments = data.MtoShipments
+
+ // order
+ result.Order = data.Order
+
+ // orderID
+ result.OrderID = data.OrderID
+
+ // paymentRequests
+ result.PaymentRequests = data.PaymentRequests
+
+ // ppmEstimatedWeight
+ result.PpmEstimatedWeight = data.PpmEstimatedWeight
+
+ // ppmType
+ result.PpmType = data.PpmType
+
+ // primeCounselingCompletedAt
+ result.PrimeCounselingCompletedAt = data.PrimeCounselingCompletedAt
+
+ // referenceId
+ result.ReferenceID = data.ReferenceID
+
+ // updatedAt
+ result.UpdatedAt = data.UpdatedAt
+
+ *m = result
+
+ return nil
+}
+
+// MarshalJSON marshals this object with a polymorphic type to a JSON structure
+func (m MoveTaskOrder) MarshalJSON() ([]byte, error) {
+ var b1, b2, b3 []byte
+ var err error
+ b1, err = json.Marshal(struct {
+ AvailableToPrimeAt *strfmt.DateTime `json:"availableToPrimeAt,omitempty"`
+
+ CreatedAt strfmt.DateTime `json:"createdAt,omitempty"`
+
+ ETag string `json:"eTag,omitempty"`
+
+ ExcessWeightAcknowledgedAt *strfmt.DateTime `json:"excessWeightAcknowledgedAt"`
+
+ ExcessWeightQualifiedAt *strfmt.DateTime `json:"excessWeightQualifiedAt"`
+
+ ExcessWeightUploadID *strfmt.UUID `json:"excessWeightUploadId"`
+
+ ID strfmt.UUID `json:"id,omitempty"`
+
+ MoveCode string `json:"moveCode,omitempty"`
+
+ MtoShipments MTOShipmentsWithoutServiceObjects `json:"mtoShipments"`
+
+ Order *Order `json:"order,omitempty"`
+
+ OrderID strfmt.UUID `json:"orderID,omitempty"`
+
+ PaymentRequests PaymentRequests `json:"paymentRequests"`
+
+ PpmEstimatedWeight int64 `json:"ppmEstimatedWeight,omitempty"`
+
+ PpmType string `json:"ppmType,omitempty"`
+
+ PrimeCounselingCompletedAt *strfmt.DateTime `json:"primeCounselingCompletedAt,omitempty"`
+
+ ReferenceID string `json:"referenceId,omitempty"`
+
+ UpdatedAt strfmt.DateTime `json:"updatedAt,omitempty"`
+ }{
+
+ AvailableToPrimeAt: m.AvailableToPrimeAt,
+
+ CreatedAt: m.CreatedAt,
+
+ ETag: m.ETag,
+
+ ExcessWeightAcknowledgedAt: m.ExcessWeightAcknowledgedAt,
+
+ ExcessWeightQualifiedAt: m.ExcessWeightQualifiedAt,
+
+ ExcessWeightUploadID: m.ExcessWeightUploadID,
+
+ ID: m.ID,
+
+ MoveCode: m.MoveCode,
+
+ MtoShipments: m.MtoShipments,
+
+ Order: m.Order,
+
+ OrderID: m.OrderID,
+
+ PaymentRequests: m.PaymentRequests,
+
+ PpmEstimatedWeight: m.PpmEstimatedWeight,
+
+ PpmType: m.PpmType,
+
+ PrimeCounselingCompletedAt: m.PrimeCounselingCompletedAt,
+
+ ReferenceID: m.ReferenceID,
+
+ UpdatedAt: m.UpdatedAt,
+ })
+ if err != nil {
+ return nil, err
+ }
+ b2, err = json.Marshal(struct {
+ MtoServiceItems []MTOServiceItem `json:"mtoServiceItems"`
+ }{
+
+ MtoServiceItems: m.mtoServiceItemsField,
+ })
+ if err != nil {
+ return nil, err
+ }
+
+ return swag.ConcatJSON(b1, b2, b3), nil
+}
+
+// Validate validates this move task order
+func (m *MoveTaskOrder) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateAvailableToPrimeAt(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateCreatedAt(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateExcessWeightAcknowledgedAt(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateExcessWeightQualifiedAt(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateExcessWeightUploadID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateMtoServiceItems(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateMtoShipments(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateOrder(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateOrderID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validatePaymentRequests(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validatePpmType(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validatePrimeCounselingCompletedAt(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateUpdatedAt(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *MoveTaskOrder) validateAvailableToPrimeAt(formats strfmt.Registry) error {
+ if swag.IsZero(m.AvailableToPrimeAt) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("availableToPrimeAt", "body", "date-time", m.AvailableToPrimeAt.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MoveTaskOrder) validateCreatedAt(formats strfmt.Registry) error {
+ if swag.IsZero(m.CreatedAt) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("createdAt", "body", "date-time", m.CreatedAt.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MoveTaskOrder) validateExcessWeightAcknowledgedAt(formats strfmt.Registry) error {
+ if swag.IsZero(m.ExcessWeightAcknowledgedAt) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("excessWeightAcknowledgedAt", "body", "date-time", m.ExcessWeightAcknowledgedAt.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MoveTaskOrder) validateExcessWeightQualifiedAt(formats strfmt.Registry) error {
+ if swag.IsZero(m.ExcessWeightQualifiedAt) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("excessWeightQualifiedAt", "body", "date-time", m.ExcessWeightQualifiedAt.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MoveTaskOrder) validateExcessWeightUploadID(formats strfmt.Registry) error {
+ if swag.IsZero(m.ExcessWeightUploadID) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("excessWeightUploadId", "body", "uuid", m.ExcessWeightUploadID.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MoveTaskOrder) validateID(formats strfmt.Registry) error {
+ if swag.IsZero(m.ID) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("id", "body", "uuid", m.ID.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MoveTaskOrder) validateMtoServiceItems(formats strfmt.Registry) error {
+
+ if err := validate.Required("mtoServiceItems", "body", m.MtoServiceItems()); err != nil {
+ return err
+ }
+
+ for i := 0; i < len(m.MtoServiceItems()); i++ {
+
+ if err := m.mtoServiceItemsField[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("mtoServiceItems" + "." + strconv.Itoa(i))
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("mtoServiceItems" + "." + strconv.Itoa(i))
+ }
+ return err
+ }
+
+ }
+
+ return nil
+}
+
+func (m *MoveTaskOrder) validateMtoShipments(formats strfmt.Registry) error {
+
+ if err := validate.Required("mtoShipments", "body", m.MtoShipments); err != nil {
+ return err
+ }
+
+ if err := m.MtoShipments.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("mtoShipments")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("mtoShipments")
+ }
+ return err
+ }
+
+ return nil
+}
+
+func (m *MoveTaskOrder) validateOrder(formats strfmt.Registry) error {
+ if swag.IsZero(m.Order) { // not required
+ return nil
+ }
+
+ if m.Order != nil {
+ if err := m.Order.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("order")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("order")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *MoveTaskOrder) validateOrderID(formats strfmt.Registry) error {
+ if swag.IsZero(m.OrderID) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("orderID", "body", "uuid", m.OrderID.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MoveTaskOrder) validatePaymentRequests(formats strfmt.Registry) error {
+
+ if err := validate.Required("paymentRequests", "body", m.PaymentRequests); err != nil {
+ return err
+ }
+
+ if err := m.PaymentRequests.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("paymentRequests")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("paymentRequests")
+ }
+ return err
+ }
+
+ return nil
+}
+
+var moveTaskOrderTypePpmTypePropEnum []interface{}
+
+func init() {
+ var res []string
+ if err := json.Unmarshal([]byte(`["PARTIAL","FULL"]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ moveTaskOrderTypePpmTypePropEnum = append(moveTaskOrderTypePpmTypePropEnum, v)
+ }
+}
+
+const (
+
+ // MoveTaskOrderPpmTypePARTIAL captures enum value "PARTIAL"
+ MoveTaskOrderPpmTypePARTIAL string = "PARTIAL"
+
+ // MoveTaskOrderPpmTypeFULL captures enum value "FULL"
+ MoveTaskOrderPpmTypeFULL string = "FULL"
+)
+
+// prop value enum
+func (m *MoveTaskOrder) validatePpmTypeEnum(path, location string, value string) error {
+ if err := validate.EnumCase(path, location, value, moveTaskOrderTypePpmTypePropEnum, true); err != nil {
+ return err
+ }
+ return nil
+}
+
+func (m *MoveTaskOrder) validatePpmType(formats strfmt.Registry) error {
+ if swag.IsZero(m.PpmType) { // not required
+ return nil
+ }
+
+ // value enum
+ if err := m.validatePpmTypeEnum("ppmType", "body", m.PpmType); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MoveTaskOrder) validatePrimeCounselingCompletedAt(formats strfmt.Registry) error {
+ if swag.IsZero(m.PrimeCounselingCompletedAt) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("primeCounselingCompletedAt", "body", "date-time", m.PrimeCounselingCompletedAt.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MoveTaskOrder) validateUpdatedAt(formats strfmt.Registry) error {
+ if swag.IsZero(m.UpdatedAt) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("updatedAt", "body", "date-time", m.UpdatedAt.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// ContextValidate validate this move task order based on the context it is used
+func (m *MoveTaskOrder) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.contextValidateAvailableToPrimeAt(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateCreatedAt(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateETag(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateExcessWeightAcknowledgedAt(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateExcessWeightQualifiedAt(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateExcessWeightUploadID(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateMoveCode(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateMtoServiceItems(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateMtoShipments(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateOrder(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidatePaymentRequests(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidatePrimeCounselingCompletedAt(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateUpdatedAt(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *MoveTaskOrder) contextValidateAvailableToPrimeAt(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "availableToPrimeAt", "body", m.AvailableToPrimeAt); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MoveTaskOrder) contextValidateCreatedAt(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "createdAt", "body", strfmt.DateTime(m.CreatedAt)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MoveTaskOrder) contextValidateETag(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "eTag", "body", string(m.ETag)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MoveTaskOrder) contextValidateExcessWeightAcknowledgedAt(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "excessWeightAcknowledgedAt", "body", m.ExcessWeightAcknowledgedAt); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MoveTaskOrder) contextValidateExcessWeightQualifiedAt(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "excessWeightQualifiedAt", "body", m.ExcessWeightQualifiedAt); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MoveTaskOrder) contextValidateExcessWeightUploadID(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "excessWeightUploadId", "body", m.ExcessWeightUploadID); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MoveTaskOrder) contextValidateMoveCode(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "moveCode", "body", string(m.MoveCode)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MoveTaskOrder) contextValidateMtoServiceItems(ctx context.Context, formats strfmt.Registry) error {
+
+ for i := 0; i < len(m.MtoServiceItems()); i++ {
+
+ if swag.IsZero(m.mtoServiceItemsField[i]) { // not required
+ return nil
+ }
+
+ if err := m.mtoServiceItemsField[i].ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("mtoServiceItems" + "." + strconv.Itoa(i))
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("mtoServiceItems" + "." + strconv.Itoa(i))
+ }
+ return err
+ }
+
+ }
+
+ return nil
+}
+
+func (m *MoveTaskOrder) contextValidateMtoShipments(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := m.MtoShipments.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("mtoShipments")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("mtoShipments")
+ }
+ return err
+ }
+
+ return nil
+}
+
+func (m *MoveTaskOrder) contextValidateOrder(ctx context.Context, formats strfmt.Registry) error {
+
+ if m.Order != nil {
+
+ if swag.IsZero(m.Order) { // not required
+ return nil
+ }
+
+ if err := m.Order.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("order")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("order")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *MoveTaskOrder) contextValidatePaymentRequests(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := m.PaymentRequests.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("paymentRequests")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("paymentRequests")
+ }
+ return err
+ }
+
+ return nil
+}
+
+func (m *MoveTaskOrder) contextValidatePrimeCounselingCompletedAt(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "primeCounselingCompletedAt", "body", m.PrimeCounselingCompletedAt); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MoveTaskOrder) contextValidateUpdatedAt(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "updatedAt", "body", strfmt.DateTime(m.UpdatedAt)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *MoveTaskOrder) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *MoveTaskOrder) UnmarshalBinary(b []byte) error {
+ var res MoveTaskOrder
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/pkg/gen/internalmessages/moves_list.go b/pkg/gen/internalmessages/moves_list.go
new file mode 100644
index 00000000000..72a550defce
--- /dev/null
+++ b/pkg/gen/internalmessages/moves_list.go
@@ -0,0 +1,183 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package internalmessages
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+ "strconv"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/swag"
+)
+
+// MovesList moves list
+//
+// swagger:model MovesList
+type MovesList struct {
+
+ // current move
+ CurrentMove []*MoveTaskOrder `json:"currentMove"`
+
+ // previous moves
+ PreviousMoves []*MoveTaskOrder `json:"previousMoves"`
+}
+
+// Validate validates this moves list
+func (m *MovesList) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCurrentMove(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validatePreviousMoves(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *MovesList) validateCurrentMove(formats strfmt.Registry) error {
+ if swag.IsZero(m.CurrentMove) { // not required
+ return nil
+ }
+
+ for i := 0; i < len(m.CurrentMove); i++ {
+ if swag.IsZero(m.CurrentMove[i]) { // not required
+ continue
+ }
+
+ if m.CurrentMove[i] != nil {
+ if err := m.CurrentMove[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("currentMove" + "." + strconv.Itoa(i))
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("currentMove" + "." + strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ return nil
+}
+
+func (m *MovesList) validatePreviousMoves(formats strfmt.Registry) error {
+ if swag.IsZero(m.PreviousMoves) { // not required
+ return nil
+ }
+
+ for i := 0; i < len(m.PreviousMoves); i++ {
+ if swag.IsZero(m.PreviousMoves[i]) { // not required
+ continue
+ }
+
+ if m.PreviousMoves[i] != nil {
+ if err := m.PreviousMoves[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("previousMoves" + "." + strconv.Itoa(i))
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("previousMoves" + "." + strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ return nil
+}
+
+// ContextValidate validate this moves list based on the context it is used
+func (m *MovesList) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.contextValidateCurrentMove(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidatePreviousMoves(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *MovesList) contextValidateCurrentMove(ctx context.Context, formats strfmt.Registry) error {
+
+ for i := 0; i < len(m.CurrentMove); i++ {
+
+ if m.CurrentMove[i] != nil {
+
+ if swag.IsZero(m.CurrentMove[i]) { // not required
+ return nil
+ }
+
+ if err := m.CurrentMove[i].ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("currentMove" + "." + strconv.Itoa(i))
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("currentMove" + "." + strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ return nil
+}
+
+func (m *MovesList) contextValidatePreviousMoves(ctx context.Context, formats strfmt.Registry) error {
+
+ for i := 0; i < len(m.PreviousMoves); i++ {
+
+ if m.PreviousMoves[i] != nil {
+
+ if swag.IsZero(m.PreviousMoves[i]) { // not required
+ return nil
+ }
+
+ if err := m.PreviousMoves[i].ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("previousMoves" + "." + strconv.Itoa(i))
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("previousMoves" + "." + strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *MovesList) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *MovesList) UnmarshalBinary(b []byte) error {
+ var res MovesList
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/pkg/gen/internalmessages/order.go b/pkg/gen/internalmessages/order.go
new file mode 100644
index 00000000000..1c7f48bf30d
--- /dev/null
+++ b/pkg/gen/internalmessages/order.go
@@ -0,0 +1,444 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package internalmessages
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// Order order
+//
+// swagger:model Order
+type Order struct {
+
+ // customer
+ Customer *Customer `json:"customer,omitempty"`
+
+ // customer ID
+ // Example: c56a4180-65aa-42ec-a945-5fd21dec0538
+ // Format: uuid
+ CustomerID strfmt.UUID `json:"customerID,omitempty"`
+
+ // destination duty location
+ DestinationDutyLocation *DutyLocation `json:"destinationDutyLocation,omitempty"`
+
+ // e tag
+ // Read Only: true
+ ETag string `json:"eTag,omitempty"`
+
+ // entitlement
+ Entitlement *Entitlements `json:"entitlement,omitempty"`
+
+ // id
+ // Example: c56a4180-65aa-42ec-a945-5fd21dec0538
+ // Format: uuid
+ ID strfmt.UUID `json:"id,omitempty"`
+
+ // lines of accounting
+ // Required: true
+ LinesOfAccounting *string `json:"linesOfAccounting"`
+
+ // order number
+ // Required: true
+ OrderNumber *string `json:"orderNumber"`
+
+ // orders type
+ OrdersType OrdersType `json:"ordersType,omitempty"`
+
+ // origin duty location
+ OriginDutyLocation *DutyLocation `json:"originDutyLocation,omitempty"`
+
+ // origin duty location g b l o c
+ // Example: KKFA
+ OriginDutyLocationGBLOC string `json:"originDutyLocationGBLOC,omitempty"`
+
+ // rank
+ // Example: E_5
+ // Required: true
+ Rank *string `json:"rank"`
+
+ // report by date
+ // Format: date
+ ReportByDate strfmt.Date `json:"reportByDate,omitempty"`
+}
+
+// Validate validates this order
+func (m *Order) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCustomer(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateCustomerID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateDestinationDutyLocation(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateEntitlement(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateLinesOfAccounting(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateOrderNumber(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateOrdersType(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateOriginDutyLocation(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateRank(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateReportByDate(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *Order) validateCustomer(formats strfmt.Registry) error {
+ if swag.IsZero(m.Customer) { // not required
+ return nil
+ }
+
+ if m.Customer != nil {
+ if err := m.Customer.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("customer")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("customer")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Order) validateCustomerID(formats strfmt.Registry) error {
+ if swag.IsZero(m.CustomerID) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("customerID", "body", "uuid", m.CustomerID.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Order) validateDestinationDutyLocation(formats strfmt.Registry) error {
+ if swag.IsZero(m.DestinationDutyLocation) { // not required
+ return nil
+ }
+
+ if m.DestinationDutyLocation != nil {
+ if err := m.DestinationDutyLocation.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("destinationDutyLocation")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("destinationDutyLocation")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Order) validateEntitlement(formats strfmt.Registry) error {
+ if swag.IsZero(m.Entitlement) { // not required
+ return nil
+ }
+
+ if m.Entitlement != nil {
+ if err := m.Entitlement.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("entitlement")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("entitlement")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Order) validateID(formats strfmt.Registry) error {
+ if swag.IsZero(m.ID) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("id", "body", "uuid", m.ID.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Order) validateLinesOfAccounting(formats strfmt.Registry) error {
+
+ if err := validate.Required("linesOfAccounting", "body", m.LinesOfAccounting); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Order) validateOrderNumber(formats strfmt.Registry) error {
+
+ if err := validate.Required("orderNumber", "body", m.OrderNumber); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Order) validateOrdersType(formats strfmt.Registry) error {
+ if swag.IsZero(m.OrdersType) { // not required
+ return nil
+ }
+
+ if err := m.OrdersType.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("ordersType")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("ordersType")
+ }
+ return err
+ }
+
+ return nil
+}
+
+func (m *Order) validateOriginDutyLocation(formats strfmt.Registry) error {
+ if swag.IsZero(m.OriginDutyLocation) { // not required
+ return nil
+ }
+
+ if m.OriginDutyLocation != nil {
+ if err := m.OriginDutyLocation.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("originDutyLocation")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("originDutyLocation")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Order) validateRank(formats strfmt.Registry) error {
+
+ if err := validate.Required("rank", "body", m.Rank); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Order) validateReportByDate(formats strfmt.Registry) error {
+ if swag.IsZero(m.ReportByDate) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("reportByDate", "body", "date", m.ReportByDate.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// ContextValidate validate this order based on the context it is used
+func (m *Order) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.contextValidateCustomer(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateDestinationDutyLocation(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateETag(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateEntitlement(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateOrdersType(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateOriginDutyLocation(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *Order) contextValidateCustomer(ctx context.Context, formats strfmt.Registry) error {
+
+ if m.Customer != nil {
+
+ if swag.IsZero(m.Customer) { // not required
+ return nil
+ }
+
+ if err := m.Customer.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("customer")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("customer")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Order) contextValidateDestinationDutyLocation(ctx context.Context, formats strfmt.Registry) error {
+
+ if m.DestinationDutyLocation != nil {
+
+ if swag.IsZero(m.DestinationDutyLocation) { // not required
+ return nil
+ }
+
+ if err := m.DestinationDutyLocation.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("destinationDutyLocation")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("destinationDutyLocation")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Order) contextValidateETag(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "eTag", "body", string(m.ETag)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Order) contextValidateEntitlement(ctx context.Context, formats strfmt.Registry) error {
+
+ if m.Entitlement != nil {
+
+ if swag.IsZero(m.Entitlement) { // not required
+ return nil
+ }
+
+ if err := m.Entitlement.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("entitlement")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("entitlement")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Order) contextValidateOrdersType(ctx context.Context, formats strfmt.Registry) error {
+
+ if swag.IsZero(m.OrdersType) { // not required
+ return nil
+ }
+
+ if err := m.OrdersType.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("ordersType")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("ordersType")
+ }
+ return err
+ }
+
+ return nil
+}
+
+func (m *Order) contextValidateOriginDutyLocation(ctx context.Context, formats strfmt.Registry) error {
+
+ if m.OriginDutyLocation != nil {
+
+ if swag.IsZero(m.OriginDutyLocation) { // not required
+ return nil
+ }
+
+ if err := m.OriginDutyLocation.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("originDutyLocation")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("originDutyLocation")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *Order) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *Order) UnmarshalBinary(b []byte) error {
+ var res Order
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/pkg/gen/internalmessages/p_p_m_shipment2.go b/pkg/gen/internalmessages/p_p_m_shipment2.go
new file mode 100644
index 00000000000..1dddd27965c
--- /dev/null
+++ b/pkg/gen/internalmessages/p_p_m_shipment2.go
@@ -0,0 +1,670 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package internalmessages
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// PPMShipment2 A personally procured move is a type of shipment that a service member moves themselves.
+//
+// swagger:model PPMShipment-2
+type PPMShipment2 struct {
+
+ // ZIP
+ //
+ // The actual postal code where the PPM shipment ended. To be filled once the customer has moved the shipment.
+ //
+ // Example: 90210
+ // Pattern: ^(\d{5})$
+ ActualDestinationPostalCode *string `json:"actualDestinationPostalCode"`
+
+ // The actual start date of when the PPM shipment left the origin.
+ // Format: date
+ ActualMoveDate *strfmt.Date `json:"actualMoveDate"`
+
+ // ZIP
+ //
+ // The actual postal code where the PPM shipment started. To be filled once the customer has moved the shipment.
+ //
+ // Example: 90210
+ // Pattern: ^(\d{5})$
+ ActualPickupPostalCode *string `json:"actualPickupPostalCode"`
+
+ // The amount received for an advance, or null if no advance is received.
+ //
+ AdvanceAmountReceived *int64 `json:"advanceAmountReceived"`
+
+ // The amount requested as an advance by the service member, up to a maximum percentage of the estimated incentive.
+ //
+ AdvanceAmountRequested *int64 `json:"advanceAmountRequested"`
+
+ // The timestamp of when the shipment was approved and the service member can begin their move.
+ // Format: date-time
+ ApprovedAt *strfmt.DateTime `json:"approvedAt"`
+
+ // The timestamp of when the PPM shipment was created (UTC)
+ // Required: true
+ // Read Only: true
+ // Format: date-time
+ CreatedAt strfmt.DateTime `json:"createdAt"`
+
+ // The postal code of the destination location where goods are being delivered to.
+ // Example: 90210
+ // Required: true
+ // Pattern: ^(\d{5})$
+ DestinationPostalCode *string `json:"destinationPostalCode"`
+
+ // A hash unique to this shipment that should be used as the "If-Match" header for any updates.
+ // Required: true
+ // Read Only: true
+ ETag string `json:"eTag"`
+
+ // The estimated amount the government will pay the service member to move their belongings based on the moving date, locations, and shipment weight.
+ EstimatedIncentive *int64 `json:"estimatedIncentive"`
+
+ // The estimated weight of the PPM shipment goods being moved in pounds.
+ // Example: 4200
+ EstimatedWeight *int64 `json:"estimatedWeight"`
+
+ // Date the customer expects to begin moving from their origin.
+ //
+ // Required: true
+ // Format: date
+ ExpectedDepartureDate *strfmt.Date `json:"expectedDepartureDate"`
+
+ // Indicates whether PPM shipment has pro gear for themselves or their spouse.
+ //
+ HasProGear *bool `json:"hasProGear"`
+
+ // Indicates whether an advance was received for the PPM shipment.
+ //
+ HasReceivedAdvance *bool `json:"hasReceivedAdvance"`
+
+ // Indicates whether an advance has been requested for the PPM shipment.
+ //
+ HasRequestedAdvance *bool `json:"hasRequestedAdvance"`
+
+ // The primary unique identifier of this PPM shipment
+ // Example: 1f2270c7-7166-40ae-981e-b200ebdf3054
+ // Required: true
+ // Read Only: true
+ // Format: uuid
+ ID strfmt.UUID `json:"id"`
+
+ // ZIP
+ //
+ // The postal code of the origin location where goods are being moved from.
+ // Example: 90210
+ // Required: true
+ // Pattern: ^(\d{5})$
+ PickupPostalCode *string `json:"pickupPostalCode"`
+
+ // The estimated weight of the pro-gear being moved belonging to the service member in pounds.
+ ProGearWeight *int64 `json:"proGearWeight"`
+
+ // The timestamp of when the Service Counselor has reviewed all of the closeout documents.
+ // Format: date-time
+ ReviewedAt *strfmt.DateTime `json:"reviewedAt"`
+
+ // An optional secondary location near the destination where goods will be dropped off.
+ // Example: 90210
+ // Pattern: ^(\d{5})$
+ SecondaryDestinationPostalCode *string `json:"secondaryDestinationPostalCode"`
+
+ // An optional secondary pickup location near the origin where additional goods exist.
+ // Example: 90210
+ // Pattern: ^(\d{5})$
+ SecondaryPickupPostalCode *string `json:"secondaryPickupPostalCode"`
+
+ // The id of the parent MTOShipment record
+ // Example: 1f2270c7-7166-40ae-981e-b200ebdf3054
+ // Required: true
+ // Read Only: true
+ // Format: uuid
+ ShipmentID strfmt.UUID `json:"shipmentId"`
+
+ // The estimated amount that the government will pay the service member to put their goods into storage. This estimated storage cost is separate from the estimated incentive.
+ SitEstimatedCost *int64 `json:"sitEstimatedCost"`
+
+ // The date that goods will exit the storage location.
+ // Format: date
+ SitEstimatedDepartureDate *strfmt.Date `json:"sitEstimatedDepartureDate"`
+
+ // The date that goods will first enter the storage location.
+ // Format: date
+ SitEstimatedEntryDate *strfmt.Date `json:"sitEstimatedEntryDate"`
+
+ // The estimated weight of the goods being put into storage in pounds.
+ // Example: 2000
+ SitEstimatedWeight *int64 `json:"sitEstimatedWeight"`
+
+ // Captures whether some or all of the PPM shipment will require temporary storage at the origin or destination.
+ //
+ // Must be set to `true` when providing `sitLocation`, `sitEstimatedWeight`, `sitEstimatedEntryDate`, and `sitEstimatedDepartureDate` values to calculate the `sitEstimatedCost`.
+ //
+ // Required: true
+ SitExpected *bool `json:"sitExpected"`
+
+ // sit location
+ SitLocation *SITLocationType `json:"sitLocation,omitempty"`
+
+ // The estimated weight of the pro-gear being moved belonging to a spouse in pounds.
+ SpouseProGearWeight *int64 `json:"spouseProGearWeight"`
+
+ // status
+ // Required: true
+ Status PPMShipmentStatus `json:"status"`
+
+ // The timestamp of when the customer submitted their PPM documentation to the counselor for review.
+ // Format: date-time
+ SubmittedAt *strfmt.DateTime `json:"submittedAt"`
+
+ // The timestamp of when a property of this object was last updated (UTC)
+ // Read Only: true
+ // Format: date-time
+ UpdatedAt strfmt.DateTime `json:"updatedAt,omitempty"`
+}
+
+// Validate validates this p p m shipment 2
+func (m *PPMShipment2) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateActualDestinationPostalCode(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateActualMoveDate(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateActualPickupPostalCode(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateApprovedAt(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateCreatedAt(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateDestinationPostalCode(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateETag(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateExpectedDepartureDate(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validatePickupPostalCode(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateReviewedAt(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateSecondaryDestinationPostalCode(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateSecondaryPickupPostalCode(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateShipmentID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateSitEstimatedDepartureDate(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateSitEstimatedEntryDate(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateSitExpected(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateSitLocation(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateStatus(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateSubmittedAt(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateUpdatedAt(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *PPMShipment2) validateActualDestinationPostalCode(formats strfmt.Registry) error {
+ if swag.IsZero(m.ActualDestinationPostalCode) { // not required
+ return nil
+ }
+
+ if err := validate.Pattern("actualDestinationPostalCode", "body", *m.ActualDestinationPostalCode, `^(\d{5})$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *PPMShipment2) validateActualMoveDate(formats strfmt.Registry) error {
+ if swag.IsZero(m.ActualMoveDate) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("actualMoveDate", "body", "date", m.ActualMoveDate.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *PPMShipment2) validateActualPickupPostalCode(formats strfmt.Registry) error {
+ if swag.IsZero(m.ActualPickupPostalCode) { // not required
+ return nil
+ }
+
+ if err := validate.Pattern("actualPickupPostalCode", "body", *m.ActualPickupPostalCode, `^(\d{5})$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *PPMShipment2) validateApprovedAt(formats strfmt.Registry) error {
+ if swag.IsZero(m.ApprovedAt) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("approvedAt", "body", "date-time", m.ApprovedAt.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *PPMShipment2) validateCreatedAt(formats strfmt.Registry) error {
+
+ if err := validate.Required("createdAt", "body", strfmt.DateTime(m.CreatedAt)); err != nil {
+ return err
+ }
+
+ if err := validate.FormatOf("createdAt", "body", "date-time", m.CreatedAt.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *PPMShipment2) validateDestinationPostalCode(formats strfmt.Registry) error {
+
+ if err := validate.Required("destinationPostalCode", "body", m.DestinationPostalCode); err != nil {
+ return err
+ }
+
+ if err := validate.Pattern("destinationPostalCode", "body", *m.DestinationPostalCode, `^(\d{5})$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *PPMShipment2) validateETag(formats strfmt.Registry) error {
+
+ if err := validate.RequiredString("eTag", "body", m.ETag); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *PPMShipment2) validateExpectedDepartureDate(formats strfmt.Registry) error {
+
+ if err := validate.Required("expectedDepartureDate", "body", m.ExpectedDepartureDate); err != nil {
+ return err
+ }
+
+ if err := validate.FormatOf("expectedDepartureDate", "body", "date", m.ExpectedDepartureDate.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *PPMShipment2) validateID(formats strfmt.Registry) error {
+
+ if err := validate.Required("id", "body", strfmt.UUID(m.ID)); err != nil {
+ return err
+ }
+
+ if err := validate.FormatOf("id", "body", "uuid", m.ID.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *PPMShipment2) validatePickupPostalCode(formats strfmt.Registry) error {
+
+ if err := validate.Required("pickupPostalCode", "body", m.PickupPostalCode); err != nil {
+ return err
+ }
+
+ if err := validate.Pattern("pickupPostalCode", "body", *m.PickupPostalCode, `^(\d{5})$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *PPMShipment2) validateReviewedAt(formats strfmt.Registry) error {
+ if swag.IsZero(m.ReviewedAt) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("reviewedAt", "body", "date-time", m.ReviewedAt.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *PPMShipment2) validateSecondaryDestinationPostalCode(formats strfmt.Registry) error {
+ if swag.IsZero(m.SecondaryDestinationPostalCode) { // not required
+ return nil
+ }
+
+ if err := validate.Pattern("secondaryDestinationPostalCode", "body", *m.SecondaryDestinationPostalCode, `^(\d{5})$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *PPMShipment2) validateSecondaryPickupPostalCode(formats strfmt.Registry) error {
+ if swag.IsZero(m.SecondaryPickupPostalCode) { // not required
+ return nil
+ }
+
+ if err := validate.Pattern("secondaryPickupPostalCode", "body", *m.SecondaryPickupPostalCode, `^(\d{5})$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *PPMShipment2) validateShipmentID(formats strfmt.Registry) error {
+
+ if err := validate.Required("shipmentId", "body", strfmt.UUID(m.ShipmentID)); err != nil {
+ return err
+ }
+
+ if err := validate.FormatOf("shipmentId", "body", "uuid", m.ShipmentID.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *PPMShipment2) validateSitEstimatedDepartureDate(formats strfmt.Registry) error {
+ if swag.IsZero(m.SitEstimatedDepartureDate) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("sitEstimatedDepartureDate", "body", "date", m.SitEstimatedDepartureDate.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *PPMShipment2) validateSitEstimatedEntryDate(formats strfmt.Registry) error {
+ if swag.IsZero(m.SitEstimatedEntryDate) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("sitEstimatedEntryDate", "body", "date", m.SitEstimatedEntryDate.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *PPMShipment2) validateSitExpected(formats strfmt.Registry) error {
+
+ if err := validate.Required("sitExpected", "body", m.SitExpected); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *PPMShipment2) validateSitLocation(formats strfmt.Registry) error {
+ if swag.IsZero(m.SitLocation) { // not required
+ return nil
+ }
+
+ if m.SitLocation != nil {
+ if err := m.SitLocation.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("sitLocation")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("sitLocation")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *PPMShipment2) validateStatus(formats strfmt.Registry) error {
+
+ if err := validate.Required("status", "body", PPMShipmentStatus(m.Status)); err != nil {
+ return err
+ }
+
+ if err := m.Status.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("status")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("status")
+ }
+ return err
+ }
+
+ return nil
+}
+
+func (m *PPMShipment2) validateSubmittedAt(formats strfmt.Registry) error {
+ if swag.IsZero(m.SubmittedAt) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("submittedAt", "body", "date-time", m.SubmittedAt.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *PPMShipment2) validateUpdatedAt(formats strfmt.Registry) error {
+ if swag.IsZero(m.UpdatedAt) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("updatedAt", "body", "date-time", m.UpdatedAt.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// ContextValidate validate this p p m shipment 2 based on the context it is used
+func (m *PPMShipment2) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.contextValidateCreatedAt(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateETag(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateID(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateShipmentID(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateSitLocation(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateStatus(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateUpdatedAt(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *PPMShipment2) contextValidateCreatedAt(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "createdAt", "body", strfmt.DateTime(m.CreatedAt)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *PPMShipment2) contextValidateETag(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "eTag", "body", string(m.ETag)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *PPMShipment2) contextValidateID(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "id", "body", strfmt.UUID(m.ID)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *PPMShipment2) contextValidateShipmentID(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "shipmentId", "body", strfmt.UUID(m.ShipmentID)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *PPMShipment2) contextValidateSitLocation(ctx context.Context, formats strfmt.Registry) error {
+
+ if m.SitLocation != nil {
+
+ if swag.IsZero(m.SitLocation) { // not required
+ return nil
+ }
+
+ if err := m.SitLocation.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("sitLocation")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("sitLocation")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *PPMShipment2) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := m.Status.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("status")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("status")
+ }
+ return err
+ }
+
+ return nil
+}
+
+func (m *PPMShipment2) contextValidateUpdatedAt(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "updatedAt", "body", strfmt.DateTime(m.UpdatedAt)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *PPMShipment2) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *PPMShipment2) UnmarshalBinary(b []byte) error {
+ var res PPMShipment2
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/pkg/gen/internalmessages/payment_request.go b/pkg/gen/internalmessages/payment_request.go
new file mode 100644
index 00000000000..7cad12596c1
--- /dev/null
+++ b/pkg/gen/internalmessages/payment_request.go
@@ -0,0 +1,322 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package internalmessages
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// PaymentRequest payment request
+//
+// swagger:model PaymentRequest
+type PaymentRequest struct {
+
+ // e tag
+ // Read Only: true
+ ETag string `json:"eTag,omitempty"`
+
+ // id
+ // Example: c56a4180-65aa-42ec-a945-5fd21dec0538
+ // Read Only: true
+ // Format: uuid
+ ID strfmt.UUID `json:"id,omitempty"`
+
+ // is final
+ IsFinal *bool `json:"isFinal,omitempty"`
+
+ // move task order ID
+ // Example: c56a4180-65aa-42ec-a945-5fd21dec0538
+ // Format: uuid
+ MoveTaskOrderID strfmt.UUID `json:"moveTaskOrderID,omitempty"`
+
+ // payment request number
+ // Example: 1234-5678-1
+ // Read Only: true
+ PaymentRequestNumber string `json:"paymentRequestNumber,omitempty"`
+
+ // payment service items
+ PaymentServiceItems PaymentServiceItems `json:"paymentServiceItems,omitempty"`
+
+ // proof of service docs
+ ProofOfServiceDocs ProofOfServiceDocs `json:"proofOfServiceDocs,omitempty"`
+
+ // recalculation of payment request ID
+ // Example: c56a4180-65aa-42ec-a945-5fd21dec0538
+ // Read Only: true
+ // Format: uuid
+ RecalculationOfPaymentRequestID *strfmt.UUID `json:"recalculationOfPaymentRequestID,omitempty"`
+
+ // rejection reason
+ // Example: documentation was incomplete
+ RejectionReason *string `json:"rejectionReason,omitempty"`
+
+ // status
+ Status PaymentRequestStatus `json:"status,omitempty"`
+}
+
+// Validate validates this payment request
+func (m *PaymentRequest) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateMoveTaskOrderID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validatePaymentServiceItems(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateProofOfServiceDocs(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateRecalculationOfPaymentRequestID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateStatus(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *PaymentRequest) validateID(formats strfmt.Registry) error {
+ if swag.IsZero(m.ID) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("id", "body", "uuid", m.ID.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *PaymentRequest) validateMoveTaskOrderID(formats strfmt.Registry) error {
+ if swag.IsZero(m.MoveTaskOrderID) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("moveTaskOrderID", "body", "uuid", m.MoveTaskOrderID.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *PaymentRequest) validatePaymentServiceItems(formats strfmt.Registry) error {
+ if swag.IsZero(m.PaymentServiceItems) { // not required
+ return nil
+ }
+
+ if err := m.PaymentServiceItems.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("paymentServiceItems")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("paymentServiceItems")
+ }
+ return err
+ }
+
+ return nil
+}
+
+func (m *PaymentRequest) validateProofOfServiceDocs(formats strfmt.Registry) error {
+ if swag.IsZero(m.ProofOfServiceDocs) { // not required
+ return nil
+ }
+
+ if err := m.ProofOfServiceDocs.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("proofOfServiceDocs")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("proofOfServiceDocs")
+ }
+ return err
+ }
+
+ return nil
+}
+
+func (m *PaymentRequest) validateRecalculationOfPaymentRequestID(formats strfmt.Registry) error {
+ if swag.IsZero(m.RecalculationOfPaymentRequestID) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("recalculationOfPaymentRequestID", "body", "uuid", m.RecalculationOfPaymentRequestID.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *PaymentRequest) validateStatus(formats strfmt.Registry) error {
+ if swag.IsZero(m.Status) { // not required
+ return nil
+ }
+
+ if err := m.Status.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("status")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("status")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// ContextValidate validate this payment request based on the context it is used
+func (m *PaymentRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.contextValidateETag(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateID(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidatePaymentRequestNumber(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidatePaymentServiceItems(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateProofOfServiceDocs(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateRecalculationOfPaymentRequestID(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateStatus(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *PaymentRequest) contextValidateETag(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "eTag", "body", string(m.ETag)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *PaymentRequest) contextValidateID(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "id", "body", strfmt.UUID(m.ID)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *PaymentRequest) contextValidatePaymentRequestNumber(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "paymentRequestNumber", "body", string(m.PaymentRequestNumber)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *PaymentRequest) contextValidatePaymentServiceItems(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := m.PaymentServiceItems.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("paymentServiceItems")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("paymentServiceItems")
+ }
+ return err
+ }
+
+ return nil
+}
+
+func (m *PaymentRequest) contextValidateProofOfServiceDocs(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := m.ProofOfServiceDocs.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("proofOfServiceDocs")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("proofOfServiceDocs")
+ }
+ return err
+ }
+
+ return nil
+}
+
+func (m *PaymentRequest) contextValidateRecalculationOfPaymentRequestID(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "recalculationOfPaymentRequestID", "body", m.RecalculationOfPaymentRequestID); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *PaymentRequest) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Status) { // not required
+ return nil
+ }
+
+ if err := m.Status.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("status")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("status")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *PaymentRequest) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *PaymentRequest) UnmarshalBinary(b []byte) error {
+ var res PaymentRequest
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/pkg/gen/internalmessages/payment_request_status.go b/pkg/gen/internalmessages/payment_request_status.go
new file mode 100644
index 00000000000..e5729df0738
--- /dev/null
+++ b/pkg/gen/internalmessages/payment_request_status.go
@@ -0,0 +1,96 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package internalmessages
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+ "encoding/json"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/validate"
+)
+
+// PaymentRequestStatus Payment Request Status
+//
+// swagger:model PaymentRequestStatus
+type PaymentRequestStatus string
+
+func NewPaymentRequestStatus(value PaymentRequestStatus) *PaymentRequestStatus {
+ return &value
+}
+
+// Pointer returns a pointer to a freshly-allocated PaymentRequestStatus.
+func (m PaymentRequestStatus) Pointer() *PaymentRequestStatus {
+ return &m
+}
+
+const (
+
+ // PaymentRequestStatusPENDING captures enum value "PENDING"
+ PaymentRequestStatusPENDING PaymentRequestStatus = "PENDING"
+
+ // PaymentRequestStatusREVIEWED captures enum value "REVIEWED"
+ PaymentRequestStatusREVIEWED PaymentRequestStatus = "REVIEWED"
+
+ // PaymentRequestStatusREVIEWEDANDALLSERVICEITEMSREJECTED captures enum value "REVIEWED_AND_ALL_SERVICE_ITEMS_REJECTED"
+ PaymentRequestStatusREVIEWEDANDALLSERVICEITEMSREJECTED PaymentRequestStatus = "REVIEWED_AND_ALL_SERVICE_ITEMS_REJECTED"
+
+ // PaymentRequestStatusSENTTOGEX captures enum value "SENT_TO_GEX"
+ PaymentRequestStatusSENTTOGEX PaymentRequestStatus = "SENT_TO_GEX"
+
+ // PaymentRequestStatusRECEIVEDBYGEX captures enum value "RECEIVED_BY_GEX"
+ PaymentRequestStatusRECEIVEDBYGEX PaymentRequestStatus = "RECEIVED_BY_GEX"
+
+ // PaymentRequestStatusPAID captures enum value "PAID"
+ PaymentRequestStatusPAID PaymentRequestStatus = "PAID"
+
+ // PaymentRequestStatusEDIERROR captures enum value "EDI_ERROR"
+ PaymentRequestStatusEDIERROR PaymentRequestStatus = "EDI_ERROR"
+
+ // PaymentRequestStatusDEPRECATED captures enum value "DEPRECATED"
+ PaymentRequestStatusDEPRECATED PaymentRequestStatus = "DEPRECATED"
+)
+
+// for schema
+var paymentRequestStatusEnum []interface{}
+
+func init() {
+ var res []PaymentRequestStatus
+ if err := json.Unmarshal([]byte(`["PENDING","REVIEWED","REVIEWED_AND_ALL_SERVICE_ITEMS_REJECTED","SENT_TO_GEX","RECEIVED_BY_GEX","PAID","EDI_ERROR","DEPRECATED"]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ paymentRequestStatusEnum = append(paymentRequestStatusEnum, v)
+ }
+}
+
+func (m PaymentRequestStatus) validatePaymentRequestStatusEnum(path, location string, value PaymentRequestStatus) error {
+ if err := validate.EnumCase(path, location, value, paymentRequestStatusEnum, true); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Validate validates this payment request status
+func (m PaymentRequestStatus) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ // value enum
+ if err := m.validatePaymentRequestStatusEnum("", "body", m); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+// ContextValidate validates this payment request status based on context it is used
+func (m PaymentRequestStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ return nil
+}
diff --git a/pkg/gen/internalmessages/payment_requests.go b/pkg/gen/internalmessages/payment_requests.go
new file mode 100644
index 00000000000..e7da06c306b
--- /dev/null
+++ b/pkg/gen/internalmessages/payment_requests.go
@@ -0,0 +1,78 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package internalmessages
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+ "strconv"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/swag"
+)
+
+// PaymentRequests payment requests
+//
+// swagger:model PaymentRequests
+type PaymentRequests []*PaymentRequest
+
+// Validate validates this payment requests
+func (m PaymentRequests) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+// ContextValidate validate this payment requests based on the context it is used
+func (m PaymentRequests) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if m[i] != nil {
+
+ if swag.IsZero(m[i]) { // not required
+ return nil
+ }
+
+ if err := m[i].ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/pkg/gen/internalmessages/payment_service_item.go b/pkg/gen/internalmessages/payment_service_item.go
new file mode 100644
index 00000000000..b86789b8f8e
--- /dev/null
+++ b/pkg/gen/internalmessages/payment_service_item.go
@@ -0,0 +1,266 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package internalmessages
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// PaymentServiceItem payment service item
+//
+// swagger:model PaymentServiceItem
+type PaymentServiceItem struct {
+
+ // e tag
+ // Read Only: true
+ ETag string `json:"eTag,omitempty"`
+
+ // id
+ // Example: c56a4180-65aa-42ec-a945-5fd21dec0538
+ // Read Only: true
+ // Format: uuid
+ ID strfmt.UUID `json:"id,omitempty"`
+
+ // mto service item ID
+ // Example: c56a4180-65aa-42ec-a945-5fd21dec0538
+ // Format: uuid
+ MtoServiceItemID strfmt.UUID `json:"mtoServiceItemID,omitempty"`
+
+ // payment request ID
+ // Example: c56a4180-65aa-42ec-a945-5fd21dec0538
+ // Format: uuid
+ PaymentRequestID strfmt.UUID `json:"paymentRequestID,omitempty"`
+
+ // payment service item params
+ PaymentServiceItemParams PaymentServiceItemParams `json:"paymentServiceItemParams,omitempty"`
+
+ // Price of the service item in cents
+ PriceCents *int64 `json:"priceCents,omitempty"`
+
+ // reference ID
+ // Example: 1234-5678-c56a4180
+ // Read Only: true
+ ReferenceID string `json:"referenceID,omitempty"`
+
+ // rejection reason
+ // Example: documentation was incomplete
+ RejectionReason *string `json:"rejectionReason,omitempty"`
+
+ // status
+ Status PaymentServiceItemStatus `json:"status,omitempty"`
+}
+
+// Validate validates this payment service item
+func (m *PaymentServiceItem) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateMtoServiceItemID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validatePaymentRequestID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validatePaymentServiceItemParams(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateStatus(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *PaymentServiceItem) validateID(formats strfmt.Registry) error {
+ if swag.IsZero(m.ID) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("id", "body", "uuid", m.ID.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *PaymentServiceItem) validateMtoServiceItemID(formats strfmt.Registry) error {
+ if swag.IsZero(m.MtoServiceItemID) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("mtoServiceItemID", "body", "uuid", m.MtoServiceItemID.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *PaymentServiceItem) validatePaymentRequestID(formats strfmt.Registry) error {
+ if swag.IsZero(m.PaymentRequestID) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("paymentRequestID", "body", "uuid", m.PaymentRequestID.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *PaymentServiceItem) validatePaymentServiceItemParams(formats strfmt.Registry) error {
+ if swag.IsZero(m.PaymentServiceItemParams) { // not required
+ return nil
+ }
+
+ if err := m.PaymentServiceItemParams.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("paymentServiceItemParams")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("paymentServiceItemParams")
+ }
+ return err
+ }
+
+ return nil
+}
+
+func (m *PaymentServiceItem) validateStatus(formats strfmt.Registry) error {
+ if swag.IsZero(m.Status) { // not required
+ return nil
+ }
+
+ if err := m.Status.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("status")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("status")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// ContextValidate validate this payment service item based on the context it is used
+func (m *PaymentServiceItem) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.contextValidateETag(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateID(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidatePaymentServiceItemParams(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateReferenceID(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateStatus(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *PaymentServiceItem) contextValidateETag(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "eTag", "body", string(m.ETag)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *PaymentServiceItem) contextValidateID(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "id", "body", strfmt.UUID(m.ID)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *PaymentServiceItem) contextValidatePaymentServiceItemParams(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := m.PaymentServiceItemParams.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("paymentServiceItemParams")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("paymentServiceItemParams")
+ }
+ return err
+ }
+
+ return nil
+}
+
+func (m *PaymentServiceItem) contextValidateReferenceID(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "referenceID", "body", string(m.ReferenceID)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *PaymentServiceItem) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Status) { // not required
+ return nil
+ }
+
+ if err := m.Status.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("status")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("status")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *PaymentServiceItem) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *PaymentServiceItem) UnmarshalBinary(b []byte) error {
+ var res PaymentServiceItem
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/pkg/gen/internalmessages/payment_service_item_param.go b/pkg/gen/internalmessages/payment_service_item_param.go
new file mode 100644
index 00000000000..7cf0fbbe90c
--- /dev/null
+++ b/pkg/gen/internalmessages/payment_service_item_param.go
@@ -0,0 +1,274 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package internalmessages
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// PaymentServiceItemParam payment service item param
+//
+// swagger:model PaymentServiceItemParam
+type PaymentServiceItemParam struct {
+
+ // e tag
+ // Read Only: true
+ ETag string `json:"eTag,omitempty"`
+
+ // id
+ // Example: c56a4180-65aa-42ec-a945-5fd21dec0538
+ // Read Only: true
+ // Format: uuid
+ ID strfmt.UUID `json:"id,omitempty"`
+
+ // key
+ Key ServiceItemParamName `json:"key,omitempty"`
+
+ // origin
+ Origin ServiceItemParamOrigin `json:"origin,omitempty"`
+
+ // payment service item ID
+ // Example: c56a4180-65aa-42ec-a945-5fd21dec0538
+ // Format: uuid
+ PaymentServiceItemID strfmt.UUID `json:"paymentServiceItemID,omitempty"`
+
+ // type
+ Type ServiceItemParamType `json:"type,omitempty"`
+
+ // value
+ // Example: 3025
+ Value string `json:"value,omitempty"`
+}
+
+// Validate validates this payment service item param
+func (m *PaymentServiceItemParam) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateKey(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateOrigin(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validatePaymentServiceItemID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateType(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *PaymentServiceItemParam) validateID(formats strfmt.Registry) error {
+ if swag.IsZero(m.ID) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("id", "body", "uuid", m.ID.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *PaymentServiceItemParam) validateKey(formats strfmt.Registry) error {
+ if swag.IsZero(m.Key) { // not required
+ return nil
+ }
+
+ if err := m.Key.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("key")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("key")
+ }
+ return err
+ }
+
+ return nil
+}
+
+func (m *PaymentServiceItemParam) validateOrigin(formats strfmt.Registry) error {
+ if swag.IsZero(m.Origin) { // not required
+ return nil
+ }
+
+ if err := m.Origin.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("origin")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("origin")
+ }
+ return err
+ }
+
+ return nil
+}
+
+func (m *PaymentServiceItemParam) validatePaymentServiceItemID(formats strfmt.Registry) error {
+ if swag.IsZero(m.PaymentServiceItemID) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("paymentServiceItemID", "body", "uuid", m.PaymentServiceItemID.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *PaymentServiceItemParam) validateType(formats strfmt.Registry) error {
+ if swag.IsZero(m.Type) { // not required
+ return nil
+ }
+
+ if err := m.Type.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("type")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("type")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// ContextValidate validate this payment service item param based on the context it is used
+func (m *PaymentServiceItemParam) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.contextValidateETag(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateID(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateKey(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateOrigin(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateType(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *PaymentServiceItemParam) contextValidateETag(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "eTag", "body", string(m.ETag)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *PaymentServiceItemParam) contextValidateID(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "id", "body", strfmt.UUID(m.ID)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *PaymentServiceItemParam) contextValidateKey(ctx context.Context, formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Key) { // not required
+ return nil
+ }
+
+ if err := m.Key.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("key")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("key")
+ }
+ return err
+ }
+
+ return nil
+}
+
+func (m *PaymentServiceItemParam) contextValidateOrigin(ctx context.Context, formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Origin) { // not required
+ return nil
+ }
+
+ if err := m.Origin.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("origin")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("origin")
+ }
+ return err
+ }
+
+ return nil
+}
+
+func (m *PaymentServiceItemParam) contextValidateType(ctx context.Context, formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Type) { // not required
+ return nil
+ }
+
+ if err := m.Type.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("type")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("type")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *PaymentServiceItemParam) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *PaymentServiceItemParam) UnmarshalBinary(b []byte) error {
+ var res PaymentServiceItemParam
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/pkg/gen/internalmessages/payment_service_item_params.go b/pkg/gen/internalmessages/payment_service_item_params.go
new file mode 100644
index 00000000000..d84f9dae6a9
--- /dev/null
+++ b/pkg/gen/internalmessages/payment_service_item_params.go
@@ -0,0 +1,78 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package internalmessages
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+ "strconv"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/swag"
+)
+
+// PaymentServiceItemParams payment service item params
+//
+// swagger:model PaymentServiceItemParams
+type PaymentServiceItemParams []*PaymentServiceItemParam
+
+// Validate validates this payment service item params
+func (m PaymentServiceItemParams) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+// ContextValidate validate this payment service item params based on the context it is used
+func (m PaymentServiceItemParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if m[i] != nil {
+
+ if swag.IsZero(m[i]) { // not required
+ return nil
+ }
+
+ if err := m[i].ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/pkg/gen/internalmessages/payment_service_item_status.go b/pkg/gen/internalmessages/payment_service_item_status.go
new file mode 100644
index 00000000000..90f078aa186
--- /dev/null
+++ b/pkg/gen/internalmessages/payment_service_item_status.go
@@ -0,0 +1,90 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package internalmessages
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+ "encoding/json"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/validate"
+)
+
+// PaymentServiceItemStatus Payment Service Item Status
+//
+// swagger:model PaymentServiceItemStatus
+type PaymentServiceItemStatus string
+
+func NewPaymentServiceItemStatus(value PaymentServiceItemStatus) *PaymentServiceItemStatus {
+ return &value
+}
+
+// Pointer returns a pointer to a freshly-allocated PaymentServiceItemStatus.
+func (m PaymentServiceItemStatus) Pointer() *PaymentServiceItemStatus {
+ return &m
+}
+
+const (
+
+ // PaymentServiceItemStatusREQUESTED captures enum value "REQUESTED"
+ PaymentServiceItemStatusREQUESTED PaymentServiceItemStatus = "REQUESTED"
+
+ // PaymentServiceItemStatusAPPROVED captures enum value "APPROVED"
+ PaymentServiceItemStatusAPPROVED PaymentServiceItemStatus = "APPROVED"
+
+ // PaymentServiceItemStatusDENIED captures enum value "DENIED"
+ PaymentServiceItemStatusDENIED PaymentServiceItemStatus = "DENIED"
+
+ // PaymentServiceItemStatusSENTTOGEX captures enum value "SENT_TO_GEX"
+ PaymentServiceItemStatusSENTTOGEX PaymentServiceItemStatus = "SENT_TO_GEX"
+
+ // PaymentServiceItemStatusPAID captures enum value "PAID"
+ PaymentServiceItemStatusPAID PaymentServiceItemStatus = "PAID"
+
+ // PaymentServiceItemStatusEDIERROR captures enum value "EDI_ERROR"
+ PaymentServiceItemStatusEDIERROR PaymentServiceItemStatus = "EDI_ERROR"
+)
+
+// for schema
+var paymentServiceItemStatusEnum []interface{}
+
+func init() {
+ var res []PaymentServiceItemStatus
+ if err := json.Unmarshal([]byte(`["REQUESTED","APPROVED","DENIED","SENT_TO_GEX","PAID","EDI_ERROR"]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ paymentServiceItemStatusEnum = append(paymentServiceItemStatusEnum, v)
+ }
+}
+
+func (m PaymentServiceItemStatus) validatePaymentServiceItemStatusEnum(path, location string, value PaymentServiceItemStatus) error {
+ if err := validate.EnumCase(path, location, value, paymentServiceItemStatusEnum, true); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Validate validates this payment service item status
+func (m PaymentServiceItemStatus) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ // value enum
+ if err := m.validatePaymentServiceItemStatusEnum("", "body", m); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+// ContextValidate validates this payment service item status based on context it is used
+func (m PaymentServiceItemStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ return nil
+}
diff --git a/pkg/gen/internalmessages/payment_service_items.go b/pkg/gen/internalmessages/payment_service_items.go
new file mode 100644
index 00000000000..0da94045578
--- /dev/null
+++ b/pkg/gen/internalmessages/payment_service_items.go
@@ -0,0 +1,78 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package internalmessages
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+ "strconv"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/swag"
+)
+
+// PaymentServiceItems payment service items
+//
+// swagger:model PaymentServiceItems
+type PaymentServiceItems []*PaymentServiceItem
+
+// Validate validates this payment service items
+func (m PaymentServiceItems) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+// ContextValidate validate this payment service items based on the context it is used
+func (m PaymentServiceItems) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if m[i] != nil {
+
+ if swag.IsZero(m[i]) { // not required
+ return nil
+ }
+
+ if err := m[i].ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/pkg/gen/internalmessages/proof_of_service_doc.go b/pkg/gen/internalmessages/proof_of_service_doc.go
new file mode 100644
index 00000000000..a80507bf548
--- /dev/null
+++ b/pkg/gen/internalmessages/proof_of_service_doc.go
@@ -0,0 +1,121 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package internalmessages
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+ "strconv"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/swag"
+)
+
+// ProofOfServiceDoc proof of service doc
+//
+// swagger:model ProofOfServiceDoc
+type ProofOfServiceDoc struct {
+
+ // uploads
+ Uploads []*UploadWithOmissions `json:"uploads"`
+}
+
+// Validate validates this proof of service doc
+func (m *ProofOfServiceDoc) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateUploads(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *ProofOfServiceDoc) validateUploads(formats strfmt.Registry) error {
+ if swag.IsZero(m.Uploads) { // not required
+ return nil
+ }
+
+ for i := 0; i < len(m.Uploads); i++ {
+ if swag.IsZero(m.Uploads[i]) { // not required
+ continue
+ }
+
+ if m.Uploads[i] != nil {
+ if err := m.Uploads[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("uploads" + "." + strconv.Itoa(i))
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("uploads" + "." + strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ return nil
+}
+
+// ContextValidate validate this proof of service doc based on the context it is used
+func (m *ProofOfServiceDoc) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.contextValidateUploads(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *ProofOfServiceDoc) contextValidateUploads(ctx context.Context, formats strfmt.Registry) error {
+
+ for i := 0; i < len(m.Uploads); i++ {
+
+ if m.Uploads[i] != nil {
+
+ if swag.IsZero(m.Uploads[i]) { // not required
+ return nil
+ }
+
+ if err := m.Uploads[i].ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("uploads" + "." + strconv.Itoa(i))
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("uploads" + "." + strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *ProofOfServiceDoc) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *ProofOfServiceDoc) UnmarshalBinary(b []byte) error {
+ var res ProofOfServiceDoc
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/pkg/gen/internalmessages/proof_of_service_docs.go b/pkg/gen/internalmessages/proof_of_service_docs.go
new file mode 100644
index 00000000000..3e067521f21
--- /dev/null
+++ b/pkg/gen/internalmessages/proof_of_service_docs.go
@@ -0,0 +1,78 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package internalmessages
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+ "strconv"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/swag"
+)
+
+// ProofOfServiceDocs proof of service docs
+//
+// swagger:model ProofOfServiceDocs
+type ProofOfServiceDocs []*ProofOfServiceDoc
+
+// Validate validates this proof of service docs
+func (m ProofOfServiceDocs) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+// ContextValidate validate this proof of service docs based on the context it is used
+func (m ProofOfServiceDocs) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if m[i] != nil {
+
+ if swag.IsZero(m[i]) { // not required
+ return nil
+ }
+
+ if err := m[i].ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/pkg/gen/internalmessages/reweigh.go b/pkg/gen/internalmessages/reweigh.go
new file mode 100644
index 00000000000..421485115e3
--- /dev/null
+++ b/pkg/gen/internalmessages/reweigh.go
@@ -0,0 +1,280 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package internalmessages
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// Reweigh A reweigh is when a shipment is weighed for a second time due to the request of a customer, the contractor, system or TOO.
+//
+// swagger:model Reweigh
+type Reweigh struct {
+
+ // created at
+ // Read Only: true
+ // Format: date-time
+ CreatedAt strfmt.DateTime `json:"createdAt,omitempty"`
+
+ // e tag
+ // Read Only: true
+ ETag string `json:"eTag,omitempty"`
+
+ // id
+ // Example: 1f2270c7-7166-40ae-981e-b200ebdf3054
+ // Format: uuid
+ ID strfmt.UUID `json:"id,omitempty"`
+
+ // requested at
+ // Format: date-time
+ RequestedAt strfmt.DateTime `json:"requestedAt,omitempty"`
+
+ // requested by
+ RequestedBy ReweighRequester `json:"requestedBy,omitempty"`
+
+ // shipment ID
+ // Example: 1f2270c7-7166-40ae-981e-b200ebdf3054
+ // Format: uuid
+ ShipmentID strfmt.UUID `json:"shipmentID,omitempty"`
+
+ // updated at
+ // Read Only: true
+ // Format: date-time
+ UpdatedAt strfmt.DateTime `json:"updatedAt,omitempty"`
+
+ // verification provided at
+ // Format: date-time
+ VerificationProvidedAt *strfmt.DateTime `json:"verificationProvidedAt"`
+
+ // verification reason
+ // Example: The reweigh was not performed due to some justification provided by the Prime
+ VerificationReason *string `json:"verificationReason"`
+
+ // weight
+ // Example: 2000
+ Weight *int64 `json:"weight"`
+}
+
+// Validate validates this reweigh
+func (m *Reweigh) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCreatedAt(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateRequestedAt(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateRequestedBy(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateShipmentID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateUpdatedAt(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateVerificationProvidedAt(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *Reweigh) validateCreatedAt(formats strfmt.Registry) error {
+ if swag.IsZero(m.CreatedAt) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("createdAt", "body", "date-time", m.CreatedAt.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Reweigh) validateID(formats strfmt.Registry) error {
+ if swag.IsZero(m.ID) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("id", "body", "uuid", m.ID.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Reweigh) validateRequestedAt(formats strfmt.Registry) error {
+ if swag.IsZero(m.RequestedAt) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("requestedAt", "body", "date-time", m.RequestedAt.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Reweigh) validateRequestedBy(formats strfmt.Registry) error {
+ if swag.IsZero(m.RequestedBy) { // not required
+ return nil
+ }
+
+ if err := m.RequestedBy.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("requestedBy")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("requestedBy")
+ }
+ return err
+ }
+
+ return nil
+}
+
+func (m *Reweigh) validateShipmentID(formats strfmt.Registry) error {
+ if swag.IsZero(m.ShipmentID) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("shipmentID", "body", "uuid", m.ShipmentID.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Reweigh) validateUpdatedAt(formats strfmt.Registry) error {
+ if swag.IsZero(m.UpdatedAt) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("updatedAt", "body", "date-time", m.UpdatedAt.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Reweigh) validateVerificationProvidedAt(formats strfmt.Registry) error {
+ if swag.IsZero(m.VerificationProvidedAt) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("verificationProvidedAt", "body", "date-time", m.VerificationProvidedAt.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// ContextValidate validate this reweigh based on the context it is used
+func (m *Reweigh) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.contextValidateCreatedAt(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateETag(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateRequestedBy(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateUpdatedAt(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *Reweigh) contextValidateCreatedAt(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "createdAt", "body", strfmt.DateTime(m.CreatedAt)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Reweigh) contextValidateETag(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "eTag", "body", string(m.ETag)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Reweigh) contextValidateRequestedBy(ctx context.Context, formats strfmt.Registry) error {
+
+ if swag.IsZero(m.RequestedBy) { // not required
+ return nil
+ }
+
+ if err := m.RequestedBy.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("requestedBy")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("requestedBy")
+ }
+ return err
+ }
+
+ return nil
+}
+
+func (m *Reweigh) contextValidateUpdatedAt(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "updatedAt", "body", strfmt.DateTime(m.UpdatedAt)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *Reweigh) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *Reweigh) UnmarshalBinary(b []byte) error {
+ var res Reweigh
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/pkg/gen/internalmessages/reweigh_requester.go b/pkg/gen/internalmessages/reweigh_requester.go
new file mode 100644
index 00000000000..7f07d2b8a93
--- /dev/null
+++ b/pkg/gen/internalmessages/reweigh_requester.go
@@ -0,0 +1,84 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package internalmessages
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+ "encoding/json"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/validate"
+)
+
+// ReweighRequester reweigh requester
+//
+// swagger:model ReweighRequester
+type ReweighRequester string
+
+func NewReweighRequester(value ReweighRequester) *ReweighRequester {
+ return &value
+}
+
+// Pointer returns a pointer to a freshly-allocated ReweighRequester.
+func (m ReweighRequester) Pointer() *ReweighRequester {
+ return &m
+}
+
+const (
+
+ // ReweighRequesterCUSTOMER captures enum value "CUSTOMER"
+ ReweighRequesterCUSTOMER ReweighRequester = "CUSTOMER"
+
+ // ReweighRequesterPRIME captures enum value "PRIME"
+ ReweighRequesterPRIME ReweighRequester = "PRIME"
+
+ // ReweighRequesterSYSTEM captures enum value "SYSTEM"
+ ReweighRequesterSYSTEM ReweighRequester = "SYSTEM"
+
+ // ReweighRequesterTOO captures enum value "TOO"
+ ReweighRequesterTOO ReweighRequester = "TOO"
+)
+
+// for schema
+var reweighRequesterEnum []interface{}
+
+func init() {
+ var res []ReweighRequester
+ if err := json.Unmarshal([]byte(`["CUSTOMER","PRIME","SYSTEM","TOO"]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ reweighRequesterEnum = append(reweighRequesterEnum, v)
+ }
+}
+
+func (m ReweighRequester) validateReweighRequesterEnum(path, location string, value ReweighRequester) error {
+ if err := validate.EnumCase(path, location, value, reweighRequesterEnum, true); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Validate validates this reweigh requester
+func (m ReweighRequester) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ // value enum
+ if err := m.validateReweighRequesterEnum("", "body", m); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+// ContextValidate validates this reweigh requester based on context it is used
+func (m ReweighRequester) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ return nil
+}
diff --git a/pkg/gen/internalmessages/s_i_t_extension.go b/pkg/gen/internalmessages/s_i_t_extension.go
new file mode 100644
index 00000000000..75a8faf353a
--- /dev/null
+++ b/pkg/gen/internalmessages/s_i_t_extension.go
@@ -0,0 +1,291 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package internalmessages
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+ "encoding/json"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// SITExtension A storage in transit (SIT) Extension is a request for an increase in the billable number of days a shipment is allowed to be in SIT.
+//
+// swagger:model SITExtension
+type SITExtension struct {
+
+ // approved days
+ // Example: 30
+ ApprovedDays *int64 `json:"approvedDays"`
+
+ // contractor remarks
+ // Example: We need SIT additional days. The customer has not found a house yet.
+ ContractorRemarks *string `json:"contractorRemarks"`
+
+ // created at
+ // Read Only: true
+ // Format: date-time
+ CreatedAt strfmt.DateTime `json:"createdAt,omitempty"`
+
+ // decision date
+ // Format: date-time
+ DecisionDate *strfmt.DateTime `json:"decisionDate"`
+
+ // e tag
+ // Read Only: true
+ ETag string `json:"eTag,omitempty"`
+
+ // id
+ // Example: 1f2270c7-7166-40ae-981e-b200ebdf3054
+ // Format: uuid
+ ID strfmt.UUID `json:"id,omitempty"`
+
+ // mto shipment ID
+ // Example: 1f2270c7-7166-40ae-981e-b200ebdf3054
+ // Format: uuid
+ MtoShipmentID strfmt.UUID `json:"mtoShipmentID,omitempty"`
+
+ // office remarks
+ OfficeRemarks *string `json:"officeRemarks"`
+
+ // request reason
+ // Enum: [SERIOUS_ILLNESS_MEMBER SERIOUS_ILLNESS_DEPENDENT IMPENDING_ASSIGNEMENT DIRECTED_TEMPORARY_DUTY NONAVAILABILITY_OF_CIVILIAN_HOUSING AWAITING_COMPLETION_OF_RESIDENCE OTHER]
+ RequestReason string `json:"requestReason,omitempty"`
+
+ // requested days
+ // Example: 30
+ RequestedDays int64 `json:"requestedDays,omitempty"`
+
+ // status
+ // Enum: [PENDING APPROVED DENIED]
+ Status interface{} `json:"status,omitempty"`
+
+ // updated at
+ // Read Only: true
+ // Format: date-time
+ UpdatedAt strfmt.DateTime `json:"updatedAt,omitempty"`
+}
+
+// Validate validates this s i t extension
+func (m *SITExtension) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCreatedAt(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateDecisionDate(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateMtoShipmentID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateRequestReason(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateUpdatedAt(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *SITExtension) validateCreatedAt(formats strfmt.Registry) error {
+ if swag.IsZero(m.CreatedAt) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("createdAt", "body", "date-time", m.CreatedAt.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *SITExtension) validateDecisionDate(formats strfmt.Registry) error {
+ if swag.IsZero(m.DecisionDate) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("decisionDate", "body", "date-time", m.DecisionDate.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *SITExtension) validateID(formats strfmt.Registry) error {
+ if swag.IsZero(m.ID) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("id", "body", "uuid", m.ID.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *SITExtension) validateMtoShipmentID(formats strfmt.Registry) error {
+ if swag.IsZero(m.MtoShipmentID) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("mtoShipmentID", "body", "uuid", m.MtoShipmentID.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+var sITExtensionTypeRequestReasonPropEnum []interface{}
+
+func init() {
+ var res []string
+ if err := json.Unmarshal([]byte(`["SERIOUS_ILLNESS_MEMBER","SERIOUS_ILLNESS_DEPENDENT","IMPENDING_ASSIGNEMENT","DIRECTED_TEMPORARY_DUTY","NONAVAILABILITY_OF_CIVILIAN_HOUSING","AWAITING_COMPLETION_OF_RESIDENCE","OTHER"]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ sITExtensionTypeRequestReasonPropEnum = append(sITExtensionTypeRequestReasonPropEnum, v)
+ }
+}
+
+const (
+
+ // SITExtensionRequestReasonSERIOUSILLNESSMEMBER captures enum value "SERIOUS_ILLNESS_MEMBER"
+ SITExtensionRequestReasonSERIOUSILLNESSMEMBER string = "SERIOUS_ILLNESS_MEMBER"
+
+ // SITExtensionRequestReasonSERIOUSILLNESSDEPENDENT captures enum value "SERIOUS_ILLNESS_DEPENDENT"
+ SITExtensionRequestReasonSERIOUSILLNESSDEPENDENT string = "SERIOUS_ILLNESS_DEPENDENT"
+
+ // SITExtensionRequestReasonIMPENDINGASSIGNEMENT captures enum value "IMPENDING_ASSIGNEMENT"
+ SITExtensionRequestReasonIMPENDINGASSIGNEMENT string = "IMPENDING_ASSIGNEMENT"
+
+ // SITExtensionRequestReasonDIRECTEDTEMPORARYDUTY captures enum value "DIRECTED_TEMPORARY_DUTY"
+ SITExtensionRequestReasonDIRECTEDTEMPORARYDUTY string = "DIRECTED_TEMPORARY_DUTY"
+
+ // SITExtensionRequestReasonNONAVAILABILITYOFCIVILIANHOUSING captures enum value "NONAVAILABILITY_OF_CIVILIAN_HOUSING"
+ SITExtensionRequestReasonNONAVAILABILITYOFCIVILIANHOUSING string = "NONAVAILABILITY_OF_CIVILIAN_HOUSING"
+
+ // SITExtensionRequestReasonAWAITINGCOMPLETIONOFRESIDENCE captures enum value "AWAITING_COMPLETION_OF_RESIDENCE"
+ SITExtensionRequestReasonAWAITINGCOMPLETIONOFRESIDENCE string = "AWAITING_COMPLETION_OF_RESIDENCE"
+
+ // SITExtensionRequestReasonOTHER captures enum value "OTHER"
+ SITExtensionRequestReasonOTHER string = "OTHER"
+)
+
+// prop value enum
+func (m *SITExtension) validateRequestReasonEnum(path, location string, value string) error {
+ if err := validate.EnumCase(path, location, value, sITExtensionTypeRequestReasonPropEnum, true); err != nil {
+ return err
+ }
+ return nil
+}
+
+func (m *SITExtension) validateRequestReason(formats strfmt.Registry) error {
+ if swag.IsZero(m.RequestReason) { // not required
+ return nil
+ }
+
+ // value enum
+ if err := m.validateRequestReasonEnum("requestReason", "body", m.RequestReason); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *SITExtension) validateUpdatedAt(formats strfmt.Registry) error {
+ if swag.IsZero(m.UpdatedAt) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("updatedAt", "body", "date-time", m.UpdatedAt.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// ContextValidate validate this s i t extension based on the context it is used
+func (m *SITExtension) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.contextValidateCreatedAt(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateETag(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateUpdatedAt(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *SITExtension) contextValidateCreatedAt(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "createdAt", "body", strfmt.DateTime(m.CreatedAt)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *SITExtension) contextValidateETag(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "eTag", "body", string(m.ETag)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *SITExtension) contextValidateUpdatedAt(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "updatedAt", "body", strfmt.DateTime(m.UpdatedAt)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *SITExtension) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *SITExtension) UnmarshalBinary(b []byte) error {
+ var res SITExtension
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/pkg/gen/internalmessages/s_i_t_extensions.go b/pkg/gen/internalmessages/s_i_t_extensions.go
new file mode 100644
index 00000000000..2f6e5e425ce
--- /dev/null
+++ b/pkg/gen/internalmessages/s_i_t_extensions.go
@@ -0,0 +1,78 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package internalmessages
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+ "strconv"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/swag"
+)
+
+// SITExtensions s i t extensions
+//
+// swagger:model SITExtensions
+type SITExtensions []*SITExtension
+
+// Validate validates this s i t extensions
+func (m SITExtensions) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+// ContextValidate validate this s i t extensions based on the context it is used
+func (m SITExtensions) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if m[i] != nil {
+
+ if swag.IsZero(m[i]) { // not required
+ return nil
+ }
+
+ if err := m[i].ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/pkg/gen/internalmessages/service_item_param_name.go b/pkg/gen/internalmessages/service_item_param_name.go
new file mode 100644
index 00000000000..8fc55bde8f0
--- /dev/null
+++ b/pkg/gen/internalmessages/service_item_param_name.go
@@ -0,0 +1,270 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package internalmessages
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+ "encoding/json"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/validate"
+)
+
+// ServiceItemParamName service item param name
+//
+// swagger:model ServiceItemParamName
+type ServiceItemParamName string
+
+func NewServiceItemParamName(value ServiceItemParamName) *ServiceItemParamName {
+ return &value
+}
+
+// Pointer returns a pointer to a freshly-allocated ServiceItemParamName.
+func (m ServiceItemParamName) Pointer() *ServiceItemParamName {
+ return &m
+}
+
+const (
+
+ // ServiceItemParamNameActualPickupDate captures enum value "ActualPickupDate"
+ ServiceItemParamNameActualPickupDate ServiceItemParamName = "ActualPickupDate"
+
+ // ServiceItemParamNameContractCode captures enum value "ContractCode"
+ ServiceItemParamNameContractCode ServiceItemParamName = "ContractCode"
+
+ // ServiceItemParamNameContractYearName captures enum value "ContractYearName"
+ ServiceItemParamNameContractYearName ServiceItemParamName = "ContractYearName"
+
+ // ServiceItemParamNameCubicFeetBilled captures enum value "CubicFeetBilled"
+ ServiceItemParamNameCubicFeetBilled ServiceItemParamName = "CubicFeetBilled"
+
+ // ServiceItemParamNameCubicFeetCrating captures enum value "CubicFeetCrating"
+ ServiceItemParamNameCubicFeetCrating ServiceItemParamName = "CubicFeetCrating"
+
+ // ServiceItemParamNameDimensionHeight captures enum value "DimensionHeight"
+ ServiceItemParamNameDimensionHeight ServiceItemParamName = "DimensionHeight"
+
+ // ServiceItemParamNameDimensionLength captures enum value "DimensionLength"
+ ServiceItemParamNameDimensionLength ServiceItemParamName = "DimensionLength"
+
+ // ServiceItemParamNameDimensionWidth captures enum value "DimensionWidth"
+ ServiceItemParamNameDimensionWidth ServiceItemParamName = "DimensionWidth"
+
+ // ServiceItemParamNameDistanceZip captures enum value "DistanceZip"
+ ServiceItemParamNameDistanceZip ServiceItemParamName = "DistanceZip"
+
+ // ServiceItemParamNameDistanceZipSITDest captures enum value "DistanceZipSITDest"
+ ServiceItemParamNameDistanceZipSITDest ServiceItemParamName = "DistanceZipSITDest"
+
+ // ServiceItemParamNameDistanceZipSITOrigin captures enum value "DistanceZipSITOrigin"
+ ServiceItemParamNameDistanceZipSITOrigin ServiceItemParamName = "DistanceZipSITOrigin"
+
+ // ServiceItemParamNameEIAFuelPrice captures enum value "EIAFuelPrice"
+ ServiceItemParamNameEIAFuelPrice ServiceItemParamName = "EIAFuelPrice"
+
+ // ServiceItemParamNameEscalationCompounded captures enum value "EscalationCompounded"
+ ServiceItemParamNameEscalationCompounded ServiceItemParamName = "EscalationCompounded"
+
+ // ServiceItemParamNameFSCMultiplier captures enum value "FSCMultiplier"
+ ServiceItemParamNameFSCMultiplier ServiceItemParamName = "FSCMultiplier"
+
+ // ServiceItemParamNameFSCPriceDifferenceInCents captures enum value "FSCPriceDifferenceInCents"
+ ServiceItemParamNameFSCPriceDifferenceInCents ServiceItemParamName = "FSCPriceDifferenceInCents"
+
+ // ServiceItemParamNameFSCWeightBasedDistanceMultiplier captures enum value "FSCWeightBasedDistanceMultiplier"
+ ServiceItemParamNameFSCWeightBasedDistanceMultiplier ServiceItemParamName = "FSCWeightBasedDistanceMultiplier"
+
+ // ServiceItemParamNameIsPeak captures enum value "IsPeak"
+ ServiceItemParamNameIsPeak ServiceItemParamName = "IsPeak"
+
+ // ServiceItemParamNameMarketDest captures enum value "MarketDest"
+ ServiceItemParamNameMarketDest ServiceItemParamName = "MarketDest"
+
+ // ServiceItemParamNameMarketOrigin captures enum value "MarketOrigin"
+ ServiceItemParamNameMarketOrigin ServiceItemParamName = "MarketOrigin"
+
+ // ServiceItemParamNameMTOAvailableToPrimeAt captures enum value "MTOAvailableToPrimeAt"
+ ServiceItemParamNameMTOAvailableToPrimeAt ServiceItemParamName = "MTOAvailableToPrimeAt"
+
+ // ServiceItemParamNameNTSPackingFactor captures enum value "NTSPackingFactor"
+ ServiceItemParamNameNTSPackingFactor ServiceItemParamName = "NTSPackingFactor"
+
+ // ServiceItemParamNameNumberDaysSIT captures enum value "NumberDaysSIT"
+ ServiceItemParamNameNumberDaysSIT ServiceItemParamName = "NumberDaysSIT"
+
+ // ServiceItemParamNamePriceAreaDest captures enum value "PriceAreaDest"
+ ServiceItemParamNamePriceAreaDest ServiceItemParamName = "PriceAreaDest"
+
+ // ServiceItemParamNamePriceAreaIntlDest captures enum value "PriceAreaIntlDest"
+ ServiceItemParamNamePriceAreaIntlDest ServiceItemParamName = "PriceAreaIntlDest"
+
+ // ServiceItemParamNamePriceAreaIntlOrigin captures enum value "PriceAreaIntlOrigin"
+ ServiceItemParamNamePriceAreaIntlOrigin ServiceItemParamName = "PriceAreaIntlOrigin"
+
+ // ServiceItemParamNamePriceAreaOrigin captures enum value "PriceAreaOrigin"
+ ServiceItemParamNamePriceAreaOrigin ServiceItemParamName = "PriceAreaOrigin"
+
+ // ServiceItemParamNamePriceRateOrFactor captures enum value "PriceRateOrFactor"
+ ServiceItemParamNamePriceRateOrFactor ServiceItemParamName = "PriceRateOrFactor"
+
+ // ServiceItemParamNamePSILinehaulDom captures enum value "PSI_LinehaulDom"
+ ServiceItemParamNamePSILinehaulDom ServiceItemParamName = "PSI_LinehaulDom"
+
+ // ServiceItemParamNamePSILinehaulDomPrice captures enum value "PSI_LinehaulDomPrice"
+ ServiceItemParamNamePSILinehaulDomPrice ServiceItemParamName = "PSI_LinehaulDomPrice"
+
+ // ServiceItemParamNamePSILinehaulShort captures enum value "PSI_LinehaulShort"
+ ServiceItemParamNamePSILinehaulShort ServiceItemParamName = "PSI_LinehaulShort"
+
+ // ServiceItemParamNamePSILinehaulShortPrice captures enum value "PSI_LinehaulShortPrice"
+ ServiceItemParamNamePSILinehaulShortPrice ServiceItemParamName = "PSI_LinehaulShortPrice"
+
+ // ServiceItemParamNamePSIPriceDomDest captures enum value "PSI_PriceDomDest"
+ ServiceItemParamNamePSIPriceDomDest ServiceItemParamName = "PSI_PriceDomDest"
+
+ // ServiceItemParamNamePSIPriceDomDestPrice captures enum value "PSI_PriceDomDestPrice"
+ ServiceItemParamNamePSIPriceDomDestPrice ServiceItemParamName = "PSI_PriceDomDestPrice"
+
+ // ServiceItemParamNamePSIPriceDomOrigin captures enum value "PSI_PriceDomOrigin"
+ ServiceItemParamNamePSIPriceDomOrigin ServiceItemParamName = "PSI_PriceDomOrigin"
+
+ // ServiceItemParamNamePSIPriceDomOriginPrice captures enum value "PSI_PriceDomOriginPrice"
+ ServiceItemParamNamePSIPriceDomOriginPrice ServiceItemParamName = "PSI_PriceDomOriginPrice"
+
+ // ServiceItemParamNamePSIShippingLinehaulIntlCO captures enum value "PSI_ShippingLinehaulIntlCO"
+ ServiceItemParamNamePSIShippingLinehaulIntlCO ServiceItemParamName = "PSI_ShippingLinehaulIntlCO"
+
+ // ServiceItemParamNamePSIShippingLinehaulIntlCOPrice captures enum value "PSI_ShippingLinehaulIntlCOPrice"
+ ServiceItemParamNamePSIShippingLinehaulIntlCOPrice ServiceItemParamName = "PSI_ShippingLinehaulIntlCOPrice"
+
+ // ServiceItemParamNamePSIShippingLinehaulIntlOC captures enum value "PSI_ShippingLinehaulIntlOC"
+ ServiceItemParamNamePSIShippingLinehaulIntlOC ServiceItemParamName = "PSI_ShippingLinehaulIntlOC"
+
+ // ServiceItemParamNamePSIShippingLinehaulIntlOCPrice captures enum value "PSI_ShippingLinehaulIntlOCPrice"
+ ServiceItemParamNamePSIShippingLinehaulIntlOCPrice ServiceItemParamName = "PSI_ShippingLinehaulIntlOCPrice"
+
+ // ServiceItemParamNamePSIShippingLinehaulIntlOO captures enum value "PSI_ShippingLinehaulIntlOO"
+ ServiceItemParamNamePSIShippingLinehaulIntlOO ServiceItemParamName = "PSI_ShippingLinehaulIntlOO"
+
+ // ServiceItemParamNamePSIShippingLinehaulIntlOOPrice captures enum value "PSI_ShippingLinehaulIntlOOPrice"
+ ServiceItemParamNamePSIShippingLinehaulIntlOOPrice ServiceItemParamName = "PSI_ShippingLinehaulIntlOOPrice"
+
+ // ServiceItemParamNameRateAreaNonStdDest captures enum value "RateAreaNonStdDest"
+ ServiceItemParamNameRateAreaNonStdDest ServiceItemParamName = "RateAreaNonStdDest"
+
+ // ServiceItemParamNameRateAreaNonStdOrigin captures enum value "RateAreaNonStdOrigin"
+ ServiceItemParamNameRateAreaNonStdOrigin ServiceItemParamName = "RateAreaNonStdOrigin"
+
+ // ServiceItemParamNameReferenceDate captures enum value "ReferenceDate"
+ ServiceItemParamNameReferenceDate ServiceItemParamName = "ReferenceDate"
+
+ // ServiceItemParamNameRequestedPickupDate captures enum value "RequestedPickupDate"
+ ServiceItemParamNameRequestedPickupDate ServiceItemParamName = "RequestedPickupDate"
+
+ // ServiceItemParamNameServiceAreaDest captures enum value "ServiceAreaDest"
+ ServiceItemParamNameServiceAreaDest ServiceItemParamName = "ServiceAreaDest"
+
+ // ServiceItemParamNameServiceAreaOrigin captures enum value "ServiceAreaOrigin"
+ ServiceItemParamNameServiceAreaOrigin ServiceItemParamName = "ServiceAreaOrigin"
+
+ // ServiceItemParamNameServicesScheduleDest captures enum value "ServicesScheduleDest"
+ ServiceItemParamNameServicesScheduleDest ServiceItemParamName = "ServicesScheduleDest"
+
+ // ServiceItemParamNameServicesScheduleOrigin captures enum value "ServicesScheduleOrigin"
+ ServiceItemParamNameServicesScheduleOrigin ServiceItemParamName = "ServicesScheduleOrigin"
+
+ // ServiceItemParamNameSITPaymentRequestEnd captures enum value "SITPaymentRequestEnd"
+ ServiceItemParamNameSITPaymentRequestEnd ServiceItemParamName = "SITPaymentRequestEnd"
+
+ // ServiceItemParamNameSITPaymentRequestStart captures enum value "SITPaymentRequestStart"
+ ServiceItemParamNameSITPaymentRequestStart ServiceItemParamName = "SITPaymentRequestStart"
+
+ // ServiceItemParamNameSITScheduleDest captures enum value "SITScheduleDest"
+ ServiceItemParamNameSITScheduleDest ServiceItemParamName = "SITScheduleDest"
+
+ // ServiceItemParamNameSITScheduleOrigin captures enum value "SITScheduleOrigin"
+ ServiceItemParamNameSITScheduleOrigin ServiceItemParamName = "SITScheduleOrigin"
+
+ // ServiceItemParamNameSITServiceAreaDest captures enum value "SITServiceAreaDest"
+ ServiceItemParamNameSITServiceAreaDest ServiceItemParamName = "SITServiceAreaDest"
+
+ // ServiceItemParamNameSITServiceAreaOrigin captures enum value "SITServiceAreaOrigin"
+ ServiceItemParamNameSITServiceAreaOrigin ServiceItemParamName = "SITServiceAreaOrigin"
+
+ // ServiceItemParamNameWeightAdjusted captures enum value "WeightAdjusted"
+ ServiceItemParamNameWeightAdjusted ServiceItemParamName = "WeightAdjusted"
+
+ // ServiceItemParamNameWeightBilled captures enum value "WeightBilled"
+ ServiceItemParamNameWeightBilled ServiceItemParamName = "WeightBilled"
+
+ // ServiceItemParamNameWeightEstimated captures enum value "WeightEstimated"
+ ServiceItemParamNameWeightEstimated ServiceItemParamName = "WeightEstimated"
+
+ // ServiceItemParamNameWeightOriginal captures enum value "WeightOriginal"
+ ServiceItemParamNameWeightOriginal ServiceItemParamName = "WeightOriginal"
+
+ // ServiceItemParamNameWeightReweigh captures enum value "WeightReweigh"
+ ServiceItemParamNameWeightReweigh ServiceItemParamName = "WeightReweigh"
+
+ // ServiceItemParamNameZipDestAddress captures enum value "ZipDestAddress"
+ ServiceItemParamNameZipDestAddress ServiceItemParamName = "ZipDestAddress"
+
+ // ServiceItemParamNameZipPickupAddress captures enum value "ZipPickupAddress"
+ ServiceItemParamNameZipPickupAddress ServiceItemParamName = "ZipPickupAddress"
+
+ // ServiceItemParamNameZipSITDestHHGFinalAddress captures enum value "ZipSITDestHHGFinalAddress"
+ ServiceItemParamNameZipSITDestHHGFinalAddress ServiceItemParamName = "ZipSITDestHHGFinalAddress"
+
+ // ServiceItemParamNameZipSITDestHHGOriginalAddress captures enum value "ZipSITDestHHGOriginalAddress"
+ ServiceItemParamNameZipSITDestHHGOriginalAddress ServiceItemParamName = "ZipSITDestHHGOriginalAddress"
+
+ // ServiceItemParamNameZipSITOriginHHGActualAddress captures enum value "ZipSITOriginHHGActualAddress"
+ ServiceItemParamNameZipSITOriginHHGActualAddress ServiceItemParamName = "ZipSITOriginHHGActualAddress"
+
+ // ServiceItemParamNameZipSITOriginHHGOriginalAddress captures enum value "ZipSITOriginHHGOriginalAddress"
+ ServiceItemParamNameZipSITOriginHHGOriginalAddress ServiceItemParamName = "ZipSITOriginHHGOriginalAddress"
+)
+
+// for schema
+var serviceItemParamNameEnum []interface{}
+
+func init() {
+ var res []ServiceItemParamName
+ if err := json.Unmarshal([]byte(`["ActualPickupDate","ContractCode","ContractYearName","CubicFeetBilled","CubicFeetCrating","DimensionHeight","DimensionLength","DimensionWidth","DistanceZip","DistanceZipSITDest","DistanceZipSITOrigin","EIAFuelPrice","EscalationCompounded","FSCMultiplier","FSCPriceDifferenceInCents","FSCWeightBasedDistanceMultiplier","IsPeak","MarketDest","MarketOrigin","MTOAvailableToPrimeAt","NTSPackingFactor","NumberDaysSIT","PriceAreaDest","PriceAreaIntlDest","PriceAreaIntlOrigin","PriceAreaOrigin","PriceRateOrFactor","PSI_LinehaulDom","PSI_LinehaulDomPrice","PSI_LinehaulShort","PSI_LinehaulShortPrice","PSI_PriceDomDest","PSI_PriceDomDestPrice","PSI_PriceDomOrigin","PSI_PriceDomOriginPrice","PSI_ShippingLinehaulIntlCO","PSI_ShippingLinehaulIntlCOPrice","PSI_ShippingLinehaulIntlOC","PSI_ShippingLinehaulIntlOCPrice","PSI_ShippingLinehaulIntlOO","PSI_ShippingLinehaulIntlOOPrice","RateAreaNonStdDest","RateAreaNonStdOrigin","ReferenceDate","RequestedPickupDate","ServiceAreaDest","ServiceAreaOrigin","ServicesScheduleDest","ServicesScheduleOrigin","SITPaymentRequestEnd","SITPaymentRequestStart","SITScheduleDest","SITScheduleOrigin","SITServiceAreaDest","SITServiceAreaOrigin","WeightAdjusted","WeightBilled","WeightEstimated","WeightOriginal","WeightReweigh","ZipDestAddress","ZipPickupAddress","ZipSITDestHHGFinalAddress","ZipSITDestHHGOriginalAddress","ZipSITOriginHHGActualAddress","ZipSITOriginHHGOriginalAddress"]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ serviceItemParamNameEnum = append(serviceItemParamNameEnum, v)
+ }
+}
+
+func (m ServiceItemParamName) validateServiceItemParamNameEnum(path, location string, value ServiceItemParamName) error {
+ if err := validate.EnumCase(path, location, value, serviceItemParamNameEnum, true); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Validate validates this service item param name
+func (m ServiceItemParamName) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ // value enum
+ if err := m.validateServiceItemParamNameEnum("", "body", m); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+// ContextValidate validates this service item param name based on context it is used
+func (m ServiceItemParamName) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ return nil
+}
diff --git a/pkg/gen/internalmessages/service_item_param_origin.go b/pkg/gen/internalmessages/service_item_param_origin.go
new file mode 100644
index 00000000000..2415c82c964
--- /dev/null
+++ b/pkg/gen/internalmessages/service_item_param_origin.go
@@ -0,0 +1,84 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package internalmessages
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+ "encoding/json"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/validate"
+)
+
+// ServiceItemParamOrigin service item param origin
+//
+// swagger:model ServiceItemParamOrigin
+type ServiceItemParamOrigin string
+
+func NewServiceItemParamOrigin(value ServiceItemParamOrigin) *ServiceItemParamOrigin {
+ return &value
+}
+
+// Pointer returns a pointer to a freshly-allocated ServiceItemParamOrigin.
+func (m ServiceItemParamOrigin) Pointer() *ServiceItemParamOrigin {
+ return &m
+}
+
+const (
+
+ // ServiceItemParamOriginPRIME captures enum value "PRIME"
+ ServiceItemParamOriginPRIME ServiceItemParamOrigin = "PRIME"
+
+ // ServiceItemParamOriginSYSTEM captures enum value "SYSTEM"
+ ServiceItemParamOriginSYSTEM ServiceItemParamOrigin = "SYSTEM"
+
+ // ServiceItemParamOriginPRICER captures enum value "PRICER"
+ ServiceItemParamOriginPRICER ServiceItemParamOrigin = "PRICER"
+
+ // ServiceItemParamOriginPAYMENTREQUEST captures enum value "PAYMENT_REQUEST"
+ ServiceItemParamOriginPAYMENTREQUEST ServiceItemParamOrigin = "PAYMENT_REQUEST"
+)
+
+// for schema
+var serviceItemParamOriginEnum []interface{}
+
+func init() {
+ var res []ServiceItemParamOrigin
+ if err := json.Unmarshal([]byte(`["PRIME","SYSTEM","PRICER","PAYMENT_REQUEST"]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ serviceItemParamOriginEnum = append(serviceItemParamOriginEnum, v)
+ }
+}
+
+func (m ServiceItemParamOrigin) validateServiceItemParamOriginEnum(path, location string, value ServiceItemParamOrigin) error {
+ if err := validate.EnumCase(path, location, value, serviceItemParamOriginEnum, true); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Validate validates this service item param origin
+func (m ServiceItemParamOrigin) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ // value enum
+ if err := m.validateServiceItemParamOriginEnum("", "body", m); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+// ContextValidate validates this service item param origin based on context it is used
+func (m ServiceItemParamOrigin) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ return nil
+}
diff --git a/pkg/gen/internalmessages/service_item_param_type.go b/pkg/gen/internalmessages/service_item_param_type.go
new file mode 100644
index 00000000000..8fed68e90ab
--- /dev/null
+++ b/pkg/gen/internalmessages/service_item_param_type.go
@@ -0,0 +1,93 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package internalmessages
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+ "encoding/json"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/validate"
+)
+
+// ServiceItemParamType service item param type
+//
+// swagger:model ServiceItemParamType
+type ServiceItemParamType string
+
+func NewServiceItemParamType(value ServiceItemParamType) *ServiceItemParamType {
+ return &value
+}
+
+// Pointer returns a pointer to a freshly-allocated ServiceItemParamType.
+func (m ServiceItemParamType) Pointer() *ServiceItemParamType {
+ return &m
+}
+
+const (
+
+ // ServiceItemParamTypeSTRING captures enum value "STRING"
+ ServiceItemParamTypeSTRING ServiceItemParamType = "STRING"
+
+ // ServiceItemParamTypeDATE captures enum value "DATE"
+ ServiceItemParamTypeDATE ServiceItemParamType = "DATE"
+
+ // ServiceItemParamTypeINTEGER captures enum value "INTEGER"
+ ServiceItemParamTypeINTEGER ServiceItemParamType = "INTEGER"
+
+ // ServiceItemParamTypeDECIMAL captures enum value "DECIMAL"
+ ServiceItemParamTypeDECIMAL ServiceItemParamType = "DECIMAL"
+
+ // ServiceItemParamTypeTIMESTAMP captures enum value "TIMESTAMP"
+ ServiceItemParamTypeTIMESTAMP ServiceItemParamType = "TIMESTAMP"
+
+ // ServiceItemParamTypePaymentServiceItemUUID captures enum value "PaymentServiceItemUUID"
+ ServiceItemParamTypePaymentServiceItemUUID ServiceItemParamType = "PaymentServiceItemUUID"
+
+ // ServiceItemParamTypeBOOLEAN captures enum value "BOOLEAN"
+ ServiceItemParamTypeBOOLEAN ServiceItemParamType = "BOOLEAN"
+)
+
+// for schema
+var serviceItemParamTypeEnum []interface{}
+
+func init() {
+ var res []ServiceItemParamType
+ if err := json.Unmarshal([]byte(`["STRING","DATE","INTEGER","DECIMAL","TIMESTAMP","PaymentServiceItemUUID","BOOLEAN"]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ serviceItemParamTypeEnum = append(serviceItemParamTypeEnum, v)
+ }
+}
+
+func (m ServiceItemParamType) validateServiceItemParamTypeEnum(path, location string, value ServiceItemParamType) error {
+ if err := validate.EnumCase(path, location, value, serviceItemParamTypeEnum, true); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Validate validates this service item param type
+func (m ServiceItemParamType) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ // value enum
+ if err := m.validateServiceItemParamTypeEnum("", "body", m); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+// ContextValidate validates this service item param type based on context it is used
+func (m ServiceItemParamType) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ return nil
+}
diff --git a/pkg/gen/internalmessages/service_request_document.go b/pkg/gen/internalmessages/service_request_document.go
new file mode 100644
index 00000000000..0078b6a77a0
--- /dev/null
+++ b/pkg/gen/internalmessages/service_request_document.go
@@ -0,0 +1,121 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package internalmessages
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+ "strconv"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/swag"
+)
+
+// ServiceRequestDocument service request document
+//
+// swagger:model ServiceRequestDocument
+type ServiceRequestDocument struct {
+
+ // uploads
+ Uploads []*UploadWithOmissions `json:"uploads"`
+}
+
+// Validate validates this service request document
+func (m *ServiceRequestDocument) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateUploads(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *ServiceRequestDocument) validateUploads(formats strfmt.Registry) error {
+ if swag.IsZero(m.Uploads) { // not required
+ return nil
+ }
+
+ for i := 0; i < len(m.Uploads); i++ {
+ if swag.IsZero(m.Uploads[i]) { // not required
+ continue
+ }
+
+ if m.Uploads[i] != nil {
+ if err := m.Uploads[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("uploads" + "." + strconv.Itoa(i))
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("uploads" + "." + strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ return nil
+}
+
+// ContextValidate validate this service request document based on the context it is used
+func (m *ServiceRequestDocument) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.contextValidateUploads(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *ServiceRequestDocument) contextValidateUploads(ctx context.Context, formats strfmt.Registry) error {
+
+ for i := 0; i < len(m.Uploads); i++ {
+
+ if m.Uploads[i] != nil {
+
+ if swag.IsZero(m.Uploads[i]) { // not required
+ return nil
+ }
+
+ if err := m.Uploads[i].ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("uploads" + "." + strconv.Itoa(i))
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("uploads" + "." + strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *ServiceRequestDocument) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *ServiceRequestDocument) UnmarshalBinary(b []byte) error {
+ var res ServiceRequestDocument
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/pkg/gen/internalmessages/service_request_documents.go b/pkg/gen/internalmessages/service_request_documents.go
new file mode 100644
index 00000000000..0accee434c2
--- /dev/null
+++ b/pkg/gen/internalmessages/service_request_documents.go
@@ -0,0 +1,78 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package internalmessages
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+ "strconv"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/swag"
+)
+
+// ServiceRequestDocuments service request documents
+//
+// swagger:model ServiceRequestDocuments
+type ServiceRequestDocuments []*ServiceRequestDocument
+
+// Validate validates this service request documents
+func (m ServiceRequestDocuments) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+// ContextValidate validate this service request documents based on the context it is used
+func (m ServiceRequestDocuments) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if m[i] != nil {
+
+ if swag.IsZero(m[i]) { // not required
+ return nil
+ }
+
+ if err := m[i].ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/pkg/gen/internalmessages/shipment_address_update.go b/pkg/gen/internalmessages/shipment_address_update.go
new file mode 100644
index 00000000000..f60d85c32e4
--- /dev/null
+++ b/pkg/gen/internalmessages/shipment_address_update.go
@@ -0,0 +1,315 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package internalmessages
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// ShipmentAddressUpdate This represents a destination address change request made by the Prime that is either auto-approved or requires review if the pricing criteria has changed. If criteria has changed, then it must be approved or rejected by a TOO.
+//
+// swagger:model ShipmentAddressUpdate
+type ShipmentAddressUpdate struct {
+
+ // Contractor Remarks
+ //
+ // The reason there is an address change.
+ // Example: This is a contractor remark
+ // Required: true
+ // Read Only: true
+ ContractorRemarks string `json:"contractorRemarks"`
+
+ // id
+ // Example: c56a4180-65aa-42ec-a945-5fd21dec0538
+ // Required: true
+ // Read Only: true
+ // Format: uuid
+ ID strfmt.UUID `json:"id"`
+
+ // new address
+ // Required: true
+ NewAddress *Address `json:"newAddress"`
+
+ // Office Remarks
+ //
+ // The TOO comment on approval or rejection.
+ // Example: This is an office remark
+ OfficeRemarks *string `json:"officeRemarks,omitempty"`
+
+ // original address
+ // Required: true
+ OriginalAddress *Address `json:"originalAddress"`
+
+ // shipment ID
+ // Example: c56a4180-65aa-42ec-a945-5fd21dec0538
+ // Required: true
+ // Read Only: true
+ // Format: uuid
+ ShipmentID strfmt.UUID `json:"shipmentID"`
+
+ // status
+ // Required: true
+ Status ShipmentAddressUpdateStatus `json:"status"`
+}
+
+// Validate validates this shipment address update
+func (m *ShipmentAddressUpdate) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateContractorRemarks(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateNewAddress(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateOriginalAddress(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateShipmentID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateStatus(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *ShipmentAddressUpdate) validateContractorRemarks(formats strfmt.Registry) error {
+
+ if err := validate.RequiredString("contractorRemarks", "body", m.ContractorRemarks); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *ShipmentAddressUpdate) validateID(formats strfmt.Registry) error {
+
+ if err := validate.Required("id", "body", strfmt.UUID(m.ID)); err != nil {
+ return err
+ }
+
+ if err := validate.FormatOf("id", "body", "uuid", m.ID.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *ShipmentAddressUpdate) validateNewAddress(formats strfmt.Registry) error {
+
+ if err := validate.Required("newAddress", "body", m.NewAddress); err != nil {
+ return err
+ }
+
+ if m.NewAddress != nil {
+ if err := m.NewAddress.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("newAddress")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("newAddress")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *ShipmentAddressUpdate) validateOriginalAddress(formats strfmt.Registry) error {
+
+ if err := validate.Required("originalAddress", "body", m.OriginalAddress); err != nil {
+ return err
+ }
+
+ if m.OriginalAddress != nil {
+ if err := m.OriginalAddress.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("originalAddress")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("originalAddress")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *ShipmentAddressUpdate) validateShipmentID(formats strfmt.Registry) error {
+
+ if err := validate.Required("shipmentID", "body", strfmt.UUID(m.ShipmentID)); err != nil {
+ return err
+ }
+
+ if err := validate.FormatOf("shipmentID", "body", "uuid", m.ShipmentID.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *ShipmentAddressUpdate) validateStatus(formats strfmt.Registry) error {
+
+ if err := validate.Required("status", "body", ShipmentAddressUpdateStatus(m.Status)); err != nil {
+ return err
+ }
+
+ if err := m.Status.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("status")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("status")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// ContextValidate validate this shipment address update based on the context it is used
+func (m *ShipmentAddressUpdate) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.contextValidateContractorRemarks(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateID(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateNewAddress(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateOriginalAddress(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateShipmentID(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateStatus(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *ShipmentAddressUpdate) contextValidateContractorRemarks(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "contractorRemarks", "body", string(m.ContractorRemarks)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *ShipmentAddressUpdate) contextValidateID(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "id", "body", strfmt.UUID(m.ID)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *ShipmentAddressUpdate) contextValidateNewAddress(ctx context.Context, formats strfmt.Registry) error {
+
+ if m.NewAddress != nil {
+
+ if err := m.NewAddress.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("newAddress")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("newAddress")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *ShipmentAddressUpdate) contextValidateOriginalAddress(ctx context.Context, formats strfmt.Registry) error {
+
+ if m.OriginalAddress != nil {
+
+ if err := m.OriginalAddress.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("originalAddress")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("originalAddress")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *ShipmentAddressUpdate) contextValidateShipmentID(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "shipmentID", "body", strfmt.UUID(m.ShipmentID)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *ShipmentAddressUpdate) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := m.Status.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("status")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("status")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *ShipmentAddressUpdate) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *ShipmentAddressUpdate) UnmarshalBinary(b []byte) error {
+ var res ShipmentAddressUpdate
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/pkg/gen/internalmessages/shipment_address_update_status.go b/pkg/gen/internalmessages/shipment_address_update_status.go
new file mode 100644
index 00000000000..bb9475488d5
--- /dev/null
+++ b/pkg/gen/internalmessages/shipment_address_update_status.go
@@ -0,0 +1,90 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package internalmessages
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+ "encoding/json"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/validate"
+)
+
+// ShipmentAddressUpdateStatus Status
+//
+// swagger:model ShipmentAddressUpdateStatus
+type ShipmentAddressUpdateStatus string
+
+func NewShipmentAddressUpdateStatus(value ShipmentAddressUpdateStatus) *ShipmentAddressUpdateStatus {
+ return &value
+}
+
+// Pointer returns a pointer to a freshly-allocated ShipmentAddressUpdateStatus.
+func (m ShipmentAddressUpdateStatus) Pointer() *ShipmentAddressUpdateStatus {
+ return &m
+}
+
+const (
+
+ // ShipmentAddressUpdateStatusREQUESTED captures enum value "REQUESTED"
+ ShipmentAddressUpdateStatusREQUESTED ShipmentAddressUpdateStatus = "REQUESTED"
+
+ // ShipmentAddressUpdateStatusREJECTED captures enum value "REJECTED"
+ ShipmentAddressUpdateStatusREJECTED ShipmentAddressUpdateStatus = "REJECTED"
+
+ // ShipmentAddressUpdateStatusAPPROVED captures enum value "APPROVED"
+ ShipmentAddressUpdateStatusAPPROVED ShipmentAddressUpdateStatus = "APPROVED"
+)
+
+// for schema
+var shipmentAddressUpdateStatusEnum []interface{}
+
+func init() {
+ var res []ShipmentAddressUpdateStatus
+ if err := json.Unmarshal([]byte(`["REQUESTED","REJECTED","APPROVED"]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ shipmentAddressUpdateStatusEnum = append(shipmentAddressUpdateStatusEnum, v)
+ }
+}
+
+func (m ShipmentAddressUpdateStatus) validateShipmentAddressUpdateStatusEnum(path, location string, value ShipmentAddressUpdateStatus) error {
+ if err := validate.EnumCase(path, location, value, shipmentAddressUpdateStatusEnum, true); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Validate validates this shipment address update status
+func (m ShipmentAddressUpdateStatus) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ // value enum
+ if err := m.validateShipmentAddressUpdateStatusEnum("", "body", m); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+// ContextValidate validate this shipment address update status based on the context it is used
+func (m ShipmentAddressUpdateStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ var res []error
+
+ if err := validate.ReadOnly(ctx, "", "body", ShipmentAddressUpdateStatus(m)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/pkg/gen/internalmessages/storage_facility.go b/pkg/gen/internalmessages/storage_facility.go
new file mode 100644
index 00000000000..e50a749dfd1
--- /dev/null
+++ b/pkg/gen/internalmessages/storage_facility.go
@@ -0,0 +1,194 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package internalmessages
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// StorageFacility The Storage Facility information for the shipment
+//
+// swagger:model StorageFacility
+type StorageFacility struct {
+
+ // address
+ Address *Address `json:"address,omitempty"`
+
+ // e tag
+ // Read Only: true
+ ETag string `json:"eTag,omitempty"`
+
+ // email
+ // Pattern: ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$
+ Email *string `json:"email,omitempty"`
+
+ // facility name
+ FacilityName string `json:"facilityName,omitempty"`
+
+ // id
+ // Example: c56a4180-65aa-42ec-a945-5fd21dec0538
+ // Format: uuid
+ ID strfmt.UUID `json:"id,omitempty"`
+
+ // lot number
+ LotNumber *string `json:"lotNumber,omitempty"`
+
+ // phone
+ // Pattern: ^[2-9]\d{2}-\d{3}-\d{4}$
+ Phone *string `json:"phone,omitempty"`
+}
+
+// Validate validates this storage facility
+func (m *StorageFacility) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateAddress(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateEmail(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validatePhone(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *StorageFacility) validateAddress(formats strfmt.Registry) error {
+ if swag.IsZero(m.Address) { // not required
+ return nil
+ }
+
+ if m.Address != nil {
+ if err := m.Address.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("address")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("address")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *StorageFacility) validateEmail(formats strfmt.Registry) error {
+ if swag.IsZero(m.Email) { // not required
+ return nil
+ }
+
+ if err := validate.Pattern("email", "body", *m.Email, `^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *StorageFacility) validateID(formats strfmt.Registry) error {
+ if swag.IsZero(m.ID) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("id", "body", "uuid", m.ID.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *StorageFacility) validatePhone(formats strfmt.Registry) error {
+ if swag.IsZero(m.Phone) { // not required
+ return nil
+ }
+
+ if err := validate.Pattern("phone", "body", *m.Phone, `^[2-9]\d{2}-\d{3}-\d{4}$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// ContextValidate validate this storage facility based on the context it is used
+func (m *StorageFacility) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.contextValidateAddress(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateETag(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *StorageFacility) contextValidateAddress(ctx context.Context, formats strfmt.Registry) error {
+
+ if m.Address != nil {
+
+ if swag.IsZero(m.Address) { // not required
+ return nil
+ }
+
+ if err := m.Address.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("address")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("address")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *StorageFacility) contextValidateETag(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "eTag", "body", string(m.ETag)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *StorageFacility) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *StorageFacility) UnmarshalBinary(b []byte) error {
+ var res StorageFacility
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/pkg/gen/internalmessages/upload_with_omissions.go b/pkg/gen/internalmessages/upload_with_omissions.go
new file mode 100644
index 00000000000..17d77acd97c
--- /dev/null
+++ b/pkg/gen/internalmessages/upload_with_omissions.go
@@ -0,0 +1,276 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package internalmessages
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+ "encoding/json"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// UploadWithOmissions An uploaded file.
+//
+// swagger:model UploadWithOmissions
+type UploadWithOmissions struct {
+
+ // bytes
+ // Required: true
+ Bytes *int64 `json:"bytes"`
+
+ // content type
+ // Example: application/pdf
+ // Required: true
+ ContentType *string `json:"contentType"`
+
+ // created at
+ // Read Only: true
+ // Format: date-time
+ CreatedAt strfmt.DateTime `json:"createdAt,omitempty"`
+
+ // filename
+ // Example: filename.pdf
+ // Required: true
+ Filename *string `json:"filename"`
+
+ // id
+ // Example: c56a4180-65aa-42ec-a945-5fd21dec0538
+ // Format: uuid
+ ID strfmt.UUID `json:"id,omitempty"`
+
+ // status
+ // Enum: [INFECTED CLEAN PROCESSING]
+ Status string `json:"status,omitempty"`
+
+ // updated at
+ // Read Only: true
+ // Format: date-time
+ UpdatedAt strfmt.DateTime `json:"updatedAt,omitempty"`
+
+ // url
+ // Example: https://uploads.domain.test/dir/c56a4180-65aa-42ec-a945-5fd21dec0538
+ // Format: uri
+ URL strfmt.URI `json:"url,omitempty"`
+}
+
+// Validate validates this upload with omissions
+func (m *UploadWithOmissions) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateBytes(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateContentType(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateCreatedAt(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateFilename(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateStatus(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateUpdatedAt(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateURL(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *UploadWithOmissions) validateBytes(formats strfmt.Registry) error {
+
+ if err := validate.Required("bytes", "body", m.Bytes); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *UploadWithOmissions) validateContentType(formats strfmt.Registry) error {
+
+ if err := validate.Required("contentType", "body", m.ContentType); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *UploadWithOmissions) validateCreatedAt(formats strfmt.Registry) error {
+ if swag.IsZero(m.CreatedAt) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("createdAt", "body", "date-time", m.CreatedAt.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *UploadWithOmissions) validateFilename(formats strfmt.Registry) error {
+
+ if err := validate.Required("filename", "body", m.Filename); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *UploadWithOmissions) validateID(formats strfmt.Registry) error {
+ if swag.IsZero(m.ID) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("id", "body", "uuid", m.ID.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+var uploadWithOmissionsTypeStatusPropEnum []interface{}
+
+func init() {
+ var res []string
+ if err := json.Unmarshal([]byte(`["INFECTED","CLEAN","PROCESSING"]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ uploadWithOmissionsTypeStatusPropEnum = append(uploadWithOmissionsTypeStatusPropEnum, v)
+ }
+}
+
+const (
+
+ // UploadWithOmissionsStatusINFECTED captures enum value "INFECTED"
+ UploadWithOmissionsStatusINFECTED string = "INFECTED"
+
+ // UploadWithOmissionsStatusCLEAN captures enum value "CLEAN"
+ UploadWithOmissionsStatusCLEAN string = "CLEAN"
+
+ // UploadWithOmissionsStatusPROCESSING captures enum value "PROCESSING"
+ UploadWithOmissionsStatusPROCESSING string = "PROCESSING"
+)
+
+// prop value enum
+func (m *UploadWithOmissions) validateStatusEnum(path, location string, value string) error {
+ if err := validate.EnumCase(path, location, value, uploadWithOmissionsTypeStatusPropEnum, true); err != nil {
+ return err
+ }
+ return nil
+}
+
+func (m *UploadWithOmissions) validateStatus(formats strfmt.Registry) error {
+ if swag.IsZero(m.Status) { // not required
+ return nil
+ }
+
+ // value enum
+ if err := m.validateStatusEnum("status", "body", m.Status); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *UploadWithOmissions) validateUpdatedAt(formats strfmt.Registry) error {
+ if swag.IsZero(m.UpdatedAt) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("updatedAt", "body", "date-time", m.UpdatedAt.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *UploadWithOmissions) validateURL(formats strfmt.Registry) error {
+ if swag.IsZero(m.URL) { // not required
+ return nil
+ }
+
+ if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// ContextValidate validate this upload with omissions based on the context it is used
+func (m *UploadWithOmissions) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.contextValidateCreatedAt(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateUpdatedAt(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *UploadWithOmissions) contextValidateCreatedAt(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "createdAt", "body", strfmt.DateTime(m.CreatedAt)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *UploadWithOmissions) contextValidateUpdatedAt(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "updatedAt", "body", strfmt.DateTime(m.UpdatedAt)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *UploadWithOmissions) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *UploadWithOmissions) UnmarshalBinary(b []byte) error {
+ var res UploadWithOmissions
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/swagger-def/internal.yaml b/swagger-def/internal.yaml
index 63300848358..1e0cec3f900 100644
--- a/swagger-def/internal.yaml
+++ b/swagger-def/internal.yaml
@@ -2690,6 +2690,17 @@ definitions:
- title
- detail
type: object
+ MovesList:
+ type: object
+ properties:
+ currentMove:
+ type: array
+ items:
+ $ref: 'definitions/prime/MoveTaskOrder.yaml'
+ previousMoves:
+ type: array
+ items:
+ $ref: 'definitions/prime/MoveTaskOrder.yaml'
paths:
/estimates/ppm:
get:
@@ -3035,6 +3046,36 @@ paths:
description: payload is too large
'500':
description: server error
+ /all_moves/{serviceMemberId}:
+ get:
+ summary: Return the current and previous moves of a service member
+ description: |
+ Gets all moves that belongs to the serviceMember
+ operationId: getAllMoves
+ tags:
+ - moves
+ produces:
+ - application/json
+ parameters:
+ - in: path
+ name: serviceMemberId
+ type: string
+ format: uuid
+ required: true
+ description: UUID of the service member
+ responses:
+ '200':
+ description: >-
+ Successfully retrieved moves. A successful fetch might still return
+ zero moves.
+ schema:
+ $ref: '#/definitions/MovesList'
+ '401':
+ $ref: '#/responses/PermissionDenied'
+ '403':
+ $ref: '#/responses/PermissionDenied'
+ '500':
+ $ref: '#/responses/ServerError'
/moves/{moveId}:
patch:
summary: Patches the move
diff --git a/swagger/internal.yaml b/swagger/internal.yaml
index 496ed4142f4..c86dc32bb56 100644
--- a/swagger/internal.yaml
+++ b/swagger/internal.yaml
@@ -2723,6 +2723,17 @@ definitions:
- title
- detail
type: object
+ MovesList:
+ type: object
+ properties:
+ currentMove:
+ type: array
+ items:
+ $ref: '#/definitions/MoveTaskOrder'
+ previousMoves:
+ type: array
+ items:
+ $ref: '#/definitions/MoveTaskOrder'
FeatureFlagBoolean:
description: A feature flag
type: object
@@ -3877,106 +3888,1486 @@ definitions:
- destinationPostalCode
- sitExpected
- eTag
- PpmID:
- description: |
- The PPM Shipment ID to associate with the assigned certificate.
+ Customer:
+ type: object
+ properties:
+ id:
+ type: string
+ format: uuid
+ example: c56a4180-65aa-42ec-a945-5fd21dec0538
+ dodID:
+ type: string
+ userID:
+ type: string
+ format: uuid
+ example: c56a4180-65aa-42ec-a945-5fd21dec0538
+ currentAddress:
+ $ref: '#/definitions/Address'
+ firstName:
+ type: string
+ example: Vanya
+ lastName:
+ type: string
+ example: Petrovna
+ branch:
+ type: string
+ example: COAST_GUARD
+ phone:
+ type: string
+ format: telephone
+ email:
+ type: string
+ format: x-email
+ pattern: ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$
+ example: fake@example.com
+ eTag:
+ type: string
+ readOnly: true
+ Entitlements:
+ type: object
+ properties:
+ id:
+ example: 571008b1-b0de-454d-b843-d71be9f02c04
+ format: uuid
+ type: string
+ authorizedWeight:
+ example: 2000
+ type: integer
+ x-formatting: weight
+ x-nullable: true
+ dependentsAuthorized:
+ example: true
+ type: boolean
+ x-nullable: true
+ nonTemporaryStorage:
+ example: false
+ type: boolean
+ x-nullable: true
+ privatelyOwnedVehicle:
+ example: false
+ type: boolean
+ x-nullable: true
+ proGearWeight:
+ example: 2000
+ type: integer
+ x-formatting: weight
+ proGearWeightSpouse:
+ example: 500
+ type: integer
+ x-formatting: weight
+ requiredMedicalEquipmentWeight:
+ example: 500
+ type: integer
+ x-formatting: weight
+ organizationalClothingAndIndividualEquipment:
+ type: boolean
+ example: false
+ storageInTransit:
+ example: 90
+ type: integer
+ totalWeight:
+ example: 500
+ type: integer
+ x-formatting: weight
+ totalDependents:
+ example: 2
+ type: integer
+ eTag:
+ type: string
+ readOnly: true
+ DutyLocation:
+ type: object
+ properties:
+ id:
+ type: string
+ format: uuid
+ example: c56a4180-65aa-42ec-a945-5fd21dec0538
+ name:
+ type: string
+ example: Fort Bragg North Station
+ addressID:
+ type: string
+ format: uuid
+ example: c56a4180-65aa-42ec-a945-5fd21dec0538
+ address:
+ $ref: '#/definitions/Address'
+ eTag:
+ type: string
+ readOnly: true
+ Order:
+ type: object
+ required:
+ - orderNumber
+ - rank
+ - linesOfAccounting
+ properties:
+ id:
+ example: c56a4180-65aa-42ec-a945-5fd21dec0538
+ format: uuid
+ type: string
+ customer:
+ $ref: '#/definitions/Customer'
+ customerID:
+ example: c56a4180-65aa-42ec-a945-5fd21dec0538
+ format: uuid
+ type: string
+ entitlement:
+ $ref: '#/definitions/Entitlements'
+ destinationDutyLocation:
+ $ref: '#/definitions/DutyLocation'
+ originDutyLocation:
+ $ref: '#/definitions/DutyLocation'
+ originDutyLocationGBLOC:
+ type: string
+ example: KKFA
+ rank:
+ type: string
+ example: E_5
+ reportByDate:
+ type: string
+ format: date
+ ordersType:
+ $ref: '#/definitions/OrdersType'
+ orderNumber:
+ type: string
+ linesOfAccounting:
+ type: string
+ eTag:
+ type: string
+ readOnly: true
+ PaymentRequestStatus:
type: string
- format: uuid
- example: c56a4180-65aa-42ec-a945-5fd21dec0538
- x-nullable: true
- MovingExpenseType:
+ enum:
+ - PENDING
+ - REVIEWED
+ - REVIEWED_AND_ALL_SERVICE_ITEMS_REJECTED
+ - SENT_TO_GEX
+ - RECEIVED_BY_GEX
+ - PAID
+ - EDI_ERROR
+ - DEPRECATED
+ title: Payment Request Status
+ UploadWithOmissions:
+ description: An uploaded file.
+ type: object
+ properties:
+ id:
+ type: string
+ format: uuid
+ example: c56a4180-65aa-42ec-a945-5fd21dec0538
+ url:
+ type: string
+ format: uri
+ example: https://uploads.domain.test/dir/c56a4180-65aa-42ec-a945-5fd21dec0538
+ filename:
+ type: string
+ example: filename.pdf
+ contentType:
+ type: string
+ format: mime-type
+ example: application/pdf
+ bytes:
+ type: integer
+ status:
+ type: string
+ enum:
+ - INFECTED
+ - CLEAN
+ - PROCESSING
+ createdAt:
+ type: string
+ format: date-time
+ readOnly: true
+ updatedAt:
+ type: string
+ format: date-time
+ readOnly: true
+ required:
+ - filename
+ - contentType
+ - bytes
+ ProofOfServiceDoc:
+ type: object
+ properties:
+ uploads:
+ type: array
+ items:
+ $ref: '#/definitions/UploadWithOmissions'
+ ProofOfServiceDocs:
+ type: array
+ items:
+ $ref: '#/definitions/ProofOfServiceDoc'
+ PaymentServiceItemStatus:
type: string
- description: Moving Expense Type
enum:
- - CONTRACTED_EXPENSE
- - GAS
- - OIL
- - OTHER
- - PACKING_MATERIALS
- - RENTAL_EQUIPMENT
- - STORAGE
- - TOLLS
- - WEIGHING_FEE
- x-display-value:
- CONTRACTED_EXPENSE: Contracted expense
- GAS: Gas
- OIL: Oil
- OTHER: Other
- PACKING_MATERIALS: Packing materials
- STORAGE: Storage
- RENTAL_EQUIPMENT: Rental equipment
- TOLLS: Tolls
- WEIGHING_FEE: Weighing fee
- NullableString:
+ - REQUESTED
+ - APPROVED
+ - DENIED
+ - SENT_TO_GEX
+ - PAID
+ - EDI_ERROR
+ title: Payment Service Item Status
+ ServiceItemParamName:
type: string
- x-go-type:
- import:
- package: github.com/transcom/mymove/pkg/swagger/nullable
- type: String
-paths:
- /estimates/ppm:
- get:
- summary: Return a PPM cost estimate
- description: Calculates a reimbursement range for a PPM move (excluding SIT)
- operationId: showPPMEstimate
- tags:
- - ppm
- parameters:
- - in: query
- name: original_move_date
- type: string
- format: date
- required: true
- - in: query
- name: origin_zip
- type: string
- format: zip
- pattern: ^(\d{5}([\-]\d{4})?)$
- required: true
- - in: query
- name: origin_duty_location_zip
- type: string
- format: zip
- pattern: ^(\d{5}([\-]\d{4})?)$
- required: true
- - in: query
- name: orders_id
- type: string
- format: uuid
- required: true
- - in: query
- name: weight_estimate
- type: integer
- required: true
- responses:
- '200':
- description: Made estimate of PPM cost range
- schema:
- $ref: '#/definitions/PPMEstimateRange'
- '400':
- description: invalid request
- '401':
- description: request requires user authentication
- '403':
- description: user is not authorized
- '404':
- description: >-
- ppm discount not found for provided postal codes and original move
- date
- '409':
- description: distance is less than 50 miles (no short haul moves)
- '422':
- description: cannot process request with given information
- '500':
- description: internal server error
- /estimates/ppm_sit:
- get:
- summary: Return a PPM move's SIT cost estimate
- description: Calculates a reimbursment for a PPM move's SIT
- operationId: showPPMSitEstimate
- tags:
- - ppm
- parameters:
+ enum:
+ - ActualPickupDate
+ - ContractCode
+ - ContractYearName
+ - CubicFeetBilled
+ - CubicFeetCrating
+ - DimensionHeight
+ - DimensionLength
+ - DimensionWidth
+ - DistanceZip
+ - DistanceZipSITDest
+ - DistanceZipSITOrigin
+ - EIAFuelPrice
+ - EscalationCompounded
+ - FSCMultiplier
+ - FSCPriceDifferenceInCents
+ - FSCWeightBasedDistanceMultiplier
+ - IsPeak
+ - MarketDest
+ - MarketOrigin
+ - MTOAvailableToPrimeAt
+ - NTSPackingFactor
+ - NumberDaysSIT
+ - PriceAreaDest
+ - PriceAreaIntlDest
+ - PriceAreaIntlOrigin
+ - PriceAreaOrigin
+ - PriceRateOrFactor
+ - PSI_LinehaulDom
+ - PSI_LinehaulDomPrice
+ - PSI_LinehaulShort
+ - PSI_LinehaulShortPrice
+ - PSI_PriceDomDest
+ - PSI_PriceDomDestPrice
+ - PSI_PriceDomOrigin
+ - PSI_PriceDomOriginPrice
+ - PSI_ShippingLinehaulIntlCO
+ - PSI_ShippingLinehaulIntlCOPrice
+ - PSI_ShippingLinehaulIntlOC
+ - PSI_ShippingLinehaulIntlOCPrice
+ - PSI_ShippingLinehaulIntlOO
+ - PSI_ShippingLinehaulIntlOOPrice
+ - RateAreaNonStdDest
+ - RateAreaNonStdOrigin
+ - ReferenceDate
+ - RequestedPickupDate
+ - ServiceAreaDest
+ - ServiceAreaOrigin
+ - ServicesScheduleDest
+ - ServicesScheduleOrigin
+ - SITPaymentRequestEnd
+ - SITPaymentRequestStart
+ - SITScheduleDest
+ - SITScheduleOrigin
+ - SITServiceAreaDest
+ - SITServiceAreaOrigin
+ - WeightAdjusted
+ - WeightBilled
+ - WeightEstimated
+ - WeightOriginal
+ - WeightReweigh
+ - ZipDestAddress
+ - ZipPickupAddress
+ - ZipSITDestHHGFinalAddress
+ - ZipSITDestHHGOriginalAddress
+ - ZipSITOriginHHGActualAddress
+ - ZipSITOriginHHGOriginalAddress
+ ServiceItemParamType:
+ type: string
+ enum:
+ - STRING
+ - DATE
+ - INTEGER
+ - DECIMAL
+ - TIMESTAMP
+ - PaymentServiceItemUUID
+ - BOOLEAN
+ ServiceItemParamOrigin:
+ type: string
+ enum:
+ - PRIME
+ - SYSTEM
+ - PRICER
+ - PAYMENT_REQUEST
+ PaymentServiceItemParam:
+ type: object
+ properties:
+ id:
+ example: c56a4180-65aa-42ec-a945-5fd21dec0538
+ format: uuid
+ readOnly: true
+ type: string
+ paymentServiceItemID:
+ example: c56a4180-65aa-42ec-a945-5fd21dec0538
+ format: uuid
+ type: string
+ key:
+ $ref: '#/definitions/ServiceItemParamName'
+ value:
+ example: '3025'
+ type: string
+ type:
+ $ref: '#/definitions/ServiceItemParamType'
+ origin:
+ $ref: '#/definitions/ServiceItemParamOrigin'
+ eTag:
+ type: string
+ readOnly: true
+ PaymentServiceItemParams:
+ type: array
+ items:
+ $ref: '#/definitions/PaymentServiceItemParam'
+ PaymentServiceItem:
+ type: object
+ properties:
+ id:
+ example: c56a4180-65aa-42ec-a945-5fd21dec0538
+ format: uuid
+ readOnly: true
+ type: string
+ paymentRequestID:
+ example: c56a4180-65aa-42ec-a945-5fd21dec0538
+ format: uuid
+ type: string
+ mtoServiceItemID:
+ example: c56a4180-65aa-42ec-a945-5fd21dec0538
+ format: uuid
+ type: string
+ status:
+ $ref: '#/definitions/PaymentServiceItemStatus'
+ priceCents:
+ type: integer
+ format: cents
+ title: Price of the service item in cents
+ x-nullable: true
+ rejectionReason:
+ example: documentation was incomplete
+ type: string
+ x-nullable: true
+ referenceID:
+ example: 1234-5678-c56a4180
+ readOnly: true
+ format: string
+ paymentServiceItemParams:
+ $ref: '#/definitions/PaymentServiceItemParams'
+ eTag:
+ type: string
+ readOnly: true
+ PaymentServiceItems:
+ type: array
+ items:
+ $ref: '#/definitions/PaymentServiceItem'
+ PaymentRequest:
+ type: object
+ properties:
+ id:
+ example: c56a4180-65aa-42ec-a945-5fd21dec0538
+ format: uuid
+ readOnly: true
+ type: string
+ isFinal:
+ default: false
+ type: boolean
+ moveTaskOrderID:
+ example: c56a4180-65aa-42ec-a945-5fd21dec0538
+ format: uuid
+ type: string
+ rejectionReason:
+ example: documentation was incomplete
+ type: string
+ x-nullable: true
+ status:
+ $ref: '#/definitions/PaymentRequestStatus'
+ paymentRequestNumber:
+ example: 1234-5678-1
+ readOnly: true
+ type: string
+ recalculationOfPaymentRequestID:
+ example: c56a4180-65aa-42ec-a945-5fd21dec0538
+ format: uuid
+ type: string
+ readOnly: true
+ x-nullable: true
+ proofOfServiceDocs:
+ $ref: '#/definitions/ProofOfServiceDocs'
+ paymentServiceItems:
+ $ref: '#/definitions/PaymentServiceItems'
+ eTag:
+ type: string
+ readOnly: true
+ PaymentRequests:
+ type: array
+ items:
+ $ref: '#/definitions/PaymentRequest'
+ MTOServiceItemStatus:
+ description: >-
+ The status of a service item, indicating where it is in the TOO's approval
+ process.
+ type: string
+ readOnly: true
+ enum:
+ - SUBMITTED
+ - APPROVED
+ - REJECTED
+ MTOServiceItemModelType:
+ description: >
+ Describes all model sub-types for a MTOServiceItem model.
+
+
+ Using this list, choose the correct modelType in the dropdown,
+ corresponding to the service item type.
+ * DOFSIT, DOASIT - MTOServiceItemOriginSIT
+ * DDFSIT, DDASIT - MTOServiceItemDestSIT
+ * DOSHUT, DDSHUT - MTOServiceItemShuttle
+ * DCRT, DUCRT - MTOServiceItemDomesticCrating
+
+ The documentation will then update with the supported fields.
+ type: string
+ enum:
+ - MTOServiceItemBasic
+ - MTOServiceItemOriginSIT
+ - MTOServiceItemDestSIT
+ - MTOServiceItemShuttle
+ - MTOServiceItemDomesticCrating
+ ServiceRequestDocument:
+ properties:
+ uploads:
+ items:
+ $ref: '#/definitions/UploadWithOmissions'
+ type: array
+ type: object
+ ServiceRequestDocuments:
+ items:
+ $ref: '#/definitions/ServiceRequestDocument'
+ type: array
+ MTOServiceItem:
+ description: MTOServiceItem describes a base type of a service item. Polymorphic type.
+ type: object
+ discriminator: modelType
+ properties:
+ id:
+ example: 1f2270c7-7166-40ae-981e-b200ebdf3054
+ format: uuid
+ type: string
+ description: The ID of the service item.
+ readOnly: true
+ moveTaskOrderID:
+ example: 1f2270c7-7166-40ae-981e-b200ebdf3054
+ format: uuid
+ type: string
+ description: The ID of the move for this service item.
+ mtoShipmentID:
+ example: 1f2270c7-7166-40ae-981e-b200ebdf3054
+ format: uuid
+ type: string
+ description: The ID of the shipment this service is for, if any. Optional.
+ reServiceName:
+ type: string
+ readOnly: true
+ description: The full descriptive name of the service.
+ status:
+ $ref: '#/definitions/MTOServiceItemStatus'
+ rejectionReason:
+ example: item was too heavy
+ type: string
+ x-nullable: true
+ readOnly: true
+ description: The reason why this service item was rejected by the TOO.
+ modelType:
+ $ref: '#/definitions/MTOServiceItemModelType'
+ serviceRequestDocuments:
+ $ref: '#/definitions/ServiceRequestDocuments'
+ eTag:
+ type: string
+ readOnly: true
+ description: >-
+ A hash unique to this service item that should be used as the
+ "If-Match" header for any updates.
+ required:
+ - modelType
+ - moveTaskOrderID
+ MTOAgentType-2:
+ title: Agent Type
+ description: >
+ The type for this agent. `RELEASING` means they have authority on pickup,
+ `RECEIVING` means they can receive the shipment on delivery.
+ type: string
+ example: RELEASING_AGENT
+ enum:
+ - RELEASING_AGENT
+ - RECEIVING_AGENT
+ MTOAgent-2:
+ properties:
+ id:
+ description: The ID of the agent.
+ example: 1f2270c7-7166-40ae-981e-b200ebdf3054
+ format: uuid
+ readOnly: true
+ type: string
+ mtoShipmentID:
+ description: The ID of the shipment this agent is permitted to release/receive.
+ example: 1f2270c7-7166-40ae-981e-b200ebdf3054
+ format: uuid
+ type: string
+ readOnly: true
+ createdAt:
+ format: date-time
+ type: string
+ readOnly: true
+ updatedAt:
+ format: date-time
+ type: string
+ readOnly: true
+ firstName:
+ type: string
+ x-nullable: true
+ lastName:
+ type: string
+ x-nullable: true
+ email:
+ type: string
+ format: x-email
+ pattern: ^([a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,})?$
+ x-nullable: true
+ phone:
+ type: string
+ format: telephone
+ pattern: ^([2-9]\d{2}-\d{3}-\d{4})?$
+ x-nullable: true
+ agentType:
+ $ref: '#/definitions/MTOAgentType-2'
+ eTag:
+ type: string
+ readOnly: true
+ type: object
+ MTOAgents-2:
+ description: >
+ A list of the agents for a shipment. Agents are the people who the Prime
+ contractor recognize as permitted to release (in the case of pickup) or
+ receive (on delivery) a shipment.
+ items:
+ $ref: '#/definitions/MTOAgent-2'
+ type: array
+ maxItems: 2
+ SITExtension:
+ type: object
+ description: >-
+ A storage in transit (SIT) Extension is a request for an increase in the
+ billable number of days a shipment is allowed to be in SIT.
+ properties:
+ id:
+ example: 1f2270c7-7166-40ae-981e-b200ebdf3054
+ format: uuid
+ type: string
+ mtoShipmentID:
+ example: 1f2270c7-7166-40ae-981e-b200ebdf3054
+ format: uuid
+ type: string
+ requestReason:
+ type: string
+ enum:
+ - SERIOUS_ILLNESS_MEMBER
+ - SERIOUS_ILLNESS_DEPENDENT
+ - IMPENDING_ASSIGNEMENT
+ - DIRECTED_TEMPORARY_DUTY
+ - NONAVAILABILITY_OF_CIVILIAN_HOUSING
+ - AWAITING_COMPLETION_OF_RESIDENCE
+ - OTHER
+ contractorRemarks:
+ example: We need SIT additional days. The customer has not found a house yet.
+ type: string
+ x-nullable: true
+ x-omitempty: false
+ requestedDays:
+ type: integer
+ example: 30
+ status:
+ enum:
+ - PENDING
+ - APPROVED
+ - DENIED
+ approvedDays:
+ type: integer
+ example: 30
+ x-nullable: true
+ x-omitempty: false
+ decisionDate:
+ format: date-time
+ type: string
+ x-nullable: true
+ x-omitempty: false
+ officeRemarks:
+ type: string
+ x-nullable: true
+ x-omitempty: false
+ createdAt:
+ format: date-time
+ type: string
+ readOnly: true
+ updatedAt:
+ format: date-time
+ type: string
+ readOnly: true
+ eTag:
+ type: string
+ readOnly: true
+ SITExtensions:
+ type: array
+ items:
+ $ref: '#/definitions/SITExtension'
+ ReweighRequester:
+ type: string
+ enum:
+ - CUSTOMER
+ - PRIME
+ - SYSTEM
+ - TOO
+ Reweigh:
+ description: >-
+ A reweigh is when a shipment is weighed for a second time due to the
+ request of a customer, the contractor, system or TOO.
+ properties:
+ id:
+ example: 1f2270c7-7166-40ae-981e-b200ebdf3054
+ format: uuid
+ type: string
+ requestedAt:
+ format: date-time
+ type: string
+ requestedBy:
+ $ref: '#/definitions/ReweighRequester'
+ verificationProvidedAt:
+ format: date-time
+ type: string
+ x-nullable: true
+ x-omitempty: false
+ verificationReason:
+ example: >-
+ The reweigh was not performed due to some justification provided by
+ the Prime
+ type: string
+ x-nullable: true
+ x-omitempty: false
+ weight:
+ example: 2000
+ type: integer
+ x-formatting: weight
+ x-nullable: true
+ x-omitempty: false
+ shipmentID:
+ example: 1f2270c7-7166-40ae-981e-b200ebdf3054
+ format: uuid
+ type: string
+ createdAt:
+ format: date-time
+ type: string
+ readOnly: true
+ updatedAt:
+ format: date-time
+ type: string
+ readOnly: true
+ eTag:
+ type: string
+ readOnly: true
+ DestinationType:
+ type: string
+ title: Destination Type
+ example: OTHER_THAN_AUTHORIZED
+ x-nullable: true
+ enum:
+ - HOME_OF_RECORD
+ - HOME_OF_SELECTION
+ - PLACE_ENTERED_ACTIVE_DUTY
+ - OTHER_THAN_AUTHORIZED
+ StorageFacility:
+ description: The Storage Facility information for the shipment
+ type: object
+ properties:
+ id:
+ type: string
+ format: uuid
+ example: c56a4180-65aa-42ec-a945-5fd21dec0538
+ facilityName:
+ type: string
+ address:
+ $ref: '#/definitions/Address'
+ lotNumber:
+ type: string
+ x-nullable: true
+ phone:
+ type: string
+ format: telephone
+ pattern: ^[2-9]\d{2}-\d{3}-\d{4}$
+ x-nullable: true
+ email:
+ type: string
+ format: x-email
+ pattern: ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$
+ x-nullable: true
+ eTag:
+ type: string
+ readOnly: true
+ MTOShipmentType-2:
+ title: Shipment Type
+ description: |
+ The type of shipment.
+ * `HHG` = Household goods move
+ * `HHG_INTO_NTS_DOMESTIC` = HHG into Non-temporary storage (NTS)
+ * `HHG_OUTOF_NTS_DOMESTIC` = HHG out of Non-temporary storage (NTS Release)
+ * `PPM` = Personally Procured Move also known as Do It Yourself (DITY)
+ type: string
+ example: HHG
+ enum:
+ - BOAT_HAUL_AWAY
+ - BOAT_TOW_AWAY
+ - HHG
+ - HHG_INTO_NTS_DOMESTIC
+ - HHG_OUTOF_NTS_DOMESTIC
+ - INTERNATIONAL_HHG
+ - INTERNATIONAL_UB
+ - MOTORHOME
+ - PPM
+ x-display-value:
+ HHG: Household goods move (HHG)
+ HHG_INTO_NTS_DOMESTIC: HHG into Non-temporary storage (NTS)
+ HHG_OUTOF_NTS_DOMESTIC: HHG out of Non-temporary storage (NTS Release)
+ PPM: Personally Procured Move also known as Do It Yourself (DITY)
+ PPMShipment-2:
+ description: >-
+ A personally procured move is a type of shipment that a service member
+ moves themselves.
+ x-nullable: true
+ properties:
+ id:
+ description: The primary unique identifier of this PPM shipment
+ example: 1f2270c7-7166-40ae-981e-b200ebdf3054
+ format: uuid
+ type: string
+ readOnly: true
+ shipmentId:
+ description: The id of the parent MTOShipment record
+ example: 1f2270c7-7166-40ae-981e-b200ebdf3054
+ format: uuid
+ type: string
+ readOnly: true
+ createdAt:
+ description: The timestamp of when the PPM shipment was created (UTC)
+ format: date-time
+ type: string
+ readOnly: true
+ updatedAt:
+ description: The timestamp of when a property of this object was last updated (UTC)
+ format: date-time
+ type: string
+ readOnly: true
+ status:
+ $ref: '#/definitions/PPMShipmentStatus'
+ expectedDepartureDate:
+ description: |
+ Date the customer expects to begin moving from their origin.
+ format: date
+ type: string
+ actualMoveDate:
+ description: The actual start date of when the PPM shipment left the origin.
+ format: date
+ type: string
+ x-nullable: true
+ x-omitempty: false
+ submittedAt:
+ description: >-
+ The timestamp of when the customer submitted their PPM documentation
+ to the counselor for review.
+ format: date-time
+ type: string
+ x-nullable: true
+ x-omitempty: false
+ reviewedAt:
+ description: >-
+ The timestamp of when the Service Counselor has reviewed all of the
+ closeout documents.
+ format: date-time
+ type: string
+ x-nullable: true
+ x-omitempty: false
+ approvedAt:
+ description: >-
+ The timestamp of when the shipment was approved and the service member
+ can begin their move.
+ format: date-time
+ type: string
+ x-nullable: true
+ x-omitempty: false
+ pickupPostalCode:
+ description: >-
+ The postal code of the origin location where goods are being moved
+ from.
+ format: zip
+ type: string
+ title: ZIP
+ example: '90210'
+ pattern: ^(\d{5})$
+ secondaryPickupPostalCode:
+ description: >-
+ An optional secondary pickup location near the origin where additional
+ goods exist.
+ format: zip
+ type: string
+ example: '90210'
+ pattern: ^(\d{5})$
+ x-nullable: true
+ x-omitempty: false
+ actualPickupPostalCode:
+ description: >
+ The actual postal code where the PPM shipment started. To be filled
+ once the customer has moved the shipment.
+ format: zip
+ type: string
+ title: ZIP
+ example: '90210'
+ pattern: ^(\d{5})$
+ x-nullable: true
+ x-omitempty: false
+ destinationPostalCode:
+ description: >-
+ The postal code of the destination location where goods are being
+ delivered to.
+ format: zip
+ type: string
+ example: '90210'
+ pattern: ^(\d{5})$
+ secondaryDestinationPostalCode:
+ description: >-
+ An optional secondary location near the destination where goods will
+ be dropped off.
+ format: zip
+ type: string
+ example: '90210'
+ pattern: ^(\d{5})$
+ x-nullable: true
+ x-omitempty: false
+ actualDestinationPostalCode:
+ description: >
+ The actual postal code where the PPM shipment ended. To be filled once
+ the customer has moved the shipment.
+ format: zip
+ type: string
+ title: ZIP
+ example: '90210'
+ pattern: ^(\d{5})$
+ x-nullable: true
+ x-omitempty: false
+ sitExpected:
+ description: >
+ Captures whether some or all of the PPM shipment will require
+ temporary storage at the origin or destination.
+
+
+ Must be set to `true` when providing `sitLocation`,
+ `sitEstimatedWeight`, `sitEstimatedEntryDate`, and
+ `sitEstimatedDepartureDate` values to calculate the
+ `sitEstimatedCost`.
+ type: boolean
+ estimatedWeight:
+ description: The estimated weight of the PPM shipment goods being moved in pounds.
+ type: integer
+ example: 4200
+ x-nullable: true
+ x-omitempty: false
+ hasProGear:
+ description: >
+ Indicates whether PPM shipment has pro gear for themselves or their
+ spouse.
+ type: boolean
+ x-nullable: true
+ x-omitempty: false
+ proGearWeight:
+ description: >-
+ The estimated weight of the pro-gear being moved belonging to the
+ service member in pounds.
+ type: integer
+ x-nullable: true
+ x-omitempty: false
+ spouseProGearWeight:
+ description: >-
+ The estimated weight of the pro-gear being moved belonging to a spouse
+ in pounds.
+ type: integer
+ x-nullable: true
+ x-omitempty: false
+ estimatedIncentive:
+ description: >-
+ The estimated amount the government will pay the service member to
+ move their belongings based on the moving date, locations, and
+ shipment weight.
+ type: integer
+ format: cents
+ x-nullable: true
+ x-omitempty: false
+ hasRequestedAdvance:
+ description: |
+ Indicates whether an advance has been requested for the PPM shipment.
+ type: boolean
+ x-nullable: true
+ x-omitempty: false
+ advanceAmountRequested:
+ description: >
+ The amount requested as an advance by the service member, up to a
+ maximum percentage of the estimated incentive.
+ type: integer
+ format: cents
+ x-nullable: true
+ x-omitempty: false
+ hasReceivedAdvance:
+ description: |
+ Indicates whether an advance was received for the PPM shipment.
+ type: boolean
+ x-nullable: true
+ x-omitempty: false
+ advanceAmountReceived:
+ description: |
+ The amount received for an advance, or null if no advance is received.
+ type: integer
+ format: cents
+ x-nullable: true
+ x-omitempty: false
+ sitLocation:
+ allOf:
+ - $ref: '#/definitions/SITLocationType'
+ - x-nullable: true
+ - x-omitempty: false
+ sitEstimatedWeight:
+ description: The estimated weight of the goods being put into storage in pounds.
+ type: integer
+ example: 2000
+ x-nullable: true
+ x-omitempty: false
+ sitEstimatedEntryDate:
+ description: The date that goods will first enter the storage location.
+ format: date
+ type: string
+ x-nullable: true
+ x-omitempty: false
+ sitEstimatedDepartureDate:
+ description: The date that goods will exit the storage location.
+ format: date
+ type: string
+ x-nullable: true
+ x-omitempty: false
+ sitEstimatedCost:
+ description: >-
+ The estimated amount that the government will pay the service member
+ to put their goods into storage. This estimated storage cost is
+ separate from the estimated incentive.
+ type: integer
+ format: cents
+ x-nullable: true
+ x-omitempty: false
+ eTag:
+ description: >-
+ A hash unique to this shipment that should be used as the "If-Match"
+ header for any updates.
+ type: string
+ readOnly: true
+ required:
+ - id
+ - shipmentId
+ - createdAt
+ - status
+ - expectedDepartureDate
+ - pickupPostalCode
+ - destinationPostalCode
+ - sitExpected
+ - eTag
+ ShipmentAddressUpdateStatus:
+ type: string
+ title: Status
+ readOnly: true
+ x-display-value:
+ REQUESTED: REQUESTED
+ REJECTED: REJECTED
+ APPROVED: APPROVED
+ enum:
+ - REQUESTED
+ - REJECTED
+ - APPROVED
+ ShipmentAddressUpdate:
+ description: >
+ This represents a destination address change request made by the Prime
+ that is either auto-approved or requires review if the pricing criteria
+ has changed. If criteria has changed, then it must be approved or rejected
+ by a TOO.
+ type: object
+ properties:
+ id:
+ type: string
+ format: uuid
+ example: c56a4180-65aa-42ec-a945-5fd21dec0538
+ readOnly: true
+ contractorRemarks:
+ type: string
+ example: This is a contractor remark
+ title: Contractor Remarks
+ description: The reason there is an address change.
+ readOnly: true
+ officeRemarks:
+ type: string
+ example: This is an office remark
+ title: Office Remarks
+ x-nullable: true
+ description: The TOO comment on approval or rejection.
+ status:
+ $ref: '#/definitions/ShipmentAddressUpdateStatus'
+ shipmentID:
+ type: string
+ format: uuid
+ example: c56a4180-65aa-42ec-a945-5fd21dec0538
+ readOnly: true
+ originalAddress:
+ $ref: '#/definitions/Address'
+ newAddress:
+ $ref: '#/definitions/Address'
+ required:
+ - id
+ - status
+ - shipmentID
+ - originalAddress
+ - newAddress
+ - contractorRemarks
+ MTOShipmentWithoutServiceItems:
+ type: object
+ properties:
+ id:
+ description: The ID of the shipment.
+ example: 1f2270c7-7166-40ae-981e-b200ebdf3054
+ format: uuid
+ type: string
+ readOnly: true
+ moveTaskOrderID:
+ description: The ID of the move for this shipment.
+ example: 1f2270c7-7166-40ae-981e-b200ebdf3054
+ format: uuid
+ type: string
+ readOnly: true
+ approvedDate:
+ description: >-
+ The date when the Transportation Ordering Officer first approved this
+ shipment for the move.
+ format: date
+ type: string
+ readOnly: true
+ x-omitempty: false
+ x-nullable: true
+ requestedPickupDate:
+ description: >
+ The date the customer selects during onboarding as their preferred
+ pickup date. Other dates, such as required delivery date and (outside
+ MilMove) the pack date, are derived from this date.
+ format: date
+ type: string
+ readOnly: true
+ x-omitempty: false
+ x-nullable: true
+ requestedDeliveryDate:
+ description: The customer's preferred delivery date.
+ format: date
+ type: string
+ readOnly: true
+ x-omitempty: false
+ x-nullable: true
+ scheduledPickupDate:
+ description: >-
+ The date the Prime contractor scheduled to pick up this shipment after
+ consultation with the customer.
+ format: date
+ type: string
+ x-omitempty: false
+ x-nullable: true
+ actualPickupDate:
+ description: >-
+ The date when the Prime contractor actually picked up the shipment.
+ Updated after-the-fact.
+ format: date
+ type: string
+ x-omitempty: false
+ x-nullable: true
+ firstAvailableDeliveryDate:
+ description: >
+ The date the Prime provides to the customer as the first possible
+ delivery date so that they can plan their travel accordingly.
+ format: date
+ type: string
+ x-omitempty: false
+ x-nullable: true
+ requiredDeliveryDate:
+ description: >
+ The latest date by which the Prime can deliver a customer's shipment
+ without violating the contract. This is calculated based on weight,
+ distance, and the scheduled pickup date. It cannot be modified.
+ format: date
+ type: string
+ readOnly: true
+ x-omitempty: false
+ x-nullable: true
+ scheduledDeliveryDate:
+ description: >-
+ The date the Prime contractor scheduled to deliver this shipment after
+ consultation with the customer.
+ format: date
+ type: string
+ x-omitempty: false
+ x-nullable: true
+ actualDeliveryDate:
+ description: >-
+ The date when the Prime contractor actually delivered the shipment.
+ Updated after-the-fact.
+ format: date
+ type: string
+ x-omitempty: false
+ x-nullable: true
+ primeEstimatedWeight:
+ description: >
+ The estimated weight of this shipment, determined by the movers during
+ the pre-move survey. This value **can only be updated once.** If there
+ was an issue with estimating the weight and a mistake was made, the
+ Prime contracter will need to contact the TOO to change it.
+ type: integer
+ example: 4500
+ minimum: 1
+ x-nullable: true
+ primeEstimatedWeightRecordedDate:
+ description: >-
+ The date when the Prime contractor recorded the shipment's estimated
+ weight.
+ format: date
+ type: string
+ readOnly: true
+ x-omitempty: false
+ x-nullable: true
+ primeActualWeight:
+ description: >-
+ The actual weight of the shipment, provided after the Prime packs,
+ picks up, and weighs a customer's shipment.
+ type: integer
+ example: 4500
+ minimum: 1
+ x-nullable: true
+ ntsRecordedWeight:
+ description: >-
+ The previously recorded weight for the NTS Shipment. Used for NTS
+ Release to know what the previous primeActualWeight or billable weight
+ was.
+ type: integer
+ example: 4500
+ x-nullable: true
+ x-formatting: weight
+ customerRemarks:
+ description: >
+ The customer can use the customer remarks field to inform the services
+ counselor and the movers about any
+
+ special circumstances for this shipment. Typical examples:
+ * bulky or fragile items,
+ * weapons,
+ * access info for their address.
+
+ Customer enters this information during onboarding. Optional field.
+ type: string
+ example: handle with care
+ x-nullable: true
+ readOnly: true
+ counselorRemarks:
+ description: >
+ The counselor can use the counselor remarks field to inform the movers
+ about any
+
+ special circumstances for this shipment. Typical examples:
+ * bulky or fragile items,
+ * weapons,
+ * access info for their address.
+
+ Counselors enters this information when creating or editing an MTO
+ Shipment. Optional field.
+ type: string
+ example: handle with care
+ x-nullable: true
+ readOnly: true
+ agents:
+ $ref: '#/definitions/MTOAgents-2'
+ sitExtensions:
+ $ref: '#/definitions/SITExtensions'
+ reweigh:
+ $ref: '#/definitions/Reweigh'
+ pickupAddress:
+ description: >
+ The address where the movers should pick up this shipment, entered by
+ the customer during onboarding when they enter shipment details.
+ allOf:
+ - $ref: '#/definitions/Address'
+ destinationAddress:
+ description: >
+ Where the movers should deliver this shipment. Often provided by the
+ customer when they enter shipment details
+
+ during onboarding, if they know their new address already.
+
+
+ May be blank when entered by the customer, required when entered by
+ the Prime. May not represent the true
+
+ final destination due to the shipment being diverted or placed in SIT.
+ allOf:
+ - $ref: '#/definitions/Address'
+ destinationType:
+ $ref: '#/definitions/DestinationType'
+ secondaryPickupAddress:
+ description: >-
+ A second pickup address for this shipment, if the customer entered
+ one. An optional field.
+ allOf:
+ - $ref: '#/definitions/Address'
+ secondaryDeliveryAddress:
+ description: >-
+ A second delivery address for this shipment, if the customer entered
+ one. An optional field.
+ allOf:
+ - $ref: '#/definitions/Address'
+ storageFacility:
+ allOf:
+ - x-nullable: true
+ - $ref: '#/definitions/StorageFacility'
+ shipmentType:
+ $ref: '#/definitions/MTOShipmentType-2'
+ diversion:
+ description: >
+ This value indicates whether or not this shipment is part of a
+ diversion. If yes, the shipment can be either the starting or ending
+ segment of the diversion.
+ type: boolean
+ status:
+ description: >
+ The status of a shipment, indicating where it is in the TOO's approval
+ process. Can only be updated by the contractor in special
+ circumstances.
+ type: string
+ readOnly: true
+ enum:
+ - SUBMITTED
+ - APPROVED
+ - REJECTED
+ - CANCELLATION_REQUESTED
+ - CANCELED
+ - DIVERSION_REQUESTED
+ ppmShipment:
+ $ref: '#/definitions/PPMShipment-2'
+ deliveryAddressUpdate:
+ $ref: '#/definitions/ShipmentAddressUpdate'
+ eTag:
+ description: >-
+ A hash unique to this shipment that should be used as the "If-Match"
+ header for any updates.
+ type: string
+ readOnly: true
+ createdAt:
+ format: date-time
+ type: string
+ readOnly: true
+ updatedAt:
+ format: date-time
+ type: string
+ readOnly: true
+ pointOfContact:
+ type: string
+ description: >
+ Email or ID of the person who will be contacted in the event of
+ questions or concerns about this update. May be the person performing
+ the update, or someone else working with the Prime contractor.
+ MTOShipmentsWithoutServiceObjects:
+ description: A list of shipments without their associated service items.
+ items:
+ $ref: '#/definitions/MTOShipmentWithoutServiceItems'
+ type: array
+ MoveTaskOrder:
+ type: object
+ required:
+ - mtoShipments
+ - mtoServiceItems
+ - paymentRequests
+ properties:
+ id:
+ example: a502b4f1-b9c4-4faf-8bdd-68292501bf26
+ format: uuid
+ type: string
+ moveCode:
+ type: string
+ example: HYXFJF
+ readOnly: true
+ createdAt:
+ format: date-time
+ type: string
+ readOnly: true
+ orderID:
+ example: c56a4180-65aa-42ec-a945-5fd21dec0538
+ format: uuid
+ type: string
+ order:
+ $ref: '#/definitions/Order'
+ referenceId:
+ example: 1001-3456
+ type: string
+ availableToPrimeAt:
+ format: date-time
+ type: string
+ x-nullable: true
+ readOnly: true
+ updatedAt:
+ format: date-time
+ type: string
+ readOnly: true
+ primeCounselingCompletedAt:
+ format: date-time
+ type: string
+ x-nullable: true
+ readOnly: true
+ paymentRequests:
+ $ref: '#/definitions/PaymentRequests'
+ mtoServiceItems:
+ type: array
+ items:
+ $ref: '#/definitions/MTOServiceItem'
+ mtoShipments:
+ $ref: '#/definitions/MTOShipmentsWithoutServiceObjects'
+ ppmType:
+ type: string
+ enum:
+ - PARTIAL
+ - FULL
+ ppmEstimatedWeight:
+ type: integer
+ excessWeightQualifiedAt:
+ type: string
+ format: date-time
+ readOnly: true
+ x-omitempty: false
+ x-nullable: true
+ excessWeightAcknowledgedAt:
+ type: string
+ format: date-time
+ readOnly: true
+ x-omitempty: false
+ x-nullable: true
+ excessWeightUploadId:
+ type: string
+ format: uuid
+ readOnly: true
+ x-omitempty: false
+ x-nullable: true
+ eTag:
+ type: string
+ readOnly: true
+ PpmID:
+ description: |
+ The PPM Shipment ID to associate with the assigned certificate.
+ type: string
+ format: uuid
+ example: c56a4180-65aa-42ec-a945-5fd21dec0538
+ x-nullable: true
+ MovingExpenseType:
+ type: string
+ description: Moving Expense Type
+ enum:
+ - CONTRACTED_EXPENSE
+ - GAS
+ - OIL
+ - OTHER
+ - PACKING_MATERIALS
+ - RENTAL_EQUIPMENT
+ - STORAGE
+ - TOLLS
+ - WEIGHING_FEE
+ x-display-value:
+ CONTRACTED_EXPENSE: Contracted expense
+ GAS: Gas
+ OIL: Oil
+ OTHER: Other
+ PACKING_MATERIALS: Packing materials
+ STORAGE: Storage
+ RENTAL_EQUIPMENT: Rental equipment
+ TOLLS: Tolls
+ WEIGHING_FEE: Weighing fee
+ NullableString:
+ type: string
+ x-go-type:
+ import:
+ package: github.com/transcom/mymove/pkg/swagger/nullable
+ type: String
+paths:
+ /estimates/ppm:
+ get:
+ summary: Return a PPM cost estimate
+ description: Calculates a reimbursement range for a PPM move (excluding SIT)
+ operationId: showPPMEstimate
+ tags:
+ - ppm
+ parameters:
+ - in: query
+ name: original_move_date
+ type: string
+ format: date
+ required: true
+ - in: query
+ name: origin_zip
+ type: string
+ format: zip
+ pattern: ^(\d{5}([\-]\d{4})?)$
+ required: true
+ - in: query
+ name: origin_duty_location_zip
+ type: string
+ format: zip
+ pattern: ^(\d{5}([\-]\d{4})?)$
+ required: true
+ - in: query
+ name: orders_id
+ type: string
+ format: uuid
+ required: true
+ - in: query
+ name: weight_estimate
+ type: integer
+ required: true
+ responses:
+ '200':
+ description: Made estimate of PPM cost range
+ schema:
+ $ref: '#/definitions/PPMEstimateRange'
+ '400':
+ description: invalid request
+ '401':
+ description: request requires user authentication
+ '403':
+ description: user is not authorized
+ '404':
+ description: >-
+ ppm discount not found for provided postal codes and original move
+ date
+ '409':
+ description: distance is less than 50 miles (no short haul moves)
+ '422':
+ description: cannot process request with given information
+ '500':
+ description: internal server error
+ /estimates/ppm_sit:
+ get:
+ summary: Return a PPM move's SIT cost estimate
+ description: Calculates a reimbursment for a PPM move's SIT
+ operationId: showPPMSitEstimate
+ tags:
+ - ppm
+ parameters:
- in: query
name: personally_procured_move_id
type: string
@@ -4266,6 +5657,36 @@ paths:
description: payload is too large
'500':
description: server error
+ /all_moves/{serviceMemberId}:
+ get:
+ summary: Return the current and previous moves of a service member
+ description: |
+ Gets all moves that belongs to the serviceMember
+ operationId: getAllMoves
+ tags:
+ - moves
+ produces:
+ - application/json
+ parameters:
+ - in: path
+ name: serviceMemberId
+ type: string
+ format: uuid
+ required: true
+ description: UUID of the service member
+ responses:
+ '200':
+ description: >-
+ Successfully retrieved moves. A successful fetch might still return
+ zero moves.
+ schema:
+ $ref: '#/definitions/MovesList'
+ '401':
+ $ref: '#/responses/PermissionDenied'
+ '403':
+ $ref: '#/responses/PermissionDenied'
+ '500':
+ $ref: '#/responses/ServerError'
/moves/{moveId}:
patch:
summary: Patches the move
From 708e93756b62c708a2ffabb4cfe288678904bb2d Mon Sep 17 00:00:00 2001
From: TevinAdams
Date: Tue, 23 Jan 2024 19:30:06 +0000
Subject: [PATCH 02/67] Created getAllMoves handler
---
pkg/handlers/internalapi/api.go | 2 ++
pkg/handlers/internalapi/moves.go | 13 +++++++++++++
2 files changed, 15 insertions(+)
diff --git a/pkg/handlers/internalapi/api.go b/pkg/handlers/internalapi/api.go
index 7ff49ce9db7..21228407c48 100644
--- a/pkg/handlers/internalapi/api.go
+++ b/pkg/handlers/internalapi/api.go
@@ -86,6 +86,8 @@ func NewInternalAPI(handlerConfig handlers.HandlerConfig) *internalops.MymoveAPI
}
internalAPI.MovesPatchMoveHandler = PatchMoveHandler{handlerConfig, closeoutOfficeUpdater}
+ internalAPI.MovesGetAllMovesHandler = GetAllMovesHandler{handlerConfig}
+
internalAPI.MovesShowMoveHandler = ShowMoveHandler{handlerConfig}
internalAPI.MovesSubmitMoveForApprovalHandler = SubmitMoveHandler{
handlerConfig,
diff --git a/pkg/handlers/internalapi/moves.go b/pkg/handlers/internalapi/moves.go
index 2094c97ccdf..54cec9cc0e4 100644
--- a/pkg/handlers/internalapi/moves.go
+++ b/pkg/handlers/internalapi/moves.go
@@ -354,3 +354,16 @@ func (h SubmitAmendedOrdersHandler) Handle(params moveop.SubmitAmendedOrdersPara
return moveop.NewSubmitAmendedOrdersOK().WithPayload(movePayload), nil
})
}
+
+type GetAllMovesHandler struct {
+ handlers.HandlerConfig
+}
+
+// GetAllMovesHandler returns the current and all previous moves of a service member
+func (h GetAllMovesHandler) Handle(params moveop.GetAllMovesParams) middleware.Responder {
+ return h.AuditableAppContextFromRequestWithErrors(params.HTTPRequest,
+ func(appCtx appcontext.AppContext) (middleware.Responder, error) {
+
+ return moveop.NewGetAllMovesOK().WithPayload(nil), nil
+ })
+}
From 81de9931d5189c1257ab50b76b4082e81f0cfa51 Mon Sep 17 00:00:00 2001
From: Brooklyn Welsh
Date: Wed, 24 Jan 2024 16:04:04 +0000
Subject: [PATCH 03/67] Initial commit, templates, notification code, and
tests.
---
.../prime_counseling_complete_template.html | 26 +++
.../prime_counseling_complete_template.txt | 29 +++
pkg/handlers/primeapi/move_task_order.go | 10 +
.../prime_counseling_complete.go | 127 +++++++++++++
.../prime_counseling_complete_test.go | 177 ++++++++++++++++++
5 files changed, 369 insertions(+)
create mode 100644 pkg/assets/notifications/templates/prime_counseling_complete_template.html
create mode 100644 pkg/assets/notifications/templates/prime_counseling_complete_template.txt
create mode 100644 pkg/notifications/prime_counseling_complete.go
create mode 100644 pkg/notifications/prime_counseling_complete_test.go
diff --git a/pkg/assets/notifications/templates/prime_counseling_complete_template.html b/pkg/assets/notifications/templates/prime_counseling_complete_template.html
new file mode 100644
index 00000000000..90453a4a3db
--- /dev/null
+++ b/pkg/assets/notifications/templates/prime_counseling_complete_template.html
@@ -0,0 +1,26 @@
+
*** DO NOT REPLY directly to this email ***
+
This is a confirmation that your counselor has approved move details for the assigned move code {{.Locator}} from {{.OriginDutyLocation}} to {{.DestinationDutyLocation}} in the MilMove system.
+
What this means to you:
+
If you are doing a Personally Procured Move (PPM), you can start moving your personal property.
+
Next steps for a PPM:
+
+
Remember to get legible certified weight tickets for both the empty and full weights for every trip you perform. If you do not upload legible certified weight tickets, your PPM incentive could be affected.
+
If you are requesting an Advance Operating Allowance (AOA, or cash advance) for a PPM, log into MilMove to download your AOA packet. You must obtain signature approval on the AOA packet from a government transportation office before submitting it to finance. If you have been directed to use your government travel charge card (GTCC) for expenses no further action is required.
Once you complete your PPM, log into MilMove, upload your receipts and weight tickets, and submit your PPM for review.
+
+
Next steps for government arranged shipments:
+
+
If additional services were identified during counseling, HomeSafe will send the request to the responsible government transportation office for review. Your HomeSafe Customer Care Representative should keep you informed on the status of the request.
+
If you have not already done so, please schedule a pre-move survey using HomeSafe Connect or by contacting a HomeSafe Customer Care Representative.
+
HomeSafe is your primary point of contact. If any information changes during the move, immediately notify your HomeSafe Customer Care Representative of the changes. Remember to keep your contact information updated in MilMove.
+ The information contained in this email may contain Privacy Act information and is therefore protected under the
+ Privacy Act of 1974. Failure to protect Privacy Act information could result in a $5,000 fine.
+
\ No newline at end of file
diff --git a/pkg/assets/notifications/templates/prime_counseling_complete_template.txt b/pkg/assets/notifications/templates/prime_counseling_complete_template.txt
new file mode 100644
index 00000000000..ffe89d739bf
--- /dev/null
+++ b/pkg/assets/notifications/templates/prime_counseling_complete_template.txt
@@ -0,0 +1,29 @@
+*** DO NOT REPLY directly to this email ***
+This is a confirmation that your counselor has approved move details for the assigned move code {{.Locator}} from {{.OriginDutyLocation}} to {{.DestinationDutyLocation}} in the MilMove system.
+
+What this means to you:
+If you are doing a Personally Procured Move (PPM), you can start moving your personal property.
+
+Next steps for a PPM:
+• Remember to get legible certified weight tickets for both the empty and full weights for every trip you perform. If you do not upload legible certified weight tickets, your PPM incentive could be affected.
+
+• If you are requesting an Advance Operating Allowance (AOA, or cash advance) for a PPM, log into MilMove to download your AOA packet. You must obtain signature approval on the AOA packet from a government transportation office before submitting it to finance. If you have been directed to use your government travel charge card (GTCC) for expenses no further action is required.
+
+• If you have any questions, contact a government transportation office. You can see a listing of transportation offices on Military One Source here:
+
+• Once you complete your PPM, log into MilMove , upload your receipts and weight tickets, and submit your PPM for review.
+
+Next steps for government arranged shipments:
+• If additional services were identified during counseling, HomeSafe will send the request to the responsible government transportation office for review. Your HomeSafe Customer Care Representative should keep you informed on the status of the request.
+
+• If you have not already done so, please schedule a pre-move survey using HomeSafe Connect or by contacting a HomeSafe Customer Care Representative.
+
+• HomeSafe is your primary point of contact. If any information changes during the move, immediately notify your HomeSafe Customer Care Representative of the changes. Remember to keep your contact information updated in MilMove.
+
+If you are unsatisfied at any time, contact a government transportation office. You can see a listing of transportation offices on Military One Source here: https://installations.militaryonesource.mil/search?program-service=2/view-by=ALL.
+
+Thank you,
+
+USTRANSCOM MilMove Team
+
+The information contained in this email may contain Privacy Act information and is therefore protected under the Privacy Act of 1974. Failure to protect Privacy Act information could result in a $5,000 fine.
\ No newline at end of file
diff --git a/pkg/handlers/primeapi/move_task_order.go b/pkg/handlers/primeapi/move_task_order.go
index 791638fa7d3..c8d97ea5242 100644
--- a/pkg/handlers/primeapi/move_task_order.go
+++ b/pkg/handlers/primeapi/move_task_order.go
@@ -18,6 +18,7 @@ import (
"github.com/transcom/mymove/pkg/handlers"
"github.com/transcom/mymove/pkg/handlers/primeapi/payloads"
"github.com/transcom/mymove/pkg/models"
+ "github.com/transcom/mymove/pkg/notifications"
"github.com/transcom/mymove/pkg/services"
)
@@ -194,7 +195,16 @@ func (h UpdateMTOPostCounselingInformationHandler) Handle(params movetaskorderop
payloads.InternalServerError(nil, h.GetTraceIDFromRequest(params.HTTPRequest))), err
}
}
+
mtoPayload := payloads.MoveTaskOrder(mto)
+ err = h.NotificationSender().SendNotification(appCtx,
+ notifications.NewPrimeCounselingComplete(*mtoPayload),
+ )
+ if err != nil {
+ return movetaskorderops.NewUpdateMTOPostCounselingInformationInternalServerError().WithPayload(
+ payloads.InternalServerError(nil, h.GetTraceIDFromRequest(params.HTTPRequest))), err
+ }
+
return movetaskorderops.NewUpdateMTOPostCounselingInformationOK().WithPayload(mtoPayload), nil
})
}
diff --git a/pkg/notifications/prime_counseling_complete.go b/pkg/notifications/prime_counseling_complete.go
new file mode 100644
index 00000000000..05da7595c12
--- /dev/null
+++ b/pkg/notifications/prime_counseling_complete.go
@@ -0,0 +1,127 @@
+package notifications
+
+import (
+ "bytes"
+ "fmt"
+ html "html/template"
+ text "text/template"
+
+ "go.uber.org/zap"
+
+ "github.com/transcom/mymove/pkg/appcontext"
+ "github.com/transcom/mymove/pkg/assets"
+ "github.com/transcom/mymove/pkg/gen/primemessages"
+)
+
+var (
+ PrimeCounselingCompleteRawText = string(assets.MustAsset("notifications/templates/prime_counseling_complete_template.txt"))
+ PrimeCounselingCompleteTextTemplate = text.Must(text.New("text_template").Parse(PrimeCounselingCompleteRawText))
+ PrimeCounselingCompleteRawHTML = string(assets.MustAsset("notifications/templates/prime_counseling_complete_template.html"))
+ PrimeCounselingCompleteHTMLTemplate = html.Must(html.New("text_template").Parse(PrimeCounselingCompleteRawHTML))
+)
+
+// PrimeCounselingComplete has notification content for moves that have had their counseling completed by the Prime
+type PrimeCounselingComplete struct {
+ moveTaskOrder primemessages.MoveTaskOrder
+ htmlTemplate *html.Template
+ textTemplate *text.Template
+}
+
+// PrimeCounselingCompleteData is used to render an email template
+type PrimeCounselingCompleteData struct {
+ CustomerEmail string
+ OriginDutyLocation string
+ DestinationDutyLocation string
+ Locator string
+}
+
+// NewPrimeCounselingComplete returns a new payment reminder notification 14 days after actual move in date
+func NewPrimeCounselingComplete(moveTaskOrder primemessages.MoveTaskOrder) *PrimeCounselingComplete {
+
+ return &PrimeCounselingComplete{
+ moveTaskOrder: moveTaskOrder,
+ htmlTemplate: PrimeCounselingCompleteHTMLTemplate,
+ textTemplate: PrimeCounselingCompleteTextTemplate,
+ }
+}
+
+// NotificationSendingContext expects a `notification` with an `emails` method,
+// so we implement `email` to satisfy that interface
+func (m PrimeCounselingComplete) emails(appCtx appcontext.AppContext) ([]emailContent, error) {
+ var emails []emailContent
+
+ appCtx.Logger().Info("MTO (Move Task Order) Locator",
+ zap.String("uuid", m.moveTaskOrder.MoveCode),
+ )
+
+ emailData, err := GetEmailData(m.moveTaskOrder, appCtx)
+ if err != nil {
+ return nil, err
+ }
+ var htmlBody, textBody string
+ htmlBody, textBody, err = m.renderTemplates(appCtx, emailData)
+
+ if err != nil {
+ appCtx.Logger().Error("error rendering template", zap.Error(err))
+ }
+
+ primeCounselingEmail := emailContent{
+ recipientEmail: emailData.CustomerEmail,
+ subject: "Your counselor has approved your move details",
+ htmlBody: htmlBody,
+ textBody: textBody,
+ }
+
+ return append(emails, primeCounselingEmail), nil
+}
+
+func GetEmailData(m primemessages.MoveTaskOrder, appCtx appcontext.AppContext) (PrimeCounselingCompleteData, error) {
+ if m.Order.Customer.Email == "" {
+ return PrimeCounselingCompleteData{}, fmt.Errorf("no email found for service member")
+ }
+
+ appCtx.Logger().Info("generated Prime Counseling Completed email",
+ zap.String("service member uuid", string(m.Order.Customer.ID)),
+ zap.String("service member email", string(m.Order.Customer.Email)),
+ zap.String("Move Locator", string(m.MoveCode)),
+ zap.String("Origin Duty Location Name", string(m.Order.OriginDutyLocation.Name)),
+ zap.String("Destination Duty Location Name", string(m.Order.DestinationDutyLocation.Name)),
+ )
+
+ return PrimeCounselingCompleteData{
+ OriginDutyLocation: m.Order.OriginDutyLocation.Name,
+ DestinationDutyLocation: m.Order.DestinationDutyLocation.Name,
+ Locator: m.MoveCode,
+ }, nil
+}
+
+func (m PrimeCounselingComplete) renderTemplates(appCtx appcontext.AppContext, data PrimeCounselingCompleteData) (string, string, error) {
+ htmlBody, err := m.RenderHTML(appCtx, data)
+ if err != nil {
+ return "", "", fmt.Errorf("error rendering html template using %#v", data)
+ }
+ textBody, err := m.RenderText(appCtx, data)
+ if err != nil {
+ return "", "", fmt.Errorf("error rendering text template using %#v", data)
+ }
+ return htmlBody, textBody, nil
+}
+
+// RenderHTML renders the html for the email
+func (m PrimeCounselingComplete) RenderHTML(appCtx appcontext.AppContext, data PrimeCounselingCompleteData) (string, error) {
+ var htmlBuffer bytes.Buffer
+ if err := m.htmlTemplate.Execute(&htmlBuffer, data); err != nil {
+ appCtx.Logger().Error("cant render html template ", zap.Error(err))
+ }
+ return htmlBuffer.String(), nil
+}
+
+// RenderText renders the text for the email
+func (m PrimeCounselingComplete) RenderText(appCtx appcontext.AppContext, data PrimeCounselingCompleteData) (string, error) {
+ var textBuffer bytes.Buffer
+ if err := m.textTemplate.Execute(&textBuffer, data); err != nil {
+ appCtx.Logger().Error("cant render text template ", zap.Error(err))
+ return "", err
+ }
+ return textBuffer.String(), nil
+}
\ No newline at end of file
diff --git a/pkg/notifications/prime_counseling_complete_test.go b/pkg/notifications/prime_counseling_complete_test.go
new file mode 100644
index 00000000000..352c3982e9f
--- /dev/null
+++ b/pkg/notifications/prime_counseling_complete_test.go
@@ -0,0 +1,177 @@
+package notifications
+
+import (
+ "github.com/transcom/mymove/pkg/gen/primemessages"
+)
+
+var member = primemessages.Customer{Email: "test@example.com"}
+var primeOrder = primemessages.Order{
+ OriginDutyLocation: &primemessages.DutyLocation{Name: "Fort Origin"},
+ DestinationDutyLocation: &primemessages.DutyLocation{Name: "Fort Destination"},
+ Customer: &member,
+}
+var payload = primemessages.MoveTaskOrder{
+ MoveCode: "TEST00",
+ Order: &primeOrder,
+}
+var correctPrimeCounselingData = PrimeCounselingCompleteData{
+ CustomerEmail: "test@example.com",
+ Locator: "TEST00",
+ OriginDutyLocation: "Fort Origin",
+ DestinationDutyLocation: "Fort Destination",
+}
+
+func (suite *NotificationSuite) TestPrimeCounselingComplete() {
+
+ // Create a move that is available to prime and has the counseling service item attached
+ // move := factory.BuildAvailableToPrimeMove(suite.DB(), nil, nil)
+ // reServiceCS := factory.BuildReServiceByCode(suite.DB(), models.ReServiceCodeCS)
+ // serviceItemCS := models.MTOServiceItem{
+ // MoveTaskOrderID: move.ID,
+ // MoveTaskOrder: move,
+ // ReService: reServiceCS,
+ // Status: models.MTOServiceItemStatusApproved,
+ // }
+ // factory.BuildMTOServiceItem(suite.DB(), []factory.Customization{
+ // {
+ // Model: move,
+ // LinkOnly: true,
+ // },
+ // {
+ // Model: serviceItemCS,
+ // },
+ // }, nil)
+ //serviceMember := factory.BuildServiceMember() // "leo_spaceman_sm@example.com"
+ // dutyLocation := factory.FetchOrBuildCurrentDutyLocation(suite.DB())
+ // dutyLocation2 := factory.FetchOrBuildOrdersDutyLocation(suite.DB())
+ // order := factory.BuildOrder(suite.DB(), []factory.Customization{
+ // {
+ // Model: dutyLocation,
+ // LinkOnly: true,
+ // Type: &factory.DutyLocations.OriginDutyLocation,
+ // },
+ // {
+ // Model: dutyLocation2,
+ // LinkOnly: true,
+ // Type: &factory.DutyLocations.NewDutyLocation,
+ // },
+ // {
+ // Model: serviceMember,
+ // Type: &factory.ServiceMember,
+ // },
+ // }, nil)
+
+ // member := primemessages.Customer{Email: "test@example.com"}
+ // primeOrder := primemessages.Order {
+ // OriginDutyLocation: &primemessages.DutyLocation{Name: "Fort Origin"},
+ // DestinationDutyLocation: &primemessages.DutyLocation{Name: "Fort Destination"},
+ // Customer: &member,
+ // }
+ // payload := primemessages.MoveTaskOrder{
+ // MoveCode: "TEST00",
+ // Order: &primeOrder,
+ // }
+
+ ///moveTaskOrder := payloads.MoveTaskOrder(&move)
+ notification := NewPrimeCounselingComplete(payload)
+
+ primeCounselingEmailData, err := GetEmailData(notification.moveTaskOrder, suite.AppContextForTest())
+ suite.NoError(err)
+ suite.NotNil(primeCounselingEmailData)
+ suite.Equal(primeCounselingEmailData, correctPrimeCounselingData)
+
+ suite.EqualExportedValues(primeCounselingEmailData, PrimeCounselingCompleteData{
+ OriginDutyLocation: primeOrder.OriginDutyLocation.Name,
+ DestinationDutyLocation: primeOrder.DestinationDutyLocation.Name,
+ Locator: payload.MoveCode,
+ })
+
+ expectedHTMLContent := getCorrectEmailTemplate(primeCounselingEmailData)
+
+ htmlContent, err := notification.RenderHTML(suite.AppContextForTest(), primeCounselingEmailData)
+
+ suite.NoError(err)
+ suite.Equal(expectedHTMLContent, htmlContent)
+}
+
+func (suite *NotificationSuite) TestPrimeCounselingCompleteTextTemplateRender() {
+ notification := NewPrimeCounselingComplete(payload)
+
+ primeCounselingEmailData, err := GetEmailData(notification.moveTaskOrder, suite.AppContextForTest())
+ suite.NoError(err)
+ suite.NotNil(primeCounselingEmailData)
+ suite.Equal(primeCounselingEmailData, correctPrimeCounselingData)
+
+ suite.EqualExportedValues(primeCounselingEmailData, PrimeCounselingCompleteData{
+ OriginDutyLocation: primeOrder.OriginDutyLocation.Name,
+ DestinationDutyLocation: primeOrder.DestinationDutyLocation.Name,
+ Locator: payload.MoveCode,
+ })
+
+ expectedTextContent := getCorrectTextTemplate(primeCounselingEmailData)
+
+ textContent, err := notification.RenderText(suite.AppContextForTest(), primeCounselingEmailData)
+
+ suite.NoError(err)
+ suite.Equal(expectedTextContent, textContent)
+}
+
+func getCorrectEmailTemplate(emailData PrimeCounselingCompleteData) string {
+ return `Subject Line: Your counselor has approved your move details
+Email message body:
+
*** DO NOT REPLY directly to this email ***
+
This is a confirmation that your counselor has approved move details for the assigned move code ` + emailData.Locator + ` from ` + emailData.OriginDutyLocation + ` to ` + emailData.DestinationDutyLocation + ` in the MilMove system.
+
What this means to you:
+
If you are doing a Personally Procured Move (PPM), you can start moving your personal property.
+
Next steps for a PPM:
+
+
Remember to get legible certified weight tickets for both the empty and full weights for every trip you perform. If you do not upload legible certified weight tickets, your PPM incentive could be affected.
+
If you are requesting an Advance Operating Allowance (AOA, or cash advance) for a PPM, log into MilMove to download your AOA packet. You must obtain signature approval on the AOA packet from a government transportation office before submitting it to finance. If you have been directed to use your government travel charge card (GTCC) for expenses no further action is required.
Once you complete your PPM, log into MilMove, upload your receipts and weight tickets, and submit your PPM for review.
+
+
Next steps for government arranged shipments:
+
+
If additional services were identified during counseling, HomeSafe will send the request to the responsible government transportation office for review. Your HomeSafe Customer Care Representative should keep you informed on the status of the request.
+
If you have not already done so, please schedule a pre-move survey using HomeSafe Connect or by contacting a HomeSafe Customer Care Representative.
+
HomeSafe is your primary point of contact. If any information changes during the move, immediately notify your HomeSafe Customer Care Representative of the changes. Remember to keep your contact information updated in MilMove.
The information contained in this email may contain Privacy Act information and is therefore protected under the Privacy Act of 1974. Failure to protect Privacy Act information could result in a $5,000 fine.
`
+}
+
+func getCorrectTextTemplate(emailData PrimeCounselingCompleteData) string {
+ return `Subject Line: Your counselor has approved your move details
+Email message body:
+*** DO NOT REPLY directly to this email ***
+This is a confirmation that your counselor has approved move details for the assigned move code ` + emailData.Locator + ` from ` + emailData.OriginDutyLocation + ` to ` + emailData.DestinationDutyLocation + ` in the MilMove system.
+What this means to you:
+If you are doing a Personally Procured Move (PPM), you can start moving your personal property.
+Next steps for a PPM:
+• Remember to get legible certified weight tickets for both the empty and full weights for every trip you perform. If you do not upload legible certified weight tickets, your PPM incentive could be affected.
+
+• If you are requesting an Advance Operating Allowance (AOA, or cash advance) for a PPM, log into MilMove to download your AOA packet. You must obtain signature approval on the AOA packet from a government transportation office before submitting it to finance. If you have been directed to use your government travel charge card (GTCC) for expenses no further action is required.
+
+• If you have any questions, contact a government transportation office. You can see a listing of transportation offices on Military One Source here:
+
+• Once you complete your PPM, log into MilMove , upload your receipts and weight tickets, and submit your PPM for review.
+
+Next steps for government arranged shipments:
+• If additional services were identified during counseling, HomeSafe will send the request to the responsible government transportation office for review. Your HomeSafe Customer Care Representative should keep you informed on the status of the request.
+
+• If you have not already done so, please schedule a pre-move survey using HomeSafe Connect or by contacting a HomeSafe Customer Care Representative.
+
+• HomeSafe is your primary point of contact. If any information changes during the move, immediately notify your HomeSafe Customer Care Representative of the changes. Remember to keep your contact information updated in MilMove.
+
+If you are unsatisfied at any time, contact a government transportation office. You can see a listing of transportation offices on Military One Source here: https://installations.militaryonesource.mil/search?program-service=2/view-by=ALL.
+
+Thank you,
+
+USTRANSCOM MilMove Team
+
+The information contained in this email may contain Privacy Act information and is therefore protected under the Privacy Act of 1974. Failure to protect Privacy Act information could result in a $5,000 fine.`
+}
\ No newline at end of file
From 9990f6e9dc4bf59518414b46a091ca0aec2d12b1 Mon Sep 17 00:00:00 2001
From: Brooklyn Welsh
Date: Wed, 24 Jan 2024 16:56:08 +0000
Subject: [PATCH 04/67] New tests passing.
---
.../prime_counseling_complete_template.html | 10 ++++----
.../prime_counseling_complete_test.go | 23 ++++++++-----------
2 files changed, 15 insertions(+), 18 deletions(-)
diff --git a/pkg/assets/notifications/templates/prime_counseling_complete_template.html b/pkg/assets/notifications/templates/prime_counseling_complete_template.html
index 90453a4a3db..c302e7db339 100644
--- a/pkg/assets/notifications/templates/prime_counseling_complete_template.html
+++ b/pkg/assets/notifications/templates/prime_counseling_complete_template.html
@@ -5,17 +5,17 @@
Next steps for a PPM:
Remember to get legible certified weight tickets for both the empty and full weights for every trip you perform. If you do not upload legible certified weight tickets, your PPM incentive could be affected.
-
If you are requesting an Advance Operating Allowance (AOA, or cash advance) for a PPM, log into MilMove to download your AOA packet. You must obtain signature approval on the AOA packet from a government transportation office before submitting it to finance. If you have been directed to use your government travel charge card (GTCC) for expenses no further action is required.
Once you complete your PPM, log into MilMove, upload your receipts and weight tickets, and submit your PPM for review.
+
If you are requesting an Advance Operating Allowance (AOA, or cash advance) for a PPM, log into MilMove to download your AOA packet. You must obtain signature approval on the AOA packet from a government transportation office before submitting it to finance. If you have been directed to use your government travel charge card (GTCC) for expenses no further action is required.
Once you complete your PPM, log into MilMove, upload your receipts and weight tickets, and submit your PPM for review.
Next steps for government arranged shipments:
If additional services were identified during counseling, HomeSafe will send the request to the responsible government transportation office for review. Your HomeSafe Customer Care Representative should keep you informed on the status of the request.
If you have not already done so, please schedule a pre-move survey using HomeSafe Connect or by contacting a HomeSafe Customer Care Representative.
-
HomeSafe is your primary point of contact. If any information changes during the move, immediately notify your HomeSafe Customer Care Representative of the changes. Remember to keep your contact information updated in MilMove.
+
HomeSafe is your primary point of contact. If any information changes during the move, immediately notify your HomeSafe Customer Care Representative of the changes. Remember to keep your contact information updated in MilMove.
This is a confirmation that your counselor has approved move details for the assigned move code ` + emailData.Locator + ` from ` + emailData.OriginDutyLocation + ` to ` + emailData.DestinationDutyLocation + ` in the MilMove system.
+ return `
*** DO NOT REPLY directly to this email ***
+
This is a confirmation that your counselor has approved move details for the assigned move code ` + emailData.Locator + ` from ` + emailData.OriginDutyLocation + ` to ` + emailData.DestinationDutyLocation + ` in the MilMove system.
What this means to you:
If you are doing a Personally Procured Move (PPM), you can start moving your personal property.
Next steps for a PPM:
Remember to get legible certified weight tickets for both the empty and full weights for every trip you perform. If you do not upload legible certified weight tickets, your PPM incentive could be affected.
-
If you are requesting an Advance Operating Allowance (AOA, or cash advance) for a PPM, log into MilMove to download your AOA packet. You must obtain signature approval on the AOA packet from a government transportation office before submitting it to finance. If you have been directed to use your government travel charge card (GTCC) for expenses no further action is required.
Once you complete your PPM, log into MilMove, upload your receipts and weight tickets, and submit your PPM for review.
+
If you are requesting an Advance Operating Allowance (AOA, or cash advance) for a PPM, log into MilMove to download your AOA packet. You must obtain signature approval on the AOA packet from a government transportation office before submitting it to finance. If you have been directed to use your government travel charge card (GTCC) for expenses no further action is required.
Once you complete your PPM, log into MilMove, upload your receipts and weight tickets, and submit your PPM for review.
Next steps for government arranged shipments:
If additional services were identified during counseling, HomeSafe will send the request to the responsible government transportation office for review. Your HomeSafe Customer Care Representative should keep you informed on the status of the request.
If you have not already done so, please schedule a pre-move survey using HomeSafe Connect or by contacting a HomeSafe Customer Care Representative.
-
HomeSafe is your primary point of contact. If any information changes during the move, immediately notify your HomeSafe Customer Care Representative of the changes. Remember to keep your contact information updated in MilMove.
+
HomeSafe is your primary point of contact. If any information changes during the move, immediately notify your HomeSafe Customer Care Representative of the changes. Remember to keep your contact information updated in MilMove.
@@ -145,12 +142,12 @@ Email message body:
}
func getCorrectTextTemplate(emailData PrimeCounselingCompleteData) string {
- return `Subject Line: Your counselor has approved your move details
-Email message body:
-*** DO NOT REPLY directly to this email ***
+ return `*** DO NOT REPLY directly to this email ***
This is a confirmation that your counselor has approved move details for the assigned move code ` + emailData.Locator + ` from ` + emailData.OriginDutyLocation + ` to ` + emailData.DestinationDutyLocation + ` in the MilMove system.
+
What this means to you:
If you are doing a Personally Procured Move (PPM), you can start moving your personal property.
+
Next steps for a PPM:
• Remember to get legible certified weight tickets for both the empty and full weights for every trip you perform. If you do not upload legible certified weight tickets, your PPM incentive could be affected.
From 0eed4706e377a456ed958bf3161fcb50c7f9a1ad Mon Sep 17 00:00:00 2001
From: Brooklyn Welsh
Date: Wed, 24 Jan 2024 20:09:36 +0000
Subject: [PATCH 05/67] Fixed email sending and edited tests.
---
.../templates/prime_counseling_complete_template.html | 7 ++++++-
pkg/handlers/primeapi/move_task_order.go | 1 +
pkg/notifications/prime_counseling_complete.go | 1 +
pkg/notifications/prime_counseling_complete_test.go | 7 ++++++-
pkg/testdatagen/testharness/make_move.go | 4 +++-
5 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/pkg/assets/notifications/templates/prime_counseling_complete_template.html b/pkg/assets/notifications/templates/prime_counseling_complete_template.html
index c302e7db339..99592bba434 100644
--- a/pkg/assets/notifications/templates/prime_counseling_complete_template.html
+++ b/pkg/assets/notifications/templates/prime_counseling_complete_template.html
@@ -1,18 +1,23 @@
*** DO NOT REPLY directly to this email ***
-
This is a confirmation that your counselor has approved move details for the assigned move code {{.Locator}} from {{.OriginDutyLocation}} to {{.DestinationDutyLocation}} in the MilMove system.
+
This is a confirmation that your counselor has approved move details for the assigned move code {{.Locator}} from {{.OriginDutyLocation}} to {{.DestinationDutyLocation}} in the MilMove system.
What this means to you:
If you are doing a Personally Procured Move (PPM), you can start moving your personal property.
Next steps for a PPM:
Remember to get legible certified weight tickets for both the empty and full weights for every trip you perform. If you do not upload legible certified weight tickets, your PPM incentive could be affected.
+
If you are requesting an Advance Operating Allowance (AOA, or cash advance) for a PPM, log into MilMove to download your AOA packet. You must obtain signature approval on the AOA packet from a government transportation office before submitting it to finance. If you have been directed to use your government travel charge card (GTCC) for expenses no further action is required.
Once you complete your PPM, log into MilMove, upload your receipts and weight tickets, and submit your PPM for review.
Next steps for government arranged shipments:
If additional services were identified during counseling, HomeSafe will send the request to the responsible government transportation office for review. Your HomeSafe Customer Care Representative should keep you informed on the status of the request.
+
If you have not already done so, please schedule a pre-move survey using HomeSafe Connect or by contacting a HomeSafe Customer Care Representative.
+
HomeSafe is your primary point of contact. If any information changes during the move, immediately notify your HomeSafe Customer Care Representative of the changes. Remember to keep your contact information updated in MilMove.
This is a confirmation that your counselor has approved move details for the assigned move code ` + emailData.Locator + ` from ` + emailData.OriginDutyLocation + ` to ` + emailData.DestinationDutyLocation + ` in the MilMove system.
+
This is a confirmation that your counselor has approved move details for the assigned move code ` + emailData.Locator + ` from ` + emailData.OriginDutyLocation + ` to ` + emailData.DestinationDutyLocation + ` in the MilMove system.
What this means to you:
If you are doing a Personally Procured Move (PPM), you can start moving your personal property.
Next steps for a PPM:
Remember to get legible certified weight tickets for both the empty and full weights for every trip you perform. If you do not upload legible certified weight tickets, your PPM incentive could be affected.
+
If you are requesting an Advance Operating Allowance (AOA, or cash advance) for a PPM, log into MilMove to download your AOA packet. You must obtain signature approval on the AOA packet from a government transportation office before submitting it to finance. If you have been directed to use your government travel charge card (GTCC) for expenses no further action is required.
Once you complete your PPM, log into MilMove, upload your receipts and weight tickets, and submit your PPM for review.
Next steps for government arranged shipments:
If additional services were identified during counseling, HomeSafe will send the request to the responsible government transportation office for review. Your HomeSafe Customer Care Representative should keep you informed on the status of the request.
+
If you have not already done so, please schedule a pre-move survey using HomeSafe Connect or by contacting a HomeSafe Customer Care Representative.
+
HomeSafe is your primary point of contact. If any information changes during the move, immediately notify your HomeSafe Customer Care Representative of the changes. Remember to keep your contact information updated in MilMove.
@@ -307,7 +307,7 @@ func (suite *NotificationSuite) TestMoveIssuedToPrimeTextTemplateRender() {
originDutyLocation := "origDutyLocation"
s := moveIssuedToPrimeEmailData{
- MilitaryOneSourceLink: "https://example.com",
+ MilitaryOneSourceLink: OneSourceTransportationOfficeLink,
OriginDutyLocation: &originDutyLocation,
DestinationDutyLocation: "destDutyLocation",
Locator: "abc123",
@@ -345,7 +345,7 @@ Utilize your HomeSafe Customer Care Representative:
If you are unsatisfied at any time, contact a government transportation office.
You can see a listing of transportation offices on Military One Source here:
-https://example.com.
+` + OneSourceTransportationOfficeLink + `.
Thank you,
@@ -370,7 +370,7 @@ under the Privacy Act of 1974. Failure to protect Privacy Act information could
notification := NewMoveIssuedToPrime(move.ID)
s := moveIssuedToPrimeEmailData{
- MilitaryOneSourceLink: "https://example.com",
+ MilitaryOneSourceLink: OneSourceTransportationOfficeLink,
DestinationDutyLocation: "destDutyLocation",
Locator: "abc123",
ProvidesGovernmentCounseling: true,
@@ -407,7 +407,7 @@ Utilize your HomeSafe Customer Care Representative:
If you are unsatisfied at any time, contact a government transportation office.
You can see a listing of transportation offices on Military One Source here:
-https://example.com.
+` + OneSourceTransportationOfficeLink + `.
Thank you,
@@ -433,7 +433,7 @@ under the Privacy Act of 1974. Failure to protect Privacy Act information could
originDutyLocation := "origDutyLocation"
s := moveIssuedToPrimeEmailData{
- MilitaryOneSourceLink: "https://example.com",
+ MilitaryOneSourceLink: OneSourceTransportationOfficeLink,
OriginDutyLocation: &originDutyLocation,
DestinationDutyLocation: "destDutyLocation",
Locator: "abc123",
@@ -471,7 +471,7 @@ Utilize your HomeSafe Customer Care Representative:
If you are unsatisfied at any time, contact a government transportation office.
You can see a listing of transportation offices on Military One Source here:
-https://example.com.
+` + OneSourceTransportationOfficeLink + `.
Thank you,
diff --git a/pkg/notifications/move_submitted_test.go b/pkg/notifications/move_submitted_test.go
index c42548ecb47..5b8591c3374 100644
--- a/pkg/notifications/move_submitted_test.go
+++ b/pkg/notifications/move_submitted_test.go
@@ -55,7 +55,7 @@ func (suite *NotificationSuite) TestMoveSubmittedHTMLTemplateRenderWithGovCounse
- To change any information about your move, or to add or cancel shipments, you should contact 555-555-5555 or visit your local transportation office.
+ To change any information about your move, or to add or cancel shipments, you should contact 555-555-5555 or visit your local transportation office.
- To change any information about your move, or to add or cancel shipments, you should contact 555-555-5555 or visit your local transportation office.
+ To change any information about your move, or to add or cancel shipments, you should contact 555-555-5555 or visit your local transportation office.
- To change any information about your move, or to add or cancel shipments, you should contact your nearest transportation office. You can find the contact information using the directory of PCS-related contacts.
+ To change any information about your move, or to add or cancel shipments, you should contact your nearest transportation office. You can find the contact information using the directory of PCS-related contacts.
@@ -330,7 +330,7 @@ This is a confirmation that you have submitted the details for your move from or
We have assigned you a move code: abc123. You can use this code when talking to any representative about your move.
-To change any information about your move, or to add or cancel shipments, you should contact 555-555-5555 or visit your local transportation office (https://installations.militaryonesource.mil/search?program-service=2/view-by=ALL) .
+To change any information about your move, or to add or cancel shipments, you should contact 555-555-5555 or visit your local transportation office (` + OneSourceTransportationOfficeLink + `) .
Your weight allowance: 7,999 pounds. That is how much combined weight the government will pay for all movements between authorized locations under your orders.
diff --git a/pkg/notifications/prime_counseling_complete_test.go b/pkg/notifications/prime_counseling_complete_test.go
index d7644654e8b..d90ca8d59f7 100644
--- a/pkg/notifications/prime_counseling_complete_test.go
+++ b/pkg/notifications/prime_counseling_complete_test.go
@@ -75,7 +75,7 @@ func getCorrectEmailTemplate(emailData PrimeCounselingCompleteData) string {
If you are requesting an Advance Operating Allowance (AOA, or cash advance) for a PPM, log into MilMove to download your AOA packet. You must obtain signature approval on the AOA packet from a government transportation office before submitting it to finance. If you have been directed to use your government travel charge card (GTCC) for expenses no further action is required.
If you have any questions, contact a government transportation office. You can see a listing of transportation offices on Military One Source here: ` + OneSourceTransportationOfficeLink + `
Once you complete your PPM, log into MilMove, upload your receipts and weight tickets, and submit your PPM for review.
HomeSafe is your primary point of contact. If any information changes during the move, immediately notify your HomeSafe Customer Care Representative of the changes. Remember to keep your contact information updated in MilMove.
If you are unsatisfied at any time, contact a government transportation office. You can see a listing of transportation offices on Military One Source here: ` + OneSourceTransportationOfficeLink + `
Thank you,
USTRANSCOM MilMove Team
@@ -107,7 +107,7 @@ Next steps for a PPM:
• If you are requesting an Advance Operating Allowance (AOA, or cash advance) for a PPM, log into MilMove to download your AOA packet. You must obtain signature approval on the AOA packet from a government transportation office before submitting it to finance. If you have been directed to use your government travel charge card (GTCC) for expenses no further action is required.
-• If you have any questions, contact a government transportation office. You can see a listing of transportation offices on Military One Source here:
+• If you have any questions, contact a government transportation office. You can see a listing of transportation offices on Military One Source here: <` + OneSourceTransportationOfficeLink + `>
• Once you complete your PPM, log into MilMove , upload your receipts and weight tickets, and submit your PPM for review.
@@ -118,7 +118,7 @@ Next steps for government arranged shipments:
• HomeSafe is your primary point of contact. If any information changes during the move, immediately notify your HomeSafe Customer Care Representative of the changes. Remember to keep your contact information updated in MilMove.
-If you are unsatisfied at any time, contact a government transportation office. You can see a listing of transportation offices on Military One Source here: https://installations.militaryonesource.mil/search?program-service=2/view-by=ALL.
+If you are unsatisfied at any time, contact a government transportation office. You can see a listing of transportation offices on Military One Source here: ` + OneSourceTransportationOfficeLink + `.
Thank you,
diff --git a/pkg/notifications/reweigh_requested.go b/pkg/notifications/reweigh_requested.go
index addae2d705c..619441efb1c 100644
--- a/pkg/notifications/reweigh_requested.go
+++ b/pkg/notifications/reweigh_requested.go
@@ -53,7 +53,7 @@ func (m ReweighRequested) emails(appCtx appcontext.AppContext) ([]emailContent,
}
htmlBody, textBody, err := m.renderTemplates(appCtx, reweighRequestedEmailData{
- MilitaryOneSourceLink: "https://installations.militaryonesource.mil/search?program-service=2/view-by=ALL",
+ MilitaryOneSourceLink: OneSourceTransportationOfficeLink,
})
if err != nil {
diff --git a/pkg/notifications/reweigh_requested_test.go b/pkg/notifications/reweigh_requested_test.go
index 17ed20c67b1..0809b079679 100644
--- a/pkg/notifications/reweigh_requested_test.go
+++ b/pkg/notifications/reweigh_requested_test.go
@@ -51,7 +51,7 @@ func (suite *NotificationSuite) TestReweighRequestedHTMLTemplateRender() {
officeUser := factory.BuildOfficeUserWithRoles(nil, nil, []roles.RoleType{roles.RoleTypeTOO})
notification := NewReweighRequested(move.ID, shipment)
s := reweighRequestedEmailData{
- MilitaryOneSourceLink: "https://installations.militaryonesource.mil/search?program-service=2/view-by=ALL",
+ MilitaryOneSourceLink: OneSourceTransportationOfficeLink,
}
expectedHTMLContent := `
*** DO NOT REPLY directly to this email ***
*** This is an email generated by the U.S. Government system – MilMove. ***
Make sure your shipment has been reweighed before you accept delivery.
The only time a reweigh cannot be performed is when the shipment has already been unloaded.
If you believe your shipment should be reweighed and has not been, do not accept delivery. Tell your HSA Customer Care Representative that they need to reweigh the shipment before they unload it.
-
Remember, your HomeSafe Alliance (HSA) Customer Care Representative is your first point of contact; however, if you are unsatisfied at any time, contact a government transportation office. You can see a listing of transportation offices on Military One Source here: https://installations.militaryonesource.mil/search?program-service=2/view-by=ALL.
+
Remember, your HomeSafe Alliance (HSA) Customer Care Representative is your first point of contact; however, if you are unsatisfied at any time, contact a government transportation office. You can see a listing of transportation offices on Military One Source here: ` + OneSourceTransportationOfficeLink + `.
Thank you,
USTRANSCOM MilMove Team
The information contained in this email may contain Privacy Act information and is therefore protected under the Privacy Act of 1974. Failure to protect Privacy Act information could result in a $5,000 fine.
@@ -103,7 +103,7 @@ func (suite *NotificationSuite) TestReweighRequestedTextTemplateRender() {
officeUser := factory.BuildOfficeUserWithRoles(nil, nil, []roles.RoleType{roles.RoleTypeTOO})
notification := NewReweighRequested(move.ID, shipment)
s := reweighRequestedEmailData{
- MilitaryOneSourceLink: "https://installations.militaryonesource.mil/search?program-service=2/view-by=ALL",
+ MilitaryOneSourceLink: OneSourceTransportationOfficeLink,
}
expectedTextContent := `*** DO NOT REPLY directly to this email ***
@@ -140,7 +140,7 @@ The only time a reweigh cannot be performed is when the shipment has already bee
If you believe your shipment should be reweighed and has not been, do not accept delivery. Tell your HSA Customer Care Representative that they need to reweigh the shipment before they unload it.
-Remember, your HomeSafe Alliance (HSA) Customer Care Representative is your first point of contact; however, if you are unsatisfied at any time, contact a government transportation office. You can see a listing of transportation offices on Military One Source here: https://installations.militaryonesource.mil/search?program-service=2/view-by=ALL.
+Remember, your HomeSafe Alliance (HSA) Customer Care Representative is your first point of contact; however, if you are unsatisfied at any time, contact a government transportation office. You can see a listing of transportation offices on Military One Source here: ` + OneSourceTransportationOfficeLink + `.
Thank you,
From 1eb72367bbce5f78835905cbc137317568ce0920 Mon Sep 17 00:00:00 2001
From: Brooklyn Welsh
Date: Mon, 29 Jan 2024 15:30:23 +0000
Subject: [PATCH 18/67] Fixed tests for prime_counseling_complete
---
.../templates/prime_counseling_complete_template.html | 5 +----
pkg/notifications/prime_counseling_complete_test.go | 9 ++++++---
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/pkg/assets/notifications/templates/prime_counseling_complete_template.html b/pkg/assets/notifications/templates/prime_counseling_complete_template.html
index 99592bba434..20f74e9479c 100644
--- a/pkg/assets/notifications/templates/prime_counseling_complete_template.html
+++ b/pkg/assets/notifications/templates/prime_counseling_complete_template.html
@@ -25,7 +25,4 @@
Next steps for government arranged shipments:
USTRANSCOM MilMove Team
-
- The information contained in this email may contain Privacy Act information and is therefore protected under the
- Privacy Act of 1974. Failure to protect Privacy Act information could result in a $5,000 fine.
-
\ No newline at end of file
+
The information contained in this email may contain Privacy Act information and is therefore protected under the Privacy Act of 1974. Failure to protect Privacy Act information could result in a $5,000 fine.
{{- if .OriginDutyLocationPhoneLine }}
- To change any information about your move, or to add or cancel shipments, you should contact {{.OriginDutyLocationPhoneLine}} or visit your local transportation office.
+ To change any information about your move, or to add or cancel shipments, you should contact {{.OriginDutyLocationPhoneLine}} or visit your local transportation office.
{{- end }}
{{- if not .OriginDutyLocationPhoneLine }}
- To change any information about your move, or to add or cancel shipments, you should contact your nearest transportation office. You can find the contact information using the directory of PCS-related contacts.
+ To change any information about your move, or to add or cancel shipments, you should contact your nearest transportation office. You can find the contact information using the directory of PCS-related contacts.
{{- end }}
diff --git a/pkg/assets/notifications/templates/move_submitted_template.txt b/pkg/assets/notifications/templates/move_submitted_template.txt
index 99ea374b50e..78d071c2d4b 100644
--- a/pkg/assets/notifications/templates/move_submitted_template.txt
+++ b/pkg/assets/notifications/templates/move_submitted_template.txt
@@ -4,7 +4,7 @@ This is a confirmation that you have submitted the details for your move {{if .O
We have assigned you a move code: {{.Locator}}. You can use this code when talking to any representative about your move.
-{{ if .OriginDutyLocationPhoneLine -}} To change any information about your move, or to add or cancel shipments, you should contact {{.OriginDutyLocationPhoneLine}} or visit your local transportation office (https://installations.militaryonesource.mil/search?program-service=2/view-by=ALL) . {{- end }} {{- if not .OriginDutyLocationPhoneLine }} To change any information about your move, or to add or cancel shipments, you should contact your nearest transportation office. You can find the contact information using the directory of PCS-related contacts (https://installations.militaryonesource.mil/search?program-service=2/view-by=ALL) . {{- end }}
+{{ if .OriginDutyLocationPhoneLine -}} To change any information about your move, or to add or cancel shipments, you should contact {{.OriginDutyLocationPhoneLine}} or visit your local transportation office ({{.OneSourceTransportationOfficeLink}}) . {{- end }} {{- if not .OriginDutyLocationPhoneLine }} To change any information about your move, or to add or cancel shipments, you should contact your nearest transportation office. You can find the contact information using the directory of PCS-related contacts ({{.OneSourceTransportationOfficeLink}}) . {{- end }}
Your weight allowance: {{.WeightAllowance}} pounds. That is how much combined weight the government will pay for all movements between authorized locations under your orders.
diff --git a/pkg/assets/notifications/templates/prime_counseling_complete_template.html b/pkg/assets/notifications/templates/prime_counseling_complete_template.html
index 20f74e9479c..c72f645770a 100644
--- a/pkg/assets/notifications/templates/prime_counseling_complete_template.html
+++ b/pkg/assets/notifications/templates/prime_counseling_complete_template.html
@@ -8,7 +8,7 @@
Next steps for a PPM:
If you are requesting an Advance Operating Allowance (AOA, or cash advance) for a PPM, log into MilMove to download your AOA packet. You must obtain signature approval on the AOA packet from a government transportation office before submitting it to finance. If you have been directed to use your government travel charge card (GTCC) for expenses no further action is required.
If you have any questions, contact a government transportation office. You can see a listing of transportation offices on Military One Source here: {{.OneSourceTransportationOfficeLink}}
Once you complete your PPM, log into MilMove, upload your receipts and weight tickets, and submit your PPM for review.
@@ -20,7 +20,7 @@
Next steps for government arranged shipments:
HomeSafe is your primary point of contact. If any information changes during the move, immediately notify your HomeSafe Customer Care Representative of the changes. Remember to keep your contact information updated in MilMove.
If you are unsatisfied at any time, contact a government transportation office. You can see a listing of transportation offices on Military One Source here: {{.OneSourceTransportationOfficeLink}}
Thank you,
USTRANSCOM MilMove Team
diff --git a/pkg/assets/notifications/templates/prime_counseling_complete_template.txt b/pkg/assets/notifications/templates/prime_counseling_complete_template.txt
index ffe89d739bf..169d4dc5d57 100644
--- a/pkg/assets/notifications/templates/prime_counseling_complete_template.txt
+++ b/pkg/assets/notifications/templates/prime_counseling_complete_template.txt
@@ -9,7 +9,7 @@ Next steps for a PPM:
• If you are requesting an Advance Operating Allowance (AOA, or cash advance) for a PPM, log into MilMove to download your AOA packet. You must obtain signature approval on the AOA packet from a government transportation office before submitting it to finance. If you have been directed to use your government travel charge card (GTCC) for expenses no further action is required.
-• If you have any questions, contact a government transportation office. You can see a listing of transportation offices on Military One Source here:
+• If you have any questions, contact a government transportation office. You can see a listing of transportation offices on Military One Source here: <{{.OneSourceTransportationOfficeLink}}>
• Once you complete your PPM, log into MilMove , upload your receipts and weight tickets, and submit your PPM for review.
@@ -20,7 +20,7 @@ Next steps for government arranged shipments:
• HomeSafe is your primary point of contact. If any information changes during the move, immediately notify your HomeSafe Customer Care Representative of the changes. Remember to keep your contact information updated in MilMove.
-If you are unsatisfied at any time, contact a government transportation office. You can see a listing of transportation offices on Military One Source here: https://installations.militaryonesource.mil/search?program-service=2/view-by=ALL.
+If you are unsatisfied at any time, contact a government transportation office. You can see a listing of transportation offices on Military One Source here: {{.OneSourceTransportationOfficeLink}}.
Thank you,
diff --git a/pkg/notifications/move_submitted.go b/pkg/notifications/move_submitted.go
index ee70e74321a..6d342a1748a 100644
--- a/pkg/notifications/move_submitted.go
+++ b/pkg/notifications/move_submitted.go
@@ -87,12 +87,13 @@ func (m MoveSubmitted) emails(appCtx appcontext.AppContext) ([]emailContent, err
}
htmlBody, textBody, err := m.renderTemplates(appCtx, moveSubmittedEmailData{
- OriginDutyLocation: originDutyLocationName,
- DestinationDutyLocation: orders.NewDutyLocation.Name,
- OriginDutyLocationPhoneLine: originDutyLocationPhoneLine,
- Locator: move.Locator,
- WeightAllowance: humanize.Comma(int64(weight)),
- ProvidesGovernmentCounseling: providesGovernmentCounseling,
+ OriginDutyLocation: originDutyLocationName,
+ DestinationDutyLocation: orders.NewDutyLocation.Name,
+ OriginDutyLocationPhoneLine: originDutyLocationPhoneLine,
+ Locator: move.Locator,
+ WeightAllowance: humanize.Comma(int64(weight)),
+ ProvidesGovernmentCounseling: providesGovernmentCounseling,
+ OneSourceTransportationOfficeLink: OneSourceTransportationOfficeLink,
})
if err != nil {
@@ -126,12 +127,13 @@ func (m MoveSubmitted) renderTemplates(appCtx appcontext.AppContext, data moveSu
}
type moveSubmittedEmailData struct {
- OriginDutyLocation *string
- DestinationDutyLocation string
- OriginDutyLocationPhoneLine *string
- Locator string
- WeightAllowance string
- ProvidesGovernmentCounseling bool
+ OriginDutyLocation *string
+ DestinationDutyLocation string
+ OriginDutyLocationPhoneLine *string
+ Locator string
+ WeightAllowance string
+ ProvidesGovernmentCounseling bool
+ OneSourceTransportationOfficeLink string
}
// RenderHTML renders the html for the email
diff --git a/pkg/notifications/move_submitted_test.go b/pkg/notifications/move_submitted_test.go
index 5b8591c3374..8d444865a11 100644
--- a/pkg/notifications/move_submitted_test.go
+++ b/pkg/notifications/move_submitted_test.go
@@ -35,12 +35,13 @@ func (suite *NotificationSuite) TestMoveSubmittedHTMLTemplateRenderWithGovCounse
originDutyLocationPhoneLine := "555-555-5555"
s := moveSubmittedEmailData{
- OriginDutyLocation: &originDutyLocation,
- DestinationDutyLocation: "destDutyLocation",
- OriginDutyLocationPhoneLine: &originDutyLocationPhoneLine,
- Locator: "abc123",
- WeightAllowance: "7,999",
- ProvidesGovernmentCounseling: true,
+ OriginDutyLocation: &originDutyLocation,
+ DestinationDutyLocation: "destDutyLocation",
+ OriginDutyLocationPhoneLine: &originDutyLocationPhoneLine,
+ Locator: "abc123",
+ WeightAllowance: "7,999",
+ ProvidesGovernmentCounseling: true,
+ OneSourceTransportationOfficeLink: OneSourceTransportationOfficeLink,
}
expectedHTMLContent := `
If you have any questions, call the {{.OriginDutyLocation}} PPPO at {{.OriginDutyLocationPhoneLine}} and reference your move locator code: {{.Locator}}
diff --git a/pkg/assets/notifications/templates/move_approved_template.txt b/pkg/assets/notifications/templates/move_approved_template.txt
index a285a6c5b81..dea72a86c94 100644
--- a/pkg/assets/notifications/templates/move_approved_template.txt
+++ b/pkg/assets/notifications/templates/move_approved_template.txt
@@ -12,4 +12,4 @@ Be sure to save your weight tickets and any receipts associated with your move.
{{if .OriginDutyLocation}}If you have any questions, call the {{.OriginDutyLocation}} PPPO at {{.OriginDutyLocationPhoneLine}} and reference move locator code: {{.Locator}}.{{end}}
-You can check the status of your move anytime at https://my.move.mil"
+You can check the status of your move anytime at {{.MyMoveLink}}"
diff --git a/pkg/assets/notifications/templates/move_payment_reminder_template.html b/pkg/assets/notifications/templates/move_payment_reminder_template.html
index aa3f974beb6..765928f97fe 100644
--- a/pkg/assets/notifications/templates/move_payment_reminder_template.html
+++ b/pkg/assets/notifications/templates/move_payment_reminder_template.html
@@ -11,7 +11,7 @@
Remember to get legible certified weight tickets for both the empty and full weights for every trip you perform. If you do not upload legible certified weight tickets, your PPM incentive could be affected.
-
If you are requesting an Advance Operating Allowance (AOA, or cash advance) for a PPM, log into MilMove to download your AOA packet. You must obtain signature approval on the AOA packet from a government transportation office before submitting it to finance. If you have been directed to use your government travel charge card (GTCC) for expenses no further action is required.
+
If you are requesting an Advance Operating Allowance (AOA, or cash advance) for a PPM, log into MilMove to download your AOA packet. You must obtain signature approval on the AOA packet from a government transportation office before submitting it to finance. If you have been directed to use your government travel charge card (GTCC) for expenses no further action is required.
If you have any questions, contact a government transportation office. You can see a listing of transportation offices on Military One Source here: {{.OneSourceTransportationOfficeLink}}
-
Once you complete your PPM, log into MilMove, upload your receipts and weight tickets, and submit your PPM for review.
+
Once you complete your PPM, log into MilMove, upload your receipts and weight tickets, and submit your PPM for review.
Next steps for government arranged shipments:
diff --git a/pkg/assets/notifications/templates/prime_counseling_complete_template.txt b/pkg/assets/notifications/templates/prime_counseling_complete_template.txt
index 169d4dc5d57..daf643b2ae8 100644
--- a/pkg/assets/notifications/templates/prime_counseling_complete_template.txt
+++ b/pkg/assets/notifications/templates/prime_counseling_complete_template.txt
@@ -7,11 +7,11 @@ If you are doing a Personally Procured Move (PPM), you can start moving your per
Next steps for a PPM:
• Remember to get legible certified weight tickets for both the empty and full weights for every trip you perform. If you do not upload legible certified weight tickets, your PPM incentive could be affected.
-• If you are requesting an Advance Operating Allowance (AOA, or cash advance) for a PPM, log into MilMove to download your AOA packet. You must obtain signature approval on the AOA packet from a government transportation office before submitting it to finance. If you have been directed to use your government travel charge card (GTCC) for expenses no further action is required.
+• If you are requesting an Advance Operating Allowance (AOA, or cash advance) for a PPM, log into MilMove <{{.MyMoveLink}}/> to download your AOA packet. You must obtain signature approval on the AOA packet from a government transportation office before submitting it to finance. If you have been directed to use your government travel charge card (GTCC) for expenses no further action is required.
• If you have any questions, contact a government transportation office. You can see a listing of transportation offices on Military One Source here: <{{.OneSourceTransportationOfficeLink}}>
-• Once you complete your PPM, log into MilMove , upload your receipts and weight tickets, and submit your PPM for review.
+• Once you complete your PPM, log into MilMove <{{.MyMoveLink}}/>, upload your receipts and weight tickets, and submit your PPM for review.
Next steps for government arranged shipments:
• If additional services were identified during counseling, HomeSafe will send the request to the responsible government transportation office for review. Your HomeSafe Customer Care Representative should keep you informed on the status of the request.
diff --git a/pkg/notifications/constants.go b/pkg/notifications/constants.go
index e533a1e8ea8..4ef7f7633c4 100644
--- a/pkg/notifications/constants.go
+++ b/pkg/notifications/constants.go
@@ -1,3 +1,4 @@
package notifications
const OneSourceTransportationOfficeLink = "https://installations.militaryonesource.mil/search?program-service=2/view-by=ALL"
+const MyMoveLink = "https://my.move.mil/"
\ No newline at end of file
diff --git a/pkg/notifications/move_approved.go b/pkg/notifications/move_approved.go
index c334a8563a4..dfa4e6b692e 100644
--- a/pkg/notifications/move_approved.go
+++ b/pkg/notifications/move_approved.go
@@ -91,6 +91,7 @@ func (m MoveApproved) emails(appCtx appcontext.AppContext) ([]emailContent, erro
DestinationDutyLocation: orders.NewDutyLocation.Name,
OriginDutyLocationPhoneLine: originDutyLocationPhoneLine,
Locator: move.Locator,
+ MyMoveLink: MyMoveLink,
})
if err != nil {
@@ -132,6 +133,7 @@ type moveApprovedEmailData struct {
DestinationDutyLocation string
OriginDutyLocationPhoneLine *string
Locator string
+ MyMoveLink string
}
// RenderHTML renders the html for the email
diff --git a/pkg/notifications/move_approved_test.go b/pkg/notifications/move_approved_test.go
index b774d3e17cd..5e4a2d470dd 100644
--- a/pkg/notifications/move_approved_test.go
+++ b/pkg/notifications/move_approved_test.go
@@ -46,6 +46,7 @@ func (suite *NotificationSuite) TestMoveApprovedHTMLTemplateRender() {
DestinationDutyLocation: "destDutyLocation",
OriginDutyLocationPhoneLine: &originDutyLocationPhoneLine,
Locator: "abc123",
+ MyMoveLink: MyMoveLink,
}
expectedHTMLContent := `
Remember to get legible certified weight tickets for both the empty and full weights for every trip you perform. If you do not upload legible certified weight tickets, your PPM incentive could be affected.
-
If you are requesting an Advance Operating Allowance (AOA, or cash advance) for a PPM, log into MilMove to download your AOA packet. You must obtain signature approval on the AOA packet from a government transportation office before submitting it to finance. If you have been directed to use your government travel charge card (GTCC) for expenses no further action is required.
+
If you are requesting an Advance Operating Allowance (AOA, or cash advance) for a PPM, log into MilMove to download your AOA packet. You must obtain signature approval on the AOA packet from a government transportation office before submitting it to finance. If you have been directed to use your government travel charge card (GTCC) for expenses no further action is required.
If you have any questions, contact a government transportation office. You can see a listing of transportation offices on Military One Source here: ` + OneSourceTransportationOfficeLink + `
-
Once you complete your PPM, log into MilMove, upload your receipts and weight tickets, and submit your PPM for review.
+
Once you complete your PPM, log into MilMove, upload your receipts and weight tickets, and submit your PPM for review.
Next steps for government arranged shipments:
@@ -111,11 +114,11 @@ If you are doing a Personally Procured Move (PPM), you can start moving your per
Next steps for a PPM:
• Remember to get legible certified weight tickets for both the empty and full weights for every trip you perform. If you do not upload legible certified weight tickets, your PPM incentive could be affected.
-• If you are requesting an Advance Operating Allowance (AOA, or cash advance) for a PPM, log into MilMove to download your AOA packet. You must obtain signature approval on the AOA packet from a government transportation office before submitting it to finance. If you have been directed to use your government travel charge card (GTCC) for expenses no further action is required.
+• If you are requesting an Advance Operating Allowance (AOA, or cash advance) for a PPM, log into MilMove <` + MyMoveLink + `/> to download your AOA packet. You must obtain signature approval on the AOA packet from a government transportation office before submitting it to finance. If you have been directed to use your government travel charge card (GTCC) for expenses no further action is required.
• If you have any questions, contact a government transportation office. You can see a listing of transportation offices on Military One Source here: <` + OneSourceTransportationOfficeLink + `>
-• Once you complete your PPM, log into MilMove , upload your receipts and weight tickets, and submit your PPM for review.
+• Once you complete your PPM, log into MilMove <` + MyMoveLink + `/>, upload your receipts and weight tickets, and submit your PPM for review.
Next steps for government arranged shipments:
• If additional services were identified during counseling, HomeSafe will send the request to the responsible government transportation office for review. Your HomeSafe Customer Care Representative should keep you informed on the status of the request.
From 6045f642ea7351f71907909670bf27ffd2fd7f50 Mon Sep 17 00:00:00 2001
From: Brooklyn Welsh
Date: Mon, 29 Jan 2024 16:59:59 +0000
Subject: [PATCH 21/67] Fix missing EOF space in constants.go
---
pkg/notifications/constants.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pkg/notifications/constants.go b/pkg/notifications/constants.go
index 4ef7f7633c4..fc7d082ce02 100644
--- a/pkg/notifications/constants.go
+++ b/pkg/notifications/constants.go
@@ -1,4 +1,4 @@
package notifications
const OneSourceTransportationOfficeLink = "https://installations.militaryonesource.mil/search?program-service=2/view-by=ALL"
-const MyMoveLink = "https://my.move.mil/"
\ No newline at end of file
+const MyMoveLink = "https://my.move.mil/"
From 1a8aad162a7442977a699ec8887ef8a7bd53ed04 Mon Sep 17 00:00:00 2001
From: Ricky Mettler
Date: Wed, 7 Feb 2024 15:19:29 +0000
Subject: [PATCH 22/67] add aoa download for PPM shipment service counselor TOO
---
.../Office/DefinitionLists/PPMShipmentInfoList.jsx | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/src/components/Office/DefinitionLists/PPMShipmentInfoList.jsx b/src/components/Office/DefinitionLists/PPMShipmentInfoList.jsx
index 1870f584205..7e0159d900c 100644
--- a/src/components/Office/DefinitionLists/PPMShipmentInfoList.jsx
+++ b/src/components/Office/DefinitionLists/PPMShipmentInfoList.jsx
@@ -182,6 +182,19 @@ const PPMShipmentInfoList = ({
);
+ const aoaPacketElement = (
+
)}
- {shipment?.ppmShipment?.advanceStatus === 'REJECTED' && (
+ {shipment?.ppmShipment?.advanceStatus === ADVANCE_STATUSES.REJECTED.apiValue && (
Advance request denied
)}
{shipment?.ppmShipment?.advanceStatus == null && (
From bc3061598dedf7db0ad42ece38d49aa561870c2b Mon Sep 17 00:00:00 2001
From: Brooklyn Welsh
Date: Wed, 14 Feb 2024 19:45:42 +0000
Subject: [PATCH 39/67] Fixed EOF missing line break.
---
pkg/notifications/prime_counseling_complete.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pkg/notifications/prime_counseling_complete.go b/pkg/notifications/prime_counseling_complete.go
index 562735fb982..97f7b3e82d9 100644
--- a/pkg/notifications/prime_counseling_complete.go
+++ b/pkg/notifications/prime_counseling_complete.go
@@ -129,4 +129,4 @@ func (p PrimeCounselingComplete) RenderText(appCtx appcontext.AppContext, data P
return "", err
}
return textBuffer.String(), nil
-}
\ No newline at end of file
+}
From 212e73e2be7c8e866d2ba520d19e7aa32562833e Mon Sep 17 00:00:00 2001
From: Michael Inthavongsay
Date: Wed, 14 Feb 2024 20:15:00 +0000
Subject: [PATCH 40/67] enhance error message to use message from response.
This is a compromise because cannot hide button. Hiding will require schema
change on GET response.
---
.../PrimeUI/MoveTaskOrder/MoveDetails.jsx | 23 +++++++++++--------
1 file changed, 13 insertions(+), 10 deletions(-)
diff --git a/src/pages/PrimeUI/MoveTaskOrder/MoveDetails.jsx b/src/pages/PrimeUI/MoveTaskOrder/MoveDetails.jsx
index b12a86f38e1..44b2826375c 100644
--- a/src/pages/PrimeUI/MoveTaskOrder/MoveDetails.jsx
+++ b/src/pages/PrimeUI/MoveTaskOrder/MoveDetails.jsx
@@ -95,22 +95,25 @@ const MoveDetails = ({ setFlashMessage }) => {
},
onError: (error) => {
const { response: { body } = {} } = error;
-
if (body) {
setErrorMessage({
title: `Prime API: ${body.title} `,
detail: `${body.detail}`,
});
- } else if (error.response.status === 422) {
- setErrorMessage({
- title: 'Unprocessable Entity Error: ',
- detail: `There are no ${documentTypeKey} for this move to download.`,
- });
} else {
- setErrorMessage({
- title: 'Unexpected error: ',
- detail: 'Please check the move order document user uploads for this move.',
- });
+ // Error message is coming in as byte array(PDF).
+ // Need to convert byte array into text/json.
+ (async () => {
+ let title = 'Unexpected Error: ';
+ if (error.response.status === 422) {
+ title = 'Unprocessable Entity Error: ';
+ }
+ const text = await error.response.data.text();
+ setErrorMessage({
+ title,
+ detail: JSON.parse(text).detail,
+ });
+ })();
}
},
});
From df30c652d10566e72575d68a32ac3d04ef175982 Mon Sep 17 00:00:00 2001
From: Ricky Mettler
Date: Tue, 13 Feb 2024 20:18:49 +0000
Subject: [PATCH 41/67] fixed playwright tests with upload PPM tests
---
.../my/milmove/ppms/customerPpmTestFixture.js | 4 ++--
.../ppms/entireShipmentOnboarding.spec.js | 17 +++++++++++------
.../milmove/ppms/navigateToUploadDocs.spec.js | 11 ++++++++---
3 files changed, 21 insertions(+), 11 deletions(-)
diff --git a/playwright/tests/my/milmove/ppms/customerPpmTestFixture.js b/playwright/tests/my/milmove/ppms/customerPpmTestFixture.js
index 80cdce0cf26..1ab2ec588e3 100644
--- a/playwright/tests/my/milmove/ppms/customerPpmTestFixture.js
+++ b/playwright/tests/my/milmove/ppms/customerPpmTestFixture.js
@@ -908,10 +908,10 @@ export class CustomerPpmPage extends CustomerPage {
await expect(this.page.locator('.usa-alert--success')).toContainText('You submitted documentation for review.');
- const stepContainer = this.page.locator('[data-testid="stepContainer6"]');
+ var stepContainer = this.page.locator('[data-testid="stepContainer6"]');
if (stepContainer == null) {
- this.page.locator('[data-testid="stepContainer5"]');
+ stepContainer = this.page.locator('[data-testid="stepContainer5"]');
}
await expect(stepContainer.getByRole('button', { name: 'Download Incentive Packet' })).toBeDisabled();
diff --git a/playwright/tests/my/milmove/ppms/entireShipmentOnboarding.spec.js b/playwright/tests/my/milmove/ppms/entireShipmentOnboarding.spec.js
index d330106d3c7..ea57a703ae2 100644
--- a/playwright/tests/my/milmove/ppms/entireShipmentOnboarding.spec.js
+++ b/playwright/tests/my/milmove/ppms/entireShipmentOnboarding.spec.js
@@ -45,11 +45,16 @@ class CustomerPpmOnboardingPage extends CustomerPpmPage {
/**
*/
- async verifyStep5ExistsAndBtnIsDisabled() {
- const stepContainer5 = this.page.locator('[data-testid="stepContainer5"]');
- await expect(stepContainer5.getByRole('button', { name: 'Upload PPM Documents' })).toBeDisabled();
+ async verifyManagePPMStepExistsAndBtnIsDisabled() {
+ const stepContainer = this.page.locator('[data-testid="stepContainer6"]');
+
+ if (stepContainer == null) {
+ this.page.locator('[data-testid="stepContainer5"]');
+ }
+
+ await expect(stepContainer.getByRole('button', { name: 'Upload PPM Documents' })).toBeDisabled();
await expect(
- stepContainer5.locator('p').getByText('After a counselor approves your PPM, you will be able to:'),
+ stepContainer.locator('p').getByText('After a counselor approves your PPM, you will be able to:'),
).toBeVisible();
}
@@ -119,7 +124,7 @@ test.describe('Entire PPM onboarding flow', () => {
await customerPpmOnboardingPage.submitsAdvancePage({ addAdvance: true, isMobile });
await customerPpmOnboardingPage.navigateToAgreementAndSign();
await customerPpmOnboardingPage.submitMove();
- await customerPpmOnboardingPage.verifyStep5ExistsAndBtnIsDisabled();
+ await customerPpmOnboardingPage.verifyManagePPMStepExistsAndBtnIsDisabled();
});
test('happy path with edits and backs', async () => {
@@ -138,7 +143,7 @@ test.describe('Entire PPM onboarding flow', () => {
await customerPpmOnboardingPage.navigateToAgreementAndSign();
await customerPpmOnboardingPage.submitMove();
- await customerPpmOnboardingPage.verifyStep5ExistsAndBtnIsDisabled();
+ await customerPpmOnboardingPage.verifyManagePPMStepExistsAndBtnIsDisabled();
});
});
});
diff --git a/playwright/tests/my/milmove/ppms/navigateToUploadDocs.spec.js b/playwright/tests/my/milmove/ppms/navigateToUploadDocs.spec.js
index bc12f20a022..d46a68a0db9 100644
--- a/playwright/tests/my/milmove/ppms/navigateToUploadDocs.spec.js
+++ b/playwright/tests/my/milmove/ppms/navigateToUploadDocs.spec.js
@@ -16,9 +16,14 @@ test.describe('PPM Request Payment - Begin providing documents flow', () => {
test('has upload documents button enabled', async ({ page }) => {
await expect(page.getByRole('heading', { name: 'Your move is in progress.' })).toBeVisible();
- const stepContainer5 = page.getByTestId('stepContainer5');
- await expect(stepContainer5.locator('p').getByText('15 Apr 2022')).toBeVisible();
- await stepContainer5.getByRole('button', { name: 'Upload PPM Documents' }).click();
+ var stepContainer = page.getByTestId('stepContainer6');
+
+ if (stepContainer == null) {
+ stepContainer = page.getByTestId('stepContainer5');
+ }
+
+ await expect(stepContainer.locator('p').getByText('15 Apr 2022')).toBeVisible();
+ await stepContainer.getByRole('button', { name: 'Upload PPM Documents' }).click();
await expect(page).toHaveURL(/\/moves\/[^/]+\/shipments\/[^/]+\/about/);
});
});
From b757cb3d7f7b95b1b41042c7351c45115081c859 Mon Sep 17 00:00:00 2001
From: Ricky Mettler
Date: Wed, 14 Feb 2024 22:23:31 +0000
Subject: [PATCH 42/67] change var to let
---
playwright/tests/my/milmove/ppms/customerPpmTestFixture.js | 2 +-
playwright/tests/my/milmove/ppms/navigateToUploadDocs.spec.js | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/playwright/tests/my/milmove/ppms/customerPpmTestFixture.js b/playwright/tests/my/milmove/ppms/customerPpmTestFixture.js
index 1ab2ec588e3..392ea75d374 100644
--- a/playwright/tests/my/milmove/ppms/customerPpmTestFixture.js
+++ b/playwright/tests/my/milmove/ppms/customerPpmTestFixture.js
@@ -908,7 +908,7 @@ export class CustomerPpmPage extends CustomerPage {
await expect(this.page.locator('.usa-alert--success')).toContainText('You submitted documentation for review.');
- var stepContainer = this.page.locator('[data-testid="stepContainer6"]');
+ let stepContainer = this.page.locator('[data-testid="stepContainer6"]');
if (stepContainer == null) {
stepContainer = this.page.locator('[data-testid="stepContainer5"]');
diff --git a/playwright/tests/my/milmove/ppms/navigateToUploadDocs.spec.js b/playwright/tests/my/milmove/ppms/navigateToUploadDocs.spec.js
index d46a68a0db9..a40b8dfe36d 100644
--- a/playwright/tests/my/milmove/ppms/navigateToUploadDocs.spec.js
+++ b/playwright/tests/my/milmove/ppms/navigateToUploadDocs.spec.js
@@ -16,7 +16,7 @@ test.describe('PPM Request Payment - Begin providing documents flow', () => {
test('has upload documents button enabled', async ({ page }) => {
await expect(page.getByRole('heading', { name: 'Your move is in progress.' })).toBeVisible();
- var stepContainer = page.getByTestId('stepContainer6');
+ let stepContainer = page.getByTestId('stepContainer6');
if (stepContainer == null) {
stepContainer = page.getByTestId('stepContainer5');
From b8e0a6b42a175125835bd80a313a04478b5a2d50 Mon Sep 17 00:00:00 2001
From: deandreJones
Date: Fri, 16 Feb 2024 16:16:30 +0000
Subject: [PATCH 43/67] B-18560
---
...47_updateTransportationOfficesGbloc.up.sql | 71 ++++++++++++++++++-
pkg/services/order/order_fetcher.go | 2 +-
2 files changed, 71 insertions(+), 2 deletions(-)
diff --git a/migrations/app/schema/20240214213247_updateTransportationOfficesGbloc.up.sql b/migrations/app/schema/20240214213247_updateTransportationOfficesGbloc.up.sql
index 43e4369b456..88befc1afc6 100644
--- a/migrations/app/schema/20240214213247_updateTransportationOfficesGbloc.up.sql
+++ b/migrations/app/schema/20240214213247_updateTransportationOfficesGbloc.up.sql
@@ -1 +1,70 @@
-update transportation_offices set gbloc = 'BGAC' where gbloc = 'BKAS';
\ No newline at end of file
+update
+ transportation_offices
+set
+ gbloc = 'BGAC'
+where
+ gbloc = 'BKAS';
+
+insert
+ into
+ duty_locations(id,
+ name,
+ address_id,
+ created_at,
+ updated_at,
+ transportation_office_id,
+ provides_services_counseling )
+values(
+ '9f7a1c83-26ad-4ba3-b30f-1a2e62f250f6',
+ 'PPPO West Point/ USMA - USA',
+'6aa77b74-41a7-4a4c-ab29-986f3263495a',
+now(),
+now(),
+'dd043073-4f1b-460f-8f8c-74403619dbaa',
+true);
+
+insert
+ into duty_location_names(id,
+ name,
+ duty_location_id,
+ created_at,
+ updated_at)
+values (
+ '47cfbfa1-4633-440e-928e-92a6f462826e',
+ 'PPPO West Point/ USMA - USA',
+'9f7a1c83-26ad-4ba3-b30f-1a2e62f250f6',
+now(),
+now()
+);
+
+insert
+ into
+ duty_locations(id,
+ name,
+ address_id,
+ created_at,
+ updated_at,
+ transportation_office_id,
+ provides_services_counseling )
+values(
+ '0f420f7b-72ac-43cf-bc93-f24d44ba8f93',
+ 'PPPO USAG Miami - USA',
+'09058d36-2966-496a-aaf5-55c024404396',
+now(),
+now(),
+'4f10d0f5-6017-4de2-8cfb-ee9252e492d5',
+true);
+
+insert
+ into duty_location_names(id,
+ name,
+ duty_location_id,
+ created_at,
+ updated_at)
+values (
+ 'fbe7677f-e1ec-47d2-bf33-57e83eded778',
+ 'PPPO USAG Miami - USA',
+'0f420f7b-72ac-43cf-bc93-f24d44ba8f93',
+now(),
+now()
+);
diff --git a/pkg/services/order/order_fetcher.go b/pkg/services/order/order_fetcher.go
index 6ca449f8f5a..a2d34e1402c 100644
--- a/pkg/services/order/order_fetcher.go
+++ b/pkg/services/order/order_fetcher.go
@@ -49,7 +49,7 @@ func (f orderFetcher) ListOrders(appCtx appcontext.AppContext, officeUserID uuid
needsCounseling := false
if len(params.Status) > 0 {
for _, status := range params.Status {
- if status == string(models.MoveStatusNeedsServiceCounseling) || status == string(models.MoveStatusServiceCounselingCompleted) {
+ if status == string(models.MoveStatusNeedsServiceCounseling) {
needsCounseling = true
}
}
From 269cae4ccbe576f0dc0b4decbfa3d63cd8e16fb8 Mon Sep 17 00:00:00 2001
From: Brooklyn Welsh
Date: Mon, 29 Jan 2024 16:50:19 +0000
Subject: [PATCH 44/67] Added MilMoveLink constant to current Integration
branch notifications.
---
.../templates/move_counseled_template.html | 24 +++
.../templates/move_counseled_template.txt | 21 ++
.../templates/ppm_packet_email_template.html | 4 +-
.../templates/ppm_packet_email_template.txt | 4 +-
pkg/notifications/move_counseled.go | 134 +++++++++++++
pkg/notifications/move_counseled_test.go | 180 ++++++++++++++++++
pkg/notifications/ppm_packet_email.go | 72 +++----
pkg/notifications/ppm_packet_email_test.go | 82 ++++----
8 files changed, 447 insertions(+), 74 deletions(-)
create mode 100644 pkg/assets/notifications/templates/move_counseled_template.html
create mode 100644 pkg/assets/notifications/templates/move_counseled_template.txt
create mode 100644 pkg/notifications/move_counseled.go
create mode 100644 pkg/notifications/move_counseled_test.go
diff --git a/pkg/assets/notifications/templates/move_counseled_template.html b/pkg/assets/notifications/templates/move_counseled_template.html
new file mode 100644
index 00000000000..272f7e4d2b8
--- /dev/null
+++ b/pkg/assets/notifications/templates/move_counseled_template.html
@@ -0,0 +1,24 @@
+
*** DO NOT REPLY directly to this email ***
+
+
This is a confirmation that your counselor has approved move details for the assigned move code{{if or (not .Locator) (not .OriginDutyLocation) (not .DestinationDutyLocation)}}{{end}}{{if and .Locator .OriginDutyLocation .DestinationDutyLocation}} {{.Locator}} from {{.OriginDutyLocation}} to {{.DestinationDutyLocation}} in the MilMove system{{end}}.
+
+
What this means to you:
+If you are doing a Personally Procured Move (PPM), you can start moving your personal property.
+
+
Next steps for a PPM:
+
+
Remember to get legible certified weight tickets for both the empty and full weights for every trip you perform. If you do not upload legible certified weight tickets, your PPM incentive could be affected.
+
If your counselor approved an Advance Operating Allowance (AOA, or cash advance) for a PPM, log into MilMove to download your AOA Packet, and submit it to finance according to the instructions provided by your counselor. If you have been directed to use your government travel charge card (GTCC) for expenses no further action is required.
+
Once you complete your PPM, log into MilMove, upload your receipts and weight tickets, and submit your PPM for review.
+
+
+
Next steps for government arranged shipments:
+
+
Your move request will be reviewed by the responsible personal property shipping office and a move task order for services will be placed with HomeSafe Alliance.
+
Once this order is placed, you will receive an e-mail invitation to create an account in HomeSafe Connect (check your spam or junk folder). This is the system you will use to schedule your pre-move survey.
+
HomeSafe is required to contact you within 24 hours of receiving your move task order. Once contact has been established, HomeSafe is your primary point of contact. If any information about your move changes at any point during the move, immediately notify your HomeSafe Customer Care Representative of the changes. Remember to keep your contact information updated in MilMove.
+
+
Thank you,
+USTRANSCOM MilMove Team
+
+
The information contained in this email may contain Privacy Act information and is therefore protected under the Privacy Act of 1974. Failure to protect Privacy Act information could result in a $5,000 fine.
\ No newline at end of file
diff --git a/pkg/assets/notifications/templates/move_counseled_template.txt b/pkg/assets/notifications/templates/move_counseled_template.txt
new file mode 100644
index 00000000000..d972543fa1d
--- /dev/null
+++ b/pkg/assets/notifications/templates/move_counseled_template.txt
@@ -0,0 +1,21 @@
+*** DO NOT REPLY directly to this email ***
+
+This is a confirmation that your counselor has approved move details for the assigned move code{{if and .Locator .OriginDutyLocation .DestinationDutyLocation}} {{.Locator}} from {{.OriginDutyLocation}} to {{.DestinationDutyLocation}} in the MilMove system{{end}}.
+
+What this means to you:
+If you are doing a Personally Procured Move (PPM), you can start moving your personal property.
+
+Next steps for a PPM:
+ * Remember to get legible certified weight tickets for both the empty and full weights for every trip you perform. If you do not upload legible certified weight tickets, your PPM incentive could be affected.
+ * If your counselor approved an Advance Operating Allowance (AOA, or cash advance) for a PPM, log into MilMove <{{.MyMoveLink}}/> to download your AOA Packet, and submit it to finance according to the instructions provided by your counselor. If you have been directed to use your government travel charge card (GTCC) for expenses no further action is required.
+ * Once you complete your PPM, log into MilMove <{{.MyMoveLink}}/>, upload your receipts and weight tickets, and submit your PPM for review.
+
+Next steps for government arranged shipments:
+ * Your move request will be reviewed by the responsible personal property shipping office and a move task order for services will be placed with HomeSafe Alliance.
+ * Once this order is placed, you will receive an e-mail invitation to create an account in HomeSafe Connect (check your spam or junk folder). This is the system you will use to schedule your pre-move survey.
+ * HomeSafe is required to contact you within 24 hours of receiving your move task order. Once contact has been established, HomeSafe is your primary point of contact. If any information about your move changes at any point during the move, immediately notify your HomeSafe Customer Care Representative of the changes. Remember to keep your contact information updated in MilMove.
+
+Thank you,
+USTRANSCOM MilMove Team
+
+The information contained in this email may contain Privacy Act information and is therefore protected under the Privacy Act of 1974. Failure to protect Privacy Act information could result in a $5,000 fine.
\ No newline at end of file
diff --git a/pkg/assets/notifications/templates/ppm_packet_email_template.html b/pkg/assets/notifications/templates/ppm_packet_email_template.html
index 6131b8e9fcf..03684b9c140 100644
--- a/pkg/assets/notifications/templates/ppm_packet_email_template.html
+++ b/pkg/assets/notifications/templates/ppm_packet_email_template.html
@@ -3,11 +3,11 @@
Next steps:
{{if eq .ServiceBranch "Marine Corps, Navy, and Coast Guard"}}
For Marine Corps, Navy, and Coast Guard personnel:
-
You can now log into MilMove https://my.move.mil/ and view your payment packet; however, you do not need to forward your packet to finance as your closeout location is associated with your finance office and they will handle this step for you.
+
You can now log into MilMove {{.MyMoveLink}}/ and view your payment packet; however, you do not need to forward your packet to finance as your closeout location is associated with your finance office and they will handle this step for you.
Note: Not all claimed expenses may have been accepted during PPM closeout if they did not meet the definition of a valid expense.
{{else}}
For {{.ServiceBranch}} personnel (FURTHER ACTION REQUIRED):
-
You can now log into MilMove https://my.move.mil/ and download your payment packet to submit to {{.SubmitLocation}}. You must complete this step to receive final settlement of your PPM.
+
You can now log into MilMove {{.MyMoveLink}}/ and download your payment packet to submit to {{.SubmitLocation}}. You must complete this step to receive final settlement of your PPM.
{{if eq .ServiceBranch "Air Force and Space Force"}}Note: The Transportation Office does not determine claimable expenses. Claimable expenses will be determined by finance{{else if eq .ServiceBranch "Army"}}Note: Not all claimed expenses may have been accepted during PPM closeout if they did not meet the definition of a valid expense{{end}}.
diff --git a/pkg/assets/notifications/templates/ppm_packet_email_template.txt b/pkg/assets/notifications/templates/ppm_packet_email_template.txt
index 83c17652064..daadd1633b6 100644
--- a/pkg/assets/notifications/templates/ppm_packet_email_template.txt
+++ b/pkg/assets/notifications/templates/ppm_packet_email_template.txt
@@ -6,13 +6,13 @@ Next steps:
{{if eq .ServiceBranch "Marine Corps, Navy, and Coast Guard"}}
For Marine Corps, Navy, and Coast Guard personnel:
-You can now log into MilMove and view your payment packet; however, you do not need to forward your packet to finance as your closeout location is associated with your finance office and they will handle this step for you.
+You can now log into MilMove <{{.MyMoveLink}}/> and view your payment packet; however, you do not need to forward your packet to finance as your closeout location is associated with your finance office and they will handle this step for you.
Note: Not all claimed expenses may have been accepted during PPM closeout if they did not meet the definition of a valid expense.
{{else}}
For {{.ServiceBranch}} personnel (FURTHER ACTION REQUIRED):
-You can now log into MilMove and download your payment packet to submit to {{.SubmitLocation}}. You must complete this step to receive final settlement of your PPM.
+You can now log into MilMove <{{.MyMoveLink}}/> and download your payment packet to submit to {{.SubmitLocation}}. You must complete this step to receive final settlement of your PPM.
{{if eq .ServiceBranch "Air Force and Space Force"}}Note: The Transportation Office does not determine claimable expenses. Claimable expenses will be determined by finance{{else if eq .ServiceBranch "Army"}}Note: Not all claimed expenses may have been accepted during PPM closeout if they did not meet the definition of a valid expense.{{end}}{{end}}
diff --git a/pkg/notifications/move_counseled.go b/pkg/notifications/move_counseled.go
new file mode 100644
index 00000000000..cf306aff54f
--- /dev/null
+++ b/pkg/notifications/move_counseled.go
@@ -0,0 +1,134 @@
+package notifications
+
+import (
+ "bytes"
+ "fmt"
+ html "html/template"
+ text "text/template"
+
+ "github.com/gofrs/uuid"
+ "go.uber.org/zap"
+
+ "github.com/transcom/mymove/pkg/appcontext"
+ "github.com/transcom/mymove/pkg/assets"
+ "github.com/transcom/mymove/pkg/models"
+)
+
+var (
+ moveCounseledRawTextTemplate = string(assets.MustAsset("notifications/templates/move_counseled_template.txt"))
+ moveCounseledTextTemplate = text.Must(text.New("text_template").Parse(moveCounseledRawTextTemplate))
+ moveCounseledRawHTMLTemplate = string(assets.MustAsset("notifications/templates/move_counseled_template.html"))
+ moveCounseledHTMLTemplate = html.Must(html.New("text_template").Parse(moveCounseledRawHTMLTemplate))
+)
+
+// MoveCounseled has notification content for counseled moves (before TOO approval)
+type MoveCounseled struct {
+ moveID uuid.UUID
+ htmlTemplate *html.Template
+ textTemplate *text.Template
+}
+
+// NewMoveCounseled returns a new move counseled notification (before TOO approval)
+func NewMoveCounseled(moveID uuid.UUID) *MoveCounseled {
+
+ return &MoveCounseled{
+ moveID: moveID,
+ htmlTemplate: moveCounseledHTMLTemplate,
+ textTemplate: moveCounseledTextTemplate,
+ }
+}
+
+func (m MoveCounseled) emails(appCtx appcontext.AppContext) ([]emailContent, error) {
+ var emails []emailContent
+
+ move, err := models.FetchMove(appCtx.DB(), appCtx.Session(), m.moveID)
+ if err != nil {
+ return emails, err
+ }
+
+ orders, err := models.FetchOrderForUser(appCtx.DB(), appCtx.Session(), move.OrdersID)
+ if err != nil {
+ return emails, err
+ }
+
+ serviceMember, err := models.FetchServiceMemberForUser(appCtx.DB(), appCtx.Session(), orders.ServiceMemberID)
+ if err != nil {
+ return emails, err
+ }
+
+ originDSTransportInfo, err := models.FetchDLContactInfo(appCtx.DB(), serviceMember.DutyLocationID)
+ if err != nil {
+ return emails, err
+ }
+
+ var originDutyLocationName *string
+ if originDSTransportInfo != nil {
+ originDutyLocationName = &originDSTransportInfo.Name
+ }
+
+ if serviceMember.PersonalEmail == nil {
+ return emails, fmt.Errorf("no email found for service member")
+ }
+
+ htmlBody, textBody, err := m.renderTemplates(appCtx, MoveCounseledEmailData{
+ OriginDutyLocation: originDutyLocationName,
+ DestinationDutyLocation: orders.NewDutyLocation.Name,
+ Locator: move.Locator,
+ MyMoveLink: MyMoveLink,
+ })
+
+ if err != nil {
+ appCtx.Logger().Error("error rendering template", zap.Error(err))
+ }
+
+ smEmail := emailContent{
+ recipientEmail: *serviceMember.PersonalEmail,
+ subject: "Your counselor has approved your move details",
+ htmlBody: htmlBody,
+ textBody: textBody,
+ }
+
+ appCtx.Logger().Info("Generated move counseled email",
+ zap.String("moveLocator", move.Locator))
+
+ // TODO: Send email to trusted contacts when that's supported
+ return append(emails, smEmail), nil
+}
+
+func (m MoveCounseled) renderTemplates(appCtx appcontext.AppContext, data MoveCounseledEmailData) (string, string, error) {
+ htmlBody, err := m.RenderHTML(appCtx, data)
+ if err != nil {
+ return "", "", fmt.Errorf("error rendering html template using %#v", data)
+ }
+ textBody, err := m.RenderText(appCtx, data)
+ if err != nil {
+ return "", "", fmt.Errorf("error rendering text template using %#v", data)
+ }
+ return htmlBody, textBody, nil
+}
+
+type MoveCounseledEmailData struct {
+ OriginDutyLocation *string
+ DestinationDutyLocation string
+ Locator string
+ MyMoveLink string
+}
+
+// RenderHTML renders the html for the email
+func (m MoveCounseled) RenderHTML(appCtx appcontext.AppContext, data MoveCounseledEmailData) (string, error) {
+ var htmlBuffer bytes.Buffer
+ if err := m.htmlTemplate.Execute(&htmlBuffer, data); err != nil {
+ appCtx.Logger().Error("cant render html template ", zap.Error(err))
+ }
+ return htmlBuffer.String(), nil
+}
+
+// RenderText renders the text for the email
+func (m MoveCounseled) RenderText(appCtx appcontext.AppContext, data MoveCounseledEmailData) (string, error) {
+ var textBuffer bytes.Buffer
+ if err := m.textTemplate.Execute(&textBuffer, data); err != nil {
+ appCtx.Logger().Error("cant render text template ", zap.Error(err))
+ return "", err
+ }
+ return textBuffer.String(), nil
+}
diff --git a/pkg/notifications/move_counseled_test.go b/pkg/notifications/move_counseled_test.go
new file mode 100644
index 00000000000..7d934580a2e
--- /dev/null
+++ b/pkg/notifications/move_counseled_test.go
@@ -0,0 +1,180 @@
+package notifications
+
+import (
+ "regexp"
+ "strings"
+
+ "github.com/transcom/mymove/pkg/auth"
+ "github.com/transcom/mymove/pkg/factory"
+)
+
+func (suite *NotificationSuite) TestMoveCounseled() {
+ move := factory.BuildMove(suite.DB(), nil, nil)
+ notification := NewMoveCounseled(move.ID)
+
+ emails, err := notification.emails(suite.AppContextWithSessionForTest(&auth.Session{
+ ServiceMemberID: move.Orders.ServiceMember.ID,
+ ApplicationName: auth.MilApp,
+ }))
+ subject := "Your counselor has approved your move details"
+
+ suite.NoError(err)
+ suite.Equal(len(emails), 1)
+
+ email := emails[0]
+ sm := move.Orders.ServiceMember
+ suite.Equal(email.recipientEmail, *sm.PersonalEmail)
+ suite.Equal(email.subject, subject)
+ suite.NotEmpty(email.htmlBody)
+ suite.NotEmpty(email.textBody)
+}
+
+func (suite *NotificationSuite) TestMoveCounseledHTMLTemplateRender() {
+ approver := factory.BuildUser(nil, nil, nil)
+ move := factory.BuildMove(suite.DB(), nil, nil)
+ notification := NewMoveCounseled(move.ID)
+
+ originDutyLocation := "origDutyLocation"
+
+ s := MoveCounseledEmailData{
+ OriginDutyLocation: &originDutyLocation,
+ DestinationDutyLocation: "destDutyLocation",
+ Locator: "abc123",
+ MyMoveLink: MyMoveLink,
+ }
+ expectedHTMLContent := `
*** DO NOT REPLY directly to this email ***
+
+
This is a confirmation that your counselor has approved move details for the assigned move code abc123 from origDutyLocation to destDutyLocation in the MilMove system.
+
+
What this means to you:
+If you are doing a Personally Procured Move (PPM), you can start moving your personal property.
+
+
Next steps for a PPM:
+
+
Remember to get legible certified weight tickets for both the empty and full weights for every trip you perform. If you do not upload legible certified weight tickets, your PPM incentive could be affected.
+
If your counselor approved an Advance Operating Allowance (AOA, or cash advance) for a PPM, log into MilMove to download your AOA Packet, and submit it to finance according to the instructions provided by your counselor. If you have been directed to use your government travel charge card (GTCC) for expenses no further action is required.
+
Once you complete your PPM, log into MilMove, upload your receipts and weight tickets, and submit your PPM for review.
+
+
+
Next steps for government arranged shipments:
+
+
Your move request will be reviewed by the responsible personal property shipping office and a move task order for services will be placed with HomeSafe Alliance.
+
Once this order is placed, you will receive an e-mail invitation to create an account in HomeSafe Connect (check your spam or junk folder). This is the system you will use to schedule your pre-move survey.
+
HomeSafe is required to contact you within 24 hours of receiving your move task order. Once contact has been established, HomeSafe is your primary point of contact. If any information about your move changes at any point during the move, immediately notify your HomeSafe Customer Care Representative of the changes. Remember to keep your contact information updated in MilMove.
+
+
Thank you,
+USTRANSCOM MilMove Team
+
+
The information contained in this email may contain Privacy Act information and is therefore protected under the Privacy Act of 1974. Failure to protect Privacy Act information could result in a $5,000 fine.
+`
+
+ htmlContent, err := notification.RenderHTML(suite.AppContextWithSessionForTest(&auth.Session{
+ UserID: approver.ID,
+ ApplicationName: auth.OfficeApp,
+ }), s)
+
+ suite.NoError(err)
+ suite.Equal(trimExtraSpaces(expectedHTMLContent), trimExtraSpaces(htmlContent))
+}
+
+func (suite *NotificationSuite) TestMoveCounseledTextTemplateRender() {
+
+ approver := factory.BuildUser(nil, nil, nil)
+ move := factory.BuildMove(suite.DB(), nil, nil)
+ notification := NewMoveCounseled(move.ID)
+
+ originDutyLocation := "origDutyLocation"
+
+ s := MoveCounseledEmailData{
+ OriginDutyLocation: &originDutyLocation,
+ DestinationDutyLocation: "destDutyLocation",
+ Locator: "abc123",
+ MyMoveLink: MyMoveLink,
+ }
+
+ expectedTextContent := `*** DO NOT REPLY directly to this email ***
+
+This is a confirmation that your counselor has approved move details for the assigned move code abc123 from origDutyLocation to destDutyLocation in the MilMove system.
+
+What this means to you:
+If you are doing a Personally Procured Move (PPM), you can start moving your personal property.
+
+Next steps for a PPM:
+ * Remember to get legible certified weight tickets for both the empty and full weights for every trip you perform. If you do not upload legible certified weight tickets, your PPM incentive could be affected.
+ * If your counselor approved an Advance Operating Allowance (AOA, or cash advance) for a PPM, log into MilMove <` + MyMoveLink + `/> to download your AOA Packet, and submit it to finance according to the instructions provided by your counselor. If you have been directed to use your government travel charge card (GTCC) for expenses no further action is required.
+ * Once you complete your PPM, log into MilMove <` + MyMoveLink + `/>, upload your receipts and weight tickets, and submit your PPM for review.
+
+Next steps for government arranged shipments:
+ * Your move request will be reviewed by the responsible personal property shipping office and a move task order for services will be placed with HomeSafe Alliance.
+ * Once this order is placed, you will receive an e-mail invitation to create an account in HomeSafe Connect (check your spam or junk folder). This is the system you will use to schedule your pre-move survey.
+ * HomeSafe is required to contact you within 24 hours of receiving your move task order. Once contact has been established, HomeSafe is your primary point of contact. If any information about your move changes at any point during the move, immediately notify your HomeSafe Customer Care Representative of the changes. Remember to keep your contact information updated in MilMove.
+
+Thank you,
+USTRANSCOM MilMove Team
+
+The information contained in this email may contain Privacy Act information and is therefore protected under the Privacy Act of 1974. Failure to protect Privacy Act information could result in a $5,000 fine.
+`
+
+ textContent, err := notification.RenderText(suite.AppContextWithSessionForTest(&auth.Session{
+ UserID: approver.ID,
+ ApplicationName: auth.OfficeApp,
+ }), s)
+
+ suite.NoError(err)
+ suite.Equal(trimExtraSpaces(expectedTextContent), trimExtraSpaces(textContent))
+}
+
+func (suite *NotificationSuite) TestMoveCounseledTextTemplateRenderWithMissingMoveInfo() {
+
+ approver := factory.BuildUser(nil, nil, nil)
+ move := factory.BuildMove(suite.DB(), nil, nil)
+ notification := NewMoveCounseled(move.ID)
+
+ var originDutyLocation string
+ var locator string
+
+ s := MoveCounseledEmailData{
+ OriginDutyLocation: &originDutyLocation,
+ DestinationDutyLocation: "",
+ Locator: locator,
+ MyMoveLink: MyMoveLink,
+ }
+
+ expectedTextContent := `*** DO NOT REPLY directly to this email ***
+
+This is a confirmation that your counselor has approved move details for the assigned move code.
+
+What this means to you:
+If you are doing a Personally Procured Move (PPM), you can start moving your personal property.
+
+Next steps for a PPM:
+ * Remember to get legible certified weight tickets for both the empty and full weights for every trip you perform. If you do not upload legible certified weight tickets, your PPM incentive could be affected.
+ * If your counselor approved an Advance Operating Allowance (AOA, or cash advance) for a PPM, log into MilMove <` + MyMoveLink + `/> to download your AOA Packet, and submit it to finance according to the instructions provided by your counselor. If you have been directed to use your government travel charge card (GTCC) for expenses no further action is required.
+ * Once you complete your PPM, log into MilMove <` + MyMoveLink + `/>, upload your receipts and weight tickets, and submit your PPM for review.
+
+Next steps for government arranged shipments:
+ * Your move request will be reviewed by the responsible personal property shipping office and a move task order for services will be placed with HomeSafe Alliance.
+ * Once this order is placed, you will receive an e-mail invitation to create an account in HomeSafe Connect (check your spam or junk folder). This is the system you will use to schedule your pre-move survey.
+ * HomeSafe is required to contact you within 24 hours of receiving your move task order. Once contact has been established, HomeSafe is your primary point of contact. If any information about your move changes at any point during the move, immediately notify your HomeSafe Customer Care Representative of the changes. Remember to keep your contact information updated in MilMove.
+
+Thank you,
+USTRANSCOM MilMove Team
+
+The information contained in this email may contain Privacy Act information and is therefore protected under the Privacy Act of 1974. Failure to protect Privacy Act information could result in a $5,000 fine.
+`
+
+ textContent, err := notification.RenderText(suite.AppContextWithSessionForTest(&auth.Session{
+ UserID: approver.ID,
+ ApplicationName: auth.OfficeApp,
+ }), s)
+
+ suite.NoError(err)
+ suite.Equal(trimExtraSpaces(expectedTextContent), trimExtraSpaces(textContent))
+}
+
+func trimExtraSpaces(input string) string {
+ // Replace consecutive white spaces with a single space
+ re := regexp.MustCompile(`\s+`)
+ // return the result without leading or trailing spaces
+ return strings.TrimSpace(re.ReplaceAllString(input, " "))
+}
diff --git a/pkg/notifications/ppm_packet_email.go b/pkg/notifications/ppm_packet_email.go
index 7179bdc4fa6..587c3b63a91 100644
--- a/pkg/notifications/ppm_packet_email.go
+++ b/pkg/notifications/ppm_packet_email.go
@@ -31,15 +31,17 @@ type PpmPacketEmail struct {
// ppmPacketEmailData is used to render an email template
// Uses ZIPs only if no city/state data is provided
type PpmPacketEmailData struct {
- OriginZIP *string
- OriginCity *string
- OriginState *string
- DestinationZIP *string
- DestinationCity *string
- DestinationState *string
- SubmitLocation string
- ServiceBranch string
- Locator string
+ OriginZIP *string
+ OriginCity *string
+ OriginState *string
+ DestinationZIP *string
+ DestinationCity *string
+ DestinationState *string
+ SubmitLocation string
+ ServiceBranch string
+ Locator string
+ OneSourceTransportationOfficeLink string
+ MyMoveLink string
}
// Used to get logging data from GetEmailData
@@ -61,14 +63,14 @@ func NewPpmPacketEmail(ppmShipmentID uuid.UUID) *PpmPacketEmail {
// NotificationSendingContext expects a `notification` with an `emails` method,
// so we implement `email` to satisfy that interface
-func (m PpmPacketEmail) emails(appCtx appcontext.AppContext) ([]emailContent, error) {
+func (p PpmPacketEmail) emails(appCtx appcontext.AppContext) ([]emailContent, error) {
var emails []emailContent
appCtx.Logger().Info("ppm SHIPMENT UUID",
- zap.String("uuid", m.ppmShipmentID.String()),
+ zap.String("uuid", p.ppmShipmentID.String()),
)
- emailData, loggerData, err := GetEmailData(m, appCtx)
+ emailData, loggerData, err := p.GetEmailData(appCtx)
if err != nil {
return nil, err
}
@@ -80,7 +82,7 @@ func (m PpmPacketEmail) emails(appCtx appcontext.AppContext) ([]emailContent, er
)
var htmlBody, textBody string
- htmlBody, textBody, err = m.renderTemplates(appCtx, emailData)
+ htmlBody, textBody, err = p.renderTemplates(appCtx, emailData)
if err != nil {
appCtx.Logger().Error("error rendering template", zap.Error(err))
@@ -96,7 +98,7 @@ func (m PpmPacketEmail) emails(appCtx appcontext.AppContext) ([]emailContent, er
return append(emails, ppmEmail), nil
}
-func GetEmailData(p PpmPacketEmail, appCtx appcontext.AppContext) (PpmPacketEmailData, LoggerData, error) {
+func (p PpmPacketEmail) GetEmailData(appCtx appcontext.AppContext) (PpmPacketEmailData, LoggerData, error) {
var ppmShipment models.PPMShipment
err := appCtx.DB().Find(&ppmShipment, p.ppmShipmentID)
if err != nil {
@@ -156,13 +158,15 @@ func GetEmailData(p PpmPacketEmail, appCtx appcontext.AppContext) (PpmPacketEmai
}
return PpmPacketEmailData{
- OriginCity: &pickupAddress.City,
- OriginState: &pickupAddress.State,
- DestinationCity: &destinationAddress.City,
- DestinationState: &destinationAddress.State,
- SubmitLocation: submitLocation,
- ServiceBranch: affiliationDisplayValue[*serviceMember.Affiliation],
- Locator: move.Locator,
+ OriginCity: &pickupAddress.City,
+ OriginState: &pickupAddress.State,
+ DestinationCity: &destinationAddress.City,
+ DestinationState: &destinationAddress.State,
+ SubmitLocation: submitLocation,
+ ServiceBranch: affiliationDisplayValue[*serviceMember.Affiliation],
+ Locator: move.Locator,
+ OneSourceTransportationOfficeLink: OneSourceTransportationOfficeLink,
+ MyMoveLink: MyMoveLink,
},
LoggerData{
ServiceMember: *serviceMember,
@@ -173,11 +177,13 @@ func GetEmailData(p PpmPacketEmail, appCtx appcontext.AppContext) (PpmPacketEmai
// Fallback to using ZIPs if the above if-block for city,state doesn't happen
return PpmPacketEmailData{
- OriginZIP: &ppmShipment.PickupPostalCode,
- DestinationZIP: &ppmShipment.DestinationPostalCode,
- SubmitLocation: submitLocation,
- ServiceBranch: affiliationDisplayValue[*serviceMember.Affiliation],
- Locator: move.Locator,
+ OriginZIP: &ppmShipment.PickupPostalCode,
+ DestinationZIP: &ppmShipment.DestinationPostalCode,
+ SubmitLocation: submitLocation,
+ ServiceBranch: affiliationDisplayValue[*serviceMember.Affiliation],
+ Locator: move.Locator,
+ OneSourceTransportationOfficeLink: OneSourceTransportationOfficeLink,
+ MyMoveLink: MyMoveLink,
},
LoggerData{
ServiceMember: *serviceMember,
@@ -187,12 +193,12 @@ func GetEmailData(p PpmPacketEmail, appCtx appcontext.AppContext) (PpmPacketEmai
}
-func (m PpmPacketEmail) renderTemplates(appCtx appcontext.AppContext, data PpmPacketEmailData) (string, string, error) {
- htmlBody, err := m.RenderHTML(appCtx, data)
+func (p PpmPacketEmail) renderTemplates(appCtx appcontext.AppContext, data PpmPacketEmailData) (string, string, error) {
+ htmlBody, err := p.RenderHTML(appCtx, data)
if err != nil {
return "", "", fmt.Errorf("error rendering html template using %#v", data)
}
- textBody, err := m.RenderText(appCtx, data)
+ textBody, err := p.RenderText(appCtx, data)
if err != nil {
return "", "", fmt.Errorf("error rendering text template using %#v", data)
}
@@ -200,18 +206,18 @@ func (m PpmPacketEmail) renderTemplates(appCtx appcontext.AppContext, data PpmPa
}
// RenderHTML renders the html for the email
-func (m PpmPacketEmail) RenderHTML(appCtx appcontext.AppContext, data PpmPacketEmailData) (string, error) {
+func (p PpmPacketEmail) RenderHTML(appCtx appcontext.AppContext, data PpmPacketEmailData) (string, error) {
var htmlBuffer bytes.Buffer
- if err := m.htmlTemplate.Execute(&htmlBuffer, data); err != nil {
+ if err := p.htmlTemplate.Execute(&htmlBuffer, data); err != nil {
appCtx.Logger().Error("cant render html template ", zap.Error(err))
}
return htmlBuffer.String(), nil
}
// RenderText renders the text for the email
-func (m PpmPacketEmail) RenderText(appCtx appcontext.AppContext, data PpmPacketEmailData) (string, error) {
+func (p PpmPacketEmail) RenderText(appCtx appcontext.AppContext, data PpmPacketEmailData) (string, error) {
var textBuffer bytes.Buffer
- if err := m.textTemplate.Execute(&textBuffer, data); err != nil {
+ if err := p.textTemplate.Execute(&textBuffer, data); err != nil {
appCtx.Logger().Error("cant render text template ", zap.Error(err))
return "", err
}
diff --git a/pkg/notifications/ppm_packet_email_test.go b/pkg/notifications/ppm_packet_email_test.go
index 6e3eb4a615f..a2f85a6fdda 100644
--- a/pkg/notifications/ppm_packet_email_test.go
+++ b/pkg/notifications/ppm_packet_email_test.go
@@ -107,18 +107,20 @@ func (suite *NotificationSuite) TestPpmPacketEmailHTMLTemplateRenderForAirAndSpa
})
notification := NewPpmPacketEmail(ppmShipment.ID)
- ppmEmailData, _, err := GetEmailData(*notification, suite.AppContextForTest())
+ ppmEmailData, _, err := notification.GetEmailData(suite.AppContextForTest())
suite.NoError(err)
suite.NotNil(ppmEmailData)
suite.EqualExportedValues(ppmEmailData, PpmPacketEmailData{
- OriginCity: &pickupAddress.City,
- OriginState: &pickupAddress.State,
- DestinationCity: &destinationAddress.City,
- DestinationState: &destinationAddress.State,
- SubmitLocation: allOtherSubmitLocation,
- ServiceBranch: affiliationDisplayValue[*serviceMember.Affiliation],
- Locator: move.Locator,
+ OriginCity: &pickupAddress.City,
+ OriginState: &pickupAddress.State,
+ DestinationCity: &destinationAddress.City,
+ DestinationState: &destinationAddress.State,
+ SubmitLocation: allOtherSubmitLocation,
+ ServiceBranch: affiliationDisplayValue[*serviceMember.Affiliation],
+ Locator: move.Locator,
+ OneSourceTransportationOfficeLink: OneSourceTransportationOfficeLink,
+ MyMoveLink: MyMoveLink,
})
expectedHTMLContent := `
For ` + affiliationDisplayValue[*serviceMember.Affiliation] + ` personnel (FURTHER ACTION REQUIRED):
-
You can now log into MilMove https://my.move.mil/ and download your payment packet to submit to ` + allOtherSubmitLocation + `. You must complete this step to receive final settlement of your PPM.
+
You can now log into MilMove ` + MyMoveLink + `/ and download your payment packet to submit to ` + allOtherSubmitLocation + `. You must complete this step to receive final settlement of your PPM.
Note: The Transportation Office does not determine claimable expenses. Claimable expenses will be determined by finance.
For ` + affiliationDisplayValue[*serviceMember.Affiliation] + ` personnel (FURTHER ACTION REQUIRED):
-
You can now log into MilMove https://my.move.mil/ and download your payment packet to submit to ` + armySubmitLocation + `. You must complete this step to receive final settlement of your PPM.
+
You can now log into MilMove ` + MyMoveLink + `/ and download your payment packet to submit to ` + armySubmitLocation + `. You must complete this step to receive final settlement of your PPM.
Note: Not all claimed expenses may have been accepted during PPM closeout if they did not meet the definition of a valid expense.
For ` + affiliationDisplayValue[*serviceMember.Affiliation] + ` personnel:
-
You can now log into MilMove https://my.move.mil/ and view your payment packet; however, you do not need to forward your packet to finance as your closeout location is associated with your finance office and they will handle this step for you.
+
You can now log into MilMove ` + MyMoveLink + `/ and view your payment packet; however, you do not need to forward your packet to finance as your closeout location is associated with your finance office and they will handle this step for you.
Note: Not all claimed expenses may have been accepted during PPM closeout if they did not meet the definition of a valid expense.
@@ -367,7 +373,7 @@ func (suite *NotificationSuite) TestPpmPacketEmailTextTemplateRender() {
notification := NewPpmPacketEmail(ppmShipment.ID)
- ppmEmailData, _, err := GetEmailData(*notification, suite.AppContextForTest())
+ ppmEmailData, _, err := notification.GetEmailData(suite.AppContextForTest())
suite.NoError(err)
expectedTextContent := `*** DO NOT REPLY directly to this email ***
@@ -378,11 +384,11 @@ Next steps:
For ` + affiliationDisplayValue[*serviceMember.Affiliation] + ` personnel (FURTHER ACTION REQUIRED):
-You can now log into MilMove and download your payment packet to submit to ` + armySubmitLocation + `. You must complete this step to receive final settlement of your PPM.
+You can now log into MilMove <` + MyMoveLink + `/> and download your payment packet to submit to ` + armySubmitLocation + `. You must complete this step to receive final settlement of your PPM.
Note: Not all claimed expenses may have been accepted during PPM closeout if they did not meet the definition of a valid expense.
-If you have any questions, contact a government transportation office. You can see a listing of transportation offices on Military One Source here:
+If you have any questions, contact a government transportation office. You can see a listing of transportation offices on Military One Source here: ` + OneSourceTransportationOfficeLink + `
Thank you,
@@ -432,16 +438,18 @@ func (suite *NotificationSuite) TestPpmPacketEmailZipcodeFallback() {
})
notification := NewPpmPacketEmail(ppmShipment.ID)
- ppmEmailData, _, err := GetEmailData(*notification, suite.AppContextForTest())
+ ppmEmailData, _, err := notification.GetEmailData(suite.AppContextForTest())
suite.NoError(err)
suite.NotNil(ppmEmailData)
suite.EqualExportedValues(ppmEmailData, PpmPacketEmailData{
- OriginZIP: &customPPM.PickupPostalCode,
- DestinationZIP: &customPPM.DestinationPostalCode,
- SubmitLocation: allOtherSubmitLocation,
- ServiceBranch: affiliationDisplayValue[*serviceMember.Affiliation],
- Locator: move.Locator,
+ OriginZIP: &customPPM.PickupPostalCode,
+ DestinationZIP: &customPPM.DestinationPostalCode,
+ SubmitLocation: allOtherSubmitLocation,
+ ServiceBranch: affiliationDisplayValue[*serviceMember.Affiliation],
+ Locator: move.Locator,
+ OneSourceTransportationOfficeLink: OneSourceTransportationOfficeLink,
+ MyMoveLink: MyMoveLink,
})
expectedHTMLContent := `
For ` + affiliationDisplayValue[*serviceMember.Affiliation] + ` personnel (FURTHER ACTION REQUIRED):
-
You can now log into MilMove https://my.move.mil/ and download your payment packet to submit to ` + allOtherSubmitLocation + `. You must complete this step to receive final settlement of your PPM.
+
You can now log into MilMove ` + MyMoveLink + `/ and download your payment packet to submit to ` + allOtherSubmitLocation + `. You must complete this step to receive final settlement of your PPM.
Note: The Transportation Office does not determine claimable expenses. Claimable expenses will be determined by finance.
From 7c7df3b5da15820170762cc1547fdabb74e4ca72 Mon Sep 17 00:00:00 2001
From: Brooklyn Welsh
Date: Mon, 29 Jan 2024 16:50:19 +0000
Subject: [PATCH 45/67] added bracket missing from email test.
---
pkg/notifications/ppm_packet_email_test.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pkg/notifications/ppm_packet_email_test.go b/pkg/notifications/ppm_packet_email_test.go
index a2f85a6fdda..42c63cd320e 100644
--- a/pkg/notifications/ppm_packet_email_test.go
+++ b/pkg/notifications/ppm_packet_email_test.go
@@ -388,7 +388,7 @@ You can now log into MilMove <` + MyMoveLink + `/> and download your payment pac
Note: Not all claimed expenses may have been accepted during PPM closeout if they did not meet the definition of a valid expense.
-If you have any questions, contact a government transportation office. You can see a listing of transportation offices on Military One Source here: ` + OneSourceTransportationOfficeLink + `
+If you have any questions, contact a government transportation office. You can see a listing of transportation offices on Military One Source here: <` + OneSourceTransportationOfficeLink + `>
Thank you,
From 2f827ae81bb508c258f20c8f70474af2a5735bea Mon Sep 17 00:00:00 2001
From: Brooklyn Welsh
Date: Mon, 29 Jan 2024 15:59:27 +0000
Subject: [PATCH 46/67] Added usage of new consant to ppm packet email
---
.../notifications/templates/ppm_packet_email_template.html | 2 +-
.../notifications/templates/ppm_packet_email_template.txt | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/pkg/assets/notifications/templates/ppm_packet_email_template.html b/pkg/assets/notifications/templates/ppm_packet_email_template.html
index 03684b9c140..fdb78050302 100644
--- a/pkg/assets/notifications/templates/ppm_packet_email_template.html
+++ b/pkg/assets/notifications/templates/ppm_packet_email_template.html
@@ -10,7 +10,7 @@
Next steps:
You can now log into MilMove {{.MyMoveLink}}/ and download your payment packet to submit to {{.SubmitLocation}}. You must complete this step to receive final settlement of your PPM.
{{if eq .ServiceBranch "Air Force and Space Force"}}Note: The Transportation Office does not determine claimable expenses. Claimable expenses will be determined by finance{{else if eq .ServiceBranch "Army"}}Note: Not all claimed expenses may have been accepted during PPM closeout if they did not meet the definition of a valid expense{{end}}.
If you have any questions, contact a government transportation office. You can see a listing of transportation offices on Military One Source here: {{.OneSourceTransportationOfficeLink}}
Thank you,
diff --git a/pkg/assets/notifications/templates/ppm_packet_email_template.txt b/pkg/assets/notifications/templates/ppm_packet_email_template.txt
index daadd1633b6..6bfd0b148fc 100644
--- a/pkg/assets/notifications/templates/ppm_packet_email_template.txt
+++ b/pkg/assets/notifications/templates/ppm_packet_email_template.txt
@@ -16,7 +16,7 @@ You can now log into MilMove <{{.MyMoveLink}}/> and download your payment packet
{{if eq .ServiceBranch "Air Force and Space Force"}}Note: The Transportation Office does not determine claimable expenses. Claimable expenses will be determined by finance{{else if eq .ServiceBranch "Army"}}Note: Not all claimed expenses may have been accepted during PPM closeout if they did not meet the definition of a valid expense.{{end}}{{end}}
-If you have any questions, contact a government transportation office. You can see a listing of transportation offices on Military One Source here:
+If you have any questions, contact a government transportation office. You can see a listing of transportation offices on Military One Source here: {{.OneSourceTransportationOfficeLink}}
Thank you,
From 5e02175006ae0d573ab0ae99c41817bc28e8ba1a Mon Sep 17 00:00:00 2001
From: deandreJones
Date: Wed, 21 Feb 2024 13:20:34 -0600
Subject: [PATCH 47/67] add workflow to clean up prs
---
.../workflows/stale-issues-pull-requests.yml | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
create mode 100644 .github/workflows/stale-issues-pull-requests.yml
diff --git a/.github/workflows/stale-issues-pull-requests.yml b/.github/workflows/stale-issues-pull-requests.yml
new file mode 100644
index 00000000000..4822d881f0d
--- /dev/null
+++ b/.github/workflows/stale-issues-pull-requests.yml
@@ -0,0 +1,19 @@
+name: 'Close stale issues and PRs'
+on:
+ schedule:
+ - cron: '30 1 * * *'
+
+jobs:
+ stale:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/stale@v9
+ with:
+ stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
+ stale-pr-message: 'This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.'
+ close-issue-message: 'This issue was closed because it has been stalled for 5 days with no activity.'
+ close-pr-message: 'This PR was closed because it has been stalled for 10 days with no activity.'
+ days-before-issue-stale: 30
+ days-before-pr-stale: 45
+ days-before-issue-close: 5
+ days-before-pr-close: 10
\ No newline at end of file
From e0a71c1cbc35ee375d99189c30e97ec4dd934b3d Mon Sep 17 00:00:00 2001
From: Brooklyn Welsh
Date: Wed, 21 Feb 2024 19:43:54 +0000
Subject: [PATCH 48/67] Revert "added bracket missing from email test."
This reverts commit 7c7df3b5da15820170762cc1547fdabb74e4ca72.
---
pkg/notifications/ppm_packet_email_test.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pkg/notifications/ppm_packet_email_test.go b/pkg/notifications/ppm_packet_email_test.go
index 42c63cd320e..a2f85a6fdda 100644
--- a/pkg/notifications/ppm_packet_email_test.go
+++ b/pkg/notifications/ppm_packet_email_test.go
@@ -388,7 +388,7 @@ You can now log into MilMove <` + MyMoveLink + `/> and download your payment pac
Note: Not all claimed expenses may have been accepted during PPM closeout if they did not meet the definition of a valid expense.
-If you have any questions, contact a government transportation office. You can see a listing of transportation offices on Military One Source here: <` + OneSourceTransportationOfficeLink + `>
+If you have any questions, contact a government transportation office. You can see a listing of transportation offices on Military One Source here: ` + OneSourceTransportationOfficeLink + `
Thank you,
From fe351aee1a05d3fd702b06c3525bd20694ebfe51 Mon Sep 17 00:00:00 2001
From: TevinAdams
Date: Thu, 22 Feb 2024 17:20:45 +0000
Subject: [PATCH 49/67] moves implementation refactor
---
pkg/handlers/internalapi/moves.go | 53 +++++++++++--------------------
pkg/models/move.go | 17 +++-------
2 files changed, 24 insertions(+), 46 deletions(-)
diff --git a/pkg/handlers/internalapi/moves.go b/pkg/handlers/internalapi/moves.go
index 3042b029fd1..fb156c9348c 100644
--- a/pkg/handlers/internalapi/moves.go
+++ b/pkg/handlers/internalapi/moves.go
@@ -142,17 +142,19 @@ func payloadForMoveModel(storer storage.FileStorer, order models.Order, move mod
return movePayload, nil
}
-func payloadMovesList(storer storage.FileStorer, previousMovesList models.Moves, currentMoveList models.Moves, movesList models.Moves) (*internalmessages.MovesList, error) {
+func payloadForInternalMove(storer storage.FileStorer, list models.Moves) []*internalmessages.InternalMove {
+ var convertedCurrentMovesList []*internalmessages.InternalMove = []*internalmessages.InternalMove{}
- // Convert currentMoves moves to internalmessages.MoveTaskOrder
- var convertedCurrentMovesList []*internalmessages.InternalMove
- moves := movesList
- for _, move := range moves {
+ if len(list) == 0 {
+ return convertedCurrentMovesList
+ }
+
+ // Convert moveList to internalmessages.InternalMove
+ for _, move := range list {
eTag := etag.GenerateEtag(move.UpdatedAt)
shipments := move.MTOShipments
var payloadShipments *internalmessages.MTOShipments = payloads.MTOShipments(storer, &shipments)
- // var payloadOrders *internalmessages.Order = payloads
currentMove := &internalmessages.InternalMove{
CreatedAt: *handlers.FmtDateTime(move.CreatedAt),
@@ -165,33 +167,22 @@ func payloadMovesList(storer storage.FileStorer, previousMovesList models.Moves,
convertedCurrentMovesList = append(convertedCurrentMovesList, currentMove)
}
+ return convertedCurrentMovesList
+}
- // Convert previousMoves moves to internalmessages.MoveTaskOrder
- var convertedPreviousMovesList []*internalmessages.InternalMove
- for _, move := range previousMovesList {
-
- if currentMoveList[0].ID != move.ID {
- eTag := etag.GenerateEtag(move.UpdatedAt)
- shipments := move.MTOShipments
- var payloadShipments *internalmessages.MTOShipments = payloads.MTOShipments(storer, &shipments)
-
- currentMove := &internalmessages.InternalMove{
- CreatedAt: *handlers.FmtDateTime(move.CreatedAt),
- ETag: eTag,
- ID: *handlers.FmtUUID(move.ID),
- MtoShipments: *payloadShipments,
- }
+func payloadForMovesList(storer storage.FileStorer, previousMovesList models.Moves, currentMoveList models.Moves, movesList models.Moves) *internalmessages.MovesList {
- convertedPreviousMovesList = append(convertedPreviousMovesList, currentMove)
+ if len(movesList) == 0 {
+ return &internalmessages.MovesList{
+ CurrentMove: []*internalmessages.InternalMove{},
+ PreviousMoves: []*internalmessages.InternalMove{},
}
}
- movePayload := &internalmessages.MovesList{
- CurrentMove: convertedCurrentMovesList,
- PreviousMoves: convertedPreviousMovesList,
+ return &internalmessages.MovesList{
+ CurrentMove: payloadForInternalMove(storer, currentMoveList),
+ PreviousMoves: payloadForInternalMove(storer, previousMovesList),
}
-
- return movePayload, nil
}
// ShowMoveHandler returns a move for a user and move ID
@@ -531,12 +522,6 @@ func (h GetAllMovesHandler) Handle(params moveop.GetAllMovesParams) middleware.R
}
}
- // Build MovesList Payload
- payload, err := payloadMovesList(h.FileStorer(), previousMovesList, currentMovesList, movesList)
- if err != nil {
- return handlers.ResponseForError(appCtx.Logger(), err), err
- }
-
- return moveop.NewGetAllMovesOK().WithPayload(payload), nil
+ return moveop.NewGetAllMovesOK().WithPayload(payloadForMovesList(h.FileStorer(), previousMovesList, currentMovesList, movesList)), nil
})
}
diff --git a/pkg/models/move.go b/pkg/models/move.go
index efb63dee14b..265b3e1c0ad 100644
--- a/pkg/models/move.go
+++ b/pkg/models/move.go
@@ -411,23 +411,16 @@ func FetchMovesByOrderID(db *pop.Connection, orderID uuid.UUID) (Moves, error) {
query := db.Where("orders_id = ?", orderID)
err := query.Eager(
- "Orders",
"MTOShipments",
+ "Orders",
+ "Orders.UploadedOrders",
+ "Orders.ServiceMember",
"Orders.ServiceMember.User",
- "Orders.ServiceMember.DutyLocation.Address",
- "Orders.ServiceMember.DutyLocation.TransportationOffice",
- "Orders.ServiceMember.DutyLocation.TransportationOffice.Address",
+ "Orders.OriginDutyLocation.TransportationOffice",
+ "Orders.OriginDutyLocation.TransportationOffice.Address",
"Orders.NewDutyLocation.Address",
- "Orders.ServiceMember",
"Orders.NewDutyLocation.TransportationOffice",
"Orders.NewDutyLocation.TransportationOffice.Address",
- "Orders.UploadedOrders",
- "Orders.UploadedOrders.ServiceMember",
- "Orders.UploadedOrders.ServiceMember.User",
- "Orders.UploadedOrders.ServiceMember.DutyLocation",
- "Orders.UploadedOrders.ServiceMember.DutyLocation.Address",
- "Orders.UploadedOrders.ServiceMember.DutyLocation.TransportationOffice",
- "Orders.UploadedOrders.ServiceMember.DutyLocation.TransportationOffice.Address",
).All(&moves)
return moves, err
}
From 45dc86ae017941d5fd8f9a2a2850a781f922d012 Mon Sep 17 00:00:00 2001
From: Daniel Jordan
Date: Wed, 31 Jan 2024 14:25:36 +0000
Subject: [PATCH 50/67] initial commit, began adding data to redux until api
endpoint is merged
---
.../Multi-Moves/MultiMovesLandingPage.jsx | 36 +++++++++++++++++--
src/sagas/onboarding.js | 13 +++++++
src/services/internalApi.js | 12 +++++++
src/shared/Entities/modules/moves.js | 6 ++++
src/shared/Entities/modules/oktaUser.js | 2 --
src/shared/Entities/reducer.js | 2 ++
src/shared/Entities/schema.js | 8 +++++
7 files changed, 75 insertions(+), 4 deletions(-)
diff --git a/src/pages/MyMove/Multi-Moves/MultiMovesLandingPage.jsx b/src/pages/MyMove/Multi-Moves/MultiMovesLandingPage.jsx
index 33bc7c01b2e..9038575e5db 100644
--- a/src/pages/MyMove/Multi-Moves/MultiMovesLandingPage.jsx
+++ b/src/pages/MyMove/Multi-Moves/MultiMovesLandingPage.jsx
@@ -21,9 +21,17 @@ import { loadInternalSchema } from 'shared/Swagger/ducks';
import { loadUser } from 'store/auth/actions';
import { initOnboarding } from 'store/onboarding/actions';
import Helper from 'components/Customer/Home/Helper';
+import { customerRoutes } from 'constants/routes';
+import { withContext } from 'shared/AppContext';
+import withRouter from 'utils/routing';
+import requireCustomerState from 'containers/requireCustomerState/requireCustomerState';
+import { selectIsProfileComplete, selectServiceMemberFromLoggedInUser } from 'store/entities/selectors';
-const MultiMovesLandingPage = () => {
+const MultiMovesLandingPage = ({ serviceMemberMoves }) => {
const [setErrorState] = useState({ hasError: false, error: undefined, info: undefined });
+ const navigate = useNavigate();
+ console.log('serviceMemberMoves', serviceMemberMoves);
+
// ! This is just used for testing and viewing different variations of data that MilMove will use
// user can add params of ?moveData=PCS, etc to view different views
let moves;
@@ -146,4 +154,28 @@ const MultiMovesLandingPage = () => {
);
};
-export default MultiMovesLandingPage;
+MultiMovesLandingPage.defaultProps = {
+ serviceMember: null,
+};
+
+const mapStateToProps = (state) => {
+ const serviceMember = selectServiceMemberFromLoggedInUser(state);
+ const { serviceMemberMoves } = state.entities;
+
+ return {
+ isProfileComplete: selectIsProfileComplete(state),
+ serviceMember,
+ serviceMemberMoves,
+ };
+};
+
+// in order to avoid setting up proxy server only for storybook, pass in stub function so API requests don't fail
+const mergeProps = (stateProps, dispatchProps, ownProps) => ({
+ ...stateProps,
+ ...dispatchProps,
+ ...ownProps,
+});
+
+export default withContext(
+ withRouter(connect(mapStateToProps, mergeProps)(requireCustomerState(MultiMovesLandingPage))),
+);
diff --git a/src/sagas/onboarding.js b/src/sagas/onboarding.js
index f4a4ff0a48c..2f8908b3bff 100644
--- a/src/sagas/onboarding.js
+++ b/src/sagas/onboarding.js
@@ -11,6 +11,7 @@ import {
getLoggedInUser,
getMTOShipmentsForMove,
createServiceMember as createServiceMemberApi,
+ getOrdersForServiceMember,
} from 'services/internalApi';
import { addEntities } from 'shared/Entities/actions';
@@ -29,6 +30,18 @@ export function* fetchCustomerData() {
yield put(addEntities(mtoShipments));
}
+ // if we have user data, we can load multiple move data
+ if (user) {
+ const currentMove = [];
+ const previousMoves = [];
+ const { serviceMembers } = user;
+ const [serviceMemberId] = Object.keys(serviceMembers);
+ const currentMoveData = yield call(getOrdersForServiceMember, serviceMemberId);
+ currentMove.push(currentMoveData);
+ const serviceMemberMoves = { currentMove: currentMoveData, previousMoves };
+ yield put(addEntities({ serviceMemberMoves }));
+ }
+
return user;
}
diff --git a/src/services/internalApi.js b/src/services/internalApi.js
index 43c65e78bc2..7d1aef9c78e 100644
--- a/src/services/internalApi.js
+++ b/src/services/internalApi.js
@@ -239,6 +239,18 @@ export async function deleteUpload(uploadId) {
}
/** MOVES */
+export async function getAllMoves(serviceMemberId) {
+ return makeInternalRequest(
+ 'moves.getAllMoves',
+ {
+ serviceMemberId,
+ },
+ {
+ normalize: false,
+ },
+ );
+}
+
export async function getMove(moveId) {
return makeInternalRequest(
'moves.showMove',
diff --git a/src/shared/Entities/modules/moves.js b/src/shared/Entities/modules/moves.js
index be25b95ffb3..1b65bd243bb 100644
--- a/src/shared/Entities/modules/moves.js
+++ b/src/shared/Entities/modules/moves.js
@@ -18,6 +18,7 @@ const cancelMoveLabel = 'Moves.CancelMove';
export const loadMoveLabel = 'Moves.loadMove';
export const getMoveDatesSummaryLabel = 'Moves.getMoveDatesSummary';
export const getMoveByLocatorOperation = 'move.getMove';
+export const getAllMovesLabel = 'move.getAllMoves';
export default function reducer(state = {}, action) {
switch (action.type) {
@@ -32,6 +33,11 @@ export default function reducer(state = {}, action) {
}
}
+export function getAllMoves(serviceMemberId, label = getAllMovesLabel) {
+ const swaggerTag = 'moves.getAllMoves';
+ return swaggerRequest(getClient, swaggerTag, { serviceMemberId }, { label });
+}
+
export function getMoveByLocator(locator, label = getMoveByLocatorOperation) {
return swaggerRequest(getGHCClient, getMoveByLocatorOperation, { locator }, { label });
}
diff --git a/src/shared/Entities/modules/oktaUser.js b/src/shared/Entities/modules/oktaUser.js
index 8ae9edc6e8c..1ed6c6615db 100644
--- a/src/shared/Entities/modules/oktaUser.js
+++ b/src/shared/Entities/modules/oktaUser.js
@@ -10,7 +10,5 @@ export function getOktaUser() {
// load Okta user
export function selectOktaUser(state) {
- // console.log('loading from entities', state);
-
return get(state, `entities.oktaUser`);
}
diff --git a/src/shared/Entities/reducer.js b/src/shared/Entities/reducer.js
index b791602d280..92717f52d73 100644
--- a/src/shared/Entities/reducer.js
+++ b/src/shared/Entities/reducer.js
@@ -45,6 +45,7 @@ const initialState = {
personallyProcuredMoves: {},
mtoShipments: {},
reimbursements: {},
+ serviceMemberMoves: {},
signedCertifications: {},
oktaUser: {},
};
@@ -77,5 +78,6 @@ export function entitiesReducer(state = initialState, action) {
oktaUser: action.oktaUser || {},
};
}
+
return state;
}
diff --git a/src/shared/Entities/schema.js b/src/shared/Entities/schema.js
index 72635713ab5..c3b895e74f1 100644
--- a/src/shared/Entities/schema.js
+++ b/src/shared/Entities/schema.js
@@ -42,6 +42,14 @@ export const move = new schema.Entity('moves', {
});
export const moves = new schema.Array(move);
+export const currentMove = new schema.Array(move);
+export const previousMoves = new schema.Array(move);
+
+export const multiMoves = new schema.Entity('multiMoves', {
+ currentMove: currentMove,
+ previousMoves: previousMoves,
+});
+
// Orders
export const order = new schema.Entity('orders');
From 421d632fe0f310ed6a77f9f00b950ab44596d6cc Mon Sep 17 00:00:00 2001
From: Daniel Jordan
Date: Wed, 31 Jan 2024 22:41:12 +0000
Subject: [PATCH 51/67] changed some values of dashboard due to API object
returning different values, updated swagger to allow for move status, need to
finish tests
---
pkg/gen/internalapi/embedded_spec.go | 8 +
pkg/gen/internalmessages/internal_move.go | 17 ++
pkg/handlers/internalapi/moves.go | 1 +
pkg/models/move.go | 1 +
.../Multi-Moves/MultiMovesLandingPage.jsx | 107 +++++------
.../MultiMovesLandingPage.test.jsx | 167 +++++++++++++++++-
.../MultiMovesMoveContainer.jsx | 38 ++--
.../MultiMovesMoveInfoList.jsx | 53 +++++-
src/sagas/onboarding.js | 20 +--
src/store/entities/selectors.js | 5 +
swagger-def/internal.yaml | 3 +
swagger/internal.yaml | 3 +
12 files changed, 325 insertions(+), 98 deletions(-)
diff --git a/pkg/gen/internalapi/embedded_spec.go b/pkg/gen/internalapi/embedded_spec.go
index e3735537ce7..c86f85a6dac 100644
--- a/pkg/gen/internalapi/embedded_spec.go
+++ b/pkg/gen/internalapi/embedded_spec.go
@@ -4203,6 +4203,10 @@ func init() {
"orders": {
"type": "object"
},
+ "status": {
+ "type": "string",
+ "readOnly": true
+ },
"updatedAt": {
"type": "string",
"format": "date-time",
@@ -12308,6 +12312,10 @@ func init() {
"orders": {
"type": "object"
},
+ "status": {
+ "type": "string",
+ "readOnly": true
+ },
"updatedAt": {
"type": "string",
"format": "date-time",
diff --git a/pkg/gen/internalmessages/internal_move.go b/pkg/gen/internalmessages/internal_move.go
index 13947c3d8aa..723d1c2b0b9 100644
--- a/pkg/gen/internalmessages/internal_move.go
+++ b/pkg/gen/internalmessages/internal_move.go
@@ -49,6 +49,10 @@ type InternalMove struct {
// orders
Orders interface{} `json:"orders,omitempty"`
+ // status
+ // Read Only: true
+ Status string `json:"status,omitempty"`
+
// updated at
// Read Only: true
// Format: date-time
@@ -170,6 +174,10 @@ func (m *InternalMove) ContextValidate(ctx context.Context, formats strfmt.Regis
res = append(res, err)
}
+ if err := m.contextValidateStatus(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
if err := m.contextValidateUpdatedAt(ctx, formats); err != nil {
res = append(res, err)
}
@@ -221,6 +229,15 @@ func (m *InternalMove) contextValidateMtoShipments(ctx context.Context, formats
return nil
}
+func (m *InternalMove) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error {
+
+ if err := validate.ReadOnly(ctx, "status", "body", string(m.Status)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
func (m *InternalMove) contextValidateUpdatedAt(ctx context.Context, formats strfmt.Registry) error {
if err := validate.ReadOnly(ctx, "updatedAt", "body", strfmt.DateTime(m.UpdatedAt)); err != nil {
diff --git a/pkg/handlers/internalapi/moves.go b/pkg/handlers/internalapi/moves.go
index 03705f53526..5508aabb389 100644
--- a/pkg/handlers/internalapi/moves.go
+++ b/pkg/handlers/internalapi/moves.go
@@ -159,6 +159,7 @@ func payloadForInternalMove(storer storage.FileStorer, list models.Moves) []*int
CreatedAt: *handlers.FmtDateTime(move.CreatedAt),
ETag: eTag,
ID: *handlers.FmtUUID(move.ID),
+ Status: string(move.Status),
MtoShipments: *payloadShipments,
MoveCode: move.Locator,
Orders: move.Orders,
diff --git a/pkg/models/move.go b/pkg/models/move.go
index 265b3e1c0ad..b8bf7f2ce60 100644
--- a/pkg/models/move.go
+++ b/pkg/models/move.go
@@ -416,6 +416,7 @@ func FetchMovesByOrderID(db *pop.Connection, orderID uuid.UUID) (Moves, error) {
"Orders.UploadedOrders",
"Orders.ServiceMember",
"Orders.ServiceMember.User",
+ "Orders.OriginDutyLocation.Address",
"Orders.OriginDutyLocation.TransportationOffice",
"Orders.OriginDutyLocation.TransportationOffice.Address",
"Orders.NewDutyLocation.Address",
diff --git a/src/pages/MyMove/Multi-Moves/MultiMovesLandingPage.jsx b/src/pages/MyMove/Multi-Moves/MultiMovesLandingPage.jsx
index 9038575e5db..ea109f8ef24 100644
--- a/src/pages/MyMove/Multi-Moves/MultiMovesLandingPage.jsx
+++ b/src/pages/MyMove/Multi-Moves/MultiMovesLandingPage.jsx
@@ -5,15 +5,8 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import styles from './MultiMovesLandingPage.module.scss';
import MultiMovesMoveHeader from './MultiMovesMoveHeader/MultiMovesMoveHeader';
import MultiMovesMoveContainer from './MultiMovesMoveContainer/MultiMovesMoveContainer';
-import {
- mockMovesPCS,
- mockMovesSeparation,
- mockMovesRetirement,
- mockMovesNoPreviousMoves,
- mockMovesNoCurrentMoveWithPreviousMoves,
- mockMovesNoCurrentOrPreviousMoves,
-} from './MultiMovesTestData';
+import { detectFlags } from 'utils/featureFlags';
import { generatePageTitle } from 'hooks/custom';
import { milmoveLogger } from 'utils/milmoveLog';
import retryPageLoading from 'utils/retryPageLoading';
@@ -25,42 +18,11 @@ import { customerRoutes } from 'constants/routes';
import { withContext } from 'shared/AppContext';
import withRouter from 'utils/routing';
import requireCustomerState from 'containers/requireCustomerState/requireCustomerState';
-import { selectIsProfileComplete, selectServiceMemberFromLoggedInUser } from 'store/entities/selectors';
+import { selectAllMoves, selectIsProfileComplete, selectServiceMemberFromLoggedInUser } from 'store/entities/selectors';
-const MultiMovesLandingPage = ({ serviceMemberMoves }) => {
+const MultiMovesLandingPage = ({ serviceMember, serviceMemberMoves }) => {
const [setErrorState] = useState({ hasError: false, error: undefined, info: undefined });
const navigate = useNavigate();
- console.log('serviceMemberMoves', serviceMemberMoves);
-
- // ! This is just used for testing and viewing different variations of data that MilMove will use
- // user can add params of ?moveData=PCS, etc to view different views
- let moves;
- const currentUrl = new URL(window.location.href);
- const moveDataSource = currentUrl.searchParams.get('moveData');
- switch (moveDataSource) {
- case 'PCS':
- moves = mockMovesPCS;
- break;
- case 'retirement':
- moves = mockMovesRetirement;
- break;
- case 'separation':
- moves = mockMovesSeparation;
- break;
- case 'noPreviousMoves':
- moves = mockMovesNoPreviousMoves;
- break;
- case 'noCurrentMove':
- moves = mockMovesNoCurrentMoveWithPreviousMoves;
- break;
- case 'noMoves':
- moves = mockMovesNoCurrentOrPreviousMoves;
- break;
- default:
- moves = mockMovesPCS;
- break;
- }
- // ! end of test data
useEffect(() => {
const fetchData = async () => {
@@ -69,11 +31,6 @@ const MultiMovesLandingPage = ({ serviceMemberMoves }) => {
loadUser();
initOnboarding();
document.title = generatePageTitle('MilMove');
-
- const script = document.createElement('script');
- script.src = '//rum-static.pingdom.net/pa-6567b05deff3250012000426.js';
- script.async = true;
- document.body.appendChild(script);
} catch (error) {
const { message } = error;
milmoveLogger.error({ message, info: null });
@@ -89,21 +46,53 @@ const MultiMovesLandingPage = ({ serviceMemberMoves }) => {
fetchData();
}, [setErrorState]);
- return (
+ const flags = detectFlags(process.env.NODE_ENV, window.location.host, window.location.search);
+
+ // handles logic when user clicks "Create a Move" button
+ // if they have previous moves, they'll need to validate their profile
+ // if they do not have previous moves, then they don't need to validate
+ const handleCreateMoveBtnClick = () => {
+ if (serviceMemberMoves && serviceMemberMoves.previousMoves && serviceMemberMoves.previousMoves.length !== 0) {
+ const profileEditPath = customerRoutes.PROFILE_PATH;
+ navigate(profileEditPath, { state: { needsToVerifyProfile: true } });
+ } else {
+ navigate(customerRoutes.MOVE_HOME_PAGE);
+ }
+ };
+
+ // ! WILL ONLY SHOW IF MULTIMOVE FLAG IS TRUE
+ return flags.multiMove ? (
+ Select "Create a Move" to get started.
+
+ If you encounter any issues please contact your local Transportation Office or the Help Desk for further
+ assistance.
+
+
+ ) : (
+
+
+ Select "Create a Move" to get started.
+
+ Once you have validated your profile, pleasee click the "Validate" button and proceed to
+ starting your move.
+ If you encounter any issues please contact your local Transportation Office or the Help Desk for further
+ assistance.
+
{showMessages && (
@@ -85,7 +81,11 @@ const Profile = ({ serviceMember, currentOrders, currentBackupContacts, moveIsIn
)}
{needsToVerifyProfile && (
- Please verify & confirm your profile before starting the process of creating your move.
+
+ Please confirm your profile information is accurate prior to starting a new move. When all information
+ is up to date, click the "Validate Profile" button at the bottom of the page and you may begin
+ your move.
+
)}
@@ -126,6 +126,26 @@ const Profile = ({ serviceMember, currentOrders, currentBackupContacts, moveIsIn
editURL={customerRoutes.EDIT_OKTA_PROFILE_PATH}
/>
+ {needsToVerifyProfile && (
+
+
+ {profileValidated ? 'Profile Validated' : 'Validate Profile'}
+
+
+ Create a Move
+
+
+ )}
+ If you need to change, add, or cancel shipments, talk to your move counselor or Customer Care
+ Representative
+
+ )}
+
+ ) : (
+
+ We will collect addresses, dates, and how you want to move your personal property.
+ Note: You can change these details later by talking to a move counselor or customer care
+ representative.
+
+ )}
+
+ handleNewPathClick(confirmationPath)}
+ secondaryBtn={hasSubmittedMove()}
+ secondaryBtnClassName={styles.secondaryBtn}
+ step="4"
+ >
+ {hasSubmittedMove() ? (
+
+ Move submitted {formatCustomerDate(move.submittedAt)}.
+
+ Print the legal agreement
+
+
+ ) : (
+
+ Review your move details and sign the legal paperwork, then send the info on to your move
+ counselor.
+
+ )}
+
+ {!!ppmShipments.length && hasSubmittedMove() && hasAdvanceRequested() && (
+
+
+ {hasAdvanceApproved() && (
+ <>
+
+ Your Advance Operating Allowance (AOA) request has been reviewed. Download the paperwork for
+ approved requests and submit it to your Finance Office to receive your advance.
+
+ The amount you receive will be deducted from your PPM incentive payment. If your
+ incentive ends up being less than your advance, you will be required to pay back the
+ difference.
+
+
+
+ {ppmShipments.map((shipment) => {
+ const { shipmentType } = shipment;
+ if (shipmentNumbersByType[shipmentType]) {
+ shipmentNumbersByType[shipmentType] += 1;
+ } else {
+ shipmentNumbersByType[shipmentType] = 1;
+ }
+ const shipmentNumber = shipmentNumbersByType[shipmentType];
+ return (
+ <>
+
+ {shipmentTypes[shipment.shipmentType]}
+ {` ${shipmentNumber} `}
+
+ {shipment?.ppmShipment?.advanceStatus === ADVANCE_STATUSES.APPROVED.apiValue && (
+ // TODO: B-18060 will add link to method that will create the AOA packet and return for download
+
+ )}
+ {shipment?.ppmShipment?.advanceStatus === ADVANCE_STATUSES.REJECTED.apiValue && (
+ Advance request denied
+ )}
+ {shipment?.ppmShipment?.advanceStatus == null && (
+ Advance request pending
+ )}
+ >
+ );
+ })}
+ >
+ )}
+ {hasAllAdvancesRejected() && (
+
+ Your Advance Operating Allowance (AOA) request has been denied. You may be able to use your
+ Government Travel Charge Card (GTCC). Contact your local transportation office to verify GTCC
+ usage authorization or ask any questions.
+
+ )}
+ {!hasAdvanceApproved() && !hasAllAdvancesRejected() && (
+
+ Your service will review your request for an Advance Operating Allowance (AOA). If approved,
+ you will be able to download the paperwork for your request and submit it to your Finance
+ Office to receive your advance.
+
+ The amount you receive will be deducted from your PPM incentive payment. If your
+ incentive ends up being less than your advance, you will be required to pay back the
+ difference.
+
+ )}
+
+
+ )}
+ {!!ppmShipments.length && hasSubmittedMove() && (
+
+
+
+ )}
+
+
+ >
+ )}
+
+
+
+ >
+ );
+};
+
+MoveHome.defaultProps = {
+ orders: {},
+ serviceMember: null,
+ signedCertification: {},
+ uploadedAmendedOrderDocuments: [],
+ router: {},
+};
+
+const mapStateToProps = (state) => {
+ const serviceMember = selectServiceMemberFromLoggedInUser(state);
+ const serviceMemberMoves = selectAllMoves(state);
+
+ return {
+ isProfileComplete: selectIsProfileComplete(state),
+ orders: selectCurrentOrders(state) || {},
+ uploadedOrderDocuments: selectUploadsForCurrentOrders(state),
+ uploadedAmendedOrderDocuments: selectUploadsForCurrentAmendedOrders(state),
+ serviceMember,
+ serviceMemberMoves,
+ backupContacts: serviceMember?.backup_contacts || [],
+ signedCertification: selectSignedCertification(state),
+ mtoShipments: selectMTOShipmentsForCurrentMove(state),
+ };
+};
+
+const mapDispatchToProps = {
+ getSignedCertification: getSignedCertificationAction,
+ updateShipmentList: updateMTOShipments,
+};
+
+// in order to avoid setting up proxy server only for storybook, pass in stub function so API requests don't fail
+const mergeProps = (stateProps, dispatchProps, ownProps) => ({
+ ...stateProps,
+ ...dispatchProps,
+ ...ownProps,
+});
+
+export default withContext(
+ withRouter(
+ connect(
+ mapStateToProps,
+ mapDispatchToProps,
+ mergeProps,
+ )(requireCustomerState(MoveHome, profileStates.BACKUP_CONTACTS_COMPLETE)),
+ ),
+);
diff --git a/src/pages/MyMove/Multi-Moves/MultiMovesLandingPage.jsx b/src/pages/MyMove/Multi-Moves/MultiMovesLandingPage.jsx
index e0bd7b625b3..41f5344449b 100644
--- a/src/pages/MyMove/Multi-Moves/MultiMovesLandingPage.jsx
+++ b/src/pages/MyMove/Multi-Moves/MultiMovesLandingPage.jsx
@@ -21,17 +21,27 @@ import { withContext } from 'shared/AppContext';
import withRouter from 'utils/routing';
import requireCustomerState from 'containers/requireCustomerState/requireCustomerState';
import { selectAllMoves, selectIsProfileComplete, selectServiceMemberFromLoggedInUser } from 'store/entities/selectors';
+import LoadingPlaceholder from 'shared/LoadingPlaceholder';
+import { updateAllMoves } from 'store/entities/actions';
+import { profileStates } from 'constants/customerStates';
+import { getAllMoves } from 'services/internalApi';
const MultiMovesLandingPage = ({ serviceMember, serviceMemberMoves }) => {
const [setErrorState] = useState({ hasError: false, error: undefined, info: undefined });
const navigate = useNavigate();
+ // this will run on page load
+ // loads user info and move and updates if the serviceMember object in state changes
useEffect(() => {
const fetchData = async () => {
try {
loadInternalSchema();
loadUser();
initOnboarding();
+ if (serviceMember) {
+ const response = getAllMoves(serviceMember.id);
+ updateAllMoves(response);
+ }
document.title = generatePageTitle('MilMove');
} catch (error) {
const { message } = error;
@@ -44,9 +54,8 @@ const MultiMovesLandingPage = ({ serviceMember, serviceMemberMoves }) => {
retryPageLoading(error);
}
};
-
fetchData();
- }, [setErrorState]);
+ }, [setErrorState, serviceMember]);
const flags = detectFlags(process.env.NODE_ENV, window.location.host, window.location.search);
@@ -62,6 +71,17 @@ const MultiMovesLandingPage = ({ serviceMember, serviceMemberMoves }) => {
}
};
+ // early return while api call loads object
+ if (Object.keys(serviceMemberMoves).length === 0) {
+ return (
+
+
+
+
+
+ );
+ }
+
// ! WILL ONLY SHOW IF MULTIMOVE FLAG IS TRUE
return flags.multiMove ? (