From 753828878de59f02fd6da9b3cd25de2b51bb45ed Mon Sep 17 00:00:00 2001 From: JamesHawks224 <146897935+JamesHawks224@users.noreply.github.com> Date: Thu, 17 Oct 2024 14:28:21 +0000 Subject: [PATCH 01/15] added db changes --- migrations/app/migrations_manifest.txt | 1 + ...01326_changes_for_actual_expense_reimbursement_field.up.sql | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 migrations/app/schema/20241011201326_changes_for_actual_expense_reimbursement_field.up.sql diff --git a/migrations/app/migrations_manifest.txt b/migrations/app/migrations_manifest.txt index 80635ac6586..158c6c4705a 100644 --- a/migrations/app/migrations_manifest.txt +++ b/migrations/app/migrations_manifest.txt @@ -1001,3 +1001,4 @@ 20240917165710_update_duty_locations_provides_services_counseling.up.sql 20240930171315_updatePostalCodeToGbloc233BGNC.up.sql 20241001174400_add_is_oconus_column.up.sql +20241011201326_changes_for_actual_expense_reimbursement_field.up.sql diff --git a/migrations/app/schema/20241011201326_changes_for_actual_expense_reimbursement_field.up.sql b/migrations/app/schema/20241011201326_changes_for_actual_expense_reimbursement_field.up.sql new file mode 100644 index 00000000000..b859bcfb5ce --- /dev/null +++ b/migrations/app/schema/20241011201326_changes_for_actual_expense_reimbursement_field.up.sql @@ -0,0 +1,3 @@ +ALTER TABLE ppm_shipments +ADD COLUMN actual_expense_reimbursement BOOLEAN DEFAULT FALSE; +COMMENT on COLUMN mto_service_items.customer_expense IS 'Whether or not the ppm is an actual expense reimbursement'; From 059d0d55838532dee7d554c7600ab86cfdc526cc Mon Sep 17 00:00:00 2001 From: JamesHawks224 <146897935+JamesHawks224@users.noreply.github.com> Date: Thu, 17 Oct 2024 15:01:55 +0000 Subject: [PATCH 02/15] fixed comment in sql --- ...201326_changes_for_actual_expense_reimbursement_field.up.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migrations/app/schema/20241011201326_changes_for_actual_expense_reimbursement_field.up.sql b/migrations/app/schema/20241011201326_changes_for_actual_expense_reimbursement_field.up.sql index b859bcfb5ce..0e314d25366 100644 --- a/migrations/app/schema/20241011201326_changes_for_actual_expense_reimbursement_field.up.sql +++ b/migrations/app/schema/20241011201326_changes_for_actual_expense_reimbursement_field.up.sql @@ -1,3 +1,3 @@ ALTER TABLE ppm_shipments ADD COLUMN actual_expense_reimbursement BOOLEAN DEFAULT FALSE; -COMMENT on COLUMN mto_service_items.customer_expense IS 'Whether or not the ppm is an actual expense reimbursement'; +COMMENT on COLUMN mto_service_items.actual_expense_reimbursement IS 'Whether or not the ppm is an actual expense reimbursement'; From 002c348b2a9b7832d2fad853f80c3a90f2ea22ff Mon Sep 17 00:00:00 2001 From: JamesHawks224 <146897935+JamesHawks224@users.noreply.github.com> Date: Thu, 17 Oct 2024 16:01:39 +0000 Subject: [PATCH 03/15] fixed sql and renamed col --- ...326_changes_for_actual_expense_reimbursement_field.up.sql | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/migrations/app/schema/20241011201326_changes_for_actual_expense_reimbursement_field.up.sql b/migrations/app/schema/20241011201326_changes_for_actual_expense_reimbursement_field.up.sql index 0e314d25366..d753a848388 100644 --- a/migrations/app/schema/20241011201326_changes_for_actual_expense_reimbursement_field.up.sql +++ b/migrations/app/schema/20241011201326_changes_for_actual_expense_reimbursement_field.up.sql @@ -1,3 +1,4 @@ +-- adding boolean for actual expense reimbursement for ppm shipments ALTER TABLE ppm_shipments -ADD COLUMN actual_expense_reimbursement BOOLEAN DEFAULT FALSE; -COMMENT on COLUMN mto_service_items.actual_expense_reimbursement IS 'Whether or not the ppm is an actual expense reimbursement'; +ADD COLUMN is_actual_expense_reimbursement BOOLEAN DEFAULT FALSE; +COMMENT on COLUMN ppm_shipments.is_actual_expense_reimbursement IS 'Whether or not the ppm is an actual expense reimbursement'; From 716dc73c7fe29aa2fa073e506e27a4f2464ea658 Mon Sep 17 00:00:00 2001 From: Brooklyn Welsh Date: Thu, 17 Oct 2024 16:47:52 +0000 Subject: [PATCH 04/15] Added AER definition to generic PPMShipment, UpdatePPMShipment, and CreatePPMShipment definitions. Edited model/payload files to include AER. --- pkg/gen/ghcapi/embedded_spec.go | 36 + pkg/gen/ghcmessages/create_p_p_m_shipment.go | 4 + pkg/gen/ghcmessages/p_p_m_shipment.go | 4 + pkg/gen/ghcmessages/update_p_p_m_shipment.go | 4 + pkg/gen/internalapi/embedded_spec.go | 36 + .../internalmessages/create_p_p_m_shipment.go | 4 + pkg/gen/internalmessages/p_p_m_shipment.go | 4 + .../internalmessages/update_p_p_m_shipment.go | 4 + pkg/gen/primeapi/embedded_spec.go | 36 + .../primemessages/create_p_p_m_shipment.go | 4 + pkg/gen/primemessages/p_p_m_shipment.go | 4 + .../primemessages/update_p_p_m_shipment.go | 4 + pkg/gen/primev2api/embedded_spec.go | 36 + .../primev2messages/create_p_p_m_shipment.go | 4 + pkg/gen/primev2messages/p_p_m_shipment.go | 4 + .../primev2messages/update_p_p_m_shipment.go | 4 + pkg/gen/primev3api/embedded_spec.go | 36 + .../primev3messages/create_p_p_m_shipment.go | 4 + pkg/gen/primev3messages/p_p_m_shipment.go | 4 + .../primev3messages/update_p_p_m_shipment.go | 4 + .../internal/payloads/model_to_payload.go | 5 + .../internal/payloads/model_to_payload.go | 5 + .../primeapi/payloads/model_to_payload.go | 59 +- .../primeapiv2/payloads/model_to_payload.go | 59 +- .../primeapiv3/payloads/model_to_payload.go | 5 + pkg/models/ppm_shipment.go | 1 + swagger-def/definitions/PPMShipment.yaml | 5 + .../definitions/prime/PPMShipment.yaml | 5 + .../definitions/prime/v3/PPMShipment.yaml | 5 + swagger-def/ghc.yaml | 34 +- swagger-def/internal.yaml | 1583 +++++++++-------- swagger-def/prime.yaml | 10 + swagger-def/prime_v2.yaml | 10 + swagger-def/prime_v3.yaml | 10 + swagger/ghc.yaml | 21 + swagger/internal.yaml | 21 + swagger/prime.yaml | 21 + swagger/prime_v2.yaml | 21 + swagger/prime_v3.yaml | 21 + 39 files changed, 1288 insertions(+), 853 deletions(-) diff --git a/pkg/gen/ghcapi/embedded_spec.go b/pkg/gen/ghcapi/embedded_spec.go index 7b290a17180..bb467952448 100644 --- a/pkg/gen/ghcapi/embedded_spec.go +++ b/pkg/gen/ghcapi/embedded_spec.go @@ -7239,6 +7239,12 @@ func init() { "x-nullable": true, "x-omitempty": false }, + "isActualExpenseReimbursement": { + "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", + "type": "boolean", + "x-omitempty": false, + "example": false + }, "pickupAddress": { "allOf": [ { @@ -11015,6 +11021,12 @@ func init() { "readOnly": true, "example": "1f2270c7-7166-40ae-981e-b200ebdf3054" }, + "isActualExpenseReimbursement": { + "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", + "type": "boolean", + "x-omitempty": false, + "example": false + }, "movingExpenses": { "description": "All expense documentation receipt records of this PPM shipment.", "type": "array", @@ -13430,6 +13442,12 @@ func init() { "x-nullable": true, "x-omitempty": false }, + "isActualExpenseReimbursement": { + "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", + "type": "boolean", + "x-omitempty": false, + "example": false + }, "pickupAddress": { "allOf": [ { @@ -22899,6 +22917,12 @@ func init() { "x-nullable": true, "x-omitempty": false }, + "isActualExpenseReimbursement": { + "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", + "type": "boolean", + "x-omitempty": false, + "example": false + }, "pickupAddress": { "allOf": [ { @@ -26748,6 +26772,12 @@ func init() { "readOnly": true, "example": "1f2270c7-7166-40ae-981e-b200ebdf3054" }, + "isActualExpenseReimbursement": { + "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", + "type": "boolean", + "x-omitempty": false, + "example": false + }, "movingExpenses": { "description": "All expense documentation receipt records of this PPM shipment.", "type": "array", @@ -29221,6 +29251,12 @@ func init() { "x-nullable": true, "x-omitempty": false }, + "isActualExpenseReimbursement": { + "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", + "type": "boolean", + "x-omitempty": false, + "example": false + }, "pickupAddress": { "allOf": [ { diff --git a/pkg/gen/ghcmessages/create_p_p_m_shipment.go b/pkg/gen/ghcmessages/create_p_p_m_shipment.go index ca8bcf541c5..26c0677cd74 100644 --- a/pkg/gen/ghcmessages/create_p_p_m_shipment.go +++ b/pkg/gen/ghcmessages/create_p_p_m_shipment.go @@ -53,6 +53,10 @@ type CreatePPMShipment struct { // has tertiary pickup address HasTertiaryPickupAddress *bool `json:"hasTertiaryPickupAddress"` + // Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method. + // Example: false + IsActualExpenseReimbursement bool `json:"isActualExpenseReimbursement"` + // pickup address // Required: true PickupAddress struct { diff --git a/pkg/gen/ghcmessages/p_p_m_shipment.go b/pkg/gen/ghcmessages/p_p_m_shipment.go index 2e946cb06c5..67b4d2f4ba2 100644 --- a/pkg/gen/ghcmessages/p_p_m_shipment.go +++ b/pkg/gen/ghcmessages/p_p_m_shipment.go @@ -118,6 +118,10 @@ type PPMShipment struct { // Format: uuid ID strfmt.UUID `json:"id"` + // Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method. + // Example: false + IsActualExpenseReimbursement bool `json:"isActualExpenseReimbursement"` + // All expense documentation receipt records of this PPM shipment. MovingExpenses []*MovingExpense `json:"movingExpenses"` diff --git a/pkg/gen/ghcmessages/update_p_p_m_shipment.go b/pkg/gen/ghcmessages/update_p_p_m_shipment.go index bdad92b6df2..393adca6e62 100644 --- a/pkg/gen/ghcmessages/update_p_p_m_shipment.go +++ b/pkg/gen/ghcmessages/update_p_p_m_shipment.go @@ -88,6 +88,10 @@ type UpdatePPMShipment struct { // has tertiary pickup address HasTertiaryPickupAddress *bool `json:"hasTertiaryPickupAddress"` + // Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method. + // Example: false + IsActualExpenseReimbursement bool `json:"isActualExpenseReimbursement"` + // pickup address PickupAddress struct { Address diff --git a/pkg/gen/internalapi/embedded_spec.go b/pkg/gen/internalapi/embedded_spec.go index 244fed4dd4f..eee2811728a 100644 --- a/pkg/gen/internalapi/embedded_spec.go +++ b/pkg/gen/internalapi/embedded_spec.go @@ -3867,6 +3867,12 @@ func init() { "x-nullable": true, "x-omitempty": false }, + "isActualExpenseReimbursement": { + "description": "Denotes if this PPM shipment uses the Actual Expense Reimbursement method.", + "type": "boolean", + "x-omitempty": false, + "example": false + }, "pickupAddress": { "$ref": "#/definitions/Address" }, @@ -6163,6 +6169,12 @@ func init() { "readOnly": true, "example": "1f2270c7-7166-40ae-981e-b200ebdf3054" }, + "isActualExpenseReimbursement": { + "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", + "type": "boolean", + "x-omitempty": false, + "example": false + }, "movingExpenses": { "description": "All expense documentation receipt records of this PPM shipment.", "type": "array", @@ -7452,6 +7464,12 @@ func init() { "x-nullable": true, "x-omitempty": false }, + "isActualExpenseReimbursement": { + "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", + "type": "boolean", + "x-omitempty": false, + "example": false + }, "pickupAddress": { "$ref": "#/definitions/Address" }, @@ -12475,6 +12493,12 @@ func init() { "x-nullable": true, "x-omitempty": false }, + "isActualExpenseReimbursement": { + "description": "Denotes if this PPM shipment uses the Actual Expense Reimbursement method.", + "type": "boolean", + "x-omitempty": false, + "example": false + }, "pickupAddress": { "$ref": "#/definitions/Address" }, @@ -14775,6 +14799,12 @@ func init() { "readOnly": true, "example": "1f2270c7-7166-40ae-981e-b200ebdf3054" }, + "isActualExpenseReimbursement": { + "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", + "type": "boolean", + "x-omitempty": false, + "example": false + }, "movingExpenses": { "description": "All expense documentation receipt records of this PPM shipment.", "type": "array", @@ -16066,6 +16096,12 @@ func init() { "x-nullable": true, "x-omitempty": false }, + "isActualExpenseReimbursement": { + "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", + "type": "boolean", + "x-omitempty": false, + "example": false + }, "pickupAddress": { "$ref": "#/definitions/Address" }, diff --git a/pkg/gen/internalmessages/create_p_p_m_shipment.go b/pkg/gen/internalmessages/create_p_p_m_shipment.go index 4457e49a4bf..8b3f9ee2ecf 100644 --- a/pkg/gen/internalmessages/create_p_p_m_shipment.go +++ b/pkg/gen/internalmessages/create_p_p_m_shipment.go @@ -35,6 +35,10 @@ type CreatePPMShipment struct { // has tertiary pickup address HasTertiaryPickupAddress *bool `json:"hasTertiaryPickupAddress"` + // Denotes if this PPM shipment uses the Actual Expense Reimbursement method. + // Example: false + IsActualExpenseReimbursement bool `json:"isActualExpenseReimbursement"` + // pickup address // Required: true PickupAddress *Address `json:"pickupAddress"` diff --git a/pkg/gen/internalmessages/p_p_m_shipment.go b/pkg/gen/internalmessages/p_p_m_shipment.go index 73e32c1085c..e48de90fb0e 100644 --- a/pkg/gen/internalmessages/p_p_m_shipment.go +++ b/pkg/gen/internalmessages/p_p_m_shipment.go @@ -118,6 +118,10 @@ type PPMShipment struct { // Format: uuid ID strfmt.UUID `json:"id"` + // Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method. + // Example: false + IsActualExpenseReimbursement bool `json:"isActualExpenseReimbursement"` + // All expense documentation receipt records of this PPM shipment. MovingExpenses []*MovingExpense `json:"movingExpenses"` diff --git a/pkg/gen/internalmessages/update_p_p_m_shipment.go b/pkg/gen/internalmessages/update_p_p_m_shipment.go index b37d87bf531..8b96c17852d 100644 --- a/pkg/gen/internalmessages/update_p_p_m_shipment.go +++ b/pkg/gen/internalmessages/update_p_p_m_shipment.go @@ -88,6 +88,10 @@ type UpdatePPMShipment struct { // has tertiary pickup address HasTertiaryPickupAddress *bool `json:"hasTertiaryPickupAddress"` + // Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method. + // Example: false + IsActualExpenseReimbursement bool `json:"isActualExpenseReimbursement"` + // pickup address PickupAddress *Address `json:"pickupAddress,omitempty"` diff --git a/pkg/gen/primeapi/embedded_spec.go b/pkg/gen/primeapi/embedded_spec.go index 18efa89bc12..cc9bbb581ce 100644 --- a/pkg/gen/primeapi/embedded_spec.go +++ b/pkg/gen/primeapi/embedded_spec.go @@ -1512,6 +1512,12 @@ func init() { "description": "Indicates whether PPM shipment has pro gear for themselves or their spouse.\n", "type": "boolean" }, + "isActualExpenseReimbursement": { + "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", + "type": "boolean", + "x-omitempty": false, + "example": false + }, "pickupAddress": { "description": "The address of the origin location where goods are being moved from.", "allOf": [ @@ -2999,6 +3005,12 @@ func init() { "readOnly": true, "example": "1f2270c7-7166-40ae-981e-b200ebdf3054" }, + "isActualExpenseReimbursement": { + "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", + "type": "boolean", + "x-omitempty": false, + "example": false + }, "proGearWeight": { "description": "The estimated weight of the pro-gear being moved belonging to the service member in pounds.", "type": "integer", @@ -4102,6 +4114,12 @@ func init() { "type": "boolean", "x-nullable": true }, + "isActualExpenseReimbursement": { + "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", + "type": "boolean", + "x-omitempty": false, + "example": false + }, "proGearWeight": { "description": "The estimated weight of the pro-gear being moved belonging to the service member.", "type": "integer", @@ -6223,6 +6241,12 @@ func init() { "description": "Indicates whether PPM shipment has pro gear for themselves or their spouse.\n", "type": "boolean" }, + "isActualExpenseReimbursement": { + "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", + "type": "boolean", + "x-omitempty": false, + "example": false + }, "pickupAddress": { "description": "The address of the origin location where goods are being moved from.", "allOf": [ @@ -7710,6 +7734,12 @@ func init() { "readOnly": true, "example": "1f2270c7-7166-40ae-981e-b200ebdf3054" }, + "isActualExpenseReimbursement": { + "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", + "type": "boolean", + "x-omitempty": false, + "example": false + }, "proGearWeight": { "description": "The estimated weight of the pro-gear being moved belonging to the service member in pounds.", "type": "integer", @@ -8818,6 +8848,12 @@ func init() { "type": "boolean", "x-nullable": true }, + "isActualExpenseReimbursement": { + "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", + "type": "boolean", + "x-omitempty": false, + "example": false + }, "proGearWeight": { "description": "The estimated weight of the pro-gear being moved belonging to the service member.", "type": "integer", diff --git a/pkg/gen/primemessages/create_p_p_m_shipment.go b/pkg/gen/primemessages/create_p_p_m_shipment.go index 2a9ea5931f0..eadc0cb8652 100644 --- a/pkg/gen/primemessages/create_p_p_m_shipment.go +++ b/pkg/gen/primemessages/create_p_p_m_shipment.go @@ -40,6 +40,10 @@ type CreatePPMShipment struct { // Required: true HasProGear *bool `json:"hasProGear"` + // Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method. + // Example: false + IsActualExpenseReimbursement bool `json:"isActualExpenseReimbursement"` + // The address of the origin location where goods are being moved from. PickupAddress struct { Address diff --git a/pkg/gen/primemessages/p_p_m_shipment.go b/pkg/gen/primemessages/p_p_m_shipment.go index 81d9c66bbac..aacb31c8362 100644 --- a/pkg/gen/primemessages/p_p_m_shipment.go +++ b/pkg/gen/primemessages/p_p_m_shipment.go @@ -94,6 +94,10 @@ type PPMShipment struct { // Format: uuid ID strfmt.UUID `json:"id"` + // Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method. + // Example: false + IsActualExpenseReimbursement bool `json:"isActualExpenseReimbursement"` + // The estimated weight of the pro-gear being moved belonging to the service member in pounds. ProGearWeight *int64 `json:"proGearWeight"` diff --git a/pkg/gen/primemessages/update_p_p_m_shipment.go b/pkg/gen/primemessages/update_p_p_m_shipment.go index 4bd3bb16544..f61c039097b 100644 --- a/pkg/gen/primemessages/update_p_p_m_shipment.go +++ b/pkg/gen/primemessages/update_p_p_m_shipment.go @@ -32,6 +32,10 @@ type UpdatePPMShipment struct { // HasProGear *bool `json:"hasProGear,omitempty"` + // Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method. + // Example: false + IsActualExpenseReimbursement bool `json:"isActualExpenseReimbursement"` + // The estimated weight of the pro-gear being moved belonging to the service member. ProGearWeight *int64 `json:"proGearWeight,omitempty"` diff --git a/pkg/gen/primev2api/embedded_spec.go b/pkg/gen/primev2api/embedded_spec.go index 8f88a501de2..1e9edc8fe3c 100644 --- a/pkg/gen/primev2api/embedded_spec.go +++ b/pkg/gen/primev2api/embedded_spec.go @@ -645,6 +645,12 @@ func init() { "description": "Indicates whether PPM shipment has pro gear for themselves or their spouse.\n", "type": "boolean" }, + "isActualExpenseReimbursement": { + "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", + "type": "boolean", + "x-omitempty": false, + "example": false + }, "pickupAddress": { "description": "The address of the origin location where goods are being moved from.", "allOf": [ @@ -2018,6 +2024,12 @@ func init() { "readOnly": true, "example": "1f2270c7-7166-40ae-981e-b200ebdf3054" }, + "isActualExpenseReimbursement": { + "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", + "type": "boolean", + "x-omitempty": false, + "example": false + }, "proGearWeight": { "description": "The estimated weight of the pro-gear being moved belonging to the service member in pounds.", "type": "integer", @@ -3082,6 +3094,12 @@ func init() { "type": "boolean", "x-nullable": true }, + "isActualExpenseReimbursement": { + "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", + "type": "boolean", + "x-omitempty": false, + "example": false + }, "proGearWeight": { "description": "The estimated weight of the pro-gear being moved belonging to the service member.", "type": "integer", @@ -3991,6 +4009,12 @@ func init() { "description": "Indicates whether PPM shipment has pro gear for themselves or their spouse.\n", "type": "boolean" }, + "isActualExpenseReimbursement": { + "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", + "type": "boolean", + "x-omitempty": false, + "example": false + }, "pickupAddress": { "description": "The address of the origin location where goods are being moved from.", "allOf": [ @@ -5364,6 +5388,12 @@ func init() { "readOnly": true, "example": "1f2270c7-7166-40ae-981e-b200ebdf3054" }, + "isActualExpenseReimbursement": { + "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", + "type": "boolean", + "x-omitempty": false, + "example": false + }, "proGearWeight": { "description": "The estimated weight of the pro-gear being moved belonging to the service member in pounds.", "type": "integer", @@ -6430,6 +6460,12 @@ func init() { "type": "boolean", "x-nullable": true }, + "isActualExpenseReimbursement": { + "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", + "type": "boolean", + "x-omitempty": false, + "example": false + }, "proGearWeight": { "description": "The estimated weight of the pro-gear being moved belonging to the service member.", "type": "integer", diff --git a/pkg/gen/primev2messages/create_p_p_m_shipment.go b/pkg/gen/primev2messages/create_p_p_m_shipment.go index 4d7546f7d8d..0209806c5b9 100644 --- a/pkg/gen/primev2messages/create_p_p_m_shipment.go +++ b/pkg/gen/primev2messages/create_p_p_m_shipment.go @@ -40,6 +40,10 @@ type CreatePPMShipment struct { // Required: true HasProGear *bool `json:"hasProGear"` + // Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method. + // Example: false + IsActualExpenseReimbursement bool `json:"isActualExpenseReimbursement"` + // The address of the origin location where goods are being moved from. PickupAddress struct { Address diff --git a/pkg/gen/primev2messages/p_p_m_shipment.go b/pkg/gen/primev2messages/p_p_m_shipment.go index 4f6e73fb841..34ed504bf79 100644 --- a/pkg/gen/primev2messages/p_p_m_shipment.go +++ b/pkg/gen/primev2messages/p_p_m_shipment.go @@ -94,6 +94,10 @@ type PPMShipment struct { // Format: uuid ID strfmt.UUID `json:"id"` + // Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method. + // Example: false + IsActualExpenseReimbursement bool `json:"isActualExpenseReimbursement"` + // The estimated weight of the pro-gear being moved belonging to the service member in pounds. ProGearWeight *int64 `json:"proGearWeight"` diff --git a/pkg/gen/primev2messages/update_p_p_m_shipment.go b/pkg/gen/primev2messages/update_p_p_m_shipment.go index f29a82a0502..37b672b87e1 100644 --- a/pkg/gen/primev2messages/update_p_p_m_shipment.go +++ b/pkg/gen/primev2messages/update_p_p_m_shipment.go @@ -32,6 +32,10 @@ type UpdatePPMShipment struct { // HasProGear *bool `json:"hasProGear,omitempty"` + // Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method. + // Example: false + IsActualExpenseReimbursement bool `json:"isActualExpenseReimbursement"` + // The estimated weight of the pro-gear being moved belonging to the service member. ProGearWeight *int64 `json:"proGearWeight,omitempty"` diff --git a/pkg/gen/primev3api/embedded_spec.go b/pkg/gen/primev3api/embedded_spec.go index 58d5db32bd6..858405806e2 100644 --- a/pkg/gen/primev3api/embedded_spec.go +++ b/pkg/gen/primev3api/embedded_spec.go @@ -653,6 +653,12 @@ func init() { "description": "Indicates whether PPM shipment has pro gear for themselves or their spouse.\n", "type": "boolean" }, + "isActualExpenseReimbursement": { + "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", + "type": "boolean", + "x-omitempty": false, + "example": false + }, "pickupAddress": { "description": "The address of the origin location where goods are being moved from.", "allOf": [ @@ -2063,6 +2069,12 @@ func init() { "readOnly": true, "example": "1f2270c7-7166-40ae-981e-b200ebdf3054" }, + "isActualExpenseReimbursement": { + "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", + "type": "boolean", + "x-omitempty": false, + "example": false + }, "pickupAddress": { "$ref": "#/definitions/Address" }, @@ -3188,6 +3200,12 @@ func init() { "x-nullable": true, "x-omitempty": false }, + "isActualExpenseReimbursement": { + "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", + "type": "boolean", + "x-omitempty": false, + "example": false + }, "pickupAddress": { "description": "The address of the origin location where goods are being moved from.\n", "allOf": [ @@ -4145,6 +4163,12 @@ func init() { "description": "Indicates whether PPM shipment has pro gear for themselves or their spouse.\n", "type": "boolean" }, + "isActualExpenseReimbursement": { + "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", + "type": "boolean", + "x-omitempty": false, + "example": false + }, "pickupAddress": { "description": "The address of the origin location where goods are being moved from.", "allOf": [ @@ -5555,6 +5579,12 @@ func init() { "readOnly": true, "example": "1f2270c7-7166-40ae-981e-b200ebdf3054" }, + "isActualExpenseReimbursement": { + "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", + "type": "boolean", + "x-omitempty": false, + "example": false + }, "pickupAddress": { "$ref": "#/definitions/Address" }, @@ -6682,6 +6712,12 @@ func init() { "x-nullable": true, "x-omitempty": false }, + "isActualExpenseReimbursement": { + "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", + "type": "boolean", + "x-omitempty": false, + "example": false + }, "pickupAddress": { "description": "The address of the origin location where goods are being moved from.\n", "allOf": [ diff --git a/pkg/gen/primev3messages/create_p_p_m_shipment.go b/pkg/gen/primev3messages/create_p_p_m_shipment.go index 6126c4ec5a0..f9540e952d5 100644 --- a/pkg/gen/primev3messages/create_p_p_m_shipment.go +++ b/pkg/gen/primev3messages/create_p_p_m_shipment.go @@ -41,6 +41,10 @@ type CreatePPMShipment struct { // Required: true HasProGear *bool `json:"hasProGear"` + // Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method. + // Example: false + IsActualExpenseReimbursement bool `json:"isActualExpenseReimbursement"` + // The address of the origin location where goods are being moved from. // Required: true PickupAddress struct { diff --git a/pkg/gen/primev3messages/p_p_m_shipment.go b/pkg/gen/primev3messages/p_p_m_shipment.go index 99a834a1303..5677ac0a643 100644 --- a/pkg/gen/primev3messages/p_p_m_shipment.go +++ b/pkg/gen/primev3messages/p_p_m_shipment.go @@ -110,6 +110,10 @@ type PPMShipment struct { // Format: uuid ID strfmt.UUID `json:"id"` + // Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method. + // Example: false + IsActualExpenseReimbursement bool `json:"isActualExpenseReimbursement"` + // pickup address // Required: true PickupAddress *Address `json:"pickupAddress"` diff --git a/pkg/gen/primev3messages/update_p_p_m_shipment.go b/pkg/gen/primev3messages/update_p_p_m_shipment.go index ead98493601..fa4ff4b69fe 100644 --- a/pkg/gen/primev3messages/update_p_p_m_shipment.go +++ b/pkg/gen/primev3messages/update_p_p_m_shipment.go @@ -50,6 +50,10 @@ type UpdatePPMShipment struct { // has tertiary pickup address HasTertiaryPickupAddress *bool `json:"hasTertiaryPickupAddress"` + // Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method. + // Example: false + IsActualExpenseReimbursement bool `json:"isActualExpenseReimbursement"` + // The address of the origin location where goods are being moved from. // PickupAddress struct { diff --git a/pkg/handlers/ghcapi/internal/payloads/model_to_payload.go b/pkg/handlers/ghcapi/internal/payloads/model_to_payload.go index 63521590ca1..f3e240dd947 100644 --- a/pkg/handlers/ghcapi/internal/payloads/model_to_payload.go +++ b/pkg/handlers/ghcapi/internal/payloads/model_to_payload.go @@ -900,6 +900,7 @@ func PPMShipment(_ storage.FileStorer, ppmShipment *models.PPMShipment) *ghcmess SitEstimatedEntryDate: handlers.FmtDatePtr(ppmShipment.SITEstimatedEntryDate), SitEstimatedDepartureDate: handlers.FmtDatePtr(ppmShipment.SITEstimatedDepartureDate), SitEstimatedCost: handlers.FmtCost(ppmShipment.SITEstimatedCost), + IsActualExpenseReimbursement: *ppmShipment.IsActualExpenseReimbursement, ETag: etag.GenerateEtag(ppmShipment.UpdatedAt), } @@ -933,6 +934,10 @@ func PPMShipment(_ storage.FileStorer, ppmShipment *models.PPMShipment) *ghcmess payloadPPMShipment.TertiaryDestinationAddress = Address(ppmShipment.TertiaryDestinationAddress) } + if ppmShipment.IsActualExpenseReimbursement != nil { + payloadPPMShipment.IsActualExpenseReimbursement = *ppmShipment.IsActualExpenseReimbursement + } + return payloadPPMShipment } diff --git a/pkg/handlers/internalapi/internal/payloads/model_to_payload.go b/pkg/handlers/internalapi/internal/payloads/model_to_payload.go index 96908a15230..0395ae2606a 100644 --- a/pkg/handlers/internalapi/internal/payloads/model_to_payload.go +++ b/pkg/handlers/internalapi/internal/payloads/model_to_payload.go @@ -115,10 +115,15 @@ func PPMShipment(storer storage.FileStorer, ppmShipment *models.PPMShipment) *in WeightTickets: WeightTickets(storer, ppmShipment.WeightTickets), MovingExpenses: MovingExpenses(storer, ppmShipment.MovingExpenses), ProGearWeightTickets: ProGearWeightTickets(storer, ppmShipment.ProgearWeightTickets), + IsActualExpenseReimbursement: *ppmShipment.IsActualExpenseReimbursement, SignedCertification: SignedCertification(ppmShipment.SignedCertification), ETag: etag.GenerateEtag(ppmShipment.UpdatedAt), } + if ppmShipment.IsActualExpenseReimbursement != nil { + payloadPPMShipment.IsActualExpenseReimbursement = *ppmShipment.IsActualExpenseReimbursement + } + return payloadPPMShipment } diff --git a/pkg/handlers/primeapi/payloads/model_to_payload.go b/pkg/handlers/primeapi/payloads/model_to_payload.go index b88d8c7ca9c..6fd28e92353 100644 --- a/pkg/handlers/primeapi/payloads/model_to_payload.go +++ b/pkg/handlers/primeapi/payloads/model_to_payload.go @@ -463,33 +463,34 @@ func PPMShipment(ppmShipment *models.PPMShipment) *primemessages.PPMShipment { } payloadPPMShipment := &primemessages.PPMShipment{ - ID: *handlers.FmtUUID(ppmShipment.ID), - ShipmentID: *handlers.FmtUUID(ppmShipment.ShipmentID), - CreatedAt: strfmt.DateTime(ppmShipment.CreatedAt), - UpdatedAt: strfmt.DateTime(ppmShipment.UpdatedAt), - Status: primemessages.PPMShipmentStatus(ppmShipment.Status), - ExpectedDepartureDate: handlers.FmtDate(ppmShipment.ExpectedDepartureDate), - ActualMoveDate: handlers.FmtDatePtr(ppmShipment.ActualMoveDate), - SubmittedAt: handlers.FmtDateTimePtr(ppmShipment.SubmittedAt), - ReviewedAt: handlers.FmtDateTimePtr(ppmShipment.ReviewedAt), - ApprovedAt: handlers.FmtDateTimePtr(ppmShipment.ApprovedAt), - ActualPickupPostalCode: ppmShipment.ActualPickupPostalCode, - ActualDestinationPostalCode: ppmShipment.ActualDestinationPostalCode, - SitExpected: ppmShipment.SITExpected, - SitEstimatedWeight: handlers.FmtPoundPtr(ppmShipment.SITEstimatedWeight), - SitEstimatedEntryDate: handlers.FmtDatePtr(ppmShipment.SITEstimatedEntryDate), - SitEstimatedDepartureDate: handlers.FmtDatePtr(ppmShipment.SITEstimatedDepartureDate), - SitEstimatedCost: handlers.FmtCost(ppmShipment.SITEstimatedCost), - EstimatedWeight: handlers.FmtPoundPtr(ppmShipment.EstimatedWeight), - EstimatedIncentive: handlers.FmtCost(ppmShipment.EstimatedIncentive), - HasProGear: ppmShipment.HasProGear, - ProGearWeight: handlers.FmtPoundPtr(ppmShipment.ProGearWeight), - SpouseProGearWeight: handlers.FmtPoundPtr(ppmShipment.SpouseProGearWeight), - HasRequestedAdvance: ppmShipment.HasRequestedAdvance, - AdvanceAmountRequested: handlers.FmtCost(ppmShipment.AdvanceAmountRequested), - HasReceivedAdvance: ppmShipment.HasReceivedAdvance, - AdvanceAmountReceived: handlers.FmtCost(ppmShipment.AdvanceAmountReceived), - ETag: etag.GenerateEtag(ppmShipment.UpdatedAt), + ID: *handlers.FmtUUID(ppmShipment.ID), + ShipmentID: *handlers.FmtUUID(ppmShipment.ShipmentID), + CreatedAt: strfmt.DateTime(ppmShipment.CreatedAt), + UpdatedAt: strfmt.DateTime(ppmShipment.UpdatedAt), + Status: primemessages.PPMShipmentStatus(ppmShipment.Status), + ExpectedDepartureDate: handlers.FmtDate(ppmShipment.ExpectedDepartureDate), + ActualMoveDate: handlers.FmtDatePtr(ppmShipment.ActualMoveDate), + SubmittedAt: handlers.FmtDateTimePtr(ppmShipment.SubmittedAt), + ReviewedAt: handlers.FmtDateTimePtr(ppmShipment.ReviewedAt), + ApprovedAt: handlers.FmtDateTimePtr(ppmShipment.ApprovedAt), + ActualPickupPostalCode: ppmShipment.ActualPickupPostalCode, + ActualDestinationPostalCode: ppmShipment.ActualDestinationPostalCode, + SitExpected: ppmShipment.SITExpected, + SitEstimatedWeight: handlers.FmtPoundPtr(ppmShipment.SITEstimatedWeight), + SitEstimatedEntryDate: handlers.FmtDatePtr(ppmShipment.SITEstimatedEntryDate), + SitEstimatedDepartureDate: handlers.FmtDatePtr(ppmShipment.SITEstimatedDepartureDate), + SitEstimatedCost: handlers.FmtCost(ppmShipment.SITEstimatedCost), + EstimatedWeight: handlers.FmtPoundPtr(ppmShipment.EstimatedWeight), + EstimatedIncentive: handlers.FmtCost(ppmShipment.EstimatedIncentive), + HasProGear: ppmShipment.HasProGear, + ProGearWeight: handlers.FmtPoundPtr(ppmShipment.ProGearWeight), + SpouseProGearWeight: handlers.FmtPoundPtr(ppmShipment.SpouseProGearWeight), + HasRequestedAdvance: ppmShipment.HasRequestedAdvance, + AdvanceAmountRequested: handlers.FmtCost(ppmShipment.AdvanceAmountRequested), + HasReceivedAdvance: ppmShipment.HasReceivedAdvance, + AdvanceAmountReceived: handlers.FmtCost(ppmShipment.AdvanceAmountReceived), + IsActualExpenseReimbursement: *ppmShipment.IsActualExpenseReimbursement, + ETag: etag.GenerateEtag(ppmShipment.UpdatedAt), } if ppmShipment.SITLocation != nil { @@ -497,6 +498,10 @@ func PPMShipment(ppmShipment *models.PPMShipment) *primemessages.PPMShipment { payloadPPMShipment.SitLocation = &sitLocation } + if ppmShipment.IsActualExpenseReimbursement != nil { + payloadPPMShipment.IsActualExpenseReimbursement = *ppmShipment.IsActualExpenseReimbursement + } + return payloadPPMShipment } diff --git a/pkg/handlers/primeapiv2/payloads/model_to_payload.go b/pkg/handlers/primeapiv2/payloads/model_to_payload.go index 390687bb545..b223e9bde78 100644 --- a/pkg/handlers/primeapiv2/payloads/model_to_payload.go +++ b/pkg/handlers/primeapiv2/payloads/model_to_payload.go @@ -407,33 +407,34 @@ func PPMShipment(ppmShipment *models.PPMShipment) *primev2messages.PPMShipment { } payloadPPMShipment := &primev2messages.PPMShipment{ - ID: *handlers.FmtUUID(ppmShipment.ID), - ShipmentID: *handlers.FmtUUID(ppmShipment.ShipmentID), - CreatedAt: strfmt.DateTime(ppmShipment.CreatedAt), - UpdatedAt: strfmt.DateTime(ppmShipment.UpdatedAt), - Status: primev2messages.PPMShipmentStatus(ppmShipment.Status), - ExpectedDepartureDate: handlers.FmtDate(ppmShipment.ExpectedDepartureDate), - ActualMoveDate: handlers.FmtDatePtr(ppmShipment.ActualMoveDate), - SubmittedAt: handlers.FmtDateTimePtr(ppmShipment.SubmittedAt), - ReviewedAt: handlers.FmtDateTimePtr(ppmShipment.ReviewedAt), - ApprovedAt: handlers.FmtDateTimePtr(ppmShipment.ApprovedAt), - ActualPickupPostalCode: ppmShipment.ActualPickupPostalCode, - ActualDestinationPostalCode: ppmShipment.ActualDestinationPostalCode, - SitExpected: ppmShipment.SITExpected, - SitEstimatedWeight: handlers.FmtPoundPtr(ppmShipment.SITEstimatedWeight), - SitEstimatedEntryDate: handlers.FmtDatePtr(ppmShipment.SITEstimatedEntryDate), - SitEstimatedDepartureDate: handlers.FmtDatePtr(ppmShipment.SITEstimatedDepartureDate), - SitEstimatedCost: handlers.FmtCost(ppmShipment.SITEstimatedCost), - EstimatedWeight: handlers.FmtPoundPtr(ppmShipment.EstimatedWeight), - EstimatedIncentive: handlers.FmtCost(ppmShipment.EstimatedIncentive), - HasProGear: ppmShipment.HasProGear, - ProGearWeight: handlers.FmtPoundPtr(ppmShipment.ProGearWeight), - SpouseProGearWeight: handlers.FmtPoundPtr(ppmShipment.SpouseProGearWeight), - HasRequestedAdvance: ppmShipment.HasRequestedAdvance, - AdvanceAmountRequested: handlers.FmtCost(ppmShipment.AdvanceAmountRequested), - HasReceivedAdvance: ppmShipment.HasReceivedAdvance, - AdvanceAmountReceived: handlers.FmtCost(ppmShipment.AdvanceAmountReceived), - ETag: etag.GenerateEtag(ppmShipment.UpdatedAt), + ID: *handlers.FmtUUID(ppmShipment.ID), + ShipmentID: *handlers.FmtUUID(ppmShipment.ShipmentID), + CreatedAt: strfmt.DateTime(ppmShipment.CreatedAt), + UpdatedAt: strfmt.DateTime(ppmShipment.UpdatedAt), + Status: primev2messages.PPMShipmentStatus(ppmShipment.Status), + ExpectedDepartureDate: handlers.FmtDate(ppmShipment.ExpectedDepartureDate), + ActualMoveDate: handlers.FmtDatePtr(ppmShipment.ActualMoveDate), + SubmittedAt: handlers.FmtDateTimePtr(ppmShipment.SubmittedAt), + ReviewedAt: handlers.FmtDateTimePtr(ppmShipment.ReviewedAt), + ApprovedAt: handlers.FmtDateTimePtr(ppmShipment.ApprovedAt), + ActualPickupPostalCode: ppmShipment.ActualPickupPostalCode, + ActualDestinationPostalCode: ppmShipment.ActualDestinationPostalCode, + SitExpected: ppmShipment.SITExpected, + SitEstimatedWeight: handlers.FmtPoundPtr(ppmShipment.SITEstimatedWeight), + SitEstimatedEntryDate: handlers.FmtDatePtr(ppmShipment.SITEstimatedEntryDate), + SitEstimatedDepartureDate: handlers.FmtDatePtr(ppmShipment.SITEstimatedDepartureDate), + SitEstimatedCost: handlers.FmtCost(ppmShipment.SITEstimatedCost), + EstimatedWeight: handlers.FmtPoundPtr(ppmShipment.EstimatedWeight), + EstimatedIncentive: handlers.FmtCost(ppmShipment.EstimatedIncentive), + HasProGear: ppmShipment.HasProGear, + ProGearWeight: handlers.FmtPoundPtr(ppmShipment.ProGearWeight), + SpouseProGearWeight: handlers.FmtPoundPtr(ppmShipment.SpouseProGearWeight), + HasRequestedAdvance: ppmShipment.HasRequestedAdvance, + AdvanceAmountRequested: handlers.FmtCost(ppmShipment.AdvanceAmountRequested), + HasReceivedAdvance: ppmShipment.HasReceivedAdvance, + AdvanceAmountReceived: handlers.FmtCost(ppmShipment.AdvanceAmountReceived), + IsActualExpenseReimbursement: *ppmShipment.IsActualExpenseReimbursement, + ETag: etag.GenerateEtag(ppmShipment.UpdatedAt), } if ppmShipment.SITLocation != nil { @@ -441,6 +442,10 @@ func PPMShipment(ppmShipment *models.PPMShipment) *primev2messages.PPMShipment { payloadPPMShipment.SitLocation = &sitLocation } + if ppmShipment.IsActualExpenseReimbursement != nil { + payloadPPMShipment.IsActualExpenseReimbursement = *ppmShipment.IsActualExpenseReimbursement + } + return payloadPPMShipment } diff --git a/pkg/handlers/primeapiv3/payloads/model_to_payload.go b/pkg/handlers/primeapiv3/payloads/model_to_payload.go index f1379579aa4..07890dade5c 100644 --- a/pkg/handlers/primeapiv3/payloads/model_to_payload.go +++ b/pkg/handlers/primeapiv3/payloads/model_to_payload.go @@ -434,6 +434,7 @@ func PPMShipment(ppmShipment *models.PPMShipment) *primev3messages.PPMShipment { AdvanceAmountRequested: handlers.FmtCost(ppmShipment.AdvanceAmountRequested), HasReceivedAdvance: ppmShipment.HasReceivedAdvance, AdvanceAmountReceived: handlers.FmtCost(ppmShipment.AdvanceAmountReceived), + IsActualExpenseReimbursement: *ppmShipment.IsActualExpenseReimbursement, ETag: etag.GenerateEtag(ppmShipment.UpdatedAt), } @@ -456,6 +457,10 @@ func PPMShipment(ppmShipment *models.PPMShipment) *primev3messages.PPMShipment { payloadPPMShipment.SecondaryDestinationAddress = Address(ppmShipment.SecondaryDestinationAddress) } + if ppmShipment.IsActualExpenseReimbursement != nil { + payloadPPMShipment.IsActualExpenseReimbursement = *ppmShipment.IsActualExpenseReimbursement + } + return payloadPPMShipment } diff --git a/pkg/models/ppm_shipment.go b/pkg/models/ppm_shipment.go index 6c2cc9272d9..0d29f5fa0ba 100644 --- a/pkg/models/ppm_shipment.go +++ b/pkg/models/ppm_shipment.go @@ -235,6 +235,7 @@ type PPMShipment struct { AOAPacket *Document `belongs_to:"documents" fk_id:"aoa_packet_id"` PaymentPacketID *uuid.UUID `json:"payment_packet_id" db:"payment_packet_id"` PaymentPacket *Document `belongs_to:"documents" fk_id:"payment_packet_id"` + IsActualExpenseReimbursement *bool `belongs_to:"ppm_shipments" json:"is_actual_expense_reimbursement" db:"is_actual_expense_reimbursement"` } // TableName overrides the table name used by Pop. diff --git a/swagger-def/definitions/PPMShipment.yaml b/swagger-def/definitions/PPMShipment.yaml index 27d77a1a1b3..b81fbc9eaf7 100644 --- a/swagger-def/definitions/PPMShipment.yaml +++ b/swagger-def/definitions/PPMShipment.yaml @@ -228,6 +228,11 @@ properties: type: array items: $ref: 'ProGearWeightTicket.yaml' + isActualExpenseReimbursement: + description: Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method. + type: boolean + example: false + x-omitempty: false signedCertification: $ref: 'SignedCertification.yaml' eTag: diff --git a/swagger-def/definitions/prime/PPMShipment.yaml b/swagger-def/definitions/prime/PPMShipment.yaml index ed5bda88097..742afb432a2 100644 --- a/swagger-def/definitions/prime/PPMShipment.yaml +++ b/swagger-def/definitions/prime/PPMShipment.yaml @@ -163,6 +163,11 @@ properties: format: cents x-nullable: true x-omitempty: false + isActualExpenseReimbursement: + description: Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method. + type: boolean + example: false + x-omitempty: false eTag: description: A hash unique to this shipment that should be used as the "If-Match" header for any updates. type: string diff --git a/swagger-def/definitions/prime/v3/PPMShipment.yaml b/swagger-def/definitions/prime/v3/PPMShipment.yaml index 20d29db9f97..f1ca21773c6 100644 --- a/swagger-def/definitions/prime/v3/PPMShipment.yaml +++ b/swagger-def/definitions/prime/v3/PPMShipment.yaml @@ -191,6 +191,11 @@ properties: format: cents x-nullable: true x-omitempty: false + isActualExpenseReimbursement: + description: Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method. + type: boolean + example: false + x-omitempty: false eTag: description: A hash unique to this shipment that should be used as the "If-Match" header for any updates. type: string diff --git a/swagger-def/ghc.yaml b/swagger-def/ghc.yaml index 05e5799aa1d..d0898f3fed5 100644 --- a/swagger-def/ghc.yaml +++ b/swagger-def/ghc.yaml @@ -4097,18 +4097,18 @@ paths: type: string format: date responses: - "200": + '200': description: Successfully determine if given date is weekend and/or holiday for given country. schema: - $ref: "#/definitions/IsDateWeekendHolidayInfo" - "400": - $ref: "#/responses/InvalidRequest" - "401": - $ref: "#/responses/PermissionDenied" - "404": - $ref: "#/responses/NotFound" - "500": - $ref: "#/responses/ServerError" + $ref: '#/definitions/IsDateWeekendHolidayInfo' + '400': + $ref: '#/responses/InvalidRequest' + '401': + $ref: '#/responses/PermissionDenied' + '404': + $ref: '#/responses/NotFound' + '500': + $ref: '#/responses/ServerError' /moves/{moveID}/assignOfficeUser: parameters: - description: ID of the move @@ -6116,6 +6116,11 @@ definitions: advanceStatus: $ref: 'definitions/PPMAdvanceStatus.yaml' x-nullable: true + isActualExpenseReimbursement: + description: Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method. + type: boolean + example: false + x-omitempty: false UpdateBoatShipment: type: object properties: @@ -6404,7 +6409,7 @@ definitions: ppmShipment: $ref: '#/definitions/CreatePPMShipment' boatShipment: - $ref: "#/definitions/CreateBoatShipment" + $ref: '#/definitions/CreateBoatShipment' required: - moveTaskOrderID - shipmentType @@ -6481,6 +6486,11 @@ definitions: spouseProGearWeight: type: integer x-nullable: true + isActualExpenseReimbursement: + description: Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method. + type: boolean + example: false + x-omitempty: false required: - expectedDepartureDate - pickupAddress @@ -7368,7 +7378,7 @@ definitions: date: type: string format: date - example: "2018-09-25" + example: '2018-09-25' is_weekend: type: boolean is_holiday: diff --git a/swagger-def/internal.yaml b/swagger-def/internal.yaml index 134d05f587a..beb35e44d71 100644 --- a/swagger-def/internal.yaml +++ b/swagger-def/internal.yaml @@ -1,7 +1,7 @@ -swagger: "2.0" +swagger: '2.0' info: description: - $ref: "info/internal_description.md" + $ref: 'info/internal_description.md' version: 0.0.1 title: MilMove Internal API contact: @@ -78,14 +78,14 @@ definitions: example: Doe cac_edipi: type: string - example: "1234567890" + example: '1234567890' maxLength: 10 x-nullable: true UpdateOktaUserProfileData: type: object properties: profile: - $ref: "#/definitions/OktaUserProfileData" + $ref: '#/definitions/OktaUserProfileData' Privilege: type: object properties: @@ -125,13 +125,13 @@ definitions: example: John readOnly: true service_member: - $ref: "#/definitions/ServiceMemberPayload" + $ref: '#/definitions/ServiceMemberPayload' office_user: - $ref: "#/definitions/OfficeUser" + $ref: '#/definitions/OfficeUser' roles: type: array items: - $ref: "#/definitions/Role" + $ref: '#/definitions/Role' x-nullable: true # Here we are returning permissions on the user session to the FE, rather than requiring them on the endpoint. This is why this is permissions rather than x-permissions # TODO: once we have decided on data store and a firm set of permissions, update the entries here to be ENUM type @@ -142,18 +142,18 @@ definitions: privileges: type: array items: - $ref: "#/definitions/Privilege" + $ref: '#/definitions/Privilege' required: - id DutyLocationsPayload: type: array items: - $ref: "definitions/DutyLocationPayload.yaml" + $ref: 'definitions/DutyLocationPayload.yaml' SubmitMoveForApprovalPayload: type: object properties: certificate: - $ref: "#/definitions/CreateSignedCertificationPayload" + $ref: '#/definitions/CreateSignedCertificationPayload' PPMEstimateRange: type: object properties: @@ -184,9 +184,9 @@ definitions: readOnly: true locator: type: string - example: "12432" + example: '12432' status: - $ref: "#/definitions/MoveStatus" + $ref: '#/definitions/MoveStatus' created_at: type: string format: date-time @@ -198,12 +198,12 @@ definitions: format: date-time x-nullable: true mto_shipments: - $ref: "#/definitions/MTOShipments" + $ref: '#/definitions/MTOShipments' closeout_office: - $ref: "definitions/TransportationOffice.yaml" + $ref: 'definitions/TransportationOffice.yaml' cancel_reason: type: string - example: "Change of orders" + example: 'Change of orders' x-nullable: true eTag: type: string @@ -212,7 +212,7 @@ definitions: type: string readOnly: true additionalDocuments: - $ref: "definitions/Document.yaml" + $ref: 'definitions/Document.yaml' required: - id - orders_id @@ -225,7 +225,7 @@ definitions: properties: cancel_reason: type: string - example: "Change of orders" + example: 'Change of orders' x-nullable: true required: - cancel_reason @@ -241,11 +241,11 @@ definitions: IndexMovesPayload: type: array items: - $ref: "#/definitions/MovePayload" + $ref: '#/definitions/MovePayload' MoveDocuments: type: array items: - $ref: "#/definitions/MoveDocumentPayload" + $ref: '#/definitions/MoveDocumentPayload' WeightTicketSetType: type: string x-nullable: true @@ -293,22 +293,22 @@ definitions: example: c56a4180-65aa-42ec-a945-5fd21dec0538 x-nullable: true document: - $ref: "definitions/Document.yaml" + $ref: 'definitions/Document.yaml' title: type: string example: very_useful_document.pdf title: Document title move_document_type: - $ref: "#/definitions/MoveDocumentType" + $ref: '#/definitions/MoveDocumentType' status: - $ref: "#/definitions/MoveDocumentStatus" + $ref: '#/definitions/MoveDocumentStatus' notes: type: string example: This document is good to go! x-nullable: true title: Notes moving_expense_type: - $ref: "definitions/MovingExpenseType.yaml" + $ref: 'definitions/MovingExpenseType.yaml' requested_amount_cents: type: integer format: cents @@ -329,7 +329,7 @@ definitions: type: boolean x-nullable: true weight_ticket_set_type: - $ref: "#/definitions/WeightTicketSetType" + $ref: '#/definitions/WeightTicketSetType' vehicle_nickname: type: string title: Nickname (ex. "15-foot truck") @@ -365,7 +365,7 @@ definitions: weight_ticket_date: title: Weight ticket date type: string - example: "2018-04-26" + example: '2018-04-26' format: date x-nullable: true trailer_ownership_missing: @@ -376,13 +376,13 @@ definitions: type: string format: date title: Start date of storage for storage expenses - example: "2018-04-26" + example: '2018-04-26' x-nullable: true storage_end_date: type: string format: date title: End date of storage for storage expenses - example: "2018-04-26" + example: '2018-04-26' x-nullable: true required: - id @@ -409,7 +409,7 @@ definitions: type: string example: very_useful_document.pdf move_document_type: - $ref: "#/definitions/MoveDocumentType" + $ref: '#/definitions/MoveDocumentType' notes: type: string example: This document is good to go! @@ -441,7 +441,7 @@ definitions: type: object properties: movingExpenseType: - $ref: "definitions/MovingExpenseType.yaml" + $ref: 'definitions/MovingExpenseType.yaml' description: description: A brief description of the expense type: string @@ -506,7 +506,7 @@ definitions: format: uuid example: c56a4180-65aa-42ec-a945-5fd21dec0538 weight_ticket_set_type: - $ref: "#/definitions/WeightTicketSetType" + $ref: '#/definitions/WeightTicketSetType' vehicle_nickname: type: string title: Vehicle nickname (ex. 'Large box truck') @@ -536,7 +536,7 @@ definitions: weight_ticket_date: title: Full Weight Ticket Date type: string - example: "2018-04-26" + example: '2018-04-26' format: date x-nullable: true trailer_ownership_missing: @@ -588,7 +588,7 @@ definitions: TransportationOffices: type: array items: - $ref: "definitions/TransportationOffice.yaml" + $ref: 'definitions/TransportationOffice.yaml' OfficeUser: type: object properties: @@ -630,7 +630,7 @@ definitions: x-nullable: true title: Best contact phone transportation_office: - $ref: "definitions/TransportationOffice.yaml" + $ref: 'definitions/TransportationOffice.yaml' created_at: type: string format: date-time @@ -651,7 +651,7 @@ definitions: edipi: type: string format: edipi - example: "5789345789" + example: '5789345789' pattern: '^\d{10}$' minLength: 10 maxLength: 10 @@ -662,18 +662,18 @@ definitions: pattern: '^\d{7}$' minLength: 7 maxLength: 7 - example: "5789345" + example: '5789345' x-nullable: true title: USCG EMPLID orders: type: array items: - $ref: "#/definitions/Orders" + $ref: '#/definitions/Orders' affiliation: - $ref: "definitions/Affiliation.yaml" + $ref: 'definitions/Affiliation.yaml' title: Branch grade: - $ref: "#/definitions/OrderPayGrade" + $ref: '#/definitions/OrderPayGrade' title: Grade first_name: type: string @@ -725,12 +725,12 @@ definitions: x-nullable: true title: Email residential_address: - $ref: "definitions/Address.yaml" + $ref: 'definitions/Address.yaml' title: Residential Address backup_mailing_address: - $ref: "definitions/Address.yaml" + $ref: 'definitions/Address.yaml' backup_contacts: - $ref: "#/definitions/IndexServiceMemberBackupContactsPayload" + $ref: '#/definitions/IndexServiceMemberBackupContactsPayload' is_profile_complete: type: boolean cac_validated: @@ -742,7 +742,7 @@ definitions: type: string format: date-time weight_allotment: - $ref: "#/definitions/WeightAllotment" + $ref: '#/definitions/WeightAllotment' required: - id - user_id @@ -762,13 +762,13 @@ definitions: pattern: '^\d{10}$' minLength: 10 maxLength: 10 - example: "5789345789" + example: '5789345789' x-nullable: true - title: "DoD ID number" + title: 'DoD ID number' affiliation: - $ref: "definitions/Affiliation.yaml" + $ref: 'definitions/Affiliation.yaml' grade: - $ref: "#/definitions/OrderPayGrade" + $ref: '#/definitions/OrderPayGrade' first_name: type: string example: John @@ -824,9 +824,9 @@ definitions: example: c56a4180-65aa-42ec-a945-5fd21dec0538 x-nullable: true residential_address: - $ref: "definitions/Address.yaml" + $ref: 'definitions/Address.yaml' backup_mailing_address: - $ref: "definitions/Address.yaml" + $ref: 'definitions/Address.yaml' PatchServiceMemberPayload: type: object properties: @@ -840,7 +840,7 @@ definitions: pattern: '^\d{10}$' minLength: 10 maxLength: 10 - example: "5789345789" + example: '5789345789' x-nullable: true title: DoD ID number emplid: @@ -848,11 +848,11 @@ definitions: pattern: '^\d{7}$' minLength: 7 maxLength: 7 - example: "5789345" + example: '5789345' x-nullable: true title: USCG EMPLID affiliation: - $ref: "definitions/Affiliation.yaml" + $ref: 'definitions/Affiliation.yaml' first_name: type: string example: John @@ -908,9 +908,9 @@ definitions: example: c56a4180-65aa-42ec-a945-5fd21dec0538 x-nullable: true residential_address: - $ref: "definitions/Address.yaml" + $ref: 'definitions/Address.yaml' backup_mailing_address: - $ref: "definitions/Address.yaml" + $ref: 'definitions/Address.yaml' ServiceMemberBackupContactPayload: type: object properties: @@ -943,7 +943,7 @@ definitions: x-nullable: true title: Email permission: - $ref: "#/definitions/BackupContactPermission" + $ref: '#/definitions/BackupContactPermission' created_at: type: string format: date-time @@ -991,7 +991,7 @@ definitions: x-nullable: true title: Email permission: - $ref: "#/definitions/BackupContactPermission" + $ref: '#/definitions/BackupContactPermission' required: - name - email @@ -1017,7 +1017,7 @@ definitions: x-nullable: true title: email address permission: - $ref: "#/definitions/BackupContactPermission" + $ref: '#/definitions/BackupContactPermission' required: - name - email @@ -1025,7 +1025,7 @@ definitions: IndexServiceMemberBackupContactsPayload: type: array items: - $ref: "#/definitions/ServiceMemberBackupContactPayload" + $ref: '#/definitions/ServiceMemberBackupContactPayload' SignedCertificationPayload: type: object properties: @@ -1056,9 +1056,9 @@ definitions: format: uuid x-nullable: true ppm_id: - $ref: "definitions/PpmID.yaml" + $ref: 'definitions/PpmID.yaml' certification_type: - $ref: "#/definitions/NullableSignedCertificationType" + $ref: '#/definitions/NullableSignedCertificationType' required: - id - move_id @@ -1084,9 +1084,9 @@ definitions: format: uuid x-nullable: true ppm_id: - $ref: "definitions/PpmID.yaml" + $ref: 'definitions/PpmID.yaml' certification_type: - $ref: "#/definitions/SignedCertificationTypeCreate" + $ref: '#/definitions/SignedCertificationTypeCreate' required: - date - signature @@ -1111,7 +1111,7 @@ definitions: SignedCertifications: type: array items: - $ref: "#/definitions/SignedCertificationPayload" + $ref: '#/definitions/SignedCertificationPayload' NullableSignedCertificationType: type: string enum: @@ -1232,13 +1232,13 @@ definitions: title: Requested Amount description: unit is cents method_of_receipt: - $ref: "#/definitions/MethodOfReceipt" + $ref: '#/definitions/MethodOfReceipt' status: - $ref: "#/definitions/ReimbursementStatus" + $ref: '#/definitions/ReimbursementStatus' requested_date: x-nullable: true type: string - example: "2018-04-26" + example: '2018-04-26' format: date title: Requested Date required: @@ -1274,8 +1274,8 @@ definitions: - SUBMITTED - APPROVED - CANCELED - - "NEEDS SERVICE COUNSELING" - - "APPROVALS REQUESTED" + - 'NEEDS SERVICE COUNSELING' + - 'APPROVALS REQUESTED' x-display-value: DRAFT: Draft SUBMITTED: Submitted @@ -1326,25 +1326,25 @@ definitions: format: uuid example: c56a4180-65aa-42ec-a945-5fd21dec0538 grade: - $ref: "#/definitions/OrderPayGrade" + $ref: '#/definitions/OrderPayGrade' issue_date: type: string description: The date and time that these orders were cut. format: date - example: "2018-04-26" + example: '2018-04-26' title: Date issued report_by_date: type: string description: Report By Date format: date - example: "2018-04-26" + example: '2018-04-26' title: Report by status: - $ref: "#/definitions/OrdersStatus" + $ref: '#/definitions/OrdersStatus' orders_type: - $ref: "definitions/OrdersType.yaml" + $ref: 'definitions/OrdersType.yaml' orders_type_detail: - $ref: "#/definitions/OrdersTypeDetail" + $ref: '#/definitions/OrdersTypeDetail' has_dependents: type: boolean title: Are dependents included in your orders? @@ -1352,29 +1352,29 @@ definitions: type: boolean title: Do you have a spouse who will need to move items related to their occupation (also known as spouse pro-gear)? origin_duty_location: - $ref: "definitions/DutyLocationPayload.yaml" + $ref: 'definitions/DutyLocationPayload.yaml' x-nullable: true originDutyLocationGbloc: type: string title: From what GBLOC do your orders originate? x-nullable: true new_duty_location: - $ref: "definitions/DutyLocationPayload.yaml" + $ref: 'definitions/DutyLocationPayload.yaml' uploaded_orders: - $ref: "definitions/Document.yaml" + $ref: 'definitions/Document.yaml' uploaded_amended_orders: - $ref: "definitions/Document.yaml" + $ref: 'definitions/Document.yaml' uploaded_amended_orders_id: type: string format: uuid example: c56a4180-65aa-42ec-a945-5fd21dec0538 moves: - $ref: "#/definitions/IndexMovesPayload" + $ref: '#/definitions/IndexMovesPayload' orders_number: type: string title: Orders Number x-nullable: true - example: "030-00362" + example: '030-00362' created_at: type: string format: date-time @@ -1384,15 +1384,15 @@ definitions: tac: type: string title: TAC - example: "F8J1" + example: 'F8J1' x-nullable: true sac: type: string title: SAC - example: "N002214CSW32Y9" + example: 'N002214CSW32Y9' x-nullable: true department_indicator: - $ref: "#/definitions/DeptIndicator" + $ref: '#/definitions/DeptIndicator' authorizedWeight: type: integer example: 7000 @@ -1440,18 +1440,18 @@ definitions: type: string description: The date and time that these orders were cut. format: date - example: "2018-04-26" + example: '2018-04-26' title: Orders date report_by_date: type: string description: Report By Date format: date - example: "2018-04-26" + example: '2018-04-26' title: Report-by date orders_type: - $ref: "definitions/OrdersType.yaml" + $ref: 'definitions/OrdersType.yaml' orders_type_detail: - $ref: "#/definitions/OrdersTypeDetail" + $ref: '#/definitions/OrdersTypeDetail' has_dependents: type: boolean title: Are dependents included in your orders? @@ -1466,21 +1466,21 @@ definitions: type: string title: Orders Number x-nullable: true - example: "030-00362" + example: '030-00362' tac: type: string title: TAC - example: "F8J1" + example: 'F8J1' x-nullable: true sac: type: string title: SAC - example: "N002214CSW32Y9" + example: 'N002214CSW32Y9' x-nullable: true department_indicator: - $ref: "#/definitions/DeptIndicator" + $ref: '#/definitions/DeptIndicator' grade: - $ref: "#/definitions/OrderPayGrade" + $ref: '#/definitions/OrderPayGrade' origin_duty_location_id: type: string format: uuid @@ -1520,10 +1520,10 @@ definitions: x-nullable: true locator: type: string - example: "12432" + example: '12432' gbl_number: type: string - example: "LNK12345" + example: 'LNK12345' title: GBL Number x-nullable: true customer_name: @@ -1536,10 +1536,10 @@ definitions: pattern: '^\d{10}$' minLength: 10 maxLength: 10 - example: "5789345789" - title: "DoD ID #" + example: '5789345789' + title: 'DoD ID #' grade: - $ref: "#/definitions/OrderPayGrade" + $ref: '#/definitions/OrderPayGrade' orders_type: type: string title: Move Type @@ -1601,7 +1601,7 @@ definitions: example: 2017-07-21T17:32:28Z x-nullable: true weight_allotment: - $ref: "#/definitions/WeightAllotment" + $ref: '#/definitions/WeightAllotment' branch_of_service: type: string actual_move_date: @@ -1631,13 +1631,13 @@ definitions: start_date: type: string format: date - example: "2018-09-25" + example: '2018-09-25' available: type: array items: type: string format: date - example: "2018-09-25" + example: '2018-09-25' required: - start_date - available @@ -1664,7 +1664,7 @@ definitions: IndexEntitlements: type: object additionalProperties: - $ref: "#/definitions/WeightAllotment" + $ref: '#/definitions/WeightAllotment' RateEnginePostalCodePayload: type: object properties: @@ -1750,11 +1750,11 @@ definitions: pattern: '(^[2-9]\d{2}-\d{3}-\d{4}$)|(^$)' x-nullable: true agentType: - $ref: "#/definitions/MTOAgentType" + $ref: '#/definitions/MTOAgentType' type: object MTOAgents: items: - $ref: "#/definitions/MTOAgent" + $ref: '#/definitions/MTOAgent' type: array MTOShipmentType: type: string @@ -1807,46 +1807,46 @@ definitions: readOnly: true x-nullable: true agents: - $ref: "#/definitions/MTOAgents" + $ref: '#/definitions/MTOAgents' customerRemarks: type: string readOnly: true example: handle with care x-nullable: true ppmShipment: - $ref: "definitions/PPMShipment.yaml" + $ref: 'definitions/PPMShipment.yaml' boatShipment: - $ref: "definitions/BoatShipment.yaml" + $ref: 'definitions/BoatShipment.yaml' mobileHomeShipment: - $ref: "definitions/MobileHome.yaml" + $ref: 'definitions/MobileHome.yaml' shipmentType: - $ref: "#/definitions/MTOShipmentType" + $ref: '#/definitions/MTOShipmentType' status: - $ref: "#/definitions/MTOShipmentStatus" + $ref: '#/definitions/MTOShipmentStatus' pickupAddress: - $ref: "definitions/Address.yaml" + $ref: 'definitions/Address.yaml' destinationAddress: - $ref: "definitions/Address.yaml" + $ref: 'definitions/Address.yaml' secondaryPickupAddress: - $ref: "definitions/Address.yaml" + $ref: 'definitions/Address.yaml' hasSecondaryPickupAddress: type: boolean x-omitempty: false x-nullable: true tertiaryPickupAddress: - $ref: "definitions/Address.yaml" + $ref: 'definitions/Address.yaml' hasTertiaryPickupAddress: type: boolean x-omitempty: false x-nullable: true secondaryDeliveryAddress: - $ref: "definitions/Address.yaml" + $ref: 'definitions/Address.yaml' hasSecondaryDeliveryAddress: type: boolean x-omitempty: false x-nullable: true tertiaryDeliveryAddress: - $ref: "definitions/Address.yaml" + $ref: 'definitions/Address.yaml' hasTertiaryDeliveryAddress: type: boolean x-omitempty: false @@ -1868,7 +1868,7 @@ definitions: example: '1K43AR-01' MTOShipments: items: - $ref: "#/definitions/MTOShipment" + $ref: '#/definitions/MTOShipment' type: array MTOShipmentStatus: type: string @@ -1886,13 +1886,13 @@ definitions: format: uuid type: string shipmentType: - $ref: "#/definitions/MTOShipmentType" + $ref: '#/definitions/MTOShipmentType' ppmShipment: - $ref: "#/definitions/CreatePPMShipment" + $ref: '#/definitions/CreatePPMShipment' boatShipment: - $ref: "#/definitions/CreateBoatShipment" + $ref: '#/definitions/CreateBoatShipment' mobileHomeShipment: - $ref: "#/definitions/CreateMobileHomeShipment" + $ref: '#/definitions/CreateMobileHomeShipment' requestedPickupDate: format: date type: string @@ -1904,19 +1904,19 @@ definitions: example: handle with care x-nullable: true pickupAddress: - $ref: "definitions/Address.yaml" + $ref: 'definitions/Address.yaml' secondaryPickupAddress: - $ref: "definitions/Address.yaml" + $ref: 'definitions/Address.yaml' tertiaryPickupAddress: - $ref: "definitions/Address.yaml" + $ref: 'definitions/Address.yaml' destinationAddress: - $ref: "definitions/Address.yaml" + $ref: 'definitions/Address.yaml' secondaryDeliveryAddress: - $ref: "definitions/Address.yaml" + $ref: 'definitions/Address.yaml' tertiaryDeliveryAddress: - $ref: "definitions/Address.yaml" + $ref: 'definitions/Address.yaml' agents: - $ref: "#/definitions/MTOAgents" + $ref: '#/definitions/MTOAgents' required: - moveTaskOrderID - shipmentType @@ -1929,11 +1929,11 @@ definitions: format: date type: string pickupAddress: - $ref: "definitions/Address.yaml" + $ref: 'definitions/Address.yaml' secondaryPickupAddress: - $ref: "definitions/Address.yaml" + $ref: 'definitions/Address.yaml' destinationAddress: - $ref: "definitions/Address.yaml" + $ref: 'definitions/Address.yaml' secondaryDestinationAddress: $ref: 'definitions/Address.yaml' tertiaryDestinationAddress: @@ -1950,6 +1950,11 @@ definitions: x-omitempty: false sitExpected: type: boolean + isActualExpenseReimbursement: + description: Denotes if this PPM shipment uses the Actual Expense Reimbursement method. + type: boolean + example: false + x-omitempty: false required: - expectedDepartureDate - pickupAddress @@ -1969,7 +1974,7 @@ definitions: type: string x-nullable: true pickupAddress: - $ref: "definitions/Address.yaml" + $ref: 'definitions/Address.yaml' secondaryPickupAddress: $ref: 'definitions/Address.yaml' hasSecondaryPickupAddress: @@ -1988,11 +1993,11 @@ definitions: format: zip type: string title: ZIP - example: "90210" + example: '90210' pattern: ^(\d{5})$ x-nullable: true destinationAddress: - $ref: "definitions/Address.yaml" + $ref: 'definitions/Address.yaml' secondaryDestinationAddress: $ref: 'definitions/Address.yaml' hasSecondaryDestinationAddress: @@ -2011,12 +2016,12 @@ definitions: format: zip type: string title: ZIP - example: "90210" + example: '90210' pattern: ^(\d{5})$ x-nullable: true w2Address: x-nullable: true - $ref: "definitions/Address.yaml" + $ref: 'definitions/Address.yaml' finalIncentive: description: > The final calculated incentive for the PPM shipment. This does not include **SIT** as it is a reimbursement. @@ -2065,6 +2070,11 @@ definitions: type: integer format: cents x-nullable: true + isActualExpenseReimbursement: + description: Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method. + type: boolean + example: false + x-omitempty: false CreateBoatShipment: description: Boat shipment information for the move. properties: @@ -2206,15 +2216,15 @@ definitions: type: object properties: status: - $ref: "#/definitions/MTOShipmentStatus" + $ref: '#/definitions/MTOShipmentStatus' shipmentType: - $ref: "#/definitions/MTOShipmentType" + $ref: '#/definitions/MTOShipmentType' ppmShipment: - $ref: "#/definitions/UpdatePPMShipment" + $ref: '#/definitions/UpdatePPMShipment' boatShipment: - $ref: "#/definitions/UpdateBoatShipment" + $ref: '#/definitions/UpdateBoatShipment' mobileHomeShipment: - $ref: "#/definitions/UpdateMobileHomeShipment" + $ref: '#/definitions/UpdateMobileHomeShipment' requestedPickupDate: format: date type: string @@ -2228,29 +2238,29 @@ definitions: example: handle with care x-nullable: true pickupAddress: - $ref: "definitions/Address.yaml" + $ref: 'definitions/Address.yaml' secondaryPickupAddress: - $ref: "definitions/Address.yaml" + $ref: 'definitions/Address.yaml' hasSecondaryPickupAddress: type: boolean x-nullable: true x-omitempty: false tertiaryPickupAddress: - $ref: "definitions/Address.yaml" + $ref: 'definitions/Address.yaml' hasTertiaryPickupAddress: type: boolean x-nullable: true x-omitempty: false destinationAddress: - $ref: "definitions/Address.yaml" + $ref: 'definitions/Address.yaml' secondaryDeliveryAddress: - $ref: "definitions/Address.yaml" + $ref: 'definitions/Address.yaml' hasSecondaryDeliveryAddress: type: boolean x-nullable: true x-omitempty: false tertiaryDeliveryAddress: - $ref: "definitions/Address.yaml" + $ref: 'definitions/Address.yaml' hasTertiaryDeliveryAddress: type: boolean x-nullable: true @@ -2264,7 +2274,7 @@ definitions: x-nullable: true x-omitempty: false agents: - $ref: "#/definitions/MTOAgents" + $ref: '#/definitions/MTOAgents' ClientError: type: object properties: @@ -2281,7 +2291,7 @@ definitions: - instance ValidationError: allOf: - - $ref: "#/definitions/ClientError" + - $ref: '#/definitions/ClientError' - type: object properties: invalidFields: @@ -2312,11 +2322,11 @@ definitions: currentMove: type: array items: - $ref: "#/definitions/InternalMove" + $ref: '#/definitions/InternalMove' previousMoves: type: array items: - $ref: "#/definitions/InternalMove" + $ref: '#/definitions/InternalMove' InternalMove: type: object properties: @@ -2326,7 +2336,7 @@ definitions: type: string moveCode: type: string - example: "HYXFJF" + example: 'HYXFJF' readOnly: true createdAt: format: date-time @@ -2371,7 +2381,7 @@ definitions: date: type: string format: date - example: "2018-09-25" + example: '2018-09-25' is_weekend: type: boolean is_holiday: @@ -2387,7 +2397,7 @@ definitions: CounselingOffices: type: array items: - $ref: "#/definitions/CounselingOffice" + $ref: '#/definitions/CounselingOffice' CounselingOffice: type: object properties: @@ -2428,15 +2438,15 @@ paths: produces: - application/json responses: - "200": + '200': description: Boolean Feature Flag Status schema: - $ref: "definitions/FeatureFlagBoolean.yaml" - "400": + $ref: 'definitions/FeatureFlagBoolean.yaml' + '400': description: invalid request - "401": + '401': description: request requires user authentication - "500": + '500': description: internal server error /feature-flags/user-variant/{key}: post: @@ -2464,15 +2474,15 @@ paths: produces: - application/json responses: - "200": + '200': description: Variant Feature Flag Status schema: - $ref: "definitions/FeatureFlagVariant.yaml" - "400": + $ref: 'definitions/FeatureFlagVariant.yaml' + '400': description: invalid request - "401": + '401': description: request requires user authentication - "500": + '500': description: internal server error /users/logged_in: get: @@ -2482,15 +2492,15 @@ paths: tags: - users responses: - "200": + '200': description: Currently logged in user schema: - $ref: "#/definitions/LoggedInUserPayload" - "400": + $ref: '#/definitions/LoggedInUserPayload' + '400': description: invalid request - "401": + '401': description: request requires user authentication - "500": + '500': description: server error /users/is_logged_in: get: @@ -2500,7 +2510,7 @@ paths: tags: - users responses: - "200": + '200': description: Currently logged in user schema: type: object @@ -2509,9 +2519,9 @@ paths: properties: isLoggedIn: type: boolean - "400": + '400': description: invalid request - "500": + '500': description: server error /application_parameters: post: @@ -2525,17 +2535,17 @@ paths: name: body required: true schema: - $ref: "#/definitions/ApplicationParameters" + $ref: '#/definitions/ApplicationParameters' responses: - "200": + '200': description: Application Parameters schema: - $ref: "#/definitions/ApplicationParameters" - "400": + $ref: '#/definitions/ApplicationParameters' + '400': description: invalid request - "401": + '401': description: request requires user authentication - "500": + '500': description: server error /orders: post: @@ -2549,19 +2559,19 @@ paths: name: createOrders required: true schema: - $ref: "#/definitions/CreateUpdateOrders" + $ref: '#/definitions/CreateUpdateOrders' responses: - "201": + '201': description: created instance of orders schema: - $ref: "#/definitions/Orders" - "400": + $ref: '#/definitions/Orders' + '400': description: invalid request - "401": + '401': description: request requires user authentication - "403": + '403': description: user is not authorized - "500": + '500': description: internal server error /orders/{ordersId}: put: @@ -2581,21 +2591,21 @@ paths: name: updateOrders required: true schema: - $ref: "#/definitions/CreateUpdateOrders" + $ref: '#/definitions/CreateUpdateOrders' responses: - "200": + '200': description: updated instance of orders schema: - $ref: "#/definitions/Orders" - "400": + $ref: '#/definitions/Orders' + '400': description: invalid request - "401": + '401': description: request requires user authentication - "403": + '403': description: user is not authorized - "404": + '404': description: orders not found - "500": + '500': description: internal server error get: summary: Returns the given order @@ -2611,19 +2621,19 @@ paths: required: true description: UUID of the order responses: - "200": + '200': description: the instance of the order schema: - $ref: "#/definitions/Orders" - "400": + $ref: '#/definitions/Orders' + '400': description: invalid request - "401": + '401': description: request requires user authentication - "403": + '403': description: user is not authorized - "404": + '404': description: order is not found - "500": + '500': description: internal server error /orders/{ordersId}/upload_amended_orders: patch: @@ -2647,21 +2657,21 @@ paths: description: The file to upload. required: true responses: - "201": + '201': description: created upload schema: - $ref: "definitions/Upload.yaml" - "400": + $ref: 'definitions/Upload.yaml' + '400': description: invalid request schema: - $ref: "#/definitions/InvalidRequestResponsePayload" - "403": + $ref: '#/definitions/InvalidRequestResponsePayload' + '403': description: not authorized - "404": + '404': description: not found - "413": + '413': description: payload is too large - "500": + '500': description: server error /allmoves/{serviceMemberId}: get: @@ -2681,18 +2691,18 @@ paths: required: true description: UUID of the service member responses: - "200": + '200': description: >- Successfully retrieved moves. A successful fetch might still return zero moves. schema: - $ref: "#/definitions/MovesList" - "401": - $ref: "#/responses/PermissionDenied" - "403": - $ref: "#/responses/PermissionDenied" - "500": - $ref: "#/responses/ServerError" + $ref: '#/definitions/MovesList' + '401': + $ref: '#/responses/PermissionDenied' + '403': + $ref: '#/responses/PermissionDenied' + '500': + $ref: '#/responses/ServerError' /moves/{moveId}: patch: summary: Patches the move @@ -2707,30 +2717,30 @@ paths: format: uuid required: true description: UUID of the move - - $ref: "parameters/ifMatch.yaml" + - $ref: 'parameters/ifMatch.yaml' - in: body name: patchMovePayload required: true schema: - $ref: "#/definitions/PatchMovePayload" + $ref: '#/definitions/PatchMovePayload' responses: - "200": + '200': description: updated instance of move schema: - $ref: "#/definitions/MovePayload" - "400": + $ref: '#/definitions/MovePayload' + '400': description: invalid request - "401": + '401': description: request requires user authentication - "403": + '403': description: user is not authorized - "404": + '404': description: move or closeout office is not found - "412": + '412': description: precondition failed - "422": + '422': description: unprocessable entity - "500": + '500': description: internal server error get: summary: Returns the given move @@ -2746,19 +2756,19 @@ paths: required: true description: UUID of the move responses: - "200": + '200': description: the instance of the move schema: - $ref: "#/definitions/MovePayload" - "400": + $ref: '#/definitions/MovePayload' + '400': description: invalid request - "401": + '401': description: request requires user authentication - "403": + '403': description: user is not authorized - "404": + '404': description: move is not found - "500": + '500': description: internal server error /moves/{moveId}/signed_certifications: post: @@ -2778,21 +2788,21 @@ paths: name: createSignedCertificationPayload required: true schema: - $ref: "#/definitions/CreateSignedCertificationPayload" + $ref: '#/definitions/CreateSignedCertificationPayload' responses: - "201": + '201': description: created instance of signed_certification schema: - $ref: "#/definitions/SignedCertificationPayload" - "400": + $ref: '#/definitions/SignedCertificationPayload' + '400': description: invalid request - "401": + '401': description: request requires user authentication - "403": + '403': description: user is not authorized to sign for this move - "404": + '404': description: move not found - "500": + '500': description: internal server error get: summary: gets the signed certifications for the given move ID @@ -2807,19 +2817,19 @@ paths: format: uuid required: true responses: - "200": + '200': description: returns a list of signed certifications schema: - $ref: "#/definitions/SignedCertifications" - "400": + $ref: '#/definitions/SignedCertifications' + '400': description: invalid request - "401": + '401': description: request requires user authentication - "403": + '403': description: user is not authorized - "404": + '404': description: move not found - "500": + '500': description: internal server error /reimbursement/{reimbursementId}/approve: post: @@ -2836,17 +2846,17 @@ paths: required: true description: UUID of the reimbursement being approved responses: - "200": + '200': description: updated instance of reimbursement schema: - $ref: "#/definitions/Reimbursement" - "400": + $ref: '#/definitions/Reimbursement' + '400': description: invalid request - "401": + '401': description: request requires user authentication - "403": + '403': description: user is not authorized - "500": + '500': description: internal server error /moves/{moveId}/orders: get: @@ -2863,19 +2873,19 @@ paths: required: true description: UUID of the move responses: - "200": + '200': description: the orders information for a move for office use schema: - $ref: "#/definitions/Orders" - "400": + $ref: '#/definitions/Orders' + '400': description: invalid request - "401": + '401': description: request requires user authentication - "403": + '403': description: user is not authorized - "404": + '404': description: move not found - "500": + '500': description: internal server error /moves/{moveId}/move_documents: get: @@ -2892,15 +2902,15 @@ paths: required: true description: UUID of the move responses: - "200": + '200': description: returns list of move douments schema: - $ref: "#/definitions/MoveDocuments" - "400": + $ref: '#/definitions/MoveDocuments' + '400': description: invalid request - "401": + '401': description: request requires user authentication - "403": + '403': description: user is not authorized post: summary: Creates a move document @@ -2919,19 +2929,19 @@ paths: name: createGenericMoveDocumentPayload required: true schema: - $ref: "#/definitions/CreateGenericMoveDocumentPayload" + $ref: '#/definitions/CreateGenericMoveDocumentPayload' responses: - "200": + '200': description: returns new move document object schema: - $ref: "#/definitions/MoveDocumentPayload" - "400": + $ref: '#/definitions/MoveDocumentPayload' + '400': description: invalid request - "401": + '401': description: must be authenticated to use this endpoint - "403": + '403': description: not authorized to modify this move - "500": + '500': description: server error /move_documents/{moveDocumentId}: put: @@ -2951,21 +2961,21 @@ paths: name: updateMoveDocument required: true schema: - $ref: "#/definitions/MoveDocumentPayload" + $ref: '#/definitions/MoveDocumentPayload' responses: - "200": + '200': description: updated instance of move document schema: - $ref: "#/definitions/MoveDocumentPayload" - "400": + $ref: '#/definitions/MoveDocumentPayload' + '400': description: invalid request - "401": + '401': description: request requires user authentication - "403": + '403': description: user is not authorized - "404": + '404': description: move document not found - "500": + '500': description: internal server error delete: summary: Deletes a move document @@ -2981,17 +2991,17 @@ paths: required: true description: UUID of the move document model responses: - "204": + '204': description: deleted - "400": + '400': description: invalid request schema: - $ref: "#/definitions/InvalidRequestResponsePayload" - "403": + $ref: '#/definitions/InvalidRequestResponsePayload' + '403': description: not authorized - "404": + '404': description: not found - "500": + '500': description: server error /moves/{moveId}/approve: post: @@ -3008,21 +3018,21 @@ paths: required: true description: UUID of the move responses: - "200": + '200': description: returns updated (approved) move object schema: - $ref: "#/definitions/MovePayload" - "400": + $ref: '#/definitions/MovePayload' + '400': description: invalid request - "401": + '401': description: must be authenticated to use this endpoint - "403": + '403': description: not authorized to approve this move - "409": + '409': description: the move is not in a state to be approved schema: - $ref: "#/definitions/MovePayload" - "500": + $ref: '#/definitions/MovePayload' + '500': description: server error /moves/{moveId}/submit: post: @@ -3042,23 +3052,23 @@ paths: in: body required: true schema: - $ref: "#/definitions/SubmitMoveForApprovalPayload" + $ref: '#/definitions/SubmitMoveForApprovalPayload' responses: - "200": + '200': description: returns updated (submitted) move object schema: - $ref: "#/definitions/MovePayload" - "400": + $ref: '#/definitions/MovePayload' + '400': description: invalid request - "401": + '401': description: must be authenticated to use this endpoint - "403": + '403': description: not authorized to approve this move - "409": + '409': description: the move is not in a state to be approved schema: - $ref: "#/definitions/MovePayload" - "500": + $ref: '#/definitions/MovePayload' + '500': description: server error /moves/{moveId}/cancel: post: @@ -3078,29 +3088,28 @@ paths: name: cancelMove required: true schema: - $ref: "#/definitions/CancelMove" + $ref: '#/definitions/CancelMove' responses: - "200": + '200': description: returns updated (canceled) move object schema: - $ref: "#/definitions/MovePayload" - "400": + $ref: '#/definitions/MovePayload' + '400': description: invalid request - "401": + '401': description: must be authenticated to use this endpoint - "403": + '403': description: not authorized to cancel this move - "409": + '409': description: the move is not in a state to be canceled schema: - $ref: "#/definitions/MovePayload" - "500": + $ref: '#/definitions/MovePayload' + '500': description: server error /moves/{moveId}/submit_amended_orders: post: summary: Submits amended orders for review - description: - Submits amended orders for review by the office. The status of the move will be updated to an + description: Submits amended orders for review by the office. The status of the move will be updated to an appropriate status depending on whether it needs services counseling or not. operationId: submitAmendedOrders tags: @@ -3113,21 +3122,21 @@ paths: required: true description: UUID of the move responses: - "200": + '200': description: returns updated (submitted) move object schema: - $ref: "#/definitions/MovePayload" - "400": + $ref: '#/definitions/MovePayload' + '400': description: invalid request - "401": + '401': description: must be authenticated to use this endpoint - "403": + '403': description: not authorized to approve this move - "409": + '409': description: the move is not in a state to be approved schema: - $ref: "#/definitions/MovePayload" - "500": + $ref: '#/definitions/MovePayload' + '500': description: server error /ppm-shipments/{ppmShipmentId}/aoa-packet: parameters: @@ -3150,7 +3159,7 @@ paths: produces: - application/pdf responses: - "200": + '200': headers: Content-Disposition: type: string @@ -3218,15 +3227,15 @@ paths: name: documentPayload required: true schema: - $ref: "#/definitions/PostDocumentPayload" + $ref: '#/definitions/PostDocumentPayload' responses: - "201": + '201': description: created document schema: - $ref: "definitions/Document.yaml" - "400": + $ref: 'definitions/Document.yaml' + '400': description: invalid request - "500": + '500': description: server error /documents/{documentId}: get: @@ -3243,19 +3252,19 @@ paths: required: true description: UUID of the document to return responses: - "200": + '200': description: the requested document schema: - $ref: "definitions/Document.yaml" - "400": + $ref: 'definitions/Document.yaml' + '400': description: invalid request schema: - $ref: "#/definitions/InvalidRequestResponsePayload" - "403": + $ref: '#/definitions/InvalidRequestResponsePayload' + '403': description: not authorized - "404": + '404': description: not found - "500": + '500': description: server error /uploads/{uploadId}: delete: @@ -3287,17 +3296,17 @@ paths: format: uuid description: Optional PPM shipment ID related to the upload responses: - "204": + '204': description: deleted - "400": + '400': description: invalid request schema: - $ref: "#/definitions/InvalidRequestResponsePayload" - "403": + $ref: '#/definitions/InvalidRequestResponsePayload' + '403': description: not authorized - "404": + '404': description: not found - "500": + '500': description: server error /uploads: post: @@ -3321,21 +3330,21 @@ paths: description: The file to upload. required: true responses: - "201": + '201': description: created upload schema: - $ref: "definitions/Upload.yaml" - "400": + $ref: 'definitions/Upload.yaml' + '400': description: invalid request schema: - $ref: "#/definitions/InvalidRequestResponsePayload" - "403": + $ref: '#/definitions/InvalidRequestResponsePayload' + '403': description: not authorized - "404": + '404': description: not found - "413": + '413': description: payload is too large - "500": + '500': description: server error delete: summary: Deletes a collection of uploads @@ -3353,17 +3362,17 @@ paths: required: true description: Array of UUIDs to be deleted responses: - "204": + '204': description: deleted - "400": + '400': description: invalid request schema: - $ref: "#/definitions/InvalidRequestResponsePayload" - "403": + $ref: '#/definitions/InvalidRequestResponsePayload' + '403': description: not authorized - "404": + '404': description: not found - "500": + '500': description: server error /service_members: post: @@ -3377,21 +3386,21 @@ paths: name: createServiceMemberPayload required: true schema: - $ref: "#/definitions/CreateServiceMemberPayload" + $ref: '#/definitions/CreateServiceMemberPayload' responses: - "201": + '201': description: created instance of service member schema: - $ref: "#/definitions/ServiceMemberPayload" - "400": + $ref: '#/definitions/ServiceMemberPayload' + '400': description: invalid request - "401": + '401': description: request requires user authentication - "403": + '403': description: user is not authorized - "404": + '404': description: service member not found - "500": + '500': description: internal server error /service_members/{serviceMemberId}: get: @@ -3408,19 +3417,19 @@ paths: required: true description: UUID of the service member responses: - "200": + '200': description: the instance of the service member schema: - $ref: "#/definitions/ServiceMemberPayload" - "400": + $ref: '#/definitions/ServiceMemberPayload' + '400': description: invalid request - "401": + '401': description: request requires user authentication - "403": + '403': description: user is not authorized - "404": + '404': description: service member not found - "500": + '500': description: internal server error patch: summary: Patches the service member @@ -3439,21 +3448,21 @@ paths: name: patchServiceMemberPayload required: true schema: - $ref: "#/definitions/PatchServiceMemberPayload" + $ref: '#/definitions/PatchServiceMemberPayload' responses: - "200": + '200': description: updated instance of service member schema: - $ref: "#/definitions/ServiceMemberPayload" - "400": + $ref: '#/definitions/ServiceMemberPayload' + '400': description: invalid request - "401": + '401': description: request requires user authentication - "403": + '403': description: user is not authorized - "404": + '404': description: service member not found - "500": + '500': description: internal server error /service_members/{serviceMemberId}/current_orders: get: @@ -3470,19 +3479,19 @@ paths: required: true description: UUID of the service member responses: - "200": + '200': description: the instance of the service member schema: - $ref: "#/definitions/Orders" - "400": + $ref: '#/definitions/Orders' + '400': description: invalid request - "401": + '401': description: request requires user authentication - "403": + '403': description: user is not authorized - "404": + '404': description: service member not found - "500": + '500': description: internal server error /service_members/{serviceMemberId}/backup_contacts: post: @@ -3496,7 +3505,7 @@ paths: name: createBackupContactPayload required: true schema: - $ref: "#/definitions/CreateServiceMemberBackupContactPayload" + $ref: '#/definitions/CreateServiceMemberBackupContactPayload' - in: path name: serviceMemberId type: string @@ -3504,19 +3513,19 @@ paths: required: true description: UUID of the service member responses: - "201": + '201': description: created instance of service member backup contact schema: - $ref: "#/definitions/ServiceMemberBackupContactPayload" - "400": + $ref: '#/definitions/ServiceMemberBackupContactPayload' + '400': description: invalid request - "401": + '401': description: request requires user authentication - "403": + '403': description: user is not authorized to create this backup contact - "404": + '404': description: contact not found - "500": + '500': description: internal server error get: summary: List all service member backup contacts @@ -3532,19 +3541,19 @@ paths: required: true description: UUID of the service member responses: - "200": + '200': description: list of service member backup contacts schema: - $ref: "#/definitions/IndexServiceMemberBackupContactsPayload" - "400": + $ref: '#/definitions/IndexServiceMemberBackupContactsPayload' + '400': description: invalid request - "401": + '401': description: request requires user authentication - "403": + '403': description: user is not authorized to see this backup contact - "404": + '404': description: contact not found - "500": + '500': description: internal server error /backup_contacts/{backupContactId}: get: @@ -3561,19 +3570,19 @@ paths: required: true description: UUID of the service member backup contact responses: - "200": + '200': description: the instance of the service member backup contact schema: - $ref: "#/definitions/ServiceMemberBackupContactPayload" - "400": + $ref: '#/definitions/ServiceMemberBackupContactPayload' + '400': description: invalid request - "401": + '401': description: request requires user authentication - "403": + '403': description: user is not authorized - "404": + '404': description: backup contact not found - "500": + '500': description: internal server error put: summary: Updates a service member backup contact @@ -3586,7 +3595,7 @@ paths: name: updateServiceMemberBackupContactPayload required: true schema: - $ref: "#/definitions/UpdateServiceMemberBackupContactPayload" + $ref: '#/definitions/UpdateServiceMemberBackupContactPayload' - in: path name: backupContactId type: string @@ -3594,19 +3603,19 @@ paths: required: true description: UUID of the service member backup contact responses: - "201": + '201': description: updated instance of backup contact schema: - $ref: "#/definitions/ServiceMemberBackupContactPayload" - "400": + $ref: '#/definitions/ServiceMemberBackupContactPayload' + '400': description: invalid request - "401": + '401': description: request requires user authentication - "403": + '403': description: user is not authorized - "404": + '404': description: backup contact not found - "500": + '500': description: internal server error /duty_locations: get: @@ -3622,19 +3631,19 @@ paths: required: true description: Search string for duty locations responses: - "200": + '200': description: the instance of the duty location schema: - $ref: "#/definitions/DutyLocationsPayload" - "400": + $ref: '#/definitions/DutyLocationsPayload' + '400': description: invalid request - "401": + '401': description: request requires user authentication - "403": + '403': description: user is not authorized - "404": + '404': description: matching duty location not found - "500": + '500': description: internal server error /transportation_offices/{dutyLocationId}/counseling_offices: get: @@ -3653,11 +3662,11 @@ paths: produces: - application/json responses: - "200": + '200': description: the instance of the counseling office for a duty location schema: - $ref: "#/definitions/CounselingOffices" - "500": + $ref: '#/definitions/CounselingOffices' + '500': description: internal server error /duty_locations/{dutyLocationId}/transportation_office: get: @@ -3674,19 +3683,19 @@ paths: required: true description: UUID of the duty location responses: - "200": + '200': description: the instance of the transportation office for a duty location schema: - $ref: "definitions/TransportationOffice.yaml" - "400": + $ref: 'definitions/TransportationOffice.yaml' + '400': description: invalid request - "401": + '401': description: request requires user authentication - "403": + '403': description: user is not authorized - "404": + '404': description: transportation office not found - "500": + '500': description: internal server error /transportation-offices: get: @@ -3705,20 +3714,20 @@ paths: minLength: 2 description: Search string for transportation offices responses: - "200": + '200': description: Successfully retrieved transportation offices schema: - $ref: "#/definitions/TransportationOffices" - "400": - $ref: "#/responses/InvalidRequest" - "401": - $ref: "#/responses/PermissionDenied" - "403": - $ref: "#/responses/PermissionDenied" - "404": - $ref: "#/responses/NotFound" - "500": - $ref: "#/responses/ServerError" + $ref: '#/definitions/TransportationOffices' + '400': + $ref: '#/responses/InvalidRequest' + '401': + $ref: '#/responses/PermissionDenied' + '403': + $ref: '#/responses/PermissionDenied' + '404': + $ref: '#/responses/NotFound' + '500': + $ref: '#/responses/ServerError' /queues/{queueType}: get: summary: Show all moves in a queue @@ -3739,19 +3748,19 @@ paths: required: true description: Queue type to show responses: - "200": + '200': description: list all moves in the specified queue schema: type: array items: - $ref: "#/definitions/MoveQueueItem" - "400": + $ref: '#/definitions/MoveQueueItem' + '400': description: invalid request - "401": + '401': description: request requires user authentication - "403": + '403': description: user is not authorized to access this queue - "404": + '404': description: move queue item is not found /entitlements: get: @@ -3761,10 +3770,10 @@ paths: tags: - entitlements responses: - "200": + '200': description: List of weights allotted entitlement schema: - $ref: "#/definitions/IndexEntitlements" + $ref: '#/definitions/IndexEntitlements' /calendar/available_move_dates: get: summary: Returns available dates for the move calendar @@ -3780,17 +3789,17 @@ paths: required: true description: Look for future available dates starting from (and including) this date responses: - "200": + '200': description: List of available dates schema: - $ref: "#/definitions/AvailableMoveDates" - "400": + $ref: '#/definitions/AvailableMoveDates' + '400': description: invalid request - "401": + '401': description: request requires user authentication - "403": + '403': description: user is not authorized - "500": + '500': description: internal server error /moves/{moveId}/weight_ticket: post: @@ -3810,23 +3819,23 @@ paths: name: createWeightTicketDocument required: true schema: - $ref: "#/definitions/CreateWeightTicketDocumentsPayload" + $ref: '#/definitions/CreateWeightTicketDocumentsPayload' responses: - "200": + '200': description: returns new weight ticket document object schema: - $ref: "#/definitions/MoveDocumentPayload" - "400": + $ref: '#/definitions/MoveDocumentPayload' + '400': description: invalid request - "401": + '401': description: must be authenticated to use this endpoint - "403": + '403': description: not authorized to modify this move - "500": + '500': description: server error /ppm-shipments/{ppmShipmentId}/pro-gear-weight-tickets: parameters: - - $ref: "parameters/ppmShipmentId.yaml" + - $ref: 'parameters/ppmShipmentId.yaml' post: summary: Creates a pro-gear weight ticket description: | @@ -3840,26 +3849,26 @@ paths: produces: - application/json responses: - "201": + '201': description: returns a new pro-gear weight ticket object schema: - $ref: "definitions/ProGearWeightTicket.yaml" - "400": - $ref: "#/responses/InvalidRequest" - "401": - $ref: "#/responses/PermissionDenied" - "403": - $ref: "#/responses/PermissionDenied" - "404": - $ref: "#/responses/NotFound" - "412": - $ref: "#/responses/PreconditionFailed" - "422": - $ref: "#/responses/UnprocessableEntity" - "500": - $ref: "#/responses/ServerError" - ? /ppm-shipments/{ppmShipmentId}/pro-gear-weight-tickets/{proGearWeightTicketId} - : patch: + $ref: 'definitions/ProGearWeightTicket.yaml' + '400': + $ref: '#/responses/InvalidRequest' + '401': + $ref: '#/responses/PermissionDenied' + '403': + $ref: '#/responses/PermissionDenied' + '404': + $ref: '#/responses/NotFound' + '412': + $ref: '#/responses/PreconditionFailed' + '422': + $ref: '#/responses/UnprocessableEntity' + '500': + $ref: '#/responses/ServerError' + /ppm-shipments/{ppmShipmentId}/pro-gear-weight-tickets/{proGearWeightTicketId}: + patch: summary: Updates a pro-gear weight ticket description: | Updates a PPM shipment's pro-gear weight ticket with new information. Only some of the fields are editable @@ -3872,33 +3881,33 @@ paths: produces: - application/json parameters: - - $ref: "parameters/ifMatch.yaml" - - $ref: "parameters/ppmShipmentId.yaml" - - $ref: "parameters/proGearWeightTicketId.yaml" + - $ref: 'parameters/ifMatch.yaml' + - $ref: 'parameters/ppmShipmentId.yaml' + - $ref: 'parameters/proGearWeightTicketId.yaml' - in: body name: updateProGearWeightTicket required: true schema: - $ref: "#/definitions/UpdateProGearWeightTicket" + $ref: '#/definitions/UpdateProGearWeightTicket' responses: - "200": + '200': description: returns an updated pro-gear weight ticket object schema: - $ref: "definitions/ProGearWeightTicket.yaml" - "400": - $ref: "#/responses/InvalidRequest" - "401": - $ref: "#/responses/PermissionDenied" - "403": - $ref: "#/responses/PermissionDenied" - "404": - $ref: "#/responses/NotFound" - "412": - $ref: "#/responses/PreconditionFailed" - "422": - $ref: "#/responses/UnprocessableEntity" - "500": - $ref: "#/responses/ServerError" + $ref: 'definitions/ProGearWeightTicket.yaml' + '400': + $ref: '#/responses/InvalidRequest' + '401': + $ref: '#/responses/PermissionDenied' + '403': + $ref: '#/responses/PermissionDenied' + '404': + $ref: '#/responses/NotFound' + '412': + $ref: '#/responses/PreconditionFailed' + '422': + $ref: '#/responses/UnprocessableEntity' + '500': + $ref: '#/responses/ServerError' delete: summary: Soft deletes a pro-gear weight line item by ID description: | @@ -3910,7 +3919,7 @@ paths: produces: - application/json parameters: - - $ref: "parameters/ppmShipmentId.yaml" + - $ref: 'parameters/ppmShipmentId.yaml' - description: ID of the pro-gear weight ticket to be deleted in: path name: proGearWeightTicketId @@ -3918,22 +3927,22 @@ paths: format: uuid type: string responses: - "204": + '204': description: Successfully soft deleted the pro-gear weight ticket - "400": - $ref: "#/responses/InvalidRequest" - "401": - $ref: "#/responses/PermissionDenied" - "403": - $ref: "#/responses/PermissionDenied" - "404": - $ref: "#/responses/NotFound" - "409": - $ref: "#/responses/Conflict" - "422": - $ref: "#/responses/UnprocessableEntity" - "500": - $ref: "#/responses/ServerError" + '400': + $ref: '#/responses/InvalidRequest' + '401': + $ref: '#/responses/PermissionDenied' + '403': + $ref: '#/responses/PermissionDenied' + '404': + $ref: '#/responses/NotFound' + '409': + $ref: '#/responses/Conflict' + '422': + $ref: '#/responses/UnprocessableEntity' + '500': + $ref: '#/responses/ServerError' /moves/{moveId}/uploadAdditionalDocuments: patch: summary: Patch the additional documents for a given move @@ -3956,21 +3965,21 @@ paths: description: The file to upload. required: true responses: - "201": + '201': description: created upload schema: - $ref: "definitions/Upload.yaml" - "400": + $ref: 'definitions/Upload.yaml' + '400': description: invalid request schema: - $ref: "#/definitions/InvalidRequestResponsePayload" - "403": + $ref: '#/definitions/InvalidRequestResponsePayload' + '403': description: not authorized - "404": + '404': description: not found - "413": + '413': description: payload is too large - "500": + '500': description: server error /ppm-shipments/{ppmShipmentId}/moving-expenses: post: @@ -3980,24 +3989,24 @@ paths: tags: - ppm parameters: - - $ref: "parameters/ppmShipmentId.yaml" + - $ref: 'parameters/ppmShipmentId.yaml' responses: - "201": + '201': description: returns new moving expense object schema: - $ref: "definitions/MovingExpense.yaml" - "400": - $ref: "#/responses/InvalidRequest" - "401": - $ref: "#/responses/PermissionDenied" - "403": - $ref: "#/responses/PermissionDenied" - "404": - $ref: "#/responses/NotFound" - "422": - $ref: "#/responses/UnprocessableEntity" - "500": - $ref: "#/responses/ServerError" + $ref: 'definitions/MovingExpense.yaml' + '400': + $ref: '#/responses/InvalidRequest' + '401': + $ref: '#/responses/PermissionDenied' + '403': + $ref: '#/responses/PermissionDenied' + '404': + $ref: '#/responses/NotFound' + '422': + $ref: '#/responses/UnprocessableEntity' + '500': + $ref: '#/responses/ServerError' /ppm-shipments/{ppmShipmentId}/moving-expenses/{movingExpenseId}: patch: summary: Updates the moving expense @@ -4006,33 +4015,33 @@ paths: tags: - ppm parameters: - - $ref: "parameters/ppmShipmentId.yaml" - - $ref: "parameters/movingExpenseId.yaml" - - $ref: "parameters/ifMatch.yaml" + - $ref: 'parameters/ppmShipmentId.yaml' + - $ref: 'parameters/movingExpenseId.yaml' + - $ref: 'parameters/ifMatch.yaml' - in: body name: updateMovingExpense required: true schema: - $ref: "#/definitions/UpdateMovingExpense" + $ref: '#/definitions/UpdateMovingExpense' responses: - "200": + '200': description: returns an updated moving expense object schema: - $ref: "definitions/MovingExpense.yaml" - "400": - $ref: "#/responses/InvalidRequest" - "401": - $ref: "#/responses/PermissionDenied" - "403": - $ref: "#/responses/PermissionDenied" - "404": - $ref: "#/responses/NotFound" - "412": - $ref: "#/responses/PreconditionFailed" - "422": - $ref: "#/responses/UnprocessableEntity" - "500": - $ref: "#/responses/ServerError" + $ref: 'definitions/MovingExpense.yaml' + '400': + $ref: '#/responses/InvalidRequest' + '401': + $ref: '#/responses/PermissionDenied' + '403': + $ref: '#/responses/PermissionDenied' + '404': + $ref: '#/responses/NotFound' + '412': + $ref: '#/responses/PreconditionFailed' + '422': + $ref: '#/responses/UnprocessableEntity' + '500': + $ref: '#/responses/ServerError' delete: summary: Soft deletes a moving expense by ID description: | @@ -4044,7 +4053,7 @@ paths: produces: - application/json parameters: - - $ref: "parameters/ppmShipmentId.yaml" + - $ref: 'parameters/ppmShipmentId.yaml' - description: ID of the moving expense to be deleted in: path name: movingExpenseId @@ -4052,22 +4061,22 @@ paths: format: uuid type: string responses: - "204": + '204': description: Successfully soft deleted the moving expense - "400": - $ref: "#/responses/InvalidRequest" - "401": - $ref: "#/responses/PermissionDenied" - "403": - $ref: "#/responses/PermissionDenied" - "404": - $ref: "#/responses/NotFound" - "409": - $ref: "#/responses/Conflict" - "422": - $ref: "#/responses/UnprocessableEntity" - "500": - $ref: "#/responses/ServerError" + '400': + $ref: '#/responses/InvalidRequest' + '401': + $ref: '#/responses/PermissionDenied' + '403': + $ref: '#/responses/PermissionDenied' + '404': + $ref: '#/responses/NotFound' + '409': + $ref: '#/responses/Conflict' + '422': + $ref: '#/responses/UnprocessableEntity' + '500': + $ref: '#/responses/ServerError' /ppm-shipments/{ppmShipmentId}/weight-ticket: post: summary: Creates a weight ticket document @@ -4076,24 +4085,24 @@ paths: tags: - ppm parameters: - - $ref: "parameters/ppmShipmentId.yaml" + - $ref: 'parameters/ppmShipmentId.yaml' responses: - "200": + '200': description: returns new weight ticket object schema: - $ref: "definitions/WeightTicket.yaml" - "400": - $ref: "#/responses/InvalidRequest" - "401": - $ref: "#/responses/PermissionDenied" - "403": - $ref: "#/responses/PermissionDenied" - "404": - $ref: "#/responses/NotFound" - "422": - $ref: "#/responses/UnprocessableEntity" - "500": - $ref: "#/responses/ServerError" + $ref: 'definitions/WeightTicket.yaml' + '400': + $ref: '#/responses/InvalidRequest' + '401': + $ref: '#/responses/PermissionDenied' + '403': + $ref: '#/responses/PermissionDenied' + '404': + $ref: '#/responses/NotFound' + '422': + $ref: '#/responses/UnprocessableEntity' + '500': + $ref: '#/responses/ServerError' /ppm-shipments/{ppmShipmentId}/weight-ticket/{weightTicketId}: patch: summary: Updates a weight ticket document @@ -4102,33 +4111,33 @@ paths: tags: - ppm parameters: - - $ref: "parameters/ppmShipmentId.yaml" - - $ref: "parameters/weightTicketId.yaml" - - $ref: "parameters/ifMatch.yaml" + - $ref: 'parameters/ppmShipmentId.yaml' + - $ref: 'parameters/weightTicketId.yaml' + - $ref: 'parameters/ifMatch.yaml' - in: body name: updateWeightTicketPayload required: true schema: - $ref: "#/definitions/UpdateWeightTicket" + $ref: '#/definitions/UpdateWeightTicket' responses: - "200": + '200': description: returns an updated weight ticket object schema: - $ref: "definitions/WeightTicket.yaml" - "400": - $ref: "#/responses/InvalidRequest" - "401": - $ref: "#/responses/PermissionDenied" - "403": - $ref: "#/responses/PermissionDenied" - "404": - $ref: "#/responses/NotFound" - "412": - $ref: "#/responses/PreconditionFailed" - "422": - $ref: "#/responses/UnprocessableEntity" - "500": - $ref: "#/responses/ServerError" + $ref: 'definitions/WeightTicket.yaml' + '400': + $ref: '#/responses/InvalidRequest' + '401': + $ref: '#/responses/PermissionDenied' + '403': + $ref: '#/responses/PermissionDenied' + '404': + $ref: '#/responses/NotFound' + '412': + $ref: '#/responses/PreconditionFailed' + '422': + $ref: '#/responses/UnprocessableEntity' + '500': + $ref: '#/responses/ServerError' delete: summary: Soft deletes a weight ticket by ID description: | @@ -4141,7 +4150,7 @@ paths: produces: - application/json parameters: - - $ref: "parameters/ppmShipmentId.yaml" + - $ref: 'parameters/ppmShipmentId.yaml' - description: ID of the weight ticket to be deleted in: path name: weightTicketId @@ -4149,22 +4158,22 @@ paths: format: uuid type: string responses: - "204": + '204': description: Successfully soft deleted the weight ticket - "400": - $ref: "#/responses/InvalidRequest" - "401": - $ref: "#/responses/PermissionDenied" - "403": - $ref: "#/responses/PermissionDenied" - "404": - $ref: "#/responses/NotFound" - "409": - $ref: "#/responses/Conflict" - "422": - $ref: "#/responses/UnprocessableEntity" - "500": - $ref: "#/responses/ServerError" + '400': + $ref: '#/responses/InvalidRequest' + '401': + $ref: '#/responses/PermissionDenied' + '403': + $ref: '#/responses/PermissionDenied' + '404': + $ref: '#/responses/NotFound' + '409': + $ref: '#/responses/Conflict' + '422': + $ref: '#/responses/UnprocessableEntity' + '500': + $ref: '#/responses/ServerError' /ppm-shipments/{ppmShipmentId}/uploads: post: summary: Create a new upload for a PPM weight ticket, pro-gear, or moving expense document @@ -4198,27 +4207,27 @@ paths: description: If the upload is a Weight Receipt required: true responses: - "201": + '201': description: created upload schema: - $ref: "#/definitions/Upload" - "400": + $ref: '#/definitions/Upload' + '400': description: invalid request schema: - $ref: "#/definitions/InvalidRequestResponsePayload" - "403": - $ref: "#/responses/PermissionDenied" - "404": - $ref: "#/responses/NotFound" - "413": + $ref: '#/definitions/InvalidRequestResponsePayload' + '403': + $ref: '#/responses/PermissionDenied' + '404': + $ref: '#/responses/NotFound' + '413': description: payload is too large - "422": - $ref: "#/responses/UnprocessableEntity" - "500": - $ref: "#/responses/ServerError" + '422': + $ref: '#/responses/UnprocessableEntity' + '500': + $ref: '#/responses/ServerError' /ppm-shipments/{ppmShipmentId}/submit-ppm-shipment-documentation: parameters: - - $ref: "parameters/ppmShipmentId.yaml" + - $ref: 'parameters/ppmShipmentId.yaml' post: summary: Saves signature and routes PPM shipment to service counselor description: | @@ -4236,29 +4245,29 @@ paths: name: savePPMShipmentSignedCertificationPayload required: true schema: - $ref: "#/definitions/SavePPMShipmentSignedCertification" + $ref: '#/definitions/SavePPMShipmentSignedCertification' responses: - "200": + '200': description: Returns the updated PPM shipment schema: - $ref: "definitions/PPMShipment.yaml" - "400": - $ref: "#/responses/InvalidRequest" - "401": - $ref: "#/responses/PermissionDenied" - "403": - $ref: "#/responses/PermissionDenied" - "404": - $ref: "#/responses/NotFound" - "409": - $ref: "#/responses/Conflict" - "422": - $ref: "#/responses/UnprocessableEntity" - "500": - $ref: "#/responses/ServerError" - ? /ppm-shipments/{ppmShipmentId}/resubmit-ppm-shipment-documentation/{signedCertificationId} - : parameters: - - $ref: "parameters/ppmShipmentId.yaml" + $ref: 'definitions/PPMShipment.yaml' + '400': + $ref: '#/responses/InvalidRequest' + '401': + $ref: '#/responses/PermissionDenied' + '403': + $ref: '#/responses/PermissionDenied' + '404': + $ref: '#/responses/NotFound' + '409': + $ref: '#/responses/Conflict' + '422': + $ref: '#/responses/UnprocessableEntity' + '500': + $ref: '#/responses/ServerError' + /ppm-shipments/{ppmShipmentId}/resubmit-ppm-shipment-documentation/{signedCertificationId}: + parameters: + - $ref: 'parameters/ppmShipmentId.yaml' put: summary: Updates signature and routes PPM shipment to service counselor description: | @@ -4278,33 +4287,33 @@ paths: type: string format: uuid required: true - - $ref: "parameters/ifMatch.yaml" + - $ref: 'parameters/ifMatch.yaml' - in: body name: savePPMShipmentSignedCertificationPayload required: true schema: - $ref: "#/definitions/SavePPMShipmentSignedCertification" + $ref: '#/definitions/SavePPMShipmentSignedCertification' responses: - "200": + '200': description: Returns the updated PPM shipment schema: - $ref: "definitions/PPMShipment.yaml" - "400": - $ref: "#/responses/InvalidRequest" - "401": - $ref: "#/responses/PermissionDenied" - "403": - $ref: "#/responses/PermissionDenied" - "404": - $ref: "#/responses/NotFound" - "409": - $ref: "#/responses/Conflict" - "412": - $ref: "#/responses/PreconditionFailed" - "422": - $ref: "#/responses/UnprocessableEntity" - "500": - $ref: "#/responses/ServerError" + $ref: 'definitions/PPMShipment.yaml' + '400': + $ref: '#/responses/InvalidRequest' + '401': + $ref: '#/responses/PermissionDenied' + '403': + $ref: '#/responses/PermissionDenied' + '404': + $ref: '#/responses/NotFound' + '409': + $ref: '#/responses/Conflict' + '412': + $ref: '#/responses/PreconditionFailed' + '422': + $ref: '#/responses/UnprocessableEntity' + '500': + $ref: '#/responses/ServerError' /rate_engine_postal_codes/{postal_code}: get: summary: Validate if a zipcode is valid for origin or destination location for a move. @@ -4327,17 +4336,17 @@ paths: - origin - destination responses: - "200": + '200': description: postal_code is valid or invalid schema: - $ref: "#/definitions/RateEnginePostalCodePayload" - "400": + $ref: '#/definitions/RateEnginePostalCodePayload' + '400': description: invalid request - "401": + '401': description: must be authenticated to use this endpoint - "403": + '403': description: user is not authorized - "500": + '500': description: server error /addresses/{addressId}: get: @@ -4354,19 +4363,19 @@ paths: required: true description: UUID of the address to return responses: - "200": + '200': description: the requested address schema: - $ref: "definitions/Address.yaml" - "400": + $ref: 'definitions/Address.yaml' + '400': description: invalid request - "403": + '403': description: not authorized - "404": + '404': description: not found - "500": + '500': description: server error - "/mto_shipments": + '/mto_shipments': post: summary: createMTOShipment description: | @@ -4391,25 +4400,25 @@ paths: - in: body name: body schema: - $ref: "#/definitions/CreateShipment" + $ref: '#/definitions/CreateShipment' responses: - "200": + '200': description: Successfully created a MTO shipment. schema: - $ref: "#/definitions/MTOShipment" - "400": - $ref: "#/responses/InvalidRequest" - "401": - $ref: "#/responses/PermissionDenied" - "403": - $ref: "#/responses/PermissionDenied" - "404": - $ref: "#/responses/NotFound" - "422": - $ref: "#/responses/UnprocessableEntity" - "500": - $ref: "#/responses/ServerError" - "/mto-shipments/{mtoShipmentId}": + $ref: '#/definitions/MTOShipment' + '400': + $ref: '#/responses/InvalidRequest' + '401': + $ref: '#/responses/PermissionDenied' + '403': + $ref: '#/responses/PermissionDenied' + '404': + $ref: '#/responses/NotFound' + '422': + $ref: '#/responses/UnprocessableEntity' + '500': + $ref: '#/responses/ServerError' + '/mto-shipments/{mtoShipmentId}': patch: summary: updateMTOShipment description: | @@ -4453,26 +4462,26 @@ paths: - in: body name: body schema: - $ref: "#/definitions/UpdateShipment" + $ref: '#/definitions/UpdateShipment' responses: - "200": + '200': description: Successfully updated the specified MTO shipment. schema: - $ref: "#/definitions/MTOShipment" - "400": - $ref: "#/responses/InvalidRequest" - "401": - $ref: "#/responses/PermissionDenied" - "403": - $ref: "#/responses/PermissionDenied" - "404": - $ref: "#/responses/NotFound" - "412": - $ref: "#/responses/PreconditionFailed" - "422": - $ref: "#/responses/UnprocessableEntity" - "500": - $ref: "#/responses/ServerError" + $ref: '#/definitions/MTOShipment' + '400': + $ref: '#/responses/InvalidRequest' + '401': + $ref: '#/responses/PermissionDenied' + '403': + $ref: '#/responses/PermissionDenied' + '404': + $ref: '#/responses/NotFound' + '412': + $ref: '#/responses/PreconditionFailed' + '422': + $ref: '#/responses/UnprocessableEntity' + '500': + $ref: '#/responses/ServerError' delete: summary: Soft deletes a shipment by ID description: Soft deletes a shipment by ID @@ -4489,20 +4498,20 @@ paths: format: uuid type: string responses: - "204": + '204': description: Successfully soft deleted the shipment - "400": - $ref: "#/responses/InvalidRequest" - "403": - $ref: "#/responses/PermissionDenied" - "404": - $ref: "#/responses/NotFound" - "409": - $ref: "#/responses/Conflict" - "422": - $ref: "#/responses/UnprocessableEntity" - "500": - $ref: "#/responses/ServerError" + '400': + $ref: '#/responses/InvalidRequest' + '403': + $ref: '#/responses/PermissionDenied' + '404': + $ref: '#/responses/NotFound' + '409': + $ref: '#/responses/Conflict' + '422': + $ref: '#/responses/UnprocessableEntity' + '500': + $ref: '#/responses/ServerError' /moves/{moveTaskOrderID}/mto_shipments: get: summary: Gets all shipments for a move task order @@ -4521,18 +4530,18 @@ paths: format: uuid type: string responses: - "200": + '200': description: Successfully retrieved all mto shipments for a move task order. schema: - $ref: "#/definitions/MTOShipments" - "400": - $ref: "#/responses/InvalidRequest" - "401": - $ref: "#/responses/PermissionDenied" - "404": - $ref: "#/responses/NotFound" - "500": - $ref: "#/responses/ServerError" + $ref: '#/definitions/MTOShipments' + '400': + $ref: '#/responses/InvalidRequest' + '401': + $ref: '#/responses/PermissionDenied' + '404': + $ref: '#/responses/NotFound' + '500': + $ref: '#/responses/ServerError' /okta-profile: get: summary: Returns Okta profile values from Okta's Users API @@ -4543,19 +4552,19 @@ paths: produces: - application/json responses: - "200": + '200': description: okta profile for user schema: - $ref: "#/definitions/OktaUserProfileData" - "400": + $ref: '#/definitions/OktaUserProfileData' + '400': description: invalid request - "401": + '401': description: request requires user authentication - "403": + '403': description: user is not authorized - "404": + '404': description: service member not found - "500": + '500': description: internal server error post: summary: Update the user's okta profile with primary data, returns Okta profile values from the Okta's Users API reflecting updated values. @@ -4568,27 +4577,27 @@ paths: name: updateOktaUserProfileData required: true schema: - $ref: "#/definitions/UpdateOktaUserProfileData" + $ref: '#/definitions/UpdateOktaUserProfileData' consumes: - application/json produces: - application/json responses: - "200": + '200': description: okta profile for user schema: - $ref: "#/definitions/OktaUserProfileData" - "400": + $ref: '#/definitions/OktaUserProfileData' + '400': description: invalid request - "401": + '401': description: request requires user authentication - "403": + '403': description: user is not authorized - "422": + '422': description: validation error schema: - $ref: "#/responses/UnprocessableEntity" - "500": + $ref: '#/responses/UnprocessableEntity' + '500': description: internal server error /calendar/{countryCode}/is-weekend-holiday/{date}: get: @@ -4615,44 +4624,44 @@ paths: type: string format: date responses: - "200": + '200': description: Successfully determine if given date is weekend and/or holiday for given country. schema: - $ref: "#/definitions/IsDateWeekendHolidayInfo" - "400": - $ref: "#/responses/InvalidRequest" - "401": - $ref: "#/responses/PermissionDenied" - "404": - $ref: "#/responses/NotFound" - "500": - $ref: "#/responses/ServerError" + $ref: '#/definitions/IsDateWeekendHolidayInfo' + '400': + $ref: '#/responses/InvalidRequest' + '401': + $ref: '#/responses/PermissionDenied' + '404': + $ref: '#/responses/NotFound' + '500': + $ref: '#/responses/ServerError' responses: InvalidRequest: description: The request payload is invalid. schema: - $ref: "#/definitions/ClientError" + $ref: '#/definitions/ClientError' NotFound: description: The requested resource wasn't found. schema: - $ref: "#/definitions/ClientError" + $ref: '#/definitions/ClientError' Conflict: - description: "The request could not be processed because of conflict in the current state of the resource." + description: 'The request could not be processed because of conflict in the current state of the resource.' schema: - $ref: "#/definitions/ClientError" + $ref: '#/definitions/ClientError' PermissionDenied: description: The request was denied. schema: - $ref: "#/definitions/ClientError" + $ref: '#/definitions/ClientError' ServerError: description: A server error occurred. schema: - $ref: "#/definitions/Error" + $ref: '#/definitions/Error' PreconditionFailed: description: Precondition failed, likely due to a stale eTag (If-Match). Fetch the request again to get the updated eTag value. schema: - $ref: "#/definitions/ClientError" + $ref: '#/definitions/ClientError' UnprocessableEntity: description: The payload was unprocessable. schema: - $ref: "#/definitions/ValidationError" + $ref: '#/definitions/ValidationError' diff --git a/swagger-def/prime.yaml b/swagger-def/prime.yaml index ce68da1ecc2..fbc0df62d64 100644 --- a/swagger-def/prime.yaml +++ b/swagger-def/prime.yaml @@ -1380,6 +1380,11 @@ definitions: description: The estimated weight of the pro-gear being moved belonging to a spouse in pounds. type: integer x-nullable: true + isActualExpenseReimbursement: + description: Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method. + type: boolean + example: false + x-omitempty: false required: - expectedDepartureDate - sitExpected @@ -1876,6 +1881,11 @@ definitions: description: The estimated weight of the pro-gear being moved belonging to a spouse. type: integer x-nullable: true + isActualExpenseReimbursement: + description: Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method. + type: boolean + example: false + x-omitempty: false UpdateMTOShipmentStatus: description: Contains the statuses available to the Prime when updating the state of a shipment. type: object diff --git a/swagger-def/prime_v2.yaml b/swagger-def/prime_v2.yaml index f9ae7a5e565..257c49fdb4d 100644 --- a/swagger-def/prime_v2.yaml +++ b/swagger-def/prime_v2.yaml @@ -452,6 +452,11 @@ definitions: description: The estimated weight of the pro-gear being moved belonging to a spouse in pounds. type: integer x-nullable: true + isActualExpenseReimbursement: + description: Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method. + type: boolean + example: false + x-omitempty: false required: - expectedDepartureDate - sitExpected @@ -590,6 +595,11 @@ definitions: description: The estimated weight of the pro-gear being moved belonging to a spouse. type: integer x-nullable: true + isActualExpenseReimbursement: + description: Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method. + type: boolean + example: false + x-omitempty: false UpdateMTOShipment: properties: scheduledPickupDate: diff --git a/swagger-def/prime_v3.yaml b/swagger-def/prime_v3.yaml index 9a28d0380e2..7acb2e38c04 100644 --- a/swagger-def/prime_v3.yaml +++ b/swagger-def/prime_v3.yaml @@ -451,6 +451,11 @@ definitions: description: The estimated weight of the pro-gear being moved belonging to a spouse in pounds. type: integer x-nullable: true + isActualExpenseReimbursement: + description: Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method. + type: boolean + example: false + x-omitempty: false required: - expectedDepartureDate - pickupAddress @@ -637,6 +642,11 @@ definitions: description: The estimated weight of the pro-gear being moved belonging to a spouse. type: integer x-nullable: true + isActualExpenseReimbursement: + description: Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method. + type: boolean + example: false + x-omitempty: false UpdateMTOShipment: properties: actualProGearWeight: diff --git a/swagger/ghc.yaml b/swagger/ghc.yaml index 3441a606ec3..ebe71ad03b5 100644 --- a/swagger/ghc.yaml +++ b/swagger/ghc.yaml @@ -6370,6 +6370,13 @@ definitions: advanceStatus: $ref: '#/definitions/PPMAdvanceStatus' x-nullable: true + isActualExpenseReimbursement: + description: >- + Used for PPM shipments only. Denotes if this shipment uses the Actual + Expense Reimbursement method. + type: boolean + example: false + x-omitempty: false UpdateBoatShipment: type: object properties: @@ -6759,6 +6766,13 @@ definitions: spouseProGearWeight: type: integer x-nullable: true + isActualExpenseReimbursement: + description: >- + Used for PPM shipments only. Denotes if this shipment uses the Actual + Expense Reimbursement method. + type: boolean + example: false + x-omitempty: false required: - expectedDepartureDate - pickupAddress @@ -9530,6 +9544,13 @@ definitions: type: array items: $ref: '#/definitions/ProGearWeightTicket' + isActualExpenseReimbursement: + description: >- + Used for PPM shipments only. Denotes if this shipment uses the Actual + Expense Reimbursement method. + type: boolean + example: false + x-omitempty: false signedCertification: $ref: '#/definitions/SignedCertification' eTag: diff --git a/swagger/internal.yaml b/swagger/internal.yaml index 7f56156fc46..2e96fec65fa 100644 --- a/swagger/internal.yaml +++ b/swagger/internal.yaml @@ -1979,6 +1979,13 @@ definitions: x-omitempty: false sitExpected: type: boolean + isActualExpenseReimbursement: + description: >- + Denotes if this PPM shipment uses the Actual Expense Reimbursement + method. + type: boolean + example: false + x-omitempty: false required: - expectedDepartureDate - pickupAddress @@ -2098,6 +2105,13 @@ definitions: type: integer format: cents x-nullable: true + isActualExpenseReimbursement: + description: >- + Used for PPM shipments only. Denotes if this shipment uses the Actual + Expense Reimbursement method. + type: boolean + example: false + x-omitempty: false CreateBoatShipment: description: Boat shipment information for the move. properties: @@ -3739,6 +3753,13 @@ definitions: type: array items: $ref: '#/definitions/ProGearWeightTicket' + isActualExpenseReimbursement: + description: >- + Used for PPM shipments only. Denotes if this shipment uses the Actual + Expense Reimbursement method. + type: boolean + example: false + x-omitempty: false signedCertification: $ref: '#/definitions/SignedCertification' eTag: diff --git a/swagger/prime.yaml b/swagger/prime.yaml index 9351e77a1ef..6e329905564 100644 --- a/swagger/prime.yaml +++ b/swagger/prime.yaml @@ -1725,6 +1725,13 @@ definitions: in pounds. type: integer x-nullable: true + isActualExpenseReimbursement: + description: >- + Used for PPM shipments only. Denotes if this shipment uses the Actual + Expense Reimbursement method. + type: boolean + example: false + x-omitempty: false required: - expectedDepartureDate - sitExpected @@ -2602,6 +2609,13 @@ definitions: spouse. type: integer x-nullable: true + isActualExpenseReimbursement: + description: >- + Used for PPM shipments only. Denotes if this shipment uses the Actual + Expense Reimbursement method. + type: boolean + example: false + x-omitempty: false UpdateMTOShipmentStatus: description: >- Contains the statuses available to the Prime when updating the state of a @@ -3821,6 +3835,13 @@ definitions: format: cents x-nullable: true x-omitempty: false + isActualExpenseReimbursement: + description: >- + Used for PPM shipments only. Denotes if this shipment uses the Actual + Expense Reimbursement method. + type: boolean + example: false + x-omitempty: false eTag: description: >- A hash unique to this shipment that should be used as the "If-Match" diff --git a/swagger/prime_v2.yaml b/swagger/prime_v2.yaml index 256e7648253..03fa6c39a3e 100644 --- a/swagger/prime_v2.yaml +++ b/swagger/prime_v2.yaml @@ -756,6 +756,13 @@ definitions: in pounds. type: integer x-nullable: true + isActualExpenseReimbursement: + description: >- + Used for PPM shipments only. Denotes if this shipment uses the Actual + Expense Reimbursement method. + type: boolean + example: false + x-omitempty: false required: - expectedDepartureDate - sitExpected @@ -912,6 +919,13 @@ definitions: spouse. type: integer x-nullable: true + isActualExpenseReimbursement: + description: >- + Used for PPM shipments only. Denotes if this shipment uses the Actual + Expense Reimbursement method. + type: boolean + example: false + x-omitempty: false UpdateMTOShipment: properties: scheduledPickupDate: @@ -2406,6 +2420,13 @@ definitions: format: cents x-nullable: true x-omitempty: false + isActualExpenseReimbursement: + description: >- + Used for PPM shipments only. Denotes if this shipment uses the Actual + Expense Reimbursement method. + type: boolean + example: false + x-omitempty: false eTag: description: >- A hash unique to this shipment that should be used as the "If-Match" diff --git a/swagger/prime_v3.yaml b/swagger/prime_v3.yaml index 563d87595df..b8f1720e403 100644 --- a/swagger/prime_v3.yaml +++ b/swagger/prime_v3.yaml @@ -745,6 +745,13 @@ definitions: in pounds. type: integer x-nullable: true + isActualExpenseReimbursement: + description: >- + Used for PPM shipments only. Denotes if this shipment uses the Actual + Expense Reimbursement method. + type: boolean + example: false + x-omitempty: false required: - expectedDepartureDate - pickupAddress @@ -954,6 +961,13 @@ definitions: spouse. type: integer x-nullable: true + isActualExpenseReimbursement: + description: >- + Used for PPM shipments only. Denotes if this shipment uses the Actual + Expense Reimbursement method. + type: boolean + example: false + x-omitempty: false UpdateMTOShipment: properties: actualProGearWeight: @@ -2490,6 +2504,13 @@ definitions: format: cents x-nullable: true x-omitempty: false + isActualExpenseReimbursement: + description: >- + Used for PPM shipments only. Denotes if this shipment uses the Actual + Expense Reimbursement method. + type: boolean + example: false + x-omitempty: false eTag: description: >- A hash unique to this shipment that should be used as the "If-Match" From afe4527f8cdb58da14eef0986dfaea62d83bd2d8 Mon Sep 17 00:00:00 2001 From: Brooklyn Welsh Date: Thu, 17 Oct 2024 19:39:26 +0000 Subject: [PATCH 05/15] Removed bad "belongs_to" statement for AER in PPMShipment model --- pkg/models/ppm_shipment.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/models/ppm_shipment.go b/pkg/models/ppm_shipment.go index 0d29f5fa0ba..9842cf1a07a 100644 --- a/pkg/models/ppm_shipment.go +++ b/pkg/models/ppm_shipment.go @@ -235,7 +235,7 @@ type PPMShipment struct { AOAPacket *Document `belongs_to:"documents" fk_id:"aoa_packet_id"` PaymentPacketID *uuid.UUID `json:"payment_packet_id" db:"payment_packet_id"` PaymentPacket *Document `belongs_to:"documents" fk_id:"payment_packet_id"` - IsActualExpenseReimbursement *bool `belongs_to:"ppm_shipments" json:"is_actual_expense_reimbursement" db:"is_actual_expense_reimbursement"` + IsActualExpenseReimbursement *bool `json:"is_actual_expense_reimbursement" db:"is_actual_expense_reimbursement"` } // TableName overrides the table name used by Pop. From a21116ca08883658ae01db7d7d8c460adb67eb80 Mon Sep 17 00:00:00 2001 From: JamesHawks224 <146897935+JamesHawks224@users.noreply.github.com> Date: Fri, 18 Oct 2024 01:46:38 +0000 Subject: [PATCH 06/15] made isActualExpenseReimbrusement a nullable field in swagger. --- pkg/gen/ghcapi/embedded_spec.go | 2 ++ pkg/gen/ghcmessages/p_p_m_shipment.go | 2 +- pkg/gen/internalapi/embedded_spec.go | 2 ++ pkg/gen/internalmessages/p_p_m_shipment.go | 2 +- pkg/gen/primeapi/embedded_spec.go | 2 ++ pkg/gen/primemessages/p_p_m_shipment.go | 2 +- pkg/gen/primev2api/embedded_spec.go | 2 ++ pkg/gen/primev2messages/p_p_m_shipment.go | 2 +- pkg/gen/primev3api/embedded_spec.go | 2 ++ pkg/gen/primev3messages/p_p_m_shipment.go | 2 +- pkg/handlers/ghcapi/internal/payloads/model_to_payload.go | 4 ++-- .../internalapi/internal/payloads/model_to_payload.go | 4 ++-- pkg/handlers/primeapi/payloads/model_to_payload.go | 4 ++-- pkg/handlers/primeapiv2/payloads/model_to_payload.go | 4 ++-- pkg/handlers/primeapiv3/payloads/model_to_payload.go | 4 ++-- swagger-def/definitions/PPMShipment.yaml | 1 + swagger-def/definitions/prime/PPMShipment.yaml | 1 + swagger-def/definitions/prime/v3/PPMShipment.yaml | 1 + swagger/ghc.yaml | 1 + swagger/internal.yaml | 1 + swagger/prime.yaml | 1 + swagger/prime_v2.yaml | 1 + swagger/prime_v3.yaml | 1 + 23 files changed, 33 insertions(+), 15 deletions(-) diff --git a/pkg/gen/ghcapi/embedded_spec.go b/pkg/gen/ghcapi/embedded_spec.go index 19503f7fd11..93ed10d23fb 100644 --- a/pkg/gen/ghcapi/embedded_spec.go +++ b/pkg/gen/ghcapi/embedded_spec.go @@ -11044,6 +11044,7 @@ func init() { "isActualExpenseReimbursement": { "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", "type": "boolean", + "x-nullable": true, "x-omitempty": false, "example": false }, @@ -26815,6 +26816,7 @@ func init() { "isActualExpenseReimbursement": { "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", "type": "boolean", + "x-nullable": true, "x-omitempty": false, "example": false }, diff --git a/pkg/gen/ghcmessages/p_p_m_shipment.go b/pkg/gen/ghcmessages/p_p_m_shipment.go index 67b4d2f4ba2..8392b5f5cc5 100644 --- a/pkg/gen/ghcmessages/p_p_m_shipment.go +++ b/pkg/gen/ghcmessages/p_p_m_shipment.go @@ -120,7 +120,7 @@ type PPMShipment struct { // Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method. // Example: false - IsActualExpenseReimbursement bool `json:"isActualExpenseReimbursement"` + IsActualExpenseReimbursement *bool `json:"isActualExpenseReimbursement"` // All expense documentation receipt records of this PPM shipment. MovingExpenses []*MovingExpense `json:"movingExpenses"` diff --git a/pkg/gen/internalapi/embedded_spec.go b/pkg/gen/internalapi/embedded_spec.go index 36d36ce7070..db0f2496b6d 100644 --- a/pkg/gen/internalapi/embedded_spec.go +++ b/pkg/gen/internalapi/embedded_spec.go @@ -6180,6 +6180,7 @@ func init() { "isActualExpenseReimbursement": { "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", "type": "boolean", + "x-nullable": true, "x-omitempty": false, "example": false }, @@ -14818,6 +14819,7 @@ func init() { "isActualExpenseReimbursement": { "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", "type": "boolean", + "x-nullable": true, "x-omitempty": false, "example": false }, diff --git a/pkg/gen/internalmessages/p_p_m_shipment.go b/pkg/gen/internalmessages/p_p_m_shipment.go index e48de90fb0e..08347da5a50 100644 --- a/pkg/gen/internalmessages/p_p_m_shipment.go +++ b/pkg/gen/internalmessages/p_p_m_shipment.go @@ -120,7 +120,7 @@ type PPMShipment struct { // Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method. // Example: false - IsActualExpenseReimbursement bool `json:"isActualExpenseReimbursement"` + IsActualExpenseReimbursement *bool `json:"isActualExpenseReimbursement"` // All expense documentation receipt records of this PPM shipment. MovingExpenses []*MovingExpense `json:"movingExpenses"` diff --git a/pkg/gen/primeapi/embedded_spec.go b/pkg/gen/primeapi/embedded_spec.go index cc9bbb581ce..aef09a29c5a 100644 --- a/pkg/gen/primeapi/embedded_spec.go +++ b/pkg/gen/primeapi/embedded_spec.go @@ -3008,6 +3008,7 @@ func init() { "isActualExpenseReimbursement": { "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", "type": "boolean", + "x-nullable": true, "x-omitempty": false, "example": false }, @@ -7737,6 +7738,7 @@ func init() { "isActualExpenseReimbursement": { "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", "type": "boolean", + "x-nullable": true, "x-omitempty": false, "example": false }, diff --git a/pkg/gen/primemessages/p_p_m_shipment.go b/pkg/gen/primemessages/p_p_m_shipment.go index aacb31c8362..60846c17243 100644 --- a/pkg/gen/primemessages/p_p_m_shipment.go +++ b/pkg/gen/primemessages/p_p_m_shipment.go @@ -96,7 +96,7 @@ type PPMShipment struct { // Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method. // Example: false - IsActualExpenseReimbursement bool `json:"isActualExpenseReimbursement"` + IsActualExpenseReimbursement *bool `json:"isActualExpenseReimbursement"` // The estimated weight of the pro-gear being moved belonging to the service member in pounds. ProGearWeight *int64 `json:"proGearWeight"` diff --git a/pkg/gen/primev2api/embedded_spec.go b/pkg/gen/primev2api/embedded_spec.go index 5225ac3f5b0..2897f8f5949 100644 --- a/pkg/gen/primev2api/embedded_spec.go +++ b/pkg/gen/primev2api/embedded_spec.go @@ -2096,6 +2096,7 @@ func init() { "isActualExpenseReimbursement": { "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", "type": "boolean", + "x-nullable": true, "x-omitempty": false, "example": false }, @@ -5529,6 +5530,7 @@ func init() { "isActualExpenseReimbursement": { "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", "type": "boolean", + "x-nullable": true, "x-omitempty": false, "example": false }, diff --git a/pkg/gen/primev2messages/p_p_m_shipment.go b/pkg/gen/primev2messages/p_p_m_shipment.go index 34ed504bf79..5363936544f 100644 --- a/pkg/gen/primev2messages/p_p_m_shipment.go +++ b/pkg/gen/primev2messages/p_p_m_shipment.go @@ -96,7 +96,7 @@ type PPMShipment struct { // Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method. // Example: false - IsActualExpenseReimbursement bool `json:"isActualExpenseReimbursement"` + IsActualExpenseReimbursement *bool `json:"isActualExpenseReimbursement"` // The estimated weight of the pro-gear being moved belonging to the service member in pounds. ProGearWeight *int64 `json:"proGearWeight"` diff --git a/pkg/gen/primev3api/embedded_spec.go b/pkg/gen/primev3api/embedded_spec.go index 56321cc59a0..518072ce8eb 100644 --- a/pkg/gen/primev3api/embedded_spec.go +++ b/pkg/gen/primev3api/embedded_spec.go @@ -2285,6 +2285,7 @@ func init() { "isActualExpenseReimbursement": { "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", "type": "boolean", + "x-nullable": true, "x-omitempty": false, "example": false }, @@ -6008,6 +6009,7 @@ func init() { "isActualExpenseReimbursement": { "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", "type": "boolean", + "x-nullable": true, "x-omitempty": false, "example": false }, diff --git a/pkg/gen/primev3messages/p_p_m_shipment.go b/pkg/gen/primev3messages/p_p_m_shipment.go index 5677ac0a643..188d57ce573 100644 --- a/pkg/gen/primev3messages/p_p_m_shipment.go +++ b/pkg/gen/primev3messages/p_p_m_shipment.go @@ -112,7 +112,7 @@ type PPMShipment struct { // Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method. // Example: false - IsActualExpenseReimbursement bool `json:"isActualExpenseReimbursement"` + IsActualExpenseReimbursement *bool `json:"isActualExpenseReimbursement"` // pickup address // Required: true diff --git a/pkg/handlers/ghcapi/internal/payloads/model_to_payload.go b/pkg/handlers/ghcapi/internal/payloads/model_to_payload.go index f3e240dd947..3b6ee9a5526 100644 --- a/pkg/handlers/ghcapi/internal/payloads/model_to_payload.go +++ b/pkg/handlers/ghcapi/internal/payloads/model_to_payload.go @@ -900,7 +900,7 @@ func PPMShipment(_ storage.FileStorer, ppmShipment *models.PPMShipment) *ghcmess SitEstimatedEntryDate: handlers.FmtDatePtr(ppmShipment.SITEstimatedEntryDate), SitEstimatedDepartureDate: handlers.FmtDatePtr(ppmShipment.SITEstimatedDepartureDate), SitEstimatedCost: handlers.FmtCost(ppmShipment.SITEstimatedCost), - IsActualExpenseReimbursement: *ppmShipment.IsActualExpenseReimbursement, + IsActualExpenseReimbursement: ppmShipment.IsActualExpenseReimbursement, ETag: etag.GenerateEtag(ppmShipment.UpdatedAt), } @@ -935,7 +935,7 @@ func PPMShipment(_ storage.FileStorer, ppmShipment *models.PPMShipment) *ghcmess } if ppmShipment.IsActualExpenseReimbursement != nil { - payloadPPMShipment.IsActualExpenseReimbursement = *ppmShipment.IsActualExpenseReimbursement + payloadPPMShipment.IsActualExpenseReimbursement = ppmShipment.IsActualExpenseReimbursement } return payloadPPMShipment diff --git a/pkg/handlers/internalapi/internal/payloads/model_to_payload.go b/pkg/handlers/internalapi/internal/payloads/model_to_payload.go index 0395ae2606a..54014b468a3 100644 --- a/pkg/handlers/internalapi/internal/payloads/model_to_payload.go +++ b/pkg/handlers/internalapi/internal/payloads/model_to_payload.go @@ -115,13 +115,13 @@ func PPMShipment(storer storage.FileStorer, ppmShipment *models.PPMShipment) *in WeightTickets: WeightTickets(storer, ppmShipment.WeightTickets), MovingExpenses: MovingExpenses(storer, ppmShipment.MovingExpenses), ProGearWeightTickets: ProGearWeightTickets(storer, ppmShipment.ProgearWeightTickets), - IsActualExpenseReimbursement: *ppmShipment.IsActualExpenseReimbursement, + IsActualExpenseReimbursement: ppmShipment.IsActualExpenseReimbursement, SignedCertification: SignedCertification(ppmShipment.SignedCertification), ETag: etag.GenerateEtag(ppmShipment.UpdatedAt), } if ppmShipment.IsActualExpenseReimbursement != nil { - payloadPPMShipment.IsActualExpenseReimbursement = *ppmShipment.IsActualExpenseReimbursement + payloadPPMShipment.IsActualExpenseReimbursement = ppmShipment.IsActualExpenseReimbursement } return payloadPPMShipment diff --git a/pkg/handlers/primeapi/payloads/model_to_payload.go b/pkg/handlers/primeapi/payloads/model_to_payload.go index 6fd28e92353..7a1069f336d 100644 --- a/pkg/handlers/primeapi/payloads/model_to_payload.go +++ b/pkg/handlers/primeapi/payloads/model_to_payload.go @@ -489,7 +489,7 @@ func PPMShipment(ppmShipment *models.PPMShipment) *primemessages.PPMShipment { AdvanceAmountRequested: handlers.FmtCost(ppmShipment.AdvanceAmountRequested), HasReceivedAdvance: ppmShipment.HasReceivedAdvance, AdvanceAmountReceived: handlers.FmtCost(ppmShipment.AdvanceAmountReceived), - IsActualExpenseReimbursement: *ppmShipment.IsActualExpenseReimbursement, + IsActualExpenseReimbursement: ppmShipment.IsActualExpenseReimbursement, ETag: etag.GenerateEtag(ppmShipment.UpdatedAt), } @@ -499,7 +499,7 @@ func PPMShipment(ppmShipment *models.PPMShipment) *primemessages.PPMShipment { } if ppmShipment.IsActualExpenseReimbursement != nil { - payloadPPMShipment.IsActualExpenseReimbursement = *ppmShipment.IsActualExpenseReimbursement + payloadPPMShipment.IsActualExpenseReimbursement = ppmShipment.IsActualExpenseReimbursement } return payloadPPMShipment diff --git a/pkg/handlers/primeapiv2/payloads/model_to_payload.go b/pkg/handlers/primeapiv2/payloads/model_to_payload.go index b223e9bde78..3b204fdf10b 100644 --- a/pkg/handlers/primeapiv2/payloads/model_to_payload.go +++ b/pkg/handlers/primeapiv2/payloads/model_to_payload.go @@ -433,7 +433,7 @@ func PPMShipment(ppmShipment *models.PPMShipment) *primev2messages.PPMShipment { AdvanceAmountRequested: handlers.FmtCost(ppmShipment.AdvanceAmountRequested), HasReceivedAdvance: ppmShipment.HasReceivedAdvance, AdvanceAmountReceived: handlers.FmtCost(ppmShipment.AdvanceAmountReceived), - IsActualExpenseReimbursement: *ppmShipment.IsActualExpenseReimbursement, + IsActualExpenseReimbursement: ppmShipment.IsActualExpenseReimbursement, ETag: etag.GenerateEtag(ppmShipment.UpdatedAt), } @@ -443,7 +443,7 @@ func PPMShipment(ppmShipment *models.PPMShipment) *primev2messages.PPMShipment { } if ppmShipment.IsActualExpenseReimbursement != nil { - payloadPPMShipment.IsActualExpenseReimbursement = *ppmShipment.IsActualExpenseReimbursement + payloadPPMShipment.IsActualExpenseReimbursement = ppmShipment.IsActualExpenseReimbursement } return payloadPPMShipment diff --git a/pkg/handlers/primeapiv3/payloads/model_to_payload.go b/pkg/handlers/primeapiv3/payloads/model_to_payload.go index 3ba87ab9301..6048333e93c 100644 --- a/pkg/handlers/primeapiv3/payloads/model_to_payload.go +++ b/pkg/handlers/primeapiv3/payloads/model_to_payload.go @@ -434,7 +434,7 @@ func PPMShipment(ppmShipment *models.PPMShipment) *primev3messages.PPMShipment { AdvanceAmountRequested: handlers.FmtCost(ppmShipment.AdvanceAmountRequested), HasReceivedAdvance: ppmShipment.HasReceivedAdvance, AdvanceAmountReceived: handlers.FmtCost(ppmShipment.AdvanceAmountReceived), - IsActualExpenseReimbursement: *ppmShipment.IsActualExpenseReimbursement, + IsActualExpenseReimbursement: ppmShipment.IsActualExpenseReimbursement, ETag: etag.GenerateEtag(ppmShipment.UpdatedAt), } @@ -458,7 +458,7 @@ func PPMShipment(ppmShipment *models.PPMShipment) *primev3messages.PPMShipment { } if ppmShipment.IsActualExpenseReimbursement != nil { - payloadPPMShipment.IsActualExpenseReimbursement = *ppmShipment.IsActualExpenseReimbursement + payloadPPMShipment.IsActualExpenseReimbursement = ppmShipment.IsActualExpenseReimbursement } return payloadPPMShipment diff --git a/swagger-def/definitions/PPMShipment.yaml b/swagger-def/definitions/PPMShipment.yaml index b81fbc9eaf7..cb56b9cc48f 100644 --- a/swagger-def/definitions/PPMShipment.yaml +++ b/swagger-def/definitions/PPMShipment.yaml @@ -233,6 +233,7 @@ properties: type: boolean example: false x-omitempty: false + x-nullable: true signedCertification: $ref: 'SignedCertification.yaml' eTag: diff --git a/swagger-def/definitions/prime/PPMShipment.yaml b/swagger-def/definitions/prime/PPMShipment.yaml index 742afb432a2..1f77972c88e 100644 --- a/swagger-def/definitions/prime/PPMShipment.yaml +++ b/swagger-def/definitions/prime/PPMShipment.yaml @@ -168,6 +168,7 @@ properties: type: boolean example: false x-omitempty: false + x-nullable: true eTag: description: A hash unique to this shipment that should be used as the "If-Match" header for any updates. type: string diff --git a/swagger-def/definitions/prime/v3/PPMShipment.yaml b/swagger-def/definitions/prime/v3/PPMShipment.yaml index f1ca21773c6..dc562ed9f8d 100644 --- a/swagger-def/definitions/prime/v3/PPMShipment.yaml +++ b/swagger-def/definitions/prime/v3/PPMShipment.yaml @@ -196,6 +196,7 @@ properties: type: boolean example: false x-omitempty: false + x-nullable: true eTag: description: A hash unique to this shipment that should be used as the "If-Match" header for any updates. type: string diff --git a/swagger/ghc.yaml b/swagger/ghc.yaml index 094402efae7..ae304a7d3a4 100644 --- a/swagger/ghc.yaml +++ b/swagger/ghc.yaml @@ -9549,6 +9549,7 @@ definitions: type: boolean example: false x-omitempty: false + x-nullable: true signedCertification: $ref: '#/definitions/SignedCertification' eTag: diff --git a/swagger/internal.yaml b/swagger/internal.yaml index 2410cf6eb3a..f6f703e8510 100644 --- a/swagger/internal.yaml +++ b/swagger/internal.yaml @@ -3766,6 +3766,7 @@ definitions: type: boolean example: false x-omitempty: false + x-nullable: true signedCertification: $ref: '#/definitions/SignedCertification' eTag: diff --git a/swagger/prime.yaml b/swagger/prime.yaml index 6e329905564..904df423805 100644 --- a/swagger/prime.yaml +++ b/swagger/prime.yaml @@ -3842,6 +3842,7 @@ definitions: type: boolean example: false x-omitempty: false + x-nullable: true eTag: description: >- A hash unique to this shipment that should be used as the "If-Match" diff --git a/swagger/prime_v2.yaml b/swagger/prime_v2.yaml index 2f41e849f39..5c8e87d3d70 100644 --- a/swagger/prime_v2.yaml +++ b/swagger/prime_v2.yaml @@ -2484,6 +2484,7 @@ definitions: type: boolean example: false x-omitempty: false + x-nullable: true eTag: description: >- A hash unique to this shipment that should be used as the "If-Match" diff --git a/swagger/prime_v3.yaml b/swagger/prime_v3.yaml index 32338832114..7e8ee6b6063 100644 --- a/swagger/prime_v3.yaml +++ b/swagger/prime_v3.yaml @@ -2598,6 +2598,7 @@ definitions: type: boolean example: false x-omitempty: false + x-nullable: true eTag: description: >- A hash unique to this shipment that should be used as the "If-Match" From addbf30f2dbbe3dc60e62f9bbc3012ba00135fe1 Mon Sep 17 00:00:00 2001 From: Brooklyn Welsh Date: Fri, 18 Oct 2024 14:19:48 +0000 Subject: [PATCH 07/15] Added some unit tests for different model/payload files. --- .../payloads/model_to_payload_test.go | 11 +- .../payloads/model_to_payload_test.go | 65 ++++++++ .../internal/payloads/payloads_test.go | 31 ++++ .../payloads/model_to_payload_test.go | 5 +- .../payloads/model_to_payload_test.go | 5 +- .../payloads/model_to_payload_test.go | 5 +- .../payloads/payload_to_model_test.go | 149 ++++++++++++++++-- 7 files changed, 253 insertions(+), 18 deletions(-) create mode 100644 pkg/handlers/internalapi/internal/payloads/model_to_payload_test.go create mode 100644 pkg/handlers/internalapi/internal/payloads/payloads_test.go diff --git a/pkg/handlers/ghcapi/internal/payloads/model_to_payload_test.go b/pkg/handlers/ghcapi/internal/payloads/model_to_payload_test.go index 071e410967f..beb3ec95bf0 100644 --- a/pkg/handlers/ghcapi/internal/payloads/model_to_payload_test.go +++ b/pkg/handlers/ghcapi/internal/payloads/model_to_payload_test.go @@ -47,10 +47,13 @@ func (suite *PayloadsSuite) TestFetchPPMShipment() { County: county, } + isActualExpenseReimbursement := true + expectedPPMShipment := models.PPMShipment{ - ID: ppmShipmentID, - PickupAddress: &expectedAddress, - DestinationAddress: &expectedAddress, + ID: ppmShipmentID, + PickupAddress: &expectedAddress, + DestinationAddress: &expectedAddress, + IsActualExpenseReimbursement: &isActualExpenseReimbursement, } suite.Run("Success -", func() { @@ -75,6 +78,8 @@ func (suite *PayloadsSuite) TestFetchPPMShipment() { suite.Equal(&country, returnedPPMShipment.DestinationAddress.Country) suite.Equal(&county, returnedPPMShipment.DestinationAddress.County) + suite.True(*returnedPPMShipment.IsActualExpenseReimbursement) + }) } diff --git a/pkg/handlers/internalapi/internal/payloads/model_to_payload_test.go b/pkg/handlers/internalapi/internal/payloads/model_to_payload_test.go new file mode 100644 index 00000000000..0356677184e --- /dev/null +++ b/pkg/handlers/internalapi/internal/payloads/model_to_payload_test.go @@ -0,0 +1,65 @@ +package payloads + +import ( + "github.com/gofrs/uuid" + + "github.com/transcom/mymove/pkg/gen/internalmessages" + "github.com/transcom/mymove/pkg/models" +) + +func (suite *PayloadsSuite) TestFetchPPMShipment() { + + ppmShipmentID, _ := uuid.NewV4() + streetAddress1 := "MacDill AFB" + streetAddress2, streetAddress3 := "", "" + city := "Tampa" + state := "FL" + postalcode := "33621" + country := "US" + county := "HILLSBOROUGH" + + expectedAddress := models.Address{ + StreetAddress1: streetAddress1, + StreetAddress2: &streetAddress2, + StreetAddress3: &streetAddress3, + City: city, + State: state, + PostalCode: postalcode, + Country: &country, + County: county, + } + + isActualExpenseReimbursement := true + + expectedPPMShipment := models.PPMShipment{ + ID: ppmShipmentID, + PickupAddress: &expectedAddress, + DestinationAddress: &expectedAddress, + IsActualExpenseReimbursement: &isActualExpenseReimbursement, + } + + suite.Run("Success -", func() { + returnedPPMShipment := PPMShipment(nil, &expectedPPMShipment) + + suite.IsType(&internalmessages.PPMShipment{}, returnedPPMShipment) + suite.Equal(&streetAddress1, returnedPPMShipment.PickupAddress.StreetAddress1) + suite.Equal(expectedPPMShipment.PickupAddress.StreetAddress2, returnedPPMShipment.PickupAddress.StreetAddress2) + suite.Equal(expectedPPMShipment.PickupAddress.StreetAddress3, returnedPPMShipment.PickupAddress.StreetAddress3) + suite.Equal(&postalcode, returnedPPMShipment.PickupAddress.PostalCode) + suite.Equal(&city, returnedPPMShipment.PickupAddress.City) + suite.Equal(&state, returnedPPMShipment.PickupAddress.State) + suite.Equal(&country, returnedPPMShipment.PickupAddress.Country) + suite.Equal(&county, returnedPPMShipment.PickupAddress.County) + + suite.Equal(&streetAddress1, returnedPPMShipment.DestinationAddress.StreetAddress1) + suite.Equal(expectedPPMShipment.DestinationAddress.StreetAddress2, returnedPPMShipment.DestinationAddress.StreetAddress2) + suite.Equal(expectedPPMShipment.DestinationAddress.StreetAddress3, returnedPPMShipment.DestinationAddress.StreetAddress3) + suite.Equal(&postalcode, returnedPPMShipment.DestinationAddress.PostalCode) + suite.Equal(&city, returnedPPMShipment.DestinationAddress.City) + suite.Equal(&state, returnedPPMShipment.DestinationAddress.State) + suite.Equal(&country, returnedPPMShipment.DestinationAddress.Country) + suite.Equal(&county, returnedPPMShipment.DestinationAddress.County) + + suite.True(*returnedPPMShipment.IsActualExpenseReimbursement) + }) +} diff --git a/pkg/handlers/internalapi/internal/payloads/payloads_test.go b/pkg/handlers/internalapi/internal/payloads/payloads_test.go new file mode 100644 index 00000000000..c17b8a85256 --- /dev/null +++ b/pkg/handlers/internalapi/internal/payloads/payloads_test.go @@ -0,0 +1,31 @@ +package payloads + +import ( + "testing" + + "github.com/stretchr/testify/suite" + + "github.com/transcom/mymove/pkg/handlers" + "github.com/transcom/mymove/pkg/notifications" + "github.com/transcom/mymove/pkg/storage" + storageTest "github.com/transcom/mymove/pkg/storage/test" + "github.com/transcom/mymove/pkg/testingsuite" +) + +// HandlerSuite is an abstraction of our original suite +type PayloadsSuite struct { + handlers.BaseHandlerTestSuite + storer storage.FileStorer +} + +// TestHandlerSuite creates our test suite +func TestHandlerSuite(t *testing.T) { + hs := &PayloadsSuite{ + BaseHandlerTestSuite: handlers.NewBaseHandlerTestSuite(notifications.NewStubNotificationSender("milmovelocal"), testingsuite.CurrentPackage(), + testingsuite.WithPerTestTransaction()), + storer: storageTest.NewFakeS3Storage(true), + } + + suite.Run(t, hs) + hs.PopTestSuite.TearDown() +} diff --git a/pkg/handlers/primeapi/payloads/model_to_payload_test.go b/pkg/handlers/primeapi/payloads/model_to_payload_test.go index 7464c1c10f0..4dde0289f69 100644 --- a/pkg/handlers/primeapi/payloads/model_to_payload_test.go +++ b/pkg/handlers/primeapi/payloads/model_to_payload_test.go @@ -554,14 +554,17 @@ func (suite *PayloadsSuite) TestServiceRequestDocument() { } func (suite *PayloadsSuite) TestPPMShipment() { + isActualExpenseReimbursemnt := true ppmShipment := &models.PPMShipment{ - ID: uuid.Must(uuid.NewV4()), + ID: uuid.Must(uuid.NewV4()), + IsActualExpenseReimbursement: &isActualExpenseReimbursemnt, } result := PPMShipment(ppmShipment) suite.NotNil(result) suite.Equal(strfmt.UUID(ppmShipment.ID.String()), result.ID) + suite.True(*ppmShipment.IsActualExpenseReimbursement) } func (suite *PayloadsSuite) TestGetCustomerContact() { diff --git a/pkg/handlers/primeapiv2/payloads/model_to_payload_test.go b/pkg/handlers/primeapiv2/payloads/model_to_payload_test.go index f6b9dadf120..0221a0012bc 100644 --- a/pkg/handlers/primeapiv2/payloads/model_to_payload_test.go +++ b/pkg/handlers/primeapiv2/payloads/model_to_payload_test.go @@ -500,14 +500,17 @@ func (suite *PayloadsSuite) TestServiceRequestDocument() { } func (suite *PayloadsSuite) TestPPMShipment() { + isActualExpenseReimbursemnt := true ppmShipment := &models.PPMShipment{ - ID: uuid.Must(uuid.NewV4()), + ID: uuid.Must(uuid.NewV4()), + IsActualExpenseReimbursement: &isActualExpenseReimbursemnt, } result := PPMShipment(ppmShipment) suite.NotNil(result) suite.Equal(strfmt.UUID(ppmShipment.ID.String()), result.ID) + suite.True(*ppmShipment.IsActualExpenseReimbursement) } func (suite *PayloadsSuite) TestMTOServiceItem() { diff --git a/pkg/handlers/primeapiv3/payloads/model_to_payload_test.go b/pkg/handlers/primeapiv3/payloads/model_to_payload_test.go index e33a2314474..13b7f514446 100644 --- a/pkg/handlers/primeapiv3/payloads/model_to_payload_test.go +++ b/pkg/handlers/primeapiv3/payloads/model_to_payload_test.go @@ -518,14 +518,17 @@ func (suite *PayloadsSuite) TestServiceRequestDocument() { } func (suite *PayloadsSuite) TestPPMShipment() { + isActualExpenseReimbursemnt := true ppmShipment := &models.PPMShipment{ - ID: uuid.Must(uuid.NewV4()), + ID: uuid.Must(uuid.NewV4()), + IsActualExpenseReimbursement: &isActualExpenseReimbursemnt, } result := PPMShipment(ppmShipment) suite.NotNil(result) suite.Equal(strfmt.UUID(ppmShipment.ID.String()), result.ID) + suite.True(*ppmShipment.IsActualExpenseReimbursement) } func (suite *PayloadsSuite) TestMTOServiceItem() { diff --git a/pkg/handlers/primeapiv3/payloads/payload_to_model_test.go b/pkg/handlers/primeapiv3/payloads/payload_to_model_test.go index bc20028ab65..9763954dca6 100644 --- a/pkg/handlers/primeapiv3/payloads/payload_to_model_test.go +++ b/pkg/handlers/primeapiv3/payloads/payload_to_model_test.go @@ -627,18 +627,19 @@ func (suite *PayloadsSuite) TestPPMShipmentModelFromCreate() { } ppmShipment := primev3messages.CreatePPMShipment{ - ExpectedDepartureDate: expectedDepartureDate, - PickupAddress: struct{ primev3messages.Address }{pickupAddress}, - SecondaryPickupAddress: struct{ primev3messages.Address }{secondaryPickupAddress}, - TertiaryPickupAddress: struct{ primev3messages.Address }{tertiaryPickupAddress}, - DestinationAddress: struct{ primev3messages.Address }{destinationAddress}, - SecondaryDestinationAddress: struct{ primev3messages.Address }{secondaryDestinationAddress}, - TertiaryDestinationAddress: struct{ primev3messages.Address }{tertiaryDestinationAddress}, - SitExpected: &sitExpected, - EstimatedWeight: &estimatedWeight, - HasProGear: &hasProGear, - ProGearWeight: &proGearWeight, - SpouseProGearWeight: &spouseProGearWeight, + ExpectedDepartureDate: expectedDepartureDate, + PickupAddress: struct{ primev3messages.Address }{pickupAddress}, + SecondaryPickupAddress: struct{ primev3messages.Address }{secondaryPickupAddress}, + TertiaryPickupAddress: struct{ primev3messages.Address }{tertiaryPickupAddress}, + DestinationAddress: struct{ primev3messages.Address }{destinationAddress}, + SecondaryDestinationAddress: struct{ primev3messages.Address }{secondaryDestinationAddress}, + TertiaryDestinationAddress: struct{ primev3messages.Address }{tertiaryDestinationAddress}, + SitExpected: &sitExpected, + EstimatedWeight: &estimatedWeight, + HasProGear: &hasProGear, + ProGearWeight: &proGearWeight, + SpouseProGearWeight: &spouseProGearWeight, + IsActualExpenseReimbursement: true, } model := PPMShipmentModelFromCreate(&ppmShipment) @@ -654,5 +655,129 @@ func (suite *PayloadsSuite) TestPPMShipmentModelFromCreate() { suite.True(*model.HasSecondaryDestinationAddress) suite.True(*model.HasTertiaryPickupAddress) suite.True(*model.HasTertiaryDestinationAddress) + suite.True(*model.IsActualExpenseReimbursement) + suite.NotNil(model) +} + +func (suite *PayloadsSuite) TestPPMShipmentModelFromUpdate() { + time := time.Now() + expectedDepartureDate := handlers.FmtDatePtr(&time) + sitExpected := true + estimatedWeight := int64(5000) + hasProGear := true + proGearWeight := int64(500) + spouseProGearWeight := int64(50) + + address := models.Address{ + StreetAddress1: "some address", + City: "city", + State: "state", + PostalCode: "12345", + } + address2 := models.Address{ + StreetAddress1: "some address", + City: "city", + State: "state", + PostalCode: "11111", + } + address3 := models.Address{ + StreetAddress1: "some address", + City: "city", + State: "state", + PostalCode: "54321", + } + + var pickupAddress primev3messages.Address + var secondaryPickupAddress primev3messages.Address + var tertiaryPickupAddress primev3messages.Address + var destinationAddress primev3messages.Address + var secondaryDestinationAddress primev3messages.Address + var tertiaryDestinationAddress primev3messages.Address + + pickupAddress = primev3messages.Address{ + City: &address.City, + Country: address.Country, + PostalCode: &address.PostalCode, + State: &address.State, + StreetAddress1: &address.StreetAddress1, + StreetAddress2: address.StreetAddress2, + StreetAddress3: address.StreetAddress3, + } + destinationAddress = primev3messages.Address{ + City: &address.City, + Country: address.Country, + PostalCode: &address.PostalCode, + State: &address.State, + StreetAddress1: &address.StreetAddress1, + StreetAddress2: address.StreetAddress2, + StreetAddress3: address.StreetAddress3, + } + secondaryPickupAddress = primev3messages.Address{ + City: &address2.City, + Country: address2.Country, + PostalCode: &address2.PostalCode, + State: &address2.State, + StreetAddress1: &address2.StreetAddress1, + StreetAddress2: address2.StreetAddress2, + StreetAddress3: address2.StreetAddress3, + } + secondaryDestinationAddress = primev3messages.Address{ + City: &address2.City, + Country: address2.Country, + PostalCode: &address2.PostalCode, + State: &address2.State, + StreetAddress1: &address2.StreetAddress1, + StreetAddress2: address2.StreetAddress2, + StreetAddress3: address2.StreetAddress3, + } + tertiaryPickupAddress = primev3messages.Address{ + City: &address3.City, + Country: address3.Country, + PostalCode: &address3.PostalCode, + State: &address3.State, + StreetAddress1: &address3.StreetAddress1, + StreetAddress2: address3.StreetAddress2, + StreetAddress3: address3.StreetAddress3, + } + tertiaryDestinationAddress = primev3messages.Address{ + City: &address3.City, + Country: address3.Country, + PostalCode: &address3.PostalCode, + State: &address3.State, + StreetAddress1: &address3.StreetAddress1, + StreetAddress2: address3.StreetAddress2, + StreetAddress3: address3.StreetAddress3, + } + + ppmShipment := primev3messages.UpdatePPMShipment{ + ExpectedDepartureDate: expectedDepartureDate, + PickupAddress: struct{ primev3messages.Address }{pickupAddress}, + SecondaryPickupAddress: struct{ primev3messages.Address }{secondaryPickupAddress}, + TertiaryPickupAddress: struct{ primev3messages.Address }{tertiaryPickupAddress}, + DestinationAddress: struct{ primev3messages.Address }{destinationAddress}, + SecondaryDestinationAddress: struct{ primev3messages.Address }{secondaryDestinationAddress}, + TertiaryDestinationAddress: struct{ primev3messages.Address }{tertiaryDestinationAddress}, + SitExpected: &sitExpected, + EstimatedWeight: &estimatedWeight, + HasProGear: &hasProGear, + ProGearWeight: &proGearWeight, + SpouseProGearWeight: &spouseProGearWeight, + IsActualExpenseReimbursement: true, + } + + model := PPMShipmentModelFromUpdate(&ppmShipment) + + suite.NotNil(model) + suite.Equal(models.PPMShipmentStatusSubmitted, model.Status) + suite.True(*model.SITExpected) + suite.Equal(unit.Pound(estimatedWeight), *model.EstimatedWeight) + suite.True(*model.HasProGear) + suite.Equal(unit.Pound(proGearWeight), *model.ProGearWeight) + suite.Equal(unit.Pound(spouseProGearWeight), *model.SpouseProGearWeight) + suite.True(*model.HasSecondaryPickupAddress) + suite.True(*model.HasSecondaryDestinationAddress) + suite.True(*model.HasTertiaryPickupAddress) + suite.True(*model.HasTertiaryDestinationAddress) + suite.True(*model.IsActualExpenseReimbursement) suite.NotNil(model) } From 079fca8f7c0b5622aea5445340f37adbd10a391c Mon Sep 17 00:00:00 2001 From: Brooklyn Welsh Date: Fri, 18 Oct 2024 16:31:36 +0000 Subject: [PATCH 08/15] Added AER check to payload_to_model files, fixed some missing spots for updates, now AER field is updated as expected. --- pkg/gen/ghcapi/embedded_spec.go | 4 +++ pkg/gen/ghcmessages/create_p_p_m_shipment.go | 2 +- pkg/gen/ghcmessages/update_p_p_m_shipment.go | 2 +- pkg/gen/internalapi/embedded_spec.go | 4 +++ .../internalmessages/create_p_p_m_shipment.go | 2 +- .../internalmessages/update_p_p_m_shipment.go | 2 +- pkg/gen/primeapi/embedded_spec.go | 4 +++ .../primemessages/create_p_p_m_shipment.go | 2 +- .../primemessages/update_p_p_m_shipment.go | 2 +- pkg/gen/primev2api/embedded_spec.go | 4 +++ .../primev2messages/create_p_p_m_shipment.go | 2 +- .../primev2messages/update_p_p_m_shipment.go | 2 +- pkg/gen/primev3api/embedded_spec.go | 4 +++ .../primev3messages/create_p_p_m_shipment.go | 2 +- .../primev3messages/update_p_p_m_shipment.go | 2 +- .../internal/payloads/payload_to_model.go | 5 +++ .../internal/payloads/payload_to_model.go | 5 +++ .../primeapi/payloads/payload_to_model.go | 8 +++++ .../primeapiv2/payloads/payload_to_model.go | 8 +++++ .../primeapiv3/payloads/payload_to_model.go | 8 +++++ .../payloads/payload_to_model_test.go | 10 +++--- pkg/services/ppmshipment/validation.go | 1 + swagger-def/ghc.yaml | 2 ++ swagger-def/internal.yaml | 2 ++ swagger-def/prime.yaml | 2 ++ swagger-def/prime_v2.yaml | 35 ++++++++++--------- swagger-def/prime_v3.yaml | 35 ++++++++++--------- swagger/ghc.yaml | 2 ++ swagger/internal.yaml | 2 ++ swagger/prime.yaml | 2 ++ swagger/prime_v2.yaml | 2 ++ swagger/prime_v3.yaml | 2 ++ 32 files changed, 123 insertions(+), 48 deletions(-) diff --git a/pkg/gen/ghcapi/embedded_spec.go b/pkg/gen/ghcapi/embedded_spec.go index 93ed10d23fb..b6a1d9c7efd 100644 --- a/pkg/gen/ghcapi/embedded_spec.go +++ b/pkg/gen/ghcapi/embedded_spec.go @@ -7240,6 +7240,7 @@ func init() { "isActualExpenseReimbursement": { "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", "type": "boolean", + "x-nullable": true, "x-omitempty": false, "example": false }, @@ -13466,6 +13467,7 @@ func init() { "isActualExpenseReimbursement": { "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", "type": "boolean", + "x-nullable": true, "x-omitempty": false, "example": false }, @@ -22939,6 +22941,7 @@ func init() { "isActualExpenseReimbursement": { "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", "type": "boolean", + "x-nullable": true, "x-omitempty": false, "example": false }, @@ -29296,6 +29299,7 @@ func init() { "isActualExpenseReimbursement": { "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", "type": "boolean", + "x-nullable": true, "x-omitempty": false, "example": false }, diff --git a/pkg/gen/ghcmessages/create_p_p_m_shipment.go b/pkg/gen/ghcmessages/create_p_p_m_shipment.go index 26c0677cd74..aebd5c7c621 100644 --- a/pkg/gen/ghcmessages/create_p_p_m_shipment.go +++ b/pkg/gen/ghcmessages/create_p_p_m_shipment.go @@ -55,7 +55,7 @@ type CreatePPMShipment struct { // Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method. // Example: false - IsActualExpenseReimbursement bool `json:"isActualExpenseReimbursement"` + IsActualExpenseReimbursement *bool `json:"isActualExpenseReimbursement"` // pickup address // Required: true diff --git a/pkg/gen/ghcmessages/update_p_p_m_shipment.go b/pkg/gen/ghcmessages/update_p_p_m_shipment.go index 393adca6e62..e77fadafee8 100644 --- a/pkg/gen/ghcmessages/update_p_p_m_shipment.go +++ b/pkg/gen/ghcmessages/update_p_p_m_shipment.go @@ -90,7 +90,7 @@ type UpdatePPMShipment struct { // Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method. // Example: false - IsActualExpenseReimbursement bool `json:"isActualExpenseReimbursement"` + IsActualExpenseReimbursement *bool `json:"isActualExpenseReimbursement"` // pickup address PickupAddress struct { diff --git a/pkg/gen/internalapi/embedded_spec.go b/pkg/gen/internalapi/embedded_spec.go index db0f2496b6d..27b741fbcb2 100644 --- a/pkg/gen/internalapi/embedded_spec.go +++ b/pkg/gen/internalapi/embedded_spec.go @@ -3868,6 +3868,7 @@ func init() { "isActualExpenseReimbursement": { "description": "Denotes if this PPM shipment uses the Actual Expense Reimbursement method.", "type": "boolean", + "x-nullable": true, "x-omitempty": false, "example": false }, @@ -7476,6 +7477,7 @@ func init() { "isActualExpenseReimbursement": { "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", "type": "boolean", + "x-nullable": true, "x-omitempty": false, "example": false }, @@ -12503,6 +12505,7 @@ func init() { "isActualExpenseReimbursement": { "description": "Denotes if this PPM shipment uses the Actual Expense Reimbursement method.", "type": "boolean", + "x-nullable": true, "x-omitempty": false, "example": false }, @@ -16117,6 +16120,7 @@ func init() { "isActualExpenseReimbursement": { "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", "type": "boolean", + "x-nullable": true, "x-omitempty": false, "example": false }, diff --git a/pkg/gen/internalmessages/create_p_p_m_shipment.go b/pkg/gen/internalmessages/create_p_p_m_shipment.go index 8b3f9ee2ecf..336dfc28175 100644 --- a/pkg/gen/internalmessages/create_p_p_m_shipment.go +++ b/pkg/gen/internalmessages/create_p_p_m_shipment.go @@ -37,7 +37,7 @@ type CreatePPMShipment struct { // Denotes if this PPM shipment uses the Actual Expense Reimbursement method. // Example: false - IsActualExpenseReimbursement bool `json:"isActualExpenseReimbursement"` + IsActualExpenseReimbursement *bool `json:"isActualExpenseReimbursement"` // pickup address // Required: true diff --git a/pkg/gen/internalmessages/update_p_p_m_shipment.go b/pkg/gen/internalmessages/update_p_p_m_shipment.go index 8b96c17852d..6ce040df700 100644 --- a/pkg/gen/internalmessages/update_p_p_m_shipment.go +++ b/pkg/gen/internalmessages/update_p_p_m_shipment.go @@ -90,7 +90,7 @@ type UpdatePPMShipment struct { // Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method. // Example: false - IsActualExpenseReimbursement bool `json:"isActualExpenseReimbursement"` + IsActualExpenseReimbursement *bool `json:"isActualExpenseReimbursement"` // pickup address PickupAddress *Address `json:"pickupAddress,omitempty"` diff --git a/pkg/gen/primeapi/embedded_spec.go b/pkg/gen/primeapi/embedded_spec.go index aef09a29c5a..728a5c1f3c6 100644 --- a/pkg/gen/primeapi/embedded_spec.go +++ b/pkg/gen/primeapi/embedded_spec.go @@ -1515,6 +1515,7 @@ func init() { "isActualExpenseReimbursement": { "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", "type": "boolean", + "x-nullable": true, "x-omitempty": false, "example": false }, @@ -4118,6 +4119,7 @@ func init() { "isActualExpenseReimbursement": { "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", "type": "boolean", + "x-nullable": true, "x-omitempty": false, "example": false }, @@ -6245,6 +6247,7 @@ func init() { "isActualExpenseReimbursement": { "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", "type": "boolean", + "x-nullable": true, "x-omitempty": false, "example": false }, @@ -8853,6 +8856,7 @@ func init() { "isActualExpenseReimbursement": { "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", "type": "boolean", + "x-nullable": true, "x-omitempty": false, "example": false }, diff --git a/pkg/gen/primemessages/create_p_p_m_shipment.go b/pkg/gen/primemessages/create_p_p_m_shipment.go index eadc0cb8652..5d3ce075190 100644 --- a/pkg/gen/primemessages/create_p_p_m_shipment.go +++ b/pkg/gen/primemessages/create_p_p_m_shipment.go @@ -42,7 +42,7 @@ type CreatePPMShipment struct { // Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method. // Example: false - IsActualExpenseReimbursement bool `json:"isActualExpenseReimbursement"` + IsActualExpenseReimbursement *bool `json:"isActualExpenseReimbursement"` // The address of the origin location where goods are being moved from. PickupAddress struct { diff --git a/pkg/gen/primemessages/update_p_p_m_shipment.go b/pkg/gen/primemessages/update_p_p_m_shipment.go index f61c039097b..c0601dd92a1 100644 --- a/pkg/gen/primemessages/update_p_p_m_shipment.go +++ b/pkg/gen/primemessages/update_p_p_m_shipment.go @@ -34,7 +34,7 @@ type UpdatePPMShipment struct { // Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method. // Example: false - IsActualExpenseReimbursement bool `json:"isActualExpenseReimbursement"` + IsActualExpenseReimbursement *bool `json:"isActualExpenseReimbursement"` // The estimated weight of the pro-gear being moved belonging to the service member. ProGearWeight *int64 `json:"proGearWeight,omitempty"` diff --git a/pkg/gen/primev2api/embedded_spec.go b/pkg/gen/primev2api/embedded_spec.go index 2897f8f5949..69caebcc4cb 100644 --- a/pkg/gen/primev2api/embedded_spec.go +++ b/pkg/gen/primev2api/embedded_spec.go @@ -717,6 +717,7 @@ func init() { "isActualExpenseReimbursement": { "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", "type": "boolean", + "x-nullable": true, "x-omitempty": false, "example": false }, @@ -3167,6 +3168,7 @@ func init() { "isActualExpenseReimbursement": { "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", "type": "boolean", + "x-nullable": true, "x-omitempty": false, "example": false }, @@ -4151,6 +4153,7 @@ func init() { "isActualExpenseReimbursement": { "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", "type": "boolean", + "x-nullable": true, "x-omitempty": false, "example": false }, @@ -6603,6 +6606,7 @@ func init() { "isActualExpenseReimbursement": { "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", "type": "boolean", + "x-nullable": true, "x-omitempty": false, "example": false }, diff --git a/pkg/gen/primev2messages/create_p_p_m_shipment.go b/pkg/gen/primev2messages/create_p_p_m_shipment.go index 0209806c5b9..5cda5d689dc 100644 --- a/pkg/gen/primev2messages/create_p_p_m_shipment.go +++ b/pkg/gen/primev2messages/create_p_p_m_shipment.go @@ -42,7 +42,7 @@ type CreatePPMShipment struct { // Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method. // Example: false - IsActualExpenseReimbursement bool `json:"isActualExpenseReimbursement"` + IsActualExpenseReimbursement *bool `json:"isActualExpenseReimbursement"` // The address of the origin location where goods are being moved from. PickupAddress struct { diff --git a/pkg/gen/primev2messages/update_p_p_m_shipment.go b/pkg/gen/primev2messages/update_p_p_m_shipment.go index 37b672b87e1..b0310f92f8b 100644 --- a/pkg/gen/primev2messages/update_p_p_m_shipment.go +++ b/pkg/gen/primev2messages/update_p_p_m_shipment.go @@ -34,7 +34,7 @@ type UpdatePPMShipment struct { // Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method. // Example: false - IsActualExpenseReimbursement bool `json:"isActualExpenseReimbursement"` + IsActualExpenseReimbursement *bool `json:"isActualExpenseReimbursement"` // The estimated weight of the pro-gear being moved belonging to the service member. ProGearWeight *int64 `json:"proGearWeight,omitempty"` diff --git a/pkg/gen/primev3api/embedded_spec.go b/pkg/gen/primev3api/embedded_spec.go index 518072ce8eb..9030d4320cf 100644 --- a/pkg/gen/primev3api/embedded_spec.go +++ b/pkg/gen/primev3api/embedded_spec.go @@ -850,6 +850,7 @@ func init() { "isActualExpenseReimbursement": { "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", "type": "boolean", + "x-nullable": true, "x-omitempty": false, "example": false }, @@ -3417,6 +3418,7 @@ func init() { "isActualExpenseReimbursement": { "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", "type": "boolean", + "x-nullable": true, "x-omitempty": false, "example": false }, @@ -4574,6 +4576,7 @@ func init() { "isActualExpenseReimbursement": { "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", "type": "boolean", + "x-nullable": true, "x-omitempty": false, "example": false }, @@ -7143,6 +7146,7 @@ func init() { "isActualExpenseReimbursement": { "description": "Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method.", "type": "boolean", + "x-nullable": true, "x-omitempty": false, "example": false }, diff --git a/pkg/gen/primev3messages/create_p_p_m_shipment.go b/pkg/gen/primev3messages/create_p_p_m_shipment.go index bcc9f27c2af..1b64afc5a04 100644 --- a/pkg/gen/primev3messages/create_p_p_m_shipment.go +++ b/pkg/gen/primev3messages/create_p_p_m_shipment.go @@ -43,7 +43,7 @@ type CreatePPMShipment struct { // Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method. // Example: false - IsActualExpenseReimbursement bool `json:"isActualExpenseReimbursement"` + IsActualExpenseReimbursement *bool `json:"isActualExpenseReimbursement"` // The address of the origin location where goods are being moved from. // Required: true diff --git a/pkg/gen/primev3messages/update_p_p_m_shipment.go b/pkg/gen/primev3messages/update_p_p_m_shipment.go index fa4ff4b69fe..739bfb84fdb 100644 --- a/pkg/gen/primev3messages/update_p_p_m_shipment.go +++ b/pkg/gen/primev3messages/update_p_p_m_shipment.go @@ -52,7 +52,7 @@ type UpdatePPMShipment struct { // Used for PPM shipments only. Denotes if this shipment uses the Actual Expense Reimbursement method. // Example: false - IsActualExpenseReimbursement bool `json:"isActualExpenseReimbursement"` + IsActualExpenseReimbursement *bool `json:"isActualExpenseReimbursement"` // The address of the origin location where goods are being moved from. // diff --git a/pkg/handlers/ghcapi/internal/payloads/payload_to_model.go b/pkg/handlers/ghcapi/internal/payloads/payload_to_model.go index 335c3e57775..df88ae8734e 100644 --- a/pkg/handlers/ghcapi/internal/payloads/payload_to_model.go +++ b/pkg/handlers/ghcapi/internal/payloads/payload_to_model.go @@ -325,6 +325,10 @@ func PPMShipmentModelFromCreate(ppmShipment *ghcmessages.CreatePPMShipment) *mod model.HasTertiaryDestinationAddress = handlers.FmtBool(true) } + if ppmShipment.IsActualExpenseReimbursement != nil { + model.IsActualExpenseReimbursement = ppmShipment.IsActualExpenseReimbursement + } + if model.SITExpected != nil && *model.SITExpected { if ppmShipment.SitLocation != nil { sitLocation := models.SITLocationType(*ppmShipment.SitLocation) @@ -583,6 +587,7 @@ func PPMShipmentModelFromUpdate(ppmShipment *ghcmessages.UpdatePPMShipment) *mod SITExpected: ppmShipment.SitExpected, EstimatedWeight: handlers.PoundPtrFromInt64Ptr(ppmShipment.EstimatedWeight), HasProGear: ppmShipment.HasProGear, + IsActualExpenseReimbursement: ppmShipment.IsActualExpenseReimbursement, ProGearWeight: handlers.PoundPtrFromInt64Ptr(ppmShipment.ProGearWeight), SpouseProGearWeight: handlers.PoundPtrFromInt64Ptr(ppmShipment.SpouseProGearWeight), HasRequestedAdvance: ppmShipment.HasRequestedAdvance, diff --git a/pkg/handlers/internalapi/internal/payloads/payload_to_model.go b/pkg/handlers/internalapi/internal/payloads/payload_to_model.go index af0c8d2e319..0e6856d8e72 100644 --- a/pkg/handlers/internalapi/internal/payloads/payload_to_model.go +++ b/pkg/handlers/internalapi/internal/payloads/payload_to_model.go @@ -168,6 +168,10 @@ func PPMShipmentModelFromCreate(ppmShipment *internalmessages.CreatePPMShipment) model.TertiaryDestinationAddress = AddressModel(ppmShipment.TertiaryDestinationAddress) } + if ppmShipment.IsActualExpenseReimbursement != nil { + model.IsActualExpenseReimbursement = ppmShipment.IsActualExpenseReimbursement + } + return model } @@ -183,6 +187,7 @@ func UpdatePPMShipmentModel(ppmShipment *internalmessages.UpdatePPMShipment) *mo SITExpected: ppmShipment.SitExpected, EstimatedWeight: handlers.PoundPtrFromInt64Ptr(ppmShipment.EstimatedWeight), HasProGear: ppmShipment.HasProGear, + IsActualExpenseReimbursement: ppmShipment.IsActualExpenseReimbursement, ProGearWeight: handlers.PoundPtrFromInt64Ptr(ppmShipment.ProGearWeight), SpouseProGearWeight: handlers.PoundPtrFromInt64Ptr(ppmShipment.SpouseProGearWeight), HasRequestedAdvance: ppmShipment.HasRequestedAdvance, diff --git a/pkg/handlers/primeapi/payloads/payload_to_model.go b/pkg/handlers/primeapi/payloads/payload_to_model.go index 7d4c57c3d84..85f36bb7e01 100644 --- a/pkg/handlers/primeapi/payloads/payload_to_model.go +++ b/pkg/handlers/primeapi/payloads/payload_to_model.go @@ -250,6 +250,10 @@ func PPMShipmentModelFromCreate(ppmShipment *primemessages.CreatePPMShipment) *m model.SpouseProGearWeight = handlers.PoundPtrFromInt64Ptr(ppmShipment.SpouseProGearWeight) } + if ppmShipment.IsActualExpenseReimbursement != nil { + model.IsActualExpenseReimbursement = ppmShipment.IsActualExpenseReimbursement + } + return model } @@ -373,6 +377,10 @@ func PPMShipmentModelFromUpdate(ppmShipment *primemessages.UpdatePPMShipment) *m model.SITEstimatedDepartureDate = sitEstimatedDepartureDate } + if ppmShipment.IsActualExpenseReimbursement != nil { + model.IsActualExpenseReimbursement = ppmShipment.IsActualExpenseReimbursement + } + return model } diff --git a/pkg/handlers/primeapiv2/payloads/payload_to_model.go b/pkg/handlers/primeapiv2/payloads/payload_to_model.go index bf579be5b52..61cec0ef6fb 100644 --- a/pkg/handlers/primeapiv2/payloads/payload_to_model.go +++ b/pkg/handlers/primeapiv2/payloads/payload_to_model.go @@ -258,6 +258,10 @@ func PPMShipmentModelFromCreate(ppmShipment *primev2messages.CreatePPMShipment) model.SpouseProGearWeight = handlers.PoundPtrFromInt64Ptr(ppmShipment.SpouseProGearWeight) } + if ppmShipment.IsActualExpenseReimbursement != nil { + model.IsActualExpenseReimbursement = ppmShipment.IsActualExpenseReimbursement + } + return model } @@ -383,6 +387,10 @@ func PPMShipmentModelFromUpdate(ppmShipment *primev2messages.UpdatePPMShipment) model.SITEstimatedDepartureDate = sitEstimatedDepartureDate } + if ppmShipment.IsActualExpenseReimbursement != nil { + model.IsActualExpenseReimbursement = ppmShipment.IsActualExpenseReimbursement + } + return model } diff --git a/pkg/handlers/primeapiv3/payloads/payload_to_model.go b/pkg/handlers/primeapiv3/payloads/payload_to_model.go index 3d56ec9be57..6b95ea6e8bf 100644 --- a/pkg/handlers/primeapiv3/payloads/payload_to_model.go +++ b/pkg/handlers/primeapiv3/payloads/payload_to_model.go @@ -321,6 +321,10 @@ func PPMShipmentModelFromCreate(ppmShipment *primev3messages.CreatePPMShipment) model.SpouseProGearWeight = handlers.PoundPtrFromInt64Ptr(ppmShipment.SpouseProGearWeight) } + if ppmShipment.IsActualExpenseReimbursement != nil { + model.IsActualExpenseReimbursement = ppmShipment.IsActualExpenseReimbursement + } + return model } @@ -547,6 +551,10 @@ func PPMShipmentModelFromUpdate(ppmShipment *primev3messages.UpdatePPMShipment) model.SITEstimatedDepartureDate = sitEstimatedDepartureDate } + if ppmShipment.IsActualExpenseReimbursement != nil { + model.IsActualExpenseReimbursement = ppmShipment.IsActualExpenseReimbursement + } + return model } diff --git a/pkg/handlers/primeapiv3/payloads/payload_to_model_test.go b/pkg/handlers/primeapiv3/payloads/payload_to_model_test.go index 9763954dca6..13efb7d4189 100644 --- a/pkg/handlers/primeapiv3/payloads/payload_to_model_test.go +++ b/pkg/handlers/primeapiv3/payloads/payload_to_model_test.go @@ -639,7 +639,7 @@ func (suite *PayloadsSuite) TestPPMShipmentModelFromCreate() { HasProGear: &hasProGear, ProGearWeight: &proGearWeight, SpouseProGearWeight: &spouseProGearWeight, - IsActualExpenseReimbursement: true, + IsActualExpenseReimbursement: models.BoolPointer(true), } model := PPMShipmentModelFromCreate(&ppmShipment) @@ -662,9 +662,7 @@ func (suite *PayloadsSuite) TestPPMShipmentModelFromCreate() { func (suite *PayloadsSuite) TestPPMShipmentModelFromUpdate() { time := time.Now() expectedDepartureDate := handlers.FmtDatePtr(&time) - sitExpected := true estimatedWeight := int64(5000) - hasProGear := true proGearWeight := int64(500) spouseProGearWeight := int64(50) @@ -757,12 +755,12 @@ func (suite *PayloadsSuite) TestPPMShipmentModelFromUpdate() { DestinationAddress: struct{ primev3messages.Address }{destinationAddress}, SecondaryDestinationAddress: struct{ primev3messages.Address }{secondaryDestinationAddress}, TertiaryDestinationAddress: struct{ primev3messages.Address }{tertiaryDestinationAddress}, - SitExpected: &sitExpected, + SitExpected: models.BoolPointer(true), EstimatedWeight: &estimatedWeight, - HasProGear: &hasProGear, + HasProGear: models.BoolPointer(true), ProGearWeight: &proGearWeight, SpouseProGearWeight: &spouseProGearWeight, - IsActualExpenseReimbursement: true, + IsActualExpenseReimbursement: models.BoolPointer(true), } model := PPMShipmentModelFromUpdate(&ppmShipment) diff --git a/pkg/services/ppmshipment/validation.go b/pkg/services/ppmshipment/validation.go index 5db81b9bac7..5073e39f3b4 100644 --- a/pkg/services/ppmshipment/validation.go +++ b/pkg/services/ppmshipment/validation.go @@ -85,6 +85,7 @@ func mergePPMShipment(newPPMShipment models.PPMShipment, oldPPMShipment *models. ppmShipment.FinalIncentive = services.SetNoNilOptionalCentField(newPPMShipment.FinalIncentive, ppmShipment.FinalIncentive) ppmShipment.HasReceivedAdvance = services.SetNoNilOptionalBoolField(newPPMShipment.HasReceivedAdvance, ppmShipment.HasReceivedAdvance) ppmShipment.AdvanceAmountReceived = services.SetNoNilOptionalCentField(newPPMShipment.AdvanceAmountReceived, ppmShipment.AdvanceAmountReceived) + ppmShipment.IsActualExpenseReimbursement = services.SetNoNilOptionalBoolField(newPPMShipment.IsActualExpenseReimbursement, ppmShipment.IsActualExpenseReimbursement) ppmShipment.SITExpected = services.SetNoNilOptionalBoolField(newPPMShipment.SITExpected, ppmShipment.SITExpected) ppmShipment.SITEstimatedWeight = services.SetNoNilOptionalPoundField(newPPMShipment.SITEstimatedWeight, ppmShipment.SITEstimatedWeight) diff --git a/swagger-def/ghc.yaml b/swagger-def/ghc.yaml index 8f4ebe3320e..32eb2d1a3dc 100644 --- a/swagger-def/ghc.yaml +++ b/swagger-def/ghc.yaml @@ -6121,6 +6121,7 @@ definitions: type: boolean example: false x-omitempty: false + x-nullable: true UpdateBoatShipment: type: object properties: @@ -6491,6 +6492,7 @@ definitions: type: boolean example: false x-omitempty: false + x-nullable: true required: - expectedDepartureDate - pickupAddress diff --git a/swagger-def/internal.yaml b/swagger-def/internal.yaml index 2d94f6f24ca..b91d96f303e 100644 --- a/swagger-def/internal.yaml +++ b/swagger-def/internal.yaml @@ -1960,6 +1960,7 @@ definitions: type: boolean example: false x-omitempty: false + x-nullable: true required: - expectedDepartureDate - pickupAddress @@ -2080,6 +2081,7 @@ definitions: type: boolean example: false x-omitempty: false + x-nullable: true CreateBoatShipment: description: Boat shipment information for the move. properties: diff --git a/swagger-def/prime.yaml b/swagger-def/prime.yaml index fbc0df62d64..2122b1f2cb5 100644 --- a/swagger-def/prime.yaml +++ b/swagger-def/prime.yaml @@ -1385,6 +1385,7 @@ definitions: type: boolean example: false x-omitempty: false + x-nullable: true required: - expectedDepartureDate - sitExpected @@ -1886,6 +1887,7 @@ definitions: type: boolean example: false x-omitempty: false + x-nullable: true UpdateMTOShipmentStatus: description: Contains the statuses available to the Prime when updating the state of a shipment. type: object diff --git a/swagger-def/prime_v2.yaml b/swagger-def/prime_v2.yaml index 83243e3df73..6d311d4d847 100644 --- a/swagger-def/prime_v2.yaml +++ b/swagger-def/prime_v2.yaml @@ -166,22 +166,23 @@ paths: summary: Boat Shipment value: { - "boatShipment": { - "hasTrailer": true, - "heightFeet": 2, - "heightInches": 2, - "isRoadworthy": false, - "lengthFeet": 2, - "lengthInches": 0, - "make": "make", - "model": "model", - "widthFeet": 2, - "widthInches": 2, - "year": 1999 - }, - "counselorRemarks": "test", - "moveTaskOrderID": "d4d95b22-2d9d-428b-9a11-284455aa87ba", - "shipmentType": "HAUL_AWAY" + 'boatShipment': + { + 'hasTrailer': true, + 'heightFeet': 2, + 'heightInches': 2, + 'isRoadworthy': false, + 'lengthFeet': 2, + 'lengthInches': 0, + 'make': 'make', + 'model': 'model', + 'widthFeet': 2, + 'widthInches': 2, + 'year': 1999, + }, + 'counselorRemarks': 'test', + 'moveTaskOrderID': 'd4d95b22-2d9d-428b-9a11-284455aa87ba', + 'shipmentType': 'HAUL_AWAY', } responses: '200': @@ -478,6 +479,7 @@ definitions: type: boolean example: false x-omitempty: false + x-nullable: true required: - expectedDepartureDate - sitExpected @@ -658,6 +660,7 @@ definitions: type: boolean example: false x-omitempty: false + x-nullable: true UpdateMTOShipment: properties: scheduledPickupDate: diff --git a/swagger-def/prime_v3.yaml b/swagger-def/prime_v3.yaml index 5b50da4f4e8..7ea5c454ced 100644 --- a/swagger-def/prime_v3.yaml +++ b/swagger-def/prime_v3.yaml @@ -167,22 +167,23 @@ paths: summary: Boat Shipment value: { - "boatShipment": { - "hasTrailer": true, - "heightFeet": 2, - "heightInches": 2, - "isRoadworthy": false, - "lengthFeet": 2, - "lengthInches": 0, - "make": "make", - "model": "model", - "widthFeet": 2, - "widthInches": 2, - "year": 1999 - }, - "counselorRemarks": "test", - "moveTaskOrderID": "d4d95b22-2d9d-428b-9a11-284455aa87ba", - "shipmentType": "HAUL_AWAY" + 'boatShipment': + { + 'hasTrailer': true, + 'heightFeet': 2, + 'heightInches': 2, + 'isRoadworthy': false, + 'lengthFeet': 2, + 'lengthInches': 0, + 'make': 'make', + 'model': 'model', + 'widthFeet': 2, + 'widthInches': 2, + 'year': 1999, + }, + 'counselorRemarks': 'test', + 'moveTaskOrderID': 'd4d95b22-2d9d-428b-9a11-284455aa87ba', + 'shipmentType': 'HAUL_AWAY', } responses: '200': @@ -503,6 +504,7 @@ definitions: type: boolean example: false x-omitempty: false + x-nullable: true required: - expectedDepartureDate - pickupAddress @@ -731,6 +733,7 @@ definitions: type: boolean example: false x-omitempty: false + x-nullable: true UpdateMTOShipment: properties: actualProGearWeight: diff --git a/swagger/ghc.yaml b/swagger/ghc.yaml index ae304a7d3a4..661079f503c 100644 --- a/swagger/ghc.yaml +++ b/swagger/ghc.yaml @@ -6377,6 +6377,7 @@ definitions: type: boolean example: false x-omitempty: false + x-nullable: true UpdateBoatShipment: type: object properties: @@ -6773,6 +6774,7 @@ definitions: type: boolean example: false x-omitempty: false + x-nullable: true required: - expectedDepartureDate - pickupAddress diff --git a/swagger/internal.yaml b/swagger/internal.yaml index f6f703e8510..c72283d74b5 100644 --- a/swagger/internal.yaml +++ b/swagger/internal.yaml @@ -1991,6 +1991,7 @@ definitions: type: boolean example: false x-omitempty: false + x-nullable: true required: - expectedDepartureDate - pickupAddress @@ -2117,6 +2118,7 @@ definitions: type: boolean example: false x-omitempty: false + x-nullable: true CreateBoatShipment: description: Boat shipment information for the move. properties: diff --git a/swagger/prime.yaml b/swagger/prime.yaml index 904df423805..4287dff711b 100644 --- a/swagger/prime.yaml +++ b/swagger/prime.yaml @@ -1732,6 +1732,7 @@ definitions: type: boolean example: false x-omitempty: false + x-nullable: true required: - expectedDepartureDate - sitExpected @@ -2616,6 +2617,7 @@ definitions: type: boolean example: false x-omitempty: false + x-nullable: true UpdateMTOShipmentStatus: description: >- Contains the statuses available to the Prime when updating the state of a diff --git a/swagger/prime_v2.yaml b/swagger/prime_v2.yaml index 5c8e87d3d70..7ec64eeddd7 100644 --- a/swagger/prime_v2.yaml +++ b/swagger/prime_v2.yaml @@ -781,6 +781,7 @@ definitions: type: boolean example: false x-omitempty: false + x-nullable: true required: - expectedDepartureDate - sitExpected @@ -983,6 +984,7 @@ definitions: type: boolean example: false x-omitempty: false + x-nullable: true UpdateMTOShipment: properties: scheduledPickupDate: diff --git a/swagger/prime_v3.yaml b/swagger/prime_v3.yaml index 7e8ee6b6063..f63800f2bc7 100644 --- a/swagger/prime_v3.yaml +++ b/swagger/prime_v3.yaml @@ -800,6 +800,7 @@ definitions: type: boolean example: false x-omitempty: false + x-nullable: true required: - expectedDepartureDate - pickupAddress @@ -1055,6 +1056,7 @@ definitions: type: boolean example: false x-omitempty: false + x-nullable: true UpdateMTOShipment: properties: actualProGearWeight: From 7518ea5210829fc9101f0928df2e537ccedfea8b Mon Sep 17 00:00:00 2001 From: Brooklyn Welsh Date: Fri, 18 Oct 2024 17:42:58 +0000 Subject: [PATCH 09/15] Fixed a failing test --- .../primeapiv3/payloads/payload_to_model_test.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pkg/handlers/primeapiv3/payloads/payload_to_model_test.go b/pkg/handlers/primeapiv3/payloads/payload_to_model_test.go index 13efb7d4189..caa2ab9a236 100644 --- a/pkg/handlers/primeapiv3/payloads/payload_to_model_test.go +++ b/pkg/handlers/primeapiv3/payloads/payload_to_model_test.go @@ -766,16 +766,15 @@ func (suite *PayloadsSuite) TestPPMShipmentModelFromUpdate() { model := PPMShipmentModelFromUpdate(&ppmShipment) suite.NotNil(model) - suite.Equal(models.PPMShipmentStatusSubmitted, model.Status) suite.True(*model.SITExpected) suite.Equal(unit.Pound(estimatedWeight), *model.EstimatedWeight) suite.True(*model.HasProGear) suite.Equal(unit.Pound(proGearWeight), *model.ProGearWeight) suite.Equal(unit.Pound(spouseProGearWeight), *model.SpouseProGearWeight) - suite.True(*model.HasSecondaryPickupAddress) - suite.True(*model.HasSecondaryDestinationAddress) - suite.True(*model.HasTertiaryPickupAddress) - suite.True(*model.HasTertiaryDestinationAddress) + suite.Nil(model.HasSecondaryPickupAddress) + suite.Nil(model.HasSecondaryDestinationAddress) + suite.Nil(model.HasTertiaryPickupAddress) + suite.Nil(model.HasTertiaryDestinationAddress) suite.True(*model.IsActualExpenseReimbursement) suite.NotNil(model) } From 2d26c3e32545793765f2075d78e201619b7745b5 Mon Sep 17 00:00:00 2001 From: Brooklyn Welsh Date: Fri, 18 Oct 2024 18:08:32 +0000 Subject: [PATCH 10/15] Added more tests for various payload_to_model files --- .../payloads/payload_to_model_test.go | 130 ++++++++++++++++++ .../payloads/payload_to_model_test.go | 43 +++++- .../payloads/payload_to_model_test.go | 43 +++++- 3 files changed, 204 insertions(+), 12 deletions(-) create mode 100644 pkg/handlers/internalapi/internal/payloads/payload_to_model_test.go diff --git a/pkg/handlers/internalapi/internal/payloads/payload_to_model_test.go b/pkg/handlers/internalapi/internal/payloads/payload_to_model_test.go new file mode 100644 index 00000000000..a4da17f7a8b --- /dev/null +++ b/pkg/handlers/internalapi/internal/payloads/payload_to_model_test.go @@ -0,0 +1,130 @@ +package payloads + +import ( + "time" + + "github.com/transcom/mymove/pkg/gen/internalmessages" + "github.com/transcom/mymove/pkg/handlers" + "github.com/transcom/mymove/pkg/models" + "github.com/transcom/mymove/pkg/unit" +) + +func (suite *PayloadsSuite) TestPPMShipmentModelFromUpdate() { + time := time.Now() + expectedDepartureDate := handlers.FmtDatePtr(&time) + estimatedWeight := int64(5000) + proGearWeight := int64(500) + spouseProGearWeight := int64(50) + + address := models.Address{ + StreetAddress1: "some address", + City: "city", + State: "state", + PostalCode: "12345", + } + address2 := models.Address{ + StreetAddress1: "some address", + City: "city", + State: "state", + PostalCode: "11111", + } + address3 := models.Address{ + StreetAddress1: "some address", + City: "city", + State: "state", + PostalCode: "54321", + } + + var pickupAddress internalmessages.Address + var secondaryPickupAddress internalmessages.Address + var tertiaryPickupAddress internalmessages.Address + var destinationAddress internalmessages.Address + var secondaryDestinationAddress internalmessages.Address + var tertiaryDestinationAddress internalmessages.Address + + pickupAddress = internalmessages.Address{ + City: &address.City, + Country: address.Country, + PostalCode: &address.PostalCode, + State: &address.State, + StreetAddress1: &address.StreetAddress1, + StreetAddress2: address.StreetAddress2, + StreetAddress3: address.StreetAddress3, + } + destinationAddress = internalmessages.Address{ + City: &address.City, + Country: address.Country, + PostalCode: &address.PostalCode, + State: &address.State, + StreetAddress1: &address.StreetAddress1, + StreetAddress2: address.StreetAddress2, + StreetAddress3: address.StreetAddress3, + } + secondaryPickupAddress = internalmessages.Address{ + City: &address2.City, + Country: address2.Country, + PostalCode: &address2.PostalCode, + State: &address2.State, + StreetAddress1: &address2.StreetAddress1, + StreetAddress2: address2.StreetAddress2, + StreetAddress3: address2.StreetAddress3, + } + secondaryDestinationAddress = internalmessages.Address{ + City: &address2.City, + Country: address2.Country, + PostalCode: &address2.PostalCode, + State: &address2.State, + StreetAddress1: &address2.StreetAddress1, + StreetAddress2: address2.StreetAddress2, + StreetAddress3: address2.StreetAddress3, + } + tertiaryPickupAddress = internalmessages.Address{ + City: &address3.City, + Country: address3.Country, + PostalCode: &address3.PostalCode, + State: &address3.State, + StreetAddress1: &address3.StreetAddress1, + StreetAddress2: address3.StreetAddress2, + StreetAddress3: address3.StreetAddress3, + } + tertiaryDestinationAddress = internalmessages.Address{ + City: &address3.City, + Country: address3.Country, + PostalCode: &address3.PostalCode, + State: &address3.State, + StreetAddress1: &address3.StreetAddress1, + StreetAddress2: address3.StreetAddress2, + StreetAddress3: address3.StreetAddress3, + } + + ppmShipment := internalmessages.UpdatePPMShipment{ + ExpectedDepartureDate: expectedDepartureDate, + PickupAddress: &pickupAddress, + SecondaryPickupAddress: &secondaryPickupAddress, + TertiaryPickupAddress: &tertiaryPickupAddress, + DestinationAddress: &destinationAddress, + SecondaryDestinationAddress: &secondaryDestinationAddress, + TertiaryDestinationAddress: &tertiaryDestinationAddress, + SitExpected: models.BoolPointer(true), + EstimatedWeight: &estimatedWeight, + HasProGear: models.BoolPointer(true), + ProGearWeight: &proGearWeight, + SpouseProGearWeight: &spouseProGearWeight, + IsActualExpenseReimbursement: models.BoolPointer(true), + } + + model := UpdatePPMShipmentModel(&ppmShipment) + + suite.NotNil(model) + suite.True(*model.SITExpected) + suite.Equal(unit.Pound(estimatedWeight), *model.EstimatedWeight) + suite.True(*model.HasProGear) + suite.Equal(unit.Pound(proGearWeight), *model.ProGearWeight) + suite.Equal(unit.Pound(spouseProGearWeight), *model.SpouseProGearWeight) + suite.Nil(model.HasSecondaryPickupAddress) + suite.Nil(model.HasSecondaryDestinationAddress) + suite.Nil(model.HasTertiaryPickupAddress) + suite.Nil(model.HasTertiaryDestinationAddress) + suite.True(*model.IsActualExpenseReimbursement) + suite.NotNil(model) +} diff --git a/pkg/handlers/primeapi/payloads/payload_to_model_test.go b/pkg/handlers/primeapi/payloads/payload_to_model_test.go index 7427a01fbfa..1a8240524cc 100644 --- a/pkg/handlers/primeapi/payloads/payload_to_model_test.go +++ b/pkg/handlers/primeapi/payloads/payload_to_model_test.go @@ -501,12 +501,13 @@ func (suite *PayloadsSuite) TestPPMShipmentModelFromCreate() { spouseProGearWeight := int64(50) ppmShipment := primemessages.CreatePPMShipment{ - ExpectedDepartureDate: expectedDepartureDate, - SitExpected: &sitExpected, - EstimatedWeight: &estimatedWeight, - HasProGear: &hasProGear, - ProGearWeight: &proGearWeight, - SpouseProGearWeight: &spouseProGearWeight, + ExpectedDepartureDate: expectedDepartureDate, + SitExpected: &sitExpected, + EstimatedWeight: &estimatedWeight, + HasProGear: &hasProGear, + ProGearWeight: &proGearWeight, + SpouseProGearWeight: &spouseProGearWeight, + IsActualExpenseReimbursement: models.BoolPointer(true), } model := PPMShipmentModelFromCreate(&ppmShipment) @@ -518,4 +519,34 @@ func (suite *PayloadsSuite) TestPPMShipmentModelFromCreate() { suite.True(*model.HasProGear) suite.Equal(unit.Pound(proGearWeight), *model.ProGearWeight) suite.Equal(unit.Pound(spouseProGearWeight), *model.SpouseProGearWeight) + suite.True(*model.IsActualExpenseReimbursement) +} + +func (suite *PayloadsSuite) TestPPMShipmentModelFromUpdate() { + time := time.Now() + expectedDepartureDate := handlers.FmtDatePtr(&time) + estimatedWeight := int64(5000) + proGearWeight := int64(500) + spouseProGearWeight := int64(50) + + ppmShipment := primemessages.UpdatePPMShipment{ + ExpectedDepartureDate: expectedDepartureDate, + SitExpected: models.BoolPointer(true), + EstimatedWeight: &estimatedWeight, + HasProGear: models.BoolPointer(true), + ProGearWeight: &proGearWeight, + SpouseProGearWeight: &spouseProGearWeight, + IsActualExpenseReimbursement: models.BoolPointer(true), + } + + model := PPMShipmentModelFromUpdate(&ppmShipment) + + suite.NotNil(model) + suite.True(*model.SITExpected) + suite.Equal(unit.Pound(estimatedWeight), *model.EstimatedWeight) + suite.True(*model.HasProGear) + suite.Equal(unit.Pound(proGearWeight), *model.ProGearWeight) + suite.Equal(unit.Pound(spouseProGearWeight), *model.SpouseProGearWeight) + suite.True(*model.IsActualExpenseReimbursement) + suite.NotNil(model) } diff --git a/pkg/handlers/primeapiv2/payloads/payload_to_model_test.go b/pkg/handlers/primeapiv2/payloads/payload_to_model_test.go index b1960cb009a..22938f070ab 100644 --- a/pkg/handlers/primeapiv2/payloads/payload_to_model_test.go +++ b/pkg/handlers/primeapiv2/payloads/payload_to_model_test.go @@ -463,12 +463,13 @@ func (suite *PayloadsSuite) TestPPMShipmentModelFromCreate() { spouseProGearWeight := int64(50) ppmShipment := primev2messages.CreatePPMShipment{ - ExpectedDepartureDate: expectedDepartureDate, - SitExpected: &sitExpected, - EstimatedWeight: &estimatedWeight, - HasProGear: &hasProGear, - ProGearWeight: &proGearWeight, - SpouseProGearWeight: &spouseProGearWeight, + ExpectedDepartureDate: expectedDepartureDate, + SitExpected: &sitExpected, + EstimatedWeight: &estimatedWeight, + HasProGear: &hasProGear, + ProGearWeight: &proGearWeight, + SpouseProGearWeight: &spouseProGearWeight, + IsActualExpenseReimbursement: models.BoolPointer(true), } model := PPMShipmentModelFromCreate(&ppmShipment) @@ -480,4 +481,34 @@ func (suite *PayloadsSuite) TestPPMShipmentModelFromCreate() { suite.True(*model.HasProGear) suite.Equal(unit.Pound(proGearWeight), *model.ProGearWeight) suite.Equal(unit.Pound(spouseProGearWeight), *model.SpouseProGearWeight) + suite.True(*model.IsActualExpenseReimbursement) +} + +func (suite *PayloadsSuite) TestPPMShipmentModelFromUpdate() { + time := time.Now() + expectedDepartureDate := handlers.FmtDatePtr(&time) + estimatedWeight := int64(5000) + proGearWeight := int64(500) + spouseProGearWeight := int64(50) + + ppmShipment := primev2messages.UpdatePPMShipment{ + ExpectedDepartureDate: expectedDepartureDate, + SitExpected: models.BoolPointer(true), + EstimatedWeight: &estimatedWeight, + HasProGear: models.BoolPointer(true), + ProGearWeight: &proGearWeight, + SpouseProGearWeight: &spouseProGearWeight, + IsActualExpenseReimbursement: models.BoolPointer(true), + } + + model := PPMShipmentModelFromUpdate(&ppmShipment) + + suite.NotNil(model) + suite.True(*model.SITExpected) + suite.Equal(unit.Pound(estimatedWeight), *model.EstimatedWeight) + suite.True(*model.HasProGear) + suite.Equal(unit.Pound(proGearWeight), *model.ProGearWeight) + suite.Equal(unit.Pound(spouseProGearWeight), *model.SpouseProGearWeight) + suite.True(*model.IsActualExpenseReimbursement) + suite.NotNil(model) } From 44b2c870ced8dd0038dfb62dc37c45bc21049f23 Mon Sep 17 00:00:00 2001 From: JamesHawks224 <146897935+JamesHawks224@users.noreply.github.com> Date: Thu, 24 Oct 2024 19:15:24 +0000 Subject: [PATCH 11/15] made some fixes. --- ...201326_changes_for_actual_expense_reimbursement_field.up.sql | 2 +- src/pages/MyMove/Profile/ResidentialAddress.test.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/migrations/app/schema/20241011201326_changes_for_actual_expense_reimbursement_field.up.sql b/migrations/app/schema/20241011201326_changes_for_actual_expense_reimbursement_field.up.sql index d753a848388..f3c54a6eaed 100644 --- a/migrations/app/schema/20241011201326_changes_for_actual_expense_reimbursement_field.up.sql +++ b/migrations/app/schema/20241011201326_changes_for_actual_expense_reimbursement_field.up.sql @@ -1,4 +1,4 @@ -- adding boolean for actual expense reimbursement for ppm shipments ALTER TABLE ppm_shipments -ADD COLUMN is_actual_expense_reimbursement BOOLEAN DEFAULT FALSE; +ADD COLUMN IF NOT EXISTS is_actual_expense_reimbursement BOOLEAN DEFAULT FALSE; COMMENT on COLUMN ppm_shipments.is_actual_expense_reimbursement IS 'Whether or not the ppm is an actual expense reimbursement'; diff --git a/src/pages/MyMove/Profile/ResidentialAddress.test.jsx b/src/pages/MyMove/Profile/ResidentialAddress.test.jsx index aeedb49f9bf..cd903f2913b 100644 --- a/src/pages/MyMove/Profile/ResidentialAddress.test.jsx +++ b/src/pages/MyMove/Profile/ResidentialAddress.test.jsx @@ -110,7 +110,7 @@ describe('ResidentialAddress page', () => { await userEvent.type(screen.getByLabelText(/ZIP/), fakeAddress.postalCode); await userEvent.tab(); - let msg = getByText('Moves to this state are not supported at this time.'); + let msg = screen.getByText('Moves to this state are not supported at this time.'); expect(msg).toBeVisible(); await userEvent.selectOptions(getByLabelText(/State/), 'AL'); From 3d50c77b060d7df99d66e662aa8e80d93f0be0b4 Mon Sep 17 00:00:00 2001 From: JamesHawks224 <146897935+JamesHawks224@users.noreply.github.com> Date: Tue, 22 Oct 2024 19:36:31 +0000 Subject: [PATCH 12/15] fixed test --- pkg/handlers/primeapiv3/payloads/payload_to_model_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkg/handlers/primeapiv3/payloads/payload_to_model_test.go b/pkg/handlers/primeapiv3/payloads/payload_to_model_test.go index caa2ab9a236..31ba0274732 100644 --- a/pkg/handlers/primeapiv3/payloads/payload_to_model_test.go +++ b/pkg/handlers/primeapiv3/payloads/payload_to_model_test.go @@ -666,23 +666,31 @@ func (suite *PayloadsSuite) TestPPMShipmentModelFromUpdate() { proGearWeight := int64(500) spouseProGearWeight := int64(50) + country := models.Country{ + Country: "US", + CountryName: "United States", + } + address := models.Address{ StreetAddress1: "some address", City: "city", State: "state", PostalCode: "12345", + Country: &country, } address2 := models.Address{ StreetAddress1: "some address", City: "city", State: "state", PostalCode: "11111", + Country: &country, } address3 := models.Address{ StreetAddress1: "some address", City: "city", State: "state", PostalCode: "54321", + Country: &country, } var pickupAddress primev3messages.Address From c69d9db5d8ab0ad24fc0ed8810e5bd5334ad02a9 Mon Sep 17 00:00:00 2001 From: Brooklyn Welsh Date: Mon, 28 Oct 2024 11:52:53 -0400 Subject: [PATCH 13/15] Added screen to other client tests. --- src/pages/MyMove/Profile/BackupAddress.test.jsx | 8 ++++---- .../Office/CustomerOnboarding/CreateCustomerForm.test.jsx | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/pages/MyMove/Profile/BackupAddress.test.jsx b/src/pages/MyMove/Profile/BackupAddress.test.jsx index 0adf7446cb3..d4edbe581a5 100644 --- a/src/pages/MyMove/Profile/BackupAddress.test.jsx +++ b/src/pages/MyMove/Profile/BackupAddress.test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { render, waitFor } from '@testing-library/react'; +import { render, screen, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { MockProviders } from 'testUtils'; @@ -102,7 +102,7 @@ describe('BackupAddress page', () => { patchServiceMember.mockImplementation(() => Promise.resolve(expectedServiceMemberPayload)); - const { getByLabelText, getByText } = render(); + const { getByLabelText } = render(); await userEvent.type(getByLabelText(/Address 1/), fakeAddress.streetAddress1); await userEvent.type(getByLabelText(/Address 2/), fakeAddress.streetAddress2); @@ -111,7 +111,7 @@ describe('BackupAddress page', () => { await userEvent.type(getByLabelText(/ZIP/), fakeAddress.postalCode); await userEvent.tab(); - let msg = getByText('Moves to this state are not supported at this time.'); + let msg = screen.getByText('Moves to this state are not supported at this time.'); expect(msg).toBeVisible(); await userEvent.selectOptions(getByLabelText(/State/), 'AL'); @@ -122,7 +122,7 @@ describe('BackupAddress page', () => { await userEvent.selectOptions(getByLabelText(/State/), 'HI'); await userEvent.type(getByLabelText(/ZIP/), fakeAddress.postalCode); await userEvent.tab(); - msg = getByText('Moves to this state are not supported at this time.'); + msg = screen.getByText('Moves to this state are not supported at this time.'); expect(msg).toBeVisible(); }); diff --git a/src/pages/Office/CustomerOnboarding/CreateCustomerForm.test.jsx b/src/pages/Office/CustomerOnboarding/CreateCustomerForm.test.jsx index 8218221ac64..8d46c50b960 100644 --- a/src/pages/Office/CustomerOnboarding/CreateCustomerForm.test.jsx +++ b/src/pages/Office/CustomerOnboarding/CreateCustomerForm.test.jsx @@ -517,7 +517,7 @@ describe('CreateCustomerForm', () => { it('submits the form and tests for unsupported state validation', async () => { createCustomerWithOktaOption.mockImplementation(() => Promise.resolve(fakeResponse)); - const { getByLabelText, getByTestId, getByRole, getByText } = render( + const { getByLabelText, getByTestId, getByRole } = render( , @@ -562,7 +562,7 @@ describe('CreateCustomerForm', () => { await userEvent.selectOptions(getByTestId('backup-add-state'), 'HI'); await userEvent.tab(); - const msg = getByText('Moves to this state are not supported at this time.'); + const msg = screen.getByText('Moves to this state are not supported at this time.'); expect(msg).toBeVisible(); await userEvent.selectOptions(getByTestId('backup-add-state'), [fakePayload.residential_address.state]); From 9fd30c83f60fcfa8a4917f331a95b8dacf0acb11 Mon Sep 17 00:00:00 2001 From: Brooklyn Welsh Date: Mon, 28 Oct 2024 16:18:38 +0000 Subject: [PATCH 14/15] Fixed country comparisons in tests --- .../internalapi/internal/payloads/model_to_payload_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/handlers/internalapi/internal/payloads/model_to_payload_test.go b/pkg/handlers/internalapi/internal/payloads/model_to_payload_test.go index 8c9fd415079..0ac8934be7f 100644 --- a/pkg/handlers/internalapi/internal/payloads/model_to_payload_test.go +++ b/pkg/handlers/internalapi/internal/payloads/model_to_payload_test.go @@ -50,7 +50,7 @@ func (suite *PayloadsSuite) TestFetchPPMShipment() { suite.Equal(&postalcode, returnedPPMShipment.PickupAddress.PostalCode) suite.Equal(&city, returnedPPMShipment.PickupAddress.City) suite.Equal(&state, returnedPPMShipment.PickupAddress.State) - suite.Equal(&country, returnedPPMShipment.PickupAddress.Country) + suite.Equal(&country.Country, returnedPPMShipment.PickupAddress.Country) suite.Equal(&county, returnedPPMShipment.PickupAddress.County) suite.Equal(&streetAddress1, returnedPPMShipment.DestinationAddress.StreetAddress1) @@ -59,7 +59,7 @@ func (suite *PayloadsSuite) TestFetchPPMShipment() { suite.Equal(&postalcode, returnedPPMShipment.DestinationAddress.PostalCode) suite.Equal(&city, returnedPPMShipment.DestinationAddress.City) suite.Equal(&state, returnedPPMShipment.DestinationAddress.State) - suite.Equal(&country, returnedPPMShipment.DestinationAddress.Country) + suite.Equal(&country.Country, returnedPPMShipment.DestinationAddress.Country) suite.Equal(&county, returnedPPMShipment.DestinationAddress.County) suite.True(*returnedPPMShipment.IsActualExpenseReimbursement) From 240cbdb166ca1a6aa2ad4ac2287901116009d73b Mon Sep 17 00:00:00 2001 From: Brooklyn Welsh Date: Mon, 28 Oct 2024 18:43:04 +0000 Subject: [PATCH 15/15] Fixed problem with multiple "required" fields in tests. --- playwright/tests/office/ppms/happyPathFlows.spec.js | 2 ++ playwright/tests/office/ppms/ppmTestFixture.js | 1 + 2 files changed, 3 insertions(+) diff --git a/playwright/tests/office/ppms/happyPathFlows.spec.js b/playwright/tests/office/ppms/happyPathFlows.spec.js index 010a1d8e4a4..8df004b255f 100644 --- a/playwright/tests/office/ppms/happyPathFlows.spec.js +++ b/playwright/tests/office/ppms/happyPathFlows.spec.js @@ -32,6 +32,7 @@ test.describe('Services counselor user', () => { // Update page 2 await ppmPage.fillOutIncentiveAndAdvance(); + await expect(page.locator('[data-testid="errorMessage"]')).toHaveCount(1); await expect(page.locator('[data-testid="errorMessage"]')).toContainText('Required'); await page.locator('[data-testid="counselor-remarks"]').fill('Increased incentive to max'); await page.locator('[data-testid="counselor-remarks"]').blur(); @@ -89,6 +90,7 @@ test.describe('Services counselor user', () => { // Fill out page two await ppmPage.fillOutIncentiveAndAdvance({ advance: '10000' }); + await expect(page.locator('[data-testid="errorMessage"]')).toHaveCount(1); await expect(page.locator('[data-testid="errorMessage"]')).toContainText('Required'); await page.locator('[data-testid="counselor-remarks"]').fill('Added correct incentive'); await page.locator('[data-testid="counselor-remarks"]').blur(); diff --git a/playwright/tests/office/ppms/ppmTestFixture.js b/playwright/tests/office/ppms/ppmTestFixture.js index f23467c32b4..9e36d49394d 100644 --- a/playwright/tests/office/ppms/ppmTestFixture.js +++ b/playwright/tests/office/ppms/ppmTestFixture.js @@ -120,6 +120,7 @@ export class PpmPage extends ServiceCounselorPage { await this.page.locator('label[for="hasRequestedAdvanceYes"]').click(); await this.page.locator('input[name="advance"]').clear(); await this.page.locator('input[name="advance"]').fill(advance); + await this.page.locator('input[name="advance"]').blur(); await this.page.locator('label[for="approveAdvanceRequest"]').click(); } else { await this.page.locator('label[for="hasRequestedAdvanceNo"]').click();