Class: Emarsys::Email
- Inherits:
-
DataObject
- Object
- DataObject
- Emarsys::Email
- Defined in:
- lib/emarsys/data_objects/email.rb
Overview
Methods for the Email API
Class Method Summary collapse
-
.collection(params = {}) ⇒ Hash
List email campaigns.
-
.create(params = {}) ⇒ Hash
Create a new email campaign.
-
.delivery_status(id, params = {}) ⇒ Hash
Returns the delivery status of an email.
-
.email_launches(id) ⇒ Object
TODO POST /getlaunchesofemail.
-
.export_responses(params = {}) ⇒ Object
TODO POST /getresponses.
-
.launch(id, params = {}) ⇒ Hash
Launches an email.
-
.preview(id, version = 'html') ⇒ Hash
Preview an email.
-
.resource(id) ⇒ Hash
Get Email attirbutes of a specific email.
-
.response_summary(id) ⇒ Hash
View response summary of an email.
-
.send_test_mail(id, params = {}) ⇒ Hash
Instruct emarsys to send a test mail.
Methods inherited from DataObject
delete, get, parameterize_params, post, put, #request
Class Method Details
.collection(params = {}) ⇒ Hash
List email campaigns
19 20 21 |
# File 'lib/emarsys/data_objects/email.rb', line 19 def collection(params = {}) get 'email', params end |
.create(params = {}) ⇒ Hash
Create a new email campaign
55 56 57 |
# File 'lib/emarsys/data_objects/email.rb', line 55 def create(params = {}) post "email", params end |
.delivery_status(id, params = {}) ⇒ Hash
Returns the delivery status of an email
118 119 120 |
# File 'lib/emarsys/data_objects/email.rb', line 118 def delivery_status(id, params = {}) post "email/#{id}/getdeliverystatus", params end |
.email_launches(id) ⇒ Object
TODO POST /getlaunchesofemail
123 124 125 |
# File 'lib/emarsys/data_objects/email.rb', line 123 def email_launches(id) raise "Not implemented yet" end |
.export_responses(params = {}) ⇒ Object
TODO POST /getresponses
128 129 130 |
# File 'lib/emarsys/data_objects/email.rb', line 128 def export_responses(params = {}) raise "Not implemented yet" end |
.launch(id, params = {}) ⇒ Hash
Launches an email
68 69 70 |
# File 'lib/emarsys/data_objects/email.rb', line 68 def launch(id, params = {}) post "email/#{id}/launch", params end |
.preview(id, version = 'html') ⇒ Hash
Preview an email
79 80 81 |
# File 'lib/emarsys/data_objects/email.rb', line 79 def preview(id, version = 'html') post "email/#{id}/preview", {:version => version} end |
.resource(id) ⇒ Hash
Get Email attirbutes of a specific email
29 30 31 |
# File 'lib/emarsys/data_objects/email.rb', line 29 def resource(id) get "email/#{id}", {} end |
.response_summary(id) ⇒ Hash
View response summary of an email
89 90 91 |
# File 'lib/emarsys/data_objects/email.rb', line 89 def response_summary(id) get "email/#{id}/responsesummary", {} end |
.send_test_mail(id, params = {}) ⇒ Hash
Instruct emarsys to send a test mail
Only one of the three parameters must be sent.
105 106 107 |
# File 'lib/emarsys/data_objects/email.rb', line 105 def send_test_mail(id, params = {}) post "email/#{id}/sendtestmail", params end |