Module: Markety::Command::SyncCustomObject

Included in:
Markety::Client
Defined in:
lib/markety/command/sync_custom_object.rb

Instance Method Summary collapse

Instance Method Details

#sync_custom_object(custom_object, operation = "UPSERT") ⇒ Object



4
5
6
# File 'lib/markety/command/sync_custom_object.rb', line 4

def sync_custom_object(custom_object, operation="UPSERT")
  sync_custom_objects_request(custom_object.object_type_name, operation, custom_object.to_sync_custom_object_hash)
end

#sync_custom_objects(custom_objects, operation = "UPSERT") ⇒ Object



8
9
10
11
# File 'lib/markety/command/sync_custom_object.rb', line 8

def sync_custom_objects(custom_objects, operation="UPSERT")
  object_type_name = custom_objects.first.object_type_name
  sync_custom_objects_request(object_type_name, operation, multiple_custom_obj_params(custom_objects))
end