Class: Skala::PrimoAdapter

Inherits:
Adapter
  • Object
show all
Defined in:
lib/skala/primo_adapter.rb

Defined Under Namespace

Classes: GetRecords, Search, SoapApi

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Adapter

#authenticate_user, #create_user_hold_request, #delete_user_hold_request, #get_record_holdable_items, #get_record_items, #get_records, #get_user, #get_user_cash, #get_user_former_loans, #get_user_hold_requests, #get_user_inter_library_loans, #get_user_loans, #get_user_transactions, #renew_user_loan, #renew_user_loans, #search, #update_user

Constructor Details

#initialize(options = {}) ⇒ PrimoAdapter

Returns a new instance of PrimoAdapter.



17
18
19
20
21
22
23
24
25
26
# File 'lib/skala/primo_adapter.rb', line 17

def initialize(options = {})
  HashWithIndifferentAccess.new(options).try do |_options|
    self.institution  = _options[:institution]
    self.languages    = _options[:languages]
    self.locations    = _options[:locations]
    self.on_campus    = _options[:on_campus]
    self.soap_api_url = _options[:soap_api_url] 
    self.timeout      = _options[:timeout]
  end
end

Instance Attribute Details

#institutionObject

Returns the value of attribute institution.



10
11
12
# File 'lib/skala/primo_adapter.rb', line 10

def institution
  @institution
end

#languagesObject

Returns the value of attribute languages.



11
12
13
# File 'lib/skala/primo_adapter.rb', line 11

def languages
  @languages
end

#locationsObject

Returns the value of attribute locations.



12
13
14
# File 'lib/skala/primo_adapter.rb', line 12

def locations
  @locations
end

#on_campusObject

Returns the value of attribute on_campus.



13
14
15
# File 'lib/skala/primo_adapter.rb', line 13

def on_campus
  @on_campus
end

#soap_api_urlObject

Returns the value of attribute soap_api_url.



14
15
16
# File 'lib/skala/primo_adapter.rb', line 14

def soap_api_url
  @soap_api_url
end

#timeoutObject

Returns the value of attribute timeout.



15
16
17
# File 'lib/skala/primo_adapter.rb', line 15

def timeout
  @timeout
end

Instance Method Details

#soap_apiObject

internal api between adapter and operations



31
32
33
# File 'lib/skala/primo_adapter.rb', line 31

def soap_api
  self.class::SoapApi.new(self)
end