Class: Iterable::Email
- Inherits:
-
ApiResource
- Object
- ApiResource
- Iterable::Email
- Defined in:
- lib/iterable/email.rb
Overview
Interact with /email API endpoints
Instance Attribute Summary
Attributes inherited from ApiResource
Instance Method Summary collapse
-
#target(email, campaign_id, attrs = {}) ⇒ Iterable::Response
Target a user with an email given a campaign.
-
#view(email, message_id, attrs = {}) ⇒ Iterable::Response
View an email message sent.
Methods inherited from ApiResource
#default_config, default_config, #initialize
Constructor Details
This class inherits a constructor from Iterable::ApiResource
Instance Method Details
#target(email, campaign_id, attrs = {}) ⇒ Iterable::Response
Target a user with an email given a campaign
41 42 43 44 45 |
# File 'lib/iterable/email.rb', line 41 def target(email, campaign_id, attrs = {}) attrs[:recipientEmail] = email attrs[:campaignId] = campaign_id Iterable.request(conf, '/email/target').post(attrs) end |
#view(email, message_id, attrs = {}) ⇒ Iterable::Response
View an email message sent
24 25 26 27 28 29 30 |
# File 'lib/iterable/email.rb', line 24 def view(email, , attrs = {}) attrs['email'] = email attrs['messageId'] = attrs.compact! Iterable.request(conf, '/email/viewInBrowser', attrs).get end |