Method: Nps::SoapClient#soap_call

Defined in:
lib/nps/soap_client.rb

#soap_call(service, params) ⇒ Object



118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# File 'lib/nps/soap_client.rb', line 118

def soap_call(service, params)
  params = add_extra_data(params, service)
  if @sanitize
    params = Nps::Utils::sanitize(params)
  end
  unless params.has_key? 'psp_ClientSession'
    params = add_secure_hash(params)
  end 
  params = {"Requerimiento" => params}
  begin
    @client.call(service, message: params).body
  rescue TimeoutError
    raise ApiException
  end
end