Class: BreadMachine::SecureTrading::OrderInfoXml

Inherits:
Object
  • Object
show all
Defined in:
lib/breadmachine/secure_trading/order_info_xml.rb

Instance Method Summary collapse

Constructor Details

#initialize(order_info) ⇒ OrderInfoXml

Returns a new instance of OrderInfoXml.



6
7
8
# File 'lib/breadmachine/secure_trading/order_info_xml.rb', line 6

def initialize(order_info)
  @order_info = order_info
end

Instance Method Details

#to_xmlObject



10
11
12
13
14
15
16
# File 'lib/breadmachine/secure_trading/order_info_xml.rb', line 10

def to_xml
  xml = Builder::XmlMarkup.new(:indent => 2)
  xml.Order {
    xml.OrderReference @order_info.order_reference
    xml.OrderInformation @order_info.order_information
  }
end