class Markety::Response::SyncCustomObjectResponse
Attributes
status[RW]
Public Class Methods
new(response)
click to toggle source
Calls superclass method
Markety::Response::GenericResponse::new
# File lib/markety/response/sync_custom_object_response.rb, line 7 def initialize(response) super(:sync_custom_objects_response, response) end
Public Instance Methods
custom_objects()
click to toggle source
# File lib/markety/response/sync_custom_object_response.rb, line 15 def custom_objects return [] unless success? @custom_objects ||= begin custom_obj_hash.map do |single_custom_obj_hash| CustomObject.from_marketo_hash(object_type_name, single_custom_obj_hash) end end end
success?()
click to toggle source
# File lib/markety/response/sync_custom_object_response.rb, line 11 def success? @success end
Private Instance Methods
custom_obj_hash()
click to toggle source
# File lib/markety/response/sync_custom_object_response.rb, line 34 def custom_obj_hash [to_hash[:success_sync_custom_objects][:result][:sync_custom_obj_status_list][:sync_custom_obj_status]].flatten end
failed?()
click to toggle source
# File lib/markety/response/sync_custom_object_response.rb, line 26 def failed? status == "FAILED" end
object_type_name()
click to toggle source
# File lib/markety/response/sync_custom_object_response.rb, line 30 def object_type_name @object_type_name ||= custom_obj_hash.first.fetch(:obj_type_name) end