diff --git a/migrations/app/migrations_manifest.txt b/migrations/app/migrations_manifest.txt index c0442e6e605..bd0b4f5ec75 100644 --- a/migrations/app/migrations_manifest.txt +++ b/migrations/app/migrations_manifest.txt @@ -1020,3 +1020,4 @@ 20241007224427_update_addresses_us_post_region_cities_id.up.sql 20241008212243_populate_market_code_on_shipments_table.up.sql 20241009210749_create_view_v_locations.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..f3c54a6eaed --- /dev/null +++ b/migrations/app/schema/20241011201326_changes_for_actual_expense_reimbursement_field.up.sql @@ -0,0 +1,4 @@ +-- adding boolean for actual expense reimbursement for ppm shipments +ALTER TABLE ppm_shipments +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/pkg/gen/ghcapi/embedded_spec.go b/pkg/gen/ghcapi/embedded_spec.go index 9965059b6d5..bb732b72dbe 100644 --- a/pkg/gen/ghcapi/embedded_spec.go +++ b/pkg/gen/ghcapi/embedded_spec.go @@ -7253,6 +7253,13 @@ 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-nullable": true, + "x-omitempty": false, + "example": false + }, "pickupAddress": { "allOf": [ { @@ -11058,6 +11065,13 @@ 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-nullable": true, + "x-omitempty": false, + "example": false + }, "movingExpenses": { "description": "All expense documentation receipt records of this PPM shipment.", "type": "array", @@ -13473,6 +13487,13 @@ 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-nullable": true, + "x-omitempty": false, + "example": false + }, "pickupAddress": { "allOf": [ { @@ -22956,6 +22977,13 @@ 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-nullable": true, + "x-omitempty": false, + "example": false + }, "pickupAddress": { "allOf": [ { @@ -26834,6 +26862,13 @@ 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-nullable": true, + "x-omitempty": false, + "example": false + }, "movingExpenses": { "description": "All expense documentation receipt records of this PPM shipment.", "type": "array", @@ -29307,6 +29342,13 @@ 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-nullable": true, + "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..aebd5c7c621 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..8392b5f5cc5 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..e77fadafee8 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 641785e07f3..4b1ba933f05 100644 --- a/pkg/gen/internalapi/embedded_spec.go +++ b/pkg/gen/internalapi/embedded_spec.go @@ -3867,6 +3867,13 @@ func init() { "x-nullable": true, "x-omitempty": false }, + "isActualExpenseReimbursement": { + "description": "Denotes if this PPM shipment uses the Actual Expense Reimbursement method.", + "type": "boolean", + "x-nullable": true, + "x-omitempty": false, + "example": false + }, "pickupAddress": { "$ref": "#/definitions/Address" }, @@ -6195,6 +6202,13 @@ 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-nullable": true, + "x-omitempty": false, + "example": false + }, "movingExpenses": { "description": "All expense documentation receipt records of this PPM shipment.", "type": "array", @@ -7484,6 +7498,13 @@ 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-nullable": true, + "x-omitempty": false, + "example": false + }, "pickupAddress": { "$ref": "#/definitions/Address" }, @@ -12507,6 +12528,13 @@ func init() { "x-nullable": true, "x-omitempty": false }, + "isActualExpenseReimbursement": { + "description": "Denotes if this PPM shipment uses the Actual Expense Reimbursement method.", + "type": "boolean", + "x-nullable": true, + "x-omitempty": false, + "example": false + }, "pickupAddress": { "$ref": "#/definitions/Address" }, @@ -14839,6 +14867,13 @@ 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-nullable": true, + "x-omitempty": false, + "example": false + }, "movingExpenses": { "description": "All expense documentation receipt records of this PPM shipment.", "type": "array", @@ -16130,6 +16165,13 @@ 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-nullable": true, + "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..336dfc28175 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..08347da5a50 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..6ce040df700 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 81f1c95c22f..5c176f6e924 100644 --- a/pkg/gen/primeapi/embedded_spec.go +++ b/pkg/gen/primeapi/embedded_spec.go @@ -1514,6 +1514,13 @@ 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-nullable": true, + "x-omitempty": false, + "example": false + }, "pickupAddress": { "description": "The address of the origin location where goods are being moved from.", "allOf": [ @@ -3010,6 +3017,13 @@ 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-nullable": true, + "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", @@ -4113,6 +4127,13 @@ 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-nullable": true, + "x-omitempty": false, + "example": false + }, "proGearWeight": { "description": "The estimated weight of the pro-gear being moved belonging to the service member.", "type": "integer", @@ -6236,6 +6257,13 @@ 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-nullable": true, + "x-omitempty": false, + "example": false + }, "pickupAddress": { "description": "The address of the origin location where goods are being moved from.", "allOf": [ @@ -7732,6 +7760,13 @@ 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-nullable": true, + "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", @@ -8840,6 +8875,13 @@ 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-nullable": true, + "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..5d3ce075190 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..60846c17243 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..c0601dd92a1 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 1367c101cdd..ff0c0aed4c4 100644 --- a/pkg/gen/primev2api/embedded_spec.go +++ b/pkg/gen/primev2api/embedded_spec.go @@ -773,6 +773,13 @@ 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-nullable": true, + "x-omitempty": false, + "example": false + }, "pickupAddress": { "description": "The address of the origin location where goods are being moved from.", "allOf": [ @@ -2155,6 +2162,13 @@ 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-nullable": true, + "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", @@ -3219,6 +3233,13 @@ 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-nullable": true, + "x-omitempty": false, + "example": false + }, "proGearWeight": { "description": "The estimated weight of the pro-gear being moved belonging to the service member.", "type": "integer", @@ -4256,6 +4277,13 @@ 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-nullable": true, + "x-omitempty": false, + "example": false + }, "pickupAddress": { "description": "The address of the origin location where goods are being moved from.", "allOf": [ @@ -5638,6 +5666,13 @@ 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-nullable": true, + "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", @@ -6704,6 +6739,13 @@ 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-nullable": true, + "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..5cda5d689dc 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..5363936544f 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..b0310f92f8b 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 29ea00c2913..fb5d0d3c31b 100644 --- a/pkg/gen/primev3api/embedded_spec.go +++ b/pkg/gen/primev3api/embedded_spec.go @@ -909,6 +909,13 @@ 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-nullable": true, + "x-omitempty": false, + "example": false + }, "pickupAddress": { "description": "The address of the origin location where goods are being moved from.", "allOf": [ @@ -2408,6 +2415,13 @@ 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-nullable": true, + "x-omitempty": false, + "example": false + }, "pickupAddress": { "$ref": "#/definitions/Address" }, @@ -3533,6 +3547,13 @@ 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-nullable": true, + "x-omitempty": false, + "example": false + }, "pickupAddress": { "description": "The address of the origin location where goods are being moved from.\n", "allOf": [ @@ -4746,6 +4767,13 @@ 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-nullable": true, + "x-omitempty": false, + "example": false + }, "pickupAddress": { "description": "The address of the origin location where goods are being moved from.", "allOf": [ @@ -6245,6 +6273,13 @@ 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-nullable": true, + "x-omitempty": false, + "example": false + }, "pickupAddress": { "$ref": "#/definitions/Address" }, @@ -7372,6 +7407,13 @@ 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-nullable": true, + "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 1257b32198a..1b64afc5a04 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..188d57ce573 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..739bfb84fdb 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 2212f65cc93..08168486879 100644 --- a/pkg/handlers/ghcapi/internal/payloads/model_to_payload.go +++ b/pkg/handlers/ghcapi/internal/payloads/model_to_payload.go @@ -910,6 +910,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), } @@ -943,6 +944,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/ghcapi/internal/payloads/model_to_payload_test.go b/pkg/handlers/ghcapi/internal/payloads/model_to_payload_test.go index e39e8cb74f3..149f516a1e5 100644 --- a/pkg/handlers/ghcapi/internal/payloads/model_to_payload_test.go +++ b/pkg/handlers/ghcapi/internal/payloads/model_to_payload_test.go @@ -51,10 +51,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() { @@ -79,6 +82,8 @@ func (suite *PayloadsSuite) TestFetchPPMShipment() { suite.Equal(&country.Country, returnedPPMShipment.DestinationAddress.Country) suite.Equal(&county, returnedPPMShipment.DestinationAddress.County) + suite.True(*returnedPPMShipment.IsActualExpenseReimbursement) + }) } diff --git a/pkg/handlers/ghcapi/internal/payloads/payload_to_model.go b/pkg/handlers/ghcapi/internal/payloads/payload_to_model.go index cd838e6a1bc..c2e10bf2216 100644 --- a/pkg/handlers/ghcapi/internal/payloads/payload_to_model.go +++ b/pkg/handlers/ghcapi/internal/payloads/payload_to_model.go @@ -324,6 +324,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) @@ -582,6 +586,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/model_to_payload.go b/pkg/handlers/internalapi/internal/payloads/model_to_payload.go index fd404ebb02f..cb4825449cc 100644 --- a/pkg/handlers/internalapi/internal/payloads/model_to_payload.go +++ b/pkg/handlers/internalapi/internal/payloads/model_to_payload.go @@ -124,10 +124,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/internalapi/internal/payloads/model_to_payload_test.go b/pkg/handlers/internalapi/internal/payloads/model_to_payload_test.go index d7857c2872d..0ac8934be7f 100644 --- a/pkg/handlers/internalapi/internal/payloads/model_to_payload_test.go +++ b/pkg/handlers/internalapi/internal/payloads/model_to_payload_test.go @@ -1,9 +1,71 @@ 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 := models.Country{ + 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.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.Country, returnedPPMShipment.DestinationAddress.Country) + suite.Equal(&county, returnedPPMShipment.DestinationAddress.County) + + suite.True(*returnedPPMShipment.IsActualExpenseReimbursement) + }) +} + func (suite *PayloadsSuite) TestMarketCode() { suite.Run("returns nil when marketCode is nil", func() { var marketCode *models.MarketCode = nil diff --git a/pkg/handlers/internalapi/internal/payloads/payload_to_model.go b/pkg/handlers/internalapi/internal/payloads/payload_to_model.go index 9a656eded1a..2280b441dfc 100644 --- a/pkg/handlers/internalapi/internal/payloads/payload_to_model.go +++ b/pkg/handlers/internalapi/internal/payloads/payload_to_model.go @@ -167,6 +167,10 @@ func PPMShipmentModelFromCreate(ppmShipment *internalmessages.CreatePPMShipment) model.TertiaryDestinationAddress = AddressModel(ppmShipment.TertiaryDestinationAddress) } + if ppmShipment.IsActualExpenseReimbursement != nil { + model.IsActualExpenseReimbursement = ppmShipment.IsActualExpenseReimbursement + } + return model } @@ -182,6 +186,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/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..a10000c9985 --- /dev/null +++ b/pkg/handlers/internalapi/internal/payloads/payload_to_model_test.go @@ -0,0 +1,131 @@ +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", + Country: &models.Country{Country: "US"}, + } + 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.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.Country, + PostalCode: &address.PostalCode, + State: &address.State, + StreetAddress1: &address.StreetAddress1, + StreetAddress2: address.StreetAddress2, + StreetAddress3: address.StreetAddress3, + } + secondaryPickupAddress = internalmessages.Address{ + City: &address2.City, + Country: &address.Country.Country, + PostalCode: &address2.PostalCode, + State: &address2.State, + StreetAddress1: &address2.StreetAddress1, + StreetAddress2: address2.StreetAddress2, + StreetAddress3: address2.StreetAddress3, + } + secondaryDestinationAddress = internalmessages.Address{ + City: &address2.City, + Country: &address.Country.Country, + PostalCode: &address2.PostalCode, + State: &address2.State, + StreetAddress1: &address2.StreetAddress1, + StreetAddress2: address2.StreetAddress2, + StreetAddress3: address2.StreetAddress3, + } + tertiaryPickupAddress = internalmessages.Address{ + City: &address3.City, + Country: &address.Country.Country, + PostalCode: &address3.PostalCode, + State: &address3.State, + StreetAddress1: &address3.StreetAddress1, + StreetAddress2: address3.StreetAddress2, + StreetAddress3: address3.StreetAddress3, + } + tertiaryDestinationAddress = internalmessages.Address{ + City: &address3.City, + Country: &address.Country.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/model_to_payload.go b/pkg/handlers/primeapi/payloads/model_to_payload.go index b22666f7599..89e61853b79 100644 --- a/pkg/handlers/primeapi/payloads/model_to_payload.go +++ b/pkg/handlers/primeapi/payloads/model_to_payload.go @@ -471,33 +471,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 { @@ -505,6 +506,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/primeapi/payloads/model_to_payload_test.go b/pkg/handlers/primeapi/payloads/model_to_payload_test.go index f85c2a0ef31..fade33c2511 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/primeapi/payloads/payload_to_model.go b/pkg/handlers/primeapi/payloads/payload_to_model.go index f5f2ff58516..5f0969df133 100644 --- a/pkg/handlers/primeapi/payloads/payload_to_model.go +++ b/pkg/handlers/primeapi/payloads/payload_to_model.go @@ -265,6 +265,10 @@ func PPMShipmentModelFromCreate(ppmShipment *primemessages.CreatePPMShipment) *m model.SpouseProGearWeight = handlers.PoundPtrFromInt64Ptr(ppmShipment.SpouseProGearWeight) } + if ppmShipment.IsActualExpenseReimbursement != nil { + model.IsActualExpenseReimbursement = ppmShipment.IsActualExpenseReimbursement + } + return model } @@ -388,6 +392,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/primeapi/payloads/payload_to_model_test.go b/pkg/handlers/primeapi/payloads/payload_to_model_test.go index fe4e4b9b649..c7beddad167 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,6 +519,36 @@ 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) } func (suite *PayloadsSuite) TestCountryModel_WithValidCountry() { diff --git a/pkg/handlers/primeapiv2/payloads/model_to_payload.go b/pkg/handlers/primeapiv2/payloads/model_to_payload.go index f23fee1ecec..59d907abe7c 100644 --- a/pkg/handlers/primeapiv2/payloads/model_to_payload.go +++ b/pkg/handlers/primeapiv2/payloads/model_to_payload.go @@ -415,33 +415,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 { @@ -449,6 +450,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/primeapiv2/payloads/model_to_payload_test.go b/pkg/handlers/primeapiv2/payloads/model_to_payload_test.go index 9cc377d77ac..b80a8aecc06 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/primeapiv2/payloads/payload_to_model.go b/pkg/handlers/primeapiv2/payloads/payload_to_model.go index e8a1a0ada25..4c0c9736ec0 100644 --- a/pkg/handlers/primeapiv2/payloads/payload_to_model.go +++ b/pkg/handlers/primeapiv2/payloads/payload_to_model.go @@ -273,6 +273,10 @@ func PPMShipmentModelFromCreate(ppmShipment *primev2messages.CreatePPMShipment) model.SpouseProGearWeight = handlers.PoundPtrFromInt64Ptr(ppmShipment.SpouseProGearWeight) } + if ppmShipment.IsActualExpenseReimbursement != nil { + model.IsActualExpenseReimbursement = ppmShipment.IsActualExpenseReimbursement + } + return model } @@ -398,6 +402,10 @@ func PPMShipmentModelFromUpdate(ppmShipment *primev2messages.UpdatePPMShipment) model.SITEstimatedDepartureDate = sitEstimatedDepartureDate } + if ppmShipment.IsActualExpenseReimbursement != nil { + model.IsActualExpenseReimbursement = ppmShipment.IsActualExpenseReimbursement + } + return model } diff --git a/pkg/handlers/primeapiv2/payloads/payload_to_model_test.go b/pkg/handlers/primeapiv2/payloads/payload_to_model_test.go index f81db6e829e..ca6e42a2cf0 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,6 +481,36 @@ 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) } func (suite *PayloadsSuite) TestCountryModel_WithValidCountry() { diff --git a/pkg/handlers/primeapiv3/payloads/model_to_payload.go b/pkg/handlers/primeapiv3/payloads/model_to_payload.go index aa6001ac9b5..27402b15f03 100644 --- a/pkg/handlers/primeapiv3/payloads/model_to_payload.go +++ b/pkg/handlers/primeapiv3/payloads/model_to_payload.go @@ -442,6 +442,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), } @@ -464,6 +465,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/handlers/primeapiv3/payloads/model_to_payload_test.go b/pkg/handlers/primeapiv3/payloads/model_to_payload_test.go index 78a4148be38..973fa590795 100644 --- a/pkg/handlers/primeapiv3/payloads/model_to_payload_test.go +++ b/pkg/handlers/primeapiv3/payloads/model_to_payload_test.go @@ -516,14 +516,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.go b/pkg/handlers/primeapiv3/payloads/payload_to_model.go index b462d99a9f8..fbac131bdf4 100644 --- a/pkg/handlers/primeapiv3/payloads/payload_to_model.go +++ b/pkg/handlers/primeapiv3/payloads/payload_to_model.go @@ -345,6 +345,10 @@ func PPMShipmentModelFromCreate(ppmShipment *primev3messages.CreatePPMShipment) model.SpouseProGearWeight = handlers.PoundPtrFromInt64Ptr(ppmShipment.SpouseProGearWeight) } + if ppmShipment.IsActualExpenseReimbursement != nil { + model.IsActualExpenseReimbursement = ppmShipment.IsActualExpenseReimbursement + } + return model } @@ -589,6 +593,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 cfe0305d12c..ee00c38275c 100644 --- a/pkg/handlers/primeapiv3/payloads/payload_to_model_test.go +++ b/pkg/handlers/primeapiv3/payloads/payload_to_model_test.go @@ -621,18 +621,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: models.BoolPointer(true), } model := PPMShipmentModelFromCreate(&ppmShipment) @@ -648,6 +649,135 @@ 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) + estimatedWeight := int64(5000) + 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 + 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.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.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.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.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.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.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: 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.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/models/ppm_shipment.go b/pkg/models/ppm_shipment.go index 6c2cc9272d9..9842cf1a07a 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 `json:"is_actual_expense_reimbursement" db:"is_actual_expense_reimbursement"` } // TableName overrides the table name used by Pop. 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/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(); 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/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'); diff --git a/src/pages/Office/CustomerOnboarding/CreateCustomerForm.test.jsx b/src/pages/Office/CustomerOnboarding/CreateCustomerForm.test.jsx index bb9d4715501..0245f4ad114 100644 --- a/src/pages/Office/CustomerOnboarding/CreateCustomerForm.test.jsx +++ b/src/pages/Office/CustomerOnboarding/CreateCustomerForm.test.jsx @@ -522,7 +522,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( , @@ -567,7 +567,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]); diff --git a/swagger-def/definitions/PPMShipment.yaml b/swagger-def/definitions/PPMShipment.yaml index 27d77a1a1b3..cb56b9cc48f 100644 --- a/swagger-def/definitions/PPMShipment.yaml +++ b/swagger-def/definitions/PPMShipment.yaml @@ -228,6 +228,12 @@ 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 + 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 ed5bda88097..1f77972c88e 100644 --- a/swagger-def/definitions/prime/PPMShipment.yaml +++ b/swagger-def/definitions/prime/PPMShipment.yaml @@ -163,6 +163,12 @@ 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 + 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 20d29db9f97..dc562ed9f8d 100644 --- a/swagger-def/definitions/prime/v3/PPMShipment.yaml +++ b/swagger-def/definitions/prime/v3/PPMShipment.yaml @@ -191,6 +191,12 @@ 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 + 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/ghc.yaml b/swagger-def/ghc.yaml index 0e16ad0dbd6..30978cc0306 100644 --- a/swagger-def/ghc.yaml +++ b/swagger-def/ghc.yaml @@ -4109,18 +4109,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 @@ -6128,6 +6128,12 @@ 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 + x-nullable: true UpdateBoatShipment: type: object properties: @@ -6416,7 +6422,7 @@ definitions: ppmShipment: $ref: '#/definitions/CreatePPMShipment' boatShipment: - $ref: "#/definitions/CreateBoatShipment" + $ref: '#/definitions/CreateBoatShipment' required: - moveTaskOrderID - shipmentType @@ -6493,6 +6499,12 @@ 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 + x-nullable: true required: - expectedDepartureDate - pickupAddress @@ -7380,7 +7392,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 63f46f68d6d..c8a9dcd0232 100644 --- a/swagger-def/internal.yaml +++ b/swagger-def/internal.yaml @@ -1970,6 +1970,12 @@ 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 + x-nullable: true required: - expectedDepartureDate - pickupAddress @@ -2085,6 +2091,12 @@ 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 + 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 ce68da1ecc2..2122b1f2cb5 100644 --- a/swagger-def/prime.yaml +++ b/swagger-def/prime.yaml @@ -1380,6 +1380,12 @@ 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 + x-nullable: true required: - expectedDepartureDate - sitExpected @@ -1876,6 +1882,12 @@ 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 + 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 1ed5aabbd73..4c177574219 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', } mobileHome: summary: Mobile Home Shipment @@ -492,6 +493,12 @@ 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 + x-nullable: true required: - expectedDepartureDate - sitExpected @@ -696,6 +703,12 @@ 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 + x-nullable: true UpdateMTOShipment: properties: scheduledPickupDate: diff --git a/swagger-def/prime_v3.yaml b/swagger-def/prime_v3.yaml index dfb3627a14a..ee36dc21ddc 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', } mobileHome: summary: Mobile Home Shipment @@ -519,6 +520,12 @@ 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 + x-nullable: true required: - expectedDepartureDate - pickupAddress @@ -771,6 +778,12 @@ 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 + x-nullable: true UpdateMTOShipment: properties: actualProGearWeight: diff --git a/swagger/ghc.yaml b/swagger/ghc.yaml index 7ec0761cfda..5825aedb6c1 100644 --- a/swagger/ghc.yaml +++ b/swagger/ghc.yaml @@ -6382,6 +6382,14 @@ 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 + x-nullable: true UpdateBoatShipment: type: object properties: @@ -6771,6 +6779,14 @@ 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 + x-nullable: true required: - expectedDepartureDate - pickupAddress @@ -9540,6 +9556,14 @@ 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 + x-nullable: true signedCertification: $ref: '#/definitions/SignedCertification' eTag: diff --git a/swagger/internal.yaml b/swagger/internal.yaml index 0a7a881723a..85046f08f47 100644 --- a/swagger/internal.yaml +++ b/swagger/internal.yaml @@ -2001,6 +2001,14 @@ 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 + x-nullable: true required: - expectedDepartureDate - pickupAddress @@ -2120,6 +2128,14 @@ 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 + x-nullable: true CreateBoatShipment: description: Boat shipment information for the move. properties: @@ -3766,6 +3782,14 @@ 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 + x-nullable: true signedCertification: $ref: '#/definitions/SignedCertification' eTag: diff --git a/swagger/prime.yaml b/swagger/prime.yaml index 236df060e26..b01b69dc659 100644 --- a/swagger/prime.yaml +++ b/swagger/prime.yaml @@ -1725,6 +1725,14 @@ 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 + x-nullable: true required: - expectedDepartureDate - sitExpected @@ -2602,6 +2610,14 @@ 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 + x-nullable: true UpdateMTOShipmentStatus: description: >- Contains the statuses available to the Prime when updating the state of a @@ -3823,6 +3839,14 @@ 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 + 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 8fc2194c8f0..af35d16d50d 100644 --- a/swagger/prime_v2.yaml +++ b/swagger/prime_v2.yaml @@ -790,6 +790,14 @@ 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 + x-nullable: true required: - expectedDepartureDate - sitExpected @@ -1016,6 +1024,14 @@ 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 + x-nullable: true UpdateMTOShipment: properties: scheduledPickupDate: @@ -2512,6 +2528,14 @@ 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 + 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 f4cc2e8b1ab..0564598fd71 100644 --- a/swagger/prime_v3.yaml +++ b/swagger/prime_v3.yaml @@ -811,6 +811,14 @@ 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 + x-nullable: true required: - expectedDepartureDate - pickupAddress @@ -1090,6 +1098,14 @@ 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 + x-nullable: true UpdateMTOShipment: properties: actualProGearWeight: @@ -2628,6 +2644,14 @@ 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 + x-nullable: true eTag: description: >- A hash unique to this shipment that should be used as the "If-Match"