MailchimpTransactional 1.0.4 → 1.0.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,7 +3,7 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 1.0.4
6
+ OpenAPI spec version: 1.0.11
7
7
  Contact: apihelp@mandrill.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
@@ -16,341 +16,118 @@ module MailchimpTransactional
16
16
  class MessagesApi
17
17
  attr_accessor :api_client
18
18
 
19
- attr_accessor :api_key
20
-
21
- def initialize(api_key = '', api_client = ApiClient.default)
22
- @api_key = api_key
19
+ def initialize(api_client = ApiClient.default)
23
20
  @api_client = api_client
24
21
  end
25
- # /messages/cancel-scheduled
26
- # Queries your scheduled emails.
27
- # @param body
28
- # @param [Hash] opts the optional parameters
29
- # @return [Array<InlineResponse20032>]
30
- def cancel_scheduled(body = {}, opts = {})
31
- data, _status_code, _headers = cancel_scheduled_with_http_info(body, opts)
32
- data
33
- end
34
22
 
35
- # /messages/cancel-scheduled
36
- # Queries your scheduled emails.
23
+ # Cancel scheduled email
24
+ # Cancels a scheduled email.
37
25
  # @param body
38
26
  # @param [Hash] opts the optional parameters
39
27
  # @return [Array<(Array<InlineResponse20032>, Fixnum, Hash)>] Array<InlineResponse20032> data, response status code and response headers
40
- def cancel_scheduled_with_http_info(body, opts = {})
41
- # add api key to request body
42
- body[:key] = @api_key
43
-
44
- # resource path
45
- local_var_path = '/messages/cancel-scheduled'
46
-
47
- # http body (model)
48
- auth_names = []
49
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
50
- :body => body,
51
- :auth_names => auth_names,
52
- :return_type => 'Array<InlineResponse20032>')
53
- return data, status_code, headers
54
- end
55
- # /messages/content
56
- # Get the full content of a recently sent message
57
- # @param body
58
- # @param [Hash] opts the optional parameters
59
- # @return [InlineResponse20030]
60
- def content(body = {}, opts = {})
61
- data, _status_code, _headers = content_with_http_info(body, opts)
28
+ def cancel_scheduled(body = {})
29
+ data = @api_client.call_api(:POST, '/messages/cancel-scheduled', body)
62
30
  data
63
31
  end
64
32
 
65
- # /messages/content
66
- # Get the full content of a recently sent message
33
+ # Get message content
34
+ # Get the full content of a recently sent message.
67
35
  # @param body
68
36
  # @param [Hash] opts the optional parameters
69
37
  # @return [Array<(InlineResponse20030, Fixnum, Hash)>] InlineResponse20030 data, response status code and response headers
70
- def content_with_http_info(body, opts = {})
71
- # add api key to request body
72
- body[:key] = @api_key
73
-
74
- # resource path
75
- local_var_path = '/messages/content'
76
-
77
- # http body (model)
78
- auth_names = []
79
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
80
- :body => body,
81
- :auth_names => auth_names,
82
- :return_type => 'InlineResponse20030')
83
- return data, status_code, headers
84
- end
85
- # /messages/info
86
- # Get the information for a single recently sent message
87
- # @param body
88
- # @param [Hash] opts the optional parameters
89
- # @return [InlineResponse20029]
90
- def info(body = {}, opts = {})
91
- data, _status_code, _headers = info_with_http_info(body, opts)
38
+ def content(body = {})
39
+ data = @api_client.call_api(:POST, '/messages/content', body)
92
40
  data
93
41
  end
94
42
 
95
- # /messages/info
96
- # Get the information for a single recently sent message
43
+ # Get message info
44
+ # Get the information for a single recently sent message.
97
45
  # @param body
98
46
  # @param [Hash] opts the optional parameters
99
47
  # @return [Array<(InlineResponse20029, Fixnum, Hash)>] InlineResponse20029 data, response status code and response headers
100
- def info_with_http_info(body, opts = {})
101
- # add api key to request body
102
- body[:key] = @api_key
103
-
104
- # resource path
105
- local_var_path = '/messages/info'
106
-
107
- # http body (model)
108
- auth_names = []
109
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
110
- :body => body,
111
- :auth_names => auth_names,
112
- :return_type => 'InlineResponse20029')
113
- return data, status_code, headers
114
- end
115
- # /messages/list-scheduled
116
- # Queries your scheduled emails.
117
- # @param body
118
- # @param [Hash] opts the optional parameters
119
- # @return [Array<InlineResponse20032>]
120
- def list_scheduled(body = {}, opts = {})
121
- data, _status_code, _headers = list_scheduled_with_http_info(body, opts)
48
+ def info(body = {})
49
+ data = @api_client.call_api(:POST, '/messages/info', body)
122
50
  data
123
51
  end
124
52
 
125
- # /messages/list-scheduled
53
+ # List scheduled emails
126
54
  # Queries your scheduled emails.
127
55
  # @param body
128
56
  # @param [Hash] opts the optional parameters
129
57
  # @return [Array<(Array<InlineResponse20032>, Fixnum, Hash)>] Array<InlineResponse20032> data, response status code and response headers
130
- def list_scheduled_with_http_info(body, opts = {})
131
- # add api key to request body
132
- body[:key] = @api_key
133
-
134
- # resource path
135
- local_var_path = '/messages/list-scheduled'
136
-
137
- # http body (model)
138
- auth_names = []
139
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
140
- :body => body,
141
- :auth_names => auth_names,
142
- :return_type => 'Array<InlineResponse20032>')
143
- return data, status_code, headers
144
- end
145
- # /messages/parse
146
- # Parse the full MIME document for an email message, returning the content of the message broken into its constituent pieces
147
- # @param body
148
- # @param [Hash] opts the optional parameters
149
- # @return [InlineResponse20031]
150
- def parse(body = {}, opts = {})
151
- data, _status_code, _headers = parse_with_http_info(body, opts)
58
+ def list_scheduled(body = {})
59
+ data = @api_client.call_api(:POST, '/messages/list-scheduled', body)
152
60
  data
153
61
  end
154
62
 
155
- # /messages/parse
156
- # Parse the full MIME document for an email message, returning the content of the message broken into its constituent pieces
63
+ # Parse mime document
64
+ # Parse the full MIME document for an email message, returning the content of the message broken into its constituent pieces.
157
65
  # @param body
158
66
  # @param [Hash] opts the optional parameters
159
67
  # @return [Array<(InlineResponse20031, Fixnum, Hash)>] InlineResponse20031 data, response status code and response headers
160
- def parse_with_http_info(body, opts = {})
161
- # add api key to request body
162
- body[:key] = @api_key
163
-
164
- # resource path
165
- local_var_path = '/messages/parse'
166
-
167
- # http body (model)
168
- auth_names = []
169
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
170
- :body => body,
171
- :auth_names => auth_names,
172
- :return_type => 'InlineResponse20031')
173
- return data, status_code, headers
174
- end
175
- # /messages/reschedule
176
- # Queries your scheduled emails.
177
- # @param body
178
- # @param [Hash] opts the optional parameters
179
- # @return [Array<InlineResponse20032>]
180
- def reschedule(body = {}, opts = {})
181
- data, _status_code, _headers = reschedule_with_http_info(body, opts)
68
+ def parse(body = {})
69
+ data = @api_client.call_api(:POST, '/messages/parse', body)
182
70
  data
183
71
  end
184
72
 
185
- # /messages/reschedule
186
- # Queries your scheduled emails.
73
+ # Reschedule email
74
+ # Reschedules a scheduled email.
187
75
  # @param body
188
76
  # @param [Hash] opts the optional parameters
189
77
  # @return [Array<(Array<InlineResponse20032>, Fixnum, Hash)>] Array<InlineResponse20032> data, response status code and response headers
190
- def reschedule_with_http_info(body, opts = {})
191
- # add api key to request body
192
- body[:key] = @api_key
193
-
194
- # resource path
195
- local_var_path = '/messages/reschedule'
196
-
197
- # http body (model)
198
- auth_names = []
199
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
200
- :body => body,
201
- :auth_names => auth_names,
202
- :return_type => 'Array<InlineResponse20032>')
203
- return data, status_code, headers
204
- end
205
- # /messages/search
206
- # 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.
207
- # @param body
208
- # @param [Hash] opts the optional parameters
209
- # @return [Array<InlineResponse20027>]
210
- def search(body = {}, opts = {})
211
- data, _status_code, _headers = search_with_http_info(body, opts)
78
+ def reschedule(body = {})
79
+ data = @api_client.call_api(:POST, '/messages/reschedule', body)
212
80
  data
213
81
  end
214
82
 
215
- # /messages/search
83
+ # Search messages by date
216
84
  # 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.
217
85
  # @param body
218
86
  # @param [Hash] opts the optional parameters
219
87
  # @return [Array<(Array<InlineResponse20027>, Fixnum, Hash)>] Array<InlineResponse20027> data, response status code and response headers
220
- def search_with_http_info(body, opts = {})
221
- # add api key to request body
222
- body[:key] = @api_key
223
-
224
- # resource path
225
- local_var_path = '/messages/search'
226
-
227
- # http body (model)
228
- auth_names = []
229
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
230
- :body => body,
231
- :auth_names => auth_names,
232
- :return_type => 'Array<InlineResponse20027>')
233
- return data, status_code, headers
234
- end
235
- # /messages/search-time-series
236
- # Search the content of recently sent messages and return the aggregated hourly stats for matching messages
237
- # @param body
238
- # @param [Hash] opts the optional parameters
239
- # @return [Array<InlineResponse20028>]
240
- def search_time_series(body = {}, opts = {})
241
- data, _status_code, _headers = search_time_series_with_http_info(body, opts)
88
+ def search(body = {})
89
+ data = @api_client.call_api(:POST, '/messages/search', body)
242
90
  data
243
91
  end
244
92
 
245
- # /messages/search-time-series
246
- # Search the content of recently sent messages and return the aggregated hourly stats for matching messages
93
+ # Search messages by hour
94
+ # Search the content of recently sent messages and return the aggregated hourly stats for matching messages.
247
95
  # @param body
248
96
  # @param [Hash] opts the optional parameters
249
97
  # @return [Array<(Array<InlineResponse20028>, Fixnum, Hash)>] Array<InlineResponse20028> data, response status code and response headers
250
- def search_time_series_with_http_info(body, opts = {})
251
- # add api key to request body
252
- body[:key] = @api_key
253
-
254
- # resource path
255
- local_var_path = '/messages/search-time-series'
256
-
257
- # http body (model)
258
- auth_names = []
259
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
260
- :body => body,
261
- :auth_names => auth_names,
262
- :return_type => 'Array<InlineResponse20028>')
263
- return data, status_code, headers
264
- end
265
- # /messages/send
266
- # Send a new transactional message through Mandrill
267
- # @param body
268
- # @param [Hash] opts the optional parameters
269
- # @return [Array<InlineResponse20025>]
270
- def send(body = {}, opts = {})
271
- data, _status_code, _headers = send_with_http_info(body, opts)
98
+ def search_time_series(body = {})
99
+ data = @api_client.call_api(:POST, '/messages/search-time-series', body)
272
100
  data
273
101
  end
274
102
 
275
- # /messages/send
276
- # Send a new transactional message through Mandrill
103
+ # Send new message
104
+ # Send a new transactional message through the Transactional API.
277
105
  # @param body
278
106
  # @param [Hash] opts the optional parameters
279
107
  # @return [Array<(Array<InlineResponse20025>, Fixnum, Hash)>] Array<InlineResponse20025> data, response status code and response headers
280
- def send_with_http_info(body, opts = {})
281
- # add api key to request body
282
- body[:key] = @api_key
283
-
284
- # resource path
285
- local_var_path = '/messages/send'
286
-
287
- # http body (model)
288
- auth_names = []
289
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
290
- :body => body,
291
- :auth_names => auth_names,
292
- :return_type => 'Array<InlineResponse20025>')
293
- return data, status_code, headers
294
- end
295
- # /messages/send-raw
296
- # Take a raw MIME document for a message, and send it exactly as if it were sent through Mandrill's SMTP servers
297
- # @param body
298
- # @param [Hash] opts the optional parameters
299
- # @return [Object]
300
- def send_raw(body = {}, opts = {})
301
- data, _status_code, _headers = send_raw_with_http_info(body, opts)
108
+ def send(body = {})
109
+ data = @api_client.call_api(:POST, '/messages/send', body)
302
110
  data
303
111
  end
304
112
 
305
- # /messages/send-raw
306
- # Take a raw MIME document for a message, and send it exactly as if it were sent through Mandrill&#39;s SMTP servers
113
+ # Send mime document
114
+ # 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.
307
115
  # @param body
308
116
  # @param [Hash] opts the optional parameters
309
117
  # @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
310
- def send_raw_with_http_info(body, opts = {})
311
- # add api key to request body
312
- body[:key] = @api_key
313
-
314
- # resource path
315
- local_var_path = '/messages/send-raw'
316
-
317
- # http body (model)
318
- auth_names = []
319
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
320
- :body => body,
321
- :auth_names => auth_names,
322
- :return_type => 'Object')
323
- return data, status_code, headers
324
- end
325
- # /messages/send-template
326
- # Send a new transactional message through Mandrill
327
- # @param body
328
- # @param [Hash] opts the optional parameters
329
- # @return [Array<InlineResponse20026>]
330
- def send_template(body = {}, opts = {})
331
- data, _status_code, _headers = send_template_with_http_info(body, opts)
118
+ def send_raw(body = {})
119
+ data = @api_client.call_api(:POST, '/messages/send-raw', body)
332
120
  data
333
121
  end
334
122
 
335
- # /messages/send-template
336
- # Send a new transactional message through Mandrill
123
+ # Send using message template
124
+ # Send a new transactional message through the Transactional API using a template.
337
125
  # @param body
338
126
  # @param [Hash] opts the optional parameters
339
127
  # @return [Array<(Array<InlineResponse20026>, Fixnum, Hash)>] Array<InlineResponse20026> data, response status code and response headers
340
- def send_template_with_http_info(body, opts = {})
341
- # add api key to request body
342
- body[:key] = @api_key
343
-
344
- # resource path
345
- local_var_path = '/messages/send-template'
346
-
347
- # http body (model)
348
- auth_names = []
349
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
350
- :body => body,
351
- :auth_names => auth_names,
352
- :return_type => 'Array<InlineResponse20026>')
353
- return data, status_code, headers
128
+ def send_template(body = {})
129
+ data = @api_client.call_api(:POST, '/messages/send-template', body)
130
+ data
354
131
  end
355
132
  end
356
133
  end
@@ -3,7 +3,7 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 1.0.4
6
+ OpenAPI spec version: 1.0.11
7
7
  Contact: apihelp@mandrill.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
@@ -16,131 +16,48 @@ module MailchimpTransactional
16
16
  class MetadataApi
17
17
  attr_accessor :api_client
18
18
 
19
- attr_accessor :api_key
20
-
21
- def initialize(api_key = '', api_client = ApiClient.default)
22
- @api_key = api_key
19
+ def initialize(api_client = ApiClient.default)
23
20
  @api_client = api_client
24
21
  end
25
- # /metadata/add
26
- # Add a new custom metadata field to be indexed for the account.
27
- # @param body
28
- # @param [Hash] opts the optional parameters
29
- # @return [InlineResponse20034]
30
- def add(body = {}, opts = {})
31
- data, _status_code, _headers = add_with_http_info(body, opts)
32
- data
33
- end
34
22
 
35
- # /metadata/add
23
+ # Add metadata field
36
24
  # Add a new custom metadata field to be indexed for the account.
37
25
  # @param body
38
26
  # @param [Hash] opts the optional parameters
39
27
  # @return [Array<(InlineResponse20034, Fixnum, Hash)>] InlineResponse20034 data, response status code and response headers
40
- def add_with_http_info(body, opts = {})
41
- # add api key to request body
42
- body[:key] = @api_key
43
-
44
- # resource path
45
- local_var_path = '/metadata/add'
46
-
47
- # http body (model)
48
- auth_names = []
49
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
50
- :body => body,
51
- :auth_names => auth_names,
52
- :return_type => 'InlineResponse20034')
53
- return data, status_code, headers
54
- end
55
- # /metadata/delete
56
- # Delete an existing custom metadata field. Deletion isn't instataneous, and /metadata/list will continue to return the field until the asynchronous deletion process is complete.
57
- # @param body
58
- # @param [Hash] opts the optional parameters
59
- # @return [InlineResponse20036]
60
- def delete(body = {}, opts = {})
61
- data, _status_code, _headers = delete_with_http_info(body, opts)
28
+ def add(body = {})
29
+ data = @api_client.call_api(:POST, '/metadata/add', body)
62
30
  data
63
31
  end
64
32
 
65
- # /metadata/delete
33
+ # Delete metadata field
66
34
  # Delete an existing custom metadata field. Deletion isn&#39;t instataneous, and /metadata/list will continue to return the field until the asynchronous deletion process is complete.
67
35
  # @param body
68
36
  # @param [Hash] opts the optional parameters
69
37
  # @return [Array<(InlineResponse20036, Fixnum, Hash)>] InlineResponse20036 data, response status code and response headers
70
- def delete_with_http_info(body, opts = {})
71
- # add api key to request body
72
- body[:key] = @api_key
73
-
74
- # resource path
75
- local_var_path = '/metadata/delete'
76
-
77
- # http body (model)
78
- auth_names = []
79
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
80
- :body => body,
81
- :auth_names => auth_names,
82
- :return_type => 'InlineResponse20036')
83
- return data, status_code, headers
84
- end
85
- # /metadata/list
86
- # Get the list of custom metadata fields indexed for the account.
87
- # @param body
88
- # @param [Hash] opts the optional parameters
89
- # @return [Array<InlineResponse20033>]
90
- def list(body = {}, opts = {})
91
- data, _status_code, _headers = list_with_http_info(body, opts)
38
+ def delete(body = {})
39
+ data = @api_client.call_api(:POST, '/metadata/delete', body)
92
40
  data
93
41
  end
94
42
 
95
- # /metadata/list
43
+ # List metadata fields
96
44
  # Get the list of custom metadata fields indexed for the account.
97
45
  # @param body
98
46
  # @param [Hash] opts the optional parameters
99
47
  # @return [Array<(Array<InlineResponse20033>, Fixnum, Hash)>] Array<InlineResponse20033> data, response status code and response headers
100
- def list_with_http_info(body, opts = {})
101
- # add api key to request body
102
- body[:key] = @api_key
103
-
104
- # resource path
105
- local_var_path = '/metadata/list'
106
-
107
- # http body (model)
108
- auth_names = []
109
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
110
- :body => body,
111
- :auth_names => auth_names,
112
- :return_type => 'Array<InlineResponse20033>')
113
- return data, status_code, headers
114
- end
115
- # /metadata/update
116
- # Delete an existing custom metadata field. Deletion isn't instataneous, and /metadata/list will continue to return the field until the asynchronous deletion process is complete.
117
- # @param body
118
- # @param [Hash] opts the optional parameters
119
- # @return [InlineResponse20035]
120
- def update(body = {}, opts = {})
121
- data, _status_code, _headers = update_with_http_info(body, opts)
48
+ def list(body = {})
49
+ data = @api_client.call_api(:POST, '/metadata/list', body)
122
50
  data
123
51
  end
124
52
 
125
- # /metadata/update
126
- # Delete an existing custom metadata field. Deletion isn&#39;t instataneous, and /metadata/list will continue to return the field until the asynchronous deletion process is complete.
53
+ # Update metadata field
54
+ # Update an existing custom metadata field.
127
55
  # @param body
128
56
  # @param [Hash] opts the optional parameters
129
57
  # @return [Array<(InlineResponse20035, Fixnum, Hash)>] InlineResponse20035 data, response status code and response headers
130
- def update_with_http_info(body, opts = {})
131
- # add api key to request body
132
- body[:key] = @api_key
133
-
134
- # resource path
135
- local_var_path = '/metadata/update'
136
-
137
- # http body (model)
138
- auth_names = []
139
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
140
- :body => body,
141
- :auth_names => auth_names,
142
- :return_type => 'InlineResponse20035')
143
- return data, status_code, headers
58
+ def update(body = {})
59
+ data = @api_client.call_api(:POST, '/metadata/update', body)
60
+ data
144
61
  end
145
62
  end
146
63
  end