From 08447c2dc08f48a5876bc6520903377e3a116221 Mon Sep 17 00:00:00 2001 From: Cory Kleinjan Date: Fri, 10 May 2024 11:36:33 -0500 Subject: [PATCH] Updating to use existing DCRTSA --- .../prime/create_mto_service_item.go | 10 +- migrations/app/migrations_manifest.txt | 1 - ...ding_standalone_crate_service_codes.up.sql | 5 - pkg/gen/primeapi/embedded_spec.go | 226 +++++++++--------- pkg/gen/primemessages/m_t_o_service_item.go | 12 +- ...rvice_item_domestic_standalone_crating.go} | 128 +++++----- .../m_t_o_service_item_model_type.go | 8 +- pkg/gen/primev2api/embedded_spec.go | 226 +++++++++--------- pkg/gen/primev2messages/m_t_o_service_item.go | 12 +- ...rvice_item_domestic_standalone_crating.go} | 128 +++++----- .../m_t_o_service_item_model_type.go | 8 +- pkg/gen/primev3api/embedded_spec.go | 226 +++++++++--------- pkg/gen/primev3messages/m_t_o_service_item.go | 12 +- ...rvice_item_domestic_standalone_crating.go} | 128 +++++----- .../m_t_o_service_item_model_type.go | 8 +- pkg/gen/supportapi/embedded_spec.go | 154 ++++++------ pkg/gen/supportmessages/m_t_o_service_item.go | 12 +- ...rvice_item_domestic_standalone_crating.go} | 104 ++++---- .../m_t_o_service_item_model_type.go | 8 +- pkg/handlers/primeapi/move_task_order_test.go | 6 +- pkg/handlers/primeapi/mto_service_item.go | 10 +- .../primeapi/mto_service_item_test.go | 48 +--- .../primeapi/payloads/model_to_payload.go | 4 +- .../payloads/model_to_payload_test.go | 12 +- .../primeapi/payloads/payload_to_model.go | 6 +- .../payloads/payload_to_model_test.go | 48 ++-- .../primeapiv2/move_task_order_test.go | 8 +- pkg/handlers/primeapiv2/mto_service_item.go | 10 +- .../primeapiv2/mto_service_item_test.go | 48 +--- .../primeapiv2/payloads/model_to_payload.go | 4 +- .../payloads/model_to_payload_test.go | 10 +- .../primeapiv2/payloads/payload_to_model.go | 6 +- .../payloads/payload_to_model_test.go | 48 ++-- .../primeapiv3/move_task_order_test.go | 6 +- pkg/handlers/primeapiv3/mto_service_item.go | 10 +- .../primeapiv3/mto_service_item_test.go | 43 +--- .../primeapiv3/payloads/model_to_payload.go | 2 +- .../payloads/model_to_payload_test.go | 12 +- .../primeapiv3/payloads/payload_to_model.go | 6 +- .../payloads/payload_to_model_test.go | 48 ++-- .../internal/payloads/model_to_payload.go | 4 +- pkg/models/re_service.go | 4 - .../CreateShipmentServiceItemForm.jsx | 10 +- .../CreateShipmentServiceItemForm.test.jsx | 2 +- ....jsx => DomesticStandaloneCratingForm.jsx} | 14 +- src/constants/prime.js | 7 +- src/constants/serviceItems.js | 3 +- src/content/serviceItems.js | 3 +- ...ServiceItemDomesticStandaloneCrating.yaml} | 9 +- .../prime/MTOServiceItemModelType.yaml | 4 +- swagger-def/prime.yaml | 4 +- swagger-def/prime_v2.yaml | 4 +- swagger-def/prime_v3.yaml | 4 +- swagger-def/support.yaml | 11 +- swagger/prime.yaml | 21 +- swagger/prime_v2.yaml | 23 +- swagger/prime_v3.yaml | 21 +- swagger/support.yaml | 13 +- 58 files changed, 912 insertions(+), 1060 deletions(-) delete mode 100644 migrations/app/schema/20240509191218_adding_standalone_crate_service_codes.up.sql rename pkg/gen/primemessages/{m_t_o_service_item_standalone_crating.go => m_t_o_service_item_domestic_standalone_crating.go} (68%) rename pkg/gen/primev2messages/{m_t_o_service_item_standalone_crating.go => m_t_o_service_item_domestic_standalone_crating.go} (68%) rename pkg/gen/primev3messages/{m_t_o_service_item_standalone_crating.go => m_t_o_service_item_domestic_standalone_crating.go} (68%) rename pkg/gen/supportmessages/{m_t_o_service_item_standalone_crating.go => m_t_o_service_item_domestic_standalone_crating.go} (71%) rename src/components/PrimeUI/CreateShipmentServiceItemForm/{StandaloneCratingForm.jsx => DomesticStandaloneCratingForm.jsx} (89%) rename swagger-def/definitions/prime/{MTOServiceItemStandaloneCrating.yaml => MTOServiceItemDomesticStandaloneCrating.yaml} (73%) diff --git a/cmd/prime-api-client/prime/create_mto_service_item.go b/cmd/prime-api-client/prime/create_mto_service_item.go index a9a16f9b6af..f99a933b9ad 100644 --- a/cmd/prime-api-client/prime/create_mto_service_item.go +++ b/cmd/prime-api-client/prime/create_mto_service_item.go @@ -35,8 +35,8 @@ type dDFSITParams struct { type domesticCratingParams struct { Body primemessages.MTOServiceItemDomesticCrating `json:"body"` } -type standaloneCratingParams struct { - Body primemessages.MTOServiceItemStandaloneCrating `json:"body"` +type domesticStandaloneCratingParams struct { + Body primemessages.MTOServiceItemDomesticStandaloneCrating `json:"body"` } type shuttleParams struct { Body primemessages.MTOServiceItemShuttle `json:"body"` @@ -145,8 +145,8 @@ func CreateMTOServiceItem(cmd *cobra.Command, args []string) error { var params domesticCratingParams err = utils.DecodeJSONFileToPayload(filename, utils.ContainsDash(args), ¶ms) serviceItemParams.SetBody(¶ms.Body) - case primemessages.MTOServiceItemModelTypeMTOServiceItemStandaloneCrating: - var params standaloneCratingParams + case primemessages.MTOServiceItemModelTypeMTOServiceItemDomesticStandaloneCrating: + var params domesticStandaloneCratingParams err = utils.DecodeJSONFileToPayload(filename, utils.ContainsDash(args), ¶ms) serviceItemParams.SetBody(¶ms.Body) case primemessages.MTOServiceItemModelTypeMTOServiceItemShuttle: @@ -158,7 +158,7 @@ func CreateMTOServiceItem(cmd *cobra.Command, args []string) error { primemessages.MTOServiceItemModelTypeMTOServiceItemDestSIT, primemessages.MTOServiceItemModelTypeMTOServiceItemOriginSIT, primemessages.MTOServiceItemModelTypeMTOServiceItemDomesticCrating, - primemessages.MTOServiceItemModelTypeMTOServiceItemStandaloneCrating, + primemessages.MTOServiceItemModelTypeMTOServiceItemDomesticStandaloneCrating, primemessages.MTOServiceItemModelTypeMTOServiceItemShuttle, }) } diff --git a/migrations/app/migrations_manifest.txt b/migrations/app/migrations_manifest.txt index f81a98f493c..39bc823e7d0 100644 --- a/migrations/app/migrations_manifest.txt +++ b/migrations/app/migrations_manifest.txt @@ -922,4 +922,3 @@ 20240405190435_add_safety_privilege.up.sql 20240411201158_add_application_parameter_and_validation_code_table.up.sql 20240416145256_update_safety_privilege_label.up.sql -20240509191218_adding_standalone_crate_service_codes.up.sql diff --git a/migrations/app/schema/20240509191218_adding_standalone_crate_service_codes.up.sql b/migrations/app/schema/20240509191218_adding_standalone_crate_service_codes.up.sql deleted file mode 100644 index 9edd38f7751..00000000000 --- a/migrations/app/schema/20240509191218_adding_standalone_crate_service_codes.up.sql +++ /dev/null @@ -1,5 +0,0 @@ -INSERT INTO re_services -(id, code, name, created_at, updated_at) -VALUES -('3d26d221-b690-4fd1-9083-ec0cf578bb20', 'SCRT', 'Shipment Crating', now(), now()), -('2deb9f08-e5c4-4c34-a9eb-9c02342c228b', 'SUCRT', 'Shipment Uncrating', now(), now()); diff --git a/pkg/gen/primeapi/embedded_spec.go b/pkg/gen/primeapi/embedded_spec.go index 458ac4cac40..22fa8a3f1b4 100644 --- a/pkg/gen/primeapi/embedded_spec.go +++ b/pkg/gen/primeapi/embedded_spec.go @@ -2523,8 +2523,62 @@ func init() { } ] }, + "MTOServiceItemDomesticStandaloneCrating": { + "description": "Describes a standard crating service item subtype of a MTOServiceItem.", + "allOf": [ + { + "$ref": "#/definitions/MTOServiceItem" + }, + { + "type": "object", + "required": [ + "reServiceCode", + "item", + "crate", + "description" + ], + "properties": { + "crate": { + "description": "The dimensions for the crate the item will be shipped in.", + "allOf": [ + { + "$ref": "#/definitions/MTOServiceItemDimension" + } + ] + }, + "description": { + "description": "A description of the item being crated.", + "type": "string", + "example": "A motorcycle to be crated." + }, + "item": { + "description": "The dimensions of the item being crated.", + "allOf": [ + { + "$ref": "#/definitions/MTOServiceItemDimension" + } + ] + }, + "reServiceCode": { + "description": "A unique code for the service item. Indicates if the service is for crating (DCRTSA).", + "type": "string", + "enum": [ + "DCRTSA" + ] + }, + "reason": { + "description": "The customer's explanation for why an item needed to be crated or uncrated. Used by the TOO while deciding to approve or reject the service item.\n", + "type": "string", + "x-nullable": true, + "x-omitempty": false, + "example": "Storage items need to be picked up" + } + } + } + ] + }, "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 * SCRT - MTOServiceItemStandaloneCrating\n\nThe documentation will then update with the supported fields.\n", + "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 * DCRTSA - MTOServiceItemDomesticStandaloneCrating\n\nThe documentation will then update with the supported fields.\n", "type": "string", "enum": [ "MTOServiceItemBasic", @@ -2532,7 +2586,7 @@ func init() { "MTOServiceItemDestSIT", "MTOServiceItemShuttle", "MTOServiceItemDomesticCrating", - "MTOServiceItemStandaloneCrating" + "MTOServiceItemDomesticStandaloneCrating" ] }, "MTOServiceItemOriginSIT": { @@ -2649,61 +2703,6 @@ func init() { } ] }, - "MTOServiceItemStandaloneCrating": { - "description": "Describes a standard crating/uncrating service item subtype of a MTOServiceItem.", - "allOf": [ - { - "$ref": "#/definitions/MTOServiceItem" - }, - { - "type": "object", - "required": [ - "reServiceCode", - "item", - "crate", - "description" - ], - "properties": { - "crate": { - "description": "The dimensions for the crate the item will be shipped in.", - "allOf": [ - { - "$ref": "#/definitions/MTOServiceItemDimension" - } - ] - }, - "description": { - "description": "A description of the item being crated.", - "type": "string", - "example": "A motorcycle to be crated." - }, - "item": { - "description": "The dimensions of the item being crated.", - "allOf": [ - { - "$ref": "#/definitions/MTOServiceItemDimension" - } - ] - }, - "reServiceCode": { - "description": "A unique code for the service item. Indicates if the service is for crating (DCRT) or uncrating (DUCRT).", - "type": "string", - "enum": [ - "SCRT", - "SUCRT" - ] - }, - "reason": { - "description": "The contractor's explanation for why an item needed to be crated or uncrated. Used by the TOO while deciding to approve or reject the service item.\n", - "type": "string", - "x-nullable": true, - "x-omitempty": false, - "example": "Storage items need to be picked up" - } - } - } - ] - }, "MTOServiceItemStatus": { "description": "The status of a service item, indicating where it is in the TOO's approval process.", "type": "string", @@ -7720,8 +7719,62 @@ func init() { } ] }, + "MTOServiceItemDomesticStandaloneCrating": { + "description": "Describes a standard crating service item subtype of a MTOServiceItem.", + "allOf": [ + { + "$ref": "#/definitions/MTOServiceItem" + }, + { + "type": "object", + "required": [ + "reServiceCode", + "item", + "crate", + "description" + ], + "properties": { + "crate": { + "description": "The dimensions for the crate the item will be shipped in.", + "allOf": [ + { + "$ref": "#/definitions/MTOServiceItemDimension" + } + ] + }, + "description": { + "description": "A description of the item being crated.", + "type": "string", + "example": "A motorcycle to be crated." + }, + "item": { + "description": "The dimensions of the item being crated.", + "allOf": [ + { + "$ref": "#/definitions/MTOServiceItemDimension" + } + ] + }, + "reServiceCode": { + "description": "A unique code for the service item. Indicates if the service is for crating (DCRTSA).", + "type": "string", + "enum": [ + "DCRTSA" + ] + }, + "reason": { + "description": "The customer's explanation for why an item needed to be crated or uncrated. Used by the TOO while deciding to approve or reject the service item.\n", + "type": "string", + "x-nullable": true, + "x-omitempty": false, + "example": "Storage items need to be picked up" + } + } + } + ] + }, "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 * SCRT - MTOServiceItemStandaloneCrating\n\nThe documentation will then update with the supported fields.\n", + "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 * DCRTSA - MTOServiceItemDomesticStandaloneCrating\n\nThe documentation will then update with the supported fields.\n", "type": "string", "enum": [ "MTOServiceItemBasic", @@ -7729,7 +7782,7 @@ func init() { "MTOServiceItemDestSIT", "MTOServiceItemShuttle", "MTOServiceItemDomesticCrating", - "MTOServiceItemStandaloneCrating" + "MTOServiceItemDomesticStandaloneCrating" ] }, "MTOServiceItemOriginSIT": { @@ -7846,61 +7899,6 @@ func init() { } ] }, - "MTOServiceItemStandaloneCrating": { - "description": "Describes a standard crating/uncrating service item subtype of a MTOServiceItem.", - "allOf": [ - { - "$ref": "#/definitions/MTOServiceItem" - }, - { - "type": "object", - "required": [ - "reServiceCode", - "item", - "crate", - "description" - ], - "properties": { - "crate": { - "description": "The dimensions for the crate the item will be shipped in.", - "allOf": [ - { - "$ref": "#/definitions/MTOServiceItemDimension" - } - ] - }, - "description": { - "description": "A description of the item being crated.", - "type": "string", - "example": "A motorcycle to be crated." - }, - "item": { - "description": "The dimensions of the item being crated.", - "allOf": [ - { - "$ref": "#/definitions/MTOServiceItemDimension" - } - ] - }, - "reServiceCode": { - "description": "A unique code for the service item. Indicates if the service is for crating (DCRT) or uncrating (DUCRT).", - "type": "string", - "enum": [ - "SCRT", - "SUCRT" - ] - }, - "reason": { - "description": "The contractor's explanation for why an item needed to be crated or uncrated. Used by the TOO while deciding to approve or reject the service item.\n", - "type": "string", - "x-nullable": true, - "x-omitempty": false, - "example": "Storage items need to be picked up" - } - } - } - ] - }, "MTOServiceItemStatus": { "description": "The status of a service item, indicating where it is in the TOO's approval process.", "type": "string", diff --git a/pkg/gen/primemessages/m_t_o_service_item.go b/pkg/gen/primemessages/m_t_o_service_item.go index c2ad3d9fe4c..6ae5723ab54 100644 --- a/pkg/gen/primemessages/m_t_o_service_item.go +++ b/pkg/gen/primemessages/m_t_o_service_item.go @@ -257,20 +257,20 @@ func unmarshalMTOServiceItem(data []byte, consumer runtime.Consumer) (MTOService return nil, err } return &result, nil - case "MTOServiceItemOriginSIT": - var result MTOServiceItemOriginSIT + case "MTOServiceItemDomesticStandaloneCrating": + var result MTOServiceItemDomesticStandaloneCrating if err := consumer.Consume(buf2, &result); err != nil { return nil, err } return &result, nil - case "MTOServiceItemShuttle": - var result MTOServiceItemShuttle + case "MTOServiceItemOriginSIT": + var result MTOServiceItemOriginSIT if err := consumer.Consume(buf2, &result); err != nil { return nil, err } return &result, nil - case "MTOServiceItemStandaloneCrating": - var result MTOServiceItemStandaloneCrating + case "MTOServiceItemShuttle": + var result MTOServiceItemShuttle if err := consumer.Consume(buf2, &result); err != nil { return nil, err } diff --git a/pkg/gen/primemessages/m_t_o_service_item_standalone_crating.go b/pkg/gen/primemessages/m_t_o_service_item_domestic_standalone_crating.go similarity index 68% rename from pkg/gen/primemessages/m_t_o_service_item_standalone_crating.go rename to pkg/gen/primemessages/m_t_o_service_item_domestic_standalone_crating.go index 06191519db6..840e9f2a125 100644 --- a/pkg/gen/primemessages/m_t_o_service_item_standalone_crating.go +++ b/pkg/gen/primemessages/m_t_o_service_item_domestic_standalone_crating.go @@ -16,10 +16,10 @@ import ( "github.com/go-openapi/validate" ) -// MTOServiceItemStandaloneCrating Describes a standard crating/uncrating service item subtype of a MTOServiceItem. +// MTOServiceItemDomesticStandaloneCrating Describes a standard crating service item subtype of a MTOServiceItem. // -// swagger:model MTOServiceItemStandaloneCrating -type MTOServiceItemStandaloneCrating struct { +// swagger:model MTOServiceItemDomesticStandaloneCrating +type MTOServiceItemDomesticStandaloneCrating struct { eTagField string idField strfmt.UUID @@ -53,108 +53,108 @@ type MTOServiceItemStandaloneCrating struct { MTOServiceItemDimension } `json:"item"` - // A unique code for the service item. Indicates if the service is for crating (DCRT) or uncrating (DUCRT). + // A unique code for the service item. Indicates if the service is for crating (DCRTSA). // Required: true - // Enum: [SCRT SUCRT] + // Enum: [DCRTSA] ReServiceCode *string `json:"reServiceCode"` - // The contractor's explanation for why an item needed to be crated or uncrated. Used by the TOO while deciding to approve or reject the service item. + // The customer's explanation for why an item needed to be crated or uncrated. Used by the TOO while deciding to approve or reject the service item. // // Example: Storage items need to be picked up Reason *string `json:"reason"` } // ETag gets the e tag of this subtype -func (m *MTOServiceItemStandaloneCrating) ETag() string { +func (m *MTOServiceItemDomesticStandaloneCrating) ETag() string { return m.eTagField } // SetETag sets the e tag of this subtype -func (m *MTOServiceItemStandaloneCrating) SetETag(val string) { +func (m *MTOServiceItemDomesticStandaloneCrating) SetETag(val string) { m.eTagField = val } // ID gets the id of this subtype -func (m *MTOServiceItemStandaloneCrating) ID() strfmt.UUID { +func (m *MTOServiceItemDomesticStandaloneCrating) ID() strfmt.UUID { return m.idField } // SetID sets the id of this subtype -func (m *MTOServiceItemStandaloneCrating) SetID(val strfmt.UUID) { +func (m *MTOServiceItemDomesticStandaloneCrating) SetID(val strfmt.UUID) { m.idField = val } // ModelType gets the model type of this subtype -func (m *MTOServiceItemStandaloneCrating) ModelType() MTOServiceItemModelType { - return "MTOServiceItemStandaloneCrating" +func (m *MTOServiceItemDomesticStandaloneCrating) ModelType() MTOServiceItemModelType { + return "MTOServiceItemDomesticStandaloneCrating" } // SetModelType sets the model type of this subtype -func (m *MTOServiceItemStandaloneCrating) SetModelType(val MTOServiceItemModelType) { +func (m *MTOServiceItemDomesticStandaloneCrating) SetModelType(val MTOServiceItemModelType) { } // MoveTaskOrderID gets the move task order ID of this subtype -func (m *MTOServiceItemStandaloneCrating) MoveTaskOrderID() *strfmt.UUID { +func (m *MTOServiceItemDomesticStandaloneCrating) MoveTaskOrderID() *strfmt.UUID { return m.moveTaskOrderIdField } // SetMoveTaskOrderID sets the move task order ID of this subtype -func (m *MTOServiceItemStandaloneCrating) SetMoveTaskOrderID(val *strfmt.UUID) { +func (m *MTOServiceItemDomesticStandaloneCrating) SetMoveTaskOrderID(val *strfmt.UUID) { m.moveTaskOrderIdField = val } // MtoShipmentID gets the mto shipment ID of this subtype -func (m *MTOServiceItemStandaloneCrating) MtoShipmentID() strfmt.UUID { +func (m *MTOServiceItemDomesticStandaloneCrating) MtoShipmentID() strfmt.UUID { return m.mtoShipmentIdField } // SetMtoShipmentID sets the mto shipment ID of this subtype -func (m *MTOServiceItemStandaloneCrating) SetMtoShipmentID(val strfmt.UUID) { +func (m *MTOServiceItemDomesticStandaloneCrating) SetMtoShipmentID(val strfmt.UUID) { m.mtoShipmentIdField = val } // ReServiceName gets the re service name of this subtype -func (m *MTOServiceItemStandaloneCrating) ReServiceName() string { +func (m *MTOServiceItemDomesticStandaloneCrating) ReServiceName() string { return m.reServiceNameField } // SetReServiceName sets the re service name of this subtype -func (m *MTOServiceItemStandaloneCrating) SetReServiceName(val string) { +func (m *MTOServiceItemDomesticStandaloneCrating) SetReServiceName(val string) { m.reServiceNameField = val } // RejectionReason gets the rejection reason of this subtype -func (m *MTOServiceItemStandaloneCrating) RejectionReason() *string { +func (m *MTOServiceItemDomesticStandaloneCrating) RejectionReason() *string { return m.rejectionReasonField } // SetRejectionReason sets the rejection reason of this subtype -func (m *MTOServiceItemStandaloneCrating) SetRejectionReason(val *string) { +func (m *MTOServiceItemDomesticStandaloneCrating) SetRejectionReason(val *string) { m.rejectionReasonField = val } // ServiceRequestDocuments gets the service request documents of this subtype -func (m *MTOServiceItemStandaloneCrating) ServiceRequestDocuments() ServiceRequestDocuments { +func (m *MTOServiceItemDomesticStandaloneCrating) ServiceRequestDocuments() ServiceRequestDocuments { return m.serviceRequestDocumentsField } // SetServiceRequestDocuments sets the service request documents of this subtype -func (m *MTOServiceItemStandaloneCrating) SetServiceRequestDocuments(val ServiceRequestDocuments) { +func (m *MTOServiceItemDomesticStandaloneCrating) SetServiceRequestDocuments(val ServiceRequestDocuments) { m.serviceRequestDocumentsField = val } // Status gets the status of this subtype -func (m *MTOServiceItemStandaloneCrating) Status() MTOServiceItemStatus { +func (m *MTOServiceItemDomesticStandaloneCrating) Status() MTOServiceItemStatus { return m.statusField } // SetStatus sets the status of this subtype -func (m *MTOServiceItemStandaloneCrating) SetStatus(val MTOServiceItemStatus) { +func (m *MTOServiceItemDomesticStandaloneCrating) SetStatus(val MTOServiceItemStatus) { m.statusField = val } // UnmarshalJSON unmarshals this object with a polymorphic type from a JSON structure -func (m *MTOServiceItemStandaloneCrating) UnmarshalJSON(raw []byte) error { +func (m *MTOServiceItemDomesticStandaloneCrating) UnmarshalJSON(raw []byte) error { var data struct { // The dimensions for the crate the item will be shipped in. @@ -174,12 +174,12 @@ func (m *MTOServiceItemStandaloneCrating) UnmarshalJSON(raw []byte) error { MTOServiceItemDimension } `json:"item"` - // A unique code for the service item. Indicates if the service is for crating (DCRT) or uncrating (DUCRT). + // A unique code for the service item. Indicates if the service is for crating (DCRTSA). // Required: true - // Enum: [SCRT SUCRT] + // Enum: [DCRTSA] ReServiceCode *string `json:"reServiceCode"` - // The contractor's explanation for why an item needed to be crated or uncrated. Used by the TOO while deciding to approve or reject the service item. + // The customer's explanation for why an item needed to be crated or uncrated. Used by the TOO while deciding to approve or reject the service item. // // Example: Storage items need to be picked up Reason *string `json:"reason"` @@ -221,7 +221,7 @@ func (m *MTOServiceItemStandaloneCrating) UnmarshalJSON(raw []byte) error { return err } - var result MTOServiceItemStandaloneCrating + var result MTOServiceItemDomesticStandaloneCrating result.eTagField = base.ETag @@ -255,7 +255,7 @@ func (m *MTOServiceItemStandaloneCrating) UnmarshalJSON(raw []byte) error { } // MarshalJSON marshals this object with a polymorphic type to a JSON structure -func (m MTOServiceItemStandaloneCrating) MarshalJSON() ([]byte, error) { +func (m MTOServiceItemDomesticStandaloneCrating) MarshalJSON() ([]byte, error) { var b1, b2, b3 []byte var err error b1, err = json.Marshal(struct { @@ -277,12 +277,12 @@ func (m MTOServiceItemStandaloneCrating) MarshalJSON() ([]byte, error) { MTOServiceItemDimension } `json:"item"` - // A unique code for the service item. Indicates if the service is for crating (DCRT) or uncrating (DUCRT). + // A unique code for the service item. Indicates if the service is for crating (DCRTSA). // Required: true - // Enum: [SCRT SUCRT] + // Enum: [DCRTSA] ReServiceCode *string `json:"reServiceCode"` - // The contractor's explanation for why an item needed to be crated or uncrated. Used by the TOO while deciding to approve or reject the service item. + // The customer's explanation for why an item needed to be crated or uncrated. Used by the TOO while deciding to approve or reject the service item. // // Example: Storage items need to be picked up Reason *string `json:"reason"` @@ -346,8 +346,8 @@ func (m MTOServiceItemStandaloneCrating) MarshalJSON() ([]byte, error) { return swag.ConcatJSON(b1, b2, b3), nil } -// Validate validates this m t o service item standalone crating -func (m *MTOServiceItemStandaloneCrating) Validate(formats strfmt.Registry) error { +// Validate validates this m t o service item domestic standalone crating +func (m *MTOServiceItemDomesticStandaloneCrating) Validate(formats strfmt.Registry) error { var res []error if err := m.validateID(formats); err != nil { @@ -392,7 +392,7 @@ func (m *MTOServiceItemStandaloneCrating) Validate(formats strfmt.Registry) erro return nil } -func (m *MTOServiceItemStandaloneCrating) validateID(formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) validateID(formats strfmt.Registry) error { if swag.IsZero(m.ID()) { // not required return nil @@ -405,7 +405,7 @@ func (m *MTOServiceItemStandaloneCrating) validateID(formats strfmt.Registry) er return nil } -func (m *MTOServiceItemStandaloneCrating) validateMoveTaskOrderID(formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) validateMoveTaskOrderID(formats strfmt.Registry) error { if err := validate.Required("moveTaskOrderID", "body", m.MoveTaskOrderID()); err != nil { return err @@ -418,7 +418,7 @@ func (m *MTOServiceItemStandaloneCrating) validateMoveTaskOrderID(formats strfmt return nil } -func (m *MTOServiceItemStandaloneCrating) validateMtoShipmentID(formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) validateMtoShipmentID(formats strfmt.Registry) error { if swag.IsZero(m.MtoShipmentID()) { // not required return nil @@ -431,7 +431,7 @@ func (m *MTOServiceItemStandaloneCrating) validateMtoShipmentID(formats strfmt.R return nil } -func (m *MTOServiceItemStandaloneCrating) validateServiceRequestDocuments(formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) validateServiceRequestDocuments(formats strfmt.Registry) error { if swag.IsZero(m.ServiceRequestDocuments()) { // not required return nil @@ -449,7 +449,7 @@ func (m *MTOServiceItemStandaloneCrating) validateServiceRequestDocuments(format return nil } -func (m *MTOServiceItemStandaloneCrating) validateStatus(formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) validateStatus(formats strfmt.Registry) error { if swag.IsZero(m.Status()) { // not required return nil @@ -467,12 +467,12 @@ func (m *MTOServiceItemStandaloneCrating) validateStatus(formats strfmt.Registry return nil } -func (m *MTOServiceItemStandaloneCrating) validateCrate(formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) validateCrate(formats strfmt.Registry) error { return nil } -func (m *MTOServiceItemStandaloneCrating) validateDescription(formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) validateDescription(formats strfmt.Registry) error { if err := validate.Required("description", "body", m.Description); err != nil { return err @@ -481,32 +481,32 @@ func (m *MTOServiceItemStandaloneCrating) validateDescription(formats strfmt.Reg return nil } -func (m *MTOServiceItemStandaloneCrating) validateItem(formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) validateItem(formats strfmt.Registry) error { return nil } -var mTOServiceItemStandaloneCratingTypeReServiceCodePropEnum []interface{} +var mTOServiceItemDomesticStandaloneCratingTypeReServiceCodePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["SCRT","SUCRT"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["DCRTSA"]`), &res); err != nil { panic(err) } for _, v := range res { - mTOServiceItemStandaloneCratingTypeReServiceCodePropEnum = append(mTOServiceItemStandaloneCratingTypeReServiceCodePropEnum, v) + mTOServiceItemDomesticStandaloneCratingTypeReServiceCodePropEnum = append(mTOServiceItemDomesticStandaloneCratingTypeReServiceCodePropEnum, v) } } // property enum -func (m *MTOServiceItemStandaloneCrating) validateReServiceCodeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, mTOServiceItemStandaloneCratingTypeReServiceCodePropEnum, true); err != nil { +func (m *MTOServiceItemDomesticStandaloneCrating) validateReServiceCodeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, mTOServiceItemDomesticStandaloneCratingTypeReServiceCodePropEnum, true); err != nil { return err } return nil } -func (m *MTOServiceItemStandaloneCrating) validateReServiceCode(formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) validateReServiceCode(formats strfmt.Registry) error { if err := validate.Required("reServiceCode", "body", m.ReServiceCode); err != nil { return err @@ -520,8 +520,8 @@ func (m *MTOServiceItemStandaloneCrating) validateReServiceCode(formats strfmt.R return nil } -// ContextValidate validate this m t o service item standalone crating based on the context it is used -func (m *MTOServiceItemStandaloneCrating) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validate this m t o service item domestic standalone crating based on the context it is used +func (m *MTOServiceItemDomesticStandaloneCrating) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error if err := m.contextValidateETag(ctx, formats); err != nil { @@ -562,7 +562,7 @@ func (m *MTOServiceItemStandaloneCrating) ContextValidate(ctx context.Context, f return nil } -func (m *MTOServiceItemStandaloneCrating) contextValidateETag(ctx context.Context, formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) contextValidateETag(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "eTag", "body", string(m.ETag())); err != nil { return err @@ -571,7 +571,7 @@ func (m *MTOServiceItemStandaloneCrating) contextValidateETag(ctx context.Contex return nil } -func (m *MTOServiceItemStandaloneCrating) contextValidateID(ctx context.Context, formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) contextValidateID(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "id", "body", strfmt.UUID(m.ID())); err != nil { return err @@ -580,7 +580,7 @@ func (m *MTOServiceItemStandaloneCrating) contextValidateID(ctx context.Context, return nil } -func (m *MTOServiceItemStandaloneCrating) contextValidateModelType(ctx context.Context, formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) contextValidateModelType(ctx context.Context, formats strfmt.Registry) error { if err := m.ModelType().ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -594,7 +594,7 @@ func (m *MTOServiceItemStandaloneCrating) contextValidateModelType(ctx context.C return nil } -func (m *MTOServiceItemStandaloneCrating) contextValidateReServiceName(ctx context.Context, formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) contextValidateReServiceName(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "reServiceName", "body", string(m.ReServiceName())); err != nil { return err @@ -603,7 +603,7 @@ func (m *MTOServiceItemStandaloneCrating) contextValidateReServiceName(ctx conte return nil } -func (m *MTOServiceItemStandaloneCrating) contextValidateRejectionReason(ctx context.Context, formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) contextValidateRejectionReason(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "rejectionReason", "body", m.RejectionReason()); err != nil { return err @@ -612,7 +612,7 @@ func (m *MTOServiceItemStandaloneCrating) contextValidateRejectionReason(ctx con return nil } -func (m *MTOServiceItemStandaloneCrating) contextValidateServiceRequestDocuments(ctx context.Context, formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) contextValidateServiceRequestDocuments(ctx context.Context, formats strfmt.Registry) error { if err := m.ServiceRequestDocuments().ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -626,7 +626,7 @@ func (m *MTOServiceItemStandaloneCrating) contextValidateServiceRequestDocuments return nil } -func (m *MTOServiceItemStandaloneCrating) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { if swag.IsZero(m.Status()) { // not required return nil @@ -644,18 +644,18 @@ func (m *MTOServiceItemStandaloneCrating) contextValidateStatus(ctx context.Cont return nil } -func (m *MTOServiceItemStandaloneCrating) contextValidateCrate(ctx context.Context, formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) contextValidateCrate(ctx context.Context, formats strfmt.Registry) error { return nil } -func (m *MTOServiceItemStandaloneCrating) contextValidateItem(ctx context.Context, formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) contextValidateItem(ctx context.Context, formats strfmt.Registry) error { return nil } // MarshalBinary interface implementation -func (m *MTOServiceItemStandaloneCrating) MarshalBinary() ([]byte, error) { +func (m *MTOServiceItemDomesticStandaloneCrating) MarshalBinary() ([]byte, error) { if m == nil { return nil, nil } @@ -663,8 +663,8 @@ func (m *MTOServiceItemStandaloneCrating) MarshalBinary() ([]byte, error) { } // UnmarshalBinary interface implementation -func (m *MTOServiceItemStandaloneCrating) UnmarshalBinary(b []byte) error { - var res MTOServiceItemStandaloneCrating +func (m *MTOServiceItemDomesticStandaloneCrating) UnmarshalBinary(b []byte) error { + var res MTOServiceItemDomesticStandaloneCrating if err := swag.ReadJSON(b, &res); err != nil { return err } diff --git a/pkg/gen/primemessages/m_t_o_service_item_model_type.go b/pkg/gen/primemessages/m_t_o_service_item_model_type.go index 0c76ba552a8..0b93aaea357 100644 --- a/pkg/gen/primemessages/m_t_o_service_item_model_type.go +++ b/pkg/gen/primemessages/m_t_o_service_item_model_type.go @@ -21,7 +21,7 @@ import ( // - DDFSIT, DDASIT - MTOServiceItemDestSIT // - DOSHUT, DDSHUT - MTOServiceItemShuttle // - DCRT, DUCRT - MTOServiceItemDomesticCrating -// - SCRT - MTOServiceItemStandaloneCrating +// - DCRTSA - MTOServiceItemDomesticStandaloneCrating // // The documentation will then update with the supported fields. // @@ -54,8 +54,8 @@ const ( // MTOServiceItemModelTypeMTOServiceItemDomesticCrating captures enum value "MTOServiceItemDomesticCrating" MTOServiceItemModelTypeMTOServiceItemDomesticCrating MTOServiceItemModelType = "MTOServiceItemDomesticCrating" - // MTOServiceItemModelTypeMTOServiceItemStandaloneCrating captures enum value "MTOServiceItemStandaloneCrating" - MTOServiceItemModelTypeMTOServiceItemStandaloneCrating MTOServiceItemModelType = "MTOServiceItemStandaloneCrating" + // MTOServiceItemModelTypeMTOServiceItemDomesticStandaloneCrating captures enum value "MTOServiceItemDomesticStandaloneCrating" + MTOServiceItemModelTypeMTOServiceItemDomesticStandaloneCrating MTOServiceItemModelType = "MTOServiceItemDomesticStandaloneCrating" ) // for schema @@ -63,7 +63,7 @@ var mTOServiceItemModelTypeEnum []interface{} func init() { var res []MTOServiceItemModelType - if err := json.Unmarshal([]byte(`["MTOServiceItemBasic","MTOServiceItemOriginSIT","MTOServiceItemDestSIT","MTOServiceItemShuttle","MTOServiceItemDomesticCrating","MTOServiceItemStandaloneCrating"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["MTOServiceItemBasic","MTOServiceItemOriginSIT","MTOServiceItemDestSIT","MTOServiceItemShuttle","MTOServiceItemDomesticCrating","MTOServiceItemDomesticStandaloneCrating"]`), &res); err != nil { panic(err) } for _, v := range res { diff --git a/pkg/gen/primev2api/embedded_spec.go b/pkg/gen/primev2api/embedded_spec.go index 96807651872..8ad5580e8e4 100644 --- a/pkg/gen/primev2api/embedded_spec.go +++ b/pkg/gen/primev2api/embedded_spec.go @@ -1273,8 +1273,62 @@ func init() { } ] }, + "MTOServiceItemDomesticStandaloneCrating": { + "description": "Describes a standard crating service item subtype of a MTOServiceItem.", + "allOf": [ + { + "$ref": "#/definitions/MTOServiceItem" + }, + { + "type": "object", + "required": [ + "reServiceCode", + "item", + "crate", + "description" + ], + "properties": { + "crate": { + "description": "The dimensions for the crate the item will be shipped in.", + "allOf": [ + { + "$ref": "#/definitions/MTOServiceItemDimension" + } + ] + }, + "description": { + "description": "A description of the item being crated.", + "type": "string", + "example": "A motorcycle to be crated." + }, + "item": { + "description": "The dimensions of the item being crated.", + "allOf": [ + { + "$ref": "#/definitions/MTOServiceItemDimension" + } + ] + }, + "reServiceCode": { + "description": "A unique code for the service item. Indicates if the service is for crating (DCRTSA).", + "type": "string", + "enum": [ + "DCRTSA" + ] + }, + "reason": { + "description": "The customer's explanation for why an item needed to be crated or uncrated. Used by the TOO while deciding to approve or reject the service item.\n", + "type": "string", + "x-nullable": true, + "x-omitempty": false, + "example": "Storage items need to be picked up" + } + } + } + ] + }, "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 * SCRT - MTOServiceItemStandaloneCrating\n\nThe documentation will then update with the supported fields.\n", + "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 * DCRTSA - MTOServiceItemDomesticStandaloneCrating\n\nThe documentation will then update with the supported fields.\n", "type": "string", "enum": [ "MTOServiceItemBasic", @@ -1282,7 +1336,7 @@ func init() { "MTOServiceItemDestSIT", "MTOServiceItemShuttle", "MTOServiceItemDomesticCrating", - "MTOServiceItemStandaloneCrating" + "MTOServiceItemDomesticStandaloneCrating" ] }, "MTOServiceItemOriginSIT": { @@ -1399,61 +1453,6 @@ func init() { } ] }, - "MTOServiceItemStandaloneCrating": { - "description": "Describes a standard crating/uncrating service item subtype of a MTOServiceItem.", - "allOf": [ - { - "$ref": "#/definitions/MTOServiceItem" - }, - { - "type": "object", - "required": [ - "reServiceCode", - "item", - "crate", - "description" - ], - "properties": { - "crate": { - "description": "The dimensions for the crate the item will be shipped in.", - "allOf": [ - { - "$ref": "#/definitions/MTOServiceItemDimension" - } - ] - }, - "description": { - "description": "A description of the item being crated.", - "type": "string", - "example": "A motorcycle to be crated." - }, - "item": { - "description": "The dimensions of the item being crated.", - "allOf": [ - { - "$ref": "#/definitions/MTOServiceItemDimension" - } - ] - }, - "reServiceCode": { - "description": "A unique code for the service item. Indicates if the service is for crating (DCRT) or uncrating (DUCRT).", - "type": "string", - "enum": [ - "SCRT", - "SUCRT" - ] - }, - "reason": { - "description": "The contractor's explanation for why an item needed to be crated or uncrated. Used by the TOO while deciding to approve or reject the service item.\n", - "type": "string", - "x-nullable": true, - "x-omitempty": false, - "example": "Storage items need to be picked up" - } - } - } - ] - }, "MTOServiceItemStatus": { "description": "The status of a service item, indicating where it is in the TOO's approval process.", "type": "string", @@ -4811,8 +4810,62 @@ func init() { } ] }, + "MTOServiceItemDomesticStandaloneCrating": { + "description": "Describes a standard crating service item subtype of a MTOServiceItem.", + "allOf": [ + { + "$ref": "#/definitions/MTOServiceItem" + }, + { + "type": "object", + "required": [ + "reServiceCode", + "item", + "crate", + "description" + ], + "properties": { + "crate": { + "description": "The dimensions for the crate the item will be shipped in.", + "allOf": [ + { + "$ref": "#/definitions/MTOServiceItemDimension" + } + ] + }, + "description": { + "description": "A description of the item being crated.", + "type": "string", + "example": "A motorcycle to be crated." + }, + "item": { + "description": "The dimensions of the item being crated.", + "allOf": [ + { + "$ref": "#/definitions/MTOServiceItemDimension" + } + ] + }, + "reServiceCode": { + "description": "A unique code for the service item. Indicates if the service is for crating (DCRTSA).", + "type": "string", + "enum": [ + "DCRTSA" + ] + }, + "reason": { + "description": "The customer's explanation for why an item needed to be crated or uncrated. Used by the TOO while deciding to approve or reject the service item.\n", + "type": "string", + "x-nullable": true, + "x-omitempty": false, + "example": "Storage items need to be picked up" + } + } + } + ] + }, "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 * SCRT - MTOServiceItemStandaloneCrating\n\nThe documentation will then update with the supported fields.\n", + "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 * DCRTSA - MTOServiceItemDomesticStandaloneCrating\n\nThe documentation will then update with the supported fields.\n", "type": "string", "enum": [ "MTOServiceItemBasic", @@ -4820,7 +4873,7 @@ func init() { "MTOServiceItemDestSIT", "MTOServiceItemShuttle", "MTOServiceItemDomesticCrating", - "MTOServiceItemStandaloneCrating" + "MTOServiceItemDomesticStandaloneCrating" ] }, "MTOServiceItemOriginSIT": { @@ -4937,61 +4990,6 @@ func init() { } ] }, - "MTOServiceItemStandaloneCrating": { - "description": "Describes a standard crating/uncrating service item subtype of a MTOServiceItem.", - "allOf": [ - { - "$ref": "#/definitions/MTOServiceItem" - }, - { - "type": "object", - "required": [ - "reServiceCode", - "item", - "crate", - "description" - ], - "properties": { - "crate": { - "description": "The dimensions for the crate the item will be shipped in.", - "allOf": [ - { - "$ref": "#/definitions/MTOServiceItemDimension" - } - ] - }, - "description": { - "description": "A description of the item being crated.", - "type": "string", - "example": "A motorcycle to be crated." - }, - "item": { - "description": "The dimensions of the item being crated.", - "allOf": [ - { - "$ref": "#/definitions/MTOServiceItemDimension" - } - ] - }, - "reServiceCode": { - "description": "A unique code for the service item. Indicates if the service is for crating (DCRT) or uncrating (DUCRT).", - "type": "string", - "enum": [ - "SCRT", - "SUCRT" - ] - }, - "reason": { - "description": "The contractor's explanation for why an item needed to be crated or uncrated. Used by the TOO while deciding to approve or reject the service item.\n", - "type": "string", - "x-nullable": true, - "x-omitempty": false, - "example": "Storage items need to be picked up" - } - } - } - ] - }, "MTOServiceItemStatus": { "description": "The status of a service item, indicating where it is in the TOO's approval process.", "type": "string", diff --git a/pkg/gen/primev2messages/m_t_o_service_item.go b/pkg/gen/primev2messages/m_t_o_service_item.go index 3fe4e0663fb..7704b056f4e 100644 --- a/pkg/gen/primev2messages/m_t_o_service_item.go +++ b/pkg/gen/primev2messages/m_t_o_service_item.go @@ -257,20 +257,20 @@ func unmarshalMTOServiceItem(data []byte, consumer runtime.Consumer) (MTOService return nil, err } return &result, nil - case "MTOServiceItemOriginSIT": - var result MTOServiceItemOriginSIT + case "MTOServiceItemDomesticStandaloneCrating": + var result MTOServiceItemDomesticStandaloneCrating if err := consumer.Consume(buf2, &result); err != nil { return nil, err } return &result, nil - case "MTOServiceItemShuttle": - var result MTOServiceItemShuttle + case "MTOServiceItemOriginSIT": + var result MTOServiceItemOriginSIT if err := consumer.Consume(buf2, &result); err != nil { return nil, err } return &result, nil - case "MTOServiceItemStandaloneCrating": - var result MTOServiceItemStandaloneCrating + case "MTOServiceItemShuttle": + var result MTOServiceItemShuttle if err := consumer.Consume(buf2, &result); err != nil { return nil, err } diff --git a/pkg/gen/primev2messages/m_t_o_service_item_standalone_crating.go b/pkg/gen/primev2messages/m_t_o_service_item_domestic_standalone_crating.go similarity index 68% rename from pkg/gen/primev2messages/m_t_o_service_item_standalone_crating.go rename to pkg/gen/primev2messages/m_t_o_service_item_domestic_standalone_crating.go index bc3aa909bef..56bd58cb8e1 100644 --- a/pkg/gen/primev2messages/m_t_o_service_item_standalone_crating.go +++ b/pkg/gen/primev2messages/m_t_o_service_item_domestic_standalone_crating.go @@ -16,10 +16,10 @@ import ( "github.com/go-openapi/validate" ) -// MTOServiceItemStandaloneCrating Describes a standard crating/uncrating service item subtype of a MTOServiceItem. +// MTOServiceItemDomesticStandaloneCrating Describes a standard crating service item subtype of a MTOServiceItem. // -// swagger:model MTOServiceItemStandaloneCrating -type MTOServiceItemStandaloneCrating struct { +// swagger:model MTOServiceItemDomesticStandaloneCrating +type MTOServiceItemDomesticStandaloneCrating struct { eTagField string idField strfmt.UUID @@ -53,108 +53,108 @@ type MTOServiceItemStandaloneCrating struct { MTOServiceItemDimension } `json:"item"` - // A unique code for the service item. Indicates if the service is for crating (DCRT) or uncrating (DUCRT). + // A unique code for the service item. Indicates if the service is for crating (DCRTSA). // Required: true - // Enum: [SCRT SUCRT] + // Enum: [DCRTSA] ReServiceCode *string `json:"reServiceCode"` - // The contractor's explanation for why an item needed to be crated or uncrated. Used by the TOO while deciding to approve or reject the service item. + // The customer's explanation for why an item needed to be crated or uncrated. Used by the TOO while deciding to approve or reject the service item. // // Example: Storage items need to be picked up Reason *string `json:"reason"` } // ETag gets the e tag of this subtype -func (m *MTOServiceItemStandaloneCrating) ETag() string { +func (m *MTOServiceItemDomesticStandaloneCrating) ETag() string { return m.eTagField } // SetETag sets the e tag of this subtype -func (m *MTOServiceItemStandaloneCrating) SetETag(val string) { +func (m *MTOServiceItemDomesticStandaloneCrating) SetETag(val string) { m.eTagField = val } // ID gets the id of this subtype -func (m *MTOServiceItemStandaloneCrating) ID() strfmt.UUID { +func (m *MTOServiceItemDomesticStandaloneCrating) ID() strfmt.UUID { return m.idField } // SetID sets the id of this subtype -func (m *MTOServiceItemStandaloneCrating) SetID(val strfmt.UUID) { +func (m *MTOServiceItemDomesticStandaloneCrating) SetID(val strfmt.UUID) { m.idField = val } // ModelType gets the model type of this subtype -func (m *MTOServiceItemStandaloneCrating) ModelType() MTOServiceItemModelType { - return "MTOServiceItemStandaloneCrating" +func (m *MTOServiceItemDomesticStandaloneCrating) ModelType() MTOServiceItemModelType { + return "MTOServiceItemDomesticStandaloneCrating" } // SetModelType sets the model type of this subtype -func (m *MTOServiceItemStandaloneCrating) SetModelType(val MTOServiceItemModelType) { +func (m *MTOServiceItemDomesticStandaloneCrating) SetModelType(val MTOServiceItemModelType) { } // MoveTaskOrderID gets the move task order ID of this subtype -func (m *MTOServiceItemStandaloneCrating) MoveTaskOrderID() *strfmt.UUID { +func (m *MTOServiceItemDomesticStandaloneCrating) MoveTaskOrderID() *strfmt.UUID { return m.moveTaskOrderIdField } // SetMoveTaskOrderID sets the move task order ID of this subtype -func (m *MTOServiceItemStandaloneCrating) SetMoveTaskOrderID(val *strfmt.UUID) { +func (m *MTOServiceItemDomesticStandaloneCrating) SetMoveTaskOrderID(val *strfmt.UUID) { m.moveTaskOrderIdField = val } // MtoShipmentID gets the mto shipment ID of this subtype -func (m *MTOServiceItemStandaloneCrating) MtoShipmentID() strfmt.UUID { +func (m *MTOServiceItemDomesticStandaloneCrating) MtoShipmentID() strfmt.UUID { return m.mtoShipmentIdField } // SetMtoShipmentID sets the mto shipment ID of this subtype -func (m *MTOServiceItemStandaloneCrating) SetMtoShipmentID(val strfmt.UUID) { +func (m *MTOServiceItemDomesticStandaloneCrating) SetMtoShipmentID(val strfmt.UUID) { m.mtoShipmentIdField = val } // ReServiceName gets the re service name of this subtype -func (m *MTOServiceItemStandaloneCrating) ReServiceName() string { +func (m *MTOServiceItemDomesticStandaloneCrating) ReServiceName() string { return m.reServiceNameField } // SetReServiceName sets the re service name of this subtype -func (m *MTOServiceItemStandaloneCrating) SetReServiceName(val string) { +func (m *MTOServiceItemDomesticStandaloneCrating) SetReServiceName(val string) { m.reServiceNameField = val } // RejectionReason gets the rejection reason of this subtype -func (m *MTOServiceItemStandaloneCrating) RejectionReason() *string { +func (m *MTOServiceItemDomesticStandaloneCrating) RejectionReason() *string { return m.rejectionReasonField } // SetRejectionReason sets the rejection reason of this subtype -func (m *MTOServiceItemStandaloneCrating) SetRejectionReason(val *string) { +func (m *MTOServiceItemDomesticStandaloneCrating) SetRejectionReason(val *string) { m.rejectionReasonField = val } // ServiceRequestDocuments gets the service request documents of this subtype -func (m *MTOServiceItemStandaloneCrating) ServiceRequestDocuments() ServiceRequestDocuments { +func (m *MTOServiceItemDomesticStandaloneCrating) ServiceRequestDocuments() ServiceRequestDocuments { return m.serviceRequestDocumentsField } // SetServiceRequestDocuments sets the service request documents of this subtype -func (m *MTOServiceItemStandaloneCrating) SetServiceRequestDocuments(val ServiceRequestDocuments) { +func (m *MTOServiceItemDomesticStandaloneCrating) SetServiceRequestDocuments(val ServiceRequestDocuments) { m.serviceRequestDocumentsField = val } // Status gets the status of this subtype -func (m *MTOServiceItemStandaloneCrating) Status() MTOServiceItemStatus { +func (m *MTOServiceItemDomesticStandaloneCrating) Status() MTOServiceItemStatus { return m.statusField } // SetStatus sets the status of this subtype -func (m *MTOServiceItemStandaloneCrating) SetStatus(val MTOServiceItemStatus) { +func (m *MTOServiceItemDomesticStandaloneCrating) SetStatus(val MTOServiceItemStatus) { m.statusField = val } // UnmarshalJSON unmarshals this object with a polymorphic type from a JSON structure -func (m *MTOServiceItemStandaloneCrating) UnmarshalJSON(raw []byte) error { +func (m *MTOServiceItemDomesticStandaloneCrating) UnmarshalJSON(raw []byte) error { var data struct { // The dimensions for the crate the item will be shipped in. @@ -174,12 +174,12 @@ func (m *MTOServiceItemStandaloneCrating) UnmarshalJSON(raw []byte) error { MTOServiceItemDimension } `json:"item"` - // A unique code for the service item. Indicates if the service is for crating (DCRT) or uncrating (DUCRT). + // A unique code for the service item. Indicates if the service is for crating (DCRTSA). // Required: true - // Enum: [SCRT SUCRT] + // Enum: [DCRTSA] ReServiceCode *string `json:"reServiceCode"` - // The contractor's explanation for why an item needed to be crated or uncrated. Used by the TOO while deciding to approve or reject the service item. + // The customer's explanation for why an item needed to be crated or uncrated. Used by the TOO while deciding to approve or reject the service item. // // Example: Storage items need to be picked up Reason *string `json:"reason"` @@ -221,7 +221,7 @@ func (m *MTOServiceItemStandaloneCrating) UnmarshalJSON(raw []byte) error { return err } - var result MTOServiceItemStandaloneCrating + var result MTOServiceItemDomesticStandaloneCrating result.eTagField = base.ETag @@ -255,7 +255,7 @@ func (m *MTOServiceItemStandaloneCrating) UnmarshalJSON(raw []byte) error { } // MarshalJSON marshals this object with a polymorphic type to a JSON structure -func (m MTOServiceItemStandaloneCrating) MarshalJSON() ([]byte, error) { +func (m MTOServiceItemDomesticStandaloneCrating) MarshalJSON() ([]byte, error) { var b1, b2, b3 []byte var err error b1, err = json.Marshal(struct { @@ -277,12 +277,12 @@ func (m MTOServiceItemStandaloneCrating) MarshalJSON() ([]byte, error) { MTOServiceItemDimension } `json:"item"` - // A unique code for the service item. Indicates if the service is for crating (DCRT) or uncrating (DUCRT). + // A unique code for the service item. Indicates if the service is for crating (DCRTSA). // Required: true - // Enum: [SCRT SUCRT] + // Enum: [DCRTSA] ReServiceCode *string `json:"reServiceCode"` - // The contractor's explanation for why an item needed to be crated or uncrated. Used by the TOO while deciding to approve or reject the service item. + // The customer's explanation for why an item needed to be crated or uncrated. Used by the TOO while deciding to approve or reject the service item. // // Example: Storage items need to be picked up Reason *string `json:"reason"` @@ -346,8 +346,8 @@ func (m MTOServiceItemStandaloneCrating) MarshalJSON() ([]byte, error) { return swag.ConcatJSON(b1, b2, b3), nil } -// Validate validates this m t o service item standalone crating -func (m *MTOServiceItemStandaloneCrating) Validate(formats strfmt.Registry) error { +// Validate validates this m t o service item domestic standalone crating +func (m *MTOServiceItemDomesticStandaloneCrating) Validate(formats strfmt.Registry) error { var res []error if err := m.validateID(formats); err != nil { @@ -392,7 +392,7 @@ func (m *MTOServiceItemStandaloneCrating) Validate(formats strfmt.Registry) erro return nil } -func (m *MTOServiceItemStandaloneCrating) validateID(formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) validateID(formats strfmt.Registry) error { if swag.IsZero(m.ID()) { // not required return nil @@ -405,7 +405,7 @@ func (m *MTOServiceItemStandaloneCrating) validateID(formats strfmt.Registry) er return nil } -func (m *MTOServiceItemStandaloneCrating) validateMoveTaskOrderID(formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) validateMoveTaskOrderID(formats strfmt.Registry) error { if err := validate.Required("moveTaskOrderID", "body", m.MoveTaskOrderID()); err != nil { return err @@ -418,7 +418,7 @@ func (m *MTOServiceItemStandaloneCrating) validateMoveTaskOrderID(formats strfmt return nil } -func (m *MTOServiceItemStandaloneCrating) validateMtoShipmentID(formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) validateMtoShipmentID(formats strfmt.Registry) error { if swag.IsZero(m.MtoShipmentID()) { // not required return nil @@ -431,7 +431,7 @@ func (m *MTOServiceItemStandaloneCrating) validateMtoShipmentID(formats strfmt.R return nil } -func (m *MTOServiceItemStandaloneCrating) validateServiceRequestDocuments(formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) validateServiceRequestDocuments(formats strfmt.Registry) error { if swag.IsZero(m.ServiceRequestDocuments()) { // not required return nil @@ -449,7 +449,7 @@ func (m *MTOServiceItemStandaloneCrating) validateServiceRequestDocuments(format return nil } -func (m *MTOServiceItemStandaloneCrating) validateStatus(formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) validateStatus(formats strfmt.Registry) error { if swag.IsZero(m.Status()) { // not required return nil @@ -467,12 +467,12 @@ func (m *MTOServiceItemStandaloneCrating) validateStatus(formats strfmt.Registry return nil } -func (m *MTOServiceItemStandaloneCrating) validateCrate(formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) validateCrate(formats strfmt.Registry) error { return nil } -func (m *MTOServiceItemStandaloneCrating) validateDescription(formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) validateDescription(formats strfmt.Registry) error { if err := validate.Required("description", "body", m.Description); err != nil { return err @@ -481,32 +481,32 @@ func (m *MTOServiceItemStandaloneCrating) validateDescription(formats strfmt.Reg return nil } -func (m *MTOServiceItemStandaloneCrating) validateItem(formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) validateItem(formats strfmt.Registry) error { return nil } -var mTOServiceItemStandaloneCratingTypeReServiceCodePropEnum []interface{} +var mTOServiceItemDomesticStandaloneCratingTypeReServiceCodePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["SCRT","SUCRT"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["DCRTSA"]`), &res); err != nil { panic(err) } for _, v := range res { - mTOServiceItemStandaloneCratingTypeReServiceCodePropEnum = append(mTOServiceItemStandaloneCratingTypeReServiceCodePropEnum, v) + mTOServiceItemDomesticStandaloneCratingTypeReServiceCodePropEnum = append(mTOServiceItemDomesticStandaloneCratingTypeReServiceCodePropEnum, v) } } // property enum -func (m *MTOServiceItemStandaloneCrating) validateReServiceCodeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, mTOServiceItemStandaloneCratingTypeReServiceCodePropEnum, true); err != nil { +func (m *MTOServiceItemDomesticStandaloneCrating) validateReServiceCodeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, mTOServiceItemDomesticStandaloneCratingTypeReServiceCodePropEnum, true); err != nil { return err } return nil } -func (m *MTOServiceItemStandaloneCrating) validateReServiceCode(formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) validateReServiceCode(formats strfmt.Registry) error { if err := validate.Required("reServiceCode", "body", m.ReServiceCode); err != nil { return err @@ -520,8 +520,8 @@ func (m *MTOServiceItemStandaloneCrating) validateReServiceCode(formats strfmt.R return nil } -// ContextValidate validate this m t o service item standalone crating based on the context it is used -func (m *MTOServiceItemStandaloneCrating) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validate this m t o service item domestic standalone crating based on the context it is used +func (m *MTOServiceItemDomesticStandaloneCrating) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error if err := m.contextValidateETag(ctx, formats); err != nil { @@ -562,7 +562,7 @@ func (m *MTOServiceItemStandaloneCrating) ContextValidate(ctx context.Context, f return nil } -func (m *MTOServiceItemStandaloneCrating) contextValidateETag(ctx context.Context, formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) contextValidateETag(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "eTag", "body", string(m.ETag())); err != nil { return err @@ -571,7 +571,7 @@ func (m *MTOServiceItemStandaloneCrating) contextValidateETag(ctx context.Contex return nil } -func (m *MTOServiceItemStandaloneCrating) contextValidateID(ctx context.Context, formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) contextValidateID(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "id", "body", strfmt.UUID(m.ID())); err != nil { return err @@ -580,7 +580,7 @@ func (m *MTOServiceItemStandaloneCrating) contextValidateID(ctx context.Context, return nil } -func (m *MTOServiceItemStandaloneCrating) contextValidateModelType(ctx context.Context, formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) contextValidateModelType(ctx context.Context, formats strfmt.Registry) error { if err := m.ModelType().ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -594,7 +594,7 @@ func (m *MTOServiceItemStandaloneCrating) contextValidateModelType(ctx context.C return nil } -func (m *MTOServiceItemStandaloneCrating) contextValidateReServiceName(ctx context.Context, formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) contextValidateReServiceName(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "reServiceName", "body", string(m.ReServiceName())); err != nil { return err @@ -603,7 +603,7 @@ func (m *MTOServiceItemStandaloneCrating) contextValidateReServiceName(ctx conte return nil } -func (m *MTOServiceItemStandaloneCrating) contextValidateRejectionReason(ctx context.Context, formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) contextValidateRejectionReason(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "rejectionReason", "body", m.RejectionReason()); err != nil { return err @@ -612,7 +612,7 @@ func (m *MTOServiceItemStandaloneCrating) contextValidateRejectionReason(ctx con return nil } -func (m *MTOServiceItemStandaloneCrating) contextValidateServiceRequestDocuments(ctx context.Context, formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) contextValidateServiceRequestDocuments(ctx context.Context, formats strfmt.Registry) error { if err := m.ServiceRequestDocuments().ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -626,7 +626,7 @@ func (m *MTOServiceItemStandaloneCrating) contextValidateServiceRequestDocuments return nil } -func (m *MTOServiceItemStandaloneCrating) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { if swag.IsZero(m.Status()) { // not required return nil @@ -644,18 +644,18 @@ func (m *MTOServiceItemStandaloneCrating) contextValidateStatus(ctx context.Cont return nil } -func (m *MTOServiceItemStandaloneCrating) contextValidateCrate(ctx context.Context, formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) contextValidateCrate(ctx context.Context, formats strfmt.Registry) error { return nil } -func (m *MTOServiceItemStandaloneCrating) contextValidateItem(ctx context.Context, formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) contextValidateItem(ctx context.Context, formats strfmt.Registry) error { return nil } // MarshalBinary interface implementation -func (m *MTOServiceItemStandaloneCrating) MarshalBinary() ([]byte, error) { +func (m *MTOServiceItemDomesticStandaloneCrating) MarshalBinary() ([]byte, error) { if m == nil { return nil, nil } @@ -663,8 +663,8 @@ func (m *MTOServiceItemStandaloneCrating) MarshalBinary() ([]byte, error) { } // UnmarshalBinary interface implementation -func (m *MTOServiceItemStandaloneCrating) UnmarshalBinary(b []byte) error { - var res MTOServiceItemStandaloneCrating +func (m *MTOServiceItemDomesticStandaloneCrating) UnmarshalBinary(b []byte) error { + var res MTOServiceItemDomesticStandaloneCrating if err := swag.ReadJSON(b, &res); err != nil { return err } diff --git a/pkg/gen/primev2messages/m_t_o_service_item_model_type.go b/pkg/gen/primev2messages/m_t_o_service_item_model_type.go index 176397c8899..de5dcdfbd70 100644 --- a/pkg/gen/primev2messages/m_t_o_service_item_model_type.go +++ b/pkg/gen/primev2messages/m_t_o_service_item_model_type.go @@ -21,7 +21,7 @@ import ( // - DDFSIT, DDASIT - MTOServiceItemDestSIT // - DOSHUT, DDSHUT - MTOServiceItemShuttle // - DCRT, DUCRT - MTOServiceItemDomesticCrating -// - SCRT - MTOServiceItemStandaloneCrating +// - DCRTSA - MTOServiceItemDomesticStandaloneCrating // // The documentation will then update with the supported fields. // @@ -54,8 +54,8 @@ const ( // MTOServiceItemModelTypeMTOServiceItemDomesticCrating captures enum value "MTOServiceItemDomesticCrating" MTOServiceItemModelTypeMTOServiceItemDomesticCrating MTOServiceItemModelType = "MTOServiceItemDomesticCrating" - // MTOServiceItemModelTypeMTOServiceItemStandaloneCrating captures enum value "MTOServiceItemStandaloneCrating" - MTOServiceItemModelTypeMTOServiceItemStandaloneCrating MTOServiceItemModelType = "MTOServiceItemStandaloneCrating" + // MTOServiceItemModelTypeMTOServiceItemDomesticStandaloneCrating captures enum value "MTOServiceItemDomesticStandaloneCrating" + MTOServiceItemModelTypeMTOServiceItemDomesticStandaloneCrating MTOServiceItemModelType = "MTOServiceItemDomesticStandaloneCrating" ) // for schema @@ -63,7 +63,7 @@ var mTOServiceItemModelTypeEnum []interface{} func init() { var res []MTOServiceItemModelType - if err := json.Unmarshal([]byte(`["MTOServiceItemBasic","MTOServiceItemOriginSIT","MTOServiceItemDestSIT","MTOServiceItemShuttle","MTOServiceItemDomesticCrating","MTOServiceItemStandaloneCrating"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["MTOServiceItemBasic","MTOServiceItemOriginSIT","MTOServiceItemDestSIT","MTOServiceItemShuttle","MTOServiceItemDomesticCrating","MTOServiceItemDomesticStandaloneCrating"]`), &res); err != nil { panic(err) } for _, v := range res { diff --git a/pkg/gen/primev3api/embedded_spec.go b/pkg/gen/primev3api/embedded_spec.go index 8370aed98c2..e66d9fb23ca 100644 --- a/pkg/gen/primev3api/embedded_spec.go +++ b/pkg/gen/primev3api/embedded_spec.go @@ -1276,8 +1276,62 @@ func init() { } ] }, + "MTOServiceItemDomesticStandaloneCrating": { + "description": "Describes a standard crating service item subtype of a MTOServiceItem.", + "allOf": [ + { + "$ref": "#/definitions/MTOServiceItem" + }, + { + "type": "object", + "required": [ + "reServiceCode", + "item", + "crate", + "description" + ], + "properties": { + "crate": { + "description": "The dimensions for the crate the item will be shipped in.", + "allOf": [ + { + "$ref": "#/definitions/MTOServiceItemDimension" + } + ] + }, + "description": { + "description": "A description of the item being crated.", + "type": "string", + "example": "A motorcycle to be crated." + }, + "item": { + "description": "The dimensions of the item being crated.", + "allOf": [ + { + "$ref": "#/definitions/MTOServiceItemDimension" + } + ] + }, + "reServiceCode": { + "description": "A unique code for the service item. Indicates if the service is for crating (DCRTSA).", + "type": "string", + "enum": [ + "DCRTSA" + ] + }, + "reason": { + "description": "The customer's explanation for why an item needed to be crated or uncrated. Used by the TOO while deciding to approve or reject the service item.\n", + "type": "string", + "x-nullable": true, + "x-omitempty": false, + "example": "Storage items need to be picked up" + } + } + } + ] + }, "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 * SCRT - MTOServiceItemStandaloneCrating\n\nThe documentation will then update with the supported fields.\n", + "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 * DCRTSA - MTOServiceItemDomesticStandaloneCrating\n\nThe documentation will then update with the supported fields.\n", "type": "string", "enum": [ "MTOServiceItemBasic", @@ -1285,7 +1339,7 @@ func init() { "MTOServiceItemDestSIT", "MTOServiceItemShuttle", "MTOServiceItemDomesticCrating", - "MTOServiceItemStandaloneCrating" + "MTOServiceItemDomesticStandaloneCrating" ] }, "MTOServiceItemOriginSIT": { @@ -1402,61 +1456,6 @@ func init() { } ] }, - "MTOServiceItemStandaloneCrating": { - "description": "Describes a standard crating/uncrating service item subtype of a MTOServiceItem.", - "allOf": [ - { - "$ref": "#/definitions/MTOServiceItem" - }, - { - "type": "object", - "required": [ - "reServiceCode", - "item", - "crate", - "description" - ], - "properties": { - "crate": { - "description": "The dimensions for the crate the item will be shipped in.", - "allOf": [ - { - "$ref": "#/definitions/MTOServiceItemDimension" - } - ] - }, - "description": { - "description": "A description of the item being crated.", - "type": "string", - "example": "A motorcycle to be crated." - }, - "item": { - "description": "The dimensions of the item being crated.", - "allOf": [ - { - "$ref": "#/definitions/MTOServiceItemDimension" - } - ] - }, - "reServiceCode": { - "description": "A unique code for the service item. Indicates if the service is for crating (DCRT) or uncrating (DUCRT).", - "type": "string", - "enum": [ - "SCRT", - "SUCRT" - ] - }, - "reason": { - "description": "The contractor's explanation for why an item needed to be crated or uncrated. Used by the TOO while deciding to approve or reject the service item.\n", - "type": "string", - "x-nullable": true, - "x-omitempty": false, - "example": "Storage items need to be picked up" - } - } - } - ] - }, "MTOServiceItemStatus": { "description": "The status of a service item, indicating where it is in the TOO's approval process.", "type": "string", @@ -4793,8 +4792,62 @@ func init() { } ] }, + "MTOServiceItemDomesticStandaloneCrating": { + "description": "Describes a standard crating service item subtype of a MTOServiceItem.", + "allOf": [ + { + "$ref": "#/definitions/MTOServiceItem" + }, + { + "type": "object", + "required": [ + "reServiceCode", + "item", + "crate", + "description" + ], + "properties": { + "crate": { + "description": "The dimensions for the crate the item will be shipped in.", + "allOf": [ + { + "$ref": "#/definitions/MTOServiceItemDimension" + } + ] + }, + "description": { + "description": "A description of the item being crated.", + "type": "string", + "example": "A motorcycle to be crated." + }, + "item": { + "description": "The dimensions of the item being crated.", + "allOf": [ + { + "$ref": "#/definitions/MTOServiceItemDimension" + } + ] + }, + "reServiceCode": { + "description": "A unique code for the service item. Indicates if the service is for crating (DCRTSA).", + "type": "string", + "enum": [ + "DCRTSA" + ] + }, + "reason": { + "description": "The customer's explanation for why an item needed to be crated or uncrated. Used by the TOO while deciding to approve or reject the service item.\n", + "type": "string", + "x-nullable": true, + "x-omitempty": false, + "example": "Storage items need to be picked up" + } + } + } + ] + }, "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 * SCRT - MTOServiceItemStandaloneCrating\n\nThe documentation will then update with the supported fields.\n", + "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 * DCRTSA - MTOServiceItemDomesticStandaloneCrating\n\nThe documentation will then update with the supported fields.\n", "type": "string", "enum": [ "MTOServiceItemBasic", @@ -4802,7 +4855,7 @@ func init() { "MTOServiceItemDestSIT", "MTOServiceItemShuttle", "MTOServiceItemDomesticCrating", - "MTOServiceItemStandaloneCrating" + "MTOServiceItemDomesticStandaloneCrating" ] }, "MTOServiceItemOriginSIT": { @@ -4919,61 +4972,6 @@ func init() { } ] }, - "MTOServiceItemStandaloneCrating": { - "description": "Describes a standard crating/uncrating service item subtype of a MTOServiceItem.", - "allOf": [ - { - "$ref": "#/definitions/MTOServiceItem" - }, - { - "type": "object", - "required": [ - "reServiceCode", - "item", - "crate", - "description" - ], - "properties": { - "crate": { - "description": "The dimensions for the crate the item will be shipped in.", - "allOf": [ - { - "$ref": "#/definitions/MTOServiceItemDimension" - } - ] - }, - "description": { - "description": "A description of the item being crated.", - "type": "string", - "example": "A motorcycle to be crated." - }, - "item": { - "description": "The dimensions of the item being crated.", - "allOf": [ - { - "$ref": "#/definitions/MTOServiceItemDimension" - } - ] - }, - "reServiceCode": { - "description": "A unique code for the service item. Indicates if the service is for crating (DCRT) or uncrating (DUCRT).", - "type": "string", - "enum": [ - "SCRT", - "SUCRT" - ] - }, - "reason": { - "description": "The contractor's explanation for why an item needed to be crated or uncrated. Used by the TOO while deciding to approve or reject the service item.\n", - "type": "string", - "x-nullable": true, - "x-omitempty": false, - "example": "Storage items need to be picked up" - } - } - } - ] - }, "MTOServiceItemStatus": { "description": "The status of a service item, indicating where it is in the TOO's approval process.", "type": "string", diff --git a/pkg/gen/primev3messages/m_t_o_service_item.go b/pkg/gen/primev3messages/m_t_o_service_item.go index f70a9dfd7df..fcf469b2312 100644 --- a/pkg/gen/primev3messages/m_t_o_service_item.go +++ b/pkg/gen/primev3messages/m_t_o_service_item.go @@ -257,20 +257,20 @@ func unmarshalMTOServiceItem(data []byte, consumer runtime.Consumer) (MTOService return nil, err } return &result, nil - case "MTOServiceItemOriginSIT": - var result MTOServiceItemOriginSIT + case "MTOServiceItemDomesticStandaloneCrating": + var result MTOServiceItemDomesticStandaloneCrating if err := consumer.Consume(buf2, &result); err != nil { return nil, err } return &result, nil - case "MTOServiceItemShuttle": - var result MTOServiceItemShuttle + case "MTOServiceItemOriginSIT": + var result MTOServiceItemOriginSIT if err := consumer.Consume(buf2, &result); err != nil { return nil, err } return &result, nil - case "MTOServiceItemStandaloneCrating": - var result MTOServiceItemStandaloneCrating + case "MTOServiceItemShuttle": + var result MTOServiceItemShuttle if err := consumer.Consume(buf2, &result); err != nil { return nil, err } diff --git a/pkg/gen/primev3messages/m_t_o_service_item_standalone_crating.go b/pkg/gen/primev3messages/m_t_o_service_item_domestic_standalone_crating.go similarity index 68% rename from pkg/gen/primev3messages/m_t_o_service_item_standalone_crating.go rename to pkg/gen/primev3messages/m_t_o_service_item_domestic_standalone_crating.go index 0fdbe4163b3..1cc74715bf9 100644 --- a/pkg/gen/primev3messages/m_t_o_service_item_standalone_crating.go +++ b/pkg/gen/primev3messages/m_t_o_service_item_domestic_standalone_crating.go @@ -16,10 +16,10 @@ import ( "github.com/go-openapi/validate" ) -// MTOServiceItemStandaloneCrating Describes a standard crating/uncrating service item subtype of a MTOServiceItem. +// MTOServiceItemDomesticStandaloneCrating Describes a standard crating service item subtype of a MTOServiceItem. // -// swagger:model MTOServiceItemStandaloneCrating -type MTOServiceItemStandaloneCrating struct { +// swagger:model MTOServiceItemDomesticStandaloneCrating +type MTOServiceItemDomesticStandaloneCrating struct { eTagField string idField strfmt.UUID @@ -53,108 +53,108 @@ type MTOServiceItemStandaloneCrating struct { MTOServiceItemDimension } `json:"item"` - // A unique code for the service item. Indicates if the service is for crating (DCRT) or uncrating (DUCRT). + // A unique code for the service item. Indicates if the service is for crating (DCRTSA). // Required: true - // Enum: [SCRT SUCRT] + // Enum: [DCRTSA] ReServiceCode *string `json:"reServiceCode"` - // The contractor's explanation for why an item needed to be crated or uncrated. Used by the TOO while deciding to approve or reject the service item. + // The customer's explanation for why an item needed to be crated or uncrated. Used by the TOO while deciding to approve or reject the service item. // // Example: Storage items need to be picked up Reason *string `json:"reason"` } // ETag gets the e tag of this subtype -func (m *MTOServiceItemStandaloneCrating) ETag() string { +func (m *MTOServiceItemDomesticStandaloneCrating) ETag() string { return m.eTagField } // SetETag sets the e tag of this subtype -func (m *MTOServiceItemStandaloneCrating) SetETag(val string) { +func (m *MTOServiceItemDomesticStandaloneCrating) SetETag(val string) { m.eTagField = val } // ID gets the id of this subtype -func (m *MTOServiceItemStandaloneCrating) ID() strfmt.UUID { +func (m *MTOServiceItemDomesticStandaloneCrating) ID() strfmt.UUID { return m.idField } // SetID sets the id of this subtype -func (m *MTOServiceItemStandaloneCrating) SetID(val strfmt.UUID) { +func (m *MTOServiceItemDomesticStandaloneCrating) SetID(val strfmt.UUID) { m.idField = val } // ModelType gets the model type of this subtype -func (m *MTOServiceItemStandaloneCrating) ModelType() MTOServiceItemModelType { - return "MTOServiceItemStandaloneCrating" +func (m *MTOServiceItemDomesticStandaloneCrating) ModelType() MTOServiceItemModelType { + return "MTOServiceItemDomesticStandaloneCrating" } // SetModelType sets the model type of this subtype -func (m *MTOServiceItemStandaloneCrating) SetModelType(val MTOServiceItemModelType) { +func (m *MTOServiceItemDomesticStandaloneCrating) SetModelType(val MTOServiceItemModelType) { } // MoveTaskOrderID gets the move task order ID of this subtype -func (m *MTOServiceItemStandaloneCrating) MoveTaskOrderID() *strfmt.UUID { +func (m *MTOServiceItemDomesticStandaloneCrating) MoveTaskOrderID() *strfmt.UUID { return m.moveTaskOrderIdField } // SetMoveTaskOrderID sets the move task order ID of this subtype -func (m *MTOServiceItemStandaloneCrating) SetMoveTaskOrderID(val *strfmt.UUID) { +func (m *MTOServiceItemDomesticStandaloneCrating) SetMoveTaskOrderID(val *strfmt.UUID) { m.moveTaskOrderIdField = val } // MtoShipmentID gets the mto shipment ID of this subtype -func (m *MTOServiceItemStandaloneCrating) MtoShipmentID() strfmt.UUID { +func (m *MTOServiceItemDomesticStandaloneCrating) MtoShipmentID() strfmt.UUID { return m.mtoShipmentIdField } // SetMtoShipmentID sets the mto shipment ID of this subtype -func (m *MTOServiceItemStandaloneCrating) SetMtoShipmentID(val strfmt.UUID) { +func (m *MTOServiceItemDomesticStandaloneCrating) SetMtoShipmentID(val strfmt.UUID) { m.mtoShipmentIdField = val } // ReServiceName gets the re service name of this subtype -func (m *MTOServiceItemStandaloneCrating) ReServiceName() string { +func (m *MTOServiceItemDomesticStandaloneCrating) ReServiceName() string { return m.reServiceNameField } // SetReServiceName sets the re service name of this subtype -func (m *MTOServiceItemStandaloneCrating) SetReServiceName(val string) { +func (m *MTOServiceItemDomesticStandaloneCrating) SetReServiceName(val string) { m.reServiceNameField = val } // RejectionReason gets the rejection reason of this subtype -func (m *MTOServiceItemStandaloneCrating) RejectionReason() *string { +func (m *MTOServiceItemDomesticStandaloneCrating) RejectionReason() *string { return m.rejectionReasonField } // SetRejectionReason sets the rejection reason of this subtype -func (m *MTOServiceItemStandaloneCrating) SetRejectionReason(val *string) { +func (m *MTOServiceItemDomesticStandaloneCrating) SetRejectionReason(val *string) { m.rejectionReasonField = val } // ServiceRequestDocuments gets the service request documents of this subtype -func (m *MTOServiceItemStandaloneCrating) ServiceRequestDocuments() ServiceRequestDocuments { +func (m *MTOServiceItemDomesticStandaloneCrating) ServiceRequestDocuments() ServiceRequestDocuments { return m.serviceRequestDocumentsField } // SetServiceRequestDocuments sets the service request documents of this subtype -func (m *MTOServiceItemStandaloneCrating) SetServiceRequestDocuments(val ServiceRequestDocuments) { +func (m *MTOServiceItemDomesticStandaloneCrating) SetServiceRequestDocuments(val ServiceRequestDocuments) { m.serviceRequestDocumentsField = val } // Status gets the status of this subtype -func (m *MTOServiceItemStandaloneCrating) Status() MTOServiceItemStatus { +func (m *MTOServiceItemDomesticStandaloneCrating) Status() MTOServiceItemStatus { return m.statusField } // SetStatus sets the status of this subtype -func (m *MTOServiceItemStandaloneCrating) SetStatus(val MTOServiceItemStatus) { +func (m *MTOServiceItemDomesticStandaloneCrating) SetStatus(val MTOServiceItemStatus) { m.statusField = val } // UnmarshalJSON unmarshals this object with a polymorphic type from a JSON structure -func (m *MTOServiceItemStandaloneCrating) UnmarshalJSON(raw []byte) error { +func (m *MTOServiceItemDomesticStandaloneCrating) UnmarshalJSON(raw []byte) error { var data struct { // The dimensions for the crate the item will be shipped in. @@ -174,12 +174,12 @@ func (m *MTOServiceItemStandaloneCrating) UnmarshalJSON(raw []byte) error { MTOServiceItemDimension } `json:"item"` - // A unique code for the service item. Indicates if the service is for crating (DCRT) or uncrating (DUCRT). + // A unique code for the service item. Indicates if the service is for crating (DCRTSA). // Required: true - // Enum: [SCRT SUCRT] + // Enum: [DCRTSA] ReServiceCode *string `json:"reServiceCode"` - // The contractor's explanation for why an item needed to be crated or uncrated. Used by the TOO while deciding to approve or reject the service item. + // The customer's explanation for why an item needed to be crated or uncrated. Used by the TOO while deciding to approve or reject the service item. // // Example: Storage items need to be picked up Reason *string `json:"reason"` @@ -221,7 +221,7 @@ func (m *MTOServiceItemStandaloneCrating) UnmarshalJSON(raw []byte) error { return err } - var result MTOServiceItemStandaloneCrating + var result MTOServiceItemDomesticStandaloneCrating result.eTagField = base.ETag @@ -255,7 +255,7 @@ func (m *MTOServiceItemStandaloneCrating) UnmarshalJSON(raw []byte) error { } // MarshalJSON marshals this object with a polymorphic type to a JSON structure -func (m MTOServiceItemStandaloneCrating) MarshalJSON() ([]byte, error) { +func (m MTOServiceItemDomesticStandaloneCrating) MarshalJSON() ([]byte, error) { var b1, b2, b3 []byte var err error b1, err = json.Marshal(struct { @@ -277,12 +277,12 @@ func (m MTOServiceItemStandaloneCrating) MarshalJSON() ([]byte, error) { MTOServiceItemDimension } `json:"item"` - // A unique code for the service item. Indicates if the service is for crating (DCRT) or uncrating (DUCRT). + // A unique code for the service item. Indicates if the service is for crating (DCRTSA). // Required: true - // Enum: [SCRT SUCRT] + // Enum: [DCRTSA] ReServiceCode *string `json:"reServiceCode"` - // The contractor's explanation for why an item needed to be crated or uncrated. Used by the TOO while deciding to approve or reject the service item. + // The customer's explanation for why an item needed to be crated or uncrated. Used by the TOO while deciding to approve or reject the service item. // // Example: Storage items need to be picked up Reason *string `json:"reason"` @@ -346,8 +346,8 @@ func (m MTOServiceItemStandaloneCrating) MarshalJSON() ([]byte, error) { return swag.ConcatJSON(b1, b2, b3), nil } -// Validate validates this m t o service item standalone crating -func (m *MTOServiceItemStandaloneCrating) Validate(formats strfmt.Registry) error { +// Validate validates this m t o service item domestic standalone crating +func (m *MTOServiceItemDomesticStandaloneCrating) Validate(formats strfmt.Registry) error { var res []error if err := m.validateID(formats); err != nil { @@ -392,7 +392,7 @@ func (m *MTOServiceItemStandaloneCrating) Validate(formats strfmt.Registry) erro return nil } -func (m *MTOServiceItemStandaloneCrating) validateID(formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) validateID(formats strfmt.Registry) error { if swag.IsZero(m.ID()) { // not required return nil @@ -405,7 +405,7 @@ func (m *MTOServiceItemStandaloneCrating) validateID(formats strfmt.Registry) er return nil } -func (m *MTOServiceItemStandaloneCrating) validateMoveTaskOrderID(formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) validateMoveTaskOrderID(formats strfmt.Registry) error { if err := validate.Required("moveTaskOrderID", "body", m.MoveTaskOrderID()); err != nil { return err @@ -418,7 +418,7 @@ func (m *MTOServiceItemStandaloneCrating) validateMoveTaskOrderID(formats strfmt return nil } -func (m *MTOServiceItemStandaloneCrating) validateMtoShipmentID(formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) validateMtoShipmentID(formats strfmt.Registry) error { if swag.IsZero(m.MtoShipmentID()) { // not required return nil @@ -431,7 +431,7 @@ func (m *MTOServiceItemStandaloneCrating) validateMtoShipmentID(formats strfmt.R return nil } -func (m *MTOServiceItemStandaloneCrating) validateServiceRequestDocuments(formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) validateServiceRequestDocuments(formats strfmt.Registry) error { if swag.IsZero(m.ServiceRequestDocuments()) { // not required return nil @@ -449,7 +449,7 @@ func (m *MTOServiceItemStandaloneCrating) validateServiceRequestDocuments(format return nil } -func (m *MTOServiceItemStandaloneCrating) validateStatus(formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) validateStatus(formats strfmt.Registry) error { if swag.IsZero(m.Status()) { // not required return nil @@ -467,12 +467,12 @@ func (m *MTOServiceItemStandaloneCrating) validateStatus(formats strfmt.Registry return nil } -func (m *MTOServiceItemStandaloneCrating) validateCrate(formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) validateCrate(formats strfmt.Registry) error { return nil } -func (m *MTOServiceItemStandaloneCrating) validateDescription(formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) validateDescription(formats strfmt.Registry) error { if err := validate.Required("description", "body", m.Description); err != nil { return err @@ -481,32 +481,32 @@ func (m *MTOServiceItemStandaloneCrating) validateDescription(formats strfmt.Reg return nil } -func (m *MTOServiceItemStandaloneCrating) validateItem(formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) validateItem(formats strfmt.Registry) error { return nil } -var mTOServiceItemStandaloneCratingTypeReServiceCodePropEnum []interface{} +var mTOServiceItemDomesticStandaloneCratingTypeReServiceCodePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["SCRT","SUCRT"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["DCRTSA"]`), &res); err != nil { panic(err) } for _, v := range res { - mTOServiceItemStandaloneCratingTypeReServiceCodePropEnum = append(mTOServiceItemStandaloneCratingTypeReServiceCodePropEnum, v) + mTOServiceItemDomesticStandaloneCratingTypeReServiceCodePropEnum = append(mTOServiceItemDomesticStandaloneCratingTypeReServiceCodePropEnum, v) } } // property enum -func (m *MTOServiceItemStandaloneCrating) validateReServiceCodeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, mTOServiceItemStandaloneCratingTypeReServiceCodePropEnum, true); err != nil { +func (m *MTOServiceItemDomesticStandaloneCrating) validateReServiceCodeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, mTOServiceItemDomesticStandaloneCratingTypeReServiceCodePropEnum, true); err != nil { return err } return nil } -func (m *MTOServiceItemStandaloneCrating) validateReServiceCode(formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) validateReServiceCode(formats strfmt.Registry) error { if err := validate.Required("reServiceCode", "body", m.ReServiceCode); err != nil { return err @@ -520,8 +520,8 @@ func (m *MTOServiceItemStandaloneCrating) validateReServiceCode(formats strfmt.R return nil } -// ContextValidate validate this m t o service item standalone crating based on the context it is used -func (m *MTOServiceItemStandaloneCrating) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validate this m t o service item domestic standalone crating based on the context it is used +func (m *MTOServiceItemDomesticStandaloneCrating) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error if err := m.contextValidateETag(ctx, formats); err != nil { @@ -562,7 +562,7 @@ func (m *MTOServiceItemStandaloneCrating) ContextValidate(ctx context.Context, f return nil } -func (m *MTOServiceItemStandaloneCrating) contextValidateETag(ctx context.Context, formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) contextValidateETag(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "eTag", "body", string(m.ETag())); err != nil { return err @@ -571,7 +571,7 @@ func (m *MTOServiceItemStandaloneCrating) contextValidateETag(ctx context.Contex return nil } -func (m *MTOServiceItemStandaloneCrating) contextValidateID(ctx context.Context, formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) contextValidateID(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "id", "body", strfmt.UUID(m.ID())); err != nil { return err @@ -580,7 +580,7 @@ func (m *MTOServiceItemStandaloneCrating) contextValidateID(ctx context.Context, return nil } -func (m *MTOServiceItemStandaloneCrating) contextValidateModelType(ctx context.Context, formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) contextValidateModelType(ctx context.Context, formats strfmt.Registry) error { if err := m.ModelType().ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -594,7 +594,7 @@ func (m *MTOServiceItemStandaloneCrating) contextValidateModelType(ctx context.C return nil } -func (m *MTOServiceItemStandaloneCrating) contextValidateReServiceName(ctx context.Context, formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) contextValidateReServiceName(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "reServiceName", "body", string(m.ReServiceName())); err != nil { return err @@ -603,7 +603,7 @@ func (m *MTOServiceItemStandaloneCrating) contextValidateReServiceName(ctx conte return nil } -func (m *MTOServiceItemStandaloneCrating) contextValidateRejectionReason(ctx context.Context, formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) contextValidateRejectionReason(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "rejectionReason", "body", m.RejectionReason()); err != nil { return err @@ -612,7 +612,7 @@ func (m *MTOServiceItemStandaloneCrating) contextValidateRejectionReason(ctx con return nil } -func (m *MTOServiceItemStandaloneCrating) contextValidateServiceRequestDocuments(ctx context.Context, formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) contextValidateServiceRequestDocuments(ctx context.Context, formats strfmt.Registry) error { if err := m.ServiceRequestDocuments().ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -626,7 +626,7 @@ func (m *MTOServiceItemStandaloneCrating) contextValidateServiceRequestDocuments return nil } -func (m *MTOServiceItemStandaloneCrating) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { if swag.IsZero(m.Status()) { // not required return nil @@ -644,18 +644,18 @@ func (m *MTOServiceItemStandaloneCrating) contextValidateStatus(ctx context.Cont return nil } -func (m *MTOServiceItemStandaloneCrating) contextValidateCrate(ctx context.Context, formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) contextValidateCrate(ctx context.Context, formats strfmt.Registry) error { return nil } -func (m *MTOServiceItemStandaloneCrating) contextValidateItem(ctx context.Context, formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) contextValidateItem(ctx context.Context, formats strfmt.Registry) error { return nil } // MarshalBinary interface implementation -func (m *MTOServiceItemStandaloneCrating) MarshalBinary() ([]byte, error) { +func (m *MTOServiceItemDomesticStandaloneCrating) MarshalBinary() ([]byte, error) { if m == nil { return nil, nil } @@ -663,8 +663,8 @@ func (m *MTOServiceItemStandaloneCrating) MarshalBinary() ([]byte, error) { } // UnmarshalBinary interface implementation -func (m *MTOServiceItemStandaloneCrating) UnmarshalBinary(b []byte) error { - var res MTOServiceItemStandaloneCrating +func (m *MTOServiceItemDomesticStandaloneCrating) UnmarshalBinary(b []byte) error { + var res MTOServiceItemDomesticStandaloneCrating if err := swag.ReadJSON(b, &res); err != nil { return err } diff --git a/pkg/gen/primev3messages/m_t_o_service_item_model_type.go b/pkg/gen/primev3messages/m_t_o_service_item_model_type.go index bea0f591fe1..d3b4d75abe3 100644 --- a/pkg/gen/primev3messages/m_t_o_service_item_model_type.go +++ b/pkg/gen/primev3messages/m_t_o_service_item_model_type.go @@ -21,7 +21,7 @@ import ( // - DDFSIT, DDASIT - MTOServiceItemDestSIT // - DOSHUT, DDSHUT - MTOServiceItemShuttle // - DCRT, DUCRT - MTOServiceItemDomesticCrating -// - SCRT - MTOServiceItemStandaloneCrating +// - DCRTSA - MTOServiceItemDomesticStandaloneCrating // // The documentation will then update with the supported fields. // @@ -54,8 +54,8 @@ const ( // MTOServiceItemModelTypeMTOServiceItemDomesticCrating captures enum value "MTOServiceItemDomesticCrating" MTOServiceItemModelTypeMTOServiceItemDomesticCrating MTOServiceItemModelType = "MTOServiceItemDomesticCrating" - // MTOServiceItemModelTypeMTOServiceItemStandaloneCrating captures enum value "MTOServiceItemStandaloneCrating" - MTOServiceItemModelTypeMTOServiceItemStandaloneCrating MTOServiceItemModelType = "MTOServiceItemStandaloneCrating" + // MTOServiceItemModelTypeMTOServiceItemDomesticStandaloneCrating captures enum value "MTOServiceItemDomesticStandaloneCrating" + MTOServiceItemModelTypeMTOServiceItemDomesticStandaloneCrating MTOServiceItemModelType = "MTOServiceItemDomesticStandaloneCrating" ) // for schema @@ -63,7 +63,7 @@ var mTOServiceItemModelTypeEnum []interface{} func init() { var res []MTOServiceItemModelType - if err := json.Unmarshal([]byte(`["MTOServiceItemBasic","MTOServiceItemOriginSIT","MTOServiceItemDestSIT","MTOServiceItemShuttle","MTOServiceItemDomesticCrating","MTOServiceItemStandaloneCrating"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["MTOServiceItemBasic","MTOServiceItemOriginSIT","MTOServiceItemDestSIT","MTOServiceItemShuttle","MTOServiceItemDomesticCrating","MTOServiceItemDomesticStandaloneCrating"]`), &res); err != nil { panic(err) } for _, v := range res { diff --git a/pkg/gen/supportapi/embedded_spec.go b/pkg/gen/supportapi/embedded_spec.go index 22be3e9c124..a7e0813df0e 100644 --- a/pkg/gen/supportapi/embedded_spec.go +++ b/pkg/gen/supportapi/embedded_spec.go @@ -1509,8 +1509,44 @@ func init() { } ] }, + "MTOServiceItemDomesticStandaloneCrating": { + "description": "Describes a standalone crating service item subtype of a MTOServiceItem.", + "allOf": [ + { + "$ref": "#/definitions/MTOServiceItem" + }, + { + "type": "object", + "required": [ + "reServiceCode", + "item", + "crate", + "description" + ], + "properties": { + "crate": { + "$ref": "#/definitions/MTOServiceItemDimension" + }, + "description": { + "type": "string", + "example": "A motorcycle to be crated." + }, + "item": { + "$ref": "#/definitions/MTOServiceItemDimension" + }, + "reServiceCode": { + "description": "Service codes allowed for this model type.", + "type": "string", + "enum": [ + "DCRTSA" + ] + } + } + } + ] + }, "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 * SCRT, SUCRT - MTOServiceItemStandaloneCrating\n\nThe documentation will then update with the supported fields.\n", + "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 * DCRTSA- MTOServiceItemDomesticStandaloneCrating\n\nThe documentation will then update with the supported fields.\n", "type": "string", "enum": [ "MTOServiceItemBasic", @@ -1518,7 +1554,7 @@ func init() { "MTOServiceItemDestSIT", "MTOServiceItemShuttle", "MTOServiceItemDomesticCrating", - "MTOServiceItemStandaloneCrating" + "MTOServiceItemDomesticStandaloneCrating" ] }, "MTOServiceItemOriginSIT": { @@ -1615,43 +1651,6 @@ func init() { } ] }, - "MTOServiceItemStandaloneCrating": { - "description": "Describes a standalone crating/uncrating service item subtype of a MTOServiceItem.", - "allOf": [ - { - "$ref": "#/definitions/MTOServiceItem" - }, - { - "type": "object", - "required": [ - "reServiceCode", - "item", - "crate", - "description" - ], - "properties": { - "crate": { - "$ref": "#/definitions/MTOServiceItemDimension" - }, - "description": { - "type": "string", - "example": "A motorcycle to be crated." - }, - "item": { - "$ref": "#/definitions/MTOServiceItemDimension" - }, - "reServiceCode": { - "description": "Service codes allowed for this model type.", - "type": "string", - "enum": [ - "SCRT", - "SUCRT" - ] - } - } - } - ] - }, "MTOServiceItemStatus": { "description": "Describes all statuses for a MTOServiceItem.", "type": "string", @@ -4352,8 +4351,44 @@ func init() { } ] }, + "MTOServiceItemDomesticStandaloneCrating": { + "description": "Describes a standalone crating service item subtype of a MTOServiceItem.", + "allOf": [ + { + "$ref": "#/definitions/MTOServiceItem" + }, + { + "type": "object", + "required": [ + "reServiceCode", + "item", + "crate", + "description" + ], + "properties": { + "crate": { + "$ref": "#/definitions/MTOServiceItemDimension" + }, + "description": { + "type": "string", + "example": "A motorcycle to be crated." + }, + "item": { + "$ref": "#/definitions/MTOServiceItemDimension" + }, + "reServiceCode": { + "description": "Service codes allowed for this model type.", + "type": "string", + "enum": [ + "DCRTSA" + ] + } + } + } + ] + }, "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 * SCRT, SUCRT - MTOServiceItemStandaloneCrating\n\nThe documentation will then update with the supported fields.\n", + "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 * DCRTSA- MTOServiceItemDomesticStandaloneCrating\n\nThe documentation will then update with the supported fields.\n", "type": "string", "enum": [ "MTOServiceItemBasic", @@ -4361,7 +4396,7 @@ func init() { "MTOServiceItemDestSIT", "MTOServiceItemShuttle", "MTOServiceItemDomesticCrating", - "MTOServiceItemStandaloneCrating" + "MTOServiceItemDomesticStandaloneCrating" ] }, "MTOServiceItemOriginSIT": { @@ -4458,43 +4493,6 @@ func init() { } ] }, - "MTOServiceItemStandaloneCrating": { - "description": "Describes a standalone crating/uncrating service item subtype of a MTOServiceItem.", - "allOf": [ - { - "$ref": "#/definitions/MTOServiceItem" - }, - { - "type": "object", - "required": [ - "reServiceCode", - "item", - "crate", - "description" - ], - "properties": { - "crate": { - "$ref": "#/definitions/MTOServiceItemDimension" - }, - "description": { - "type": "string", - "example": "A motorcycle to be crated." - }, - "item": { - "$ref": "#/definitions/MTOServiceItemDimension" - }, - "reServiceCode": { - "description": "Service codes allowed for this model type.", - "type": "string", - "enum": [ - "SCRT", - "SUCRT" - ] - } - } - } - ] - }, "MTOServiceItemStatus": { "description": "Describes all statuses for a MTOServiceItem.", "type": "string", diff --git a/pkg/gen/supportmessages/m_t_o_service_item.go b/pkg/gen/supportmessages/m_t_o_service_item.go index 846eddb2d03..db5ba4d39c2 100644 --- a/pkg/gen/supportmessages/m_t_o_service_item.go +++ b/pkg/gen/supportmessages/m_t_o_service_item.go @@ -239,20 +239,20 @@ func unmarshalMTOServiceItem(data []byte, consumer runtime.Consumer) (MTOService return nil, err } return &result, nil - case "MTOServiceItemOriginSIT": - var result MTOServiceItemOriginSIT + case "MTOServiceItemDomesticStandaloneCrating": + var result MTOServiceItemDomesticStandaloneCrating if err := consumer.Consume(buf2, &result); err != nil { return nil, err } return &result, nil - case "MTOServiceItemShuttle": - var result MTOServiceItemShuttle + case "MTOServiceItemOriginSIT": + var result MTOServiceItemOriginSIT if err := consumer.Consume(buf2, &result); err != nil { return nil, err } return &result, nil - case "MTOServiceItemStandaloneCrating": - var result MTOServiceItemStandaloneCrating + case "MTOServiceItemShuttle": + var result MTOServiceItemShuttle if err := consumer.Consume(buf2, &result); err != nil { return nil, err } diff --git a/pkg/gen/supportmessages/m_t_o_service_item_standalone_crating.go b/pkg/gen/supportmessages/m_t_o_service_item_domestic_standalone_crating.go similarity index 71% rename from pkg/gen/supportmessages/m_t_o_service_item_standalone_crating.go rename to pkg/gen/supportmessages/m_t_o_service_item_domestic_standalone_crating.go index aa4d440d8da..8c283590d16 100644 --- a/pkg/gen/supportmessages/m_t_o_service_item_standalone_crating.go +++ b/pkg/gen/supportmessages/m_t_o_service_item_domestic_standalone_crating.go @@ -16,10 +16,10 @@ import ( "github.com/go-openapi/validate" ) -// MTOServiceItemStandaloneCrating Describes a standalone crating/uncrating service item subtype of a MTOServiceItem. +// MTOServiceItemDomesticStandaloneCrating Describes a standalone crating service item subtype of a MTOServiceItem. // -// swagger:model MTOServiceItemStandaloneCrating -type MTOServiceItemStandaloneCrating struct { +// swagger:model MTOServiceItemDomesticStandaloneCrating +type MTOServiceItemDomesticStandaloneCrating struct { eTagField string idField strfmt.UUID @@ -49,91 +49,91 @@ type MTOServiceItemStandaloneCrating struct { // Service codes allowed for this model type. // Required: true - // Enum: [SCRT SUCRT] + // Enum: [DCRTSA] ReServiceCode *string `json:"reServiceCode"` } // ETag gets the e tag of this subtype -func (m *MTOServiceItemStandaloneCrating) ETag() string { +func (m *MTOServiceItemDomesticStandaloneCrating) ETag() string { return m.eTagField } // SetETag sets the e tag of this subtype -func (m *MTOServiceItemStandaloneCrating) SetETag(val string) { +func (m *MTOServiceItemDomesticStandaloneCrating) SetETag(val string) { m.eTagField = val } // ID gets the id of this subtype -func (m *MTOServiceItemStandaloneCrating) ID() strfmt.UUID { +func (m *MTOServiceItemDomesticStandaloneCrating) ID() strfmt.UUID { return m.idField } // SetID sets the id of this subtype -func (m *MTOServiceItemStandaloneCrating) SetID(val strfmt.UUID) { +func (m *MTOServiceItemDomesticStandaloneCrating) SetID(val strfmt.UUID) { m.idField = val } // ModelType gets the model type of this subtype -func (m *MTOServiceItemStandaloneCrating) ModelType() MTOServiceItemModelType { - return "MTOServiceItemStandaloneCrating" +func (m *MTOServiceItemDomesticStandaloneCrating) ModelType() MTOServiceItemModelType { + return "MTOServiceItemDomesticStandaloneCrating" } // SetModelType sets the model type of this subtype -func (m *MTOServiceItemStandaloneCrating) SetModelType(val MTOServiceItemModelType) { +func (m *MTOServiceItemDomesticStandaloneCrating) SetModelType(val MTOServiceItemModelType) { } // MoveTaskOrderID gets the move task order ID of this subtype -func (m *MTOServiceItemStandaloneCrating) MoveTaskOrderID() *strfmt.UUID { +func (m *MTOServiceItemDomesticStandaloneCrating) MoveTaskOrderID() *strfmt.UUID { return m.moveTaskOrderIdField } // SetMoveTaskOrderID sets the move task order ID of this subtype -func (m *MTOServiceItemStandaloneCrating) SetMoveTaskOrderID(val *strfmt.UUID) { +func (m *MTOServiceItemDomesticStandaloneCrating) SetMoveTaskOrderID(val *strfmt.UUID) { m.moveTaskOrderIdField = val } // MtoShipmentID gets the mto shipment ID of this subtype -func (m *MTOServiceItemStandaloneCrating) MtoShipmentID() strfmt.UUID { +func (m *MTOServiceItemDomesticStandaloneCrating) MtoShipmentID() strfmt.UUID { return m.mtoShipmentIdField } // SetMtoShipmentID sets the mto shipment ID of this subtype -func (m *MTOServiceItemStandaloneCrating) SetMtoShipmentID(val strfmt.UUID) { +func (m *MTOServiceItemDomesticStandaloneCrating) SetMtoShipmentID(val strfmt.UUID) { m.mtoShipmentIdField = val } // ReServiceName gets the re service name of this subtype -func (m *MTOServiceItemStandaloneCrating) ReServiceName() string { +func (m *MTOServiceItemDomesticStandaloneCrating) ReServiceName() string { return m.reServiceNameField } // SetReServiceName sets the re service name of this subtype -func (m *MTOServiceItemStandaloneCrating) SetReServiceName(val string) { +func (m *MTOServiceItemDomesticStandaloneCrating) SetReServiceName(val string) { m.reServiceNameField = val } // RejectionReason gets the rejection reason of this subtype -func (m *MTOServiceItemStandaloneCrating) RejectionReason() *string { +func (m *MTOServiceItemDomesticStandaloneCrating) RejectionReason() *string { return m.rejectionReasonField } // SetRejectionReason sets the rejection reason of this subtype -func (m *MTOServiceItemStandaloneCrating) SetRejectionReason(val *string) { +func (m *MTOServiceItemDomesticStandaloneCrating) SetRejectionReason(val *string) { m.rejectionReasonField = val } // Status gets the status of this subtype -func (m *MTOServiceItemStandaloneCrating) Status() MTOServiceItemStatus { +func (m *MTOServiceItemDomesticStandaloneCrating) Status() MTOServiceItemStatus { return m.statusField } // SetStatus sets the status of this subtype -func (m *MTOServiceItemStandaloneCrating) SetStatus(val MTOServiceItemStatus) { +func (m *MTOServiceItemDomesticStandaloneCrating) SetStatus(val MTOServiceItemStatus) { m.statusField = val } // UnmarshalJSON unmarshals this object with a polymorphic type from a JSON structure -func (m *MTOServiceItemStandaloneCrating) UnmarshalJSON(raw []byte) error { +func (m *MTOServiceItemDomesticStandaloneCrating) UnmarshalJSON(raw []byte) error { var data struct { // crate @@ -151,7 +151,7 @@ func (m *MTOServiceItemStandaloneCrating) UnmarshalJSON(raw []byte) error { // Service codes allowed for this model type. // Required: true - // Enum: [SCRT SUCRT] + // Enum: [DCRTSA] ReServiceCode *string `json:"reServiceCode"` } buf := bytes.NewBuffer(raw) @@ -189,7 +189,7 @@ func (m *MTOServiceItemStandaloneCrating) UnmarshalJSON(raw []byte) error { return err } - var result MTOServiceItemStandaloneCrating + var result MTOServiceItemDomesticStandaloneCrating result.eTagField = base.ETag @@ -220,7 +220,7 @@ func (m *MTOServiceItemStandaloneCrating) UnmarshalJSON(raw []byte) error { } // MarshalJSON marshals this object with a polymorphic type to a JSON structure -func (m MTOServiceItemStandaloneCrating) MarshalJSON() ([]byte, error) { +func (m MTOServiceItemDomesticStandaloneCrating) MarshalJSON() ([]byte, error) { var b1, b2, b3 []byte var err error b1, err = json.Marshal(struct { @@ -240,7 +240,7 @@ func (m MTOServiceItemStandaloneCrating) MarshalJSON() ([]byte, error) { // Service codes allowed for this model type. // Required: true - // Enum: [SCRT SUCRT] + // Enum: [DCRTSA] ReServiceCode *string `json:"reServiceCode"` }{ @@ -296,8 +296,8 @@ func (m MTOServiceItemStandaloneCrating) MarshalJSON() ([]byte, error) { return swag.ConcatJSON(b1, b2, b3), nil } -// Validate validates this m t o service item standalone crating -func (m *MTOServiceItemStandaloneCrating) Validate(formats strfmt.Registry) error { +// Validate validates this m t o service item domestic standalone crating +func (m *MTOServiceItemDomesticStandaloneCrating) Validate(formats strfmt.Registry) error { var res []error if err := m.validateID(formats); err != nil { @@ -338,7 +338,7 @@ func (m *MTOServiceItemStandaloneCrating) Validate(formats strfmt.Registry) erro return nil } -func (m *MTOServiceItemStandaloneCrating) validateID(formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) validateID(formats strfmt.Registry) error { if swag.IsZero(m.ID()) { // not required return nil @@ -351,7 +351,7 @@ func (m *MTOServiceItemStandaloneCrating) validateID(formats strfmt.Registry) er return nil } -func (m *MTOServiceItemStandaloneCrating) validateMoveTaskOrderID(formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) validateMoveTaskOrderID(formats strfmt.Registry) error { if err := validate.Required("moveTaskOrderID", "body", m.MoveTaskOrderID()); err != nil { return err @@ -364,7 +364,7 @@ func (m *MTOServiceItemStandaloneCrating) validateMoveTaskOrderID(formats strfmt return nil } -func (m *MTOServiceItemStandaloneCrating) validateMtoShipmentID(formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) validateMtoShipmentID(formats strfmt.Registry) error { if swag.IsZero(m.MtoShipmentID()) { // not required return nil @@ -377,7 +377,7 @@ func (m *MTOServiceItemStandaloneCrating) validateMtoShipmentID(formats strfmt.R return nil } -func (m *MTOServiceItemStandaloneCrating) validateStatus(formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) validateStatus(formats strfmt.Registry) error { if swag.IsZero(m.Status()) { // not required return nil @@ -395,7 +395,7 @@ func (m *MTOServiceItemStandaloneCrating) validateStatus(formats strfmt.Registry return nil } -func (m *MTOServiceItemStandaloneCrating) validateCrate(formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) validateCrate(formats strfmt.Registry) error { if err := validate.Required("crate", "body", m.Crate); err != nil { return err @@ -415,7 +415,7 @@ func (m *MTOServiceItemStandaloneCrating) validateCrate(formats strfmt.Registry) return nil } -func (m *MTOServiceItemStandaloneCrating) validateDescription(formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) validateDescription(formats strfmt.Registry) error { if err := validate.Required("description", "body", m.Description); err != nil { return err @@ -424,7 +424,7 @@ func (m *MTOServiceItemStandaloneCrating) validateDescription(formats strfmt.Reg return nil } -func (m *MTOServiceItemStandaloneCrating) validateItem(formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) validateItem(formats strfmt.Registry) error { if err := validate.Required("item", "body", m.Item); err != nil { return err @@ -444,27 +444,27 @@ func (m *MTOServiceItemStandaloneCrating) validateItem(formats strfmt.Registry) return nil } -var mTOServiceItemStandaloneCratingTypeReServiceCodePropEnum []interface{} +var mTOServiceItemDomesticStandaloneCratingTypeReServiceCodePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["SCRT","SUCRT"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["DCRTSA"]`), &res); err != nil { panic(err) } for _, v := range res { - mTOServiceItemStandaloneCratingTypeReServiceCodePropEnum = append(mTOServiceItemStandaloneCratingTypeReServiceCodePropEnum, v) + mTOServiceItemDomesticStandaloneCratingTypeReServiceCodePropEnum = append(mTOServiceItemDomesticStandaloneCratingTypeReServiceCodePropEnum, v) } } // property enum -func (m *MTOServiceItemStandaloneCrating) validateReServiceCodeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, mTOServiceItemStandaloneCratingTypeReServiceCodePropEnum, true); err != nil { +func (m *MTOServiceItemDomesticStandaloneCrating) validateReServiceCodeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, mTOServiceItemDomesticStandaloneCratingTypeReServiceCodePropEnum, true); err != nil { return err } return nil } -func (m *MTOServiceItemStandaloneCrating) validateReServiceCode(formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) validateReServiceCode(formats strfmt.Registry) error { if err := validate.Required("reServiceCode", "body", m.ReServiceCode); err != nil { return err @@ -478,8 +478,8 @@ func (m *MTOServiceItemStandaloneCrating) validateReServiceCode(formats strfmt.R return nil } -// ContextValidate validate this m t o service item standalone crating based on the context it is used -func (m *MTOServiceItemStandaloneCrating) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validate this m t o service item domestic standalone crating based on the context it is used +func (m *MTOServiceItemDomesticStandaloneCrating) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error if err := m.contextValidateETag(ctx, formats); err != nil { @@ -508,7 +508,7 @@ func (m *MTOServiceItemStandaloneCrating) ContextValidate(ctx context.Context, f return nil } -func (m *MTOServiceItemStandaloneCrating) contextValidateETag(ctx context.Context, formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) contextValidateETag(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "eTag", "body", string(m.ETag())); err != nil { return err @@ -517,7 +517,7 @@ func (m *MTOServiceItemStandaloneCrating) contextValidateETag(ctx context.Contex return nil } -func (m *MTOServiceItemStandaloneCrating) contextValidateModelType(ctx context.Context, formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) contextValidateModelType(ctx context.Context, formats strfmt.Registry) error { if err := m.ModelType().ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -531,7 +531,7 @@ func (m *MTOServiceItemStandaloneCrating) contextValidateModelType(ctx context.C return nil } -func (m *MTOServiceItemStandaloneCrating) contextValidateReServiceName(ctx context.Context, formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) contextValidateReServiceName(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "reServiceName", "body", string(m.ReServiceName())); err != nil { return err @@ -540,7 +540,7 @@ func (m *MTOServiceItemStandaloneCrating) contextValidateReServiceName(ctx conte return nil } -func (m *MTOServiceItemStandaloneCrating) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { if swag.IsZero(m.Status()) { // not required return nil @@ -558,7 +558,7 @@ func (m *MTOServiceItemStandaloneCrating) contextValidateStatus(ctx context.Cont return nil } -func (m *MTOServiceItemStandaloneCrating) contextValidateCrate(ctx context.Context, formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) contextValidateCrate(ctx context.Context, formats strfmt.Registry) error { if m.Crate != nil { @@ -575,7 +575,7 @@ func (m *MTOServiceItemStandaloneCrating) contextValidateCrate(ctx context.Conte return nil } -func (m *MTOServiceItemStandaloneCrating) contextValidateItem(ctx context.Context, formats strfmt.Registry) error { +func (m *MTOServiceItemDomesticStandaloneCrating) contextValidateItem(ctx context.Context, formats strfmt.Registry) error { if m.Item != nil { @@ -593,7 +593,7 @@ func (m *MTOServiceItemStandaloneCrating) contextValidateItem(ctx context.Contex } // MarshalBinary interface implementation -func (m *MTOServiceItemStandaloneCrating) MarshalBinary() ([]byte, error) { +func (m *MTOServiceItemDomesticStandaloneCrating) MarshalBinary() ([]byte, error) { if m == nil { return nil, nil } @@ -601,8 +601,8 @@ func (m *MTOServiceItemStandaloneCrating) MarshalBinary() ([]byte, error) { } // UnmarshalBinary interface implementation -func (m *MTOServiceItemStandaloneCrating) UnmarshalBinary(b []byte) error { - var res MTOServiceItemStandaloneCrating +func (m *MTOServiceItemDomesticStandaloneCrating) UnmarshalBinary(b []byte) error { + var res MTOServiceItemDomesticStandaloneCrating if err := swag.ReadJSON(b, &res); err != nil { return err } diff --git a/pkg/gen/supportmessages/m_t_o_service_item_model_type.go b/pkg/gen/supportmessages/m_t_o_service_item_model_type.go index b9564e2a785..d50dc0648e8 100644 --- a/pkg/gen/supportmessages/m_t_o_service_item_model_type.go +++ b/pkg/gen/supportmessages/m_t_o_service_item_model_type.go @@ -21,7 +21,7 @@ import ( // - DDFSIT, DDASIT - MTOServiceItemDestSIT // - DOSHUT, DDSHUT - MTOServiceItemShuttle // - DCRT, DUCRT - MTOServiceItemDomesticCrating -// - SCRT, SUCRT - MTOServiceItemStandaloneCrating +// - DCRTSA- MTOServiceItemDomesticStandaloneCrating // // The documentation will then update with the supported fields. // @@ -54,8 +54,8 @@ const ( // MTOServiceItemModelTypeMTOServiceItemDomesticCrating captures enum value "MTOServiceItemDomesticCrating" MTOServiceItemModelTypeMTOServiceItemDomesticCrating MTOServiceItemModelType = "MTOServiceItemDomesticCrating" - // MTOServiceItemModelTypeMTOServiceItemStandaloneCrating captures enum value "MTOServiceItemStandaloneCrating" - MTOServiceItemModelTypeMTOServiceItemStandaloneCrating MTOServiceItemModelType = "MTOServiceItemStandaloneCrating" + // MTOServiceItemModelTypeMTOServiceItemDomesticStandaloneCrating captures enum value "MTOServiceItemDomesticStandaloneCrating" + MTOServiceItemModelTypeMTOServiceItemDomesticStandaloneCrating MTOServiceItemModelType = "MTOServiceItemDomesticStandaloneCrating" ) // for schema @@ -63,7 +63,7 @@ var mTOServiceItemModelTypeEnum []interface{} func init() { var res []MTOServiceItemModelType - if err := json.Unmarshal([]byte(`["MTOServiceItemBasic","MTOServiceItemOriginSIT","MTOServiceItemDestSIT","MTOServiceItemShuttle","MTOServiceItemDomesticCrating","MTOServiceItemStandaloneCrating"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["MTOServiceItemBasic","MTOServiceItemOriginSIT","MTOServiceItemDestSIT","MTOServiceItemShuttle","MTOServiceItemDomesticCrating","MTOServiceItemDomesticStandaloneCrating"]`), &res); err != nil { panic(err) } for _, v := range res { diff --git a/pkg/handlers/primeapi/move_task_order_test.go b/pkg/handlers/primeapi/move_task_order_test.go index 31482593ac4..88da9492006 100644 --- a/pkg/handlers/primeapi/move_task_order_test.go +++ b/pkg/handlers/primeapi/move_task_order_test.go @@ -1505,7 +1505,7 @@ func (suite *HandlerSuite) TestGetMoveTaskOrder() { suite.NotNil(payload.ETag()) }) - suite.Run("Success - return all MTOServiceItemStandaloneCrating fields assoicated with the getMoveTaskOrder", func() { + suite.Run("Success - return all MTOServiceItemDomesticStandaloneCrating fields assoicated with the getMoveTaskOrder", func() { handler := GetMoveTaskOrderHandler{ suite.HandlerConfig(), movetaskorder.NewMoveTaskOrderFetcher(), @@ -1607,14 +1607,14 @@ func (suite *HandlerSuite) TestGetMoveTaskOrder() { json, err := json.Marshal(serviceItemPayload) suite.NoError(err) - payload := primemessages.MTOServiceItemStandaloneCrating{} + payload := primemessages.MTOServiceItemDomesticStandaloneCrating{} err = payload.UnmarshalJSON(json) suite.NoError(err) suite.Equal(serviceItem.MoveTaskOrderID.String(), payload.MoveTaskOrderID().String()) suite.Equal(serviceItem.MTOShipmentID.String(), payload.MtoShipmentID().String()) suite.Equal(serviceItem.ID.String(), payload.ID().String()) - suite.Equal("MTOServiceItemStandaloneCrating", string(payload.ModelType())) + suite.Equal("MTOServiceItemDomesticStandaloneCrating", string(payload.ModelType())) suite.Equal(string(serviceItem.ReService.Code), string(*payload.ReServiceCode)) suite.Equal(serviceItem.ReService.Name, payload.ReServiceName()) suite.Equal(string(serviceItem.Status), string(payload.Status())) diff --git a/pkg/handlers/primeapi/mto_service_item.go b/pkg/handlers/primeapi/mto_service_item.go index 16fa387d448..292cb9e5db1 100644 --- a/pkg/handlers/primeapi/mto_service_item.go +++ b/pkg/handlers/primeapi/mto_service_item.go @@ -25,11 +25,11 @@ import ( // THIS WILL NEED TO BE UPDATED AS WE CONTINUE TO ADD MORE SERVICE ITEMS. // We will eventually remove this when all service items are added. var CreateableServiceItemMap = map[primemessages.MTOServiceItemModelType]bool{ - primemessages.MTOServiceItemModelTypeMTOServiceItemOriginSIT: true, - primemessages.MTOServiceItemModelTypeMTOServiceItemDestSIT: true, - primemessages.MTOServiceItemModelTypeMTOServiceItemShuttle: true, - primemessages.MTOServiceItemModelTypeMTOServiceItemDomesticCrating: true, - primemessages.MTOServiceItemModelTypeMTOServiceItemStandaloneCrating: true, + primemessages.MTOServiceItemModelTypeMTOServiceItemOriginSIT: true, + primemessages.MTOServiceItemModelTypeMTOServiceItemDestSIT: true, + primemessages.MTOServiceItemModelTypeMTOServiceItemShuttle: true, + primemessages.MTOServiceItemModelTypeMTOServiceItemDomesticCrating: true, + primemessages.MTOServiceItemModelTypeMTOServiceItemDomesticStandaloneCrating: true, } // CreateMTOServiceItemHandler is the handler to create MTO service items diff --git a/pkg/handlers/primeapi/mto_service_item_test.go b/pkg/handlers/primeapi/mto_service_item_test.go index 2c48227a955..2bb51ec3036 100644 --- a/pkg/handlers/primeapi/mto_service_item_test.go +++ b/pkg/handlers/primeapi/mto_service_item_test.go @@ -584,7 +584,7 @@ func (suite *HandlerSuite) TestCreateMTOServiceItemDomesticCratingHandler() { }) } -func (suite *HandlerSuite) TestCreateMTOServiceItemStandaloneCratingHandler() { +func (suite *HandlerSuite) TestCreateMTOServiceItemDomesticStandaloneCratingHandler() { builder := query.NewQueryBuilder() mtoChecker := movetaskorder.NewMoveTaskOrderChecker() @@ -603,8 +603,7 @@ func (suite *HandlerSuite) TestCreateMTOServiceItemStandaloneCratingHandler() { LinkOnly: true, }, }, nil) - factory.BuildReServiceByCode(suite.DB(), models.ReServiceCodeSCRT) - factory.BuildReServiceByCode(suite.DB(), models.ReServiceCodeSUCRT) + factory.BuildReServiceByCode(suite.DB(), models.ReServiceCodeDCRTSA) subtestData.req = httptest.NewRequest("POST", "/mto-service-items", nil) subtestData.mtoServiceItem = models.MTOServiceItem{ @@ -648,44 +647,7 @@ func (suite *HandlerSuite) TestCreateMTOServiceItemStandaloneCratingHandler() { mtoChecker, } - subtestData.mtoServiceItem.ReService.Code = models.ReServiceCodeSCRT - params := mtoserviceitemops.CreateMTOServiceItemParams{ - HTTPRequest: subtestData.req, - Body: payloads.MTOServiceItem(&subtestData.mtoServiceItem), - } - - // Validate incoming payload - suite.NoError(params.Body.Validate(strfmt.Default)) - - response := handler.Handle(params) - suite.IsType(&mtoserviceitemops.CreateMTOServiceItemOK{}, response) - okResponse := response.(*mtoserviceitemops.CreateMTOServiceItemOK) - - // Validate outgoing payload (each element of slice) - for _, mtoServiceItem := range okResponse.Payload { - suite.NoError(mtoServiceItem.Validate(strfmt.Default)) - } - - suite.NotZero(okResponse.Payload[0].ID()) - }) - - suite.Run("Successful POST - Integration Test - Standalone Uncrating", func() { - subtestData := makeSubtestData() - moveRouter := moverouter.NewMoveRouter() - planner := &routemocks.Planner{} - planner.On("ZipTransitDistance", - mock.AnythingOfType("*appcontext.appContext"), - mock.Anything, - mock.Anything, - ).Return(400, nil) - creator := mtoserviceitem.NewMTOServiceItemCreator(planner, builder, moveRouter) - handler := CreateMTOServiceItemHandler{ - suite.HandlerConfig(), - creator, - mtoChecker, - } - - subtestData.mtoServiceItem.ReService.Code = models.ReServiceCodeSUCRT + subtestData.mtoServiceItem.ReService.Code = models.ReServiceCodeDCRTSA params := mtoserviceitemops.CreateMTOServiceItemParams{ HTTPRequest: subtestData.req, Body: payloads.MTOServiceItem(&subtestData.mtoServiceItem), @@ -721,14 +683,14 @@ func (suite *HandlerSuite) TestCreateMTOServiceItemStandaloneCratingHandler() { mock.Anything, ).Return(nil, nil, err) - subtestData.mtoServiceItem.ReService.Code = models.ReServiceCodeSUCRT + subtestData.mtoServiceItem.ReService.Code = models.ReServiceCodeDCRTSA params := mtoserviceitemops.CreateMTOServiceItemParams{ HTTPRequest: subtestData.req, Body: payloads.MTOServiceItem(&subtestData.mtoServiceItem), } var height int32 - params.Body.(*primemessages.MTOServiceItemStandaloneCrating).Crate.Height = &height + params.Body.(*primemessages.MTOServiceItemDomesticStandaloneCrating).Crate.Height = &height // Validate incoming payload suite.NoError(params.Body.Validate(strfmt.Default)) diff --git a/pkg/handlers/primeapi/payloads/model_to_payload.go b/pkg/handlers/primeapi/payloads/model_to_payload.go index 9ea90e33771..b80df97e57b 100644 --- a/pkg/handlers/primeapi/payloads/model_to_payload.go +++ b/pkg/handlers/primeapi/payloads/model_to_payload.go @@ -671,10 +671,10 @@ func MTOServiceItem(mtoServiceItem *models.MTOServiceItem) primemessages.MTOServ Width: crate.Width.Int32Ptr(), } payload = &cratingSI - case models.ReServiceCodeSCRT, models.ReServiceCodeSUCRT: + case models.ReServiceCodeDCRTSA: item := GetDimension(mtoServiceItem.Dimensions, models.DimensionTypeItem) crate := GetDimension(mtoServiceItem.Dimensions, models.DimensionTypeCrate) - cratingSI := primemessages.MTOServiceItemStandaloneCrating{ + cratingSI := primemessages.MTOServiceItemDomesticStandaloneCrating{ ReServiceCode: handlers.FmtString(string(mtoServiceItem.ReService.Code)), Description: mtoServiceItem.Description, Reason: mtoServiceItem.Reason, diff --git a/pkg/handlers/primeapi/payloads/model_to_payload_test.go b/pkg/handlers/primeapi/payloads/model_to_payload_test.go index b22af84bc25..df33024bc21 100644 --- a/pkg/handlers/primeapi/payloads/model_to_payload_test.go +++ b/pkg/handlers/primeapi/payloads/model_to_payload_test.go @@ -668,8 +668,8 @@ func (suite *PayloadsSuite) TestMTOServiceItemDCRT() { suite.True(ok) } -func (suite *PayloadsSuite) TestMTOServiceItemSCRT() { - reServiceCode := models.ReServiceCodeSCRT +func (suite *PayloadsSuite) TestMTOServiceItemDCRTSA() { + reServiceCode := models.ReServiceCodeDCRTSA reason := "reason" dateOfContact1 := time.Now() timeMilitary1 := "1500Z" @@ -678,7 +678,7 @@ func (suite *PayloadsSuite) TestMTOServiceItemSCRT() { timeMilitary2 := "1300Z" firstAvailableDeliveryDate2 := dateOfContact2.AddDate(0, 0, 10) - mtoServiceItemSCRT := &models.MTOServiceItem{ + mtoServiceItemDCRTSA := &models.MTOServiceItem{ ID: uuid.Must(uuid.NewV4()), ReService: models.ReService{Code: reServiceCode}, Reason: &reason, @@ -698,11 +698,11 @@ func (suite *PayloadsSuite) TestMTOServiceItemSCRT() { }, } - resultSCRT := MTOServiceItem(mtoServiceItemSCRT) + resultDCRTSA := MTOServiceItem(mtoServiceItemDCRTSA) - suite.NotNil(resultSCRT) + suite.NotNil(resultDCRTSA) - _, ok := resultSCRT.(*primemessages.MTOServiceItemStandaloneCrating) + _, ok := resultDCRTSA.(*primemessages.MTOServiceItemDomesticStandaloneCrating) suite.True(ok) } diff --git a/pkg/handlers/primeapi/payloads/payload_to_model.go b/pkg/handlers/primeapi/payloads/payload_to_model.go index 7ba2d2fffbb..28b0974a4fe 100644 --- a/pkg/handlers/primeapi/payloads/payload_to_model.go +++ b/pkg/handlers/primeapi/payloads/payload_to_model.go @@ -530,8 +530,8 @@ func MTOServiceItemModel(mtoServiceItem primemessages.MTOServiceItem) (*models.M Width: unit.ThousandthInches(*domesticCrating.Crate.Width), }, } - case primemessages.MTOServiceItemModelTypeMTOServiceItemStandaloneCrating: - standaloneCrating := mtoServiceItem.(*primemessages.MTOServiceItemStandaloneCrating) + case primemessages.MTOServiceItemModelTypeMTOServiceItemDomesticStandaloneCrating: + standaloneCrating := mtoServiceItem.(*primemessages.MTOServiceItemDomesticStandaloneCrating) // additional validation for this specific service item type verrs := validateStandaloneCrating(*standaloneCrating) @@ -749,7 +749,7 @@ func validateDomesticCrating(m primemessages.MTOServiceItemDomesticCrating) *val } // validateStandaloneCrating validates this mto service item domestic crating -func validateStandaloneCrating(m primemessages.MTOServiceItemStandaloneCrating) *validate.Errors { +func validateStandaloneCrating(m primemessages.MTOServiceItemDomesticStandaloneCrating) *validate.Errors { return validate.Validate( &models.ItemCanFitInsideCrate{ Name: "Item", diff --git a/pkg/handlers/primeapi/payloads/payload_to_model_test.go b/pkg/handlers/primeapi/payloads/payload_to_model_test.go index bb807400b3c..ef0b4d172b5 100644 --- a/pkg/handlers/primeapi/payloads/payload_to_model_test.go +++ b/pkg/handlers/primeapi/payloads/payload_to_model_test.go @@ -33,8 +33,8 @@ func (suite *PayloadsSuite) TestMTOServiceItemModel() { reason := "Reason" description := "Description" - // SCRT Service Item - scrtCode := models.ReServiceCodeSCRT.String() + // DCRTSAService Item + dcrtsaCode := models.ReServiceCodeDCRTSA.String() item := &primemessages.MTOServiceItemDimension{ Height: &itemMeasurement, @@ -91,16 +91,16 @@ func (suite *PayloadsSuite) TestMTOServiceItemModel() { County: &destCounty, } - SCRTServiceItem := &primemessages.MTOServiceItemStandaloneCrating{ - ReServiceCode: &scrtCode, + DCRTSAServiceItem := &primemessages.MTOServiceItemDomesticStandaloneCrating{ + ReServiceCode: &dcrtsaCode, Reason: &reason, Description: &description, } - SCRTServiceItem.Item.MTOServiceItemDimension = *item - SCRTServiceItem.Crate.MTOServiceItemDimension = *crate + DCRTSAServiceItem.Item.MTOServiceItemDimension = *item + DCRTSAServiceItem.Crate.MTOServiceItemDimension = *crate - SCRTServiceItem.SetMoveTaskOrderID(handlers.FmtUUID(moveTaskOrderIDField)) - SCRTServiceItem.SetMtoShipmentID(*mtoShipmentIDString) + DCRTSAServiceItem.SetMoveTaskOrderID(handlers.FmtUUID(moveTaskOrderIDField)) + DCRTSAServiceItem.SetMtoShipmentID(*mtoShipmentIDString) destServiceItem := &primemessages.MTOServiceItemDestSIT{ ReServiceCode: &destServiceCode, @@ -174,8 +174,8 @@ func (suite *PayloadsSuite) TestMTOServiceItemModel() { }) - suite.Run("Success - Returns a SCRT service item model", func() { - returnedModel, verrs := MTOServiceItemModel(SCRTServiceItem) + suite.Run("Success - Returns a DCRTSA service item model", func() { + returnedModel, verrs := MTOServiceItemModel(DCRTSAServiceItem) var returnedItem, returnedCrate models.MTOServiceItemDimension for _, dimension := range returnedModel.Dimensions { @@ -189,14 +189,14 @@ func (suite *PayloadsSuite) TestMTOServiceItemModel() { suite.NoVerrs(verrs) suite.Equal(moveTaskOrderIDField.String(), returnedModel.MoveTaskOrderID.String()) suite.Equal(mtoShipmentIDField.String(), returnedModel.MTOShipmentID.String()) - suite.Equal(models.ReServiceCodeSCRT, returnedModel.ReService.Code) - suite.Equal(SCRTServiceItem.Reason, returnedModel.Reason) - suite.Equal(SCRTServiceItem.Description, returnedModel.Description) - suite.Equal(unit.ThousandthInches(*SCRTServiceItem.Item.Length), returnedItem.Length) - suite.Equal(unit.ThousandthInches(*SCRTServiceItem.Crate.Length), returnedCrate.Length) + suite.Equal(models.ReServiceCodeDCRTSA, returnedModel.ReService.Code) + suite.Equal(DCRTSAServiceItem.Reason, returnedModel.Reason) + suite.Equal(DCRTSAServiceItem.Description, returnedModel.Description) + suite.Equal(unit.ThousandthInches(*DCRTSAServiceItem.Item.Length), returnedItem.Length) + suite.Equal(unit.ThousandthInches(*DCRTSAServiceItem.Crate.Length), returnedCrate.Length) }) - suite.Run("Fail - Returns error for SCRT service item because of validation error", func() { + suite.Run("Fail - Returns error for DCRTSA service item because of validation error", func() { badCrateMeasurement := int32(200) badCrate := &primemessages.MTOServiceItemDimension{ Height: &badCrateMeasurement, @@ -204,20 +204,20 @@ func (suite *PayloadsSuite) TestMTOServiceItemModel() { Length: &badCrateMeasurement, } - badSCRTServiceItem := &primemessages.MTOServiceItemStandaloneCrating{ - ReServiceCode: &scrtCode, + badDCRTSAServiceItem := &primemessages.MTOServiceItemDomesticStandaloneCrating{ + ReServiceCode: &dcrtsaCode, Reason: &reason, Description: &description, } - badSCRTServiceItem.Item.MTOServiceItemDimension = *item - badSCRTServiceItem.Crate.MTOServiceItemDimension = *badCrate + badDCRTSAServiceItem.Item.MTOServiceItemDimension = *item + badDCRTSAServiceItem.Crate.MTOServiceItemDimension = *badCrate - badSCRTServiceItem.SetMoveTaskOrderID(handlers.FmtUUID(moveTaskOrderIDField)) - badSCRTServiceItem.SetMtoShipmentID(*mtoShipmentIDString) + badDCRTSAServiceItem.SetMoveTaskOrderID(handlers.FmtUUID(moveTaskOrderIDField)) + badDCRTSAServiceItem.SetMtoShipmentID(*mtoShipmentIDString) - returnedModel, verrs := MTOServiceItemModel(badSCRTServiceItem) + returnedModel, verrs := MTOServiceItemModel(badDCRTSAServiceItem) - suite.True(verrs.HasAny(), fmt.Sprintf("invalid crate dimensions for %s service item", models.ReServiceCodeSCRT)) + suite.True(verrs.HasAny(), fmt.Sprintf("invalid crate dimensions for %s service item", models.ReServiceCodeDCRTSA)) suite.Nil(returnedModel, "returned a model when erroring") }) diff --git a/pkg/handlers/primeapiv2/move_task_order_test.go b/pkg/handlers/primeapiv2/move_task_order_test.go index 030ab61d78d..896537da152 100644 --- a/pkg/handlers/primeapiv2/move_task_order_test.go +++ b/pkg/handlers/primeapiv2/move_task_order_test.go @@ -1379,7 +1379,7 @@ func (suite *HandlerSuite) TestGetMoveTaskOrder() { suite.NotNil(payload.ETag()) }) - suite.Run("Success - return all MTOServiceItemStandaloneCrating fields assoicated with the getMoveTaskOrder", func() { + suite.Run("Success - return all MTOServiceItemDomesticStandaloneCrating fields assoicated with the getMoveTaskOrder", func() { handler := GetMoveTaskOrderHandler{ suite.HandlerConfig(), movetaskorder.NewMoveTaskOrderFetcher(), @@ -1417,7 +1417,7 @@ func (suite *HandlerSuite) TestGetMoveTaskOrder() { }, { Model: models.ReService{ - Code: models.ReServiceCodeSCRT, + Code: models.ReServiceCodeDCRTSA, }, }, }, nil) @@ -1481,14 +1481,14 @@ func (suite *HandlerSuite) TestGetMoveTaskOrder() { json, err := json.Marshal(serviceItemPayload) suite.NoError(err) - payload := primev2messages.MTOServiceItemStandaloneCrating{} + payload := primev2messages.MTOServiceItemDomesticStandaloneCrating{} err = payload.UnmarshalJSON(json) suite.NoError(err) suite.Equal(serviceItem.MoveTaskOrderID.String(), payload.MoveTaskOrderID().String()) suite.Equal(serviceItem.MTOShipmentID.String(), payload.MtoShipmentID().String()) suite.Equal(serviceItem.ID.String(), payload.ID().String()) - suite.Equal("MTOServiceItemStandaloneCrating", string(payload.ModelType())) + suite.Equal("MTOServiceItemDomesticStandaloneCrating", string(payload.ModelType())) suite.Equal(string(serviceItem.ReService.Code), string(*payload.ReServiceCode)) suite.Equal(serviceItem.ReService.Name, payload.ReServiceName()) suite.Equal(string(serviceItem.Status), string(payload.Status())) diff --git a/pkg/handlers/primeapiv2/mto_service_item.go b/pkg/handlers/primeapiv2/mto_service_item.go index 784bb014aa1..17bcd32f080 100644 --- a/pkg/handlers/primeapiv2/mto_service_item.go +++ b/pkg/handlers/primeapiv2/mto_service_item.go @@ -23,11 +23,11 @@ import ( // THIS WILL NEED TO BE UPDATED AS WE CONTINUE TO ADD MORE SERVICE ITEMS. // We will eventually remove this when all service items are added. var CreateableServiceItemMap = map[primev2messages.MTOServiceItemModelType]bool{ - primev2messages.MTOServiceItemModelTypeMTOServiceItemOriginSIT: true, - primev2messages.MTOServiceItemModelTypeMTOServiceItemDestSIT: true, - primev2messages.MTOServiceItemModelTypeMTOServiceItemShuttle: true, - primev2messages.MTOServiceItemModelTypeMTOServiceItemDomesticCrating: true, - primev2messages.MTOServiceItemModelTypeMTOServiceItemStandaloneCrating: true, + primev2messages.MTOServiceItemModelTypeMTOServiceItemOriginSIT: true, + primev2messages.MTOServiceItemModelTypeMTOServiceItemDestSIT: true, + primev2messages.MTOServiceItemModelTypeMTOServiceItemShuttle: true, + primev2messages.MTOServiceItemModelTypeMTOServiceItemDomesticCrating: true, + primev2messages.MTOServiceItemModelTypeMTOServiceItemDomesticStandaloneCrating: true, } // CreateMTOServiceItemHandler is the handler to create MTO service items diff --git a/pkg/handlers/primeapiv2/mto_service_item_test.go b/pkg/handlers/primeapiv2/mto_service_item_test.go index f94576f3a49..c70f94ccd01 100644 --- a/pkg/handlers/primeapiv2/mto_service_item_test.go +++ b/pkg/handlers/primeapiv2/mto_service_item_test.go @@ -580,7 +580,7 @@ func (suite *HandlerSuite) TestCreateMTOServiceItemDomesticCratingHandler() { }) } -func (suite *HandlerSuite) TestCreateMTOServiceItemStandaloneCratingHandler() { +func (suite *HandlerSuite) TestCreateMTOServiceItemDomesticStandaloneCratingHandler() { builder := query.NewQueryBuilder() mtoChecker := movetaskorder.NewMoveTaskOrderChecker() @@ -599,8 +599,7 @@ func (suite *HandlerSuite) TestCreateMTOServiceItemStandaloneCratingHandler() { LinkOnly: true, }, }, nil) - factory.BuildReServiceByCode(suite.DB(), models.ReServiceCodeSCRT) - factory.BuildReServiceByCode(suite.DB(), models.ReServiceCodeSUCRT) + factory.BuildReServiceByCode(suite.DB(), models.ReServiceCodeDCRTSA) subtestData.req = httptest.NewRequest("POST", "/mto-service-items", nil) subtestData.mtoServiceItem = models.MTOServiceItem{ @@ -644,44 +643,7 @@ func (suite *HandlerSuite) TestCreateMTOServiceItemStandaloneCratingHandler() { mtoChecker, } - subtestData.mtoServiceItem.ReService.Code = models.ReServiceCodeSCRT - params := mtoserviceitemops.CreateMTOServiceItemParams{ - HTTPRequest: subtestData.req, - Body: payloads.MTOServiceItem(&subtestData.mtoServiceItem), - } - - // Validate incoming payload - suite.NoError(params.Body.Validate(strfmt.Default)) - - response := handler.Handle(params) - suite.IsType(&mtoserviceitemops.CreateMTOServiceItemOK{}, response) - okResponse := response.(*mtoserviceitemops.CreateMTOServiceItemOK) - - // Validate outgoing payload (each element of slice) - for _, mtoServiceItem := range okResponse.Payload { - suite.NoError(mtoServiceItem.Validate(strfmt.Default)) - } - - suite.NotZero(okResponse.Payload[0].ID()) - }) - - suite.Run("Successful POST - Integration Test - Standalone Uncrating", func() { - subtestData := makeSubtestData() - moveRouter := moverouter.NewMoveRouter() - planner := &routemocks.Planner{} - planner.On("ZipTransitDistance", - mock.AnythingOfType("*appcontext.appContext"), - mock.Anything, - mock.Anything, - ).Return(400, nil) - creator := mtoserviceitem.NewMTOServiceItemCreator(planner, builder, moveRouter) - handler := CreateMTOServiceItemHandler{ - suite.HandlerConfig(), - creator, - mtoChecker, - } - - subtestData.mtoServiceItem.ReService.Code = models.ReServiceCodeSUCRT + subtestData.mtoServiceItem.ReService.Code = models.ReServiceCodeDCRTSA params := mtoserviceitemops.CreateMTOServiceItemParams{ HTTPRequest: subtestData.req, Body: payloads.MTOServiceItem(&subtestData.mtoServiceItem), @@ -717,14 +679,14 @@ func (suite *HandlerSuite) TestCreateMTOServiceItemStandaloneCratingHandler() { mock.Anything, ).Return(nil, nil, err) - subtestData.mtoServiceItem.ReService.Code = models.ReServiceCodeSUCRT + subtestData.mtoServiceItem.ReService.Code = models.ReServiceCodeDCRTSA params := mtoserviceitemops.CreateMTOServiceItemParams{ HTTPRequest: subtestData.req, Body: payloads.MTOServiceItem(&subtestData.mtoServiceItem), } var height int32 - params.Body.(*primemessages.MTOServiceItemStandaloneCrating).Crate.Height = &height + params.Body.(*primemessages.MTOServiceItemDomesticStandaloneCrating).Crate.Height = &height // Validate incoming payload suite.NoError(params.Body.Validate(strfmt.Default)) diff --git a/pkg/handlers/primeapiv2/payloads/model_to_payload.go b/pkg/handlers/primeapiv2/payloads/model_to_payload.go index 841622afdd3..54b5d05cd33 100644 --- a/pkg/handlers/primeapiv2/payloads/model_to_payload.go +++ b/pkg/handlers/primeapiv2/payloads/model_to_payload.go @@ -602,10 +602,10 @@ func MTOServiceItem(mtoServiceItem *models.MTOServiceItem) primev2messages.MTOSe Width: crate.Width.Int32Ptr(), } payload = &cratingSI - case models.ReServiceCodeSCRT, models.ReServiceCodeSUCRT: + case models.ReServiceCodeDCRTSA: item := GetDimension(mtoServiceItem.Dimensions, models.DimensionTypeItem) crate := GetDimension(mtoServiceItem.Dimensions, models.DimensionTypeCrate) - cratingSI := primev2messages.MTOServiceItemStandaloneCrating{ + cratingSI := primev2messages.MTOServiceItemDomesticStandaloneCrating{ ReServiceCode: handlers.FmtString(string(mtoServiceItem.ReService.Code)), Description: mtoServiceItem.Description, Reason: mtoServiceItem.Reason, diff --git a/pkg/handlers/primeapiv2/payloads/model_to_payload_test.go b/pkg/handlers/primeapiv2/payloads/model_to_payload_test.go index 5162d0f15d8..349dfedf07f 100644 --- a/pkg/handlers/primeapiv2/payloads/model_to_payload_test.go +++ b/pkg/handlers/primeapiv2/payloads/model_to_payload_test.go @@ -723,7 +723,7 @@ func (suite *PayloadsSuite) TestMTOServiceItemDCRT() { suite.True(ok) } -func (suite *PayloadsSuite) TestMTOServiceItemSCRT() { +func (suite *PayloadsSuite) TestMTOServiceItemDCRTSA() { reServiceCode := models.ReServiceCodeDCRT reason := "reason" dateOfContact1 := time.Now() @@ -733,7 +733,7 @@ func (suite *PayloadsSuite) TestMTOServiceItemSCRT() { timeMilitary2 := "1300Z" firstAvailableDeliveryDate2 := dateOfContact2.AddDate(0, 0, 10) - mtoServiceItemSCRT := &models.MTOServiceItem{ + mtoServiceItemDCRTSA := &models.MTOServiceItem{ ID: uuid.Must(uuid.NewV4()), ReService: models.ReService{Code: reServiceCode}, Reason: &reason, @@ -753,11 +753,11 @@ func (suite *PayloadsSuite) TestMTOServiceItemSCRT() { }, } - resultSCRT := MTOServiceItem(mtoServiceItemSCRT) + resultDCRTSA := MTOServiceItem(mtoServiceItemDCRTSA) - suite.NotNil(resultSCRT) + suite.NotNil(resultDCRTSA) - _, ok := resultSCRT.(*primev2messages.MTOServiceItemStandaloneCrating) + _, ok := resultDCRTSA.(*primev2messages.MTOServiceItemDomesticStandaloneCrating) suite.True(ok) } diff --git a/pkg/handlers/primeapiv2/payloads/payload_to_model.go b/pkg/handlers/primeapiv2/payloads/payload_to_model.go index 1b42346bfa0..3bacfaba18b 100644 --- a/pkg/handlers/primeapiv2/payloads/payload_to_model.go +++ b/pkg/handlers/primeapiv2/payloads/payload_to_model.go @@ -536,8 +536,8 @@ func MTOServiceItemModel(mtoServiceItem primev2messages.MTOServiceItem) (*models Width: unit.ThousandthInches(*domesticCrating.Crate.Width), }, } - case primev2messages.MTOServiceItemModelTypeMTOServiceItemStandaloneCrating: - standaloneCrating := mtoServiceItem.(*primev2messages.MTOServiceItemStandaloneCrating) + case primev2messages.MTOServiceItemModelTypeMTOServiceItemDomesticStandaloneCrating: + standaloneCrating := mtoServiceItem.(*primev2messages.MTOServiceItemDomesticStandaloneCrating) // additional validation for this specific service item type verrs := validateStandaloneCrating(*standaloneCrating) @@ -755,7 +755,7 @@ func validateDomesticCrating(m primev2messages.MTOServiceItemDomesticCrating) *v } // validateStandaloneCrating validates this mto service item domestic crating -func validateStandaloneCrating(m primev2messages.MTOServiceItemStandaloneCrating) *validate.Errors { +func validateStandaloneCrating(m primev2messages.MTOServiceItemDomesticStandaloneCrating) *validate.Errors { return validate.Validate( &models.ItemCanFitInsideCrateV2{ Name: "Item", diff --git a/pkg/handlers/primeapiv2/payloads/payload_to_model_test.go b/pkg/handlers/primeapiv2/payloads/payload_to_model_test.go index 64c443de072..d4914b0d1d4 100644 --- a/pkg/handlers/primeapiv2/payloads/payload_to_model_test.go +++ b/pkg/handlers/primeapiv2/payloads/payload_to_model_test.go @@ -26,8 +26,8 @@ func (suite *PayloadsSuite) TestMTOServiceItemModel() { basicServiceItem.SetMoveTaskOrderID(handlers.FmtUUID(moveTaskOrderIDField)) basicServiceItem.SetMtoShipmentID(*mtoShipmentIDString) - // SCRT Service Item - scrtCode := models.ReServiceCodeSCRT.String() + // DCRTSA Service Item + dcrtsaCode := models.ReServiceCodeDCRTSA.String() // DCRT Service Item itemMeasurement := int32(1100) @@ -72,16 +72,16 @@ func (suite *PayloadsSuite) TestMTOServiceItemModel() { StreetAddress1: &destStreet, } - SCRTServiceItem := &primev2messages.MTOServiceItemStandaloneCrating{ - ReServiceCode: &scrtCode, + DCRTSAServiceItem := &primev2messages.MTOServiceItemDomesticStandaloneCrating{ + ReServiceCode: &dcrtsaCode, Reason: &reason, Description: &description, } - SCRTServiceItem.Item.MTOServiceItemDimension = *item - SCRTServiceItem.Crate.MTOServiceItemDimension = *crate + DCRTSAServiceItem.Item.MTOServiceItemDimension = *item + DCRTSAServiceItem.Crate.MTOServiceItemDimension = *crate - SCRTServiceItem.SetMoveTaskOrderID(handlers.FmtUUID(moveTaskOrderIDField)) - SCRTServiceItem.SetMtoShipmentID(*mtoShipmentIDString) + DCRTSAServiceItem.SetMoveTaskOrderID(handlers.FmtUUID(moveTaskOrderIDField)) + DCRTSAServiceItem.SetMtoShipmentID(*mtoShipmentIDString) destServiceItem := &primev2messages.MTOServiceItemDestSIT{ ReServiceCode: &destServiceCode, @@ -155,8 +155,8 @@ func (suite *PayloadsSuite) TestMTOServiceItemModel() { }) - suite.Run("Success - Returns a SCRT service item model", func() { - returnedModel, verrs := MTOServiceItemModel(SCRTServiceItem) + suite.Run("Success - Returns a DCRTSA service item model", func() { + returnedModel, verrs := MTOServiceItemModel(DCRTSAServiceItem) var returnedItem, returnedCrate models.MTOServiceItemDimension for _, dimension := range returnedModel.Dimensions { @@ -170,14 +170,14 @@ func (suite *PayloadsSuite) TestMTOServiceItemModel() { suite.NoVerrs(verrs) suite.Equal(moveTaskOrderIDField.String(), returnedModel.MoveTaskOrderID.String()) suite.Equal(mtoShipmentIDField.String(), returnedModel.MTOShipmentID.String()) - suite.Equal(models.ReServiceCodeSCRT, returnedModel.ReService.Code) - suite.Equal(SCRTServiceItem.Reason, returnedModel.Reason) - suite.Equal(SCRTServiceItem.Description, returnedModel.Description) - suite.Equal(unit.ThousandthInches(*SCRTServiceItem.Item.Length), returnedItem.Length) - suite.Equal(unit.ThousandthInches(*SCRTServiceItem.Crate.Length), returnedCrate.Length) + suite.Equal(models.ReServiceCodeDCRTSA, returnedModel.ReService.Code) + suite.Equal(DCRTSAServiceItem.Reason, returnedModel.Reason) + suite.Equal(DCRTSAServiceItem.Description, returnedModel.Description) + suite.Equal(unit.ThousandthInches(*DCRTSAServiceItem.Item.Length), returnedItem.Length) + suite.Equal(unit.ThousandthInches(*DCRTSAServiceItem.Crate.Length), returnedCrate.Length) }) - suite.Run("Fail - Returns error for SCRT service item because of validation error", func() { + suite.Run("Fail - Returns error for DCRTSA service item because of validation error", func() { badCrateMeasurement := int32(200) badCrate := &primev2messages.MTOServiceItemDimension{ Height: &badCrateMeasurement, @@ -185,20 +185,20 @@ func (suite *PayloadsSuite) TestMTOServiceItemModel() { Length: &badCrateMeasurement, } - badSCRTServiceItem := &primev2messages.MTOServiceItemStandaloneCrating{ - ReServiceCode: &scrtCode, + badDCRTSAServiceItem := &primev2messages.MTOServiceItemDomesticStandaloneCrating{ + ReServiceCode: &dcrtsaCode, Reason: &reason, Description: &description, } - badSCRTServiceItem.Item.MTOServiceItemDimension = *item - badSCRTServiceItem.Crate.MTOServiceItemDimension = *badCrate + badDCRTSAServiceItem.Item.MTOServiceItemDimension = *item + badDCRTSAServiceItem.Crate.MTOServiceItemDimension = *badCrate - badSCRTServiceItem.SetMoveTaskOrderID(handlers.FmtUUID(moveTaskOrderIDField)) - badSCRTServiceItem.SetMtoShipmentID(*mtoShipmentIDString) + badDCRTSAServiceItem.SetMoveTaskOrderID(handlers.FmtUUID(moveTaskOrderIDField)) + badDCRTSAServiceItem.SetMtoShipmentID(*mtoShipmentIDString) - returnedModel, verrs := MTOServiceItemModel(badSCRTServiceItem) + returnedModel, verrs := MTOServiceItemModel(badDCRTSAServiceItem) - suite.True(verrs.HasAny(), fmt.Sprintf("invalid crate dimensions for %s service item", models.ReServiceCodeSCRT)) + suite.True(verrs.HasAny(), fmt.Sprintf("invalid crate dimensions for %s service item", models.ReServiceCodeDCRTSA)) suite.Nil(returnedModel, "returned a model when erroring") }) diff --git a/pkg/handlers/primeapiv3/move_task_order_test.go b/pkg/handlers/primeapiv3/move_task_order_test.go index c8fc2cf1295..cc0922e1a23 100644 --- a/pkg/handlers/primeapiv3/move_task_order_test.go +++ b/pkg/handlers/primeapiv3/move_task_order_test.go @@ -1417,7 +1417,7 @@ func (suite *HandlerSuite) TestGetMoveTaskOrder() { }, { Model: models.ReService{ - Code: models.ReServiceCodeSCRT, + Code: models.ReServiceCodeDCRTSA, }, }, }, nil) @@ -1481,14 +1481,14 @@ func (suite *HandlerSuite) TestGetMoveTaskOrder() { json, err := json.Marshal(serviceItemPayload) suite.NoError(err) - payload := primev3messages.MTOServiceItemStandaloneCrating{} + payload := primev3messages.MTOServiceItemDomesticStandaloneCrating{} err = payload.UnmarshalJSON(json) suite.NoError(err) suite.Equal(serviceItem.MoveTaskOrderID.String(), payload.MoveTaskOrderID().String()) suite.Equal(serviceItem.MTOShipmentID.String(), payload.MtoShipmentID().String()) suite.Equal(serviceItem.ID.String(), payload.ID().String()) - suite.Equal("MTOServiceItemStandaloneCrating", string(payload.ModelType())) + suite.Equal("MTOServiceItemDomesticStandaloneCrating", string(payload.ModelType())) suite.Equal(string(serviceItem.ReService.Code), string(*payload.ReServiceCode)) suite.Equal(serviceItem.ReService.Name, payload.ReServiceName()) suite.Equal(string(serviceItem.Status), string(payload.Status())) diff --git a/pkg/handlers/primeapiv3/mto_service_item.go b/pkg/handlers/primeapiv3/mto_service_item.go index d56f6d45eab..b63f7b212c0 100644 --- a/pkg/handlers/primeapiv3/mto_service_item.go +++ b/pkg/handlers/primeapiv3/mto_service_item.go @@ -23,11 +23,11 @@ import ( // THIS WILL NEED TO BE UPDATED AS WE CONTINUE TO ADD MORE SERVICE ITEMS. // We will eventually remove this when all service items are added. var CreateableServiceItemMap = map[primev3messages.MTOServiceItemModelType]bool{ - primev3messages.MTOServiceItemModelTypeMTOServiceItemOriginSIT: true, - primev3messages.MTOServiceItemModelTypeMTOServiceItemDestSIT: true, - primev3messages.MTOServiceItemModelTypeMTOServiceItemShuttle: true, - primev3messages.MTOServiceItemModelTypeMTOServiceItemDomesticCrating: true, - primev3messages.MTOServiceItemModelTypeMTOServiceItemStandaloneCrating: true, + primev3messages.MTOServiceItemModelTypeMTOServiceItemOriginSIT: true, + primev3messages.MTOServiceItemModelTypeMTOServiceItemDestSIT: true, + primev3messages.MTOServiceItemModelTypeMTOServiceItemShuttle: true, + primev3messages.MTOServiceItemModelTypeMTOServiceItemDomesticCrating: true, + primev3messages.MTOServiceItemModelTypeMTOServiceItemDomesticStandaloneCrating: true, } // CreateMTOServiceItemHandler is the handler to create MTO service items diff --git a/pkg/handlers/primeapiv3/mto_service_item_test.go b/pkg/handlers/primeapiv3/mto_service_item_test.go index 76159f5bad9..cb370cb2db0 100644 --- a/pkg/handlers/primeapiv3/mto_service_item_test.go +++ b/pkg/handlers/primeapiv3/mto_service_item_test.go @@ -644,44 +644,7 @@ func (suite *HandlerSuite) TestCreateMTOServiceItemStandardCratingHandler() { mtoChecker, } - subtestData.mtoServiceItem.ReService.Code = models.ReServiceCodeSCRT - params := mtoserviceitemops.CreateMTOServiceItemParams{ - HTTPRequest: subtestData.req, - Body: payloads.MTOServiceItem(&subtestData.mtoServiceItem), - } - - // Validate incoming payload - suite.NoError(params.Body.Validate(strfmt.Default)) - - response := handler.Handle(params) - suite.IsType(&mtoserviceitemops.CreateMTOServiceItemOK{}, response) - okResponse := response.(*mtoserviceitemops.CreateMTOServiceItemOK) - - // Validate outgoing payload (each element of slice) - for _, mtoServiceItem := range okResponse.Payload { - suite.NoError(mtoServiceItem.Validate(strfmt.Default)) - } - - suite.NotZero(okResponse.Payload[0].ID()) - }) - - suite.Run("Successful POST - Integration Test - Standalone Uncrating", func() { - subtestData := makeSubtestData() - moveRouter := moverouter.NewMoveRouter() - planner := &routemocks.Planner{} - planner.On("ZipTransitDistance", - mock.AnythingOfType("*appcontext.appContext"), - mock.Anything, - mock.Anything, - ).Return(400, nil) - creator := mtoserviceitem.NewMTOServiceItemCreator(planner, builder, moveRouter) - handler := CreateMTOServiceItemHandler{ - suite.HandlerConfig(), - creator, - mtoChecker, - } - - subtestData.mtoServiceItem.ReService.Code = models.ReServiceCodeSUCRT + subtestData.mtoServiceItem.ReService.Code = models.ReServiceCodeDCRTSA params := mtoserviceitemops.CreateMTOServiceItemParams{ HTTPRequest: subtestData.req, Body: payloads.MTOServiceItem(&subtestData.mtoServiceItem), @@ -717,14 +680,14 @@ func (suite *HandlerSuite) TestCreateMTOServiceItemStandardCratingHandler() { mock.Anything, ).Return(nil, nil, err) - subtestData.mtoServiceItem.ReService.Code = models.ReServiceCodeSUCRT + subtestData.mtoServiceItem.ReService.Code = models.ReServiceCodeDCRTSA params := mtoserviceitemops.CreateMTOServiceItemParams{ HTTPRequest: subtestData.req, Body: payloads.MTOServiceItem(&subtestData.mtoServiceItem), } var height int32 - params.Body.(*primemessages.MTOServiceItemStandaloneCrating).Crate.Height = &height + params.Body.(*primemessages.MTOServiceItemDomesticStandaloneCrating).Crate.Height = &height // Validate incoming payload suite.NoError(params.Body.Validate(strfmt.Default)) diff --git a/pkg/handlers/primeapiv3/payloads/model_to_payload.go b/pkg/handlers/primeapiv3/payloads/model_to_payload.go index 212a3ff2217..ea3a3996d24 100644 --- a/pkg/handlers/primeapiv3/payloads/model_to_payload.go +++ b/pkg/handlers/primeapiv3/payloads/model_to_payload.go @@ -628,7 +628,7 @@ func MTOServiceItem(mtoServiceItem *models.MTOServiceItem) primev3messages.MTOSe Width: crate.Width.Int32Ptr(), } payload = &cratingSI - case models.ReServiceCodeSCRT, models.ReServiceCodeSUCRT: + case models.ReServiceCodeDCRTSA: item := GetDimension(mtoServiceItem.Dimensions, models.DimensionTypeItem) crate := GetDimension(mtoServiceItem.Dimensions, models.DimensionTypeCrate) cratingSI := primev3messages.MTOServiceItemDomesticCrating{ diff --git a/pkg/handlers/primeapiv3/payloads/model_to_payload_test.go b/pkg/handlers/primeapiv3/payloads/model_to_payload_test.go index f6786ed039b..5f230c2f424 100644 --- a/pkg/handlers/primeapiv3/payloads/model_to_payload_test.go +++ b/pkg/handlers/primeapiv3/payloads/model_to_payload_test.go @@ -722,8 +722,8 @@ func (suite *PayloadsSuite) TestMTOServiceItemDCRT() { suite.True(ok) } -func (suite *PayloadsSuite) TestMTOServiceItemSCRT() { - reServiceCode := models.ReServiceCodeSCRT +func (suite *PayloadsSuite) TestMTOServiceItemDCRTSA() { + reServiceCode := models.ReServiceCodeDCRTSA reason := "reason" dateOfContact1 := time.Now() timeMilitary1 := "1500Z" @@ -732,7 +732,7 @@ func (suite *PayloadsSuite) TestMTOServiceItemSCRT() { timeMilitary2 := "1300Z" firstAvailableDeliveryDate2 := dateOfContact2.AddDate(0, 0, 10) - mtoServiceItemSCRT := &models.MTOServiceItem{ + mtoServiceItemDCRTSA := &models.MTOServiceItem{ ID: uuid.Must(uuid.NewV4()), ReService: models.ReService{Code: reServiceCode}, Reason: &reason, @@ -752,11 +752,11 @@ func (suite *PayloadsSuite) TestMTOServiceItemSCRT() { }, } - resultSCRT := MTOServiceItem(mtoServiceItemSCRT) + resultDCRTSA := MTOServiceItem(mtoServiceItemDCRTSA) - suite.NotNil(resultSCRT) + suite.NotNil(resultDCRTSA) - _, ok := resultSCRT.(*primev3messages.MTOServiceItemStandaloneCrating) + _, ok := resultDCRTSA.(*primev3messages.MTOServiceItemDomesticStandaloneCrating) suite.True(ok) } diff --git a/pkg/handlers/primeapiv3/payloads/payload_to_model.go b/pkg/handlers/primeapiv3/payloads/payload_to_model.go index 6b62d400ba4..08ae1af37d6 100644 --- a/pkg/handlers/primeapiv3/payloads/payload_to_model.go +++ b/pkg/handlers/primeapiv3/payloads/payload_to_model.go @@ -600,8 +600,8 @@ func MTOServiceItemModel(mtoServiceItem primev3messages.MTOServiceItem) (*models Width: unit.ThousandthInches(*domesticCrating.Crate.Width), }, } - case primev3messages.MTOServiceItemModelTypeMTOServiceItemStandaloneCrating: - standaloneCrating := mtoServiceItem.(*primev3messages.MTOServiceItemStandaloneCrating) + case primev3messages.MTOServiceItemModelTypeMTOServiceItemDomesticStandaloneCrating: + standaloneCrating := mtoServiceItem.(*primev3messages.MTOServiceItemDomesticStandaloneCrating) // additional validation for this specific service item type verrs := validateStandaloneCrating(*standaloneCrating) @@ -817,7 +817,7 @@ func validateDomesticCrating(m primev3messages.MTOServiceItemDomesticCrating) *v ) } -func validateStandaloneCrating(m primev3messages.MTOServiceItemStandaloneCrating) *validate.Errors { +func validateStandaloneCrating(m primev3messages.MTOServiceItemDomesticStandaloneCrating) *validate.Errors { return validate.Validate( &models.ItemCanFitInsideCrateV3{ Name: "Item", diff --git a/pkg/handlers/primeapiv3/payloads/payload_to_model_test.go b/pkg/handlers/primeapiv3/payloads/payload_to_model_test.go index 771b1d3611d..367579ef0b2 100644 --- a/pkg/handlers/primeapiv3/payloads/payload_to_model_test.go +++ b/pkg/handlers/primeapiv3/payloads/payload_to_model_test.go @@ -26,8 +26,8 @@ func (suite *PayloadsSuite) TestMTOServiceItemModel() { basicServiceItem.SetMoveTaskOrderID(handlers.FmtUUID(moveTaskOrderIDField)) basicServiceItem.SetMtoShipmentID(*mtoShipmentIDString) - // SCRT Service Item - scrtCode := models.ReServiceCodeSCRT.String() + // DCRTSAService Item + dcrtsaCode := models.ReServiceCodeDCRTSA.String() // DCRT Service Item itemMeasurement := int32(1100) @@ -72,16 +72,16 @@ func (suite *PayloadsSuite) TestMTOServiceItemModel() { StreetAddress1: &destStreet, } - SCRTServiceItem := &primev3messages.MTOServiceItemStandaloneCrating{ - ReServiceCode: &scrtCode, + DCRTSAServiceItem := &primev3messages.MTOServiceItemDomesticStandaloneCrating{ + ReServiceCode: &dcrtsaCode, Reason: &reason, Description: &description, } - SCRTServiceItem.Item.MTOServiceItemDimension = *item - SCRTServiceItem.Crate.MTOServiceItemDimension = *crate + DCRTSAServiceItem.Item.MTOServiceItemDimension = *item + DCRTSAServiceItem.Crate.MTOServiceItemDimension = *crate - SCRTServiceItem.SetMoveTaskOrderID(handlers.FmtUUID(moveTaskOrderIDField)) - SCRTServiceItem.SetMtoShipmentID(*mtoShipmentIDString) + DCRTSAServiceItem.SetMoveTaskOrderID(handlers.FmtUUID(moveTaskOrderIDField)) + DCRTSAServiceItem.SetMtoShipmentID(*mtoShipmentIDString) destServiceItem := &primev3messages.MTOServiceItemDestSIT{ ReServiceCode: &destServiceCode, @@ -155,8 +155,8 @@ func (suite *PayloadsSuite) TestMTOServiceItemModel() { }) - suite.Run("Success - Returns a SCRT service item model", func() { - returnedModel, verrs := MTOServiceItemModel(SCRTServiceItem) + suite.Run("Success - Returns a DCRTSA service item model", func() { + returnedModel, verrs := MTOServiceItemModel(DCRTSAServiceItem) var returnedItem, returnedCrate models.MTOServiceItemDimension for _, dimension := range returnedModel.Dimensions { @@ -170,14 +170,14 @@ func (suite *PayloadsSuite) TestMTOServiceItemModel() { suite.NoVerrs(verrs) suite.Equal(moveTaskOrderIDField.String(), returnedModel.MoveTaskOrderID.String()) suite.Equal(mtoShipmentIDField.String(), returnedModel.MTOShipmentID.String()) - suite.Equal(models.ReServiceCodeSCRT, returnedModel.ReService.Code) - suite.Equal(SCRTServiceItem.Reason, returnedModel.Reason) - suite.Equal(SCRTServiceItem.Description, returnedModel.Description) - suite.Equal(unit.ThousandthInches(*SCRTServiceItem.Item.Length), returnedItem.Length) - suite.Equal(unit.ThousandthInches(*SCRTServiceItem.Crate.Length), returnedCrate.Length) + suite.Equal(models.ReServiceCodeDCRTSA, returnedModel.ReService.Code) + suite.Equal(DCRTSAServiceItem.Reason, returnedModel.Reason) + suite.Equal(DCRTSAServiceItem.Description, returnedModel.Description) + suite.Equal(unit.ThousandthInches(*DCRTSAServiceItem.Item.Length), returnedItem.Length) + suite.Equal(unit.ThousandthInches(*DCRTSAServiceItem.Crate.Length), returnedCrate.Length) }) - suite.Run("Fail - Returns error for SCRT service item because of validation error", func() { + suite.Run("Fail - Returns error for DCRTSA service item because of validation error", func() { badCrateMeasurement := int32(200) badCrate := &primev3messages.MTOServiceItemDimension{ Height: &badCrateMeasurement, @@ -185,20 +185,20 @@ func (suite *PayloadsSuite) TestMTOServiceItemModel() { Length: &badCrateMeasurement, } - badSCRTServiceItem := &primev3messages.MTOServiceItemStandaloneCrating{ - ReServiceCode: &scrtCode, + badDCRTSAServiceItem := &primev3messages.MTOServiceItemDomesticStandaloneCrating{ + ReServiceCode: &dcrtsaCode, Reason: &reason, Description: &description, } - badSCRTServiceItem.Item.MTOServiceItemDimension = *item - badSCRTServiceItem.Crate.MTOServiceItemDimension = *badCrate + badDCRTSAServiceItem.Item.MTOServiceItemDimension = *item + badDCRTSAServiceItem.Crate.MTOServiceItemDimension = *badCrate - badSCRTServiceItem.SetMoveTaskOrderID(handlers.FmtUUID(moveTaskOrderIDField)) - badSCRTServiceItem.SetMtoShipmentID(*mtoShipmentIDString) + badDCRTSAServiceItem.SetMoveTaskOrderID(handlers.FmtUUID(moveTaskOrderIDField)) + badDCRTSAServiceItem.SetMtoShipmentID(*mtoShipmentIDString) - returnedModel, verrs := MTOServiceItemModel(badSCRTServiceItem) + returnedModel, verrs := MTOServiceItemModel(badDCRTSAServiceItem) - suite.True(verrs.HasAny(), fmt.Sprintf("invalid crate dimensions for %s service item", models.ReServiceCodeSCRT)) + suite.True(verrs.HasAny(), fmt.Sprintf("invalid crate dimensions for %s service item", models.ReServiceCodeDCRTSA)) suite.Nil(returnedModel, "returned a model when erroring") }) diff --git a/pkg/handlers/supportapi/internal/payloads/model_to_payload.go b/pkg/handlers/supportapi/internal/payloads/model_to_payload.go index 2a0f64e784f..54d6c334345 100644 --- a/pkg/handlers/supportapi/internal/payloads/model_to_payload.go +++ b/pkg/handlers/supportapi/internal/payloads/model_to_payload.go @@ -336,10 +336,10 @@ func MTOServiceItem(mtoServiceItem *models.MTOServiceItem) supportmessages.MTOSe }, Description: mtoServiceItem.Description, } - case models.ReServiceCodeSCRT, models.ReServiceCodeSUCRT: + case models.ReServiceCodeDCRTSA: item := primepayloads.GetDimension(mtoServiceItem.Dimensions, models.DimensionTypeItem) crate := primepayloads.GetDimension(mtoServiceItem.Dimensions, models.DimensionTypeCrate) - payload = &supportmessages.MTOServiceItemStandaloneCrating{ + payload = &supportmessages.MTOServiceItemDomesticStandaloneCrating{ ReServiceCode: handlers.FmtString(string(mtoServiceItem.ReService.Code)), Item: &supportmessages.MTOServiceItemDimension{ ID: strfmt.UUID(item.ID.String()), diff --git a/pkg/models/re_service.go b/pkg/models/re_service.go index 6245deb8e7d..75d1f7291ac 100644 --- a/pkg/models/re_service.go +++ b/pkg/models/re_service.go @@ -121,10 +121,6 @@ const ( ReServiceCodeNSTH ReServiceCode = "NSTH" // ReServiceCodeNSTUB Nonstandard UB ReServiceCodeNSTUB ReServiceCode = "NSTUB" - // ReServiceCodeSUCRT Standalone crating - ReServiceCodeSCRT ReServiceCode = "SCRT" - // ReServiceCodeSUCRT Standalone uncrating - ReServiceCodeSUCRT ReServiceCode = "SUCRT" ) // ReService model struct diff --git a/src/components/PrimeUI/CreateShipmentServiceItemForm/CreateShipmentServiceItemForm.jsx b/src/components/PrimeUI/CreateShipmentServiceItemForm/CreateShipmentServiceItemForm.jsx index a4c5df65f40..91291cac0de 100644 --- a/src/components/PrimeUI/CreateShipmentServiceItemForm/CreateShipmentServiceItemForm.jsx +++ b/src/components/PrimeUI/CreateShipmentServiceItemForm/CreateShipmentServiceItemForm.jsx @@ -7,7 +7,7 @@ import DestinationSITServiceItemForm from './DestinationSITServiceItemForm'; import OriginSITServiceItemForm from './OriginSITServiceItemForm'; import ShuttleSITServiceItemForm from './ShuttleSITServiceItemForm'; import DomesticCratingForm from './DomesticCratingForm'; -import StandaloneCratingForm from './StandaloneCratingForm'; +import DomesticStandaloneCratingForm from './DomesticStandaloneCratingForm'; import { ShipmentShape } from 'types/shipment'; import { createServiceItemModelTypes } from 'constants/prime'; @@ -19,7 +19,7 @@ const CreateShipmentServiceItemForm = ({ shipment, createServiceItemMutation }) MTOServiceItemDestSIT, MTOServiceItemShuttle, MTOServiceItemDomesticCrating, - MTOServiceItemStandaloneCrating, + MTOServiceItemDomesticStandaloneCrating, } = createServiceItemModelTypes; const [selectedServiceItemType, setSelectedServiceItemType] = useState(MTOServiceItemOriginSIT); @@ -37,7 +37,7 @@ const CreateShipmentServiceItemForm = ({ shipment, createServiceItemMutation }) - + {selectedServiceItemType === MTOServiceItemOriginSIT && ( @@ -52,8 +52,8 @@ const CreateShipmentServiceItemForm = ({ shipment, createServiceItemMutation }) {selectedServiceItemType === MTOServiceItemDomesticCrating && ( )} - {selectedServiceItemType === MTOServiceItemStandaloneCrating && ( - + {selectedServiceItemType === MTOServiceItemDomesticStandaloneCrating && ( + )} ); diff --git a/src/components/PrimeUI/CreateShipmentServiceItemForm/CreateShipmentServiceItemForm.test.jsx b/src/components/PrimeUI/CreateShipmentServiceItemForm/CreateShipmentServiceItemForm.test.jsx index 0b58ed98886..2144bb85627 100644 --- a/src/components/PrimeUI/CreateShipmentServiceItemForm/CreateShipmentServiceItemForm.test.jsx +++ b/src/components/PrimeUI/CreateShipmentServiceItemForm/CreateShipmentServiceItemForm.test.jsx @@ -84,7 +84,7 @@ describe('CreateShipmentServiceItemForm component', () => { ['destinationSITServiceItemForm', createServiceItemModelTypes.MTOServiceItemDestSIT], ['shuttleSITServiceItemForm', createServiceItemModelTypes.MTOServiceItemShuttle], ['DomesticCratingForm', createServiceItemModelTypes.MTOServiceItemDomesticCrating], - ['StandaloneCratingForm', createServiceItemModelTypes.MTOServiceItemStandaloneCrating], + ['DomesticStandaloneCratingForm', createServiceItemModelTypes.MTOServiceItemDomesticStandaloneCrating], ])('renders %s after selecting %s type', async (formName, serviceItemType) => { const shipment = approvedMoveTaskOrder.moveTaskOrder.mtoShipments[0]; render( diff --git a/src/components/PrimeUI/CreateShipmentServiceItemForm/StandaloneCratingForm.jsx b/src/components/PrimeUI/CreateShipmentServiceItemForm/DomesticStandaloneCratingForm.jsx similarity index 89% rename from src/components/PrimeUI/CreateShipmentServiceItemForm/StandaloneCratingForm.jsx rename to src/components/PrimeUI/CreateShipmentServiceItemForm/DomesticStandaloneCratingForm.jsx index 19d33d8955c..a1c8c72ba88 100644 --- a/src/components/PrimeUI/CreateShipmentServiceItemForm/StandaloneCratingForm.jsx +++ b/src/components/PrimeUI/CreateShipmentServiceItemForm/DomesticStandaloneCratingForm.jsx @@ -8,7 +8,7 @@ import { Form } from 'components/form/Form'; import TextField from 'components/form/fields/TextField/TextField'; import { DropdownInput } from 'components/form/fields/DropdownInput'; import { ShipmentShape } from 'types/shipment'; -import { standaloneCratingServiceItemCodeOptions, createServiceItemModelTypes } from 'constants/prime'; +import { domesticStandaloneCratingServiceItemCodeOptions, createServiceItemModelTypes } from 'constants/prime'; import MaskedTextField from 'components/form/fields/MaskedTextField/MaskedTextField'; const standaloneShippingValidationSchema = Yup.object().shape({ @@ -23,11 +23,11 @@ const standaloneShippingValidationSchema = Yup.object().shape({ reason: Yup.string().required('Required'), }); -const StandaloneCratingForm = ({ shipment, submission }) => { +const DomesticStandaloneCratingForm = ({ shipment, submission }) => { const initialValues = { moveTaskOrderID: shipment.moveTaskOrderID, mtoShipmentID: shipment.id, - modelType: createServiceItemModelTypes.MTOServiceItemStandaloneCrating, + modelType: createServiceItemModelTypes.MTOServiceItemDomesticStandaloneCrating, itemLength: '', itemWidth: '', itemHeight: '', @@ -59,13 +59,13 @@ const StandaloneCratingForm = ({ shipment, submission }) => { return ( -
+ { ); }; -StandaloneCratingForm.propTypes = { +DomesticStandaloneCratingForm.propTypes = { shipment: ShipmentShape.isRequired, submission: PropTypes.func.isRequired, }; -export default StandaloneCratingForm; +export default DomesticStandaloneCratingForm; diff --git a/src/constants/prime.js b/src/constants/prime.js index 388aba922c4..e866ab52325 100644 --- a/src/constants/prime.js +++ b/src/constants/prime.js @@ -6,7 +6,7 @@ export const createServiceItemModelTypes = { MTOServiceItemDestSIT: 'MTOServiceItemDestSIT', MTOServiceItemShuttle: 'MTOServiceItemShuttle', MTOServiceItemDomesticCrating: 'MTOServiceItemDomesticCrating', - MTOServiceItemStandaloneCrating: 'MTOServiceItemStandaloneCrating', + MTOServiceItemDomesticStandaloneCrating: 'MTOServiceItemDomesticStandaloneCrating', }; export const shuttleServiceItemCodeOptions = [ @@ -19,9 +19,8 @@ export const domesticCratingServiceItemCodeOptions = [ { value: serviceItemCodes.DUCRT, key: SERVICE_ITEM_CODES.DUCRT }, ]; -export const standaloneCratingServiceItemCodeOptions = [ - { value: serviceItemCodes.SCRT, key: SERVICE_ITEM_CODES.SCRT }, - { value: serviceItemCodes.SUCRT, key: SERVICE_ITEM_CODES.SUCRT }, +export const domesticStandaloneCratingServiceItemCodeOptions = [ + { value: serviceItemCodes.DCRTSA, key: SERVICE_ITEM_CODES.DCRTSA }, ]; export default createServiceItemModelTypes; diff --git a/src/constants/serviceItems.js b/src/constants/serviceItems.js index 9be0315ec47..b073961e539 100644 --- a/src/constants/serviceItems.js +++ b/src/constants/serviceItems.js @@ -132,8 +132,7 @@ const SERVICE_ITEM_CODES = { DDSHUT: 'DDSHUT', DCRT: 'DCRT', DUCRT: 'DUCRT', - SCRT: 'SCRT', - SUCRT: 'SUCRT', + DCRTSA: 'DCRTSA', MS: 'MS', DOSFSC: 'DOSFSC', DDSFSC: 'DDSFSC', diff --git a/src/content/serviceItems.js b/src/content/serviceItems.js index cd09ebc9486..af093b56d01 100644 --- a/src/content/serviceItems.js +++ b/src/content/serviceItems.js @@ -48,8 +48,7 @@ const serviceItemCodes = { MS: 'Move management', NSTH: 'Nonstandard HHG', NSTUB: 'Nonstandard UB', - SCRT: 'Standalone crating', - SUCRT: 'Standalone uncrating', + DCRTSA: 'Domestic Standalone Crating', }; export default serviceItemCodes; diff --git a/swagger-def/definitions/prime/MTOServiceItemStandaloneCrating.yaml b/swagger-def/definitions/prime/MTOServiceItemDomesticStandaloneCrating.yaml similarity index 73% rename from swagger-def/definitions/prime/MTOServiceItemStandaloneCrating.yaml rename to swagger-def/definitions/prime/MTOServiceItemDomesticStandaloneCrating.yaml index 35b3337a618..65f090508e3 100644 --- a/swagger-def/definitions/prime/MTOServiceItemStandaloneCrating.yaml +++ b/swagger-def/definitions/prime/MTOServiceItemDomesticStandaloneCrating.yaml @@ -1,14 +1,13 @@ -description: Describes a standard crating/uncrating service item subtype of a MTOServiceItem. +description: Describes a standard crating service item subtype of a MTOServiceItem. allOf: - $ref: 'MTOServiceItem.yaml' - type: object properties: reServiceCode: type: string - description: A unique code for the service item. Indicates if the service is for crating (DCRT) or uncrating (DUCRT). + description: A unique code for the service item. Indicates if the service is for crating (DCRTSA). enum: - - SCRT # Standalone Crating - - SUCRT # Standalone Uncrating + - DCRTSA # Domestic Standalone Crating item: description: The dimensions of the item being crated. allOf: @@ -25,7 +24,7 @@ allOf: type: string example: Storage items need to be picked up description: > - The contractor's explanation for why an item needed to be crated or uncrated. Used by the TOO while + The customer's explanation for why an item needed to be crated or uncrated. Used by the TOO while deciding to approve or reject the service item. x-nullable: true x-omitempty: false diff --git a/swagger-def/definitions/prime/MTOServiceItemModelType.yaml b/swagger-def/definitions/prime/MTOServiceItemModelType.yaml index 98938eb8348..66007c5f7d7 100644 --- a/swagger-def/definitions/prime/MTOServiceItemModelType.yaml +++ b/swagger-def/definitions/prime/MTOServiceItemModelType.yaml @@ -8,7 +8,7 @@ description: > * DDFSIT, DDASIT - MTOServiceItemDestSIT * DOSHUT, DDSHUT - MTOServiceItemShuttle * DCRT, DUCRT - MTOServiceItemDomesticCrating - * SCRT - MTOServiceItemStandaloneCrating + * DCRTSA - MTOServiceItemDomesticStandaloneCrating The documentation will then update with the supported fields. type: string @@ -18,4 +18,4 @@ enum: - MTOServiceItemDestSIT - MTOServiceItemShuttle - MTOServiceItemDomesticCrating - - MTOServiceItemStandaloneCrating + - MTOServiceItemDomesticStandaloneCrating diff --git a/swagger-def/prime.yaml b/swagger-def/prime.yaml index 0cad7df0d48..886d669ebf1 100644 --- a/swagger-def/prime.yaml +++ b/swagger-def/prime.yaml @@ -1746,8 +1746,8 @@ definitions: $ref: 'definitions/prime/MTOServiceItemDestSIT.yaml' MTOServiceItemDomesticCrating: # spectral oas2-unused-definition is OK here due to polymorphism $ref: 'definitions/prime/MTOServiceItemDomesticCrating.yaml' - MTOServiceItemStandaloneCrating: # spectral oas2-unused-definition is OK here due to polymorphism - $ref: 'definitions/prime/MTOServiceItemStandaloneCrating.yaml' + MTOServiceItemDomesticStandaloneCrating: # spectral oas2-unused-definition is OK here due to polymorphism + $ref: 'definitions/prime/MTOServiceItemDomesticStandaloneCrating.yaml' MTOServiceItemOriginSIT: # spectral oas2-unused-definition is OK here due to polymorphism $ref: 'definitions/prime/MTOServiceItemOriginSIT.yaml' MTOServiceItemShuttle: # spectral oas2-unused-definition is OK here due to polymorphism diff --git a/swagger-def/prime_v2.yaml b/swagger-def/prime_v2.yaml index 013dcd8cd64..88f6df4cce5 100644 --- a/swagger-def/prime_v2.yaml +++ b/swagger-def/prime_v2.yaml @@ -311,8 +311,8 @@ definitions: $ref: 'definitions/prime/MTOServiceItemDestSIT.yaml' MTOServiceItemDomesticCrating: # spectral oas2-unused-definition is OK here due to polymorphism $ref: 'definitions/prime/MTOServiceItemDomesticCrating.yaml' - MTOServiceItemStandaloneCrating: # spectral oas2-unused-definition is OK here due to polymorphism - $ref: 'definitions/prime/MTOServiceItemStandaloneCrating.yaml' + MTOServiceItemDomesticStandaloneCrating: # spectral oas2-unused-definition is OK here due to polymorphism + $ref: 'definitions/prime/MTOServiceItemDomesticStandaloneCrating.yaml' MTOServiceItemOriginSIT: # spectral oas2-unused-definition is OK here due to polymorphism $ref: 'definitions/prime/MTOServiceItemOriginSIT.yaml' MTOServiceItemShuttle: # spectral oas2-unused-definition is OK here due to polymorphism diff --git a/swagger-def/prime_v3.yaml b/swagger-def/prime_v3.yaml index 744980e51bf..f61b65302c1 100644 --- a/swagger-def/prime_v3.yaml +++ b/swagger-def/prime_v3.yaml @@ -305,8 +305,8 @@ definitions: $ref: 'definitions/prime/MTOServiceItemDestSIT.yaml' MTOServiceItemDomesticCrating: # spectral oas2-unused-definition is OK here due to polymorphism $ref: 'definitions/prime/MTOServiceItemDomesticCrating.yaml' - MTOServiceItemStandaloneCrating: # spectral oas2-unused-definition is OK here due to polymorphism - $ref: 'definitions/prime/MTOServiceItemStandaloneCrating.yaml' + MTOServiceItemDomesticStandaloneCrating: # spectral oas2-unused-definition is OK here due to polymorphism + $ref: 'definitions/prime/MTOServiceItemDomesticStandaloneCrating.yaml' MTOServiceItemOriginSIT: # spectral oas2-unused-definition is OK here due to polymorphism $ref: 'definitions/prime/MTOServiceItemOriginSIT.yaml' MTOServiceItemShuttle: # spectral oas2-unused-definition is OK here due to polymorphism diff --git a/swagger-def/support.yaml b/swagger-def/support.yaml index 5030b154b46..1e6599b6067 100644 --- a/swagger-def/support.yaml +++ b/swagger-def/support.yaml @@ -1256,8 +1256,8 @@ definitions: - item - crate - description - MTOServiceItemStandaloneCrating: # spectral oas2-unused-definition is OK here due to polymorphism - description: Describes a standalone crating/uncrating service item subtype of a MTOServiceItem. + MTOServiceItemDomesticStandaloneCrating: # spectral oas2-unused-definition is OK here due to polymorphism + description: Describes a standalone crating service item subtype of a MTOServiceItem. allOf: - $ref: '#/definitions/MTOServiceItem' - type: object @@ -1266,8 +1266,7 @@ definitions: type: string description: Service codes allowed for this model type. enum: - - SCRT # Standalone Crating - - SUCRT # Standalone Uncrating + - DCRTSA # Domestic Standalone Crating item: $ref: '#/definitions/MTOServiceItemDimension' crate: @@ -1289,7 +1288,7 @@ definitions: * DDFSIT, DDASIT - MTOServiceItemDestSIT * DOSHUT, DDSHUT - MTOServiceItemShuttle * DCRT, DUCRT - MTOServiceItemDomesticCrating - * SCRT, SUCRT - MTOServiceItemStandaloneCrating + * DCRTSA- MTOServiceItemDomesticStandaloneCrating The documentation will then update with the supported fields. @@ -1300,7 +1299,7 @@ definitions: - MTOServiceItemDestSIT - MTOServiceItemShuttle - MTOServiceItemDomesticCrating - - MTOServiceItemStandaloneCrating + - MTOServiceItemDomesticStandaloneCrating MTOServiceItemOriginSIT: # spectral oas2-unused-definition is OK here due to polymorphism description: Describes a domestic origin SIT service item. Subtype of a MTOServiceItem. allOf: diff --git a/swagger/prime.yaml b/swagger/prime.yaml index 2eb6f3fc46e..83bc72def4b 100644 --- a/swagger/prime.yaml +++ b/swagger/prime.yaml @@ -2302,10 +2302,8 @@ definitions: - item - crate - description - MTOServiceItemStandaloneCrating: - description: >- - Describes a standard crating/uncrating service item subtype of a - MTOServiceItem. + MTOServiceItemDomesticStandaloneCrating: + description: Describes a standard crating service item subtype of a MTOServiceItem. allOf: - $ref: '#/definitions/MTOServiceItem' - type: object @@ -2314,10 +2312,9 @@ definitions: type: string description: >- A unique code for the service item. Indicates if the service is - for crating (SCRT) or uncrating (SUCRT). + for crating (DCRTSA). enum: - - SCRT - - SUCRT + - DCRTSA item: description: The dimensions of the item being crated. allOf: @@ -2334,9 +2331,9 @@ definitions: type: string example: Storage items need to be picked up description: > - The contractor's explanation for why an item needed to be crated - or uncrated. Used by the TOO while deciding to approve or reject - the service item. + The customer's explanation for why an item needed to be crated or + uncrated. Used by the TOO while deciding to approve or reject the + service item. x-nullable: true x-omitempty: false required: @@ -3566,7 +3563,7 @@ definitions: * DDFSIT, DDASIT - MTOServiceItemDestSIT * DOSHUT, DDSHUT - MTOServiceItemShuttle * DCRT, DUCRT - MTOServiceItemDomesticCrating - * SCRT - MTOServiceItemStandaloneCrating + * DCRTSA - MTOServiceItemDomesticStandaloneCrating The documentation will then update with the supported fields. type: string @@ -3576,7 +3573,7 @@ definitions: - MTOServiceItemDestSIT - MTOServiceItemShuttle - MTOServiceItemDomesticCrating - - MTOServiceItemStandaloneCrating + - MTOServiceItemDomesticStandaloneCrating ServiceRequestDocument: properties: uploads: diff --git a/swagger/prime_v2.yaml b/swagger/prime_v2.yaml index dcdfde71261..80aa30dda3b 100644 --- a/swagger/prime_v2.yaml +++ b/swagger/prime_v2.yaml @@ -469,7 +469,7 @@ definitions: type: string description: >- A unique code for the service item. Indicates if the service is - for crating (SCRT) or uncrating (SUCRT). + for crating (DCRT) or uncrating (DUCRT). enum: - DCRT - DUCRT @@ -499,10 +499,8 @@ definitions: - item - crate - description - MTOServiceItemStandaloneCrating: - description: >- - Describes a standard crating/uncrating service item subtype of a - MTOServiceItem. + MTOServiceItemDomesticStandaloneCrating: + description: Describes a standard crating service item subtype of a MTOServiceItem. allOf: - $ref: '#/definitions/MTOServiceItem' - type: object @@ -511,10 +509,9 @@ definitions: type: string description: >- A unique code for the service item. Indicates if the service is - for crating (DCRT) or uncrating (DUCRT). + for crating (DCRTSA). enum: - - SCRT - - SUCRT + - DCRTSA item: description: The dimensions of the item being crated. allOf: @@ -531,9 +528,9 @@ definitions: type: string example: Storage items need to be picked up description: > - The contractor's explanation for why an item needed to be crated - or uncrated. Used by the TOO while deciding to approve or reject - the service item. + The customer's explanation for why an item needed to be crated or + uncrated. Used by the TOO while deciding to approve or reject the + service item. x-nullable: true x-omitempty: false required: @@ -1972,7 +1969,7 @@ definitions: * DDFSIT, DDASIT - MTOServiceItemDestSIT * DOSHUT, DDSHUT - MTOServiceItemShuttle * DCRT, DUCRT - MTOServiceItemDomesticCrating - * SCRT - MTOServiceItemStandaloneCrating + * DCRTSA - MTOServiceItemDomesticStandaloneCrating The documentation will then update with the supported fields. type: string @@ -1982,7 +1979,7 @@ definitions: - MTOServiceItemDestSIT - MTOServiceItemShuttle - MTOServiceItemDomesticCrating - - MTOServiceItemStandaloneCrating + - MTOServiceItemDomesticStandaloneCrating ServiceRequestDocument: properties: uploads: diff --git a/swagger/prime_v3.yaml b/swagger/prime_v3.yaml index 51f3e29edb2..705ed82aaa2 100644 --- a/swagger/prime_v3.yaml +++ b/swagger/prime_v3.yaml @@ -474,10 +474,8 @@ definitions: - item - crate - description - MTOServiceItemStandaloneCrating: - description: >- - Describes a standard crating/uncrating service item subtype of a - MTOServiceItem. + MTOServiceItemDomesticStandaloneCrating: + description: Describes a standard crating service item subtype of a MTOServiceItem. allOf: - $ref: '#/definitions/MTOServiceItem' - type: object @@ -486,10 +484,9 @@ definitions: type: string description: >- A unique code for the service item. Indicates if the service is - for crating (SCRT) or uncrating (SUCRT). + for crating (DCRTSA). enum: - - SCRT - - SUCRT + - DCRTSA item: description: The dimensions of the item being crated. allOf: @@ -506,9 +503,9 @@ definitions: type: string example: Storage items need to be picked up description: > - The contractor's explanation for why an item needed to be crated - or uncrated. Used by the TOO while deciding to approve or reject - the service item. + The customer's explanation for why an item needed to be crated or + uncrated. Used by the TOO while deciding to approve or reject the + service item. x-nullable: true x-omitempty: false required: @@ -1918,7 +1915,7 @@ definitions: * DDFSIT, DDASIT - MTOServiceItemDestSIT * DOSHUT, DDSHUT - MTOServiceItemShuttle * DCRT, DUCRT - MTOServiceItemDomesticCrating - * SCRT - MTOServiceItemStandaloneCrating + * DCRTSA - MTOServiceItemDomesticStandaloneCrating The documentation will then update with the supported fields. type: string @@ -1928,7 +1925,7 @@ definitions: - MTOServiceItemDestSIT - MTOServiceItemShuttle - MTOServiceItemDomesticCrating - - MTOServiceItemStandaloneCrating + - MTOServiceItemDomesticStandaloneCrating ServiceRequestDocument: properties: uploads: diff --git a/swagger/support.yaml b/swagger/support.yaml index 5ef620b202b..2e9d1faef0b 100644 --- a/swagger/support.yaml +++ b/swagger/support.yaml @@ -1358,10 +1358,8 @@ definitions: - item - crate - description - MTOServiceItemStandaloneCrating: - description: >- - Describes a standalone crating/uncrating service item subtype of a - MTOServiceItem. + MTOServiceItemDomesticStandaloneCrating: + description: Describes a standalone crating service item subtype of a MTOServiceItem. allOf: - $ref: '#/definitions/MTOServiceItem' - type: object @@ -1370,8 +1368,7 @@ definitions: type: string description: Service codes allowed for this model type. enum: - - SCRT - - SUCRT + - DCRTSA item: $ref: '#/definitions/MTOServiceItemDimension' crate: @@ -1395,7 +1392,7 @@ definitions: * DDFSIT, DDASIT - MTOServiceItemDestSIT * DOSHUT, DDSHUT - MTOServiceItemShuttle * DCRT, DUCRT - MTOServiceItemDomesticCrating - * SCRT, SUCRT - MTOServiceItemStandaloneCrating + * DCRTSA- MTOServiceItemDomesticStandaloneCrating The documentation will then update with the supported fields. type: string @@ -1405,7 +1402,7 @@ definitions: - MTOServiceItemDestSIT - MTOServiceItemShuttle - MTOServiceItemDomesticCrating - - MTOServiceItemStandaloneCrating + - MTOServiceItemDomesticStandaloneCrating MTOServiceItemOriginSIT: description: Describes a domestic origin SIT service item. Subtype of a MTOServiceItem. allOf: