class EgonGate::Kobra::Response

Public Class Methods

new(soap_response) click to toggle source
# File lib/egon_gate/kobra/response.rb, line 7
def initialize(soap_response)
  @soap_response = soap_response
  @egsb_string = soap_response.body[:get_data_response][:get_data_result]
end

Public Instance Methods

egsb_response() click to toggle source
# File lib/egon_gate/kobra/response.rb, line 16
def egsb_response
  @response ||= nori.parse( Base64.decode64 pure_xml[:gate_message][:body] )
end
error?() click to toggle source
# File lib/egon_gate/kobra/response.rb, line 20
def error?
  egsb_response.values.first[:odpoved_info][:status][:vysledek_kod] != "OK"
end
error_message() click to toggle source
# File lib/egon_gate/kobra/response.rb, line 24
def error_message
  egsb_response.values.first[:odpoved_info][:status][:vysledek_detail][:vysledek_sub_kod]
end
pure_xml() click to toggle source
# File lib/egon_gate/kobra/response.rb, line 12
def pure_xml
  @responsed_body ||= nori.parse(@egsb_string)
end

Private Instance Methods

nori() click to toggle source
# File lib/egon_gate/kobra/response.rb, line 30
def nori
  @soap_response.__send__(:nori)
end