class MailchimpTransactional::MessagesApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/MailchimpTransactional/api/messages_api.rb, line 19
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

cancel_scheduled(body = {}) click to toggle source

Cancel scheduled email Cancels a scheduled email. @param body @param [Hash] opts the optional parameters @return [Array<(Array<InlineResponse20032>, Fixnum, Hash)>] Array<InlineResponse20032> data, response status code and response headers

# 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 = {}) click to toggle source

Get message content Get the full content of a recently sent message. @param body @param [Hash] opts the optional parameters @return [Array<(InlineResponse20030, Fixnum, Hash)>] InlineResponse20030 data, response status code and response headers

# 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 = {}) click to toggle source

Get message info Get the information for a single recently sent message. @param body @param [Hash] opts the optional parameters @return [Array<(InlineResponse20029, Fixnum, Hash)>] InlineResponse20029 data, response status code and response headers

# 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 = {}) click to toggle source

List scheduled emails Queries your scheduled emails. @param body @param [Hash] opts the optional parameters @return [Array<(Array<InlineResponse20032>, Fixnum, Hash)>] Array<InlineResponse20032> data, response status code and response headers

# 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 = {}) click to toggle source

Parse mime document Parse the full MIME document for an email message, returning the content of the message broken into its constituent pieces. @param body @param [Hash] opts the optional parameters @return [Array<(InlineResponse20031, Fixnum, Hash)>] InlineResponse20031 data, response status code and response headers

# 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 = {}) click to toggle source

Reschedule email Reschedules a scheduled email. @param body @param [Hash] opts the optional parameters @return [Array<(Array<InlineResponse20032>, Fixnum, Hash)>] Array<InlineResponse20032> data, response status code and response headers

# File lib/MailchimpTransactional/api/messages_api.rb, line 78
def reschedule(body = {})
  data = @api_client.call_api(:POST, '/messages/reschedule', body)
  data
end
search_time_series(body = {}) click to toggle source

Search messages by hour Search the content of recently sent messages and return the aggregated hourly stats for matching messages. @param body @param [Hash] opts the optional parameters @return [Array<(Array<InlineResponse20028>, Fixnum, Hash)>] Array<InlineResponse20028> data, response status code and response headers

# 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 = {}) click to toggle source

Send new message Send a new transactional message through the Transactional API. @param body @param [Hash] opts the optional parameters @return [Array<(Array<InlineResponse20025>, Fixnum, Hash)>] Array<InlineResponse20025> data, response status code and response headers

# 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 = {}) click to toggle source

Send mime document Take a raw MIME document for a message, and send it exactly as if it were sent through the Transactional API&#39;s SMTP servers. @param body @param [Hash] opts the optional parameters @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers

# 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 = {}) click to toggle source

Send using message template Send a new transactional message through the Transactional API using a template. @param body @param [Hash] opts the optional parameters @return [Array<(Array<InlineResponse20026>, Fixnum, Hash)>] Array<InlineResponse20026> data, response status code and response headers

# 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