class Exlibris::Aleph::API::Client::Patron::Record::Item::CreateHold::Parameters
Constants
- ROOT
Attributes
last_interest_date[R]
note_1[R]
note_2[R]
pages[R]
pickup_location[R]
rush[R]
start_interest_date[R]
sub_title[R]
Public Class Methods
new(parameters)
click to toggle source
# 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
Public Instance Methods
to_xml()
click to toggle source
# 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-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