-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add vnp_proc_create to bgs local (#16057)
- Loading branch information
Showing
3 changed files
with
283 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# frozen_string_literal: true | ||
|
||
module ClaimsApi | ||
class VnpProcServiceV2 < ClaimsApi::LocalBGS | ||
PROC_TYPE_CD = 'POAAUTHZ' | ||
|
||
def vnp_proc_create | ||
body = Nokogiri::XML::DocumentFragment.parse <<~EOXML | ||
<arg0> | ||
<VnpProcDTO> | ||
<vnpProcTypeCd>#{PROC_TYPE_CD}</vnpProcTypeCd> | ||
</VnpProcDTO> | ||
</arg0> | ||
EOXML | ||
|
||
make_request(endpoint: 'VnpProcWebServiceBeanV2/VnpProcServiceV2', action: 'vnpProcCreate', body:, key: 'return') | ||
end | ||
end | ||
end |
17 changes: 17 additions & 0 deletions
17
modules/claims_api/spec/lib/claims_api/vnp_proc_service_v2_spec.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'rails_helper' | ||
require 'bgs_service/vnp_proc_service_v2' | ||
|
||
describe ClaimsApi::VnpProcServiceV2 do | ||
subject { described_class.new external_uid: 'xUid', external_key: 'xKey' } | ||
|
||
describe 'vnp_proc_create' do | ||
it 'responds with a vnp_proc_id' do | ||
VCR.use_cassette('bgs/vnp_proc_service_v2/vnp_proc_create') do | ||
result = subject.vnp_proc_create | ||
expect(result[:vnp_proc_id]).to eq '29637' | ||
end | ||
end | ||
end | ||
end |
247 changes: 247 additions & 0 deletions
247
spec/support/vcr_cassettes/bgs/vnp_proc_service_v2/vnp_proc_create.yml
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.