Class: AlephApi::RestfulApiClient::Patron::CirculationActions::Requests

Inherits:
Object
  • Object
show all
Defined in:
lib/aleph_api/restful_api_client/patron/circulation_actions/requests.rb

Defined Under Namespace

Classes: Holds

Instance Method Summary collapse

Constructor Details

#initialize(client, patron_id) ⇒ Requests

Returns a new instance of Requests.



6
7
8
9
# File 'lib/aleph_api/restful_api_client/patron/circulation_actions/requests.rb', line 6

def initialize(client, patron_id)
  @client = client
  @patron_id = patron_id
end

Instance Method Details

#get(options = {}) ⇒ Object



11
12
13
14
15
# File 'lib/aleph_api/restful_api_client/patron/circulation_actions/requests.rb', line 11

def get(options = {})
  @client.http(:get, "/patron/#{@patron_id}/circulationActions/requests", options).try do |_response|
    _response.body
  end
end

#holds(hold_id = nil) ⇒ Object



17
18
19
# File 'lib/aleph_api/restful_api_client/patron/circulation_actions/requests.rb', line 17

def holds(hold_id = nil)
  Holds.new(@client, @patron_id, hold_id)
end