Class: Mailosaur::Models::MessageCreateOptions
- Defined in:
- lib/Mailosaur/models/message_create_options.rb
Instance Attribute Summary collapse
-
#attachments ⇒ Array<Attachment>
Any message attachments.
-
#cc ⇒ String
Must be a verified email address.
-
#from ⇒ String
‘from’ address.
-
#html ⇒ String
or html can be supplied, not both.
-
#send ⇒ Boolean
If true, email will be sent upon creation.
-
#subject ⇒ String
The email subject line.
-
#text ⇒ String
text or html can be supplied, not both.
-
#to ⇒ String
Must be a verified email address.
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ MessageCreateOptions
constructor
A new instance of MessageCreateOptions.
Methods inherited from BaseModel
Constructor Details
#initialize(data = {}) ⇒ MessageCreateOptions
Returns a new instance of MessageCreateOptions.
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/Mailosaur/models/message_create_options.rb', line 4 def initialize(data = {}) @to = data['to'] @cc = data['cc'] @from = data['from'] @send = data['send'] @subject = data['subject'] @text = data['text'] @html = data['html'] @attachments = data['attachments'] end |
Instance Attribute Details
#attachments ⇒ Array<Attachment>
Returns Any message attachments.
43 44 45 |
# File 'lib/Mailosaur/models/message_create_options.rb', line 43 def @attachments end |
#cc ⇒ String
Must be a verified email address.
21 22 23 |
# File 'lib/Mailosaur/models/message_create_options.rb', line 21 def cc @cc end |
#from ⇒ String
‘from’ address. This must be an address ending with YOUR_SERVER.mailosaur.net, such as ‘[email protected]`.
26 27 28 |
# File 'lib/Mailosaur/models/message_create_options.rb', line 26 def from @from end |
#html ⇒ String
or html can be supplied, not both.
40 41 42 |
# File 'lib/Mailosaur/models/message_create_options.rb', line 40 def html @html end |
#send ⇒ Boolean
Returns If true, email will be sent upon creation.
29 30 31 |
# File 'lib/Mailosaur/models/message_create_options.rb', line 29 def send @send end |
#subject ⇒ String
Returns The email subject line.
32 33 34 |
# File 'lib/Mailosaur/models/message_create_options.rb', line 32 def subject @subject end |
#text ⇒ String
text or html can be supplied, not both.
36 37 38 |
# File 'lib/Mailosaur/models/message_create_options.rb', line 36 def text @text end |
#to ⇒ String
Must be a verified email address.
17 18 19 |
# File 'lib/Mailosaur/models/message_create_options.rb', line 17 def to @to end |