Class: Starling::Resources::AccountResource
- Inherits:
-
BaseResource
- Object
- BaseResource
- Starling::Resources::AccountResource
- Defined in:
- lib/starling/resources/account_resource.rb
Overview
A resource representing a response from the Account API
Instance Method Summary collapse
-
#bic ⇒ String
The BIC of the account.
-
#created_at ⇒ Time
The time and date when the account was created.
-
#currency ⇒ String
The currency of the account.
-
#iban ⇒ String
The IBAN of the account.
-
#id ⇒ String
The Starling internal ID of the account.
-
#name ⇒ String
The name of the account.
-
#number ⇒ String
(also: #account_number)
The account number of the account.
-
#sort_code ⇒ String
The sort code of the account.
Methods inherited from BaseResource
Constructor Details
This class inherits a constructor from Starling::Resources::BaseResource
Instance Method Details
#bic ⇒ String
Returns the BIC of the account.
21 22 23 |
# File 'lib/starling/resources/account_resource.rb', line 21 def bic parsed_data['bic'] end |
#created_at ⇒ Time
Returns 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 |
#currency ⇒ String
Returns the currency of the account.
11 12 13 |
# File 'lib/starling/resources/account_resource.rb', line 11 def currency parsed_data['currency'] end |
#iban ⇒ String
Returns the IBAN of the account.
16 17 18 |
# File 'lib/starling/resources/account_resource.rb', line 16 def iban parsed_data['iban'] end |
#id ⇒ String
Returns 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 |
#name ⇒ String
Returns the name of the account.
31 32 33 |
# File 'lib/starling/resources/account_resource.rb', line 31 def name parsed_data['name'] end |
#number ⇒ String Also known as: account_number
Returns 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_code ⇒ String
Returns 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 |