Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Api 35595 registration numbers #16476

Merged
merged 5 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions modules/claims_api/app/swagger/claims_api/v2/dev/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -6072,7 +6072,7 @@
"application/json": {
"example": {
"data": {
"id": "bcf33b41-f27f-429c-b860-f2b71567d87e",
"id": "6be9b240-267c-4c9c-b8d5-af1cd4068308",
"type": "forms/526",
"attributes": {
"veteran": {
Expand Down Expand Up @@ -8156,8 +8156,8 @@
"id": "1",
"type": "intent_to_file",
"attributes": {
"creationDate": "2024-04-23",
"expirationDate": "2025-04-23",
"creationDate": "2024-04-24",
"expirationDate": "2025-04-24",
"type": "compensation",
"status": "active"
}
Expand Down Expand Up @@ -8975,7 +8975,7 @@
"application/json": {
"example": {
"data": {
"id": "48a79d49-eccd-4a89-adb8-e2c91ed3fab5",
"id": "867b7baa-8dbe-4053-823f-788218fa6984",
"type": "individual",
"attributes": {
"code": "083",
Expand Down Expand Up @@ -9175,7 +9175,7 @@
{
"title": "Resource not found",
"status": "404",
"detail": "Could not find an Accredited Representative with registration number: 67890 and poa code: 083",
"detail": "Could not find an Accredited Representative with registration number: 999999999999 and poa code: 083",
"source": {
"pointer": "/modules/claims_api/app/controllers/claims_api/v2/veterans/power_of_attorney/base_controller.rb:70:in `validate_registration_number!'"
}
Expand Down Expand Up @@ -9603,7 +9603,7 @@
},
"representative": {
"poaCode": "083",
"registrationNumber": "67890",
"registrationNumber": "999999999999",
"type": "ATTORNEY",
"address": {
"addressLine1": "123",
Expand Down Expand Up @@ -9671,7 +9671,7 @@
"application/json": {
"example": {
"data": {
"id": "7610ed19-baac-46fe-8ba5-5aa3e64a92ff",
"id": "c54cfb3e-8ec8-48ce-bb19-52847bdd9bde",
"type": "organization",
"attributes": {
"code": "083",
Expand Down Expand Up @@ -9879,7 +9879,7 @@
{
"title": "Resource not found",
"status": "404",
"detail": "Could not find an Accredited Representative with registration number: 67890 and poa code: 083",
"detail": "Could not find an Accredited Representative with registration number: 999999999999 and poa code: 083",
"source": {
"pointer": "/modules/claims_api/app/controllers/claims_api/v2/veterans/power_of_attorney/base_controller.rb:70:in `validate_registration_number!'"
}
Expand Down Expand Up @@ -10249,7 +10249,7 @@
},
"serviceOrganization": {
"poaCode": "083",
"registrationNumber": "67890"
"registrationNumber": "999999999999"
}
}
}
Expand Down Expand Up @@ -10498,7 +10498,7 @@
{
"title": "Resource not found",
"status": "404",
"detail": "Could not find an Accredited Representative with registration number: 67890 and poa code: 083",
"detail": "Could not find an Accredited Representative with registration number: 999999999999 and poa code: 083",
"source": {
"pointer": "/modules/claims_api/app/controllers/claims_api/v2/veterans/power_of_attorney/base_controller.rb:70:in `validate_registration_number!'"
}
Expand Down Expand Up @@ -10926,7 +10926,7 @@
},
"representative": {
"poaCode": "083",
"registrationNumber": "67890",
"registrationNumber": "999999999999",
"type": "ATTORNEY",
"address": {
"addressLine1": "123",
Expand Down Expand Up @@ -11193,7 +11193,7 @@
{
"title": "Resource not found",
"status": "404",
"detail": "Could not find an Accredited Representative with registration number: 67890 and poa code: 083",
"detail": "Could not find an Accredited Representative with registration number: 999999999999 and poa code: 083",
"source": {
"pointer": "/modules/claims_api/app/controllers/claims_api/v2/veterans/power_of_attorney/base_controller.rb:70:in `validate_registration_number!'"
}
Expand Down Expand Up @@ -11563,7 +11563,7 @@
},
"serviceOrganization": {
"poaCode": "083",
"registrationNumber": "67890"
"registrationNumber": "999999999999"
}
}
}
Expand Down Expand Up @@ -11631,11 +11631,11 @@
"application/json": {
"example": {
"data": {
"id": "09a36719-ad88-46b9-97d1-80a746ef9e81",
"id": "af367b07-5484-4eb7-8a2b-3d4bf1ba447c",
"type": "claimsApiPowerOfAttorneys",
"attributes": {
"status": "submitted",
"dateRequestAccepted": "2024-04-23",
"dateRequestAccepted": "2024-04-24",
"representative": {
"serviceOrganization": {
"poaCode": "074"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5789,7 +5789,7 @@
"application/json": {
"example": {
"data": {
"id": "cfe5b467-a176-4987-80a9-4350ba73f350",
"id": "05d0b0a5-f2c6-40fb-a88a-7f8fb6888649",
"type": "forms/526",
"attributes": {
"veteran": {
Expand Down Expand Up @@ -7873,8 +7873,8 @@
"id": "1",
"type": "intent_to_file",
"attributes": {
"creationDate": "2024-04-23",
"expirationDate": "2025-04-23",
"creationDate": "2024-04-24",
"expirationDate": "2025-04-24",
"type": "compensation",
"status": "active"
}
Expand Down Expand Up @@ -8692,7 +8692,7 @@
"application/json": {
"example": {
"data": {
"id": "74658dd8-0176-4bd4-ac22-beedcef627df",
"id": "6f744006-a5d4-4df8-8869-735a7a011c2b",
"type": "individual",
"attributes": {
"code": "083",
Expand Down Expand Up @@ -8892,7 +8892,7 @@
{
"title": "Resource not found",
"status": "404",
"detail": "Could not find an Accredited Representative with registration number: 67890 and poa code: 083",
"detail": "Could not find an Accredited Representative with registration number: 999999999999 and poa code: 083",
"source": {
"pointer": "/modules/claims_api/app/controllers/claims_api/v2/veterans/power_of_attorney/base_controller.rb:70:in `validate_registration_number!'"
}
Expand Down Expand Up @@ -9320,7 +9320,7 @@
},
"representative": {
"poaCode": "083",
"registrationNumber": "67890",
"registrationNumber": "999999999999",
"type": "ATTORNEY",
"address": {
"addressLine1": "123",
Expand Down Expand Up @@ -9388,7 +9388,7 @@
"application/json": {
"example": {
"data": {
"id": "f8eefcaa-020f-473e-9382-11dbd36f32ff",
"id": "3a617b31-b98c-408a-844c-9bf3eef46b10",
"type": "organization",
"attributes": {
"code": "083",
Expand Down Expand Up @@ -9596,7 +9596,7 @@
{
"title": "Resource not found",
"status": "404",
"detail": "Could not find an Accredited Representative with registration number: 67890 and poa code: 083",
"detail": "Could not find an Accredited Representative with registration number: 999999999999 and poa code: 083",
"source": {
"pointer": "/modules/claims_api/app/controllers/claims_api/v2/veterans/power_of_attorney/base_controller.rb:70:in `validate_registration_number!'"
}
Expand Down Expand Up @@ -9966,7 +9966,7 @@
},
"serviceOrganization": {
"poaCode": "083",
"registrationNumber": "67890"
"registrationNumber": "999999999999"
}
}
}
Expand Down Expand Up @@ -10215,7 +10215,7 @@
{
"title": "Resource not found",
"status": "404",
"detail": "Could not find an Accredited Representative with registration number: 67890 and poa code: 083",
"detail": "Could not find an Accredited Representative with registration number: 999999999999 and poa code: 083",
"source": {
"pointer": "/modules/claims_api/app/controllers/claims_api/v2/veterans/power_of_attorney/base_controller.rb:70:in `validate_registration_number!'"
}
Expand Down Expand Up @@ -10643,7 +10643,7 @@
},
"representative": {
"poaCode": "083",
"registrationNumber": "67890",
"registrationNumber": "999999999999",
"type": "ATTORNEY",
"address": {
"addressLine1": "123",
Expand Down Expand Up @@ -10910,7 +10910,7 @@
{
"title": "Resource not found",
"status": "404",
"detail": "Could not find an Accredited Representative with registration number: 67890 and poa code: 083",
"detail": "Could not find an Accredited Representative with registration number: 999999999999 and poa code: 083",
"source": {
"pointer": "/modules/claims_api/app/controllers/claims_api/v2/veterans/power_of_attorney/base_controller.rb:70:in `validate_registration_number!'"
}
Expand Down Expand Up @@ -11280,7 +11280,7 @@
},
"serviceOrganization": {
"poaCode": "083",
"registrationNumber": "67890"
"registrationNumber": "999999999999"
}
}
}
Expand Down Expand Up @@ -11348,11 +11348,11 @@
"application/json": {
"example": {
"data": {
"id": "c08567c4-6f1d-49bb-8416-01b91642b301",
"id": "475c01f3-1705-4639-a793-7a80074884ea",
"type": "claimsApiPowerOfAttorneys",
"attributes": {
"status": "submitted",
"dateRequestAccepted": "2024-04-23",
"dateRequestAccepted": "2024-04-24",
"representative": {
"serviceOrganization": {
"poaCode": "074"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"serviceOrganization": {
"poaCode": "aaa",
"registrationNumber": "67890"
"registrationNumber": "999999999999"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"serviceOrganization": {
"poaCode": "083",
"registrationNumber": "67890"
"registrationNumber": "999999999999"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"representative": {
"poaCode": "aaa",
"registrationNumber": "67890",
"registrationNumber": "999999999999",
"type": "ATTORNEY",
"address": {
"addressLine1": "123",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"representative": {
"poaCode": "083",
"registrationNumber": "67890",
"registrationNumber": "999999999999",
"type": "ATTORNEY",
"address": {
"addressLine1": "123",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
before do
Veteran::Service::Representative.create!(representative_id: '12345', poa_codes: [individual_poa_code],
first_name: 'Abraham', last_name: 'Lincoln')
Veteran::Service::Representative.create!(representative_id: '67890', poa_codes: [organization_poa_code],
Veteran::Service::Representative.create!(representative_id: '999999999999', poa_codes: [organization_poa_code],
first_name: 'George', last_name: 'Washington')
end

Expand Down Expand Up @@ -346,7 +346,7 @@

it 'returns a meaningful 404' do
mock_ccg(%w[claim.write claim.read]) do |auth_header|
detail = 'Could not find an Accredited Representative with registration number: 67890 ' \
detail = 'Could not find an Accredited Representative with registration number: 999999999999 ' \
'and poa code: aaa'

post validate2122a_path, params: request_body, headers: auth_header
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@

describe 'PowerOfAttorney' do
before do
Veteran::Service::Representative.create!(representative_id: '67890', poa_codes: [organization_poa_code],
Veteran::Service::Representative.create!(representative_id: '999999999999',
poa_codes: [organization_poa_code],
first_name: 'George', last_name: 'Washington')
Veteran::Service::Organization.create!(poa: organization_poa_code,
name: "#{organization_poa_code} - DISABLED AMERICAN VETERANS")
Expand All @@ -39,7 +40,7 @@
},
serviceOrganization: {
poaCode: organization_poa_code.to_s,
registrationNumber: '67890'
registrationNumber: '999999999999'
}
}
}
Expand Down Expand Up @@ -103,7 +104,8 @@

context 'multiple reps with same poa code and registration number' do
let(:rep_id) do
Veteran::Service::Representative.create!(representative_id: '67890', poa_codes: [organization_poa_code],
Veteran::Service::Representative.create!(representative_id: '999999999999',
poa_codes: [organization_poa_code],
first_name: 'George', last_name: 'Washington-test').id
end

Expand Down Expand Up @@ -181,7 +183,7 @@

it 'returns a meaningful 404' do
mock_ccg(%w[claim.write claim.read]) do |auth_header|
detail = 'Could not find an Accredited Representative with registration number: 67890 ' \
detail = 'Could not find an Accredited Representative with registration number: 999999999999 ' \
'and poa code: aaa'

post validate2122_path, params: request_body, headers: auth_header
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
expect_any_instance_of(local_bgs).to receive(:find_poa_by_participant_id).and_return(bgs_poa)
allow_any_instance_of(local_bgs).to receive(:find_poa_history_by_ptcpnt_id)
.and_return({ person_poa_history: nil })
Veteran::Service::Representative.new(representative_id: '67890',
Veteran::Service::Representative.new(representative_id: '999999999999',
poa_codes: [poa_code],
first_name: 'Firstname',
last_name: 'Lastname',
Expand Down Expand Up @@ -352,7 +352,8 @@
Veteran::Service::Organization.create!(poa: organization_poa_code,
name: "#{organization_poa_code} - DISABLED AMERICAN VETERANS",
phone: '555-555-5555')
Veteran::Service::Representative.create!(representative_id: '67890', poa_codes: [organization_poa_code],
Veteran::Service::Representative.create!(representative_id: '999999999999',
poa_codes: [organization_poa_code],
first_name: 'Firstname', last_name: 'Lastname',
phone: '555-555-5555')

Expand Down Expand Up @@ -510,7 +511,7 @@
end

before do |example|
Veteran::Service::Representative.new(representative_id: '67890',
Veteran::Service::Representative.new(representative_id: '999999999999',
poa_codes: [poa_code],
first_name: 'Firstname',
last_name: 'Lastname',
Expand Down Expand Up @@ -679,7 +680,7 @@

before do |example|
Veteran::Service::Organization.create!(poa: poa_code)
Veteran::Service::Representative.create!(representative_id: '67890', poa_codes: [poa_code],
Veteran::Service::Representative.create!(representative_id: '999999999999', poa_codes: [poa_code],
first_name: 'Firstname', last_name: 'Lastname',
phone: '555-555-5555')

Expand Down
Loading