class Guevara::Entry

Constants

ACCOUNT_TYPE_CODE
TRANSACTION_TYPE_CODE

Public Instance Methods

fields() click to toggle source
# File lib/guevara/entry.rb, line 13
def fields
  ["6%<transaction_code>2d",
   "%<routing_number>09d",
   "%<account_number>-17.17s",
   "%<amount>010d",
   "%<id>-15.15s",
   "%<name>-22.22s",
   "  1",  # Addenda record indicator
   "%<origin_id>8d",
   "%<number>07d"]
end
format_attributes() click to toggle source
# File lib/guevara/entry.rb, line 9
def format_attributes
  attributes[:transaction_code] ||= transaction_code
end
transaction_code() click to toggle source
# File lib/guevara/entry.rb, line 25
def transaction_code
  ACCOUNT_TYPE_CODE[attributes[:account_type]] +
    TRANSACTION_TYPE_CODE[attributes[:type]]
end