Skip to content

Commit

Permalink
Removes comments, extra method. Fixes cassestte
Browse files Browse the repository at this point in the history
  • Loading branch information
stiehlrod committed Mar 26, 2024
1 parent 7d1f80e commit af8518f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
7 changes: 0 additions & 7 deletions modules/claims_api/lib/bgs_service/local_bgs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -337,11 +337,4 @@ def to_camelcase(claim:)
claim.deep_transform_keys { |k| k.to_s.camelize(:lower) }
end
end

def validate_required_keys(required_keys, provided_hash, call)
required_keys.each do |key|
raise(ArgumentError, "#{key} is a required key in #{call}") unless provided_hash.key?(key)
raise(ArgumentError, "#{key} cannot be empty or nil") if provided_hash[key].blank?
end
end
end
4 changes: 1 addition & 3 deletions modules/claims_api/lib/bgs_service/vnp_ptcpnt_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ module ClaimsApi
class VnpPtcpntService < ClaimsApi::LocalBGS
# vnpPtcpntCreate - This service is used to create VONAPP participant information
def vnp_ptcpnt_create(options)
# validate_required_keys(vnp_ptcpnt_create_required_keys, options, __method__.to_s)
convert_nil_values(options)
# ptcpnt_clmant_id = options[:vnp_ptcpnt_id].present? ? options[:vnpPtcpntId] : xsi:nil="true"
body = Nokogiri::XML::DocumentFragment.parse <<~EOXML
# {arg_strg}
EOXML
Expand All @@ -20,7 +18,7 @@ def vnp_ptcpnt_create(options)
def convert_nil_values(options)
arg_strg = '<arg0>'
options.each do |option|
arg = option[0].to_s.camelize(:lower) # option[0].to_s.titleize(keep_id_suffix: true).gsub(/\s+/, '')
arg = option[0].to_s.camelize(:lower)
arg_strg += (option[1].nil? ? "<#{arg} xsi:nil=true/>" : "<#{arg}>#{option[1]}</#{arg}>")
end
arg_strg += '</arg0>'
Expand Down

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

0 comments on commit af8518f

Please sign in to comment.