Class: HostConnect::ListBookingsBuilder
- Inherits:
-
AbstractBuilder
- Object
- AbstractBuilder
- HostConnect::ListBookingsBuilder
- Defined in:
- lib/hostconnect/builders/list_bookings_builder.rb
Overview
The ListBookings request returns header-level details of zero or more bookings made by the specifed agent, and that meet all of the criteria specified. If a sub-login is supplied then only details of bookings associated with that sub-login are returned.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ ListBookingsBuilder
constructor
A new instance of ListBookingsBuilder.
- #to_xml ⇒ Object
Methods inherited from AbstractBuilder
Constructor Details
#initialize(options = {}) ⇒ ListBookingsBuilder
Returns a new instance of ListBookingsBuilder.
7 8 9 10 11 12 |
# File 'lib/hostconnect/builders/list_bookings_builder.rb', line 7 def initialize( = {}) @valid_options = [ :agent_id, :password, :travel_date_from, :travel_date_to, :entered_date_from, :entered_date_to, :name_contains, :agent_ref ].freeze super() end |
Instance Method Details
#to_xml ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/hostconnect/builders/list_bookings_builder.rb', line 14 def to_xml x = x.Request { x.ListBookingsRequest { @valid_options.each do |opt| val = eval "#{opt}" eval "x.#{opt.camelize.requestify} #{opt}" unless val.blank? end } } x end |