Class: Dhl::Intraship::Bankdata
- Inherits:
-
Object
- Object
- Dhl::Intraship::Bankdata
- Defined in:
- lib/dhl-intraship/bankdata.rb
Instance Attribute Summary collapse
-
#account_number ⇒ Object
Returns the value of attribute account_number.
-
#bank_code ⇒ Object
Returns the value of attribute bank_code.
-
#bank_name ⇒ Object
Returns the value of attribute bank_name.
-
#bic ⇒ Object
Returns the value of attribute bic.
-
#iban ⇒ Object
Returns the value of attribute iban.
-
#note ⇒ Object
Returns the value of attribute note.
-
#owner ⇒ Object
Returns the value of attribute owner.
Instance Method Summary collapse
- #append_to_xml(xml) ⇒ Object
-
#initialize(attributes = {}) ⇒ Bankdata
constructor
A new instance of Bankdata.
Constructor Details
#initialize(attributes = {}) ⇒ Bankdata
Returns a new instance of Bankdata.
6 7 8 9 10 11 12 13 |
# File 'lib/dhl-intraship/bankdata.rb', line 6 def initialize(attributes = {}) attributes.each do |key, value| setter = :"#{key.to_s}=" if self.respond_to?(setter) self.send(setter, value) end end end |
Instance Attribute Details
#account_number ⇒ Object
Returns the value of attribute account_number.
4 5 6 |
# File 'lib/dhl-intraship/bankdata.rb', line 4 def account_number @account_number end |
#bank_code ⇒ Object
Returns the value of attribute bank_code.
4 5 6 |
# File 'lib/dhl-intraship/bankdata.rb', line 4 def bank_code @bank_code end |
#bank_name ⇒ Object
Returns the value of attribute bank_name.
4 5 6 |
# File 'lib/dhl-intraship/bankdata.rb', line 4 def bank_name @bank_name end |
#bic ⇒ Object
Returns the value of attribute bic.
4 5 6 |
# File 'lib/dhl-intraship/bankdata.rb', line 4 def bic @bic end |
#iban ⇒ Object
Returns the value of attribute iban.
4 5 6 |
# File 'lib/dhl-intraship/bankdata.rb', line 4 def iban @iban end |
#note ⇒ Object
Returns the value of attribute note.
4 5 6 |
# File 'lib/dhl-intraship/bankdata.rb', line 4 def note @note end |
#owner ⇒ Object
Returns the value of attribute owner.
4 5 6 |
# File 'lib/dhl-intraship/bankdata.rb', line 4 def owner @owner end |
Instance Method Details
#append_to_xml(xml) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/dhl-intraship/bankdata.rb', line 15 def append_to_xml(xml) xml.BankData do |xml| xml.cis(:accountOwner, owner) xml.cis(:accountNumber, account_number) unless account_number.blank? xml.cis(:bankCode, bank_code) unless bank_code.blank? xml.cis(:bankName, bank_name) unless bank_name.blank? xml.cis(:iban, iban) unless iban.blank? xml.cis(:note, note) unless note.blank? xml.cis(:bic, bic) unless bic.blank? end end |