Class: Iterable::Email

Inherits:
ApiResource show all
Defined in:
lib/iterable/email.rb

Overview

Interact with /email API endpoints

Examples:

Creating email endpoint object

# With default config
templates = Iterable::Email.new
templates.get

# With custom config
conf = Iterable::Config.new(token: 'new-token')
templates = Iterable::Email.new(config)

Instance Attribute Summary

Attributes inherited from ApiResource

#conf

Instance Method Summary collapse

Methods inherited from ApiResource

#default_config, default_config, #initialize

Constructor Details

This class inherits a constructor from Iterable::ApiResource

Instance Method Details

#view(email, message_id) ⇒ Iterable::Response

View an email message sent

Parameters:

  • email (String)

    Email of user who received the message to view

  • message_id (String|Integer)

    Message id for message sent

Returns:



23
24
25
26
# File 'lib/iterable/email.rb', line 23

def view(email, message_id)
  params = { email: email, messageId: message_id }
  Iterable.request(conf, '/email/viewInBrowser', params).get
end