Class: CamtParser::Creditor
- Inherits:
-
Object
- Object
- CamtParser::Creditor
- Defined in:
- lib/camt_parser/general/creditor.rb
Instance Method Summary collapse
- #bank_name ⇒ Object
- #bic ⇒ Object
- #iban ⇒ Object
-
#initialize(xml_data) ⇒ Creditor
constructor
A new instance of Creditor.
- #name ⇒ Object
Constructor Details
#initialize(xml_data) ⇒ Creditor
Returns a new instance of Creditor.
3 4 5 |
# File 'lib/camt_parser/general/creditor.rb', line 3 def initialize(xml_data) @xml_data = xml_data end |
Instance Method Details
#bank_name ⇒ Object
19 20 21 |
# File 'lib/camt_parser/general/creditor.rb', line 19 def bank_name @bank_name ||= @xml_data.xpath('RltdAgts/CdtrAgt/FinInstnId/Nm/text()').text end |
#bic ⇒ Object
15 16 17 |
# File 'lib/camt_parser/general/creditor.rb', line 15 def bic @bic ||= @xml_data.xpath('RltdAgts/CdtrAgt/FinInstnId/BIC/text()').text end |
#iban ⇒ Object
11 12 13 |
# File 'lib/camt_parser/general/creditor.rb', line 11 def iban @iban ||= @xml_data.xpath('RltdPties/CdtrAcct/Id/IBAN/text()').text end |
#name ⇒ Object
7 8 9 |
# File 'lib/camt_parser/general/creditor.rb', line 7 def name @name ||= @xml_data.xpath('RltdPties/Cdtr/Nm/text()').text end |