Class: Starling::Resources::MeResource

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

Overview

A resource representing a response returned from the Who Am I (Me) API

Instance Method Summary collapse

Methods inherited from BaseResource

#initialize

Constructor Details

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

Instance Method Details

#authenticatedtrue, false

Returns whether the user is authenticated.

Returns:

  • (true, false)

    whether the user is authenticated



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

def authenticated
  parsed_data['authenticated']
end

#customer_uidString

Returns the Starling internal ID of the user.

Returns:

  • (String)

    the Starling internal ID of the user



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

def customer_uid
  parsed_data['customerUid']
end

#expires_in_secondsInteger, Fixnum

Returns the time until the user’s access token expires.

Returns:

  • (Integer, Fixnum)

    the time until the user’s access token expires



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

def expires_in_seconds
  parsed_data['expiresInSeconds']
end

#scopesArray<String>

Returns the scopes of the user’s access token.

Returns:

  • (Array<String>)

    the scopes of the user’s access token



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

def scopes
  parsed_data['scopes']
end