Class: OFX::Base::Statement
- Inherits:
-
Object
- Object
- OFX::Base::Statement
- Defined in:
- lib/ofx_kit/base/statement.rb
Overview
Base class for OFX statement types, aggregating an account, its transactions, and the closing balance.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#account ⇒ Object
The account associated with this statement (BankAccount or CreditCardAccount).
-
#balance ⇒ Object
The closing balance for this statement (Balance or
nil). -
#transactions ⇒ Object
The transactions in this statement (TransactionCollection).
Instance Method Summary collapse
-
#bank_statement? ⇒ Boolean
Always
false. -
#credit_card_statement? ⇒ Boolean
Always
false. -
#initialize(account:, transactions:, balance:) ⇒ Statement
constructor
Creates a new statement.
Constructor Details
#initialize(account:, transactions:, balance:) ⇒ Statement
Creates a new statement. account is a BankAccount or CreditCardAccount. transactions is a TransactionCollection. balance is a Balance or nil.
24 25 26 27 28 |
# File 'lib/ofx_kit/base/statement.rb', line 24 def initialize(account:, transactions:, balance:) @account = account @transactions = transactions @balance = balance end |
Instance Attribute Details
#account ⇒ Object
The account associated with this statement (BankAccount or CreditCardAccount).
11 12 13 |
# File 'lib/ofx_kit/base/statement.rb', line 11 def account @account end |
#balance ⇒ Object
The closing balance for this statement (Balance or nil).
17 18 19 |
# File 'lib/ofx_kit/base/statement.rb', line 17 def balance @balance end |
#transactions ⇒ Object
The transactions in this statement (TransactionCollection).
14 15 16 |
# File 'lib/ofx_kit/base/statement.rb', line 14 def transactions @transactions end |
Instance Method Details
#bank_statement? ⇒ Boolean
Always false.
32 33 34 |
# File 'lib/ofx_kit/base/statement.rb', line 32 def bank_statement? = false ## # Always +false+. |
#credit_card_statement? ⇒ Boolean
Always false.
35 |
# File 'lib/ofx_kit/base/statement.rb', line 35 def credit_card_statement? = false |