Class: HostConnect::RecordBookingPaymentBuilder
- Inherits:
-
AbstractBuilder
- Object
- AbstractBuilder
- HostConnect::RecordBookingPaymentBuilder
- Defined in:
- lib/hostconnect/builders/record_booking_payment_builder.rb
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ RecordBookingPaymentBuilder
constructor
A new instance of RecordBookingPaymentBuilder.
- #to_xml ⇒ Object
Methods inherited from AbstractBuilder
Constructor Details
#initialize(options = {}) ⇒ RecordBookingPaymentBuilder
Returns a new instance of RecordBookingPaymentBuilder.
3 4 5 6 7 |
# File 'lib/hostconnect/builders/record_booking_payment_builder.rb', line 3 def initialize( = {}) @valid_options = [ :agent_id, :password, :booking_id, :currency, :amount, :receipt_type ].freeze super() end |
Instance Method Details
#to_xml ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/hostconnect/builders/record_booking_payment_builder.rb', line 9 def to_xml x = amount = (@amount.to_f * 100).to_i # Format amount for HostConnect x.Request { x.RecordBookingPaymentRequest { x.AgentID @agent_id x.Password @password x.BookingId @booking_id x.Currency @currency x.Amount amount x.ReceiptType @receipt_type } } x end |