Update qbo.rb

This commit is contained in:
2020-01-05 01:08:42 -05:00
committed by GitHub
parent 000b67b329
commit 9310f207a3

View File

@@ -39,7 +39,7 @@ class Qbo < ActiveRecord::Base
access_token = OAuth2::AccessToken.from_hash(oauth2_client, qbo.token )
# check to see if we need to refresh the token
if qbo.expire.to_date.past?
if access_token.expired?
new_access_token_object = access_token.refresh!
qbo.token = new_access_token_object.to_hash
#qbo.qb_token = new_access_token_object.token