Class: Starling::Resources::ContactAccountResource

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

Overview

A resource representing a Contact Account returned from the Contact Accounts API

Instance Method Summary collapse

Methods inherited from BaseResource

#initialize

Constructor Details

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

Instance Method Details

#account_numberString

Returns the account number of the contact account.

Returns:

  • (String)

    the account number of the contact account



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

def 
  parsed_data['accountNumber']
end

#idString

Returns the Starling internal ID of the contact account.

Returns:

  • (String)

    the Starling internal ID of the contact account



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

def id
  parsed_data['id']
end

#nameString

Returns the name of the contact account.

Returns:

  • (String)

    the name of the contact account



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

def name
  parsed_data['name']
end

#sort_codeString

Returns the sort code of the contact account.

Returns:

  • (String)

    the sort code of the contact account



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

def sort_code
  parsed_data['sortCode']
end

#typeSymbol

Returns the type of the contact account (e.g. ‘:domestic`).

Returns:

  • (Symbol)

    the type of the contact account (e.g. ‘:domestic`)



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

def type
  present_enum(parsed_data['type'])
end