Class: MailchimpTransactional::MessagesApi

Inherits:
Object
  • Object
show all
Defined in:
lib/MailchimpTransactional/api/messages_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_clientObject

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.

Parameters:

  • body (defaults to: {})
  • opts (Hash)

    the optional parameters

Returns:

  • (Array<(Array<InlineResponse20035>, Fixnum, Hash)>)

    Array<InlineResponse20035> data, response status code and response headers



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.

Parameters:

  • body (defaults to: {})
  • opts (Hash)

    the optional parameters

Returns:

  • (Array<(InlineResponse20033, Fixnum, Hash)>)

    InlineResponse20033 data, response status code and response headers



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.

Parameters:

  • body (defaults to: {})
  • opts (Hash)

    the optional parameters

Returns:

  • (Array<(InlineResponse20032, Fixnum, Hash)>)

    InlineResponse20032 data, response status code and response headers



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.

Parameters:

  • body (defaults to: {})
  • opts (Hash)

    the optional parameters

Returns:

  • (Array<(Array<InlineResponse20035>, Fixnum, Hash)>)

    Array<InlineResponse20035> data, response status code and response headers



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.

Parameters:

  • body (defaults to: {})
  • opts (Hash)

    the optional parameters

Returns:

  • (Array<(InlineResponse20034, Fixnum, Hash)>)

    InlineResponse20034 data, response status code and response headers



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.

Parameters:

  • body (defaults to: {})
  • opts (Hash)

    the optional parameters

Returns:

  • (Array<(Array<InlineResponse20035>, Fixnum, Hash)>)

    Array<InlineResponse20035> data, response status code and response headers



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.

Parameters:

  • body (defaults to: {})
  • opts (Hash)

    the optional parameters

Returns:

  • (Array<(Array<InlineResponse20030>, Fixnum, Hash)>)

    Array<InlineResponse20030> data, response status code and response headers



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.

Parameters:

  • body (defaults to: {})
  • opts (Hash)

    the optional parameters

Returns:

  • (Array<(Array<InlineResponse20031>, Fixnum, Hash)>)

    Array<InlineResponse20031> data, response status code and response headers



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.

Parameters:

  • body (defaults to: {})
  • opts (Hash)

    the optional parameters

Returns:

  • (Array<(Array<InlineResponse20028>, Fixnum, Hash)>)

    Array<InlineResponse20028> data, response status code and response headers



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&#39;s SMTP servers.

Parameters:

  • body (defaults to: {})
  • opts (Hash)

    the optional parameters

Returns:

  • (Array<(Object, Fixnum, Hash)>)

    Object data, response status code and response headers



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.

Parameters:

  • body (defaults to: {})
  • opts (Hash)

    the optional parameters

Returns:

  • (Array<(Array<InlineResponse20029>, Fixnum, Hash)>)

    Array<InlineResponse20029> data, response status code and response headers



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