From 8e3a7b7779212e605e9115d52687e83b007cdab1 Mon Sep 17 00:00:00 2001 From: Tae Jung Date: Mon, 6 Jan 2025 17:51:25 +0000 Subject: [PATCH 1/3] gen --- pkg/gen/ghcapi/embedded_spec.go | 404 +++++++++++++++++++++++++++ pkg/gen/internalapi/embedded_spec.go | 398 ++++++++++++++++++++++++++ pkg/gen/primeapi/embedded_spec.go | 140 +++++++++- pkg/gen/primev2api/embedded_spec.go | 20 +- pkg/gen/primev3api/embedded_spec.go | 272 +++++++++++++++++- swagger/ghc.yaml | 173 ++++++++++++ swagger/internal.yaml | 172 ++++++++++++ swagger/prime.yaml | 77 +++++ swagger/prime_v2.yaml | 6 + swagger/prime_v3.yaml | 114 ++++++++ 10 files changed, 1758 insertions(+), 18 deletions(-) diff --git a/pkg/gen/ghcapi/embedded_spec.go b/pkg/gen/ghcapi/embedded_spec.go index 5268aa78f23..922ac889187 100644 --- a/pkg/gen/ghcapi/embedded_spec.go +++ b/pkg/gen/ghcapi/embedded_spec.go @@ -36,6 +36,44 @@ func init() { }, "basePath": "/ghc/v1", "paths": { + "/addresses/zip-city-lookup/{search}": { + "get": { + "description": "Find by API using full/partial postal code or city name that returns an us_post_region_cities json object containing city, state, county and postal code.", + "tags": [ + "addresses" + ], + "summary": "Returns city, state, postal code, and county associated with the specified full/partial postal code or city and state string", + "operationId": "getLocationByZipCityState", + "parameters": [ + { + "type": "string", + "name": "search", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "the requested list of city, state, county, and postal code matches", + "schema": { + "$ref": "#/definitions/VLocations" + } + }, + "400": { + "$ref": "#/responses/InvalidRequest" + }, + "403": { + "$ref": "#/responses/PermissionDenied" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/ServerError" + } + } + } + }, "/application_parameters/{parameterName}": { "get": { "description": "Searches for an application parameter by name, returns nil if not found", @@ -6513,6 +6551,11 @@ func init() { "title": "Address Line 3", "x-nullable": true, "example": "Montmârtre" + }, + "usPostRegionCitiesID": { + "type": "string", + "format": "uuid", + "example": "c56a4180-65aa-42ec-a945-5fd21dec0538" } } }, @@ -11351,6 +11394,11 @@ func init() { "title": "Address Line 3", "x-nullable": true, "example": "Montmârtre" + }, + "usPostRegionCitiesID": { + "type": "string", + "format": "uuid", + "example": "c56a4180-65aa-42ec-a945-5fd21dec0538" } } }, @@ -14677,6 +14725,151 @@ func init() { } } }, + "VLocation": { + "description": "A postal code, city, and state lookup", + "type": "object", + "properties": { + "city": { + "type": "string", + "title": "City", + "example": "Anytown" + }, + "county": { + "type": "string", + "title": "County", + "x-nullable": true, + "example": "LOS ANGELES" + }, + "postalCode": { + "type": "string", + "format": "zip", + "title": "ZIP", + "pattern": "^(\\d{5}?)$", + "example": "90210" + }, + "state": { + "type": "string", + "title": "State", + "enum": [ + "AL", + "AK", + "AR", + "AZ", + "CA", + "CO", + "CT", + "DC", + "DE", + "FL", + "GA", + "HI", + "IA", + "ID", + "IL", + "IN", + "KS", + "KY", + "LA", + "MA", + "MD", + "ME", + "MI", + "MN", + "MO", + "MS", + "MT", + "NC", + "ND", + "NE", + "NH", + "NJ", + "NM", + "NV", + "NY", + "OH", + "OK", + "OR", + "PA", + "RI", + "SC", + "SD", + "TN", + "TX", + "UT", + "VA", + "VT", + "WA", + "WI", + "WV", + "WY" + ], + "x-display-value": { + "AK": "AK", + "AL": "AL", + "AR": "AR", + "AZ": "AZ", + "CA": "CA", + "CO": "CO", + "CT": "CT", + "DC": "DC", + "DE": "DE", + "FL": "FL", + "GA": "GA", + "HI": "HI", + "IA": "IA", + "ID": "ID", + "IL": "IL", + "IN": "IN", + "KS": "KS", + "KY": "KY", + "LA": "LA", + "MA": "MA", + "MD": "MD", + "ME": "ME", + "MI": "MI", + "MN": "MN", + "MO": "MO", + "MS": "MS", + "MT": "MT", + "NC": "NC", + "ND": "ND", + "NE": "NE", + "NH": "NH", + "NJ": "NJ", + "NM": "NM", + "NV": "NV", + "NY": "NY", + "OH": "OH", + "OK": "OK", + "OR": "OR", + "PA": "PA", + "RI": "RI", + "SC": "SC", + "SD": "SD", + "TN": "TN", + "TX": "TX", + "UT": "UT", + "VA": "VA", + "VT": "VT", + "WA": "WA", + "WI": "WI", + "WV": "WV", + "WY": "WY" + } + }, + "usPostRegionCitiesID": { + "type": "string", + "format": "uuid", + "example": "c56a4180-65aa-42ec-a945-5fd21dec0538" + } + } + }, + "VLocations": { + "type": "array", + "items": { + "$ref": "#/definitions/VLocation" + } + }, "ValidationError": { "required": [ "invalid_fields" @@ -15013,6 +15206,9 @@ func init() { { "name": "transportationOffice" }, + { + "name": "addresses" + }, { "name": "uploads" }, @@ -15043,6 +15239,56 @@ func init() { }, "basePath": "/ghc/v1", "paths": { + "/addresses/zip-city-lookup/{search}": { + "get": { + "description": "Find by API using full/partial postal code or city name that returns an us_post_region_cities json object containing city, state, county and postal code.", + "tags": [ + "addresses" + ], + "summary": "Returns city, state, postal code, and county associated with the specified full/partial postal code or city and state string", + "operationId": "getLocationByZipCityState", + "parameters": [ + { + "type": "string", + "name": "search", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "the requested list of city, state, county, and postal code matches", + "schema": { + "$ref": "#/definitions/VLocations" + } + }, + "400": { + "description": "The request payload is invalid", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "403": { + "description": "The request was denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "The requested resource wasn't found", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "500": { + "description": "A server error occurred", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + } + }, "/application_parameters/{parameterName}": { "get": { "description": "Searches for an application parameter by name, returns nil if not found", @@ -23045,6 +23291,11 @@ func init() { "title": "Address Line 3", "x-nullable": true, "example": "Montmârtre" + }, + "usPostRegionCitiesID": { + "type": "string", + "format": "uuid", + "example": "c56a4180-65aa-42ec-a945-5fd21dec0538" } } }, @@ -27888,6 +28139,11 @@ func init() { "title": "Address Line 3", "x-nullable": true, "example": "Montmârtre" + }, + "usPostRegionCitiesID": { + "type": "string", + "format": "uuid", + "example": "c56a4180-65aa-42ec-a945-5fd21dec0538" } } }, @@ -31350,6 +31606,151 @@ func init() { } } }, + "VLocation": { + "description": "A postal code, city, and state lookup", + "type": "object", + "properties": { + "city": { + "type": "string", + "title": "City", + "example": "Anytown" + }, + "county": { + "type": "string", + "title": "County", + "x-nullable": true, + "example": "LOS ANGELES" + }, + "postalCode": { + "type": "string", + "format": "zip", + "title": "ZIP", + "pattern": "^(\\d{5}?)$", + "example": "90210" + }, + "state": { + "type": "string", + "title": "State", + "enum": [ + "AL", + "AK", + "AR", + "AZ", + "CA", + "CO", + "CT", + "DC", + "DE", + "FL", + "GA", + "HI", + "IA", + "ID", + "IL", + "IN", + "KS", + "KY", + "LA", + "MA", + "MD", + "ME", + "MI", + "MN", + "MO", + "MS", + "MT", + "NC", + "ND", + "NE", + "NH", + "NJ", + "NM", + "NV", + "NY", + "OH", + "OK", + "OR", + "PA", + "RI", + "SC", + "SD", + "TN", + "TX", + "UT", + "VA", + "VT", + "WA", + "WI", + "WV", + "WY" + ], + "x-display-value": { + "AK": "AK", + "AL": "AL", + "AR": "AR", + "AZ": "AZ", + "CA": "CA", + "CO": "CO", + "CT": "CT", + "DC": "DC", + "DE": "DE", + "FL": "FL", + "GA": "GA", + "HI": "HI", + "IA": "IA", + "ID": "ID", + "IL": "IL", + "IN": "IN", + "KS": "KS", + "KY": "KY", + "LA": "LA", + "MA": "MA", + "MD": "MD", + "ME": "ME", + "MI": "MI", + "MN": "MN", + "MO": "MO", + "MS": "MS", + "MT": "MT", + "NC": "NC", + "ND": "ND", + "NE": "NE", + "NH": "NH", + "NJ": "NJ", + "NM": "NM", + "NV": "NV", + "NY": "NY", + "OH": "OH", + "OK": "OK", + "OR": "OR", + "PA": "PA", + "RI": "RI", + "SC": "SC", + "SD": "SD", + "TN": "TN", + "TX": "TX", + "UT": "UT", + "VA": "VA", + "VT": "VT", + "WA": "WA", + "WI": "WI", + "WV": "WV", + "WY": "WY" + } + }, + "usPostRegionCitiesID": { + "type": "string", + "format": "uuid", + "example": "c56a4180-65aa-42ec-a945-5fd21dec0538" + } + } + }, + "VLocations": { + "type": "array", + "items": { + "$ref": "#/definitions/VLocation" + } + }, "ValidationError": { "required": [ "invalid_fields" @@ -31694,6 +32095,9 @@ func init() { { "name": "transportationOffice" }, + { + "name": "addresses" + }, { "name": "uploads" }, diff --git a/pkg/gen/internalapi/embedded_spec.go b/pkg/gen/internalapi/embedded_spec.go index bc3422344ae..9706d6c936b 100644 --- a/pkg/gen/internalapi/embedded_spec.go +++ b/pkg/gen/internalapi/embedded_spec.go @@ -39,6 +39,44 @@ func init() { }, "basePath": "/internal", "paths": { + "/addresses/zip-city-lookup/{search}": { + "get": { + "description": "Find by API using full/partial postal code or city name that returns an us_post_region_cities json object containing city, state, county and postal code.", + "tags": [ + "addresses" + ], + "summary": "Returns city, state, postal code, and county associated with the specified full/partial postal code or city state string", + "operationId": "getLocationByZipCityState", + "parameters": [ + { + "type": "string", + "name": "search", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "the requested list of city, state, county, and postal code matches", + "schema": { + "$ref": "#/definitions/VLocations" + } + }, + "400": { + "$ref": "#/responses/InvalidRequest" + }, + "403": { + "$ref": "#/responses/PermissionDenied" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "500": { + "$ref": "#/responses/ServerError" + } + } + } + }, "/addresses/{addressId}": { "get": { "description": "Find by API using address ID that returns an address json object containing address 1, address 2, address 3, city and postal code.", @@ -3473,6 +3511,11 @@ func init() { "title": "Address Line 3", "x-nullable": true, "example": "Montmârtre" + }, + "usPostRegionCitiesID": { + "type": "string", + "format": "uuid", + "example": "c56a4180-65aa-42ec-a945-5fd21dec0538" } } }, @@ -6239,6 +6282,11 @@ func init() { "title": "Address Line 3", "x-nullable": true, "example": "Montmârtre" + }, + "usPostRegionCitiesID": { + "type": "string", + "format": "uuid", + "example": "c56a4180-65aa-42ec-a945-5fd21dec0538" } } }, @@ -8066,6 +8114,151 @@ func init() { } } }, + "VLocation": { + "description": "A postal code, city, and state lookup", + "type": "object", + "properties": { + "city": { + "type": "string", + "title": "City", + "example": "Anytown" + }, + "county": { + "type": "string", + "title": "County", + "x-nullable": true, + "example": "LOS ANGELES" + }, + "postalCode": { + "type": "string", + "format": "zip", + "title": "ZIP", + "pattern": "^(\\d{5}?)$", + "example": "90210" + }, + "state": { + "type": "string", + "title": "State", + "enum": [ + "AL", + "AK", + "AR", + "AZ", + "CA", + "CO", + "CT", + "DC", + "DE", + "FL", + "GA", + "HI", + "IA", + "ID", + "IL", + "IN", + "KS", + "KY", + "LA", + "MA", + "MD", + "ME", + "MI", + "MN", + "MO", + "MS", + "MT", + "NC", + "ND", + "NE", + "NH", + "NJ", + "NM", + "NV", + "NY", + "OH", + "OK", + "OR", + "PA", + "RI", + "SC", + "SD", + "TN", + "TX", + "UT", + "VA", + "VT", + "WA", + "WI", + "WV", + "WY" + ], + "x-display-value": { + "AK": "AK", + "AL": "AL", + "AR": "AR", + "AZ": "AZ", + "CA": "CA", + "CO": "CO", + "CT": "CT", + "DC": "DC", + "DE": "DE", + "FL": "FL", + "GA": "GA", + "HI": "HI", + "IA": "IA", + "ID": "ID", + "IL": "IL", + "IN": "IN", + "KS": "KS", + "KY": "KY", + "LA": "LA", + "MA": "MA", + "MD": "MD", + "ME": "ME", + "MI": "MI", + "MN": "MN", + "MO": "MO", + "MS": "MS", + "MT": "MT", + "NC": "NC", + "ND": "ND", + "NE": "NE", + "NH": "NH", + "NJ": "NJ", + "NM": "NM", + "NV": "NV", + "NY": "NY", + "OH": "OH", + "OK": "OK", + "OR": "OR", + "PA": "PA", + "RI": "RI", + "SC": "SC", + "SD": "SD", + "TN": "TN", + "TX": "TX", + "UT": "UT", + "VA": "VA", + "VT": "VT", + "WA": "WA", + "WI": "WI", + "WV": "WV", + "WY": "WY" + } + }, + "usPostRegionCitiesID": { + "type": "string", + "format": "uuid", + "example": "c56a4180-65aa-42ec-a945-5fd21dec0538" + } + } + }, + "VLocations": { + "type": "array", + "items": { + "$ref": "#/definitions/VLocation" + } + }, "ValidationError": { "required": [ "invalidFields" @@ -8500,6 +8693,56 @@ func init() { }, "basePath": "/internal", "paths": { + "/addresses/zip-city-lookup/{search}": { + "get": { + "description": "Find by API using full/partial postal code or city name that returns an us_post_region_cities json object containing city, state, county and postal code.", + "tags": [ + "addresses" + ], + "summary": "Returns city, state, postal code, and county associated with the specified full/partial postal code or city state string", + "operationId": "getLocationByZipCityState", + "parameters": [ + { + "type": "string", + "name": "search", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "the requested list of city, state, county, and postal code matches", + "schema": { + "$ref": "#/definitions/VLocations" + } + }, + "400": { + "description": "The request payload is invalid.", + "schema": { + "$ref": "#/definitions/ClientError" + } + }, + "403": { + "description": "The request was denied.", + "schema": { + "$ref": "#/definitions/ClientError" + } + }, + "404": { + "description": "The requested resource wasn't found.", + "schema": { + "$ref": "#/definitions/ClientError" + } + }, + "500": { + "description": "A server error occurred.", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + } + }, "/addresses/{addressId}": { "get": { "description": "Find by API using address ID that returns an address json object containing address 1, address 2, address 3, city and postal code.", @@ -12387,6 +12630,11 @@ func init() { "title": "Address Line 3", "x-nullable": true, "example": "Montmârtre" + }, + "usPostRegionCitiesID": { + "type": "string", + "format": "uuid", + "example": "c56a4180-65aa-42ec-a945-5fd21dec0538" } } }, @@ -15157,6 +15405,11 @@ func init() { "title": "Address Line 3", "x-nullable": true, "example": "Montmârtre" + }, + "usPostRegionCitiesID": { + "type": "string", + "format": "uuid", + "example": "c56a4180-65aa-42ec-a945-5fd21dec0538" } } }, @@ -16991,6 +17244,151 @@ func init() { } } }, + "VLocation": { + "description": "A postal code, city, and state lookup", + "type": "object", + "properties": { + "city": { + "type": "string", + "title": "City", + "example": "Anytown" + }, + "county": { + "type": "string", + "title": "County", + "x-nullable": true, + "example": "LOS ANGELES" + }, + "postalCode": { + "type": "string", + "format": "zip", + "title": "ZIP", + "pattern": "^(\\d{5}?)$", + "example": "90210" + }, + "state": { + "type": "string", + "title": "State", + "enum": [ + "AL", + "AK", + "AR", + "AZ", + "CA", + "CO", + "CT", + "DC", + "DE", + "FL", + "GA", + "HI", + "IA", + "ID", + "IL", + "IN", + "KS", + "KY", + "LA", + "MA", + "MD", + "ME", + "MI", + "MN", + "MO", + "MS", + "MT", + "NC", + "ND", + "NE", + "NH", + "NJ", + "NM", + "NV", + "NY", + "OH", + "OK", + "OR", + "PA", + "RI", + "SC", + "SD", + "TN", + "TX", + "UT", + "VA", + "VT", + "WA", + "WI", + "WV", + "WY" + ], + "x-display-value": { + "AK": "AK", + "AL": "AL", + "AR": "AR", + "AZ": "AZ", + "CA": "CA", + "CO": "CO", + "CT": "CT", + "DC": "DC", + "DE": "DE", + "FL": "FL", + "GA": "GA", + "HI": "HI", + "IA": "IA", + "ID": "ID", + "IL": "IL", + "IN": "IN", + "KS": "KS", + "KY": "KY", + "LA": "LA", + "MA": "MA", + "MD": "MD", + "ME": "ME", + "MI": "MI", + "MN": "MN", + "MO": "MO", + "MS": "MS", + "MT": "MT", + "NC": "NC", + "ND": "ND", + "NE": "NE", + "NH": "NH", + "NJ": "NJ", + "NM": "NM", + "NV": "NV", + "NY": "NY", + "OH": "OH", + "OK": "OK", + "OR": "OR", + "PA": "PA", + "RI": "RI", + "SC": "SC", + "SD": "SD", + "TN": "TN", + "TX": "TX", + "UT": "UT", + "VA": "VA", + "VT": "VT", + "WA": "WA", + "WI": "WI", + "WV": "WV", + "WY": "WY" + } + }, + "usPostRegionCitiesID": { + "type": "string", + "format": "uuid", + "example": "c56a4180-65aa-42ec-a945-5fd21dec0538" + } + } + }, + "VLocations": { + "type": "array", + "items": { + "$ref": "#/definitions/VLocation" + } + }, "ValidationError": { "required": [ "invalidFields" diff --git a/pkg/gen/primeapi/embedded_spec.go b/pkg/gen/primeapi/embedded_spec.go index bba1b1d628e..88ddc2b1085 100644 --- a/pkg/gen/primeapi/embedded_spec.go +++ b/pkg/gen/primeapi/embedded_spec.go @@ -355,7 +355,7 @@ func init() { }, "/mto-service-items/{mtoServiceItemID}": { "patch": { - "description": "Updates MTOServiceItems after creation. Not all service items or fields may be updated, please see details below.\n\nThis endpoint supports different body definitions. In the modelType field below, select the modelType corresponding\n to the service item you wish to update and the documentation will update with the new definition.\n\n* Addresses: To update a destination service item's SIT destination final address, update the shipment delivery address.\nFor approved shipments, please use [updateShipmentDestinationAddress](#mtoShipment/updateShipmentDestinationAddress).\nFor shipments not yet approved, please use [updateMTOShipmentAddress](#mtoShipment/updateMTOShipmentAddress).\n\n* SIT Service Items: Take note that when updating ` + "`" + `sitCustomerContacted` + "`" + `, ` + "`" + `sitDepartureDate` + "`" + `, or ` + "`" + `sitRequestedDelivery` + "`" + `, we want\nthose to be updated on ` + "`" + `DOASIT` + "`" + ` (for origin SIT) and ` + "`" + `DDASIT` + "`" + ` (for destination SIT). If updating those values in other service\nitems, the office users will not have as much attention to those values.\n\nTo create a service item, please use [createMTOServiceItem](#mtoServiceItem/createMTOServiceItem)) endpoint.\n\n* Resubmitting rejected SIT service items: This endpoint will handle the logic of changing the status of rejected SIT service items from\nREJECTED to SUBMITTED. Please provide the ` + "`" + `requestedApprovalsRequestedStatus: true` + "`" + ` when resubmitting as this will give attention to the TOO to\nreview the resubmitted SIT service item. Another note, ` + "`" + `updateReason` + "`" + ` must have a different value than the current ` + "`" + `reason` + "`" + ` value on the service item.\nIf this value is not updated, then an error will be sent back.\n\nThe following SIT service items can be resubmitted following a rejection:\n- DDASIT\n- DDDSIT\n- DDFSIT\n- DOASIT\n- DOPSIT\n- DOFSIT\n- DDSFSC\n- DOSFSC\n\nAt a MINIMUM, the payload for resubmitting a rejected SIT service item must look like this:\n` + "`" + `` + "`" + `` + "`" + `json\n{\n \"reServiceCode\": \"DDFSIT\",\n \"updateReason\": \"A reason that differs from the previous reason\",\n \"modelType\": \"UpdateMTOServiceItemSIT\",\n \"requestApprovalsRequestedStatus\": true\n}\n` + "`" + `` + "`" + `` + "`" + `\n", + "description": "Updates MTOServiceItems after creation. Not all service items or fields may be updated, please see details below.\n\nThis endpoint supports different body definitions. In the modelType field below, select the modelType corresponding\n to the service item you wish to update and the documentation will update with the new definition.\n\n* Addresses: To update a destination service item's SIT destination final address, update the shipment delivery address.\nFor approved shipments, please use [updateShipmentDestinationAddress](#mtoShipment/updateShipmentDestinationAddress).\nFor shipments not yet approved, please use [updateMTOShipmentAddress](#mtoShipment/updateMTOShipmentAddress).\n\n* SIT Service Items: Take note that when updating ` + "`" + `sitCustomerContacted` + "`" + `, ` + "`" + `sitDepartureDate` + "`" + `, or ` + "`" + `sitRequestedDelivery` + "`" + `, we want\nthose to be updated on ` + "`" + `DOASIT` + "`" + ` (for origin SIT) and ` + "`" + `DDASIT` + "`" + ` (for destination SIT). If updating those values in other service\nitems, the office users will not have as much attention to those values.\n\nTo create a service item, please use [createMTOServiceItem](#mtoServiceItem/createMTOServiceItem)) endpoint.\n\n* Resubmitting rejected SIT service items: This endpoint will handle the logic of changing the status of rejected SIT service items from\nREJECTED to SUBMITTED. Please provide the ` + "`" + `requestedApprovalsRequestedStatus: true` + "`" + ` when resubmitting as this will give attention to the TOO to\nreview the resubmitted SIT service item. Another note, ` + "`" + `updateReason` + "`" + ` must have a different value than the current ` + "`" + `reason` + "`" + ` value on the service item.\nIf this value is not updated, then an error will be sent back.\n\nThe following SIT service items can be resubmitted following a rejection:\n- DDASIT\n- DDDSIT\n- DDFSIT\n- DOASIT\n- DOPSIT\n- DOFSIT\n- DDSFSC\n- DOSFSC\n\nAt a MINIMUM, the payload for resubmitting a rejected SIT service item must look like this:\n` + "`" + `` + "`" + `` + "`" + `json\n{\n \"reServiceCode\": \"DDFSIT\",\n \"updateReason\": \"A reason that differs from the previous reason\",\n \"modelType\": \"UpdateMTOServiceItemSIT\",\n \"requestApprovalsRequestedStatus\": true\n}\n` + "`" + `` + "`" + `` + "`" + `\n\nThe following service items allow you to update the Port that the shipment will use:\n- PODFSC (Port of Debarkation can be updated)\n- POEFSC (Port of Embarkation can be updated)\n\nAt a MINIMUM, the payload for updating the port should contain the reServiceCode (PODFSC or POEFSC), modelType (UpdateMTOServiceItemInternationalPortFSC), portCode, and id for the service item.\nPlease see the example payload below:\n` + "`" + `` + "`" + `` + "`" + `json\n{\n \"id\": \"1ed224b6-c65e-4616-b88e-8304d26c9562\",\n \"modelType\": \"UpdateMTOServiceItemInternationalPortFSC\",\n \"portCode\": \"SEA\",\n \"reServiceCode\": \"POEFSC\"\n}\n` + "`" + `` + "`" + `` + "`" + `\n", "consumes": [ "application/json" ], @@ -1362,6 +1362,11 @@ func init() { "title": "Address Line 3", "x-nullable": true, "example": "Montmârtre" + }, + "usPostRegionCitiesID": { + "type": "string", + "format": "uuid", + "example": "c56a4180-65aa-42ec-a945-5fd21dec0538" } } }, @@ -2338,8 +2343,33 @@ func init() { } ] }, + "MTOServiceItemInternationalFuelSurcharge": { + "description": "Describes a international Port of Embarkation/Debarkation fuel surcharge service item subtype of a MTOServiceItem.", + "allOf": [ + { + "$ref": "#/definitions/MTOServiceItem" + }, + { + "type": "object", + "properties": { + "portCode": { + "description": "A unique code for a Port", + "type": "string" + }, + "reServiceCode": { + "description": "A unique code for the service item. Indicates if the service is for Port of Embarkation (POEFSC) or Port of Debarkation (PODFSC).", + "type": "string", + "enum": [ + "PODFSC", + "POEFSC" + ] + } + } + } + ] + }, "MTOServiceItemModelType": { - "description": "Describes all model sub-types for a MTOServiceItem model.\n\nUsing this list, choose the correct modelType in the dropdown, corresponding to the service item type.\n * DOFSIT, DOASIT - MTOServiceItemOriginSIT\n * DDFSIT, DDASIT - MTOServiceItemDestSIT\n * DOSHUT, DDSHUT - MTOServiceItemShuttle\n * DCRT, DUCRT - MTOServiceItemDomesticCrating\n * ICRT, IUCRT - MTOServiceItemInternationalCrating\n\nThe documentation will then update with the supported fields.\n", + "description": "Describes all model sub-types for a MTOServiceItem model.\n\nUsing this list, choose the correct modelType in the dropdown, corresponding to the service item type.\n * DOFSIT, DOASIT - MTOServiceItemOriginSIT\n * DDFSIT, DDASIT - MTOServiceItemDestSIT\n * DOSHUT, DDSHUT - MTOServiceItemShuttle\n * DCRT, DUCRT - MTOServiceItemDomesticCrating\n * ICRT, IUCRT - MTOServiceItemInternationalCrating\n * PODFSC, POEFSC - MTOSerivceItemInternationalFuelSurcharge\n\nThe documentation will then update with the supported fields.\n", "type": "string", "enum": [ "MTOServiceItemBasic", @@ -2347,7 +2377,8 @@ func init() { "MTOServiceItemDestSIT", "MTOServiceItemShuttle", "MTOServiceItemDomesticCrating", - "MTOServiceItemInternationalCrating" + "MTOServiceItemInternationalCrating", + "MTOSerivceItemInternationalFuelSurcharge" ] }, "MTOServiceItemOriginSIT": { @@ -3896,12 +3927,41 @@ func init() { }, "discriminator": "modelType" }, + "UpdateMTOServiceItemInternationalPortFSC": { + "description": "Subtype used to provide the port for fuel surcharge. This is not creating a new service item but rather updating an existing service item.\n", + "allOf": [ + { + "$ref": "#/definitions/UpdateMTOServiceItem" + }, + { + "type": "object", + "properties": { + "portCode": { + "description": "Port used for the shipment. Relevant for moving (PODFSC \u0026 POEFSC) service items.", + "type": "string", + "x-nullable": true, + "x-omitempty": false, + "example": "PDX" + }, + "reServiceCode": { + "description": "Service code allowed for this model type.", + "type": "string", + "enum": [ + "PODFSC", + "POEFSC" + ] + } + } + } + ] + }, "UpdateMTOServiceItemModelType": { - "description": "Using this list, choose the correct modelType in the dropdown, corresponding to the service item type.\n * DDDSIT - UpdateMTOServiceItemSIT\n * DDFSIT - UpdateMTOServiceItemSIT\n * DDASIT - UpdateMTOServiceItemSIT\n * DOPSIT - UpdateMTOServiceItemSIT\n * DOASIT - UpdateMTOServiceItemSIT\n * DOFSIT - UpdateMTOServiceItemSIT\n * DOSFSC - UpdateMTOServiceItemSIT\n * DDSFSC - UpdateMTOServiceItemSIT\n * DDSHUT - UpdateMTOServiceItemShuttle\n * DOSHUT - UpdateMTOServiceItemShuttle\n\nThe documentation will then update with the supported fields.\n", + "description": "Using this list, choose the correct modelType in the dropdown, corresponding to the service item type.\n * DDDSIT - UpdateMTOServiceItemSIT\n * DDFSIT - UpdateMTOServiceItemSIT\n * DDASIT - UpdateMTOServiceItemSIT\n * DOPSIT - UpdateMTOServiceItemSIT\n * DOASIT - UpdateMTOServiceItemSIT\n * DOFSIT - UpdateMTOServiceItemSIT\n * DOSFSC - UpdateMTOServiceItemSIT\n * DDSFSC - UpdateMTOServiceItemSIT\n * DDSHUT - UpdateMTOServiceItemShuttle\n * DOSHUT - UpdateMTOServiceItemShuttle\n * PODFSC - UpdateMTOServiceItemInternationalPortFSC\n * POEFSC - UpdateMTOServiceItemInternationalPortFSC\n\nThe documentation will then update with the supported fields.\n", "type": "string", "enum": [ "UpdateMTOServiceItemSIT", - "UpdateMTOServiceItemShuttle" + "UpdateMTOServiceItemShuttle", + "UpdateMTOServiceItemInternationalPortFSC" ] }, "UpdateMTOServiceItemSIT": { @@ -4914,7 +4974,7 @@ func init() { }, "/mto-service-items/{mtoServiceItemID}": { "patch": { - "description": "Updates MTOServiceItems after creation. Not all service items or fields may be updated, please see details below.\n\nThis endpoint supports different body definitions. In the modelType field below, select the modelType corresponding\n to the service item you wish to update and the documentation will update with the new definition.\n\n* Addresses: To update a destination service item's SIT destination final address, update the shipment delivery address.\nFor approved shipments, please use [updateShipmentDestinationAddress](#mtoShipment/updateShipmentDestinationAddress).\nFor shipments not yet approved, please use [updateMTOShipmentAddress](#mtoShipment/updateMTOShipmentAddress).\n\n* SIT Service Items: Take note that when updating ` + "`" + `sitCustomerContacted` + "`" + `, ` + "`" + `sitDepartureDate` + "`" + `, or ` + "`" + `sitRequestedDelivery` + "`" + `, we want\nthose to be updated on ` + "`" + `DOASIT` + "`" + ` (for origin SIT) and ` + "`" + `DDASIT` + "`" + ` (for destination SIT). If updating those values in other service\nitems, the office users will not have as much attention to those values.\n\nTo create a service item, please use [createMTOServiceItem](#mtoServiceItem/createMTOServiceItem)) endpoint.\n\n* Resubmitting rejected SIT service items: This endpoint will handle the logic of changing the status of rejected SIT service items from\nREJECTED to SUBMITTED. Please provide the ` + "`" + `requestedApprovalsRequestedStatus: true` + "`" + ` when resubmitting as this will give attention to the TOO to\nreview the resubmitted SIT service item. Another note, ` + "`" + `updateReason` + "`" + ` must have a different value than the current ` + "`" + `reason` + "`" + ` value on the service item.\nIf this value is not updated, then an error will be sent back.\n\nThe following SIT service items can be resubmitted following a rejection:\n- DDASIT\n- DDDSIT\n- DDFSIT\n- DOASIT\n- DOPSIT\n- DOFSIT\n- DDSFSC\n- DOSFSC\n\nAt a MINIMUM, the payload for resubmitting a rejected SIT service item must look like this:\n` + "`" + `` + "`" + `` + "`" + `json\n{\n \"reServiceCode\": \"DDFSIT\",\n \"updateReason\": \"A reason that differs from the previous reason\",\n \"modelType\": \"UpdateMTOServiceItemSIT\",\n \"requestApprovalsRequestedStatus\": true\n}\n` + "`" + `` + "`" + `` + "`" + `\n", + "description": "Updates MTOServiceItems after creation. Not all service items or fields may be updated, please see details below.\n\nThis endpoint supports different body definitions. In the modelType field below, select the modelType corresponding\n to the service item you wish to update and the documentation will update with the new definition.\n\n* Addresses: To update a destination service item's SIT destination final address, update the shipment delivery address.\nFor approved shipments, please use [updateShipmentDestinationAddress](#mtoShipment/updateShipmentDestinationAddress).\nFor shipments not yet approved, please use [updateMTOShipmentAddress](#mtoShipment/updateMTOShipmentAddress).\n\n* SIT Service Items: Take note that when updating ` + "`" + `sitCustomerContacted` + "`" + `, ` + "`" + `sitDepartureDate` + "`" + `, or ` + "`" + `sitRequestedDelivery` + "`" + `, we want\nthose to be updated on ` + "`" + `DOASIT` + "`" + ` (for origin SIT) and ` + "`" + `DDASIT` + "`" + ` (for destination SIT). If updating those values in other service\nitems, the office users will not have as much attention to those values.\n\nTo create a service item, please use [createMTOServiceItem](#mtoServiceItem/createMTOServiceItem)) endpoint.\n\n* Resubmitting rejected SIT service items: This endpoint will handle the logic of changing the status of rejected SIT service items from\nREJECTED to SUBMITTED. Please provide the ` + "`" + `requestedApprovalsRequestedStatus: true` + "`" + ` when resubmitting as this will give attention to the TOO to\nreview the resubmitted SIT service item. Another note, ` + "`" + `updateReason` + "`" + ` must have a different value than the current ` + "`" + `reason` + "`" + ` value on the service item.\nIf this value is not updated, then an error will be sent back.\n\nThe following SIT service items can be resubmitted following a rejection:\n- DDASIT\n- DDDSIT\n- DDFSIT\n- DOASIT\n- DOPSIT\n- DOFSIT\n- DDSFSC\n- DOSFSC\n\nAt a MINIMUM, the payload for resubmitting a rejected SIT service item must look like this:\n` + "`" + `` + "`" + `` + "`" + `json\n{\n \"reServiceCode\": \"DDFSIT\",\n \"updateReason\": \"A reason that differs from the previous reason\",\n \"modelType\": \"UpdateMTOServiceItemSIT\",\n \"requestApprovalsRequestedStatus\": true\n}\n` + "`" + `` + "`" + `` + "`" + `\n\nThe following service items allow you to update the Port that the shipment will use:\n- PODFSC (Port of Debarkation can be updated)\n- POEFSC (Port of Embarkation can be updated)\n\nAt a MINIMUM, the payload for updating the port should contain the reServiceCode (PODFSC or POEFSC), modelType (UpdateMTOServiceItemInternationalPortFSC), portCode, and id for the service item.\nPlease see the example payload below:\n` + "`" + `` + "`" + `` + "`" + `json\n{\n \"id\": \"1ed224b6-c65e-4616-b88e-8304d26c9562\",\n \"modelType\": \"UpdateMTOServiceItemInternationalPortFSC\",\n \"portCode\": \"SEA\",\n \"reServiceCode\": \"POEFSC\"\n}\n` + "`" + `` + "`" + `` + "`" + `\n", "consumes": [ "application/json" ], @@ -6196,6 +6256,11 @@ func init() { "title": "Address Line 3", "x-nullable": true, "example": "Montmârtre" + }, + "usPostRegionCitiesID": { + "type": "string", + "format": "uuid", + "example": "c56a4180-65aa-42ec-a945-5fd21dec0538" } } }, @@ -7172,8 +7237,33 @@ func init() { } ] }, + "MTOServiceItemInternationalFuelSurcharge": { + "description": "Describes a international Port of Embarkation/Debarkation fuel surcharge service item subtype of a MTOServiceItem.", + "allOf": [ + { + "$ref": "#/definitions/MTOServiceItem" + }, + { + "type": "object", + "properties": { + "portCode": { + "description": "A unique code for a Port", + "type": "string" + }, + "reServiceCode": { + "description": "A unique code for the service item. Indicates if the service is for Port of Embarkation (POEFSC) or Port of Debarkation (PODFSC).", + "type": "string", + "enum": [ + "PODFSC", + "POEFSC" + ] + } + } + } + ] + }, "MTOServiceItemModelType": { - "description": "Describes all model sub-types for a MTOServiceItem model.\n\nUsing this list, choose the correct modelType in the dropdown, corresponding to the service item type.\n * DOFSIT, DOASIT - MTOServiceItemOriginSIT\n * DDFSIT, DDASIT - MTOServiceItemDestSIT\n * DOSHUT, DDSHUT - MTOServiceItemShuttle\n * DCRT, DUCRT - MTOServiceItemDomesticCrating\n * ICRT, IUCRT - MTOServiceItemInternationalCrating\n\nThe documentation will then update with the supported fields.\n", + "description": "Describes all model sub-types for a MTOServiceItem model.\n\nUsing this list, choose the correct modelType in the dropdown, corresponding to the service item type.\n * DOFSIT, DOASIT - MTOServiceItemOriginSIT\n * DDFSIT, DDASIT - MTOServiceItemDestSIT\n * DOSHUT, DDSHUT - MTOServiceItemShuttle\n * DCRT, DUCRT - MTOServiceItemDomesticCrating\n * ICRT, IUCRT - MTOServiceItemInternationalCrating\n * PODFSC, POEFSC - MTOSerivceItemInternationalFuelSurcharge\n\nThe documentation will then update with the supported fields.\n", "type": "string", "enum": [ "MTOServiceItemBasic", @@ -7181,7 +7271,8 @@ func init() { "MTOServiceItemDestSIT", "MTOServiceItemShuttle", "MTOServiceItemDomesticCrating", - "MTOServiceItemInternationalCrating" + "MTOServiceItemInternationalCrating", + "MTOSerivceItemInternationalFuelSurcharge" ] }, "MTOServiceItemOriginSIT": { @@ -8735,12 +8826,41 @@ func init() { }, "discriminator": "modelType" }, + "UpdateMTOServiceItemInternationalPortFSC": { + "description": "Subtype used to provide the port for fuel surcharge. This is not creating a new service item but rather updating an existing service item.\n", + "allOf": [ + { + "$ref": "#/definitions/UpdateMTOServiceItem" + }, + { + "type": "object", + "properties": { + "portCode": { + "description": "Port used for the shipment. Relevant for moving (PODFSC \u0026 POEFSC) service items.", + "type": "string", + "x-nullable": true, + "x-omitempty": false, + "example": "PDX" + }, + "reServiceCode": { + "description": "Service code allowed for this model type.", + "type": "string", + "enum": [ + "PODFSC", + "POEFSC" + ] + } + } + } + ] + }, "UpdateMTOServiceItemModelType": { - "description": "Using this list, choose the correct modelType in the dropdown, corresponding to the service item type.\n * DDDSIT - UpdateMTOServiceItemSIT\n * DDFSIT - UpdateMTOServiceItemSIT\n * DDASIT - UpdateMTOServiceItemSIT\n * DOPSIT - UpdateMTOServiceItemSIT\n * DOASIT - UpdateMTOServiceItemSIT\n * DOFSIT - UpdateMTOServiceItemSIT\n * DOSFSC - UpdateMTOServiceItemSIT\n * DDSFSC - UpdateMTOServiceItemSIT\n * DDSHUT - UpdateMTOServiceItemShuttle\n * DOSHUT - UpdateMTOServiceItemShuttle\n\nThe documentation will then update with the supported fields.\n", + "description": "Using this list, choose the correct modelType in the dropdown, corresponding to the service item type.\n * DDDSIT - UpdateMTOServiceItemSIT\n * DDFSIT - UpdateMTOServiceItemSIT\n * DDASIT - UpdateMTOServiceItemSIT\n * DOPSIT - UpdateMTOServiceItemSIT\n * DOASIT - UpdateMTOServiceItemSIT\n * DOFSIT - UpdateMTOServiceItemSIT\n * DOSFSC - UpdateMTOServiceItemSIT\n * DDSFSC - UpdateMTOServiceItemSIT\n * DDSHUT - UpdateMTOServiceItemShuttle\n * DOSHUT - UpdateMTOServiceItemShuttle\n * PODFSC - UpdateMTOServiceItemInternationalPortFSC\n * POEFSC - UpdateMTOServiceItemInternationalPortFSC\n\nThe documentation will then update with the supported fields.\n", "type": "string", "enum": [ "UpdateMTOServiceItemSIT", - "UpdateMTOServiceItemShuttle" + "UpdateMTOServiceItemShuttle", + "UpdateMTOServiceItemInternationalPortFSC" ] }, "UpdateMTOServiceItemSIT": { diff --git a/pkg/gen/primev2api/embedded_spec.go b/pkg/gen/primev2api/embedded_spec.go index cc81cce8c7b..2b05dd45610 100644 --- a/pkg/gen/primev2api/embedded_spec.go +++ b/pkg/gen/primev2api/embedded_spec.go @@ -547,6 +547,11 @@ func init() { "title": "Address Line 3", "x-nullable": true, "example": "Montmârtre" + }, + "usPostRegionCitiesID": { + "type": "string", + "format": "uuid", + "example": "c56a4180-65aa-42ec-a945-5fd21dec0538" } } }, @@ -1470,7 +1475,7 @@ func init() { ] }, "MTOServiceItemModelType": { - "description": "Describes all model sub-types for a MTOServiceItem model.\n\nUsing this list, choose the correct modelType in the dropdown, corresponding to the service item type.\n * DOFSIT, DOASIT - MTOServiceItemOriginSIT\n * DDFSIT, DDASIT - MTOServiceItemDestSIT\n * DOSHUT, DDSHUT - MTOServiceItemShuttle\n * DCRT, DUCRT - MTOServiceItemDomesticCrating\n * ICRT, IUCRT - MTOServiceItemInternationalCrating\n\nThe documentation will then update with the supported fields.\n", + "description": "Describes all model sub-types for a MTOServiceItem model.\n\nUsing this list, choose the correct modelType in the dropdown, corresponding to the service item type.\n * DOFSIT, DOASIT - MTOServiceItemOriginSIT\n * DDFSIT, DDASIT - MTOServiceItemDestSIT\n * DOSHUT, DDSHUT - MTOServiceItemShuttle\n * DCRT, DUCRT - MTOServiceItemDomesticCrating\n * ICRT, IUCRT - MTOServiceItemInternationalCrating\n * PODFSC, POEFSC - MTOSerivceItemInternationalFuelSurcharge\n\nThe documentation will then update with the supported fields.\n", "type": "string", "enum": [ "MTOServiceItemBasic", @@ -1478,7 +1483,8 @@ func init() { "MTOServiceItemDestSIT", "MTOServiceItemShuttle", "MTOServiceItemDomesticCrating", - "MTOServiceItemInternationalCrating" + "MTOServiceItemInternationalCrating", + "MTOSerivceItemInternationalFuelSurcharge" ] }, "MTOServiceItemOriginSIT": { @@ -4148,6 +4154,11 @@ func init() { "title": "Address Line 3", "x-nullable": true, "example": "Montmârtre" + }, + "usPostRegionCitiesID": { + "type": "string", + "format": "uuid", + "example": "c56a4180-65aa-42ec-a945-5fd21dec0538" } } }, @@ -5071,7 +5082,7 @@ func init() { ] }, "MTOServiceItemModelType": { - "description": "Describes all model sub-types for a MTOServiceItem model.\n\nUsing this list, choose the correct modelType in the dropdown, corresponding to the service item type.\n * DOFSIT, DOASIT - MTOServiceItemOriginSIT\n * DDFSIT, DDASIT - MTOServiceItemDestSIT\n * DOSHUT, DDSHUT - MTOServiceItemShuttle\n * DCRT, DUCRT - MTOServiceItemDomesticCrating\n * ICRT, IUCRT - MTOServiceItemInternationalCrating\n\nThe documentation will then update with the supported fields.\n", + "description": "Describes all model sub-types for a MTOServiceItem model.\n\nUsing this list, choose the correct modelType in the dropdown, corresponding to the service item type.\n * DOFSIT, DOASIT - MTOServiceItemOriginSIT\n * DDFSIT, DDASIT - MTOServiceItemDestSIT\n * DOSHUT, DDSHUT - MTOServiceItemShuttle\n * DCRT, DUCRT - MTOServiceItemDomesticCrating\n * ICRT, IUCRT - MTOServiceItemInternationalCrating\n * PODFSC, POEFSC - MTOSerivceItemInternationalFuelSurcharge\n\nThe documentation will then update with the supported fields.\n", "type": "string", "enum": [ "MTOServiceItemBasic", @@ -5079,7 +5090,8 @@ func init() { "MTOServiceItemDestSIT", "MTOServiceItemShuttle", "MTOServiceItemDomesticCrating", - "MTOServiceItemInternationalCrating" + "MTOServiceItemInternationalCrating", + "MTOSerivceItemInternationalFuelSurcharge" ] }, "MTOServiceItemOriginSIT": { diff --git a/pkg/gen/primev3api/embedded_spec.go b/pkg/gen/primev3api/embedded_spec.go index f7cb95c0bb5..2d36d552e13 100644 --- a/pkg/gen/primev3api/embedded_spec.go +++ b/pkg/gen/primev3api/embedded_spec.go @@ -553,6 +553,11 @@ func init() { "title": "Address Line 3", "x-nullable": true, "example": "Montmârtre" + }, + "usPostRegionCitiesID": { + "type": "string", + "format": "uuid", + "example": "c56a4180-65aa-42ec-a945-5fd21dec0538" } } }, @@ -1632,7 +1637,7 @@ func init() { ] }, "MTOServiceItemModelType": { - "description": "Describes all model sub-types for a MTOServiceItem model.\n\nUsing this list, choose the correct modelType in the dropdown, corresponding to the service item type.\n * DOFSIT, DOASIT - MTOServiceItemOriginSIT\n * DDFSIT, DDASIT - MTOServiceItemDestSIT\n * DOSHUT, DDSHUT - MTOServiceItemShuttle\n * DCRT, DUCRT - MTOServiceItemDomesticCrating\n * ICRT, IUCRT - MTOServiceItemInternationalCrating\n\nThe documentation will then update with the supported fields.\n", + "description": "Describes all model sub-types for a MTOServiceItem model.\n\nUsing this list, choose the correct modelType in the dropdown, corresponding to the service item type.\n * DOFSIT, DOASIT - MTOServiceItemOriginSIT\n * DDFSIT, DDASIT - MTOServiceItemDestSIT\n * DOSHUT, DDSHUT - MTOServiceItemShuttle\n * DCRT, DUCRT - MTOServiceItemDomesticCrating\n * ICRT, IUCRT - MTOServiceItemInternationalCrating\n * PODFSC, POEFSC - MTOSerivceItemInternationalFuelSurcharge\n\nThe documentation will then update with the supported fields.\n", "type": "string", "enum": [ "MTOServiceItemBasic", @@ -1640,7 +1645,8 @@ func init() { "MTOServiceItemDestSIT", "MTOServiceItemShuttle", "MTOServiceItemDomesticCrating", - "MTOServiceItemInternationalCrating" + "MTOServiceItemInternationalCrating", + "MTOSerivceItemInternationalFuelSurcharge" ] }, "MTOServiceItemOriginSIT": { @@ -1965,6 +1971,12 @@ func init() { "description": "Email or ID of the person who will be contacted in the event of questions or concerns about this update. May be the person performing the update, or someone else working with the Prime contractor.\n", "type": "string" }, + "portOfDebarkation": { + "$ref": "#/definitions/Port" + }, + "portOfEmbarkation": { + "$ref": "#/definitions/Port" + }, "ppmShipment": { "$ref": "#/definitions/PPMShipment" }, @@ -2530,6 +2542,11 @@ func init() { "title": "Address Line 3", "x-nullable": true, "example": "Montmârtre" + }, + "usPostRegionCitiesID": { + "type": "string", + "format": "uuid", + "example": "c56a4180-65aa-42ec-a945-5fd21dec0538" } } }, @@ -2980,6 +2997,115 @@ func init() { "$ref": "#/definitions/PaymentServiceItem" } }, + "Port": { + "description": "A port that is used to move an international shipment.", + "type": "object", + "properties": { + "city": { + "type": "string", + "example": "PORTLAND" + }, + "country": { + "description": "Two-letter country code", + "type": "string", + "pattern": "^[A-Z]{2}$", + "example": "US" + }, + "county": { + "type": "string", + "example": "MULTNOMAH" + }, + "id": { + "type": "string", + "format": "uuid", + "example": "c56a4180-65aa-42ec-a945-5fd21dec0538" + }, + "portCode": { + "description": "3 or 4 digit port code", + "type": "string", + "example": "0431" + }, + "portName": { + "description": "Name of the port", + "type": "string", + "example": "PORTLAND INTL" + }, + "portType": { + "description": "Port type A (Air), B (Border Crossing), S (Sea)", + "type": "string", + "enum": [ + "A", + "B", + "S" + ] + }, + "state": { + "description": "US state", + "type": "string", + "enum": [ + "AL", + "AK", + "AR", + "AZ", + "CA", + "CO", + "CT", + "DC", + "DE", + "FL", + "GA", + "HI", + "IA", + "ID", + "IL", + "IN", + "KS", + "KY", + "LA", + "MA", + "MD", + "ME", + "MI", + "MN", + "MO", + "MS", + "MT", + "NC", + "ND", + "NE", + "NH", + "NJ", + "NM", + "NV", + "NY", + "OH", + "OK", + "OR", + "PA", + "RI", + "SC", + "SD", + "TN", + "TX", + "UT", + "VA", + "VT", + "WA", + "WI", + "WV", + "WY" + ], + "example": "OR" + }, + "zip": { + "type": "string", + "format": "zip", + "title": "ZIP", + "pattern": "^(\\d{5}([\\-]\\d{4})?)$", + "example": "99501" + } + } + }, "ProofOfServiceDoc": { "type": "object", "properties": { @@ -3672,6 +3798,12 @@ func init() { "description": "Email or ID of the person who will be contacted in the event of questions or concerns about this update. May be the person performing the update, or someone else working with the Prime contractor.\n", "type": "string" }, + "portOfDebarkation": { + "$ref": "#/definitions/Port" + }, + "portOfEmbarkation": { + "$ref": "#/definitions/Port" + }, "ppmShipment": { "$ref": "#/definitions/UpdatePPMShipment" }, @@ -4675,6 +4807,11 @@ func init() { "title": "Address Line 3", "x-nullable": true, "example": "Montmârtre" + }, + "usPostRegionCitiesID": { + "type": "string", + "format": "uuid", + "example": "c56a4180-65aa-42ec-a945-5fd21dec0538" } } }, @@ -5754,7 +5891,7 @@ func init() { ] }, "MTOServiceItemModelType": { - "description": "Describes all model sub-types for a MTOServiceItem model.\n\nUsing this list, choose the correct modelType in the dropdown, corresponding to the service item type.\n * DOFSIT, DOASIT - MTOServiceItemOriginSIT\n * DDFSIT, DDASIT - MTOServiceItemDestSIT\n * DOSHUT, DDSHUT - MTOServiceItemShuttle\n * DCRT, DUCRT - MTOServiceItemDomesticCrating\n * ICRT, IUCRT - MTOServiceItemInternationalCrating\n\nThe documentation will then update with the supported fields.\n", + "description": "Describes all model sub-types for a MTOServiceItem model.\n\nUsing this list, choose the correct modelType in the dropdown, corresponding to the service item type.\n * DOFSIT, DOASIT - MTOServiceItemOriginSIT\n * DDFSIT, DDASIT - MTOServiceItemDestSIT\n * DOSHUT, DDSHUT - MTOServiceItemShuttle\n * DCRT, DUCRT - MTOServiceItemDomesticCrating\n * ICRT, IUCRT - MTOServiceItemInternationalCrating\n * PODFSC, POEFSC - MTOSerivceItemInternationalFuelSurcharge\n\nThe documentation will then update with the supported fields.\n", "type": "string", "enum": [ "MTOServiceItemBasic", @@ -5762,7 +5899,8 @@ func init() { "MTOServiceItemDestSIT", "MTOServiceItemShuttle", "MTOServiceItemDomesticCrating", - "MTOServiceItemInternationalCrating" + "MTOServiceItemInternationalCrating", + "MTOSerivceItemInternationalFuelSurcharge" ] }, "MTOServiceItemOriginSIT": { @@ -6087,6 +6225,12 @@ func init() { "description": "Email or ID of the person who will be contacted in the event of questions or concerns about this update. May be the person performing the update, or someone else working with the Prime contractor.\n", "type": "string" }, + "portOfDebarkation": { + "$ref": "#/definitions/Port" + }, + "portOfEmbarkation": { + "$ref": "#/definitions/Port" + }, "ppmShipment": { "$ref": "#/definitions/PPMShipment" }, @@ -6652,6 +6796,11 @@ func init() { "title": "Address Line 3", "x-nullable": true, "example": "Montmârtre" + }, + "usPostRegionCitiesID": { + "type": "string", + "format": "uuid", + "example": "c56a4180-65aa-42ec-a945-5fd21dec0538" } } }, @@ -7102,6 +7251,115 @@ func init() { "$ref": "#/definitions/PaymentServiceItem" } }, + "Port": { + "description": "A port that is used to move an international shipment.", + "type": "object", + "properties": { + "city": { + "type": "string", + "example": "PORTLAND" + }, + "country": { + "description": "Two-letter country code", + "type": "string", + "pattern": "^[A-Z]{2}$", + "example": "US" + }, + "county": { + "type": "string", + "example": "MULTNOMAH" + }, + "id": { + "type": "string", + "format": "uuid", + "example": "c56a4180-65aa-42ec-a945-5fd21dec0538" + }, + "portCode": { + "description": "3 or 4 digit port code", + "type": "string", + "example": "0431" + }, + "portName": { + "description": "Name of the port", + "type": "string", + "example": "PORTLAND INTL" + }, + "portType": { + "description": "Port type A (Air), B (Border Crossing), S (Sea)", + "type": "string", + "enum": [ + "A", + "B", + "S" + ] + }, + "state": { + "description": "US state", + "type": "string", + "enum": [ + "AL", + "AK", + "AR", + "AZ", + "CA", + "CO", + "CT", + "DC", + "DE", + "FL", + "GA", + "HI", + "IA", + "ID", + "IL", + "IN", + "KS", + "KY", + "LA", + "MA", + "MD", + "ME", + "MI", + "MN", + "MO", + "MS", + "MT", + "NC", + "ND", + "NE", + "NH", + "NJ", + "NM", + "NV", + "NY", + "OH", + "OK", + "OR", + "PA", + "RI", + "SC", + "SD", + "TN", + "TX", + "UT", + "VA", + "VT", + "WA", + "WI", + "WV", + "WY" + ], + "example": "OR" + }, + "zip": { + "type": "string", + "format": "zip", + "title": "ZIP", + "pattern": "^(\\d{5}([\\-]\\d{4})?)$", + "example": "99501" + } + } + }, "ProofOfServiceDoc": { "type": "object", "properties": { @@ -7796,6 +8054,12 @@ func init() { "description": "Email or ID of the person who will be contacted in the event of questions or concerns about this update. May be the person performing the update, or someone else working with the Prime contractor.\n", "type": "string" }, + "portOfDebarkation": { + "$ref": "#/definitions/Port" + }, + "portOfEmbarkation": { + "$ref": "#/definitions/Port" + }, "ppmShipment": { "$ref": "#/definitions/UpdatePPMShipment" }, diff --git a/swagger/ghc.yaml b/swagger/ghc.yaml index 64e70b75634..9f6ff6750b2 100644 --- a/swagger/ghc.yaml +++ b/swagger/ghc.yaml @@ -38,6 +38,7 @@ tags: - name: ppm - name: tac - name: transportationOffice + - name: addresses - name: uploads - name: paymentRequests - name: reServiceItems @@ -4221,6 +4222,36 @@ paths: $ref: '#/responses/NotFound' '500': $ref: '#/responses/ServerError' + /addresses/zip-city-lookup/{search}: + get: + summary: >- + Returns city, state, postal code, and county associated with the + specified full/partial postal code or city and state string + description: >- + Find by API using full/partial postal code or city name that returns an + us_post_region_cities json object containing city, state, county and + postal code. + operationId: getLocationByZipCityState + tags: + - addresses + parameters: + - in: path + name: search + type: string + required: true + responses: + '200': + description: the requested list of city, state, county, and postal code matches + schema: + $ref: '#/definitions/VLocations' + '400': + $ref: '#/responses/InvalidRequest' + '403': + $ref: '#/responses/PermissionDenied' + '404': + $ref: '#/responses/NotFound' + '500': + $ref: '#/responses/ServerError' /uploads: post: summary: Create a new upload @@ -7974,6 +8005,10 @@ definitions: type: array items: $ref: '#/definitions/TransportationOffice' + VLocations: + type: array + items: + $ref: '#/definitions/VLocation' ReServiceItems: type: array items: @@ -8262,6 +8297,10 @@ definitions: title: isOconus x-nullable: true example: false + usPostRegionCitiesID: + type: string + format: uuid + example: c56a4180-65aa-42ec-a945-5fd21dec0538 required: - streetAddress1 - city @@ -8994,6 +9033,10 @@ definitions: title: County x-nullable: true example: LOS ANGELES + usPostRegionCitiesID: + type: string + format: uuid + example: c56a4180-65aa-42ec-a945-5fd21dec0538 required: - city - state @@ -11418,6 +11461,136 @@ definitions: validHhgProgramCodeForLoa: type: boolean x-nullable: true + VLocation: + description: A postal code, city, and state lookup + type: object + properties: + city: + type: string + example: Anytown + title: City + state: + title: State + type: string + x-display-value: + AL: AL + AK: AK + AR: AR + AZ: AZ + CA: CA + CO: CO + CT: CT + DC: DC + DE: DE + FL: FL + GA: GA + HI: HI + IA: IA + ID: ID + IL: IL + IN: IN + KS: KS + KY: KY + LA: LA + MA: MA + MD: MD + ME: ME + MI: MI + MN: MN + MO: MO + MS: MS + MT: MT + NC: NC + ND: ND + NE: NE + NH: NH + NJ: NJ + NM: NM + NV: NV + NY: NY + OH: OH + OK: OK + OR: OR + PA: PA + RI: RI + SC: SC + SD: SD + TN: TN + TX: TX + UT: UT + VA: VA + VT: VT + WA: WA + WI: WI + WV: WV + WY: WY + enum: + - AL + - AK + - AR + - AZ + - CA + - CO + - CT + - DC + - DE + - FL + - GA + - HI + - IA + - ID + - IL + - IN + - KS + - KY + - LA + - MA + - MD + - ME + - MI + - MN + - MO + - MS + - MT + - NC + - ND + - NE + - NH + - NJ + - NM + - NV + - NY + - OH + - OK + - OR + - PA + - RI + - SC + - SD + - TN + - TX + - UT + - VA + - VT + - WA + - WI + - WV + - WY + postalCode: + type: string + format: zip + title: ZIP + example: '90210' + pattern: ^(\d{5}?)$ + county: + type: string + title: County + x-nullable: true + example: LOS ANGELES + usPostRegionCitiesID: + type: string + format: uuid + example: c56a4180-65aa-42ec-a945-5fd21dec0538 ReServiceItem: description: A Service Item which ties an ReService, Market, and Shipment Type together type: object diff --git a/swagger/internal.yaml b/swagger/internal.yaml index a9695a64600..91bf98ecf28 100644 --- a/swagger/internal.yaml +++ b/swagger/internal.yaml @@ -608,6 +608,10 @@ definitions: type: array items: $ref: '#/definitions/TransportationOffice' + VLocations: + type: array + items: + $ref: '#/definitions/VLocation' OfficeUser: type: object properties: @@ -2750,6 +2754,10 @@ definitions: title: isOconus x-nullable: true example: false + usPostRegionCitiesID: + type: string + format: uuid + example: c56a4180-65aa-42ec-a945-5fd21dec0538 required: - streetAddress1 - city @@ -4048,6 +4056,136 @@ definitions: RENTAL_EQUIPMENT: Rental equipment TOLLS: Tolls WEIGHING_FEE: Weighing fee + VLocation: + description: A postal code, city, and state lookup + type: object + properties: + city: + type: string + example: Anytown + title: City + state: + title: State + type: string + x-display-value: + AL: AL + AK: AK + AR: AR + AZ: AZ + CA: CA + CO: CO + CT: CT + DC: DC + DE: DE + FL: FL + GA: GA + HI: HI + IA: IA + ID: ID + IL: IL + IN: IN + KS: KS + KY: KY + LA: LA + MA: MA + MD: MD + ME: ME + MI: MI + MN: MN + MO: MO + MS: MS + MT: MT + NC: NC + ND: ND + NE: NE + NH: NH + NJ: NJ + NM: NM + NV: NV + NY: NY + OH: OH + OK: OK + OR: OR + PA: PA + RI: RI + SC: SC + SD: SD + TN: TN + TX: TX + UT: UT + VA: VA + VT: VT + WA: WA + WI: WI + WV: WV + WY: WY + enum: + - AL + - AK + - AR + - AZ + - CA + - CO + - CT + - DC + - DE + - FL + - GA + - HI + - IA + - ID + - IL + - IN + - KS + - KY + - LA + - MA + - MD + - ME + - MI + - MN + - MO + - MS + - MT + - NC + - ND + - NE + - NH + - NJ + - NM + - NV + - NY + - OH + - OK + - OR + - PA + - RI + - SC + - SD + - TN + - TX + - UT + - VA + - VT + - WA + - WI + - WV + - WY + postalCode: + type: string + format: zip + title: ZIP + example: '90210' + pattern: ^(\d{5}?)$ + county: + type: string + title: County + x-nullable: true + example: LOS ANGELES + usPostRegionCitiesID: + type: string + format: uuid + example: c56a4180-65aa-42ec-a945-5fd21dec0538 PPMDestinationAddress: description: A postal address type: object @@ -4202,6 +4340,10 @@ definitions: title: County x-nullable: true example: LOS ANGELES + usPostRegionCitiesID: + type: string + format: uuid + example: c56a4180-65aa-42ec-a945-5fd21dec0538 required: - city - state @@ -6234,6 +6376,36 @@ paths: description: not found '500': description: server error + /addresses/zip-city-lookup/{search}: + get: + summary: >- + Returns city, state, postal code, and county associated with the + specified full/partial postal code or city state string + description: >- + Find by API using full/partial postal code or city name that returns an + us_post_region_cities json object containing city, state, county and + postal code. + operationId: getLocationByZipCityState + tags: + - addresses + parameters: + - in: path + name: search + type: string + required: true + responses: + '200': + description: the requested list of city, state, county, and postal code matches + schema: + $ref: '#/definitions/VLocations' + '400': + $ref: '#/responses/InvalidRequest' + '403': + $ref: '#/responses/PermissionDenied' + '404': + $ref: '#/responses/NotFound' + '500': + $ref: '#/responses/ServerError' /mto_shipments: post: summary: createMTOShipment diff --git a/swagger/prime.yaml b/swagger/prime.yaml index 37219b47181..f0de7643be3 100644 --- a/swagger/prime.yaml +++ b/swagger/prime.yaml @@ -1072,6 +1072,33 @@ paths: } ``` + + + The following service items allow you to update the Port that the + shipment will use: + + - PODFSC (Port of Debarkation can be updated) + + - POEFSC (Port of Embarkation can be updated) + + + At a MINIMUM, the payload for updating the port should contain the + reServiceCode (PODFSC or POEFSC), modelType + (UpdateMTOServiceItemInternationalPortFSC), portCode, and id for the + service item. + + Please see the example payload below: + + ```json + + { + "id": "1ed224b6-c65e-4616-b88e-8304d26c9562", + "modelType": "UpdateMTOServiceItemInternationalPortFSC", + "portCode": "SEA", + "reServiceCode": "POEFSC" + } + + ``` operationId: updateMTOServiceItem tags: - mtoServiceItem @@ -2234,6 +2261,25 @@ definitions: required: - reason - reServiceCode + MTOServiceItemInternationalFuelSurcharge: + description: >- + Describes a international Port of Embarkation/Debarkation fuel surcharge + service item subtype of a MTOServiceItem. + allOf: + - $ref: '#/definitions/MTOServiceItem' + - type: object + properties: + reServiceCode: + type: string + description: >- + A unique code for the service item. Indicates if the service is + for Port of Embarkation (POEFSC) or Port of Debarkation (PODFSC). + enum: + - PODFSC + - POEFSC + portCode: + description: A unique code for a Port + type: string MTOShipment: type: object properties: @@ -2326,12 +2372,15 @@ definitions: * DDSFSC - UpdateMTOServiceItemSIT * DDSHUT - UpdateMTOServiceItemShuttle * DOSHUT - UpdateMTOServiceItemShuttle + * PODFSC - UpdateMTOServiceItemInternationalPortFSC + * POEFSC - UpdateMTOServiceItemInternationalPortFSC The documentation will then update with the supported fields. type: string enum: - UpdateMTOServiceItemSIT - UpdateMTOServiceItemShuttle + - UpdateMTOServiceItemInternationalPortFSC UpdateMTOServiceItemShuttle: description: > Subtype used to provide the estimated weight and actual weight for @@ -2463,6 +2512,28 @@ definitions: description: Indicates if "Approvals Requested" status is being requested. type: boolean x-nullable: true + UpdateMTOServiceItemInternationalPortFSC: + description: > + Subtype used to provide the port for fuel surcharge. This is not creating + a new service item but rather updating an existing service item. + allOf: + - $ref: '#/definitions/UpdateMTOServiceItem' + - type: object + properties: + portCode: + type: string + example: PDX + description: >- + Port used for the shipment. Relevant for moving (PODFSC & POEFSC) + service items. + x-nullable: true + x-omitempty: false + reServiceCode: + type: string + description: Service code allowed for this model type. + enum: + - PODFSC + - POEFSC UpdateMTOShipment: properties: actualProGearWeight: @@ -2880,6 +2951,10 @@ definitions: title: isOconus x-nullable: true example: false + usPostRegionCitiesID: + type: string + format: uuid + example: c56a4180-65aa-42ec-a945-5fd21dec0538 required: - streetAddress1 - city @@ -3368,6 +3443,7 @@ definitions: * DOSHUT, DDSHUT - MTOServiceItemShuttle * DCRT, DUCRT - MTOServiceItemDomesticCrating * ICRT, IUCRT - MTOServiceItemInternationalCrating + * PODFSC, POEFSC - MTOSerivceItemInternationalFuelSurcharge The documentation will then update with the supported fields. type: string @@ -3378,6 +3454,7 @@ definitions: - MTOServiceItemShuttle - MTOServiceItemDomesticCrating - MTOServiceItemInternationalCrating + - MTOSerivceItemInternationalFuelSurcharge ServiceRequestDocument: properties: uploads: diff --git a/swagger/prime_v2.yaml b/swagger/prime_v2.yaml index e7cd2cefd81..20008a7dd7e 100644 --- a/swagger/prime_v2.yaml +++ b/swagger/prime_v2.yaml @@ -1562,6 +1562,10 @@ definitions: title: isOconus x-nullable: true example: false + usPostRegionCitiesID: + type: string + format: uuid + example: c56a4180-65aa-42ec-a945-5fd21dec0538 required: - streetAddress1 - city @@ -2062,6 +2066,7 @@ definitions: * DOSHUT, DDSHUT - MTOServiceItemShuttle * DCRT, DUCRT - MTOServiceItemDomesticCrating * ICRT, IUCRT - MTOServiceItemInternationalCrating + * PODFSC, POEFSC - MTOSerivceItemInternationalFuelSurcharge The documentation will then update with the supported fields. type: string @@ -2072,6 +2077,7 @@ definitions: - MTOServiceItemShuttle - MTOServiceItemDomesticCrating - MTOServiceItemInternationalCrating + - MTOSerivceItemInternationalFuelSurcharge ServiceRequestDocument: properties: uploads: diff --git a/swagger/prime_v3.yaml b/swagger/prime_v3.yaml index e32a420d158..7037ba6d735 100644 --- a/swagger/prime_v3.yaml +++ b/swagger/prime_v3.yaml @@ -1312,6 +1312,10 @@ definitions: x-nullable: true ppmShipment: $ref: '#/definitions/UpdatePPMShipment' + portOfEmbarkation: + $ref: '#/definitions/Port' + portOfDebarkation: + $ref: '#/definitions/Port' UpdateMTOShipmentStatus: description: >- Contains the statuses available to the Prime when updating the state of a @@ -1646,6 +1650,10 @@ definitions: title: isOconus x-nullable: true example: false + usPostRegionCitiesID: + type: string + format: uuid + example: c56a4180-65aa-42ec-a945-5fd21dec0538 required: - streetAddress1 - city @@ -2146,6 +2154,7 @@ definitions: * DOSHUT, DDSHUT - MTOServiceItemShuttle * DCRT, DUCRT - MTOServiceItemDomesticCrating * ICRT, IUCRT - MTOServiceItemInternationalCrating + * PODFSC, POEFSC - MTOSerivceItemInternationalFuelSurcharge The documentation will then update with the supported fields. type: string @@ -2156,6 +2165,7 @@ definitions: - MTOServiceItemShuttle - MTOServiceItemDomesticCrating - MTOServiceItemInternationalCrating + - MTOSerivceItemInternationalFuelSurcharge ServiceRequestDocument: properties: uploads: @@ -2643,6 +2653,10 @@ definitions: title: County x-nullable: true example: LOS ANGELES + usPostRegionCitiesID: + type: string + format: uuid + example: c56a4180-65aa-42ec-a945-5fd21dec0538 required: - city - state @@ -3101,6 +3115,102 @@ definitions: - originalAddress - newAddress - contractorRemarks + Port: + description: A port that is used to move an international shipment. + type: object + properties: + id: + type: string + format: uuid + example: c56a4180-65aa-42ec-a945-5fd21dec0538 + portType: + type: string + description: Port type A (Air), B (Border Crossing), S (Sea) + enum: + - A + - B + - S + portCode: + type: string + description: 3 or 4 digit port code + example: '0431' + portName: + type: string + description: Name of the port + example: PORTLAND INTL + city: + type: string + example: PORTLAND + county: + type: string + example: MULTNOMAH + state: + type: string + description: US state + example: OR + enum: + - AL + - AK + - AR + - AZ + - CA + - CO + - CT + - DC + - DE + - FL + - GA + - HI + - IA + - ID + - IL + - IN + - KS + - KY + - LA + - MA + - MD + - ME + - MI + - MN + - MO + - MS + - MT + - NC + - ND + - NE + - NH + - NJ + - NM + - NV + - NY + - OH + - OK + - OR + - PA + - RI + - SC + - SD + - TN + - TX + - UT + - VA + - VT + - WA + - WI + - WV + - WY + zip: + type: string + format: zip + title: ZIP + example: '99501' + pattern: ^(\d{5}([\-]\d{4})?)$ + country: + type: string + example: US + pattern: ^[A-Z]{2}$ + description: Two-letter country code MTOShipmentWithoutServiceItems: type: object properties: @@ -3387,6 +3497,10 @@ definitions: description: >- Single-letter designator for domestic (d) or international (i) shipments + portOfDebarkation: + $ref: '#/definitions/Port' + portOfEmbarkation: + $ref: '#/definitions/Port' MTOShipmentsWithoutServiceObjects: description: A list of shipments without their associated service items. items: From dc9da01a04769c03aa9934414043245138ccbf38 Mon Sep 17 00:00:00 2001 From: Brooklyn Welsh Date: Mon, 13 Jan 2025 21:13:36 +0000 Subject: [PATCH 2/3] RemainingPPMEntitlement now subtracts the GTCC paid SIT and MemberPaidSit from the calculation. Disbursement now uses the finalIncentive value before this subtraction. Member disbursement still adds memberpaidsit --- .../shipment_summary_worksheet.go | 18 ++++++++---- .../shipment_summary_worksheet_test.go | 29 ++++++++++--------- 2 files changed, 29 insertions(+), 18 deletions(-) diff --git a/pkg/services/shipment_summary_worksheet/shipment_summary_worksheet.go b/pkg/services/shipment_summary_worksheet/shipment_summary_worksheet.go index a0d4ab3a421..910db28040b 100644 --- a/pkg/services/shipment_summary_worksheet/shipment_summary_worksheet.go +++ b/pkg/services/shipment_summary_worksheet/shipment_summary_worksheet.go @@ -208,7 +208,7 @@ func SSWGetEntitlement(grade internalmessages.OrderPayGrade, hasDependents bool, } // Calculates cost for the Remaining PPM Incentive (pre-tax) field on page 2 of SSW form. -func CalculateRemainingPPMEntitlement(finalIncentive *unit.Cents, sitMemberPaid float64, sitGTCCPaid float64, aoa *unit.Cents) float64 { +func CalculateRemainingPPMEntitlement(finalIncentive *unit.Cents, aoa *unit.Cents) float64 { // FinalIncentive var finalIncentiveFloat float64 = 0 if finalIncentive != nil { @@ -223,7 +223,7 @@ func CalculateRemainingPPMEntitlement(finalIncentive *unit.Cents, sitMemberPaid // This costing is computed by taking the Actual Obligations 100% GCC plus the // SIT cost calculated (if SIT was approved and accepted) minus any Advance // Operating Allowance (AOA) the customer identified as receiving in the Document upload process - return (finalIncentiveFloat + sitMemberPaid + sitGTCCPaid) - aoaFloat + return finalIncentiveFloat - aoaFloat } const ( @@ -328,7 +328,7 @@ func (s *SSWPPMComputer) FormatValuesShipmentSummaryWorksheetFormPage2(data mode if data.IsActualExpenseReimbursement { data.PPMRemainingEntitlement = 0.0 } else { - data.PPMRemainingEntitlement = CalculateRemainingPPMEntitlement(data.PPMShipment.FinalIncentive, expensesMap["StorageMemberPaid"], expensesMap["StorageGTCCPaid"], data.PPMShipment.AdvanceAmountReceived) + data.PPMRemainingEntitlement = CalculateRemainingPPMEntitlement(data.PPMShipment.FinalIncentive, data.PPMShipment.AdvanceAmountReceived) } page2.PPMRemainingEntitlement = FormatDollars(data.PPMRemainingEntitlement) @@ -336,7 +336,15 @@ func (s *SSWPPMComputer) FormatValuesShipmentSummaryWorksheetFormPage2(data mode if err != nil { return page2, err } - page2.Disbursement = formatDisbursement(expensesMap, data.PPMRemainingEntitlement) + var finalIncentiveFloat float64 = 0 + if data.PPMShipment.FinalIncentive != nil { + finalIncentiveFloat = float64(*data.PPMShipment.FinalIncentive) / 100 + } + var aoaFloat float64 = 0 + if data.PPMShipment.AdvanceAmountReceived != nil { + aoaFloat = float64(*data.PPMShipment.AdvanceAmountReceived) / 100 + } + page2.Disbursement = formatDisbursement(expensesMap, finalIncentiveFloat-aoaFloat) } else { page2.PreparationDate2 = formatAOADate(data.SignedCertifications, data.PPMShipment.ID) page2.Disbursement = "N/A" @@ -950,7 +958,7 @@ func formatDisbursement(expensesMap map[string]float64, ppmRemainingEntitlement disbursementGTCC = 0 } else { // Disbursement Member is remaining entitlement plus member SIT minus GTCC Disbursement, not less than 0. - disbursementMember = ppmRemainingEntitlement + expensesMap["StorageMemberPaid"] - disbursementGTCC + disbursementMember = ppmRemainingEntitlement + expensesMap["StorageMemberPaid"] } // Return formatted values in string diff --git a/pkg/services/shipment_summary_worksheet/shipment_summary_worksheet_test.go b/pkg/services/shipment_summary_worksheet/shipment_summary_worksheet_test.go index 8f89327f6f2..c1e6396efd8 100644 --- a/pkg/services/shipment_summary_worksheet/shipment_summary_worksheet_test.go +++ b/pkg/services/shipment_summary_worksheet/shipment_summary_worksheet_test.go @@ -26,6 +26,11 @@ import ( "github.com/transcom/mymove/pkg/uploader" ) +// Helper function to format disbursement field for equal checks +var expectedDisbursementString = func(expectedGTCC int, expectedMember int) string { + return "GTCC: " + FormatDollars((models.CentPointer(unit.Cents(expectedGTCC)).ToMillicents().ToDollarFloat())) + "\nMember: " + FormatDollars(models.CentPointer(unit.Cents(expectedMember)).ToMillicents().ToDollarFloat()) +} + func (suite *ShipmentSummaryWorksheetServiceSuite) TestFetchDataShipmentSummaryWorksheet() { //advanceID, _ := uuid.NewV4() ordersType := internalmessages.OrdersTypePERMANENTCHANGEOFSTATION @@ -693,7 +698,8 @@ func (suite *ShipmentSummaryWorksheetServiceSuite) TestMemberPaidRemainingPPMEnt sswPPMComputer := NewSSWPPMComputer(mockPPMCloseoutFetcher) expensesMap := SubTotalExpenses(ssd.MovingExpenses) sswPage2, _ := sswPPMComputer.FormatValuesShipmentSummaryWorksheetFormPage2(ssd, true, expensesMap) - suite.Equal("$4.00", sswPage2.PPMRemainingEntitlement) + suite.Equal("$3.00", sswPage2.PPMRemainingEntitlement) + suite.Equal(expectedDisbursementString(0, 400), sswPage2.Disbursement) } func (suite *ShipmentSummaryWorksheetServiceSuite) TestAOAPacketPPMEntitlementFormatValuesShipmentSummaryWorksheetFormPage2() { @@ -777,7 +783,8 @@ func (suite *ShipmentSummaryWorksheetServiceSuite) TestNullCheckForFinalIncentiv sswPPMComputer := NewSSWPPMComputer(mockPPMCloseoutFetcher) expensesMap := SubTotalExpenses(ssd.MovingExpenses) sswPage2, _ := sswPPMComputer.FormatValuesShipmentSummaryWorksheetFormPage2(ssd, true, expensesMap) - suite.Equal("$1.00", sswPage2.PPMRemainingEntitlement) + suite.Equal("$0.00", sswPage2.PPMRemainingEntitlement) + suite.Equal(expectedDisbursementString(0, 100), sswPage2.Disbursement) } func (suite *ShipmentSummaryWorksheetServiceSuite) TestGTCCPaidRemainingPPMEntitlementFormatValuesShipmentSummaryWorksheetFormPage2() { @@ -827,7 +834,8 @@ func (suite *ShipmentSummaryWorksheetServiceSuite) TestGTCCPaidRemainingPPMEntit mockPPMCloseoutFetcher := &mocks.PPMCloseoutFetcher{} sswPPMComputer := NewSSWPPMComputer(mockPPMCloseoutFetcher) sswPage2, _ := sswPPMComputer.FormatValuesShipmentSummaryWorksheetFormPage2(ssd, true, expensesMap) - suite.Equal("$105.00", sswPage2.PPMRemainingEntitlement) + suite.Equal("$5.00", sswPage2.PPMRemainingEntitlement) + suite.Equal(expectedDisbursementString(500, 500), sswPage2.Disbursement) } func (suite *ShipmentSummaryWorksheetServiceSuite) TestGroupExpenses() { paidWithGTCC := false @@ -1320,11 +1328,6 @@ func (suite *ShipmentSummaryWorksheetServiceSuite) TestFillSSWPDFForm() { func (suite *ShipmentSummaryWorksheetServiceSuite) TestActualExpenseReimbursementCalculations() { - // Helper function to format disbursement field for equal checks - expectedDisbursementString := func(expectedGTCC int, expectedMember int) string { - return "GTCC: " + FormatDollars((models.CentPointer(unit.Cents(expectedGTCC)).ToMillicents().ToDollarFloat())) + "\nMember: " + FormatDollars(models.CentPointer(unit.Cents(expectedMember)).ToMillicents().ToDollarFloat()) - } - fakeS3 := storageTest.NewFakeS3Storage(true) userUploader, uploaderErr := uploader.NewUserUploader(fakeS3, 25*uploader.MB) suite.FatalNoError(uploaderErr) @@ -1950,23 +1953,23 @@ func (suite *ShipmentSummaryWorksheetServiceSuite) TestFormatDisbursement() { // Test case 1: GTCC calculation B is less than GTCC calculation A // Additionally, Member should not be less than 0 - expectedResult := "GTCC: " + FormatDollars(100.00) + "\nMember: " + FormatDollars(0) + expectedResult := "GTCC: " + FormatDollars(100.00) + "\nMember: " + FormatDollars(100.00) expensesMap["TotalGTCCPaid"] = 200.00 expensesMap["StorageGTCCPaid"] = 300.00 ppmRemainingEntitlement := 60.00 expensesMap["StorageMemberPaid"] = 40.00 result := formatDisbursement(expensesMap, ppmRemainingEntitlement) - suite.Equal(result, expectedResult) + suite.Equal(expectedResult, result) // Test case 2: GTCC calculation A is less than GTCC calculation B - expectedResult = "GTCC: " + FormatDollars(100.00) + "\nMember: " + FormatDollars(400.00) + expectedResult = "GTCC: " + FormatDollars(100.00) + "\nMember: " + FormatDollars(500.00) expensesMap = make(map[string]float64) expensesMap["TotalGTCCPaid"] = 60.00 expensesMap["StorageGTCCPaid"] = 40.00 ppmRemainingEntitlement = 300.00 expensesMap["StorageMemberPaid"] = 200.00 result = formatDisbursement(expensesMap, ppmRemainingEntitlement) - suite.Equal(result, expectedResult) + suite.Equal(expectedResult, result) // Test case 3: GTCC calculation is less than 0 expectedResult = "GTCC: " + FormatDollars(0) + "\nMember: " + FormatDollars(-250.00) @@ -1976,5 +1979,5 @@ func (suite *ShipmentSummaryWorksheetServiceSuite) TestFormatDisbursement() { ppmRemainingEntitlement = -300.00 expensesMap["StorageMemberPaid"] = 50.00 result = formatDisbursement(expensesMap, ppmRemainingEntitlement) - suite.Equal(result, expectedResult) + suite.Equal(expectedResult, result) } From 6535db7a0358b804e2324c4eed76077edbdf9b42 Mon Sep 17 00:00:00 2001 From: Brooklyn Welsh Date: Tue, 14 Jan 2025 21:33:13 +0000 Subject: [PATCH 3/3] Removed accidental change --- .../office/servicescounseling/servicesCounselingFlows.spec.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/playwright/tests/office/servicescounseling/servicesCounselingFlows.spec.js b/playwright/tests/office/servicescounseling/servicesCounselingFlows.spec.js index 5d8736e16e9..16db36fbc3c 100644 --- a/playwright/tests/office/servicescounseling/servicesCounselingFlows.spec.js +++ b/playwright/tests/office/servicescounseling/servicesCounselingFlows.spec.js @@ -323,8 +323,6 @@ test.describe('Services counselor user', () => { await expect(page.getByText(LocationLookup, { exact: true })).toBeVisible(); await page.keyboard.press('Enter'); await page.locator('select[name="destinationType"]').selectOption({ label: 'Home of selection (HOS)' }); - await page.getByLabel('Requested pickup date').fill('16 Mar 2022'); - await page.locator('[data-testid="submitForm"]').click(); await scPage.waitForLoading();