Sha256: 683e266222bffb7e617d16d6bc07580da2f12bb8be1295b07be055d51751ad5e
Contents?: true
Size: 497 Bytes
Versions: 11
Compression:
Stored size: 497 Bytes
Contents
# frozen_string_literal: false module PayPal class AccessToken attr_accessor :access_token, :token_type, :expires_in, :date_created def initialize(options) @access_token = options.access_token @token_type = options.token_type @expires_in = options.expires_in @date_created = Time.zone.now end def expired? Time.zone.now > @date_created + @expires_in end def authorization_string "#{@token_type} #{@access_token}" end end end
Version data entries
11 entries across 11 versions & 1 rubygems