Skip to content

Commit

Permalink
Updates to take in options as the params for create_veteran_represent…
Browse files Browse the repository at this point in the history
…ative
  • Loading branch information
rockwellwindsor-va committed Apr 16, 2024
1 parent b534b49 commit 6175903
Showing 1 changed file with 3 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,11 @@

module ClaimsApi
class VeteranRepresentativeService < ClaimsApi::LocalBGS
# rubocop:disable Metrics/MethodLength
def create_veteran_representative(ptcpnt_id:, proc_id:, form_type:, poa_code:)
def create_veteran_representative(options)
injected = convert_nil_values(options)
body = Nokogiri::XML::DocumentFragment.parse <<~EOXML
<data:VeteranRepresentative>
<procId>#{proc_id}</procId>
<formTypeCode>#{form_type}</formTypeCode>
<poaCode>#{poa_code}</poa_code>
<section7332Auth>false</section7332Auth>
<limitationDrugAbuse>false</limitationDrugAbuse>
<limitationAlcohol>false</limitationAlcohol>
<limitationHIV>false</limitationHIV>
<limitationSCA>false</limitationSCA>
<vdcStatus>This</vdcStatus>
<representativeType></representativeType>
<changeAddressAuth>false</changeAddressAuth>
<veteranPtcpntId>#{ptcpnt_id}</veteranPtcpntId>
#{injected}
</data:VeteranRepresentative>
EOXML

Expand All @@ -28,6 +17,5 @@ def create_veteran_representative(ptcpnt_id:, proc_id:, form_type:, poa_code:)
key: 'VeteranRepresentative'
)
end
# rubocop:enable Metrics/MethodLength
end
end

0 comments on commit 6175903

Please sign in to comment.