Class: Exlibris::Primo::WebService::EShelf

Inherits:
WebServiceBase show all
Defined in:
lib/exlibris/primo/web_service.rb

Overview

EShelf is the base class for EShelf web services It can be extended but is not intended for use by itself Known implementations are GetEShelf, AddToEShelf, RemoveFromEShelf, GetEShelfStructure

Instance Attribute Summary

Attributes inherited from WebServiceBase

#error, #response

Instance Method Summary collapse

Methods inherited from WebServiceBase

#make_call

Constructor Details

#initialize(method_name, param_name, input_root, user_id, institution, additional_input, base_url, options, service_name = nil) ⇒ EShelf

Returns a new instance of EShelf.



150
151
152
153
154
155
156
157
158
159
160
# File 'lib/exlibris/primo/web_service.rb', line 150

def initialize(method_name, param_name, input_root, user_id, institution, additional_input, base_url, options, service_name = nil)
  input = REXML::Element.new(input_root)
  input.add_namespace("http://www.exlibris.com/primo/xsd/wsRequest")
  input.add_element(tag!("userId", user_id)) if !user_id.nil?
  input.add_element(tag!("institution", institution)) if !institution.nil?
  additional_input.each do |e|  
    input.add_element(e)
  end
  service_name = "eshelf" if service_name.nil?
  make_call(base_url, service_name, method_name, param_name, input)
end