Class: TMS::EmailMessage
- Inherits:
-
Object
- Object
- TMS::EmailMessage
- Includes:
- InstanceResource
- Defined in:
- lib/tms_client/resource/email_message.rb
Overview
An EmailMessage is used to create and send a email to a collection of EmailRecipient objects. Certain metrics are available after the email is sent, including the collection of recipients who clicked or opened the email.
Instance Attribute Summary collapse
-
#body ⇒ String
The body of the email.
-
#click_tracking_enabled ⇒ Boolean
Whether to track clicks on links in this message.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#from_name ⇒ String
The name of the person or entity sending the email.
-
#macros ⇒ Hash
A dictionary of key/value pairs to use in the subject and body as default macros.
-
#open_tracking_enabled ⇒ Boolean
Whether to track opens on this message.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#subject ⇒ String
The subject of the email.
Instance Method Summary collapse
-
#clicked ⇒ Object
A CollectionResource of EmailRecipients that clicked on at least one link in this email.
-
#opened ⇒ Object
A CollectionResource of EmailRecipients that opened this email.
-
#recipients ⇒ Object
A CollectionResource of EmailRecipients on this email.
Methods included from InstanceResource
Instance Attribute Details
#body ⇒ String
The body of the email
38 39 40 |
# File 'lib/tms_client/resource/email_message.rb', line 38 def body @body end |
#click_tracking_enabled ⇒ Boolean
Whether to track clicks on links in this message. Optional, defaults to true.
38 39 40 |
# File 'lib/tms_client/resource/email_message.rb', line 38 def click_tracking_enabled @click_tracking_enabled end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
1 2 3 |
# File 'lib/tms_client/resource/email_message.rb', line 1 def created_at @created_at end |
#from_name ⇒ String
The name of the person or entity sending the email.
38 39 40 |
# File 'lib/tms_client/resource/email_message.rb', line 38 def from_name @from_name end |
#macros ⇒ Hash
A dictionary of key/value pairs to use in the subject and body as default macros. The message-level macros are used when a recipient has no value for a given macro key.
38 39 40 |
# File 'lib/tms_client/resource/email_message.rb', line 38 def macros @macros end |
#open_tracking_enabled ⇒ Boolean
Whether to track opens on this message. Optional, defaults to true.
38 39 40 |
# File 'lib/tms_client/resource/email_message.rb', line 38 def open_tracking_enabled @open_tracking_enabled end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
1 2 3 |
# File 'lib/tms_client/resource/email_message.rb', line 1 def status @status end |
#subject ⇒ String
The subject of the email
38 39 40 |
# File 'lib/tms_client/resource/email_message.rb', line 38 def subject @subject end |
Instance Method Details
#clicked ⇒ Object
A CollectionResource of EmailRecipients that clicked on at least one link in this email
57 |
# File 'lib/tms_client/resource/email_message.rb', line 57 collection_attribute :clicked, 'EmailRecipients' |
#opened ⇒ Object
A CollectionResource of EmailRecipients that opened this email
53 |
# File 'lib/tms_client/resource/email_message.rb', line 53 collection_attribute :opened, 'EmailRecipients' |
#recipients ⇒ Object
A CollectionResource of EmailRecipients on this email
49 |
# File 'lib/tms_client/resource/email_message.rb', line 49 collection_attribute :recipients, 'EmailRecipients' |