Class: MailUp::Console::Email
- Inherits:
-
Object
- Object
- MailUp::Console::Email
- Defined in:
- lib/mailup/console/email.rb
Instance Attribute Summary collapse
-
#api ⇒ Object
Returns the value of attribute api.
Instance Method Summary collapse
-
#initialize(api) ⇒ Email
constructor
A new instance of Email.
-
#send(message_id, email) ⇒ JSON
Send single email message to specified recipient.
Constructor Details
#initialize(api) ⇒ Email
Returns a new instance of Email.
6 7 8 |
# File 'lib/mailup/console/email.rb', line 6 def initialize(api) @api = api end |
Instance Attribute Details
#api ⇒ Object
Returns the value of attribute api.
4 5 6 |
# File 'lib/mailup/console/email.rb', line 4 def api @api end |
Instance Method Details
#send(message_id, email) ⇒ JSON
Send single email message to specified recipient.
29 30 31 |
# File 'lib/mailup/console/email.rb', line 29 def send(, email) @api.post("#{@api.path}/Email/Send", body: {:idMessage => , :Email => email}) end |