From 1f5158d3c0e2b0807885cf4313f9806dd6c69a12 Mon Sep 17 00:00:00 2001 From: Patrick Brown Date: Tue, 7 Jan 2025 13:28:52 -0500 Subject: [PATCH] adjusting_serializer_to_match_new_front_end_data - modularized responses --- .../v0/power_of_attorney_requests_spec.rb | 18 +- .../v0/support/poa_requests_responses.rb | 813 +++++++++--------- 2 files changed, 415 insertions(+), 416 deletions(-) diff --git a/modules/accredited_representative_portal/spec/requests/accredited_representative_portal/v0/power_of_attorney_requests_spec.rb b/modules/accredited_representative_portal/spec/requests/accredited_representative_portal/v0/power_of_attorney_requests_spec.rb index eede7ddfa20..e43cf277044 100644 --- a/modules/accredited_representative_portal/spec/requests/accredited_representative_portal/v0/power_of_attorney_requests_spec.rb +++ b/modules/accredited_representative_portal/spec/requests/accredited_representative_portal/v0/power_of_attorney_requests_spec.rb @@ -38,7 +38,7 @@ expect(parsed_response).to eq( [ - PoaRequestResponses.poa_response0(poa_requests, time, expires_at) + PoaRequestResponses.pending_poa_response(poa_requests[0], time, expires_at) ] ) end @@ -53,8 +53,8 @@ expect(parsed_response).to eq( [ - PoaRequestResponses.poa_response_2_with_extra_day(poa_requests, time, time_plus_one_day), - PoaRequestResponses.poa_response1(poa_requests, time) + PoaRequestResponses.veteran_poa_response_with_extra_day(poa_requests[2], time, time_plus_one_day), + PoaRequestResponses.accepted_poa_response(poa_requests[1], time) ] ) end @@ -73,8 +73,8 @@ expect(parsed_response).to eq( [ - PoaRequestResponses.poa_response_2_with_extra_day(poa_requests, time, time_plus_one_day), - PoaRequestResponses.poa_response_1_with_resolution_extra_day(poa_requests, time, time_plus_one_day) + PoaRequestResponses.veteran_poa_response_with_extra_day(poa_requests[2], time, time_plus_one_day), + PoaRequestResponses.poa_response_with_resolution_extra_day(poa_requests[1], time, time_plus_one_day) ] ) end @@ -93,8 +93,8 @@ expect(parsed_response).to eq( [ - PoaRequestResponses.poa_response_2_with_both_extra_day(poa_requests, time_plus_one_day), - PoaRequestResponses.poa_response1(poa_requests, time) + PoaRequestResponses.veteran_poa_response_with_both_extra_day(poa_requests[2], time_plus_one_day), + PoaRequestResponses.accepted_poa_response(poa_requests[1], time) ] ) end @@ -113,7 +113,7 @@ expect(parsed_response).to eq( [ - PoaRequestResponses.poa_response_1_with_resolution_extra_day(poa_requests, time, time_plus_one_day) + PoaRequestResponses.poa_response_with_resolution_extra_day(poa_requests[1], time, time_plus_one_day) ] ) end @@ -145,7 +145,7 @@ expect(response).to have_http_status(:ok) expect(parsed_response).to eq( - PoaRequestResponses.singular_poa_response(poa_request, time) + PoaRequestResponses.declined_poa_response(poa_request, time) ) end end diff --git a/modules/accredited_representative_portal/spec/requests/accredited_representative_portal/v0/support/poa_requests_responses.rb b/modules/accredited_representative_portal/spec/requests/accredited_representative_portal/v0/support/poa_requests_responses.rb index 94891a0e52e..191d3aef017 100644 --- a/modules/accredited_representative_portal/spec/requests/accredited_representative_portal/v0/support/poa_requests_responses.rb +++ b/modules/accredited_representative_portal/spec/requests/accredited_representative_portal/v0/support/poa_requests_responses.rb @@ -2,436 +2,435 @@ # rubocop:disable Metrics/ModuleLength module PoaRequestResponses - # rubocop:disable Metrics/MethodLength - def self.poa_response0(poa_requests, time, expires_at) - { - 'id' => poa_requests[0].id, - 'claimant_id' => poa_requests[0].claimant_id, - 'created_at' => time, - 'expires_at' => expires_at, - 'power_of_attorney_form' => { - 'authorizations' => { - 'record_disclosure' => true, - 'record_disclosure_limitations' => [], - 'address_change' => true + # rubocop:disable Metrics/MethodLength + def self.pending_poa_response(poa_request, time, expires_at) + { + 'id' => poa_request.id, + 'claimant_id' => poa_request.claimant_id, + 'created_at' => time, + 'expires_at' => expires_at, + 'power_of_attorney_form' => { + 'authorizations' => { + 'record_disclosure' => true, + 'record_disclosure_limitations' => [], + 'address_change' => true + }, + 'claimant' => { + 'name' => { + 'first' => 'John', + 'middle' => 'Middle', + 'last' => 'Doe' }, - 'claimant' => { - 'name' => { - 'first' => 'John', - 'middle' => 'Middle', - 'last' => 'Doe' - }, - 'address' => { - 'address_line1' => '123 Main St', - 'address_line2' => 'Apt 1', - 'city' => 'Springfield', - 'state_code' => 'IL', - 'country' => 'US', - 'zip_code' => '62704', - 'zip_code_suffix' => '6789' - }, - 'date_of_birth' => '1980-12-31', - 'relationship' => 'Spouse', - 'phone' => '1234567890', - 'email' => 'veteran@example.com' + 'address' => { + 'address_line1' => '123 Main St', + 'address_line2' => 'Apt 1', + 'city' => 'Springfield', + 'state_code' => 'IL', + 'country' => 'US', + 'zip_code' => '62704', + 'zip_code_suffix' => '6789' }, - 'veteran' => { - 'name' => { - 'first' => 'John', - 'middle' => 'Middle', - 'last' => 'Doe' - }, - 'address' => { - 'address_line1' => '123 Main St', - 'address_line2' => 'Apt 1', - 'city' => 'Springfield', - 'state_code' => 'IL', - 'country' => 'US', - 'zip_code' => '62704', - 'zip_code_suffix' => '6789' - }, - 'ssn' => '123456789', - 'va_file_number' => '123456789', - 'date_of_birth' => '1980-12-31', - 'service_number' => '123456789', - 'service_branch' => 'ARMY', - 'phone' => '1234567890', - 'email' => 'veteran@example.com' - } - }, - 'power_of_attorney_holder' => { - 'id' => poa_requests[0].power_of_attorney_holder.id, - 'type' => 'veteran_service_organization', - 'name' => poa_requests[0].power_of_attorney_holder.name - }, - 'accredited_individual' => { - 'id' => poa_requests[0].accredited_individual.id, - 'full_name' => [ - poa_requests[0].accredited_individual.first_name, - poa_requests[0].accredited_individual.last_name - ].join(' ') + 'date_of_birth' => '1980-12-31', + 'relationship' => 'Spouse', + 'phone' => '1234567890', + 'email' => 'veteran@example.com' }, - 'resolution' => nil - } - end - - def self.poa_response1(poa_requests, time) - { - 'id' => poa_requests[1].id, - 'claimant_id' => poa_requests[1].claimant_id, - 'created_at' => time, - 'expires_at' => nil, - 'power_of_attorney_form' => { - 'authorizations' => { - 'record_disclosure' => true, - 'record_disclosure_limitations' => [], - 'address_change' => true + 'veteran' => { + 'name' => { + 'first' => 'John', + 'middle' => 'Middle', + 'last' => 'Doe' }, - 'claimant' => { - 'name' => { - 'first' => 'John', - 'middle' => 'Middle', - 'last' => 'Doe' - }, - 'address' => { - 'address_line1' => '123 Main St', - 'address_line2' => 'Apt 1', - 'city' => 'Springfield', - 'state_code' => 'IL', - 'country' => 'US', - 'zip_code' => '62704', - 'zip_code_suffix' => '6789' - }, - 'date_of_birth' => '1980-12-31', - 'relationship' => 'Spouse', - 'phone' => '1234567890', - 'email' => 'veteran@example.com' + 'address' => { + 'address_line1' => '123 Main St', + 'address_line2' => 'Apt 1', + 'city' => 'Springfield', + 'state_code' => 'IL', + 'country' => 'US', + 'zip_code' => '62704', + 'zip_code_suffix' => '6789' }, - 'veteran' => { - 'name' => { - 'first' => 'John', - 'middle' => 'Middle', - 'last' => 'Doe' - }, - 'address' => { - 'address_line1' => '123 Main St', - 'address_line2' => 'Apt 1', - 'city' => 'Springfield', - 'state_code' => 'IL', - 'country' => 'US', - 'zip_code' => '62704', - 'zip_code_suffix' => '6789' - }, - 'ssn' => '123456789', - 'va_file_number' => '123456789', - 'date_of_birth' => '1980-12-31', - 'service_number' => '123456789', - 'service_branch' => 'ARMY', - 'phone' => '1234567890', - 'email' => 'veteran@example.com' - } - }, - 'power_of_attorney_holder' => { - 'id' => poa_requests[1].power_of_attorney_holder.id, - 'type' => 'veteran_service_organization', - 'name' => poa_requests[1].power_of_attorney_holder.name + 'ssn' => '123456789', + 'va_file_number' => '123456789', + 'date_of_birth' => '1980-12-31', + 'service_number' => '123456789', + 'service_branch' => 'ARMY', + 'phone' => '1234567890', + 'email' => 'veteran@example.com' + } + }, + 'power_of_attorney_holder' => { + 'id' => poa_request.power_of_attorney_holder.id, + 'type' => 'veteran_service_organization', + 'name' => poa_request.power_of_attorney_holder.name + }, + 'accredited_individual' => { + 'id' => poa_request.accredited_individual.id, + 'full_name' => [ + poa_request.accredited_individual.first_name, + poa_request.accredited_individual.last_name + ].join(' ') + }, + 'resolution' => nil + } + end + + def self.poa_response_with_resolution_extra_day(poa_request, time, time_plus_one_day) + { + 'id' => poa_request.id, + 'claimant_id' => poa_request.claimant_id, + 'created_at' => time, + 'expires_at' => nil, + 'power_of_attorney_form' => { + 'authorizations' => { + 'record_disclosure' => true, + 'record_disclosure_limitations' => [], + 'address_change' => true }, - 'accredited_individual' => { - 'id' => poa_requests[1].accredited_individual.id, - 'full_name' => [ - poa_requests[1].accredited_individual.first_name, - poa_requests[1].accredited_individual.last_name - ].join(' ') + 'claimant' => { + 'name' => { + 'first' => 'John', + 'middle' => 'Middle', + 'last' => 'Doe' + }, + 'address' => { + 'address_line1' => '123 Main St', + 'address_line2' => 'Apt 1', + 'city' => 'Springfield', + 'state_code' => 'IL', + 'country' => 'US', + 'zip_code' => '62704', + 'zip_code_suffix' => '6789' + }, + 'date_of_birth' => '1980-12-31', + 'relationship' => 'Spouse', + 'phone' => '1234567890', + 'email' => 'veteran@example.com' }, - 'resolution' => { - 'id' => poa_requests[1].resolution.id, - 'type' => 'decision', - 'created_at' => time, - 'creator_id' => poa_requests[1].resolution.resolving.creator_id, - 'decision_type' => 'acceptance' + 'veteran' => { + 'name' => { + 'first' => 'John', + 'middle' => 'Middle', + 'last' => 'Doe' + }, + 'address' => { + 'address_line1' => '123 Main St', + 'address_line2' => 'Apt 1', + 'city' => 'Springfield', + 'state_code' => 'IL', + 'country' => 'US', + 'zip_code' => '62704', + 'zip_code_suffix' => '6789' + }, + 'ssn' => '123456789', + 'va_file_number' => '123456789', + 'date_of_birth' => '1980-12-31', + 'service_number' => '123456789', + 'service_branch' => 'ARMY', + 'phone' => '1234567890', + 'email' => 'veteran@example.com' } + }, + 'power_of_attorney_holder' => { + 'id' => poa_request.power_of_attorney_holder.id, + 'type' => 'veteran_service_organization', + 'name' => poa_request.power_of_attorney_holder.name + }, + 'accredited_individual' => { + 'id' => poa_request.accredited_individual.id, + 'full_name' => [ + poa_request.accredited_individual.first_name, + poa_request.accredited_individual.last_name + ].join(' ') + }, + 'resolution' => { + 'id' => poa_request.resolution.id, + 'type' => 'decision', + 'created_at' => time_plus_one_day, + 'creator_id' => poa_request.resolution.resolving.creator_id, + 'decision_type' => 'acceptance' } - end - - def self.poa_response_1_with_resolution_extra_day(poa_requests, time, time_plus_one_day) - { - 'id' => poa_requests[1].id, - 'claimant_id' => poa_requests[1].claimant_id, - 'created_at' => time, - 'expires_at' => nil, - 'power_of_attorney_form' => { - 'authorizations' => { - 'record_disclosure' => true, - 'record_disclosure_limitations' => [], - 'address_change' => true + } + end + + def self.veteran_poa_response_with_extra_day(poa_request, time, time_plus_one_day) + { + 'id' => poa_request.id, + 'claimant_id' => poa_request.claimant_id, + 'created_at' => time_plus_one_day, + 'expires_at' => nil, + 'power_of_attorney_form' => { + 'authorizations' => { + 'record_disclosure' => true, + 'record_disclosure_limitations' => %w[ + HIV + DRUG_ABUSE + ], + 'address_change' => true + }, + 'claimant' => { + 'name' => { + 'first' => 'John', + 'middle' => 'Middle', + 'last' => 'Doe' }, - 'claimant' => { - 'name' => { - 'first' => 'John', - 'middle' => 'Middle', - 'last' => 'Doe' - }, - 'address' => { - 'address_line1' => '123 Main St', - 'address_line2' => 'Apt 1', - 'city' => 'Springfield', - 'state_code' => 'IL', - 'country' => 'US', - 'zip_code' => '62704', - 'zip_code_suffix' => '6789' - }, - 'date_of_birth' => '1980-12-31', - 'relationship' => 'Spouse', - 'phone' => '1234567890', - 'email' => 'veteran@example.com' + 'address' => { + 'address_line1' => '123 Main St', + 'address_line2' => 'Apt 1', + 'city' => 'Springfield', + 'state_code' => 'IL', + 'country' => 'US', + 'zip_code' => '62704', + 'zip_code_suffix' => '6789' }, - 'veteran' => { - 'name' => { - 'first' => 'John', - 'middle' => 'Middle', - 'last' => 'Doe' - }, - 'address' => { - 'address_line1' => '123 Main St', - 'address_line2' => 'Apt 1', - 'city' => 'Springfield', - 'state_code' => 'IL', - 'country' => 'US', - 'zip_code' => '62704', - 'zip_code_suffix' => '6789' - }, - 'ssn' => '123456789', - 'va_file_number' => '123456789', - 'date_of_birth' => '1980-12-31', - 'service_number' => '123456789', - 'service_branch' => 'ARMY', - 'phone' => '1234567890', - 'email' => 'veteran@example.com' - } - }, - 'power_of_attorney_holder' => { - 'id' => poa_requests[1].power_of_attorney_holder.id, - 'type' => 'veteran_service_organization', - 'name' => poa_requests[1].power_of_attorney_holder.name - }, - 'accredited_individual' => { - 'id' => poa_requests[1].accredited_individual.id, - 'full_name' => [ - poa_requests[1].accredited_individual.first_name, - poa_requests[1].accredited_individual.last_name - ].join(' ') - }, - 'resolution' => { - 'id' => poa_requests[1].resolution.id, - 'type' => 'decision', - 'created_at' => time_plus_one_day, - 'creator_id' => poa_requests[1].resolution.resolving.creator_id, - 'decision_type' => 'acceptance' + 'ssn' => '123456789', + 'va_file_number' => '123456789', + 'date_of_birth' => '1980-12-31', + 'service_number' => '123456789', + 'service_branch' => 'ARMY', + 'phone' => '1234567890', + 'email' => 'veteran@example.com' } + }, + 'power_of_attorney_holder' => { + 'id' => poa_request.power_of_attorney_holder.id, + 'type' => 'veteran_service_organization', + 'name' => poa_request.power_of_attorney_holder.name + }, + 'accredited_individual' => { + 'id' => poa_request.accredited_individual.id, + 'full_name' => [ + poa_request.accredited_individual.first_name, + poa_request.accredited_individual.last_name + ].join(' ') + }, + 'resolution' => { + 'id' => poa_request.resolution.id, + 'type' => 'decision', + 'created_at' => time, + 'creator_id' => poa_request.resolution.resolving.creator_id, + 'decision_type' => 'acceptance' } - end - - def self.poa_response_2_with_extra_day(poa_requests, time, time_plus_one_day) - { - 'id' => poa_requests[2].id, - 'claimant_id' => poa_requests[2].claimant_id, - 'created_at' => time_plus_one_day, - 'expires_at' => nil, - 'power_of_attorney_form' => { - 'authorizations' => { - 'record_disclosure' => true, - 'record_disclosure_limitations' => %w[ - HIV - DRUG_ABUSE - ], - 'address_change' => true - }, - 'claimant' => { - 'name' => { - 'first' => 'John', - 'middle' => 'Middle', - 'last' => 'Doe' - }, - 'address' => { - 'address_line1' => '123 Main St', - 'address_line2' => 'Apt 1', - 'city' => 'Springfield', - 'state_code' => 'IL', - 'country' => 'US', - 'zip_code' => '62704', - 'zip_code_suffix' => '6789' - }, - 'ssn' => '123456789', - 'va_file_number' => '123456789', - 'date_of_birth' => '1980-12-31', - 'service_number' => '123456789', - 'service_branch' => 'ARMY', - 'phone' => '1234567890', - 'email' => 'veteran@example.com' - } - }, - 'power_of_attorney_holder' => { - 'id' => poa_requests[2].power_of_attorney_holder.id, - 'type' => 'veteran_service_organization', - 'name' => poa_requests[2].power_of_attorney_holder.name - }, - 'accredited_individual' => { - 'id' => poa_requests[2].accredited_individual.id, - 'full_name' => [ - poa_requests[2].accredited_individual.first_name, - poa_requests[2].accredited_individual.last_name - ].join(' ') + } + end + + def self.veteran_poa_response_with_both_extra_day(poa_request, time_plus_one_day) + { + 'id' => poa_request.id, + 'claimant_id' => poa_request.claimant_id, + 'created_at' => time_plus_one_day, + 'expires_at' => nil, + 'power_of_attorney_form' => { + 'authorizations' => { + 'record_disclosure' => true, + 'record_disclosure_limitations' => %w[ + HIV + DRUG_ABUSE + ], + 'address_change' => true }, - 'resolution' => { - 'id' => poa_requests[2].resolution.id, - 'type' => 'decision', - 'created_at' => time, - 'creator_id' => poa_requests[2].resolution.resolving.creator_id, - 'decision_type' => 'acceptance' + 'claimant' => { + 'name' => { + 'first' => 'John', + 'middle' => 'Middle', + 'last' => 'Doe' + }, + 'address' => { + 'address_line1' => '123 Main St', + 'address_line2' => 'Apt 1', + 'city' => 'Springfield', + 'state_code' => 'IL', + 'country' => 'US', + 'zip_code' => '62704', + 'zip_code_suffix' => '6789' + }, + 'ssn' => '123456789', + 'va_file_number' => '123456789', + 'date_of_birth' => '1980-12-31', + 'service_number' => '123456789', + 'service_branch' => 'ARMY', + 'phone' => '1234567890', + 'email' => 'veteran@example.com' } - } - end - - def self.poa_response_2_with_both_extra_day(poa_requests, time_plus_one_day) - { - 'id' => poa_requests[2].id, - 'claimant_id' => poa_requests[2].claimant_id, + }, + 'power_of_attorney_holder' => { + 'id' => poa_request.power_of_attorney_holder.id, + 'type' => 'veteran_service_organization', + 'name' => poa_request.power_of_attorney_holder.name + }, + 'accredited_individual' => { + 'id' => poa_request.accredited_individual.id, + 'full_name' => [ + poa_request.accredited_individual.first_name, + poa_request.accredited_individual.last_name + ].join(' ') + }, + 'resolution' => { + 'id' => poa_request.resolution.id, + 'type' => 'decision', 'created_at' => time_plus_one_day, - 'expires_at' => nil, - 'power_of_attorney_form' => { - 'authorizations' => { - 'record_disclosure' => true, - 'record_disclosure_limitations' => %w[ - HIV - DRUG_ABUSE - ], - 'address_change' => true - }, - 'claimant' => { - 'name' => { - 'first' => 'John', - 'middle' => 'Middle', - 'last' => 'Doe' - }, - 'address' => { - 'address_line1' => '123 Main St', - 'address_line2' => 'Apt 1', - 'city' => 'Springfield', - 'state_code' => 'IL', - 'country' => 'US', - 'zip_code' => '62704', - 'zip_code_suffix' => '6789' - }, - 'ssn' => '123456789', - 'va_file_number' => '123456789', - 'date_of_birth' => '1980-12-31', - 'service_number' => '123456789', - 'service_branch' => 'ARMY', - 'phone' => '1234567890', - 'email' => 'veteran@example.com' - } - }, - 'power_of_attorney_holder' => { - 'id' => poa_requests[2].power_of_attorney_holder.id, - 'type' => 'veteran_service_organization', - 'name' => poa_requests[2].power_of_attorney_holder.name + 'creator_id' => poa_request.resolution.resolving.creator_id, + 'decision_type' => 'acceptance' + } + } + end + + def self.accepted_poa_response(poa_request, time) + { + 'id' => poa_request.id, + 'claimant_id' => poa_request.claimant_id, + 'created_at' => time, + 'expires_at' => nil, + 'power_of_attorney_form' => { + 'authorizations' => { + 'record_disclosure' => true, + 'record_disclosure_limitations' => [], + 'address_change' => true }, - 'accredited_individual' => { - 'id' => poa_requests[2].accredited_individual.id, - 'full_name' => [ - poa_requests[2].accredited_individual.first_name, - poa_requests[2].accredited_individual.last_name - ].join(' ') + 'claimant' => { + 'name' => { + 'first' => 'John', + 'middle' => 'Middle', + 'last' => 'Doe' + }, + 'address' => { + 'address_line1' => '123 Main St', + 'address_line2' => 'Apt 1', + 'city' => 'Springfield', + 'state_code' => 'IL', + 'country' => 'US', + 'zip_code' => '62704', + 'zip_code_suffix' => '6789' + }, + 'date_of_birth' => '1980-12-31', + 'relationship' => 'Spouse', + 'phone' => '1234567890', + 'email' => 'veteran@example.com' }, - 'resolution' => { - 'id' => poa_requests[2].resolution.id, - 'type' => 'decision', - 'created_at' => time_plus_one_day, - 'creator_id' => poa_requests[2].resolution.resolving.creator_id, - 'decision_type' => 'acceptance' + 'veteran' => { + 'name' => { + 'first' => 'John', + 'middle' => 'Middle', + 'last' => 'Doe' + }, + 'address' => { + 'address_line1' => '123 Main St', + 'address_line2' => 'Apt 1', + 'city' => 'Springfield', + 'state_code' => 'IL', + 'country' => 'US', + 'zip_code' => '62704', + 'zip_code_suffix' => '6789' + }, + 'ssn' => '123456789', + 'va_file_number' => '123456789', + 'date_of_birth' => '1980-12-31', + 'service_number' => '123456789', + 'service_branch' => 'ARMY', + 'phone' => '1234567890', + 'email' => 'veteran@example.com' } - } - end - - def self.singular_poa_response(poa_request, time) - { - 'id' => poa_request.id, - 'claimant_id' => poa_request.claimant_id, + }, + 'power_of_attorney_holder' => { + 'id' => poa_request.power_of_attorney_holder.id, + 'type' => 'veteran_service_organization', + 'name' => poa_request.power_of_attorney_holder.name + }, + 'accredited_individual' => { + 'id' => poa_request.accredited_individual.id, + 'full_name' => [ + poa_request.accredited_individual.first_name, + poa_request.accredited_individual.last_name + ].join(' ') + }, + 'resolution' => { + 'id' => poa_request.resolution.id, + 'type' => 'decision', 'created_at' => time, - 'expires_at' => nil, - 'power_of_attorney_form' => { - 'authorizations' => { - 'record_disclosure' => true, - 'record_disclosure_limitations' => [], - 'address_change' => true + 'creator_id' => poa_request.resolution.resolving.creator_id, + 'decision_type' => 'acceptance' + } + } + end + + def self.declined_poa_response(poa_request, time) + { + 'id' => poa_request.id, + 'claimant_id' => poa_request.claimant_id, + 'created_at' => time, + 'expires_at' => nil, + 'power_of_attorney_form' => { + 'authorizations' => { + 'record_disclosure' => true, + 'record_disclosure_limitations' => [], + 'address_change' => true + }, + 'claimant' => { + 'name' => { + 'first' => 'John', + 'middle' => 'Middle', + 'last' => 'Doe' }, - 'claimant' => { - 'name' => { - 'first' => 'John', - 'middle' => 'Middle', - 'last' => 'Doe' - }, - 'address' => { - 'address_line1' => '123 Main St', - 'address_line2' => 'Apt 1', - 'city' => 'Springfield', - 'state_code' => 'IL', - 'country' => 'US', - 'zip_code' => '62704', - 'zip_code_suffix' => '6789' - }, - 'date_of_birth' => '1980-12-31', - 'relationship' => 'Spouse', - 'phone' => '1234567890', - 'email' => 'veteran@example.com' + 'address' => { + 'address_line1' => '123 Main St', + 'address_line2' => 'Apt 1', + 'city' => 'Springfield', + 'state_code' => 'IL', + 'country' => 'US', + 'zip_code' => '62704', + 'zip_code_suffix' => '6789' }, - 'veteran' => { - 'name' => { - 'first' => 'John', - 'middle' => 'Middle', - 'last' => 'Doe' - }, - 'address' => { - 'address_line1' => '123 Main St', - 'address_line2' => 'Apt 1', - 'city' => 'Springfield', - 'state_code' => 'IL', - 'country' => 'US', - 'zip_code' => '62704', - 'zip_code_suffix' => '6789' - }, - 'ssn' => '123456789', - 'va_file_number' => '123456789', - 'date_of_birth' => '1980-12-31', - 'service_number' => '123456789', - 'service_branch' => 'ARMY', - 'phone' => '1234567890', - 'email' => 'veteran@example.com' - } - }, - 'resolution' => { - 'id' => poa_request.resolution.id, - 'type' => 'decision', - 'created_at' => time, - 'creator_id' => poa_request.resolution.resolving.creator_id, - 'reason' => 'Didn\'t authorize treatment record disclosure', - 'decision_type' => 'declination' - }, - 'power_of_attorney_holder' => { - 'id' => poa_request.power_of_attorney_holder.id, - 'type' => 'veteran_service_organization', - 'name' => poa_request.power_of_attorney_holder.name + 'date_of_birth' => '1980-12-31', + 'relationship' => 'Spouse', + 'phone' => '1234567890', + 'email' => 'veteran@example.com' }, - 'accredited_individual' => { - 'id' => poa_request.accredited_individual.id, - 'full_name' => [ - poa_request.accredited_individual.first_name, - poa_request.accredited_individual.last_name - ].join(' ') + 'veteran' => { + 'name' => { + 'first' => 'John', + 'middle' => 'Middle', + 'last' => 'Doe' + }, + 'address' => { + 'address_line1' => '123 Main St', + 'address_line2' => 'Apt 1', + 'city' => 'Springfield', + 'state_code' => 'IL', + 'country' => 'US', + 'zip_code' => '62704', + 'zip_code_suffix' => '6789' + }, + 'ssn' => '123456789', + 'va_file_number' => '123456789', + 'date_of_birth' => '1980-12-31', + 'service_number' => '123456789', + 'service_branch' => 'ARMY', + 'phone' => '1234567890', + 'email' => 'veteran@example.com' } + }, + 'resolution' => { + 'id' => poa_request.resolution.id, + 'type' => 'decision', + 'created_at' => time, + 'creator_id' => poa_request.resolution.resolving.creator_id, + 'reason' => 'Didn\'t authorize treatment record disclosure', + 'decision_type' => 'declination' + }, + 'power_of_attorney_holder' => { + 'id' => poa_request.power_of_attorney_holder.id, + 'type' => 'veteran_service_organization', + 'name' => poa_request.power_of_attorney_holder.name + }, + 'accredited_individual' => { + 'id' => poa_request.accredited_individual.id, + 'full_name' => [ + poa_request.accredited_individual.first_name, + poa_request.accredited_individual.last_name + ].join(' ') } - end - # rubocop:enable Metrics/MethodLength + } end - # rubocop:enable Metrics/ModuleLength - \ No newline at end of file + # rubocop:enable Metrics/MethodLength +end +# rubocop:enable Metrics/ModuleLength