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) ⇒ 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
37 38 39 40 41 |
# File 'lib/iterable/email.rb', line 37 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) ⇒ Iterable::Response
View an email message sent
23 24 25 26 |
# File 'lib/iterable/email.rb', line 23 def view(email, ) params = { email: email, messageId: } Iterable.request(conf, '/email/viewInBrowser', params).get end |