class Starling::Resources::AccountBalanceResource

A resource representing a response from the Account Balance API

Public Instance Methods

accepted_overdraft() click to toggle source

@return [Float] the account's accepted overdraft

# File lib/starling/resources/account_balance_resource.rb, line 6
def accepted_overdraft
  present_float(parsed_data['acceptedOverdraft'])
end
amount() click to toggle source

@return [Float] the account's balance

# File lib/starling/resources/account_balance_resource.rb, line 11
def amount
  present_float(parsed_data['amount'])
end
available_to_spend() click to toggle source

@return [Float] the account's amount available to spend

# File lib/starling/resources/account_balance_resource.rb, line 16
def available_to_spend
  present_float(parsed_data['availableToSpend'])
end
cleared_balance() click to toggle source

@return [Float] the account's cleared balance

# File lib/starling/resources/account_balance_resource.rb, line 21
def cleared_balance
  present_float(parsed_data['clearedBalance'])
end
currency() click to toggle source

@return [String] the account's currency (e.g. “GBP”)

# File lib/starling/resources/account_balance_resource.rb, line 26
def currency
  parsed_data['currency']
end
effective_balance() click to toggle source

@return [Float] the account's effective balance

# File lib/starling/resources/account_balance_resource.rb, line 31
def effective_balance
  present_float(parsed_data['effectiveBalance'])
end
pending_transactions() click to toggle source

@return [Float] the total of the account's pending transactions

# File lib/starling/resources/account_balance_resource.rb, line 36
def pending_transactions
  present_float(parsed_data['pendingTransactions'])
end