Class: Exlibris::Aleph::Patron::Record::Item::CreateHold

Inherits:
Object
  • Object
show all
Defined in:
lib/exlibris/aleph/patron/record/item/create_hold.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(patron_id, record_id, item_id, parameters) ⇒ CreateHold

Returns a new instance of CreateHold.



9
10
11
12
13
14
15
# File 'lib/exlibris/aleph/patron/record/item/create_hold.rb', line 9

def initialize(patron_id, record_id, item_id, parameters)
  @patron_id = patron_id
  @record_id = record_id
  @item_id = item_id
  @parameters =
    API::Client::Patron::Record::Item::CreateHold::Parameters.new(parameters)
end

Instance Attribute Details

#item_idObject (readonly)

Returns the value of attribute item_id.



7
8
9
# File 'lib/exlibris/aleph/patron/record/item/create_hold.rb', line 7

def item_id
  @item_id
end

#parametersObject (readonly)

Returns the value of attribute parameters.



7
8
9
# File 'lib/exlibris/aleph/patron/record/item/create_hold.rb', line 7

def parameters
  @parameters
end

#patron_idObject (readonly)

Returns the value of attribute patron_id.



7
8
9
# File 'lib/exlibris/aleph/patron/record/item/create_hold.rb', line 7

def patron_id
  @patron_id
end

#record_idObject (readonly)

Returns the value of attribute record_id.



7
8
9
# File 'lib/exlibris/aleph/patron/record/item/create_hold.rb', line 7

def record_id
  @record_id
end

Instance Method Details

#error?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/exlibris/aleph/patron/record/item/create_hold.rb', line 21

def error?
  reader.type == 'error'
end

#noteObject



17
18
19
# File 'lib/exlibris/aleph/patron/record/item/create_hold.rb', line 17

def note
  @note ||= reader.note
end