Class: Contactology::SendResult
- Inherits:
-
Object
- Object
- Contactology::SendResult
- 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
-
#issues ⇒ Object
readonly
Returns the value of attribute issues.
Instance Method Summary collapse
-
#initialize(response) ⇒ SendResult
constructor
A new instance of SendResult.
-
#score ⇒ Object
Public: Returns the spam score of the campaign.
-
#successful? ⇒ Boolean
Public: Indicates whether or not the send was successful.
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
#issues ⇒ Object (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
#score ⇒ Object
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.
23 24 25 |
# File 'lib/contactology/send_result.rb', line 23 def successful? !!@success end |