MailchimpTransactional 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,116 @@
1
+ =begin
2
+ #Mailchimp Transactional API
3
+
4
+ #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
+
6
+ OpenAPI spec version: 1.0.4
7
+ Contact: apihelp@mandrill.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.12
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module MailchimpTransactional
16
+ class RejectsApi
17
+ attr_accessor :api_client
18
+
19
+ attr_accessor :api_key
20
+
21
+ def initialize(api_key = '', api_client = ApiClient.default)
22
+ @api_key = api_key
23
+ @api_client = api_client
24
+ end
25
+ # /rejects/add
26
+ # Adds an email to your email rejection blacklist. Addresses that you add manually will never expire and there is no reputation penalty for removing them from your blacklist. Attempting to blacklist an address that has been whitelisted will have no effect.
27
+ # @param body
28
+ # @param [Hash] opts the optional parameters
29
+ # @return [InlineResponse20037]
30
+ def add(body = {}, opts = {})
31
+ data, _status_code, _headers = add_with_http_info(body, opts)
32
+ data
33
+ end
34
+
35
+ # /rejects/add
36
+ # Adds an email to your email rejection blacklist. Addresses that you add manually will never expire and there is no reputation penalty for removing them from your blacklist. Attempting to blacklist an address that has been whitelisted will have no effect.
37
+ # @param body
38
+ # @param [Hash] opts the optional parameters
39
+ # @return [Array<(InlineResponse20037, Fixnum, Hash)>] InlineResponse20037 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 = '/rejects/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 => 'InlineResponse20037')
53
+ return data, status_code, headers
54
+ end
55
+ # /rejects/delete
56
+ # Deletes an email rejection. There is no limit to how many rejections you can remove from your blacklist, but keep in mind that each deletion has an affect on your reputation.
57
+ # @param body
58
+ # @param [Hash] opts the optional parameters
59
+ # @return [InlineResponse20039]
60
+ def delete(body = {}, opts = {})
61
+ data, _status_code, _headers = delete_with_http_info(body, opts)
62
+ data
63
+ end
64
+
65
+ # /rejects/delete
66
+ # Deletes an email rejection. There is no limit to how many rejections you can remove from your blacklist, but keep in mind that each deletion has an affect on your reputation.
67
+ # @param body
68
+ # @param [Hash] opts the optional parameters
69
+ # @return [Array<(InlineResponse20039, Fixnum, Hash)>] InlineResponse20039 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 = '/rejects/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 => 'InlineResponse20039')
83
+ return data, status_code, headers
84
+ end
85
+ # /rejects/list
86
+ # Retrieves your email rejection blacklist. You can provide an email address to limit the results. Returns up to 1000 results. By default, entries that have expired are excluded from the results; set include_expired to true to include them.
87
+ # @param body
88
+ # @param [Hash] opts the optional parameters
89
+ # @return [Array<InlineResponse20038>]
90
+ def list(body = {}, opts = {})
91
+ data, _status_code, _headers = list_with_http_info(body, opts)
92
+ data
93
+ end
94
+
95
+ # /rejects/list
96
+ # Retrieves your email rejection blacklist. You can provide an email address to limit the results. Returns up to 1000 results. By default, entries that have expired are excluded from the results; set include_expired to true to include them.
97
+ # @param body
98
+ # @param [Hash] opts the optional parameters
99
+ # @return [Array<(Array<InlineResponse20038>, Fixnum, Hash)>] Array<InlineResponse20038> 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 = '/rejects/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<InlineResponse20038>')
113
+ return data, status_code, headers
114
+ end
115
+ end
116
+ end
@@ -0,0 +1,236 @@
1
+ =begin
2
+ #Mailchimp Transactional API
3
+
4
+ #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
+
6
+ OpenAPI spec version: 1.0.4
7
+ Contact: apihelp@mandrill.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.12
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module MailchimpTransactional
16
+ class SendersApi
17
+ attr_accessor :api_client
18
+
19
+ attr_accessor :api_key
20
+
21
+ def initialize(api_key = '', api_client = ApiClient.default)
22
+ @api_key = api_key
23
+ @api_client = api_client
24
+ end
25
+ # /senders/add-domain
26
+ # Adds a sender domain to your account. Sender domains are added automatically as you send, but you can use this call to add them ahead of time.
27
+ # @param body
28
+ # @param [Hash] opts the optional parameters
29
+ # @return [InlineResponse20042]
30
+ def add_domain(body = {}, opts = {})
31
+ data, _status_code, _headers = add_domain_with_http_info(body, opts)
32
+ data
33
+ end
34
+
35
+ # /senders/add-domain
36
+ # Adds a sender domain to your account. Sender domains are added automatically as you send, but you can use this call to add them ahead of time.
37
+ # @param body
38
+ # @param [Hash] opts the optional parameters
39
+ # @return [Array<(InlineResponse20042, Fixnum, Hash)>] InlineResponse20042 data, response status code and response headers
40
+ def add_domain_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 = '/senders/add-domain'
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 => 'InlineResponse20042')
53
+ return data, status_code, headers
54
+ end
55
+ # /senders/check-domain
56
+ # Checks the SPF and DKIM settings for a domain. If you haven't already added this domain to your account, it will be added automatically.
57
+ # @param body
58
+ # @param [Hash] opts the optional parameters
59
+ # @return [InlineResponse20043]
60
+ def check_domain(body = {}, opts = {})
61
+ data, _status_code, _headers = check_domain_with_http_info(body, opts)
62
+ data
63
+ end
64
+
65
+ # /senders/check-domain
66
+ # Checks the SPF and DKIM settings for a domain. If you haven&#39;t already added this domain to your account, it will be added automatically.
67
+ # @param body
68
+ # @param [Hash] opts the optional parameters
69
+ # @return [Array<(InlineResponse20043, Fixnum, Hash)>] InlineResponse20043 data, response status code and response headers
70
+ def check_domain_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 = '/senders/check-domain'
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 => 'InlineResponse20043')
83
+ return data, status_code, headers
84
+ end
85
+ # /senders/domains
86
+ # Returns the sender domains that have been added to this account
87
+ # @param body
88
+ # @param [Hash] opts the optional parameters
89
+ # @return [Array<InlineResponse20041>]
90
+ def domains(body = {}, opts = {})
91
+ data, _status_code, _headers = domains_with_http_info(body, opts)
92
+ data
93
+ end
94
+
95
+ # /senders/domains
96
+ # Returns the sender domains that have been added to this account
97
+ # @param body
98
+ # @param [Hash] opts the optional parameters
99
+ # @return [Array<(Array<InlineResponse20041>, Fixnum, Hash)>] Array<InlineResponse20041> data, response status code and response headers
100
+ def domains_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 = '/senders/domains'
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<InlineResponse20041>')
113
+ return data, status_code, headers
114
+ end
115
+ # /senders/info
116
+ # Return more detailed information about a single sender, including aggregates of recent stats
117
+ # @param body
118
+ # @param [Hash] opts the optional parameters
119
+ # @return [InlineResponse20045]
120
+ def info(body = {}, opts = {})
121
+ data, _status_code, _headers = info_with_http_info(body, opts)
122
+ data
123
+ end
124
+
125
+ # /senders/info
126
+ # Return more detailed information about a single sender, including aggregates of recent stats
127
+ # @param body
128
+ # @param [Hash] opts the optional parameters
129
+ # @return [Array<(InlineResponse20045, Fixnum, Hash)>] InlineResponse20045 data, response status code and response headers
130
+ def info_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 = '/senders/info'
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 => 'InlineResponse20045')
143
+ return data, status_code, headers
144
+ end
145
+ # /senders/list
146
+ # Return the senders that have tried to use this account
147
+ # @param body
148
+ # @param [Hash] opts the optional parameters
149
+ # @return [Array<InlineResponse20040>]
150
+ def list(body = {}, opts = {})
151
+ data, _status_code, _headers = list_with_http_info(body, opts)
152
+ data
153
+ end
154
+
155
+ # /senders/list
156
+ # Return the senders that have tried to use this account
157
+ # @param body
158
+ # @param [Hash] opts the optional parameters
159
+ # @return [Array<(Array<InlineResponse20040>, Fixnum, Hash)>] Array<InlineResponse20040> data, response status code and response headers
160
+ def list_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 = '/senders/list'
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 => 'Array<InlineResponse20040>')
173
+ return data, status_code, headers
174
+ end
175
+ # /senders/time-series
176
+ # Return the recent history (hourly stats for the last 30 days) for a sender
177
+ # @param body
178
+ # @param [Hash] opts the optional parameters
179
+ # @return [Array<InlineResponse20046>]
180
+ def time_series(body = {}, opts = {})
181
+ data, _status_code, _headers = time_series_with_http_info(body, opts)
182
+ data
183
+ end
184
+
185
+ # /senders/time-series
186
+ # Return the recent history (hourly stats for the last 30 days) for a sender
187
+ # @param body
188
+ # @param [Hash] opts the optional parameters
189
+ # @return [Array<(Array<InlineResponse20046>, Fixnum, Hash)>] Array<InlineResponse20046> data, response status code and response headers
190
+ def time_series_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 = '/senders/time-series'
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<InlineResponse20046>')
203
+ return data, status_code, headers
204
+ end
205
+ # /senders/verify-domain
206
+ # Sends a verification email in order to verify ownership of a domain. Domain verification is a required step to confirm ownership of a domain. Once a domain has been verified in a Mandrill account, other accounts may not have their messages signed by that domain unless they also verify the domain. This prevents other Mandrill accounts from sending mail signed by your domain.
207
+ # @param body
208
+ # @param [Hash] opts the optional parameters
209
+ # @return [InlineResponse20044]
210
+ def verify_domain(body = {}, opts = {})
211
+ data, _status_code, _headers = verify_domain_with_http_info(body, opts)
212
+ data
213
+ end
214
+
215
+ # /senders/verify-domain
216
+ # Sends a verification email in order to verify ownership of a domain. Domain verification is a required step to confirm ownership of a domain. Once a domain has been verified in a Mandrill account, other accounts may not have their messages signed by that domain unless they also verify the domain. This prevents other Mandrill accounts from sending mail signed by your domain.
217
+ # @param body
218
+ # @param [Hash] opts the optional parameters
219
+ # @return [Array<(InlineResponse20044, Fixnum, Hash)>] InlineResponse20044 data, response status code and response headers
220
+ def verify_domain_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 = '/senders/verify-domain'
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 => 'InlineResponse20044')
233
+ return data, status_code, headers
234
+ end
235
+ end
236
+ end
@@ -0,0 +1,236 @@
1
+ =begin
2
+ #Mailchimp Transactional API
3
+
4
+ #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
+
6
+ OpenAPI spec version: 1.0.4
7
+ Contact: apihelp@mandrill.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.12
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module MailchimpTransactional
16
+ class SubaccountsApi
17
+ attr_accessor :api_client
18
+
19
+ attr_accessor :api_key
20
+
21
+ def initialize(api_key = '', api_client = ApiClient.default)
22
+ @api_key = api_key
23
+ @api_client = api_client
24
+ end
25
+ # /subaccounts/add
26
+ # Add a new subaccount
27
+ # @param body
28
+ # @param [Hash] opts the optional parameters
29
+ # @return [InlineResponse20048]
30
+ def add(body = {}, opts = {})
31
+ data, _status_code, _headers = add_with_http_info(body, opts)
32
+ data
33
+ end
34
+
35
+ # /subaccounts/add
36
+ # Add a new subaccount
37
+ # @param body
38
+ # @param [Hash] opts the optional parameters
39
+ # @return [Array<(InlineResponse20048, Fixnum, Hash)>] InlineResponse20048 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 = '/subaccounts/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 => 'InlineResponse20048')
53
+ return data, status_code, headers
54
+ end
55
+ # /subaccounts/delete
56
+ # Delete an existing subaccount. Any email related to the subaccount will be saved, but stats will be removed and any future sending calls to this subaccount will fail.
57
+ # @param body
58
+ # @param [Hash] opts the optional parameters
59
+ # @return [InlineResponse20051]
60
+ def delete(body = {}, opts = {})
61
+ data, _status_code, _headers = delete_with_http_info(body, opts)
62
+ data
63
+ end
64
+
65
+ # /subaccounts/delete
66
+ # Delete an existing subaccount. Any email related to the subaccount will be saved, but stats will be removed and any future sending calls to this subaccount will fail.
67
+ # @param body
68
+ # @param [Hash] opts the optional parameters
69
+ # @return [Array<(InlineResponse20051, Fixnum, Hash)>] InlineResponse20051 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 = '/subaccounts/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 => 'InlineResponse20051')
83
+ return data, status_code, headers
84
+ end
85
+ # /subaccounts/info
86
+ # Given the ID of an existing subaccount, return the data about it
87
+ # @param body
88
+ # @param [Hash] opts the optional parameters
89
+ # @return [InlineResponse20049]
90
+ def info(body = {}, opts = {})
91
+ data, _status_code, _headers = info_with_http_info(body, opts)
92
+ data
93
+ end
94
+
95
+ # /subaccounts/info
96
+ # Given the ID of an existing subaccount, return the data about it
97
+ # @param body
98
+ # @param [Hash] opts the optional parameters
99
+ # @return [Array<(InlineResponse20049, Fixnum, Hash)>] InlineResponse20049 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 = '/subaccounts/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 => 'InlineResponse20049')
113
+ return data, status_code, headers
114
+ end
115
+ # /subaccounts/list
116
+ # Get the list of subaccounts defined for the account, optionally filtered by a prefix
117
+ # @param body
118
+ # @param [Hash] opts the optional parameters
119
+ # @return [Array<InlineResponse20047>]
120
+ def list(body = {}, opts = {})
121
+ data, _status_code, _headers = list_with_http_info(body, opts)
122
+ data
123
+ end
124
+
125
+ # /subaccounts/list
126
+ # Get the list of subaccounts defined for the account, optionally filtered by a prefix
127
+ # @param body
128
+ # @param [Hash] opts the optional parameters
129
+ # @return [Array<(Array<InlineResponse20047>, Fixnum, Hash)>] Array<InlineResponse20047> data, response status code and response headers
130
+ def list_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 = '/subaccounts/list'
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<InlineResponse20047>')
143
+ return data, status_code, headers
144
+ end
145
+ # /subaccounts/pause
146
+ # Pause a subaccount's sending. Any future emails delivered to this subaccount will be queued for a maximum of 3 days until the subaccount is resumed.
147
+ # @param body
148
+ # @param [Hash] opts the optional parameters
149
+ # @return [InlineResponse20052]
150
+ def pause(body = {}, opts = {})
151
+ data, _status_code, _headers = pause_with_http_info(body, opts)
152
+ data
153
+ end
154
+
155
+ # /subaccounts/pause
156
+ # Pause a subaccount&#39;s sending. Any future emails delivered to this subaccount will be queued for a maximum of 3 days until the subaccount is resumed.
157
+ # @param body
158
+ # @param [Hash] opts the optional parameters
159
+ # @return [Array<(InlineResponse20052, Fixnum, Hash)>] InlineResponse20052 data, response status code and response headers
160
+ def pause_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 = '/subaccounts/pause'
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 => 'InlineResponse20052')
173
+ return data, status_code, headers
174
+ end
175
+ # /subaccounts/resume
176
+ # Resume a paused subaccount's sending
177
+ # @param body
178
+ # @param [Hash] opts the optional parameters
179
+ # @return [InlineResponse20053]
180
+ def resume(body = {}, opts = {})
181
+ data, _status_code, _headers = resume_with_http_info(body, opts)
182
+ data
183
+ end
184
+
185
+ # /subaccounts/resume
186
+ # Resume a paused subaccount&#39;s sending
187
+ # @param body
188
+ # @param [Hash] opts the optional parameters
189
+ # @return [Array<(InlineResponse20053, Fixnum, Hash)>] InlineResponse20053 data, response status code and response headers
190
+ def resume_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 = '/subaccounts/resume'
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 => 'InlineResponse20053')
203
+ return data, status_code, headers
204
+ end
205
+ # /subaccounts/update
206
+ # Update an existing subaccount
207
+ # @param body
208
+ # @param [Hash] opts the optional parameters
209
+ # @return [InlineResponse20050]
210
+ def update(body = {}, opts = {})
211
+ data, _status_code, _headers = update_with_http_info(body, opts)
212
+ data
213
+ end
214
+
215
+ # /subaccounts/update
216
+ # Update an existing subaccount
217
+ # @param body
218
+ # @param [Hash] opts the optional parameters
219
+ # @return [Array<(InlineResponse20050, Fixnum, Hash)>] InlineResponse20050 data, response status code and response headers
220
+ def update_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 = '/subaccounts/update'
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 => 'InlineResponse20050')
233
+ return data, status_code, headers
234
+ end
235
+ end
236
+ end