class Zapi::ZapiResponse

Attributes

raw_response[R]

Public Class Methods

new(raw_response: @raw_response = raw_response) click to toggle source
# File lib/zapi_response.rb, line 5
def initialize raw_response:
  @raw_response = raw_response
end

Public Instance Methods

_response() click to toggle source
# File lib/zapi_response.rb, line 29
def _response
  raw_hash.try(:[], 'response')
end
api_version() click to toggle source
# File lib/zapi_response.rb, line 17
def api_version
  _response.try(:[],'zapiVersion')
end
data() click to toggle source
# File lib/zapi_response.rb, line 25
def data
   _response.try(:[],'methodResponse')
end
method_name() click to toggle source
# File lib/zapi_response.rb, line 21
def method_name
  data.try(:[],'methodName')
end
raw_hash() click to toggle source
# File lib/zapi_response.rb, line 13
def raw_hash
  Hash.from_xml(raw_xml).with_indifferent_access
end
raw_xml() click to toggle source
# File lib/zapi_response.rb, line 9
def raw_xml
  raw_response.body
end