Class: BreadMachine::SecureTrading::Request

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

Instance Method Summary collapse

Constructor Details

#initialize(request) ⇒ Request

Returns a new instance of Request.



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

def initialize(request)
  @request = request
end

Instance Method Details

#to_xmlObject



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

def to_xml
  xml = Builder::XmlMarkup.new(:indent => 2)
  xml.instruct!(:xml, :encoding => "UTF-8")
  xml.RequestBlock('Version' => '3.51') do |request_block|
    request_block << @request.to_xml
    xml.Certificate BreadMachine::SecureTrading::configuration.site_reference
  end
  return xml.target!
end