Class: Markety::Response::ListOperationResponse

Inherits:
GenericResponse show all
Defined in:
lib/markety/response/list_operation_response.rb

Overview

Response class for Command::ListOperation calls

Instance Attribute Summary

Attributes inherited from GenericResponse

#error_message

Instance Method Summary collapse

Methods inherited from GenericResponse

#success?, #to_hash, #to_xml

Constructor Details

#initialize(response) ⇒ ListOperationResponse

Returns a new instance of ListOperationResponse.



8
9
10
11
12
13
14
15
16
# File 'lib/markety/response/list_operation_response.rb', line 8

def initialize(response)
  super(:list_operation_response,response)
  @list_operation_success = false

  if self.success?
    h = self.to_hash
    @list_operation_success = h[:success_list_operation][:result][:success]
  end
end

Instance Method Details

#list_operation_success?Boolean Also known as: list_op_success?, lop_success?

Whether the operation was successful.

Note: this is not the same as parent’s success? method. For list operations, success? almost always true (because Marketo accepted the request and gave you a response).

Returns:

  • (Boolean)


23
24
25
# File 'lib/markety/response/list_operation_response.rb', line 23

def list_operation_success?
  @list_operation_success
end