MailchimpMarketing 3.0.5 → 3.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/MailchimpMarketing.gemspec +1 -1
  3. data/README.md +22 -26
  4. data/lib/MailchimpMarketing.rb +1 -1
  5. data/lib/MailchimpMarketing/api/activity_feed_api.rb +11 -67
  6. data/lib/MailchimpMarketing/api/authorized_apps_api.rb +17 -110
  7. data/lib/MailchimpMarketing/api/automations_api.rb +111 -666
  8. data/lib/MailchimpMarketing/api/batch_webhooks_api.rb +28 -177
  9. data/lib/MailchimpMarketing/api/batches_api.rb +22 -142
  10. data/lib/MailchimpMarketing/api/campaign_folders_api.rb +28 -177
  11. data/lib/MailchimpMarketing/api/campaigns_api.rb +125 -784
  12. data/lib/MailchimpMarketing/api/connected_sites_api.rb +27 -174
  13. data/lib/MailchimpMarketing/api/conversations_api.rb +31 -200
  14. data/lib/MailchimpMarketing/api/dashboard_api.rb +26 -215
  15. data/lib/MailchimpMarketing/api/ecommerce_api.rb +388 -2253
  16. data/lib/MailchimpMarketing/api/external_auths_api.rb +17 -110
  17. data/lib/MailchimpMarketing/api/facebook_ads_api.rb +14 -81
  18. data/lib/MailchimpMarketing/api/file_manager_api.rb +60 -402
  19. data/lib/MailchimpMarketing/api/landing_pages_api.rb +45 -280
  20. data/lib/MailchimpMarketing/api/lists_api.rb +420 -2575
  21. data/lib/MailchimpMarketing/api/ping_api.rb +6 -32
  22. data/lib/MailchimpMarketing/api/postcards_api.rb +8 -40
  23. data/lib/MailchimpMarketing/api/reporting_api.rb +35 -231
  24. data/lib/MailchimpMarketing/api/reports_api.rb +131 -881
  25. data/lib/MailchimpMarketing/api/root_api.rb +6 -36
  26. data/lib/MailchimpMarketing/api/search_campaigns_api.rb +7 -38
  27. data/lib/MailchimpMarketing/api/search_members_api.rb +7 -40
  28. data/lib/MailchimpMarketing/api/template_folders_api.rb +28 -177
  29. data/lib/MailchimpMarketing/api/templates_api.rb +34 -228
  30. data/lib/MailchimpMarketing/api/verified_domains_api.rb +27 -165
  31. data/lib/MailchimpMarketing/api_client.rb +11 -55
  32. data/lib/MailchimpMarketing/api_error.rb +1 -1
  33. data/lib/MailchimpMarketing/configuration.rb +1 -1
  34. data/lib/MailchimpMarketing/version.rb +2 -2
  35. metadata +2 -2
@@ -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: 3.0.5
6
+ OpenAPI spec version: 3.0.6
7
7
  Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
@@ -11,6 +11,7 @@ Swagger Codegen version: 2.4.12
11
11
  =end
12
12
 
13
13
  require 'uri'
14
+ require 'json'
14
15
 
15
16
  module MailchimpMarketing
16
17
  class TemplatesApi
@@ -19,89 +20,28 @@ module MailchimpMarketing
19
20
  def initialize(api_client)
20
21
  @api_client = api_client
21
22
  end
22
- # Delete template
23
- # Delete a specific template.
24
- # @param template_id The unique id for the template.
25
- # @param [Hash] opts the optional parameters
26
- # @return [nil]
27
- def delete_template(template_id = {}, opts = {})
28
- delete_template_with_http_info(template_id, opts)
29
- nil
30
- end
31
23
 
32
24
  # Delete template
33
- # Delete a specific template.
34
- # @param template_id The unique id for the template.
35
- # @param [Hash] opts the optional parameters
36
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
37
- def delete_template_with_http_info(template_id, opts = {})
38
- # resource path
39
- local_var_path = '/templates/{template_id}'.sub('{' + 'template_id' + '}', template_id.to_s)
25
+ def delete_template(template_id, opts = {})
26
+ fail ArgumentError, "Missing required param: 'template_id'" if template_id.nil?
40
27
 
41
- # query parameters
42
28
  query_params = {}
43
-
44
- # header parameters
45
- header_params = {}
46
- # HTTP header 'Accept' (if needed)
47
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
48
- # HTTP header 'Content-Type'
49
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
50
-
51
- # form parameters
52
29
  form_params = {}
53
-
54
- # http body (model)
55
30
  post_body = nil
56
- auth_names = ['basicAuth']
31
+
32
+ local_var_path = '/templates/{template_id}'.sub('{' + 'template_id' + '}', template_id.to_s)
57
33
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
58
- :header_params => header_params,
59
34
  :query_params => query_params,
60
35
  :form_params => form_params,
61
- :body => post_body,
62
- :auth_names => auth_names)
36
+ :body => post_body)
63
37
  return data, status_code, headers
64
38
  end
65
- # List templates
66
- # Get a list of an account's available templates.
67
- # @param [Hash] opts the optional parameters
68
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
69
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
70
- # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10)
71
- # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0)
72
- # @option opts [String] :created_by The Mailchimp account user who created the template.
73
- # @option opts [String] :since_created_at Restrict the response to templates created after the set date. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
74
- # @option opts [String] :before_created_at Restrict the response to templates created before the set date. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
75
- # @option opts [String] :type Limit results based on template type.
76
- # @option opts [String] :category Limit results based on category.
77
- # @option opts [String] :folder_id The unique folder id.
78
- # @option opts [String] :sort_field Returns user templates sorted by the specified field.
79
- # @return [Templates]
80
- def list(opts = {})
81
- data, _status_code, _headers = list_with_http_info(opts)
82
- data
83
- end
84
39
 
85
40
  # List templates
86
- # Get a list of an account&#39;s available templates.
87
- # @param [Hash] opts the optional parameters
88
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
89
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
90
- # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000**
91
- # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**.
92
- # @option opts [String] :created_by The Mailchimp account user who created the template.
93
- # @option opts [String] :since_created_at Restrict the response to templates created after the set date. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
94
- # @option opts [String] :before_created_at Restrict the response to templates created before the set date. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
95
- # @option opts [String] :type Limit results based on template type.
96
- # @option opts [String] :category Limit results based on category.
97
- # @option opts [String] :folder_id The unique folder id.
98
- # @option opts [String] :sort_field Returns user templates sorted by the specified field.
99
- # @return [Array<(Templates, Fixnum, Hash)>] Templates data, response status code and response headers
100
- def list_with_http_info(opts = {})
101
- # resource path
102
- local_var_path = '/templates'
41
+ def list(opts = {})
42
+ fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
43
+ fail ArgumentError, 'invalid value for "sort_field", must be one of date_created, name' if opts[:'sort_field'] && !['date_created', 'name'].include?(opts[:'sort_field'])
103
44
 
104
- # query parameters
105
45
  query_params = {}
106
46
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
107
47
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
@@ -114,217 +54,83 @@ module MailchimpMarketing
114
54
  query_params[:'category'] = opts[:'category'] if !opts[:'category'].nil?
115
55
  query_params[:'folder_id'] = opts[:'folder_id'] if !opts[:'folder_id'].nil?
116
56
  query_params[:'sort_field'] = opts[:'sort_field'] if !opts[:'sort_field'].nil?
117
-
118
- # header parameters
119
- header_params = {}
120
- # HTTP header 'Accept' (if needed)
121
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
122
- # HTTP header 'Content-Type'
123
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
124
-
125
- # form parameters
126
57
  form_params = {}
127
-
128
- # http body (model)
129
58
  post_body = nil
130
- auth_names = ['basicAuth']
59
+
60
+ local_var_path = '/templates'
131
61
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
132
- :header_params => header_params,
133
62
  :query_params => query_params,
134
63
  :form_params => form_params,
135
- :body => post_body,
136
- :auth_names => auth_names,
137
- :return_type => 'Templates')
64
+ :body => post_body)
138
65
  return data, status_code, headers
139
66
  end
140
- # Get template info
141
- # Get information about a specific template.
142
- # @param template_id The unique id for the template.
143
- # @param [Hash] opts the optional parameters
144
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
145
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
146
- # @return [TemplateInstance]
147
- def get_template(template_id = {}, opts = {})
148
- data, _status_code, _headers = get_template_with_http_info(template_id, opts)
149
- data
150
- end
151
67
 
152
68
  # Get template info
153
- # Get information about a specific template.
154
- # @param template_id The unique id for the template.
155
- # @param [Hash] opts the optional parameters
156
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
157
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
158
- # @return [Array<(TemplateInstance, Fixnum, Hash)>] TemplateInstance data, response status code and response headers
159
- def get_template_with_http_info(template_id, opts = {})
160
- # resource path
161
- local_var_path = '/templates/{template_id}'.sub('{' + 'template_id' + '}', template_id.to_s)
69
+ def get_template(template_id, opts = {})
70
+ fail ArgumentError, "Missing required param: 'template_id'" if template_id.nil?
162
71
 
163
- # query parameters
164
72
  query_params = {}
165
73
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
166
74
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
167
-
168
- # header parameters
169
- header_params = {}
170
- # HTTP header 'Accept' (if needed)
171
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
172
- # HTTP header 'Content-Type'
173
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
174
-
175
- # form parameters
176
75
  form_params = {}
177
-
178
- # http body (model)
179
76
  post_body = nil
180
- auth_names = ['basicAuth']
77
+
78
+ local_var_path = '/templates/{template_id}'.sub('{' + 'template_id' + '}', template_id.to_s)
181
79
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
182
- :header_params => header_params,
183
80
  :query_params => query_params,
184
81
  :form_params => form_params,
185
- :body => post_body,
186
- :auth_names => auth_names,
187
- :return_type => 'TemplateInstance')
82
+ :body => post_body)
188
83
  return data, status_code, headers
189
84
  end
190
- # View default content
191
- # Get the sections that you can edit in a template, including each section's default content.
192
- # @param template_id The unique id for the template.
193
- # @param [Hash] opts the optional parameters
194
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
195
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
196
- # @return [TemplateDefaultContent]
197
- def get_default_content_for_template(template_id = {}, opts = {})
198
- data, _status_code, _headers = get_default_content_for_template_with_http_info(template_id, opts)
199
- data
200
- end
201
85
 
202
86
  # View default content
203
- # Get the sections that you can edit in a template, including each section&#39;s default content.
204
- # @param template_id The unique id for the template.
205
- # @param [Hash] opts the optional parameters
206
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
207
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
208
- # @return [Array<(TemplateDefaultContent, Fixnum, Hash)>] TemplateDefaultContent data, response status code and response headers
209
- def get_default_content_for_template_with_http_info(template_id, opts = {})
210
- # resource path
211
- local_var_path = '/templates/{template_id}/default-content'.sub('{' + 'template_id' + '}', template_id.to_s)
87
+ def get_default_content_for_template(template_id, opts = {})
88
+ fail ArgumentError, "Missing required param: 'template_id'" if template_id.nil?
212
89
 
213
- # query parameters
214
90
  query_params = {}
215
91
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
216
92
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
217
-
218
- # header parameters
219
- header_params = {}
220
- # HTTP header 'Accept' (if needed)
221
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
222
- # HTTP header 'Content-Type'
223
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
224
-
225
- # form parameters
226
93
  form_params = {}
227
-
228
- # http body (model)
229
94
  post_body = nil
230
- auth_names = ['basicAuth']
95
+
96
+ local_var_path = '/templates/{template_id}/default-content'.sub('{' + 'template_id' + '}', template_id.to_s)
231
97
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
232
- :header_params => header_params,
233
98
  :query_params => query_params,
234
99
  :form_params => form_params,
235
- :body => post_body,
236
- :auth_names => auth_names,
237
- :return_type => 'TemplateDefaultContent')
100
+ :body => post_body)
238
101
  return data, status_code, headers
239
102
  end
240
- # Update template
241
- # Update the name, HTML, or `folder_id` of an existing template.
242
- # @param template_id The unique id for the template.
243
- # @param body
244
- # @param [Hash] opts the optional parameters
245
- # @return [TemplateInstance]
246
- def update_template(template_id = {}, body = {}, opts = {})
247
- data, _status_code, _headers = update_template_with_http_info(template_id, body, opts)
248
- data
249
- end
250
103
 
251
104
  # Update template
252
- # Update the name, HTML, or &#x60;folder_id&#x60; of an existing template.
253
- # @param template_id The unique id for the template.
254
- # @param body
255
- # @param [Hash] opts the optional parameters
256
- # @return [Array<(TemplateInstance, Fixnum, Hash)>] TemplateInstance data, response status code and response headers
257
- def update_template_with_http_info(template_id, body, opts = {})
258
- # resource path
259
- local_var_path = '/templates/{template_id}'.sub('{' + 'template_id' + '}', template_id.to_s)
105
+ def update_template(template_id, body, opts = {})
106
+ fail ArgumentError, "Missing required param: 'template_id'" if template_id.nil?
107
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
260
108
 
261
- # query parameters
262
109
  query_params = {}
263
-
264
- # header parameters
265
- header_params = {}
266
- # HTTP header 'Accept' (if needed)
267
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
268
- # HTTP header 'Content-Type'
269
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
270
-
271
- # form parameters
272
110
  form_params = {}
273
-
274
- # http body (model)
275
111
  post_body = @api_client.object_to_http_body(body)
276
- auth_names = ['basicAuth']
112
+
113
+ local_var_path = '/templates/{template_id}'.sub('{' + 'template_id' + '}', template_id.to_s)
277
114
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
278
- :header_params => header_params,
279
115
  :query_params => query_params,
280
116
  :form_params => form_params,
281
- :body => post_body,
282
- :auth_names => auth_names,
283
- :return_type => 'TemplateInstance')
117
+ :body => post_body)
284
118
  return data, status_code, headers
285
119
  end
286
- # Add template
287
- # Create a new template for the account. Only Classic templates are supported.
288
- # @param body
289
- # @param [Hash] opts the optional parameters
290
- # @return [TemplateInstance]
291
- def create(body = {}, opts = {})
292
- data, _status_code, _headers = create_with_http_info(body, opts)
293
- data
294
- end
295
120
 
296
121
  # Add template
297
- # Create a new template for the account. Only Classic templates are supported.
298
- # @param body
299
- # @param [Hash] opts the optional parameters
300
- # @return [Array<(TemplateInstance, Fixnum, Hash)>] TemplateInstance data, response status code and response headers
301
- def create_with_http_info(body, opts = {})
302
- # resource path
303
- local_var_path = '/templates'
122
+ def create(body, opts = {})
123
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
304
124
 
305
- # query parameters
306
125
  query_params = {}
307
-
308
- # header parameters
309
- header_params = {}
310
- # HTTP header 'Accept' (if needed)
311
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
312
- # HTTP header 'Content-Type'
313
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
314
-
315
- # form parameters
316
126
  form_params = {}
317
-
318
- # http body (model)
319
127
  post_body = @api_client.object_to_http_body(body)
320
- auth_names = ['basicAuth']
128
+
129
+ local_var_path = '/templates'
321
130
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
322
- :header_params => header_params,
323
131
  :query_params => query_params,
324
132
  :form_params => form_params,
325
- :body => post_body,
326
- :auth_names => auth_names,
327
- :return_type => 'TemplateInstance')
133
+ :body => post_body)
328
134
  return data, status_code, headers
329
135
  end
330
136
  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: 3.0.5
6
+ OpenAPI spec version: 3.0.6
7
7
  Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
@@ -11,6 +11,7 @@ Swagger Codegen version: 2.4.12
11
11
  =end
12
12
 
13
13
  require 'uri'
14
+ require 'json'
14
15
 
15
16
  module MailchimpMarketing
16
17
  class VerifiedDomainsApi
@@ -19,223 +20,84 @@ module MailchimpMarketing
19
20
  def initialize(api_client)
20
21
  @api_client = api_client
21
22
  end
22
- # Add domain to account
23
- # Add a domain to the account.
24
- # @param body
25
- # @param [Hash] opts the optional parameters
26
- # @return [VerifiedDomains]
27
- def create_verified_domain(body = {}, opts = {})
28
- data, _status_code, _headers = create_verified_domain_with_http_info(body, opts)
29
- data
30
- end
31
23
 
32
24
  # Add domain to account
33
- # Add a domain to the account.
34
- # @param body
35
- # @param [Hash] opts the optional parameters
36
- # @return [Array<(VerifiedDomains, Fixnum, Hash)>] VerifiedDomains data, response status code and response headers
37
- def create_verified_domain_with_http_info(body, opts = {})
38
- # resource path
39
- local_var_path = '/verified-domains'
25
+ def create_verified_domain(body, opts = {})
26
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
40
27
 
41
- # query parameters
42
28
  query_params = {}
43
-
44
- # header parameters
45
- header_params = {}
46
- # HTTP header 'Accept' (if needed)
47
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
48
- # HTTP header 'Content-Type'
49
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
50
-
51
- # form parameters
52
29
  form_params = {}
53
-
54
- # http body (model)
55
30
  post_body = @api_client.object_to_http_body(body)
56
- auth_names = ['basicAuth']
31
+
32
+ local_var_path = '/verified-domains'
57
33
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
58
- :header_params => header_params,
59
34
  :query_params => query_params,
60
35
  :form_params => form_params,
61
- :body => post_body,
62
- :auth_names => auth_names,
63
- :return_type => 'VerifiedDomains')
36
+ :body => post_body)
64
37
  return data, status_code, headers
65
38
  end
66
- # Delete domain
67
- # Delete a verified domain from the account.
68
- # @param domain_name The domain to be verified.
69
- # @param [Hash] opts the optional parameters
70
- # @return [nil]
71
- def delete_domain(domain_name = {}, opts = {})
72
- delete_domain_with_http_info(domain_name, opts)
73
- nil
74
- end
75
39
 
76
40
  # Delete domain
77
- # Delete a verified domain from the account.
78
- # @param domain_name The domain to be verified.
79
- # @param [Hash] opts the optional parameters
80
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
81
- def delete_domain_with_http_info(domain_name, opts = {})
82
- # resource path
83
- local_var_path = '/verified-domains/{domain_name}'.sub('{' + 'domain_name' + '}', domain_name.to_s)
41
+ def delete_domain(domain_name, opts = {})
42
+ fail ArgumentError, "Missing required param: 'domain_name'" if domain_name.nil?
84
43
 
85
- # query parameters
86
44
  query_params = {}
87
-
88
- # header parameters
89
- header_params = {}
90
- # HTTP header 'Accept' (if needed)
91
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
92
- # HTTP header 'Content-Type'
93
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
94
-
95
- # form parameters
96
45
  form_params = {}
97
-
98
- # http body (model)
99
46
  post_body = nil
100
- auth_names = ['basicAuth']
47
+
48
+ local_var_path = '/verified-domains/{domain_name}'.sub('{' + 'domain_name' + '}', domain_name.to_s)
101
49
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
102
- :header_params => header_params,
103
50
  :query_params => query_params,
104
51
  :form_params => form_params,
105
- :body => post_body,
106
- :auth_names => auth_names)
52
+ :body => post_body)
107
53
  return data, status_code, headers
108
54
  end
109
- # Get domain info
110
- # Get the details for a single domain on the account.
111
- # @param domain_name The domain to be verified.
112
- # @param [Hash] opts the optional parameters
113
- # @return [VerifiedDomains]
114
- def get_domain(domain_name = {}, opts = {})
115
- data, _status_code, _headers = get_domain_with_http_info(domain_name, opts)
116
- data
117
- end
118
55
 
119
56
  # Get domain info
120
- # Get the details for a single domain on the account.
121
- # @param domain_name The domain to be verified.
122
- # @param [Hash] opts the optional parameters
123
- # @return [Array<(VerifiedDomains, Fixnum, Hash)>] VerifiedDomains data, response status code and response headers
124
- def get_domain_with_http_info(domain_name, opts = {})
125
- # resource path
126
- local_var_path = '/verified-domains/{domain_name}'.sub('{' + 'domain_name' + '}', domain_name.to_s)
57
+ def get_domain(domain_name, opts = {})
58
+ fail ArgumentError, "Missing required param: 'domain_name'" if domain_name.nil?
127
59
 
128
- # query parameters
129
60
  query_params = {}
130
-
131
- # header parameters
132
- header_params = {}
133
- # HTTP header 'Accept' (if needed)
134
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
135
- # HTTP header 'Content-Type'
136
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
137
-
138
- # form parameters
139
61
  form_params = {}
140
-
141
- # http body (model)
142
62
  post_body = nil
143
- auth_names = ['basicAuth']
63
+
64
+ local_var_path = '/verified-domains/{domain_name}'.sub('{' + 'domain_name' + '}', domain_name.to_s)
144
65
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
145
- :header_params => header_params,
146
66
  :query_params => query_params,
147
67
  :form_params => form_params,
148
- :body => post_body,
149
- :auth_names => auth_names,
150
- :return_type => 'VerifiedDomains')
68
+ :body => post_body)
151
69
  return data, status_code, headers
152
70
  end
153
- # List sending domains
154
- # Get all of the sending domains on the account.
155
- # @param [Hash] opts the optional parameters
156
- # @return [VerifiedDomains1]
157
- def get_verified_domains_all(opts = {})
158
- data, _status_code, _headers = get_verified_domains_all_with_http_info(opts)
159
- data
160
- end
161
71
 
162
72
  # List sending domains
163
- # Get all of the sending domains on the account.
164
- # @param [Hash] opts the optional parameters
165
- # @return [Array<(VerifiedDomains1, Fixnum, Hash)>] VerifiedDomains1 data, response status code and response headers
166
- def get_verified_domains_all_with_http_info(opts = {})
167
- # resource path
168
- local_var_path = '/verified-domains'
73
+ def get_verified_domains_all(opts = {})
169
74
 
170
- # query parameters
171
75
  query_params = {}
172
-
173
- # header parameters
174
- header_params = {}
175
- # HTTP header 'Accept' (if needed)
176
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
177
- # HTTP header 'Content-Type'
178
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
179
-
180
- # form parameters
181
76
  form_params = {}
182
-
183
- # http body (model)
184
77
  post_body = nil
185
- auth_names = ['basicAuth']
78
+
79
+ local_var_path = '/verified-domains'
186
80
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
187
- :header_params => header_params,
188
81
  :query_params => query_params,
189
82
  :form_params => form_params,
190
- :body => post_body,
191
- :auth_names => auth_names,
192
- :return_type => 'VerifiedDomains1')
83
+ :body => post_body)
193
84
  return data, status_code, headers
194
85
  end
195
- # Verify domain
196
- # Verify a domain for sending.
197
- # @param domain_name The domain to be verified.
198
- # @param body
199
- # @param [Hash] opts the optional parameters
200
- # @return [VerifiedDomains]
201
- def submit_domain_verification(domain_name = {}, body = {}, opts = {})
202
- data, _status_code, _headers = submit_domain_verification_with_http_info(domain_name, body, opts)
203
- data
204
- end
205
86
 
206
87
  # Verify domain
207
- # Verify a domain for sending.
208
- # @param domain_name The domain to be verified.
209
- # @param body
210
- # @param [Hash] opts the optional parameters
211
- # @return [Array<(VerifiedDomains, Fixnum, Hash)>] VerifiedDomains data, response status code and response headers
212
- def submit_domain_verification_with_http_info(domain_name, body, opts = {})
213
- # resource path
214
- local_var_path = '/verified-domains/{domain_name}/actions/verify'.sub('{' + 'domain_name' + '}', domain_name.to_s)
88
+ def submit_domain_verification(domain_name, body, opts = {})
89
+ fail ArgumentError, "Missing required param: 'domain_name'" if domain_name.nil?
90
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
215
91
 
216
- # query parameters
217
92
  query_params = {}
218
-
219
- # header parameters
220
- header_params = {}
221
- # HTTP header 'Accept' (if needed)
222
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
223
- # HTTP header 'Content-Type'
224
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
225
-
226
- # form parameters
227
93
  form_params = {}
228
-
229
- # http body (model)
230
94
  post_body = @api_client.object_to_http_body(body)
231
- auth_names = ['basicAuth']
95
+
96
+ local_var_path = '/verified-domains/{domain_name}/actions/verify'.sub('{' + 'domain_name' + '}', domain_name.to_s)
232
97
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
233
- :header_params => header_params,
234
98
  :query_params => query_params,
235
99
  :form_params => form_params,
236
- :body => post_body,
237
- :auth_names => auth_names,
238
- :return_type => 'VerifiedDomains')
100
+ :body => post_body)
239
101
  return data, status_code, headers
240
102
  end
241
103
  end