mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2026-10-04 01:00:44 -04:00
Added Attribute Mapping DSL
This commit is contained in:
1 parent
eb6954ddf1
commit
c87e18810b
4 files changed
+122
-17
No files matched your search
@@ -22,8 +22,8 @@ class CustomerSyncService < SyncServiceBase
|
||||
!remote.active?
|
||||
end
|
||||
|
||||
map_attribute :name, ->(remote) { remote.display_name }
|
||||
map_attribute :phone_number, ->(remote) { remote.primary_phone&.free_form_number&.gsub(/\D/, '') }
|
||||
map_attribute :mobile_phone_number, ->(remote) { remote.mobile_phone&.free_form_number&.gsub(/\D/, '') }
|
||||
map_attribute :name, :display_name
|
||||
map_phone :phone_number, :primary_phone
|
||||
map_phone :mobile_phone_number, :mobile_phone
|
||||
|
||||
end
|
||||
Reference in new issue
Block a user