Class: Exlibris::Aleph::API::Reader::Patron::Record::Item

Inherits:
Base
  • Object
show all
Defined in:
lib/exlibris/aleph/api/reader/patron/record/item.rb,
lib/exlibris/aleph/api/reader/patron/record/item/hold.rb,
lib/exlibris/aleph/api/reader/patron/record/item/create_hold.rb

Defined Under Namespace

Classes: CreateHold, Hold

Instance Attribute Summary collapse

Attributes inherited from Base

#root

Instance Method Summary collapse

Constructor Details

#initialize(root) ⇒ Item

Returns a new instance of Item.



12
13
14
15
16
17
18
# File 'lib/exlibris/aleph/api/reader/patron/record/item.rb', line 12

def initialize(root)
  super(root)
  @hold_request = privilege_for_type('HoldRequest')
  @short_loan = privilege_for_type('ShortLoan')
  @photocopy_request = privilege_for_type('PhotocopyRequest')
  @booking_request = privilege_for_type('BookingRequest')
end

Instance Attribute Details

#booking_requestObject (readonly)

Returns the value of attribute booking_request.



9
10
11
# File 'lib/exlibris/aleph/api/reader/patron/record/item.rb', line 9

def booking_request
  @booking_request
end

#hold_requestObject (readonly)

Returns the value of attribute hold_request.



9
10
11
# File 'lib/exlibris/aleph/api/reader/patron/record/item.rb', line 9

def hold_request
  @hold_request
end

#photocopy_requestObject (readonly)

Returns the value of attribute photocopy_request.



9
10
11
# File 'lib/exlibris/aleph/api/reader/patron/record/item.rb', line 9

def photocopy_request
  @photocopy_request
end

#short_loanObject (readonly)

Returns the value of attribute short_loan.



9
10
11
# File 'lib/exlibris/aleph/api/reader/patron/record/item.rb', line 9

def short_loan
  @short_loan
end

Instance Method Details

#pickup_locationsObject



20
21
22
23
24
25
26
# File 'lib/exlibris/aleph/api/reader/patron/record/item.rb', line 20

def pickup_locations
  @pickup_locations ||= pickup_location.map do |location|
    code = location['code']
    display = location['__content__']
    PickupLocation.new(code, display)
  end
end