Update qbo.rb

This commit is contained in:
2020-01-04 23:04:09 -05:00
committed by GitHub
parent 015a989f72
commit 8c2f30949a

View File

@@ -35,7 +35,7 @@ class Qbo < ActiveRecord::Base
oauth2_client = get_client oauth2_client = get_client
qbo = self.first qbo = self.first
#access_token = OAuth2::AccessToken.new(oauth2_client, qbo.qb_token , refresh_token: qbo.qb_secret) #access_token = OAuth2::AccessToken.new(oauth2_client, qbo.qb_token , refresh_token: qbo.qb_secret)
access_token = OAuth2::AccessToken.from_hash(oauth2_client, qbo.token.to_s) access_token = OAuth2::AccessToken.new.from_hash(oauth2_client, qbo.token)
# check to see if we need to refest the token # check to see if we need to refest the token
if qbo.expire.to_date.past? if qbo.expire.to_date.past?