Class: Starling::Resources::AccountBalanceResource

Inherits:
BaseResource
  • Object
show all
Defined in:
lib/starling/resources/account_balance_resource.rb

Overview

A resource representing a response from the Account Balance API

Instance Method Summary collapse

Methods inherited from BaseResource

#initialize

Constructor Details

This class inherits a constructor from Starling::Resources::BaseResource

Instance Method Details

#accepted_overdraftFloat


6
7
8
# File 'lib/starling/resources/account_balance_resource.rb', line 6

def accepted_overdraft
  present_float(parsed_data['acceptedOverdraft'])
end

#amountFloat


11
12
13
# File 'lib/starling/resources/account_balance_resource.rb', line 11

def amount
  present_float(parsed_data['amount'])
end

#available_to_spendFloat


16
17
18
# File 'lib/starling/resources/account_balance_resource.rb', line 16

def available_to_spend
  present_float(parsed_data['availableToSpend'])
end

#cleared_balanceFloat


21
22
23
# File 'lib/starling/resources/account_balance_resource.rb', line 21

def cleared_balance
  present_float(parsed_data['clearedBalance'])
end

#currencyString


26
27
28
# File 'lib/starling/resources/account_balance_resource.rb', line 26

def currency
  parsed_data['currency']
end

#effective_balanceFloat


31
32
33
# File 'lib/starling/resources/account_balance_resource.rb', line 31

def effective_balance
  present_float(parsed_data['effectiveBalance'])
end

#pending_transactionsFloat


36
37
38
# File 'lib/starling/resources/account_balance_resource.rb', line 36

def pending_transactions
  present_float(parsed_data['pendingTransactions'])
end