class Markety::Response::GetCustomObjectResponse
Public Class Methods
new(response)
click to toggle source
Calls superclass method
Markety::Response::GenericResponse::new
# File lib/markety/response/get_custom_object_response.rb, line 4 def initialize(response) super(:get_custom_object_response, response) end
Public Instance Methods
custom_object()
click to toggle source
# File lib/markety/response/get_custom_object_response.rb, line 16 def custom_object custom_objects.first end
custom_objects()
click to toggle source
# File lib/markety/response/get_custom_object_response.rb, line 8 def custom_objects @custom_objects ||= begin custom_object_list.map do |custom_obj_hash| CustomObject.from_marketo_hash(object_type_name, custom_obj_hash) end end end
Private Instance Methods
custom_object_list()
click to toggle source
# File lib/markety/response/get_custom_object_response.rb, line 22 def custom_object_list [custom_object_list_hash.fetch(:custom_obj, [])].flatten end
custom_object_list_hash()
click to toggle source
# File lib/markety/response/get_custom_object_response.rb, line 26 def custom_object_list_hash result_hash[:custom_obj_list] || {} end
object_type_name()
click to toggle source
# File lib/markety/response/get_custom_object_response.rb, line 30 def object_type_name result_hash.fetch(:obj_type_name, {}) end
result_hash()
click to toggle source
# File lib/markety/response/get_custom_object_response.rb, line 34 def result_hash to_hash.fetch(:success_get_custom_objects, {}).fetch(:result, {}) end