mirror of
https://github.com/rickbarrette/redmine_qbo_lineitems.git
synced 2026-10-04 09:20:43 -04:00
Updated to use DSL and qbo_sync flag
This commit is contained in:
1 parent
a7899fb6b3
commit
896813983c
3 files changed
+6
-17
No files matched your search
@@ -22,19 +22,7 @@ class ItemSyncService < SyncServiceBase
|
||||
20
|
||||
end
|
||||
|
||||
# Map relevant attributes from the QBO Employee to the local Employee model
|
||||
def process_attributes(local, remote)
|
||||
log "Processing Item ##{remote.id}"
|
||||
local.id = remote.id
|
||||
local.description = remote.description
|
||||
local.unit_price = remote.unit_price
|
||||
local.active = remote.active?
|
||||
local.name = remote.name
|
||||
local.sku = remote.sku
|
||||
end
|
||||
|
||||
def log(msg)
|
||||
Rails.logger.info "[ItemSyncService] #{msg}"
|
||||
end
|
||||
|
||||
map_attribute :active, :active?
|
||||
map_attributes :description,, :id, :name, :sku, :unit_price
|
||||
|
||||
end
|
||||
Reference in new issue
Block a user