Class: Mailtrap::EmailTemplate
- Inherits:
-
Struct
- Object
- Struct
- Mailtrap::EmailTemplate
- Defined in:
- lib/mailtrap/email_template.rb
Overview
Data Transfer Object for Email Template
For field descriptions and response format, see the official API documentation:
Instance Attribute Summary collapse
-
#body_html ⇒ String
readonly
The HTML content.
-
#body_text ⇒ String
readonly
The plain text content.
-
#category ⇒ String
readonly
The template category.
-
#created_at ⇒ String
readonly
The creation timestamp.
-
#id ⇒ Integer
readonly
The template ID.
-
#name ⇒ String
readonly
The template name.
-
#subject ⇒ String
readonly
The email subject.
-
#updated_at ⇒ String
readonly
The last update timestamp.
-
#uuid ⇒ String
readonly
The template UUID.
Instance Method Summary collapse
-
#to_h ⇒ Hash
The template attributes as a hash.
Instance Attribute Details
#body_html ⇒ String (readonly)
The HTML content
18 19 20 |
# File 'lib/mailtrap/email_template.rb', line 18 def body_html @body_html end |
#body_text ⇒ String (readonly)
The plain text content
18 19 20 |
# File 'lib/mailtrap/email_template.rb', line 18 def body_text @body_text end |
#category ⇒ String (readonly)
The template category
18 19 20 |
# File 'lib/mailtrap/email_template.rb', line 18 def category @category end |
#created_at ⇒ String (readonly)
The creation timestamp
18 19 20 |
# File 'lib/mailtrap/email_template.rb', line 18 def created_at @created_at end |
#id ⇒ Integer (readonly)
The template ID
18 19 20 |
# File 'lib/mailtrap/email_template.rb', line 18 def id @id end |
#name ⇒ String (readonly)
The template name
18 19 20 |
# File 'lib/mailtrap/email_template.rb', line 18 def name @name end |
#subject ⇒ String (readonly)
The email subject
18 19 20 |
# File 'lib/mailtrap/email_template.rb', line 18 def subject @subject end |
#updated_at ⇒ String (readonly)
The last update timestamp
18 19 20 |
# File 'lib/mailtrap/email_template.rb', line 18 def updated_at @updated_at end |
#uuid ⇒ String (readonly)
The template UUID
18 19 20 |
# File 'lib/mailtrap/email_template.rb', line 18 def uuid @uuid end |
Instance Method Details
#to_h ⇒ Hash
Returns The template attributes as a hash.
31 32 33 |
# File 'lib/mailtrap/email_template.rb', line 31 def to_h super.compact end |