class CamtParser::Account
Attributes
Public Class Methods
Source
# File lib/camt_parser/general/account.rb, line 6 def initialize(xml_data) @xml_data = xml_data end
Public Instance Methods
Source
# File lib/camt_parser/general/account.rb, line 21 def account_number !iban.nil? && !iban.empty? ? iban : other_id end
@return [String]
Source
# File lib/camt_parser/general/account.rb, line 34 def bank_name @bank_name ||= xml_data.xpath('Svcr/FinInstnId/Nm/text()').text end
@return [String]
Source
# File lib/camt_parser/general/account.rb, line 26 def bic @bic ||= [ xml_data.xpath('Svcr/FinInstnId/BIC/text()').text, xml_data.xpath('Svcr/FinInstnId/BICFI/text()').text, ].reject(&:empty?).first.to_s end
@return [String]
Source
# File lib/camt_parser/general/account.rb, line 39 def currency @currency ||= xml_data.xpath('Ccy/text()').text end
@return [String]
Source
# File lib/camt_parser/general/account.rb, line 11 def iban @iban ||= xml_data.xpath('Id/IBAN/text()').text end
@return [String]
Source
# File lib/camt_parser/general/account.rb, line 16 def other_id @other_id ||= xml_data.xpath('Id/Othr/Id/text()').text end
@return [String]