Class: Starling::Resources::AccountResource

Inherits:
BaseResource show all
Defined in:
lib/starling/resources/account_resource.rb

Overview

A resource representing a response from the Account API

Instance Method Summary collapse

Methods inherited from BaseResource

#initialize

Constructor Details

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

Instance Method Details

#bicString

Returns the BIC of the account.

Returns:

  • (String)

    the BIC of the account


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

def bic
  parsed_data['bic']
end

#created_atTime

Returns the time and date when the account was created.

Returns:

  • (Time)

    the time and date when the account was created


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

def created_at
  present_datetime(parsed_data['createdAt'])
end

#currencyString

Returns the currency of the account.

Returns:

  • (String)

    the currency of the account


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

def currency
  parsed_data['currency']
end

#ibanString

Returns the IBAN of the account.

Returns:

  • (String)

    the IBAN of the account


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

def iban
  parsed_data['iban']
end

#idString

Returns the Starling internal ID of the account.

Returns:

  • (String)

    the Starling internal ID of the account


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

def id
  parsed_data['id']
end

#nameString

Returns the name of the account.

Returns:

  • (String)

    the name of the account


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

def name
  parsed_data['name']
end

#numberString Also known as: account_number

Returns the account number of the account.

Returns:

  • (String)

    the account number of the account


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

def number
  parsed_data['number']
end

#sort_codeString

Returns the sort code of the account.

Returns:

  • (String)

    the sort code of the account


42
43
44
# File 'lib/starling/resources/account_resource.rb', line 42

def sort_code
  parsed_data['sortCode']
end