Class: CamtParser::Account

Inherits:
Object
  • Object
show all
Defined in:
lib/camt_parser/general/account.rb

Instance Method Summary collapse

Constructor Details

#initialize(xml_data) ⇒ Account

Returns a new instance of Account.


3
4
5
# File 'lib/camt_parser/general/account.rb', line 3

def initialize(xml_data)
  @xml_data = xml_data
end

Instance Method Details

#bank_nameObject


15
16
17
# File 'lib/camt_parser/general/account.rb', line 15

def bank_name
  @bank_name ||= @xml_data.xpath('Svcr/FinInstnId/Nm/text()').text
end

#bicObject


11
12
13
# File 'lib/camt_parser/general/account.rb', line 11

def bic
  @bic ||= @xml_data.xpath('Svcr/FinInstnId/BIC/text()').text
end

#currencyObject


19
20
21
# File 'lib/camt_parser/general/account.rb', line 19

def currency
  @currency ||= @xml_data.xpath('Ccy/text()').text
end

#ibanObject


7
8
9
# File 'lib/camt_parser/general/account.rb', line 7

def iban
  @iban ||= @xml_data.xpath('Id/IBAN/text()').text
end