mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2026-04-02 16:21:58 -04:00
Refactor: Update QBO connection handling to use QboConnectionService for consistency across services and controllers
This commit is contained in:
@@ -60,7 +60,7 @@ class Estimate < ActiveRecord::Base
|
||||
log "Pulling details for estimate ##{self.id}..."
|
||||
begin
|
||||
raise Exception unless self.id
|
||||
qbo = Qbo.first
|
||||
qbo = QboConnectionService.current!
|
||||
@details = qbo.perform_authenticated_request do |access_token|
|
||||
service = Quickbooks::Service::Estimate.new(company_id: qbo.realm_id, access_token: access_token)
|
||||
service(:estimate).fetch_by_id(self.id)
|
||||
|
||||
Reference in New Issue
Block a user