Class: HostConnect::AbstractBuilder
- Inherits:
-
Object
- Object
- HostConnect::AbstractBuilder
- Defined in:
- lib/hostconnect/builder.rb
Overview
Abstract class which all the different builder-classes inherit from. The builders are used to produce valid XML requests, which are to be sent to the HostConnect server.
Direct Known Subclasses
AddServiceBuilder, AgentInfoBuilder, GetBookingBuilder, GetBookingPaymentSummaryBuilder, GetLocationsBuilder, GetServicesBuilder, GetSystemSettingsBuilder, ListBookingsBuilder, NewBookingInfoBuilder, OptionInfoBuilder, PaxDetailsBuilder, PingBuilder, RecordBookingPaymentBuilder, RoomConfigBuilder, ServiceLineNoteBuilder, SupplierInfoBuilder
Instance Method Summary collapse
-
#submit ⇒ Object
Send xml to server.
-
#to_s ⇒ Object
String representation of self.
Instance Method Details
#submit ⇒ Object
Send xml to server. Returns a new object.
11 12 13 14 |
# File 'lib/hostconnect/builder.rb', line 11 def submit obj = ActiveSupport::Inflector.constantize(self.class.to_s.gsub(/Builder/, '')) obj.new(Client.post_xml_request(to_s)) end |
#to_s ⇒ Object
String representation of self
6 7 8 |
# File 'lib/hostconnect/builder.rb', line 6 def to_s to_xml.target! end |