class OFX::Document::BankAccount
Public Class Methods
new(options = {})
click to toggle source
Calls superclass method
# File lib/ofx/document/bank_account.rb, line 5 def initialize(options = {}) @routing = options[:routing] || (raise Errors::RoutingMissing) @account = options[:account] || (raise Errors::AccountMissing) @type = account_type(options[:type] || :checking) super end
Public Instance Methods
acctid()
click to toggle source
# File lib/ofx/document/bank_account.rb, line 16 def acctid @account end
accttype()
click to toggle source
# File lib/ofx/document/bank_account.rb, line 20 def accttype @type end
bankid()
click to toggle source
# File lib/ofx/document/bank_account.rb, line 12 def bankid @routing end
Private Instance Methods
account_type(type = :checking)
click to toggle source
# File lib/ofx/document/bank_account.rb, line 26 def account_type(type = :checking) case type when :savings then 'SAVINGS' when :money_market then 'MONEYMRKT' when :credit_line then 'CREDITLINE' when :checking then 'CHECKING' else raise Errors::AccountTypeNotAvailable.new(account_type: type) end end