Class: CamtParser::Creditor

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

Instance Method Summary collapse

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_nameObject


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

#bicObject


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

#ibanObject


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

#nameObject


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

def name
  @name ||= @xml_data.xpath('RltdPties/Cdtr/Nm/text()').text
end