def access_token
      @access_token = ::OAuth2::AccessToken.new(client, object.oauth_hash[:access_token],
        refresh_token: object.oauth_hash[:refresh_token],
        expires_at: object.oauth_hash[:expires_at].to_i
      )
      if @access_token.expired?
        GoogleAPI.logger.info "Access Token expired for #{object.class.name}(#{object.id}), refreshing..."
        @access_token = @access_token.refresh!
        object.update_oauth!(@access_token.token)
      end

      @access_token
    end
def access_token
      @access_token = ::OAuth2::AccessToken.new(client, object.oauth_hash[:access_token],
        refresh_token: object.oauth_hash[:refresh_token],
        expires_at: object.oauth_hash[:expires_at].to_i
      )
      if @access_token.expired?
        GoogleAPI.logger.info "Access Token expired for #{object.class.name}(#{object.id}), refreshing..."
        @access_token = @access_token.refresh!
        object.update_oauth!(@access_token.token)
      end

      @access_token
    end
This is where the magic happens. All methods are based off of a new Client object.
 Before we go anywhere else, however, we must make sure that the object passed to the
 #new method is oauthable. If not, raise an error telling the user.
 Build an AccessToken object from OAuth2. Check if the access token is expired, and if so,
 refresh it and save the new access token returned from Google.