Class: BreadMachine::SecureTrading::Request
- Inherits:
-
Object
- Object
- BreadMachine::SecureTrading::Request
- Defined in:
- lib/breadmachine/secure_trading/request.rb
Instance Method Summary collapse
-
#initialize(request) ⇒ Request
constructor
A new instance of Request.
- #to_xml ⇒ Object
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_xml ⇒ Object
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 |