Class: Podio::OAuthToken

Inherits:
Struct
  • Object
show all
Defined in:
lib/podio.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ OAuthToken

Returns a new instance of OAuthToken.



58
59
60
61
62
63
64
# File 'lib/podio.rb', line 58

def initialize(params = {})
  self.access_token  = params['access_token']
  self.refresh_token = params['refresh_token']
  self.reference     = params['ref']
  self.expires_at    = Time.now + params['expires_in'] if params['expires_in']
  self.expires_in    = params['expires_in'] if params['expires_in']
end

Instance Attribute Details

#access_tokenObject

Returns the value of attribute access_token

Returns:

  • (Object)

    the current value of access_token



57
58
59
# File 'lib/podio.rb', line 57

def access_token
  @access_token
end

#expires_atObject

Returns the value of attribute expires_at

Returns:

  • (Object)

    the current value of expires_at



57
58
59
# File 'lib/podio.rb', line 57

def expires_at
  @expires_at
end

#expires_inObject

Returns the value of attribute expires_in

Returns:

  • (Object)

    the current value of expires_in



57
58
59
# File 'lib/podio.rb', line 57

def expires_in
  @expires_in
end

#referenceObject

Returns the value of attribute reference

Returns:

  • (Object)

    the current value of reference



57
58
59
# File 'lib/podio.rb', line 57

def reference
  @reference
end

#refresh_tokenObject

Returns the value of attribute refresh_token

Returns:

  • (Object)

    the current value of refresh_token



57
58
59
# File 'lib/podio.rb', line 57

def refresh_token
  @refresh_token
end

#refreshedObject

Returns the value of attribute refreshed

Returns:

  • (Object)

    the current value of refreshed



57
58
59
# File 'lib/podio.rb', line 57

def refreshed
  @refreshed
end