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.
Instance Method Summary collapse
- #error_message ⇒ Object
-
#initialize(response) ⇒ SyncCustomObjectResponse
constructor
A new instance of SyncCustomObjectResponse.
- #success? ⇒ Boolean
- #updated_custom_object ⇒ Object
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
#error_message ⇒ Object
19 20 21 |
# File 'lib/markety/response/sync_custom_object_response.rb', line 19 def @error_message ||= custom_obj_hash[:error] end |
#success? ⇒ Boolean
11 12 13 |
# File 'lib/markety/response/sync_custom_object_response.rb', line 11 def success? @success && !failed? end |
#updated_custom_object ⇒ Object
23 24 25 |
# File 'lib/markety/response/sync_custom_object_response.rb', line 23 def updated_custom_object CustomObject.from_marketo_hash(object_type_name, custom_obj_hash) if success? end |