Class: Starling::Resources::AccountBalanceResource
- Inherits:
-
BaseResource
- Object
- BaseResource
- Starling::Resources::AccountBalanceResource
- Defined in:
- lib/starling/resources/account_balance_resource.rb
Overview
A resource representing a response from the Account Balance API
Instance Method Summary collapse
-
#accepted_overdraft ⇒ Float
The account’s accepted overdraft.
-
#amount ⇒ Float
The account’s balance.
-
#available_to_spend ⇒ Float
The account’s amount available to spend.
-
#cleared_balance ⇒ Float
The account’s cleared balance.
-
#currency ⇒ String
The account’s currency (e.g. “GBP”).
-
#effective_balance ⇒ Float
The account’s effective balance.
-
#pending_transactions ⇒ Float
The total of the account’s pending transactions.
Methods inherited from BaseResource
Constructor Details
This class inherits a constructor from Starling::Resources::BaseResource
Instance Method Details
#accepted_overdraft ⇒ Float
Returns the account’s accepted overdraft.
6 7 8 |
# File 'lib/starling/resources/account_balance_resource.rb', line 6 def accepted_overdraft present_float(parsed_data['acceptedOverdraft']) end |
#amount ⇒ Float
Returns the account’s balance.
11 12 13 |
# File 'lib/starling/resources/account_balance_resource.rb', line 11 def amount present_float(parsed_data['amount']) end |
#available_to_spend ⇒ Float
Returns the account’s amount available to spend.
16 17 18 |
# File 'lib/starling/resources/account_balance_resource.rb', line 16 def available_to_spend present_float(parsed_data['availableToSpend']) end |
#cleared_balance ⇒ Float
Returns the account’s cleared balance.
21 22 23 |
# File 'lib/starling/resources/account_balance_resource.rb', line 21 def cleared_balance present_float(parsed_data['clearedBalance']) end |
#currency ⇒ String
Returns the account’s currency (e.g. “GBP”).
26 27 28 |
# File 'lib/starling/resources/account_balance_resource.rb', line 26 def currency parsed_data['currency'] end |
#effective_balance ⇒ Float
Returns the account’s effective balance.
31 32 33 |
# File 'lib/starling/resources/account_balance_resource.rb', line 31 def effective_balance present_float(parsed_data['effectiveBalance']) end |
#pending_transactions ⇒ Float
Returns the total of the account’s pending transactions.
36 37 38 |
# File 'lib/starling/resources/account_balance_resource.rb', line 36 def pending_transactions present_float(parsed_data['pendingTransactions']) end |