Class: MailchimpTransactional::MessagesApi
- Inherits:
-
Object
- Object
- MailchimpTransactional::MessagesApi
- Defined in:
- lib/MailchimpTransactional/api/messages_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#cancel_scheduled(body = {}) ⇒ Array<(Array<InlineResponse20035>, Fixnum, Hash)>
Cancel scheduled email Cancels a scheduled email.
-
#content(body = {}) ⇒ Array<(InlineResponse20033, Fixnum, Hash)>
Get message content Get the full content of a recently sent message.
-
#info(body = {}) ⇒ Array<(InlineResponse20032, Fixnum, Hash)>
Get message info Get the information for a single recently sent message.
-
#initialize(api_client = ApiClient.default) ⇒ MessagesApi
constructor
A new instance of MessagesApi.
-
#list_scheduled(body = {}) ⇒ Array<(Array<InlineResponse20035>, Fixnum, Hash)>
List scheduled emails Queries your scheduled emails.
-
#parse(body = {}) ⇒ Array<(InlineResponse20034, Fixnum, Hash)>
Parse mime document Parse the full MIME document for an email message, returning the content of the message broken into its constituent pieces.
-
#reschedule(body = {}) ⇒ Array<(Array<InlineResponse20035>, Fixnum, Hash)>
Reschedule email Reschedules a scheduled email.
-
#search(body = {}) ⇒ Array<(Array<InlineResponse20030>, Fixnum, Hash)>
Search messages by date Search recently sent messages and optionally narrow by date range, tags, senders, and API keys.
-
#search_time_series(body = {}) ⇒ Array<(Array<InlineResponse20031>, Fixnum, Hash)>
Search messages by hour Search the content of recently sent messages and return the aggregated hourly stats for matching messages.
-
#send(body = {}) ⇒ Array<(Array<InlineResponse20028>, Fixnum, Hash)>
Send new message Send a new transactional message through the Transactional API.
-
#send_raw(body = {}) ⇒ Array<(Object, Fixnum, Hash)>
Send mime document Take a raw MIME document for a message, and send it exactly as if it were sent through the Transactional API's SMTP servers.
-
#send_template(body = {}) ⇒ Array<(Array<InlineResponse20029>, Fixnum, Hash)>
Send using message template Send a new transactional message through the Transactional API using a template.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ MessagesApi
Returns a new instance of MessagesApi.
19 20 21 |
# File 'lib/MailchimpTransactional/api/messages_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/MailchimpTransactional/api/messages_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#cancel_scheduled(body = {}) ⇒ Array<(Array<InlineResponse20035>, Fixnum, Hash)>
Cancel scheduled email Cancels a scheduled email.
28 29 30 31 |
# File 'lib/MailchimpTransactional/api/messages_api.rb', line 28 def cancel_scheduled(body = {}) data = @api_client.call_api(:POST, '/messages/cancel-scheduled', body) data end |
#content(body = {}) ⇒ Array<(InlineResponse20033, Fixnum, Hash)>
Get message content Get the full content of a recently sent message.
38 39 40 41 |
# File 'lib/MailchimpTransactional/api/messages_api.rb', line 38 def content(body = {}) data = @api_client.call_api(:POST, '/messages/content', body) data end |
#info(body = {}) ⇒ Array<(InlineResponse20032, Fixnum, Hash)>
Get message info Get the information for a single recently sent message.
48 49 50 51 |
# File 'lib/MailchimpTransactional/api/messages_api.rb', line 48 def info(body = {}) data = @api_client.call_api(:POST, '/messages/info', body) data end |
#list_scheduled(body = {}) ⇒ Array<(Array<InlineResponse20035>, Fixnum, Hash)>
List scheduled emails Queries your scheduled emails.
58 59 60 61 |
# File 'lib/MailchimpTransactional/api/messages_api.rb', line 58 def list_scheduled(body = {}) data = @api_client.call_api(:POST, '/messages/list-scheduled', body) data end |
#parse(body = {}) ⇒ Array<(InlineResponse20034, Fixnum, Hash)>
Parse mime document Parse the full MIME document for an email message, returning the content of the message broken into its constituent pieces.
68 69 70 71 |
# File 'lib/MailchimpTransactional/api/messages_api.rb', line 68 def parse(body = {}) data = @api_client.call_api(:POST, '/messages/parse', body) data end |
#reschedule(body = {}) ⇒ Array<(Array<InlineResponse20035>, Fixnum, Hash)>
Reschedule email Reschedules a scheduled email.
78 79 80 81 |
# File 'lib/MailchimpTransactional/api/messages_api.rb', line 78 def reschedule(body = {}) data = @api_client.call_api(:POST, '/messages/reschedule', body) data end |
#search(body = {}) ⇒ Array<(Array<InlineResponse20030>, Fixnum, Hash)>
Search messages by date Search recently sent messages and optionally narrow by date range, tags, senders, and API keys. If no date range is specified, results within the last 7 days are returned. This method may be called up to 20 times per minute. If you need the data more often, you can use /messages/info.json to get the information for a single message, or webhooks to push activity to your own application for querying.
88 89 90 91 |
# File 'lib/MailchimpTransactional/api/messages_api.rb', line 88 def search(body = {}) data = @api_client.call_api(:POST, '/messages/search', body) data end |
#search_time_series(body = {}) ⇒ Array<(Array<InlineResponse20031>, Fixnum, Hash)>
Search messages by hour Search the content of recently sent messages and return the aggregated hourly stats for matching messages.
98 99 100 101 |
# File 'lib/MailchimpTransactional/api/messages_api.rb', line 98 def search_time_series(body = {}) data = @api_client.call_api(:POST, '/messages/search-time-series', body) data end |
#send(body = {}) ⇒ Array<(Array<InlineResponse20028>, Fixnum, Hash)>
Send new message Send a new transactional message through the Transactional API.
108 109 110 111 |
# File 'lib/MailchimpTransactional/api/messages_api.rb', line 108 def send(body = {}) data = @api_client.call_api(:POST, '/messages/send', body) data end |
#send_raw(body = {}) ⇒ Array<(Object, Fixnum, Hash)>
Send mime document Take a raw MIME document for a message, and send it exactly as if it were sent through the Transactional API's SMTP servers.
118 119 120 121 |
# File 'lib/MailchimpTransactional/api/messages_api.rb', line 118 def send_raw(body = {}) data = @api_client.call_api(:POST, '/messages/send-raw', body) data end |
#send_template(body = {}) ⇒ Array<(Array<InlineResponse20029>, Fixnum, Hash)>
Send using message template Send a new transactional message through the Transactional API using a template.
128 129 130 131 |
# File 'lib/MailchimpTransactional/api/messages_api.rb', line 128 def send_template(body = {}) data = @api_client.call_api(:POST, '/messages/send-template', body) data end |