Class: BreadMachine::SecureTrading::CustomerInfoAuthXml
- Inherits:
-
Object
- Object
- BreadMachine::SecureTrading::CustomerInfoAuthXml
- Defined in:
- lib/breadmachine/secure_trading/customer_info_auth_xml.rb
Instance Method Summary collapse
-
#initialize(customer_info) ⇒ CustomerInfoAuthXml
constructor
A new instance of CustomerInfoAuthXml.
- #to_xml ⇒ Object
Constructor Details
#initialize(customer_info) ⇒ CustomerInfoAuthXml
Returns a new instance of CustomerInfoAuthXml.
6 7 8 |
# File 'lib/breadmachine/secure_trading/customer_info_auth_xml.rb', line 6 def initialize(customer_info) @customer_info = customer_info end |
Instance Method Details
#to_xml ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/breadmachine/secure_trading/customer_info_auth_xml.rb', line 10 def to_xml xml = Builder::XmlMarkup.new(:indent => 2) xml.CustomerInfo { xml.Postal { xml.Name { xml.NamePrefix @customer_info.name_prefix xml.FirstName @customer_info.first_name xml.MiddleName @customer_info.middle_name xml.LastName @customer_info.last_name xml.NameSuffix @customer_info.name_suffix } xml.Company @customer_info.company xml.Street @customer_info.street xml.City @customer_info.city xml.StateProv @customer_info.state xml.PostalCode @customer_info.postcode xml.CountryCode @customer_info.iso_2_country } xml.Telecom { xml.Phone @customer_info.telephone } xml.Online { xml.Email @customer_info.email } } end |