Class: AlephApi::RestfulApiClient::Patron::CirculationActions::Loans

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

Instance Method Summary collapse

Constructor Details

#initialize(client, patron_id, loan_id = nil) ⇒ Loans

Returns a new instance of Loans.



4
5
6
7
8
# File 'lib/aleph_api/restful_api_client/patron/circulation_actions/loans.rb', line 4

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

Instance Method Details

#get(options = {}) ⇒ Object



10
11
12
# File 'lib/aleph_api/restful_api_client/patron/circulation_actions/loans.rb', line 10

def get(options = {})
  @client.http(:get, url, options).try(:body)
end

#post(options = {}) ⇒ Object



14
15
16
# File 'lib/aleph_api/restful_api_client/patron/circulation_actions/loans.rb', line 14

def post(options = {})
  @client.http(:post, url, options).try(:body)
end