Class: Clever::Types::Token

Inherits:
Base
  • Object
show all
Defined in:
lib/clever/types/token.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#blank?, #presence, #to_h

Constructor Details

#initialize(attributes = {}) ⇒ Token

Returns a new instance of Token.



12
13
14
15
16
17
18
# File 'lib/clever/types/token.rb', line 12

def initialize(attributes = {}, *)
  @uid          = attributes['id']
  @created      = attributes['created']
  @owner        = attributes['owner']
  @access_token = attributes['access_token']
  @scopes       = attributes['scopes']
end

Instance Attribute Details

#access_tokenObject (readonly)

Returns the value of attribute access_token.



6
7
8
# File 'lib/clever/types/token.rb', line 6

def access_token
  @access_token
end

#createdObject (readonly)

Returns the value of attribute created.



6
7
8
# File 'lib/clever/types/token.rb', line 6

def created
  @created
end

#ownerObject (readonly)

Returns the value of attribute owner.



6
7
8
# File 'lib/clever/types/token.rb', line 6

def owner
  @owner
end

#scopesObject (readonly)

Returns the value of attribute scopes.



6
7
8
# File 'lib/clever/types/token.rb', line 6

def scopes
  @scopes
end

#uidObject (readonly)

Returns the value of attribute uid.



6
7
8
# File 'lib/clever/types/token.rb', line 6

def uid
  @uid
end