Class: OFXReader::Parser::OFX102
- Inherits:
-
Struct
- Object
- Struct
- OFXReader::Parser::OFX102
- Defined in:
- lib/ofx_reader/parser/ofx_102.rb
Instance Attribute Summary collapse
-
#ofx_body ⇒ Object
Returns the value of attribute ofx_body.
Instance Method Summary collapse
Instance Attribute Details
#ofx_body ⇒ Object
Returns the value of attribute ofx_body
3 4 5 |
# File 'lib/ofx_reader/parser/ofx_102.rb', line 3 def ofx_body @ofx_body end |
Instance Method Details
#account ⇒ Object
8 9 10 11 12 13 |
# File 'lib/ofx_reader/parser/ofx_102.rb', line 8 def account { bank_id: ofx_body.search('BANKACCTFROM BANKID').inner_text, account_id: ofx_body.search('BANKACCTFROM ACCTID').inner_text, } end |
#parse ⇒ Object
4 5 6 |
# File 'lib/ofx_reader/parser/ofx_102.rb', line 4 def parse [account, transactions] end |
#transactions ⇒ Object
15 16 17 18 19 |
# File 'lib/ofx_reader/parser/ofx_102.rb', line 15 def transactions ofx_body.search('BANKTRANLIST STMTTRN').map do |node| build_transaction(node) end end |