diff --git a/modules/claims_api/app/controllers/concerns/claims_api/v2/power_of_attorney_validation.rb b/modules/claims_api/app/controllers/concerns/claims_api/v2/power_of_attorney_validation.rb index d8cb23420d6..4f4bc5732a6 100644 --- a/modules/claims_api/app/controllers/concerns/claims_api/v2/power_of_attorney_validation.rb +++ b/modules/claims_api/app/controllers/concerns/claims_api/v2/power_of_attorney_validation.rb @@ -78,13 +78,13 @@ def validate_address collect_error_messages( source: '/claimant/address/', detail: "If claimant is present 'address' must be filled in " \ - ' with required fields addressLine1, city, stateCode, country and zipCode' + 'with required fields addressLine1, city, stateCode, countryCode and zipCode' ) else validate_address_line_one(address) validate_address_city(address) validate_address_state_code(address) - validate_address_country(address) + validate_address_country_code(address) validate_address_zip_code(address) end end @@ -116,11 +116,11 @@ def validate_address_state_code(address) end end - def validate_address_country(address) - if address['country'].nil? + def validate_address_country_code(address) + if address['countryCode'].nil? collect_error_messages( - source: '/claimant/address/country', - detail: "If claimant is present 'country' must be filled in" + source: '/claimant/address/countryCode', + detail: "If claimant is present 'countryCode' must be filled in" ) end end diff --git a/modules/claims_api/app/swagger/claims_api/v1/swagger.json b/modules/claims_api/app/swagger/claims_api/v1/swagger.json index e237e86d835..6b24b8608f2 100644 --- a/modules/claims_api/app/swagger/claims_api/v1/swagger.json +++ b/modules/claims_api/app/swagger/claims_api/v1/swagger.json @@ -3045,7 +3045,7 @@ "example": "DOMESTIC" }, "state": { - "description": "State or province Veteran resides in.", + "description": "State Veteran resides in.", "type": "string", "pattern": "^[a-z,A-Z]{2}$", "example": "OR" @@ -3197,7 +3197,7 @@ "type": "string" }, "state": { - "description": "New state or province Veteran resides in.", + "description": "New state Veteran resides in.", "type": "string", "pattern": "^[a-z,A-Z]{2}$", "example": "OR" @@ -5303,7 +5303,7 @@ "example": "DOMESTIC" }, "state": { - "description": "State or province Veteran resides in.", + "description": "State Veteran resides in.", "type": "string", "pattern": "^[a-z,A-Z]{2}$", "example": "OR" @@ -5455,7 +5455,7 @@ "type": "string" }, "state": { - "description": "New state or province Veteran resides in.", + "description": "New state Veteran resides in.", "type": "string", "pattern": "^[a-z,A-Z]{2}$", "example": "OR" @@ -8953,14 +8953,14 @@ "example": "Portland" }, "state": { - "description": "State or province for the address.", + "description": "State for the address.", "type": "string", "example": "OR" }, "country": { "description": "Country of the address.", "type": "string", - "example": "US" + "example": "USA" }, "zipFirstFive": { "description": "Zipcode (First 5 digits) of the address.", @@ -9093,14 +9093,14 @@ "example": "Portland" }, "state": { - "description": "State or province for the address.", + "description": "State for the address.", "type": "string", "example": "OR" }, "country": { "description": "Country of the address.", "type": "string", - "example": "US" + "example": "USA" }, "zipFirstFive": { "description": "Zipcode (First 5 digits) of the address.", @@ -9229,14 +9229,14 @@ "example": "Portland" }, "state": { - "description": "State or province for the address.", + "description": "State for the address.", "type": "string", "example": "OR" }, "country": { "description": "Country of the address.", "type": "string", - "example": "US" + "example": "USA" }, "zipFirstFive": { "description": "Zipcode (First 5 digits) of the address.", @@ -10821,14 +10821,14 @@ "example": "Portland" }, "state": { - "description": "State or province for the address.", + "description": "State for the address.", "type": "string", "example": "OR" }, "country": { "description": "Country of the address.", "type": "string", - "example": "US" + "example": "USA" }, "zipFirstFive": { "description": "Zipcode (First 5 digits) of the address.", @@ -10961,14 +10961,14 @@ "example": "Portland" }, "state": { - "description": "State or province for the address.", + "description": "State for the address.", "type": "string", "example": "OR" }, "country": { "description": "Country of the address.", "type": "string", - "example": "US" + "example": "USA" }, "zipFirstFive": { "description": "Zipcode (First 5 digits) of the address.", @@ -11097,14 +11097,14 @@ "example": "Portland" }, "state": { - "description": "State or province for the address.", + "description": "State for the address.", "type": "string", "example": "OR" }, "country": { "description": "Country of the address.", "type": "string", - "example": "US" + "example": "USA" }, "zipFirstFive": { "description": "Zipcode (First 5 digits) of the address.", diff --git a/modules/claims_api/app/swagger/claims_api/v2/dev/swagger.json b/modules/claims_api/app/swagger/claims_api/v2/dev/swagger.json index 8146668edb9..87c057c6791 100644 --- a/modules/claims_api/app/swagger/claims_api/v2/dev/swagger.json +++ b/modules/claims_api/app/swagger/claims_api/v2/dev/swagger.json @@ -4394,7 +4394,7 @@ "202 without a transactionId": { "value": { "data": { - "id": "6bab009f-6df6-4b5e-a524-d1fd46922bad", + "id": "1c4b30a7-520b-4eb4-b9de-ab1a26ee24d4", "type": "forms/526", "attributes": { "claimId": "600442191", @@ -4579,7 +4579,7 @@ }, "federalActivation": { "activationDate": "2023-10-01", - "anticipatedSeparationDate": "2024-11-28" + "anticipatedSeparationDate": "2024-12-04" }, "confinements": [ { @@ -4625,7 +4625,7 @@ "202 with a transactionId": { "value": { "data": { - "id": "4ba3b935-e07a-4f33-9ead-50e089ba5015", + "id": "c4b3e30b-6c8a-459e-9e77-c5e2c413c18f", "type": "forms/526", "attributes": { "claimId": "600442191", @@ -4789,7 +4789,7 @@ "serviceBranch": "Public Health Service", "serviceComponent": "Active", "activeDutyBeginDate": "2008-11-14", - "activeDutyEndDate": "2024-11-28", + "activeDutyEndDate": "2024-12-04", "separationLocationCode": "98282" } ], @@ -4810,7 +4810,7 @@ }, "federalActivation": { "activationDate": "2023-10-01", - "anticipatedSeparationDate": "2024-11-28" + "anticipatedSeparationDate": "2024-12-04" }, "confinements": [ { @@ -8053,7 +8053,7 @@ "serviceBranch": "Public Health Service", "serviceComponent": "Active", "activeDutyBeginDate": "2008-11-14", - "activeDutyEndDate": "2024-11-28", + "activeDutyEndDate": "2024-12-04", "separationLocationCode": "98282" } ], @@ -8074,7 +8074,7 @@ }, "federalActivation": { "activationDate": "2023-10-01", - "anticipatedSeparationDate": "2024-11-28" + "anticipatedSeparationDate": "2024-12-04" }, "confinements": [ { @@ -9838,7 +9838,7 @@ "application/json": { "example": { "data": { - "id": "41784a24-ea38-4bce-ba3f-d9a93a4f3291", + "id": "c7bf5f3c-1781-44ae-af52-7ea31d970238", "type": "forms/526", "attributes": { "claimProcessType": "STANDARD_CLAIM_PROCESS", @@ -13580,8 +13580,8 @@ "id": "1", "type": "intent_to_file", "attributes": { - "creationDate": "2024-11-26", - "expirationDate": "2025-11-26", + "creationDate": "2024-12-02", + "expirationDate": "2025-12-02", "type": "compensation", "status": "active" } @@ -14477,7 +14477,7 @@ "application/json": { "example": { "data": { - "id": "cd03d9a5-fcec-42ca-bdf9-8cef435a39ba", + "id": "a9fbe587-d95a-46b8-b1a6-65262ed11e91", "type": "individual", "attributes": { "code": "067", @@ -14792,7 +14792,7 @@ "addressLine1", "city", "stateCode", - "country", + "countryCode", "zipCode" ], "properties": { @@ -14818,10 +14818,11 @@ "pattern": "^[a-z,A-Z]{2}$", "example": "OR" }, - "country": { - "description": "Country of the address.", + "countryCode": { + "description": "Country code of the address.", "type": "string", - "example": "USA" + "pattern": "^[a-z,A-Z]{2}$", + "example": "US" }, "zipCode": { "description": "Zipcode (First 5 digits) of the address.", @@ -14912,9 +14913,10 @@ "pattern": "^[a-z,A-Z]{2}$", "example": "OR" }, - "country": { - "description": "Country of the address. Required if claimant information provided.", + "countryCode": { + "description": "Country code of the address. Required if claimant information provided.", "type": "string", + "pattern": "^[a-z,A-Z]{2}$", "example": "USA" }, "zipCode": { @@ -15031,10 +15033,11 @@ "pattern": "^[a-z,A-Z]{2}$", "example": "OR" }, - "country": { - "description": "Country of the address.", + "countryCode": { + "description": "Country code of the address.", "type": "string", - "example": "USA" + "pattern": "^[a-z,A-Z]{2}$", + "example": "US" }, "zipCode": { "description": "Zipcode (First 5 digits) of the address.", @@ -15094,7 +15097,7 @@ "addressLine1": "123", "addressLine2": "2a", "city": "city", - "country": "US", + "countryCode": "US", "stateCode": "OR", "zipCode": "12345", "zipCodeSuffix": "6789" @@ -15108,7 +15111,7 @@ "addressLine1": "123", "addressLine2": "2a", "city": "city", - "country": "US", + "countryCode": "US", "stateCode": "OR", "zipCode": "12345", "zipCodeSuffix": "6789" @@ -15128,7 +15131,7 @@ "addressLine1": "123", "addressLine2": "2a", "city": "city", - "country": "US", + "countryCode": "US", "stateCode": "OR", "zipCode": "12345", "zipCodeSuffix": "6789" @@ -15142,7 +15145,7 @@ "addressLine1": "123", "addressLine2": "2a", "city": "city", - "country": "US", + "countryCode": "US", "stateCode": "OR", "zipCode": "12345", "zipCodeSuffix": "6789" @@ -15161,7 +15164,7 @@ "addressLine1": "123", "addressLine2": "2a", "city": "city", - "country": "US", + "countryCode": "US", "stateCode": "OR", "zipCode": "12345", "zipCodeSuffix": "6789" @@ -15175,7 +15178,7 @@ "addressLine1": "123", "addressLine2": "2a", "city": "city", - "country": "US", + "countryCode": "US", "stateCode": "OR", "zipCode": "12345", "zipCodeSuffix": "6789" @@ -15187,7 +15190,7 @@ "addressLine1": "123 anystreet", "city": "anytown", "stateCode": "OR", - "country": "USA", + "countryCode": "US", "zipCode": "12345" }, "relationship": "Spouse" @@ -15249,7 +15252,7 @@ "application/json": { "example": { "data": { - "id": "9acc3cef-799a-4394-bca4-53e2a01b738b", + "id": "d57d6212-a5ec-4564-9acf-488a64a4496a", "type": "organization", "attributes": { "code": "083", @@ -15546,7 +15549,7 @@ "required": [ "addressLine1", "city", - "country", + "countryCode", "stateCode", "zipCode" ], @@ -15573,10 +15576,11 @@ "pattern": "^[a-z,A-Z]{2}$", "example": "OR" }, - "country": { - "description": "Country of the address.", + "countryCode": { + "description": "Country code of the address.", "type": "string", - "example": "USA" + "pattern": "^[a-z,A-Z]{2}$", + "example": "US" }, "zipCode": { "description": "Zipcode (First 5 digits) of the address.", @@ -15678,10 +15682,11 @@ "pattern": "^[a-z,A-Z]{2}$", "example": "OR" }, - "country": { - "description": "Country of the address. Required if claimant information provided.", + "countryCode": { + "description": "Country code of the address. Required if claimant information provided.", "type": "string", - "example": "USA" + "pattern": "^[a-z,A-Z]{2}$", + "example": "US" }, "zipCode": { "description": "Zipcode (First 5 digits) of the address. Required if claimant information provided.", @@ -15813,7 +15818,7 @@ "addressLine1": "123", "city": "city", "stateCode": "OR", - "country": "US", + "countryCode": "US", "zipCode": "12345" } }, @@ -15835,7 +15840,7 @@ "addressLine1": "123", "city": "city", "stateCode": "OR", - "country": "US", + "countryCode": "US", "zipCode": "12345" } }, @@ -15856,7 +15861,7 @@ "addressLine1": "123", "city": "city", "stateCode": "OR", - "country": "US", + "countryCode": "US", "zipCode": "12345" } }, @@ -15870,7 +15875,7 @@ "addressLine1": "123 anystreet", "city": "anytown", "stateCode": "OR", - "country": "USA", + "countryCode": "US", "zipCode": "12345" }, "relationship": "Spouse" @@ -16238,7 +16243,7 @@ "addressLine1", "city", "stateCode", - "country", + "countryCode", "zipCode" ], "properties": { @@ -16264,10 +16269,11 @@ "pattern": "^[a-z,A-Z]{2}$", "example": "OR" }, - "country": { - "description": "Country of the address.", + "countryCode": { + "description": "Country code of the address.", "type": "string", - "example": "USA" + "pattern": "^[a-z,A-Z]{2}$", + "example": "US" }, "zipCode": { "description": "Zipcode (First 5 digits) of the address.", @@ -16358,9 +16364,10 @@ "pattern": "^[a-z,A-Z]{2}$", "example": "OR" }, - "country": { - "description": "Country of the address. Required if claimant information provided.", + "countryCode": { + "description": "Country code of the address. Required if claimant information provided.", "type": "string", + "pattern": "^[a-z,A-Z]{2}$", "example": "USA" }, "zipCode": { @@ -16477,10 +16484,11 @@ "pattern": "^[a-z,A-Z]{2}$", "example": "OR" }, - "country": { - "description": "Country of the address.", + "countryCode": { + "description": "Country code of the address.", "type": "string", - "example": "USA" + "pattern": "^[a-z,A-Z]{2}$", + "example": "US" }, "zipCode": { "description": "Zipcode (First 5 digits) of the address.", @@ -16540,7 +16548,7 @@ "addressLine1": "123", "addressLine2": "2a", "city": "city", - "country": "US", + "countryCode": "US", "stateCode": "OR", "zipCode": "12345", "zipCodeSuffix": "6789" @@ -16554,7 +16562,7 @@ "addressLine1": "123", "addressLine2": "2a", "city": "city", - "country": "US", + "countryCode": "US", "stateCode": "OR", "zipCode": "12345", "zipCodeSuffix": "6789" @@ -16904,7 +16912,7 @@ "required": [ "addressLine1", "city", - "country", + "countryCode", "stateCode", "zipCode" ], @@ -16931,10 +16939,11 @@ "pattern": "^[a-z,A-Z]{2}$", "example": "OR" }, - "country": { - "description": "Country of the address.", + "countryCode": { + "description": "Country code of the address.", "type": "string", - "example": "USA" + "pattern": "^[a-z,A-Z]{2}$", + "example": "US" }, "zipCode": { "description": "Zipcode (First 5 digits) of the address.", @@ -17036,10 +17045,11 @@ "pattern": "^[a-z,A-Z]{2}$", "example": "OR" }, - "country": { - "description": "Country of the address. Required if claimant information provided.", + "countryCode": { + "description": "Country code of the address. Required if claimant information provided.", "type": "string", - "example": "USA" + "pattern": "^[a-z,A-Z]{2}$", + "example": "US" }, "zipCode": { "description": "Zipcode (First 5 digits) of the address. Required if claimant information provided.", @@ -17171,7 +17181,7 @@ "addressLine1": "123", "city": "city", "stateCode": "OR", - "country": "US", + "countryCode": "US", "zipCode": "12345" } }, @@ -17245,10 +17255,10 @@ "application/json": { "example": { "data": { - "id": "2bf5ca7d-2424-4f10-bbd9-13024743ea31", + "id": "4ec954c8-b02c-4bc8-8d80-2ec540f966a6", "type": "claimsApiPowerOfAttorneys", "attributes": { - "dateRequestAccepted": "2024-11-26", + "dateRequestAccepted": "2024-12-02", "previousPoa": null, "representative": { "serviceOrganization": { diff --git a/modules/claims_api/app/swagger/claims_api/v2/production/swagger.json b/modules/claims_api/app/swagger/claims_api/v2/production/swagger.json index 616c3aeb39c..5eaef7f27f5 100644 --- a/modules/claims_api/app/swagger/claims_api/v2/production/swagger.json +++ b/modules/claims_api/app/swagger/claims_api/v2/production/swagger.json @@ -3685,7 +3685,7 @@ "202 without a transactionId": { "value": { "data": { - "id": "7e5f02da-783a-4e8a-a961-2c96bce1eeec", + "id": "cf6332f4-abfb-4794-b006-fd0bb048e53f", "type": "forms/526", "attributes": { "claimId": "600442191", @@ -3870,7 +3870,7 @@ }, "federalActivation": { "activationDate": "2023-10-01", - "anticipatedSeparationDate": "2024-11-28" + "anticipatedSeparationDate": "2024-12-04" }, "confinements": [ { @@ -3916,7 +3916,7 @@ "202 with a transactionId": { "value": { "data": { - "id": "57f33225-3569-4c46-b1dd-fb3f43080bdb", + "id": "efca2042-3808-4078-b2cb-96ddd38f5612", "type": "forms/526", "attributes": { "claimId": "600442191", @@ -4080,7 +4080,7 @@ "serviceBranch": "Public Health Service", "serviceComponent": "Active", "activeDutyBeginDate": "2008-11-14", - "activeDutyEndDate": "2024-11-28", + "activeDutyEndDate": "2024-12-04", "separationLocationCode": "98282" } ], @@ -4101,7 +4101,7 @@ }, "federalActivation": { "activationDate": "2023-10-01", - "anticipatedSeparationDate": "2024-11-28" + "anticipatedSeparationDate": "2024-12-04" }, "confinements": [ { @@ -7344,7 +7344,7 @@ "serviceBranch": "Public Health Service", "serviceComponent": "Active", "activeDutyBeginDate": "2008-11-14", - "activeDutyEndDate": "2024-11-28", + "activeDutyEndDate": "2024-12-04", "separationLocationCode": "98282" } ], @@ -7365,7 +7365,7 @@ }, "federalActivation": { "activationDate": "2023-10-01", - "anticipatedSeparationDate": "2024-11-28" + "anticipatedSeparationDate": "2024-12-04" }, "confinements": [ { @@ -9129,7 +9129,7 @@ "application/json": { "example": { "data": { - "id": "44a5f4cc-5911-4cae-81cf-7fe0a87ae3fd", + "id": "1b1af0b5-9733-4c0e-9975-5733e6d8988b", "type": "forms/526", "attributes": { "claimProcessType": "STANDARD_CLAIM_PROCESS", @@ -12871,8 +12871,8 @@ "id": "1", "type": "intent_to_file", "attributes": { - "creationDate": "2024-11-26", - "expirationDate": "2025-11-26", + "creationDate": "2024-12-02", + "expirationDate": "2025-12-02", "type": "compensation", "status": "active" } @@ -13768,7 +13768,7 @@ "application/json": { "example": { "data": { - "id": "1ff6ea80-8721-4ca0-9152-421e6e889bc0", + "id": "b0c6f72f-b4ce-4c9b-8390-9a9bf7a7c4a0", "type": "individual", "attributes": { "code": "067", @@ -14083,7 +14083,7 @@ "addressLine1", "city", "stateCode", - "country", + "countryCode", "zipCode" ], "properties": { @@ -14109,10 +14109,11 @@ "pattern": "^[a-z,A-Z]{2}$", "example": "OR" }, - "country": { - "description": "Country of the address.", + "countryCode": { + "description": "Country code of the address.", "type": "string", - "example": "USA" + "pattern": "^[a-z,A-Z]{2}$", + "example": "US" }, "zipCode": { "description": "Zipcode (First 5 digits) of the address.", @@ -14203,9 +14204,10 @@ "pattern": "^[a-z,A-Z]{2}$", "example": "OR" }, - "country": { - "description": "Country of the address. Required if claimant information provided.", + "countryCode": { + "description": "Country code of the address. Required if claimant information provided.", "type": "string", + "pattern": "^[a-z,A-Z]{2}$", "example": "USA" }, "zipCode": { @@ -14322,10 +14324,11 @@ "pattern": "^[a-z,A-Z]{2}$", "example": "OR" }, - "country": { - "description": "Country of the address.", + "countryCode": { + "description": "Country code of the address.", "type": "string", - "example": "USA" + "pattern": "^[a-z,A-Z]{2}$", + "example": "US" }, "zipCode": { "description": "Zipcode (First 5 digits) of the address.", @@ -14385,7 +14388,7 @@ "addressLine1": "123", "addressLine2": "2a", "city": "city", - "country": "US", + "countryCode": "US", "stateCode": "OR", "zipCode": "12345", "zipCodeSuffix": "6789" @@ -14399,7 +14402,7 @@ "addressLine1": "123", "addressLine2": "2a", "city": "city", - "country": "US", + "countryCode": "US", "stateCode": "OR", "zipCode": "12345", "zipCodeSuffix": "6789" @@ -14419,7 +14422,7 @@ "addressLine1": "123", "addressLine2": "2a", "city": "city", - "country": "US", + "countryCode": "US", "stateCode": "OR", "zipCode": "12345", "zipCodeSuffix": "6789" @@ -14433,7 +14436,7 @@ "addressLine1": "123", "addressLine2": "2a", "city": "city", - "country": "US", + "countryCode": "US", "stateCode": "OR", "zipCode": "12345", "zipCodeSuffix": "6789" @@ -14452,7 +14455,7 @@ "addressLine1": "123", "addressLine2": "2a", "city": "city", - "country": "US", + "countryCode": "US", "stateCode": "OR", "zipCode": "12345", "zipCodeSuffix": "6789" @@ -14466,7 +14469,7 @@ "addressLine1": "123", "addressLine2": "2a", "city": "city", - "country": "US", + "countryCode": "US", "stateCode": "OR", "zipCode": "12345", "zipCodeSuffix": "6789" @@ -14478,7 +14481,7 @@ "addressLine1": "123 anystreet", "city": "anytown", "stateCode": "OR", - "country": "USA", + "countryCode": "US", "zipCode": "12345" }, "relationship": "Spouse" @@ -14540,7 +14543,7 @@ "application/json": { "example": { "data": { - "id": "6c7eab2c-94e5-462d-a888-ba954f05e132", + "id": "3a88e584-45ee-4ad1-9962-b264cb4d217a", "type": "organization", "attributes": { "code": "083", @@ -14837,7 +14840,7 @@ "required": [ "addressLine1", "city", - "country", + "countryCode", "stateCode", "zipCode" ], @@ -14864,10 +14867,11 @@ "pattern": "^[a-z,A-Z]{2}$", "example": "OR" }, - "country": { - "description": "Country of the address.", + "countryCode": { + "description": "Country code of the address.", "type": "string", - "example": "USA" + "pattern": "^[a-z,A-Z]{2}$", + "example": "US" }, "zipCode": { "description": "Zipcode (First 5 digits) of the address.", @@ -14969,10 +14973,11 @@ "pattern": "^[a-z,A-Z]{2}$", "example": "OR" }, - "country": { - "description": "Country of the address. Required if claimant information provided.", + "countryCode": { + "description": "Country code of the address. Required if claimant information provided.", "type": "string", - "example": "USA" + "pattern": "^[a-z,A-Z]{2}$", + "example": "US" }, "zipCode": { "description": "Zipcode (First 5 digits) of the address. Required if claimant information provided.", @@ -15104,7 +15109,7 @@ "addressLine1": "123", "city": "city", "stateCode": "OR", - "country": "US", + "countryCode": "US", "zipCode": "12345" } }, @@ -15126,7 +15131,7 @@ "addressLine1": "123", "city": "city", "stateCode": "OR", - "country": "US", + "countryCode": "US", "zipCode": "12345" } }, @@ -15147,7 +15152,7 @@ "addressLine1": "123", "city": "city", "stateCode": "OR", - "country": "US", + "countryCode": "US", "zipCode": "12345" } }, @@ -15161,7 +15166,7 @@ "addressLine1": "123 anystreet", "city": "anytown", "stateCode": "OR", - "country": "USA", + "countryCode": "US", "zipCode": "12345" }, "relationship": "Spouse" @@ -15529,7 +15534,7 @@ "addressLine1", "city", "stateCode", - "country", + "countryCode", "zipCode" ], "properties": { @@ -15555,10 +15560,11 @@ "pattern": "^[a-z,A-Z]{2}$", "example": "OR" }, - "country": { - "description": "Country of the address.", + "countryCode": { + "description": "Country code of the address.", "type": "string", - "example": "USA" + "pattern": "^[a-z,A-Z]{2}$", + "example": "US" }, "zipCode": { "description": "Zipcode (First 5 digits) of the address.", @@ -15649,9 +15655,10 @@ "pattern": "^[a-z,A-Z]{2}$", "example": "OR" }, - "country": { - "description": "Country of the address. Required if claimant information provided.", + "countryCode": { + "description": "Country code of the address. Required if claimant information provided.", "type": "string", + "pattern": "^[a-z,A-Z]{2}$", "example": "USA" }, "zipCode": { @@ -15768,10 +15775,11 @@ "pattern": "^[a-z,A-Z]{2}$", "example": "OR" }, - "country": { - "description": "Country of the address.", + "countryCode": { + "description": "Country code of the address.", "type": "string", - "example": "USA" + "pattern": "^[a-z,A-Z]{2}$", + "example": "US" }, "zipCode": { "description": "Zipcode (First 5 digits) of the address.", @@ -15831,7 +15839,7 @@ "addressLine1": "123", "addressLine2": "2a", "city": "city", - "country": "US", + "countryCode": "US", "stateCode": "OR", "zipCode": "12345", "zipCodeSuffix": "6789" @@ -15845,7 +15853,7 @@ "addressLine1": "123", "addressLine2": "2a", "city": "city", - "country": "US", + "countryCode": "US", "stateCode": "OR", "zipCode": "12345", "zipCodeSuffix": "6789" @@ -16195,7 +16203,7 @@ "required": [ "addressLine1", "city", - "country", + "countryCode", "stateCode", "zipCode" ], @@ -16222,10 +16230,11 @@ "pattern": "^[a-z,A-Z]{2}$", "example": "OR" }, - "country": { - "description": "Country of the address.", + "countryCode": { + "description": "Country code of the address.", "type": "string", - "example": "USA" + "pattern": "^[a-z,A-Z]{2}$", + "example": "US" }, "zipCode": { "description": "Zipcode (First 5 digits) of the address.", @@ -16327,10 +16336,11 @@ "pattern": "^[a-z,A-Z]{2}$", "example": "OR" }, - "country": { - "description": "Country of the address. Required if claimant information provided.", + "countryCode": { + "description": "Country code of the address. Required if claimant information provided.", "type": "string", - "example": "USA" + "pattern": "^[a-z,A-Z]{2}$", + "example": "US" }, "zipCode": { "description": "Zipcode (First 5 digits) of the address. Required if claimant information provided.", @@ -16462,7 +16472,7 @@ "addressLine1": "123", "city": "city", "stateCode": "OR", - "country": "US", + "countryCode": "US", "zipCode": "12345" } }, @@ -16536,10 +16546,10 @@ "application/json": { "example": { "data": { - "id": "24698375-215b-4b94-b5e1-62d14513768b", + "id": "416b5707-375e-4a71-97e2-956f04632c68", "type": "claimsApiPowerOfAttorneys", "attributes": { - "dateRequestAccepted": "2024-11-26", + "dateRequestAccepted": "2024-12-02", "previousPoa": null, "representative": { "serviceOrganization": { diff --git a/modules/claims_api/config/schemas/v2/2122.json b/modules/claims_api/config/schemas/v2/2122.json index 4e278bdcfa7..a388205998b 100644 --- a/modules/claims_api/config/schemas/v2/2122.json +++ b/modules/claims_api/config/schemas/v2/2122.json @@ -21,7 +21,7 @@ "required": [ "addressLine1", "city", - "country", + "countryCode", "stateCode", "zipCode" ], @@ -48,10 +48,11 @@ "pattern": "^[a-z,A-Z]{2}$", "example": "OR" }, - "country": { - "description": "Country of the address.", + "countryCode": { + "description": "Country code of the address.", "type": "string", - "example": "USA" + "pattern": "^[a-z,A-Z]{2}$", + "example": "US" }, "zipCode": { "description": "Zipcode (First 5 digits) of the address.", @@ -148,10 +149,11 @@ "pattern": "^[a-z,A-Z]{2}$", "example": "OR" }, - "country": { - "description": "Country of the address. Required if claimant information provided.", + "countryCode": { + "description": "Country code of the address. Required if claimant information provided.", "type": "string", - "example": "USA" + "pattern": "^[a-z,A-Z]{2}$", + "example": "US" }, "zipCode": { "description": "Zipcode (First 5 digits) of the address. Required if claimant information provided.", @@ -177,7 +179,10 @@ "phoneNumber" ], "properties": { - "countryCode": { "type": "string", "pattern": "^[0-9]+$" }, + "countryCode": { + "type": "string", + "pattern": "^[0-9]+$" + }, "areaCode": { "description": "Area code of the phone number.", "type": "string", "pattern": "^[2-9][0-9]{2}$", diff --git a/modules/claims_api/config/schemas/v2/2122a.json b/modules/claims_api/config/schemas/v2/2122a.json index 6c0a46cf954..f55ae142754 100644 --- a/modules/claims_api/config/schemas/v2/2122a.json +++ b/modules/claims_api/config/schemas/v2/2122a.json @@ -47,7 +47,7 @@ "addressLine1", "city", "stateCode", - "country", + "countryCode", "zipCode" ], "properties" : { @@ -73,10 +73,11 @@ "pattern": "^[a-z,A-Z]{2}$", "example": "OR" }, - "country": { - "description": "Country of the address.", + "countryCode": { + "description": "Country code of the address.", "type": "string", - "example": "USA" + "pattern": "^[a-z,A-Z]{2}$", + "example": "US" }, "zipCode": { "description": "Zipcode (First 5 digits) of the address.", @@ -101,7 +102,10 @@ "phoneNumber" ], "properties": { - "countryCode": { "type": "string", "pattern": "^[0-9]+$" }, + "countryCode": { + "type": "string", + "pattern": "^[0-9]+$" + }, "areaCode": { "description": "Area code of the phone number.", "type": "string", "pattern": "^[2-9][0-9]{2}$", @@ -159,9 +163,10 @@ "pattern": "^[a-z,A-Z]{2}$", "example": "OR" }, - "country": { - "description": "Country of the address. Required if claimant information provided.", + "countryCode": { + "description": "Country code of the address. Required if claimant information provided.", "type": "string", + "pattern": "^[a-z,A-Z]{2}$", "example": "USA" }, "zipCode": { @@ -187,7 +192,10 @@ "phoneNumber" ], "properties": { - "countryCode": { "type": "string", "pattern": "^[0-9]+$" }, + "countryCode": { + "type": "string", + "pattern": "^[0-9]+$" + }, "areaCode": { "description": "Area code of the phone number.", "type": "string", "pattern": "^[2-9][0-9]{2}$", @@ -195,7 +203,8 @@ }, "phoneNumber": { "description": "Phone number.", - "type": "string", "pattern": "^[0-9]{1,14}$", + "type": "string", + "pattern": "^[0-9]{1,14}$", "example": "555-5555" }, "phoneNumberExt": { "type": "string", "pattern": "^[a-zA-Z0-9]{1,10}$" } @@ -270,10 +279,11 @@ "pattern": "^[a-z,A-Z]{2}$", "example": "OR" }, - "country": { - "description": "Country of the address.", + "countryCode": { + "description": "Country code of the address.", "type": "string", - "example": "USA" + "pattern": "^[a-z,A-Z]{2}$", + "example": "US" }, "zipCode": { "description": "Zipcode (First 5 digits) of the address.", diff --git a/modules/claims_api/spec/fixtures/v2/veterans/power_of_attorney/2122/invalid_poa.json b/modules/claims_api/spec/fixtures/v2/veterans/power_of_attorney/2122/invalid_poa.json index 57ef9056d29..4335ae44110 100644 --- a/modules/claims_api/spec/fixtures/v2/veterans/power_of_attorney/2122/invalid_poa.json +++ b/modules/claims_api/spec/fixtures/v2/veterans/power_of_attorney/2122/invalid_poa.json @@ -6,7 +6,7 @@ "addressLine1": "123", "city": "city", "stateCode": "OR", - "country": "US", + "countryCode": "US", "zipCode": "12345" } }, diff --git a/modules/claims_api/spec/fixtures/v2/veterans/power_of_attorney/2122/valid.json b/modules/claims_api/spec/fixtures/v2/veterans/power_of_attorney/2122/valid.json index fe439564f1a..2cc52cb9741 100644 --- a/modules/claims_api/spec/fixtures/v2/veterans/power_of_attorney/2122/valid.json +++ b/modules/claims_api/spec/fixtures/v2/veterans/power_of_attorney/2122/valid.json @@ -6,7 +6,7 @@ "addressLine1": "123", "city": "city", "stateCode": "OR", - "country": "US", + "countryCode": "US", "zipCode": "12345" } }, diff --git a/modules/claims_api/spec/fixtures/v2/veterans/power_of_attorney/2122a/invalid_poa.json b/modules/claims_api/spec/fixtures/v2/veterans/power_of_attorney/2122a/invalid_poa.json index fd18c06f7f4..2ee7f7dc1a0 100644 --- a/modules/claims_api/spec/fixtures/v2/veterans/power_of_attorney/2122a/invalid_poa.json +++ b/modules/claims_api/spec/fixtures/v2/veterans/power_of_attorney/2122a/invalid_poa.json @@ -6,7 +6,7 @@ "addressLine1": "123", "city": "city", "stateCode": "OR", - "country": "US", + "countryCode": "US", "zipCode": "12345" } }, @@ -17,7 +17,7 @@ "address": { "addressLine1": "123", "city": "city", - "country": "US", + "countryCode": "US", "zipCode": "12345" } } diff --git a/modules/claims_api/spec/fixtures/v2/veterans/power_of_attorney/2122a/invalid_schema.json b/modules/claims_api/spec/fixtures/v2/veterans/power_of_attorney/2122a/invalid_schema.json index f9767e6e69c..7b7f668cd5e 100644 --- a/modules/claims_api/spec/fixtures/v2/veterans/power_of_attorney/2122a/invalid_schema.json +++ b/modules/claims_api/spec/fixtures/v2/veterans/power_of_attorney/2122a/invalid_schema.json @@ -6,7 +6,7 @@ "address": { "addressLine1": "123", "city": "city", - "country": "US", + "countryCode": "US", "zipCode": "12345" } } diff --git a/modules/claims_api/spec/fixtures/v2/veterans/power_of_attorney/2122a/valid.json b/modules/claims_api/spec/fixtures/v2/veterans/power_of_attorney/2122a/valid.json index 83e23b15a67..b3dfdc99e57 100644 --- a/modules/claims_api/spec/fixtures/v2/veterans/power_of_attorney/2122a/valid.json +++ b/modules/claims_api/spec/fixtures/v2/veterans/power_of_attorney/2122a/valid.json @@ -6,7 +6,7 @@ "addressLine1": "123", "addressLine2": "2a", "city": "city", - "country": "US", + "countryCode": "US", "stateCode":"OR", "zipCode": "12345", "zipCodeSuffix":"6789" @@ -20,7 +20,7 @@ "addressLine1": "123", "addressLine2": "2a", "city": "city", - "country": "US", + "countryCode": "US", "stateCode":"OR", "zipCode": "12345", "zipCodeSuffix":"6789" diff --git a/modules/claims_api/spec/requests/v2/veterans/power_of_attorney/2122_spec.rb b/modules/claims_api/spec/requests/v2/veterans/power_of_attorney/2122_spec.rb index 36aa4d0155a..d69599328b6 100644 --- a/modules/claims_api/spec/requests/v2/veterans/power_of_attorney/2122_spec.rb +++ b/modules/claims_api/spec/requests/v2/veterans/power_of_attorney/2122_spec.rb @@ -35,7 +35,7 @@ addressLine1: '123', city: 'city', stateCode: 'OR', - country: 'US', + countryCode: 'US', zipCode: '12345' } }, @@ -88,7 +88,7 @@ addressLine1: '123 anystreet', city: 'anytown', stateCode: 'OR', - country: 'USA', + countryCode: 'US', zipCode: '12345' }, relationship: 'Child' @@ -620,7 +620,7 @@ addressLine1: '2688 S Camino Real', city: 'Palm Springs', stateCode: 'CA', - country: 'US', + countryCode: 'US', zipCode: '92264' }, phone: { diff --git a/modules/claims_api/spec/requests/v2/veterans/power_of_attorney/2122a_spec.rb b/modules/claims_api/spec/requests/v2/veterans/power_of_attorney/2122a_spec.rb index bc1e006bc86..abde7ff8654 100644 --- a/modules/claims_api/spec/requests/v2/veterans/power_of_attorney/2122a_spec.rb +++ b/modules/claims_api/spec/requests/v2/veterans/power_of_attorney/2122a_spec.rb @@ -33,7 +33,7 @@ addressLine1: '123', city: 'city', stateCode: 'OR', - country: 'US', + countryCode: 'US', zipCode: '12345' } }, @@ -44,7 +44,7 @@ address: { addressLine1: '123', city: 'city', - country: 'US', + countryCode: 'US', zipCode: '12345' } } @@ -62,7 +62,7 @@ addressLine1: '123', city: 'city', stateCode: 'OR', - country: 'US', + countryCode: 'US', zipCode: '12345' } }, @@ -74,7 +74,7 @@ addressLine1: '123', city: 'city', stateCode: 'OR', - country: 'US', + countryCode: 'US', zipCode: '12345' } }, @@ -84,7 +84,7 @@ addressLine1: '123', city: 'city', stateCode: 'OR', - country: 'US', + countryCode: 'US', zipCode: '12345' }, relationship: 'spouse' @@ -147,7 +147,7 @@ addressLine1: '123 anystreet', city: 'anytown', stateCode: 'OR', - country: 'USA', + countryCode: 'US', zipCode: '12345' }, relationship: 'Child' @@ -319,16 +319,16 @@ end end - it 'returns a 422 if claimant.address.country is not provided' do + it 'returns a 422 if claimant.address.countryCode is not provided' do mock_ccg(scopes) do |auth_header| - claimant_data[:data][:attributes][:claimant][:address][:country] = nil + claimant_data[:data][:attributes][:claimant][:address][:countryCode] = nil VCR.use_cassette('claims_api/mpi/find_candidate/valid_icn_full') do post appoint_individual_path, params: claimant_data.to_json, headers: auth_header end expect(response).to have_http_status(:unprocessable_entity) response_body = JSON.parse(response.body) expect(response_body['errors'][0]['detail']).to eq( - "If claimant is present 'country' must be filled in" + "If claimant is present 'countryCode' must be filled in" ) end end @@ -411,7 +411,7 @@ address: { addressLine1: '123', city: 'city', - country: 'US', + countryCode: 'US', zipCode: '12345' } }, @@ -421,7 +421,7 @@ address: { addressLine1: '123', city: 'city', - country: 'US', + countryCode: 'US', zipCode: '12345' } } @@ -737,7 +737,7 @@ addressLine1: '2688 S Camino Real', city: 'Palm Springs', stateCode: 'CA', - country: 'US', + countryCode: 'US', zipCode: '92264' }, phone: { diff --git a/modules/claims_api/spec/requests/v2/veterans/power_of_attorney/power_of_attorney_request_spec.rb b/modules/claims_api/spec/requests/v2/veterans/power_of_attorney/power_of_attorney_request_spec.rb index 8d86b0f9788..622be38e866 100644 --- a/modules/claims_api/spec/requests/v2/veterans/power_of_attorney/power_of_attorney_request_spec.rb +++ b/modules/claims_api/spec/requests/v2/veterans/power_of_attorney/power_of_attorney_request_spec.rb @@ -95,8 +95,8 @@ it 'returns a meaningful 422' do VCR.use_cassette('claims_api/mpi/find_candidate/valid_icn_full') do mock_ccg(scopes) do |auth_header| - detail = "If claimant is present 'address' must be filled in with required fields addressLine1, " \ - 'city, stateCode, country and zipCode' + detail = "If claimant is present 'address' must be filled in with required fields addressLine1, " \ + 'city, stateCode, countryCode and zipCode' post request_path, params: request_body, headers: auth_header diff --git a/modules/claims_api/spec/requests/v2/veterans/rswag_power_of_attorney_spec.rb b/modules/claims_api/spec/requests/v2/veterans/rswag_power_of_attorney_spec.rb index 8fee9a56d26..086123a0ce6 100644 --- a/modules/claims_api/spec/requests/v2/veterans/rswag_power_of_attorney_spec.rb +++ b/modules/claims_api/spec/requests/v2/veterans/rswag_power_of_attorney_spec.rb @@ -11,6 +11,18 @@ openapi_spec: Rswag::TextHelpers.new.claims_api_docs do let(:local_bgs) { ClaimsApi::LocalBGS } + claimant_data = { + 'claimantId' => '1013093331V548481', + 'address' => { + 'addressLine1' => '123 anystreet', + 'city' => 'anytown', + 'stateCode' => 'OR', + 'countryCode' => 'US', + 'zipCode' => '12345' + }, + 'relationship' => 'Spouse' + } + path '/veterans/{veteranId}/power-of-attorney' do get 'Find current Power of Attorney for a Veteran.' do tags 'Power of Attorney' @@ -211,18 +223,6 @@ let(:poa_code) { '067' } let(:bgs_poa) { { person_org_name: "#{poa_code} name-here" } } - claimant_data = { - 'claimantId' => '1013093331V548481', - 'address' => { - 'addressLine1' => '123 anystreet', - 'city' => 'anytown', - 'stateCode' => 'OR', - 'country' => 'USA', - 'zipCode' => '12345' - }, - 'relationship' => 'Spouse' - } - request_template = JSON.parse(Rails.root.join('modules', 'claims_api', 'spec', 'fixtures', 'v2', 'veterans', 'power_of_attorney', '2122a', 'valid.json').read) @@ -425,18 +425,6 @@ let(:organization_poa_code) { '083' } let(:bgs_poa) { { person_org_name: "#{organization_poa_code} name-here" } } - claimant_data = { - 'claimantId' => '1013093331V548481', - 'address' => { - 'addressLine1' => '123 anystreet', - 'city' => 'anytown', - 'stateCode' => 'OR', - 'country' => 'USA', - 'zipCode' => '12345' - }, - 'relationship' => 'Spouse' - } - request_template = JSON.parse(Rails.root.join('modules', 'claims_api', 'spec', 'fixtures', 'v2', 'veterans', 'power_of_attorney', '2122', 'valid.json').read)