Update qbo.rb

This commit is contained in:
2020-01-04 23:07:53 -05:00
committed by GitHub
parent 8c2f30949a
commit e776deeece

View File

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