Fixed get_base

This commit is contained in:
2023-12-30 19:55:01 -05:00
parent 3e352f270d
commit 2e32d8f6e5

View File

@@ -24,23 +24,21 @@ class Qbo < ActiveRecord::Base
# build the reqiested service # build the reqiested service
case type case type
when :time_activity when :time_activity
base = Quickbooks::Service::TimeActivity.new(:company_id => qbo.realm_id, :access_token => access_token) return Quickbooks::Service::TimeActivity.new(:company_id => qbo.realm_id, :access_token => access_token)
when :customer when :customer
return Quickbooks::Service::Customer.new(:company_id => qbo.realm_id, :access_token => access_token) return Quickbooks::Service::Customer.new(:company_id => qbo.realm_id, :access_token => access_token)
when :invoice when :invoice
base = Quickbooks::Service::Invoice.new(:company_id => qbo.realm_id, :access_token => access_token) return Quickbooks::Service::Invoice.new(:company_id => qbo.realm_id, :access_token => access_token)
when :estimate when :estimate
base = Quickbooks::Service::Estimate.new(:company_id => qbo.realm_id, :access_token => access_token) return Quickbooks::Service::Estimate.new(:company_id => qbo.realm_id, :access_token => access_token)
when :employee when :employee
base = Quickbooks::Service::Employee.new(:company_id => qbo.realm_id, :access_token => access_token) return Quickbooks::Service::Employee.new(:company_id => qbo.realm_id, :access_token => access_token)
when :item when :item
base = Quickbooks::Service::Item.new(:company_id => qbo.realm_id, :access_token => access_token) return Quickbooks::Service::Item.new(:company_id => qbo.realm_id, :access_token => access_token)
else else
base = access_token return nil
end end
end end
return base
end end
# Updates last sync time stamp # Updates last sync time stamp