class PayPal::AccessToken

Attributes

access_token[RW]
date_created[RW]
expires_in[RW]
token_type[RW]

Public Class Methods

new(options) click to toggle source
# File lib/core/access_token.rb, line 5
def initialize(options)
  @access_token = options.access_token
  @token_type = options.token_type
  @expires_in = options.expires_in
  @date_created = Time.now
end

Public Instance Methods

authorizationString() click to toggle source
# File lib/core/access_token.rb, line 16
def authorizationString
  return "#{@token_type} #{@access_token}"
end
isExpired() click to toggle source
# File lib/core/access_token.rb, line 12
def isExpired
  return Time.now > @date_created + @expires_in
end