Class: Exlibris::Primo::WebService::Response::Base

Inherits:
Object
  • Object
show all
Includes:
Abstract, Namespaces, Error, Util, XmlUtil
Defined in:
lib/exlibris/primo/web_service/response/base.rb

Direct Known Subclasses

Eshelf, Reviews, Search, Tags

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from XmlUtil

included, #to_hash, #to_json, #to_xml

Methods included from Util

#return_key

Methods included from Namespaces

included

Methods included from Error

#error, #error?, #error_code, #error_message

Methods included from Abstract

included

Constructor Details

#initialize(savon_response, soap_action) ⇒ Base

Returns a new instance of Base.



16
17
18
19
20
21
22
23
24
# File 'lib/exlibris/primo/web_service/response/base.rb', line 16

def initialize savon_response, soap_action
  super
  @savon_response = savon_response
  @code = savon_response.http.code
  @body = savon_response.http.body
  @soap_action = soap_action

  @raw_xml = savon_response.body[response_key][return_key]
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



13
14
15
# File 'lib/exlibris/primo/web_service/response/base.rb', line 13

def body
  @body
end

#codeObject (readonly)

Returns the value of attribute code.



13
14
15
# File 'lib/exlibris/primo/web_service/response/base.rb', line 13

def code
  @code
end