Class: Markety::Response::SyncCustomObjectResponse
- Inherits:
-
GenericResponse
- Object
- GenericResponse
- Markety::Response::SyncCustomObjectResponse
- Defined in:
- lib/markety/response/sync_custom_object_response.rb
Instance Attribute Summary collapse
-
#status ⇒ Object
Returns the value of attribute status.
Attributes inherited from GenericResponse
Instance Method Summary collapse
- #custom_objects ⇒ Object
-
#initialize(response) ⇒ SyncCustomObjectResponse
constructor
A new instance of SyncCustomObjectResponse.
- #success? ⇒ Boolean
Methods inherited from GenericResponse
Constructor Details
#initialize(response) ⇒ SyncCustomObjectResponse
Returns a new instance of SyncCustomObjectResponse.
7 8 9 |
# File 'lib/markety/response/sync_custom_object_response.rb', line 7 def initialize(response) super(:sync_custom_objects_response, response) end |
Instance Attribute Details
#status ⇒ Object
Returns the value of attribute status.
5 6 7 |
# File 'lib/markety/response/sync_custom_object_response.rb', line 5 def status @status end |
Instance Method Details
#custom_objects ⇒ Object
15 16 17 18 19 20 21 22 |
# 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? ⇒ Boolean
11 12 13 |
# File 'lib/markety/response/sync_custom_object_response.rb', line 11 def success? @success end |