Class: BreadMachine::SecureTrading::ThreeDSecureCredentialsXml

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

Instance Method Summary collapse

Constructor Details

#initialize(credentials) ⇒ ThreeDSecureCredentialsXml

Returns a new instance of ThreeDSecureCredentialsXml.



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

def initialize(credentials)
  @credentials = credentials
end

Instance Method Details

#to_xmlObject



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

def to_xml
  xml = Builder::XmlMarkup.new(:indent => 2)
  xml.ThreeDSecure {
    xml.Enrolled @credentials.enrolled
    xml.PaRes @credentials.pa_res
    xml.MD @credentials.md
    xml.TransactionReference @credentials.transaction_reference
  }
end