Class: Contactology::SendResult

Inherits:
Object
  • Object
show all
Defined in:
lib/contactology/send_result.rb

Overview

Contains the campaign send request results which indicate success or failure, as well as any issues found with the campaign.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ SendResult

Returns a new instance of SendResult.



13
14
15
# File 'lib/contactology/send_result.rb', line 13

def initialize(response)
  load_response response
end

Instance Attribute Details

#issuesObject (readonly)

Returns the value of attribute issues.



11
12
13
# File 'lib/contactology/send_result.rb', line 11

def issues
  @issues
end

Instance Method Details

#scoreObject

Public: Returns the spam score of the campaign.

Returns a numeric from 0 to 100 (where higher is better).



32
33
34
# File 'lib/contactology/send_result.rb', line 32

def score
  @issues.score
end

#successful?Boolean

Public: Indicates whether or not the send was successful

Returns true when successful. Returns false when unsuccessful.

Returns:

  • (Boolean)


23
24
25
# File 'lib/contactology/send_result.rb', line 23

def successful?
  !!@success
end