Class: OFX::Statement::Output::CurrentAccount

Inherits:
Base
  • Object
show all
Defined in:
lib/ofx/statement/output/current_account.rb

Instance Method Summary collapse

Methods inherited from Base

#create_builder, #fitid_hash, #generate_fitid, #generate_trntype, #ledger_balance_block, #ofx_block, #serialise, #signon_block, #time_to_ofx_dta, #transaction_block, #transaction_list, trntype_hash

Instance Method Details

#message_set_block(node) ⇒ Object



7
8
9
10
# File 'lib/ofx/statement/output/current_account.rb', line 7

def message_set_block(node)
  return node.BANKMSGSETV1 unless block_given?
  node.BANKMSGSETV1 { |child| yield(child) }
end

#statement_block(node, statement) ⇒ Object



12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/ofx/statement/output/current_account.rb', line 12

def statement_block(node, statement)
  node.STMTTRNRS do |stmttrnrs|
    stmttrnrs.STMTRS do |stmtrs|
      stmtrs.CURDEF statement.currency
      stmtrs.BANKACCTFROM do |bankacctfrom|
        bankacctfrom.BANKID statement.sort_code
        bankacctfrom.ACCTID statement.
        bankacctfrom.ACCTTYPE "CHECKING"
      end
      transaction_list(stmtrs, statement) { |list_node| yield(list_node) if block_given? }
      ledger_balance_block(stmtrs, statement)
    end
  end
end