Oauth2 Upgrade

This commit is contained in:
2020-01-04 15:28:04 -05:00
committed by GitHub
parent ea71542d81
commit 215b219a6d

View File

@@ -1,6 +1,6 @@
#The MIT License (MIT) #The MIT License (MIT)
# #
#Copyright (c) 2017 rick barrette #Copyright (c) 2020 rick barrette
# #
#Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: #Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
# #
@@ -19,7 +19,7 @@ class QboEmployee < ActiveRecord::Base
end end
def self.sync def self.sync
employees = get_base.service.all employees = get_base.all
transaction do transaction do
# Update the item table # Update the item table
@@ -33,7 +33,7 @@ class QboEmployee < ActiveRecord::Base
end end
def self.sync_by_id(id) def self.sync_by_id(id)
employee = get_base.service.fetch_by_id(id) employee = get_base.fetch_by_id(id)
qbo_employee = find_or_create_by(id: employee.id) qbo_employee = find_or_create_by(id: employee.id)
qbo_employee.name = employee.display_name qbo_employee.name = employee.display_name
qbo_employee.id = employee.id qbo_employee.id = employee.id