Class: HostConnect::NewBookingInfoBuilder
- Inherits:
-
AbstractBuilder
- Object
- AbstractBuilder
- HostConnect::NewBookingInfoBuilder
- Defined in:
- lib/hostconnect/builders/new_booking_info_builder.rb
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ NewBookingInfoBuilder
constructor
A new instance of NewBookingInfoBuilder.
- #to_xml ⇒ Object
Methods inherited from AbstractBuilder
Constructor Details
#initialize(options = {}) ⇒ NewBookingInfoBuilder
Returns a new instance of NewBookingInfoBuilder.
3 4 5 6 7 |
# File 'lib/hostconnect/builders/new_booking_info_builder.rb', line 3 def initialize( = {}) @valid_options = [ :name, :qb, :branch, :department, :sales_analysis1, :sales_analysis2, :sales_analysis3 ].freeze super() end |
Instance Method Details
#to_xml ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/hostconnect/builders/new_booking_info_builder.rb', line 9 def to_xml x = Builder::XmlMarkup.new(:indent => 2, :margin => 2) x.NewBookingInfo { x.Name @name x.QB @qb x.Branch @branch if @branch x.Department @department if @department x.SalesAnalysis1 @sales_analysis1 if @sales_analysis1 x.SalesAnalysis2 @sales_analysis2 if @sales_analysis2 x.SalesAnalysis3 @sales_analysis3 if @sales_analysis3 } x end |