Skip to content

API-45277 - Updates to VnpProcServiceV2 for POA request creation #21140

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

Merged
merged 13 commits into from
Mar 17, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ def initialize(veteran_participant_id, form_data, claimant_participant_id = nil)
end

def submit_request
ClaimsApi::PowerOfAttorneyRequestService::TerminateExistingRequests.new(@veteran_participant_id).call
# Disabling logic to terminate existing requests until future permanent fix for readAllVeteranRepresentatives
# ClaimsApi::PowerOfAttorneyRequestService::TerminateExistingRequests.new(@veteran_participant_id).call
ClaimsApi::PowerOfAttorneyRequestService::CreateRequest.new(@veteran_participant_id, @form_data,
@claimant_participant_id).call
end
Expand Down
11 changes: 8 additions & 3 deletions modules/claims_api/lib/bgs_service/vnp_proc_service_v2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,22 @@
module ClaimsApi
class VnpProcServiceV2 < ClaimsApi::LocalBGS
PROC_TYPE_CD = 'POAAUTHZ'
PROC_STATE = 'Complete'

def bean_name
'VnpProcWebServiceBeanV2/VnpProcServiceV2'
end

def vnp_proc_create
current_date = Time.current.iso8601
body = Nokogiri::XML::DocumentFragment.parse <<~EOXML
<arg0>
<VnpProcDTO>
<vnpProcTypeCd>#{PROC_TYPE_CD}</vnpProcTypeCd>
</VnpProcDTO>
<vnpProcId>0</vnpProcId>
<vnpProcTypeCd>#{PROC_TYPE_CD}</vnpProcTypeCd>
<vnpProcStateTypeCd>#{PROC_STATE}</vnpProcStateTypeCd>
<creatdDt>#{current_date}</creatdDt>
<lastModifdDt>#{current_date}</lastModifdDt>
<submtdDt>#{current_date}</submtdDt>
</arg0>
EOXML

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
it 'responds with a vnp_proc_id' do
VCR.use_cassette('claims_api/bgs/vnp_proc_service_v2/vnp_proc_create') do
result = subject.vnp_proc_create
expect(result[:vnp_proc_id]).to eq '29637'
expect(result[:vnp_proc_id]).to eq '3860194'
end
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@
}
end

describe '#submit_request' do
# Noting that the call to TerminateExistingRequests was commented-out in orchestrator.rb until a future permanent
# fix for readAllVeteranRepresentatives is implemented. The following two tests will fail until the commented-out
# call is restored.
describe '#submit_request', skip: 'Skipping tests broken by TerminateExistingRequests commenting' do
it 'terminates the existing requests' do
file_name = 'claims_api/power_of_attorney_request_service/orchestrator/happy_path'
VCR.use_cassette(file_name) do
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading