Class: OldPlaid::Account
- Inherits:
-
Object
- Object
- OldPlaid::Account
- Defined in:
- lib/old_plaid/models/account.rb
Instance Attribute Summary collapse
-
#account_id ⇒ Object
Returns the value of attribute account_id.
-
#available_balance ⇒ Object
Returns the value of attribute available_balance.
-
#balances ⇒ Object
Returns the value of attribute balances.
-
#current_balance ⇒ Object
Returns the value of attribute current_balance.
-
#institution_type ⇒ Object
Returns the value of attribute institution_type.
-
#mask ⇒ Object
Returns the value of attribute mask.
-
#meta ⇒ Object
Returns the value of attribute meta.
-
#name ⇒ Object
Returns the value of attribute name.
-
#numbers ⇒ Object
Returns the value of attribute numbers.
-
#subtype ⇒ Object
Returns the value of attribute subtype.
-
#transactions ⇒ Object
Returns the value of attribute transactions.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(hash) ⇒ Account
constructor
A new instance of Account.
Constructor Details
#initialize(hash) ⇒ Account
Returns a new instance of Account.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/old_plaid/models/account.rb', line 7 def initialize(hash) @account_id = hash['_id'] @name = hash['meta']['name'] if hash['meta'] @type = hash['type'] = hash['meta'] @mask = hash['meta']['number'] if hash['meta'] @institution_type = hash['institution_type'] if hash['balance'] @balances = Balances.new( available: hash['balance']['available'], current: hash['balance']['current'] ) end # Depository account only, "checkings" or "savings" # Available on live data, but not on the test data @subtype = hash['subtype'] @numbers = hash['numbers'] ? hash['numbers'] : 'Upgrade user to access routing information for this account' end |
Instance Attribute Details
#account_id ⇒ Object
Returns the value of attribute account_id.
5 6 7 |
# File 'lib/old_plaid/models/account.rb', line 5 def account_id @account_id end |
#available_balance ⇒ Object
Returns the value of attribute available_balance.
5 6 7 |
# File 'lib/old_plaid/models/account.rb', line 5 def available_balance @available_balance end |
#balances ⇒ Object
Returns the value of attribute balances.
5 6 7 |
# File 'lib/old_plaid/models/account.rb', line 5 def balances @balances end |
#current_balance ⇒ Object
Returns the value of attribute current_balance.
5 6 7 |
# File 'lib/old_plaid/models/account.rb', line 5 def current_balance @current_balance end |
#institution_type ⇒ Object
Returns the value of attribute institution_type.
5 6 7 |
# File 'lib/old_plaid/models/account.rb', line 5 def institution_type @institution_type end |
#mask ⇒ Object
Returns the value of attribute mask.
5 6 7 |
# File 'lib/old_plaid/models/account.rb', line 5 def mask @mask end |
#meta ⇒ Object
Returns the value of attribute meta.
5 6 7 |
# File 'lib/old_plaid/models/account.rb', line 5 def end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/old_plaid/models/account.rb', line 5 def name @name end |
#numbers ⇒ Object
Returns the value of attribute numbers.
5 6 7 |
# File 'lib/old_plaid/models/account.rb', line 5 def numbers @numbers end |
#subtype ⇒ Object
Returns the value of attribute subtype.
5 6 7 |
# File 'lib/old_plaid/models/account.rb', line 5 def subtype @subtype end |
#transactions ⇒ Object
Returns the value of attribute transactions.
5 6 7 |
# File 'lib/old_plaid/models/account.rb', line 5 def transactions @transactions end |
#type ⇒ Object
Returns the value of attribute type.
5 6 7 |
# File 'lib/old_plaid/models/account.rb', line 5 def type @type end |