mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2025-12-29 14:11:00 -05:00
Update customer.rb
This commit is contained in:
@@ -88,20 +88,6 @@ class Customer < ActiveRecord::Base
|
|||||||
push
|
push
|
||||||
end
|
end
|
||||||
|
|
||||||
# returns the bases QBO service for customers
|
|
||||||
def self.get_base
|
|
||||||
Qbo.get_base(:customer)
|
|
||||||
end
|
|
||||||
|
|
||||||
# returns the QBO customer
|
|
||||||
def get_customer (id)
|
|
||||||
begin
|
|
||||||
return get_base.find_by_id(id)
|
|
||||||
rescue
|
|
||||||
return nil
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
# proforms a bruteforce sync operation
|
# proforms a bruteforce sync operation
|
||||||
# This needs to be simplified
|
# This needs to be simplified
|
||||||
def self.sync
|
def self.sync
|
||||||
@@ -170,8 +156,10 @@ class Customer < ActiveRecord::Base
|
|||||||
|
|
||||||
# init details
|
# init details
|
||||||
def get_details
|
def get_details
|
||||||
if self.id
|
begin
|
||||||
@details = get_customer(self.id)
|
@details = get_customer(self.id)
|
||||||
|
rescue
|
||||||
|
return nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user