Class: Exlibris::Aleph::API::Client::Patron::Record::Item::CreateHold::Parameters
- Inherits:
-
Object
- Object
- Exlibris::Aleph::API::Client::Patron::Record::Item::CreateHold::Parameters
- Defined in:
- lib/exlibris/aleph/api/client/patron/record/item/create_hold/parameters.rb
Constant Summary collapse
- ROOT =
'hold-request-parameters'
Instance Attribute Summary collapse
-
#last_interest_date ⇒ Object
readonly
Returns the value of attribute last_interest_date.
-
#note_1 ⇒ Object
readonly
Returns the value of attribute note_1.
-
#note_2 ⇒ Object
readonly
Returns the value of attribute note_2.
-
#pages ⇒ Object
readonly
Returns the value of attribute pages.
-
#pickup_location ⇒ Object
readonly
Returns the value of attribute pickup_location.
-
#rush ⇒ Object
readonly
Returns the value of attribute rush.
-
#start_interest_date ⇒ Object
readonly
Returns the value of attribute start_interest_date.
-
#sub_author ⇒ Object
readonly
Returns the value of attribute sub_author.
-
#sub_title ⇒ Object
readonly
Returns the value of attribute sub_title.
Instance Method Summary collapse
-
#initialize(parameters) ⇒ Parameters
constructor
A new instance of Parameters.
- #to_xml ⇒ Object
Constructor Details
#initialize(parameters) ⇒ Parameters
Returns a new instance of Parameters.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/exlibris/aleph/api/client/patron/record/item/create_hold/parameters.rb', line 16 def initialize(parameters) unless parameters.is_a?(Hash) raise ArgumentError.new("Expecting #{parameters} to be a Hash") end @pickup_location = parameters[:pickup_location] unless pickup_location.nil? || pickup_location.is_a?(Exlibris::Aleph::PickupLocation) raise ArgumentError.new("Expecting #{pickup_location} to be an Exlibris::Aleph::PickupLocation") end @last_interest_date = parameters[:last_interest_date] @start_interest_date = parameters[:start_interest_date] @sub_author = parameters[:sub_author] @sub_title = parameters[:sub_title] @pages = parameters[:pages] @note_1 = parameters[:note_1] @note_2 = parameters[:note_2] @rush = parameters[:rush] end |
Instance Attribute Details
#last_interest_date ⇒ Object (readonly)
Returns the value of attribute last_interest_date
12 13 14 |
# File 'lib/exlibris/aleph/api/client/patron/record/item/create_hold/parameters.rb', line 12 def last_interest_date @last_interest_date end |
#note_1 ⇒ Object (readonly)
Returns the value of attribute note_1
12 13 14 |
# File 'lib/exlibris/aleph/api/client/patron/record/item/create_hold/parameters.rb', line 12 def note_1 @note_1 end |
#note_2 ⇒ Object (readonly)
Returns the value of attribute note_2
12 13 14 |
# File 'lib/exlibris/aleph/api/client/patron/record/item/create_hold/parameters.rb', line 12 def note_2 @note_2 end |
#pages ⇒ Object (readonly)
Returns the value of attribute pages
12 13 14 |
# File 'lib/exlibris/aleph/api/client/patron/record/item/create_hold/parameters.rb', line 12 def pages @pages end |
#pickup_location ⇒ Object (readonly)
Returns the value of attribute pickup_location
12 13 14 |
# File 'lib/exlibris/aleph/api/client/patron/record/item/create_hold/parameters.rb', line 12 def pickup_location @pickup_location end |
#rush ⇒ Object (readonly)
Returns the value of attribute rush
12 13 14 |
# File 'lib/exlibris/aleph/api/client/patron/record/item/create_hold/parameters.rb', line 12 def rush @rush end |
#start_interest_date ⇒ Object (readonly)
Returns the value of attribute start_interest_date
12 13 14 |
# File 'lib/exlibris/aleph/api/client/patron/record/item/create_hold/parameters.rb', line 12 def start_interest_date @start_interest_date end |
#sub_author ⇒ Object (readonly)
Returns the value of attribute sub_author
12 13 14 |
# File 'lib/exlibris/aleph/api/client/patron/record/item/create_hold/parameters.rb', line 12 def @sub_author end |
#sub_title ⇒ Object (readonly)
Returns the value of attribute sub_title
12 13 14 |
# File 'lib/exlibris/aleph/api/client/patron/record/item/create_hold/parameters.rb', line 12 def sub_title @sub_title end |
Instance Method Details
#to_xml ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/exlibris/aleph/api/client/patron/record/item/create_hold/parameters.rb', line 34 def to_xml @xml ||= "<#{ROOT}>" + "<pickup-location>#{pickup_location.code}</pickup-location>" + "<last-interest-date>#{last_interest_date}</last-interest-date>" + "<start-interest-date>#{start_interest_date}</start-interest-date>" + "<sub-author>#{}</sub-author>" + "<sub-title>#{sub_title}</sub-title>" + "<pages>#{pages}</pages>" + "<note-1>#{note_1}</note-1>" + "<note-2>#{note_2}</note-2>" + "<rush>#{rush}</rush>" + "</#{ROOT}>" end |