class Adp::Connection::AccessToken

Attributes

_expires_in[RW]
expires_on[RW]
scope[RW]
token[RW]
token_type[RW]

Public Class Methods

new(config = nil) click to toggle source

@return [Object]

# File lib/adp/access_token.rb, line 13
def initialize(config = nil)

  unless config.nil?
    self.token = config["access_token"]
    self.token_type = config["token_type"]
    self.scope = config["scope"]
    self.expires_in = config["expires_in"]
  end
end

Public Instance Methods

expires_in() click to toggle source

@return [Object]

# File lib/adp/access_token.rb, line 33
def expires_in
  return self._expires_in
end
expires_in=(value) click to toggle source

@return [Object]

# File lib/adp/access_token.rb, line 24
def expires_in=(value)
  unless value.nil?
    self._expires_in = value
    self.expires_on = Time.new() + self._expires_in
  end
  self.expires_on
end
is_valid?() click to toggle source
# File lib/adp/access_token.rb, line 37
def is_valid?
  return true;
end