MailchimpMarketing 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +7 -0
- data/MailchimpMarketing.gemspec +45 -0
- data/README.md +369 -0
- data/lib/MailchimpMarketing.rb +163 -0
- data/lib/MailchimpMarketing/api/activity_feed_api.rb +113 -0
- data/lib/MailchimpMarketing/api/authorized_apps_api.rb +171 -0
- data/lib/MailchimpMarketing/api/automations_api.rb +906 -0
- data/lib/MailchimpMarketing/api/batch_webhooks_api.rb +260 -0
- data/lib/MailchimpMarketing/api/batches_api.rb +214 -0
- data/lib/MailchimpMarketing/api/campaign_folders_api.rb +260 -0
- data/lib/MailchimpMarketing/api/campaigns_api.rb +1073 -0
- data/lib/MailchimpMarketing/api/connected_sites_api.rb +257 -0
- data/lib/MailchimpMarketing/api/conversations_api.rb +293 -0
- data/lib/MailchimpMarketing/api/dashboard_api.rb +317 -0
- data/lib/MailchimpMarketing/api/ecommerce_api.rb +3004 -0
- data/lib/MailchimpMarketing/api/external_auths_api.rb +171 -0
- data/lib/MailchimpMarketing/api/facebook_ads_api.rb +133 -0
- data/lib/MailchimpMarketing/api/file_manager_api.rb +566 -0
- data/lib/MailchimpMarketing/api/landing_pages_api.rb +399 -0
- data/lib/MailchimpMarketing/api/lists_api.rb +3457 -0
- data/lib/MailchimpMarketing/api/ping_api.rb +65 -0
- data/lib/MailchimpMarketing/api/postcards_api.rb +77 -0
- data/lib/MailchimpMarketing/api/reporting_api.rb +338 -0
- data/lib/MailchimpMarketing/api/reports_api.rb +1214 -0
- data/lib/MailchimpMarketing/api/root_api.rb +71 -0
- data/lib/MailchimpMarketing/api/search_campaigns_api.rb +74 -0
- data/lib/MailchimpMarketing/api/search_members_api.rb +77 -0
- data/lib/MailchimpMarketing/api/template_folders_api.rb +260 -0
- data/lib/MailchimpMarketing/api/templates_api.rb +331 -0
- data/lib/MailchimpMarketing/api/verified_domains_api.rb +242 -0
- data/lib/MailchimpMarketing/api_client.rb +192 -0
- data/lib/MailchimpMarketing/api_error.rb +38 -0
- data/lib/MailchimpMarketing/configuration.rb +209 -0
- data/lib/MailchimpMarketing/version.rb +15 -0
- metadata +257 -0
@@ -0,0 +1,331 @@
|
|
1
|
+
=begin
|
2
|
+
#Mailchimp Marketing API
|
3
|
+
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
+
|
6
|
+
OpenAPI spec version: 3.0.1
|
7
|
+
Contact: apihelp@mailchimp.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 MailchimpMarketing
|
16
|
+
class TemplatesApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Delete a specific 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
|
+
|
32
|
+
# Delete a specific 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)
|
40
|
+
|
41
|
+
# query parameters
|
42
|
+
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
|
+
form_params = {}
|
53
|
+
|
54
|
+
# http body (model)
|
55
|
+
post_body = nil
|
56
|
+
auth_names = ['basicAuth']
|
57
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
58
|
+
:header_params => header_params,
|
59
|
+
:query_params => query_params,
|
60
|
+
:form_params => form_params,
|
61
|
+
:body => post_body,
|
62
|
+
:auth_names => auth_names)
|
63
|
+
return data, status_code, headers
|
64
|
+
end
|
65
|
+
# Get all 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
|
+
|
85
|
+
# Get all templates
|
86
|
+
# Get a list of an account'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'
|
103
|
+
|
104
|
+
# query parameters
|
105
|
+
query_params = {}
|
106
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
107
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
108
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
109
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
110
|
+
query_params[:'created_by'] = opts[:'created_by'] if !opts[:'created_by'].nil?
|
111
|
+
query_params[:'since_created_at'] = opts[:'since_created_at'] if !opts[:'since_created_at'].nil?
|
112
|
+
query_params[:'before_created_at'] = opts[:'before_created_at'] if !opts[:'before_created_at'].nil?
|
113
|
+
query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
|
114
|
+
query_params[:'category'] = opts[:'category'] if !opts[:'category'].nil?
|
115
|
+
query_params[:'folder_id'] = opts[:'folder_id'] if !opts[:'folder_id'].nil?
|
116
|
+
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
|
+
form_params = {}
|
127
|
+
|
128
|
+
# http body (model)
|
129
|
+
post_body = nil
|
130
|
+
auth_names = ['basicAuth']
|
131
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
132
|
+
:header_params => header_params,
|
133
|
+
:query_params => query_params,
|
134
|
+
:form_params => form_params,
|
135
|
+
:body => post_body,
|
136
|
+
:auth_names => auth_names,
|
137
|
+
:return_type => 'Templates')
|
138
|
+
return data, status_code, headers
|
139
|
+
end
|
140
|
+
# Get information about a specific template
|
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
|
+
|
152
|
+
# Get information about a specific template
|
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)
|
162
|
+
|
163
|
+
# query parameters
|
164
|
+
query_params = {}
|
165
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
166
|
+
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
|
+
form_params = {}
|
177
|
+
|
178
|
+
# http body (model)
|
179
|
+
post_body = nil
|
180
|
+
auth_names = ['basicAuth']
|
181
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
182
|
+
:header_params => header_params,
|
183
|
+
:query_params => query_params,
|
184
|
+
:form_params => form_params,
|
185
|
+
:body => post_body,
|
186
|
+
:auth_names => auth_names,
|
187
|
+
:return_type => 'TemplateInstance')
|
188
|
+
return data, status_code, headers
|
189
|
+
end
|
190
|
+
# Get the default content for a template
|
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
|
+
|
202
|
+
# Get the default content for a template
|
203
|
+
# Get the sections that you can edit in a template, including each section'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)
|
212
|
+
|
213
|
+
# query parameters
|
214
|
+
query_params = {}
|
215
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
216
|
+
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
|
+
form_params = {}
|
227
|
+
|
228
|
+
# http body (model)
|
229
|
+
post_body = nil
|
230
|
+
auth_names = ['basicAuth']
|
231
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
232
|
+
:header_params => header_params,
|
233
|
+
:query_params => query_params,
|
234
|
+
:form_params => form_params,
|
235
|
+
:body => post_body,
|
236
|
+
:auth_names => auth_names,
|
237
|
+
:return_type => 'TemplateDefaultContent')
|
238
|
+
return data, status_code, headers
|
239
|
+
end
|
240
|
+
# Update an existing 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
|
+
|
251
|
+
# Update an existing template
|
252
|
+
# Update the name, HTML, or `folder_id` 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)
|
260
|
+
|
261
|
+
# query parameters
|
262
|
+
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
|
+
form_params = {}
|
273
|
+
|
274
|
+
# http body (model)
|
275
|
+
post_body = @api_client.object_to_http_body(body)
|
276
|
+
auth_names = ['basicAuth']
|
277
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
278
|
+
:header_params => header_params,
|
279
|
+
:query_params => query_params,
|
280
|
+
:form_params => form_params,
|
281
|
+
:body => post_body,
|
282
|
+
:auth_names => auth_names,
|
283
|
+
:return_type => 'TemplateInstance')
|
284
|
+
return data, status_code, headers
|
285
|
+
end
|
286
|
+
# Create a new template
|
287
|
+
# Create a new template for the account. Only [Classic templates](https://mailchimp.com/help/types-of-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
|
+
|
296
|
+
# Create a new template
|
297
|
+
# Create a new template for the account. Only [Classic templates](https://mailchimp.com/help/types-of-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'
|
304
|
+
|
305
|
+
# query parameters
|
306
|
+
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
|
+
form_params = {}
|
317
|
+
|
318
|
+
# http body (model)
|
319
|
+
post_body = @api_client.object_to_http_body(body)
|
320
|
+
auth_names = ['basicAuth']
|
321
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
322
|
+
:header_params => header_params,
|
323
|
+
:query_params => query_params,
|
324
|
+
:form_params => form_params,
|
325
|
+
:body => post_body,
|
326
|
+
:auth_names => auth_names,
|
327
|
+
:return_type => 'TemplateInstance')
|
328
|
+
return data, status_code, headers
|
329
|
+
end
|
330
|
+
end
|
331
|
+
end
|
@@ -0,0 +1,242 @@
|
|
1
|
+
=begin
|
2
|
+
#Mailchimp Marketing API
|
3
|
+
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
+
|
6
|
+
OpenAPI spec version: 3.0.1
|
7
|
+
Contact: apihelp@mailchimp.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 MailchimpMarketing
|
16
|
+
class VerifiedDomainsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Add a domain to the account, triggering a verification e-mail to the provided address.
|
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
|
+
|
32
|
+
# Add a domain to the account, triggering a verification e-mail to the provided address.
|
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'
|
40
|
+
|
41
|
+
# query parameters
|
42
|
+
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
|
+
form_params = {}
|
53
|
+
|
54
|
+
# http body (model)
|
55
|
+
post_body = @api_client.object_to_http_body(body)
|
56
|
+
auth_names = ['basicAuth']
|
57
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
58
|
+
:header_params => header_params,
|
59
|
+
:query_params => query_params,
|
60
|
+
:form_params => form_params,
|
61
|
+
:body => post_body,
|
62
|
+
:auth_names => auth_names,
|
63
|
+
:return_type => 'VerifiedDomains')
|
64
|
+
return data, status_code, headers
|
65
|
+
end
|
66
|
+
# Delete a verified 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
|
+
|
76
|
+
# Delete a verified 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)
|
84
|
+
|
85
|
+
# query parameters
|
86
|
+
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
|
+
form_params = {}
|
97
|
+
|
98
|
+
# http body (model)
|
99
|
+
post_body = nil
|
100
|
+
auth_names = ['basicAuth']
|
101
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
102
|
+
:header_params => header_params,
|
103
|
+
:query_params => query_params,
|
104
|
+
:form_params => form_params,
|
105
|
+
:body => post_body,
|
106
|
+
:auth_names => auth_names)
|
107
|
+
return data, status_code, headers
|
108
|
+
end
|
109
|
+
# Get the details for a single domain on the account.
|
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
|
+
|
119
|
+
# Get the details for a single domain on the account.
|
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)
|
127
|
+
|
128
|
+
# query parameters
|
129
|
+
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
|
+
form_params = {}
|
140
|
+
|
141
|
+
# http body (model)
|
142
|
+
post_body = nil
|
143
|
+
auth_names = ['basicAuth']
|
144
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
145
|
+
:header_params => header_params,
|
146
|
+
:query_params => query_params,
|
147
|
+
:form_params => form_params,
|
148
|
+
:body => post_body,
|
149
|
+
:auth_names => auth_names,
|
150
|
+
:return_type => 'VerifiedDomains')
|
151
|
+
return data, status_code, headers
|
152
|
+
end
|
153
|
+
# Get all of the sending domains on the account.
|
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
|
+
|
162
|
+
# Get all of the sending domains on the account.
|
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'
|
169
|
+
|
170
|
+
# query parameters
|
171
|
+
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
|
+
form_params = {}
|
182
|
+
|
183
|
+
# http body (model)
|
184
|
+
post_body = nil
|
185
|
+
auth_names = ['basicAuth']
|
186
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
187
|
+
:header_params => header_params,
|
188
|
+
:query_params => query_params,
|
189
|
+
:form_params => form_params,
|
190
|
+
:body => post_body,
|
191
|
+
:auth_names => auth_names,
|
192
|
+
:return_type => 'VerifiedDomains1')
|
193
|
+
return data, status_code, headers
|
194
|
+
end
|
195
|
+
# Submit a response to the verification challenge and verify a domain for sending.
|
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
|
+
|
206
|
+
# Submit a response to the verification challenge and verify a domain for sending.
|
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)
|
215
|
+
|
216
|
+
# query parameters
|
217
|
+
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
|
+
form_params = {}
|
228
|
+
|
229
|
+
# http body (model)
|
230
|
+
post_body = @api_client.object_to_http_body(body)
|
231
|
+
auth_names = ['basicAuth']
|
232
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
233
|
+
:header_params => header_params,
|
234
|
+
:query_params => query_params,
|
235
|
+
:form_params => form_params,
|
236
|
+
:body => post_body,
|
237
|
+
:auth_names => auth_names,
|
238
|
+
:return_type => 'VerifiedDomains')
|
239
|
+
return data, status_code, headers
|
240
|
+
end
|
241
|
+
end
|
242
|
+
end
|