MailchimpMarketing 3.0.5 → 3.0.6
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 +4 -4
- data/MailchimpMarketing.gemspec +1 -1
- data/README.md +22 -26
- data/lib/MailchimpMarketing.rb +1 -1
- data/lib/MailchimpMarketing/api/activity_feed_api.rb +11 -67
- data/lib/MailchimpMarketing/api/authorized_apps_api.rb +17 -110
- data/lib/MailchimpMarketing/api/automations_api.rb +111 -666
- data/lib/MailchimpMarketing/api/batch_webhooks_api.rb +28 -177
- data/lib/MailchimpMarketing/api/batches_api.rb +22 -142
- data/lib/MailchimpMarketing/api/campaign_folders_api.rb +28 -177
- data/lib/MailchimpMarketing/api/campaigns_api.rb +125 -784
- data/lib/MailchimpMarketing/api/connected_sites_api.rb +27 -174
- data/lib/MailchimpMarketing/api/conversations_api.rb +31 -200
- data/lib/MailchimpMarketing/api/dashboard_api.rb +26 -215
- data/lib/MailchimpMarketing/api/ecommerce_api.rb +388 -2253
- data/lib/MailchimpMarketing/api/external_auths_api.rb +17 -110
- data/lib/MailchimpMarketing/api/facebook_ads_api.rb +14 -81
- data/lib/MailchimpMarketing/api/file_manager_api.rb +60 -402
- data/lib/MailchimpMarketing/api/landing_pages_api.rb +45 -280
- data/lib/MailchimpMarketing/api/lists_api.rb +420 -2575
- data/lib/MailchimpMarketing/api/ping_api.rb +6 -32
- data/lib/MailchimpMarketing/api/postcards_api.rb +8 -40
- data/lib/MailchimpMarketing/api/reporting_api.rb +35 -231
- data/lib/MailchimpMarketing/api/reports_api.rb +131 -881
- data/lib/MailchimpMarketing/api/root_api.rb +6 -36
- data/lib/MailchimpMarketing/api/search_campaigns_api.rb +7 -38
- data/lib/MailchimpMarketing/api/search_members_api.rb +7 -40
- data/lib/MailchimpMarketing/api/template_folders_api.rb +28 -177
- data/lib/MailchimpMarketing/api/templates_api.rb +34 -228
- data/lib/MailchimpMarketing/api/verified_domains_api.rb +27 -165
- data/lib/MailchimpMarketing/api_client.rb +11 -55
- data/lib/MailchimpMarketing/api_error.rb +1 -1
- data/lib/MailchimpMarketing/configuration.rb +1 -1
- data/lib/MailchimpMarketing/version.rb +2 -2
- 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.
|
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 CampaignFoldersApi
|
@@ -19,241 +20,91 @@ module MailchimpMarketing
|
|
19
20
|
def initialize(api_client)
|
20
21
|
@api_client = api_client
|
21
22
|
end
|
22
|
-
# Delete campaign folder
|
23
|
-
# Delete a specific campaign folder, and mark all the campaigns in the folder as 'unfiled'.
|
24
|
-
# @param folder_id The unique id for the campaign folder.
|
25
|
-
# @param [Hash] opts the optional parameters
|
26
|
-
# @return [nil]
|
27
|
-
def remove(folder_id = {}, opts = {})
|
28
|
-
remove_with_http_info(folder_id, opts)
|
29
|
-
nil
|
30
|
-
end
|
31
23
|
|
32
24
|
# Delete campaign folder
|
33
|
-
|
34
|
-
|
35
|
-
# @param [Hash] opts the optional parameters
|
36
|
-
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
37
|
-
def remove_with_http_info(folder_id, opts = {})
|
38
|
-
# resource path
|
39
|
-
local_var_path = '/campaign-folders/{folder_id}'.sub('{' + 'folder_id' + '}', folder_id.to_s)
|
25
|
+
def remove(folder_id, opts = {})
|
26
|
+
fail ArgumentError, "Missing required param: 'folder_id'" if folder_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
|
-
|
31
|
+
|
32
|
+
local_var_path = '/campaign-folders/{folder_id}'.sub('{' + 'folder_id' + '}', folder_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 campaign folders
|
66
|
-
# Get all folders used to organize campaigns.
|
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
|
-
# @return [CampaignFolders]
|
73
|
-
def list(opts = {})
|
74
|
-
data, _status_code, _headers = list_with_http_info(opts)
|
75
|
-
data
|
76
|
-
end
|
77
39
|
|
78
40
|
# List campaign folders
|
79
|
-
|
80
|
-
|
81
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
82
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
83
|
-
# @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**
|
84
|
-
# @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**.
|
85
|
-
# @return [Array<(CampaignFolders, Fixnum, Hash)>] CampaignFolders data, response status code and response headers
|
86
|
-
def list_with_http_info(opts = {})
|
87
|
-
# resource path
|
88
|
-
local_var_path = '/campaign-folders'
|
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
|
89
43
|
|
90
|
-
# query parameters
|
91
44
|
query_params = {}
|
92
45
|
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
93
46
|
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
94
47
|
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
95
48
|
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
96
|
-
|
97
|
-
# header parameters
|
98
|
-
header_params = {}
|
99
|
-
# HTTP header 'Accept' (if needed)
|
100
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
101
|
-
# HTTP header 'Content-Type'
|
102
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
103
|
-
|
104
|
-
# form parameters
|
105
49
|
form_params = {}
|
106
|
-
|
107
|
-
# http body (model)
|
108
50
|
post_body = nil
|
109
|
-
|
51
|
+
|
52
|
+
local_var_path = '/campaign-folders'
|
110
53
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
111
|
-
:header_params => header_params,
|
112
54
|
:query_params => query_params,
|
113
55
|
:form_params => form_params,
|
114
|
-
:body => post_body
|
115
|
-
:auth_names => auth_names,
|
116
|
-
:return_type => 'CampaignFolders')
|
56
|
+
:body => post_body)
|
117
57
|
return data, status_code, headers
|
118
58
|
end
|
119
|
-
# Get campaign folder
|
120
|
-
# Get information about a specific folder used to organize campaigns.
|
121
|
-
# @param folder_id The unique id for the campaign folder.
|
122
|
-
# @param [Hash] opts the optional parameters
|
123
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
124
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
125
|
-
# @return [CampaignFolder]
|
126
|
-
def get(folder_id = {}, opts = {})
|
127
|
-
data, _status_code, _headers = get_with_http_info(folder_id, opts)
|
128
|
-
data
|
129
|
-
end
|
130
59
|
|
131
60
|
# Get campaign folder
|
132
|
-
|
133
|
-
|
134
|
-
# @param [Hash] opts the optional parameters
|
135
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
136
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
137
|
-
# @return [Array<(CampaignFolder, Fixnum, Hash)>] CampaignFolder data, response status code and response headers
|
138
|
-
def get_with_http_info(folder_id, opts = {})
|
139
|
-
# resource path
|
140
|
-
local_var_path = '/campaign-folders/{folder_id}'.sub('{' + 'folder_id' + '}', folder_id.to_s)
|
61
|
+
def get(folder_id, opts = {})
|
62
|
+
fail ArgumentError, "Missing required param: 'folder_id'" if folder_id.nil?
|
141
63
|
|
142
|
-
# query parameters
|
143
64
|
query_params = {}
|
144
65
|
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
145
66
|
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
146
|
-
|
147
|
-
# header parameters
|
148
|
-
header_params = {}
|
149
|
-
# HTTP header 'Accept' (if needed)
|
150
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
151
|
-
# HTTP header 'Content-Type'
|
152
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
153
|
-
|
154
|
-
# form parameters
|
155
67
|
form_params = {}
|
156
|
-
|
157
|
-
# http body (model)
|
158
68
|
post_body = nil
|
159
|
-
|
69
|
+
|
70
|
+
local_var_path = '/campaign-folders/{folder_id}'.sub('{' + 'folder_id' + '}', folder_id.to_s)
|
160
71
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
161
|
-
:header_params => header_params,
|
162
72
|
:query_params => query_params,
|
163
73
|
:form_params => form_params,
|
164
|
-
:body => post_body
|
165
|
-
:auth_names => auth_names,
|
166
|
-
:return_type => 'CampaignFolder')
|
74
|
+
:body => post_body)
|
167
75
|
return data, status_code, headers
|
168
76
|
end
|
169
|
-
# Update campaign folder
|
170
|
-
# Update a specific folder used to organize campaigns.
|
171
|
-
# @param folder_id The unique id for the campaign folder.
|
172
|
-
# @param body
|
173
|
-
# @param [Hash] opts the optional parameters
|
174
|
-
# @return [CampaignFolder]
|
175
|
-
def update(folder_id = {}, body = {}, opts = {})
|
176
|
-
data, _status_code, _headers = update_with_http_info(folder_id, body, opts)
|
177
|
-
data
|
178
|
-
end
|
179
77
|
|
180
78
|
# Update campaign folder
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
# @param [Hash] opts the optional parameters
|
185
|
-
# @return [Array<(CampaignFolder, Fixnum, Hash)>] CampaignFolder data, response status code and response headers
|
186
|
-
def update_with_http_info(folder_id, body, opts = {})
|
187
|
-
# resource path
|
188
|
-
local_var_path = '/campaign-folders/{folder_id}'.sub('{' + 'folder_id' + '}', folder_id.to_s)
|
79
|
+
def update(folder_id, body, opts = {})
|
80
|
+
fail ArgumentError, "Missing required param: 'folder_id'" if folder_id.nil?
|
81
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
189
82
|
|
190
|
-
# query parameters
|
191
83
|
query_params = {}
|
192
|
-
|
193
|
-
# header parameters
|
194
|
-
header_params = {}
|
195
|
-
# HTTP header 'Accept' (if needed)
|
196
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
197
|
-
# HTTP header 'Content-Type'
|
198
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
199
|
-
|
200
|
-
# form parameters
|
201
84
|
form_params = {}
|
202
|
-
|
203
|
-
# http body (model)
|
204
85
|
post_body = @api_client.object_to_http_body(body)
|
205
|
-
|
86
|
+
|
87
|
+
local_var_path = '/campaign-folders/{folder_id}'.sub('{' + 'folder_id' + '}', folder_id.to_s)
|
206
88
|
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
207
|
-
:header_params => header_params,
|
208
89
|
:query_params => query_params,
|
209
90
|
:form_params => form_params,
|
210
|
-
:body => post_body
|
211
|
-
:auth_names => auth_names,
|
212
|
-
:return_type => 'CampaignFolder')
|
91
|
+
:body => post_body)
|
213
92
|
return data, status_code, headers
|
214
93
|
end
|
215
|
-
# Add campaign folder
|
216
|
-
# Create a new campaign folder.
|
217
|
-
# @param body
|
218
|
-
# @param [Hash] opts the optional parameters
|
219
|
-
# @return [CampaignFolder]
|
220
|
-
def create(body = {}, opts = {})
|
221
|
-
data, _status_code, _headers = create_with_http_info(body, opts)
|
222
|
-
data
|
223
|
-
end
|
224
94
|
|
225
95
|
# Add campaign folder
|
226
|
-
|
227
|
-
|
228
|
-
# @param [Hash] opts the optional parameters
|
229
|
-
# @return [Array<(CampaignFolder, Fixnum, Hash)>] CampaignFolder data, response status code and response headers
|
230
|
-
def create_with_http_info(body, opts = {})
|
231
|
-
# resource path
|
232
|
-
local_var_path = '/campaign-folders'
|
96
|
+
def create(body, opts = {})
|
97
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
233
98
|
|
234
|
-
# query parameters
|
235
99
|
query_params = {}
|
236
|
-
|
237
|
-
# header parameters
|
238
|
-
header_params = {}
|
239
|
-
# HTTP header 'Accept' (if needed)
|
240
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
241
|
-
# HTTP header 'Content-Type'
|
242
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
243
|
-
|
244
|
-
# form parameters
|
245
100
|
form_params = {}
|
246
|
-
|
247
|
-
# http body (model)
|
248
101
|
post_body = @api_client.object_to_http_body(body)
|
249
|
-
|
102
|
+
|
103
|
+
local_var_path = '/campaign-folders'
|
250
104
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
251
|
-
:header_params => header_params,
|
252
105
|
:query_params => query_params,
|
253
106
|
:form_params => form_params,
|
254
|
-
:body => post_body
|
255
|
-
:auth_names => auth_names,
|
256
|
-
:return_type => 'CampaignFolder')
|
107
|
+
:body => post_body)
|
257
108
|
return data, status_code, headers
|
258
109
|
end
|
259
110
|
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.
|
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 CampaignsApi
|
@@ -19,142 +20,48 @@ module MailchimpMarketing
|
|
19
20
|
def initialize(api_client)
|
20
21
|
@api_client = api_client
|
21
22
|
end
|
22
|
-
# Delete campaign
|
23
|
-
# Remove a campaign from your Mailchimp account.
|
24
|
-
# @param campaign_id The unique id for the campaign.
|
25
|
-
# @param [Hash] opts the optional parameters
|
26
|
-
# @return [nil]
|
27
|
-
def remove(campaign_id = {}, opts = {})
|
28
|
-
remove_with_http_info(campaign_id, opts)
|
29
|
-
nil
|
30
|
-
end
|
31
23
|
|
32
24
|
# Delete campaign
|
33
|
-
|
34
|
-
|
35
|
-
# @param [Hash] opts the optional parameters
|
36
|
-
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
37
|
-
def remove_with_http_info(campaign_id, opts = {})
|
38
|
-
# resource path
|
39
|
-
local_var_path = '/campaigns/{campaign_id}'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
|
25
|
+
def remove(campaign_id, opts = {})
|
26
|
+
fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_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
|
-
|
31
|
+
|
32
|
+
local_var_path = '/campaigns/{campaign_id}'.sub('{' + 'campaign_id' + '}', campaign_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
|
-
# Delete campaign feedback message
|
66
|
-
# Remove a specific feedback message for a campaign.
|
67
|
-
# @param campaign_id The unique id for the campaign.
|
68
|
-
# @param feedback_id The unique id for the feedback message.
|
69
|
-
# @param [Hash] opts the optional parameters
|
70
|
-
# @return [nil]
|
71
|
-
def delete_feedback_message(campaign_id = {}, feedback_id = {}, opts = {})
|
72
|
-
delete_feedback_message_with_http_info(campaign_id, feedback_id, opts)
|
73
|
-
nil
|
74
|
-
end
|
75
39
|
|
76
40
|
# Delete campaign feedback message
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
# @param [Hash] opts the optional parameters
|
81
|
-
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
82
|
-
def delete_feedback_message_with_http_info(campaign_id, feedback_id, opts = {})
|
83
|
-
# resource path
|
84
|
-
local_var_path = '/campaigns/{campaign_id}/feedback/{feedback_id}'.sub('{' + 'campaign_id' + '}', campaign_id.to_s).sub('{' + 'feedback_id' + '}', feedback_id.to_s)
|
41
|
+
def delete_feedback_message(campaign_id, feedback_id, opts = {})
|
42
|
+
fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
|
43
|
+
fail ArgumentError, "Missing required param: 'feedback_id'" if feedback_id.nil?
|
85
44
|
|
86
|
-
# query parameters
|
87
45
|
query_params = {}
|
88
|
-
|
89
|
-
# header parameters
|
90
|
-
header_params = {}
|
91
|
-
# HTTP header 'Accept' (if needed)
|
92
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
93
|
-
# HTTP header 'Content-Type'
|
94
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
95
|
-
|
96
|
-
# form parameters
|
97
46
|
form_params = {}
|
98
|
-
|
99
|
-
# http body (model)
|
100
47
|
post_body = nil
|
101
|
-
|
48
|
+
|
49
|
+
local_var_path = '/campaigns/{campaign_id}/feedback/{feedback_id}'.sub('{' + 'campaign_id' + '}', campaign_id.to_s).sub('{' + 'feedback_id' + '}', feedback_id.to_s)
|
102
50
|
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
103
|
-
:header_params => header_params,
|
104
51
|
:query_params => query_params,
|
105
52
|
:form_params => form_params,
|
106
|
-
:body => post_body
|
107
|
-
:auth_names => auth_names)
|
53
|
+
:body => post_body)
|
108
54
|
return data, status_code, headers
|
109
55
|
end
|
110
|
-
# List campaigns
|
111
|
-
# Get all campaigns in an account.
|
112
|
-
# @param [Hash] opts the optional parameters
|
113
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
114
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
115
|
-
# @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)
|
116
|
-
# @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)
|
117
|
-
# @option opts [String] :type The campaign type.
|
118
|
-
# @option opts [String] :status The status of the campaign.
|
119
|
-
# @option opts [DateTime] :before_send_time Restrict the response to campaigns sent before the set time. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
|
120
|
-
# @option opts [DateTime] :since_send_time Restrict the response to campaigns sent after the set time. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
|
121
|
-
# @option opts [DateTime] :before_create_time Restrict the response to campaigns created before the set time. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
|
122
|
-
# @option opts [DateTime] :since_create_time Restrict the response to campaigns created after the set time. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
|
123
|
-
# @option opts [String] :list_id The unique id for the list.
|
124
|
-
# @option opts [String] :folder_id The unique folder id.
|
125
|
-
# @option opts [String] :member_id Retrieve campaigns sent to a particular list member. Member ID is The MD5 hash of the lowercase version of the list member’s email address.
|
126
|
-
# @option opts [String] :sort_field Returns files sorted by the specified field.
|
127
|
-
# @option opts [String] :sort_dir Determines the order direction for sorted results.
|
128
|
-
# @return [InlineResponse2005]
|
129
|
-
def list(opts = {})
|
130
|
-
data, _status_code, _headers = list_with_http_info(opts)
|
131
|
-
data
|
132
|
-
end
|
133
56
|
|
134
57
|
# List campaigns
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
# @option opts [String] :type The campaign type.
|
142
|
-
# @option opts [String] :status The status of the campaign.
|
143
|
-
# @option opts [DateTime] :before_send_time Restrict the response to campaigns sent before the set time. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
|
144
|
-
# @option opts [DateTime] :since_send_time Restrict the response to campaigns sent after the set time. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
|
145
|
-
# @option opts [DateTime] :before_create_time Restrict the response to campaigns created before the set time. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
|
146
|
-
# @option opts [DateTime] :since_create_time Restrict the response to campaigns created after the set time. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
|
147
|
-
# @option opts [String] :list_id The unique id for the list.
|
148
|
-
# @option opts [String] :folder_id The unique folder id.
|
149
|
-
# @option opts [String] :member_id Retrieve campaigns sent to a particular list member. Member ID is The MD5 hash of the lowercase version of the list member’s email address.
|
150
|
-
# @option opts [String] :sort_field Returns files sorted by the specified field.
|
151
|
-
# @option opts [String] :sort_dir Determines the order direction for sorted results.
|
152
|
-
# @return [Array<(InlineResponse2005, Fixnum, Hash)>] InlineResponse2005 data, response status code and response headers
|
153
|
-
def list_with_http_info(opts = {})
|
154
|
-
# resource path
|
155
|
-
local_var_path = '/campaigns'
|
58
|
+
def list(opts = {})
|
59
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
60
|
+
fail ArgumentError, 'invalid value for "type", must be one of regular, plaintext, absplit, rss, variate' if opts[:'type'] && !['regular', 'plaintext', 'absplit', 'rss', 'variate'].include?(opts[:'type'])
|
61
|
+
fail ArgumentError, 'invalid value for "status", must be one of save, paused, schedule, sending, sent' if opts[:'status'] && !['save', 'paused', 'schedule', 'sending', 'sent'].include?(opts[:'status'])
|
62
|
+
fail ArgumentError, 'invalid value for "sort_field", must be one of create_time, send_time' if opts[:'sort_field'] && !['create_time', 'send_time'].include?(opts[:'sort_field'])
|
63
|
+
fail ArgumentError, 'invalid value for "sort_dir", must be one of ASC, DESC' if opts[:'sort_dir'] && !['ASC', 'DESC'].include?(opts[:'sort_dir'])
|
156
64
|
|
157
|
-
# query parameters
|
158
65
|
query_params = {}
|
159
66
|
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
160
67
|
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
@@ -171,902 +78,336 @@ module MailchimpMarketing
|
|
171
78
|
query_params[:'member_id'] = opts[:'member_id'] if !opts[:'member_id'].nil?
|
172
79
|
query_params[:'sort_field'] = opts[:'sort_field'] if !opts[:'sort_field'].nil?
|
173
80
|
query_params[:'sort_dir'] = opts[:'sort_dir'] if !opts[:'sort_dir'].nil?
|
174
|
-
|
175
|
-
# header parameters
|
176
|
-
header_params = {}
|
177
|
-
# HTTP header 'Accept' (if needed)
|
178
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
179
|
-
# HTTP header 'Content-Type'
|
180
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
181
|
-
|
182
|
-
# form parameters
|
183
81
|
form_params = {}
|
184
|
-
|
185
|
-
# http body (model)
|
186
82
|
post_body = nil
|
187
|
-
|
83
|
+
|
84
|
+
local_var_path = '/campaigns'
|
188
85
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
189
|
-
:header_params => header_params,
|
190
86
|
:query_params => query_params,
|
191
87
|
:form_params => form_params,
|
192
|
-
:body => post_body
|
193
|
-
:auth_names => auth_names,
|
194
|
-
:return_type => 'InlineResponse2005')
|
88
|
+
:body => post_body)
|
195
89
|
return data, status_code, headers
|
196
90
|
end
|
197
|
-
# Get campaign info
|
198
|
-
# Get information about a specific campaign.
|
199
|
-
# @param campaign_id The unique id for the campaign.
|
200
|
-
# @param [Hash] opts the optional parameters
|
201
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
202
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
203
|
-
# @return [Campaign]
|
204
|
-
def get(campaign_id = {}, opts = {})
|
205
|
-
data, _status_code, _headers = get_with_http_info(campaign_id, opts)
|
206
|
-
data
|
207
|
-
end
|
208
91
|
|
209
92
|
# Get campaign info
|
210
|
-
|
211
|
-
|
212
|
-
# @param [Hash] opts the optional parameters
|
213
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
214
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
215
|
-
# @return [Array<(Campaign, Fixnum, Hash)>] Campaign data, response status code and response headers
|
216
|
-
def get_with_http_info(campaign_id, opts = {})
|
217
|
-
# resource path
|
218
|
-
local_var_path = '/campaigns/{campaign_id}'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
|
93
|
+
def get(campaign_id, opts = {})
|
94
|
+
fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
|
219
95
|
|
220
|
-
# query parameters
|
221
96
|
query_params = {}
|
222
97
|
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
223
98
|
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
224
|
-
|
225
|
-
# header parameters
|
226
|
-
header_params = {}
|
227
|
-
# HTTP header 'Accept' (if needed)
|
228
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
229
|
-
# HTTP header 'Content-Type'
|
230
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
231
|
-
|
232
|
-
# form parameters
|
233
99
|
form_params = {}
|
234
|
-
|
235
|
-
# http body (model)
|
236
100
|
post_body = nil
|
237
|
-
|
101
|
+
|
102
|
+
local_var_path = '/campaigns/{campaign_id}'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
|
238
103
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
239
|
-
:header_params => header_params,
|
240
104
|
:query_params => query_params,
|
241
105
|
:form_params => form_params,
|
242
|
-
:body => post_body
|
243
|
-
:auth_names => auth_names,
|
244
|
-
:return_type => 'Campaign')
|
106
|
+
:body => post_body)
|
245
107
|
return data, status_code, headers
|
246
108
|
end
|
247
|
-
# Get campaign content
|
248
|
-
# Get the the HTML and plain-text content for a campaign.
|
249
|
-
# @param campaign_id The unique id for the campaign.
|
250
|
-
# @param [Hash] opts the optional parameters
|
251
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
252
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
253
|
-
# @return [CampaignContent]
|
254
|
-
def get_content(campaign_id = {}, opts = {})
|
255
|
-
data, _status_code, _headers = get_content_with_http_info(campaign_id, opts)
|
256
|
-
data
|
257
|
-
end
|
258
109
|
|
259
110
|
# Get campaign content
|
260
|
-
|
261
|
-
|
262
|
-
# @param [Hash] opts the optional parameters
|
263
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
264
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
265
|
-
# @return [Array<(CampaignContent, Fixnum, Hash)>] CampaignContent data, response status code and response headers
|
266
|
-
def get_content_with_http_info(campaign_id, opts = {})
|
267
|
-
# resource path
|
268
|
-
local_var_path = '/campaigns/{campaign_id}/content'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
|
111
|
+
def get_content(campaign_id, opts = {})
|
112
|
+
fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
|
269
113
|
|
270
|
-
# query parameters
|
271
114
|
query_params = {}
|
272
115
|
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
273
116
|
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
274
|
-
|
275
|
-
# header parameters
|
276
|
-
header_params = {}
|
277
|
-
# HTTP header 'Accept' (if needed)
|
278
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
279
|
-
# HTTP header 'Content-Type'
|
280
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
281
|
-
|
282
|
-
# form parameters
|
283
117
|
form_params = {}
|
284
|
-
|
285
|
-
# http body (model)
|
286
118
|
post_body = nil
|
287
|
-
|
119
|
+
|
120
|
+
local_var_path = '/campaigns/{campaign_id}/content'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
|
288
121
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
289
|
-
:header_params => header_params,
|
290
122
|
:query_params => query_params,
|
291
123
|
:form_params => form_params,
|
292
|
-
:body => post_body
|
293
|
-
:auth_names => auth_names,
|
294
|
-
:return_type => 'CampaignContent')
|
124
|
+
:body => post_body)
|
295
125
|
return data, status_code, headers
|
296
126
|
end
|
297
|
-
# List campaign feedback
|
298
|
-
# Get team feedback while you're working together on a Mailchimp campaign.
|
299
|
-
# @param campaign_id The unique id for the campaign.
|
300
|
-
# @param [Hash] opts the optional parameters
|
301
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
302
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
303
|
-
# @return [CampaignReports]
|
304
|
-
def get_feedback(campaign_id = {}, opts = {})
|
305
|
-
data, _status_code, _headers = get_feedback_with_http_info(campaign_id, opts)
|
306
|
-
data
|
307
|
-
end
|
308
127
|
|
309
128
|
# List campaign feedback
|
310
|
-
|
311
|
-
|
312
|
-
# @param [Hash] opts the optional parameters
|
313
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
314
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
315
|
-
# @return [Array<(CampaignReports, Fixnum, Hash)>] CampaignReports data, response status code and response headers
|
316
|
-
def get_feedback_with_http_info(campaign_id, opts = {})
|
317
|
-
# resource path
|
318
|
-
local_var_path = '/campaigns/{campaign_id}/feedback'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
|
129
|
+
def get_feedback(campaign_id, opts = {})
|
130
|
+
fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
|
319
131
|
|
320
|
-
# query parameters
|
321
132
|
query_params = {}
|
322
133
|
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
323
134
|
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
324
|
-
|
325
|
-
# header parameters
|
326
|
-
header_params = {}
|
327
|
-
# HTTP header 'Accept' (if needed)
|
328
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
329
|
-
# HTTP header 'Content-Type'
|
330
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
331
|
-
|
332
|
-
# form parameters
|
333
135
|
form_params = {}
|
334
|
-
|
335
|
-
# http body (model)
|
336
136
|
post_body = nil
|
337
|
-
|
137
|
+
|
138
|
+
local_var_path = '/campaigns/{campaign_id}/feedback'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
|
338
139
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
339
|
-
:header_params => header_params,
|
340
140
|
:query_params => query_params,
|
341
141
|
:form_params => form_params,
|
342
|
-
:body => post_body
|
343
|
-
:auth_names => auth_names,
|
344
|
-
:return_type => 'CampaignReports')
|
142
|
+
:body => post_body)
|
345
143
|
return data, status_code, headers
|
346
144
|
end
|
347
|
-
# Get campaign feedback message
|
348
|
-
# Get a specific feedback message from a campaign.
|
349
|
-
# @param campaign_id The unique id for the campaign.
|
350
|
-
# @param feedback_id The unique id for the feedback message.
|
351
|
-
# @param [Hash] opts the optional parameters
|
352
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
353
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
354
|
-
# @return [CampaignFeedback2]
|
355
|
-
def get_feedback_message(campaign_id = {}, feedback_id = {}, opts = {})
|
356
|
-
data, _status_code, _headers = get_feedback_message_with_http_info(campaign_id, feedback_id, opts)
|
357
|
-
data
|
358
|
-
end
|
359
145
|
|
360
146
|
# Get campaign feedback message
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
# @param [Hash] opts the optional parameters
|
365
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
366
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
367
|
-
# @return [Array<(CampaignFeedback2, Fixnum, Hash)>] CampaignFeedback2 data, response status code and response headers
|
368
|
-
def get_feedback_message_with_http_info(campaign_id, feedback_id, opts = {})
|
369
|
-
# resource path
|
370
|
-
local_var_path = '/campaigns/{campaign_id}/feedback/{feedback_id}'.sub('{' + 'campaign_id' + '}', campaign_id.to_s).sub('{' + 'feedback_id' + '}', feedback_id.to_s)
|
147
|
+
def get_feedback_message(campaign_id, feedback_id, opts = {})
|
148
|
+
fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
|
149
|
+
fail ArgumentError, "Missing required param: 'feedback_id'" if feedback_id.nil?
|
371
150
|
|
372
|
-
# query parameters
|
373
151
|
query_params = {}
|
374
152
|
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
375
153
|
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
376
|
-
|
377
|
-
# header parameters
|
378
|
-
header_params = {}
|
379
|
-
# HTTP header 'Accept' (if needed)
|
380
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
381
|
-
# HTTP header 'Content-Type'
|
382
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
383
|
-
|
384
|
-
# form parameters
|
385
154
|
form_params = {}
|
386
|
-
|
387
|
-
# http body (model)
|
388
155
|
post_body = nil
|
389
|
-
|
156
|
+
|
157
|
+
local_var_path = '/campaigns/{campaign_id}/feedback/{feedback_id}'.sub('{' + 'campaign_id' + '}', campaign_id.to_s).sub('{' + 'feedback_id' + '}', feedback_id.to_s)
|
390
158
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
391
|
-
:header_params => header_params,
|
392
159
|
:query_params => query_params,
|
393
160
|
:form_params => form_params,
|
394
|
-
:body => post_body
|
395
|
-
:auth_names => auth_names,
|
396
|
-
:return_type => 'CampaignFeedback2')
|
161
|
+
:body => post_body)
|
397
162
|
return data, status_code, headers
|
398
163
|
end
|
399
|
-
# Get campaign send checklist
|
400
|
-
# Review the send checklist for a campaign, and resolve any issues before sending.
|
401
|
-
# @param campaign_id The unique id for the campaign.
|
402
|
-
# @param [Hash] opts the optional parameters
|
403
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
404
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
405
|
-
# @return [SendChecklist]
|
406
|
-
def get_send_checklist(campaign_id = {}, opts = {})
|
407
|
-
data, _status_code, _headers = get_send_checklist_with_http_info(campaign_id, opts)
|
408
|
-
data
|
409
|
-
end
|
410
164
|
|
411
165
|
# Get campaign send checklist
|
412
|
-
|
413
|
-
|
414
|
-
# @param [Hash] opts the optional parameters
|
415
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
416
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
417
|
-
# @return [Array<(SendChecklist, Fixnum, Hash)>] SendChecklist data, response status code and response headers
|
418
|
-
def get_send_checklist_with_http_info(campaign_id, opts = {})
|
419
|
-
# resource path
|
420
|
-
local_var_path = '/campaigns/{campaign_id}/send-checklist'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
|
166
|
+
def get_send_checklist(campaign_id, opts = {})
|
167
|
+
fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
|
421
168
|
|
422
|
-
# query parameters
|
423
169
|
query_params = {}
|
424
170
|
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
425
171
|
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
426
|
-
|
427
|
-
# header parameters
|
428
|
-
header_params = {}
|
429
|
-
# HTTP header 'Accept' (if needed)
|
430
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
431
|
-
# HTTP header 'Content-Type'
|
432
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
433
|
-
|
434
|
-
# form parameters
|
435
172
|
form_params = {}
|
436
|
-
|
437
|
-
# http body (model)
|
438
173
|
post_body = nil
|
439
|
-
|
174
|
+
|
175
|
+
local_var_path = '/campaigns/{campaign_id}/send-checklist'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
|
440
176
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
441
|
-
:header_params => header_params,
|
442
177
|
:query_params => query_params,
|
443
178
|
:form_params => form_params,
|
444
|
-
:body => post_body
|
445
|
-
:auth_names => auth_names,
|
446
|
-
:return_type => 'SendChecklist')
|
179
|
+
:body => post_body)
|
447
180
|
return data, status_code, headers
|
448
181
|
end
|
449
|
-
# Update campaign settings
|
450
|
-
# Update some or all of the settings for a specific campaign.
|
451
|
-
# @param campaign_id The unique id for the campaign.
|
452
|
-
# @param body
|
453
|
-
# @param [Hash] opts the optional parameters
|
454
|
-
# @return [Campaign]
|
455
|
-
def update(campaign_id = {}, body = {}, opts = {})
|
456
|
-
data, _status_code, _headers = update_with_http_info(campaign_id, body, opts)
|
457
|
-
data
|
458
|
-
end
|
459
182
|
|
460
183
|
# Update campaign settings
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
# @param [Hash] opts the optional parameters
|
465
|
-
# @return [Array<(Campaign, Fixnum, Hash)>] Campaign data, response status code and response headers
|
466
|
-
def update_with_http_info(campaign_id, body, opts = {})
|
467
|
-
# resource path
|
468
|
-
local_var_path = '/campaigns/{campaign_id}'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
|
184
|
+
def update(campaign_id, body, opts = {})
|
185
|
+
fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
|
186
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
469
187
|
|
470
|
-
# query parameters
|
471
188
|
query_params = {}
|
472
|
-
|
473
|
-
# header parameters
|
474
|
-
header_params = {}
|
475
|
-
# HTTP header 'Accept' (if needed)
|
476
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
477
|
-
# HTTP header 'Content-Type'
|
478
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
479
|
-
|
480
|
-
# form parameters
|
481
189
|
form_params = {}
|
482
|
-
|
483
|
-
# http body (model)
|
484
190
|
post_body = @api_client.object_to_http_body(body)
|
485
|
-
|
191
|
+
|
192
|
+
local_var_path = '/campaigns/{campaign_id}'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
|
486
193
|
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
487
|
-
:header_params => header_params,
|
488
194
|
:query_params => query_params,
|
489
195
|
:form_params => form_params,
|
490
|
-
:body => post_body
|
491
|
-
:auth_names => auth_names,
|
492
|
-
:return_type => 'Campaign')
|
196
|
+
:body => post_body)
|
493
197
|
return data, status_code, headers
|
494
198
|
end
|
495
|
-
# Update campaign feedback message
|
496
|
-
# Update a specific feedback message for a campaign.
|
497
|
-
# @param campaign_id The unique id for the campaign.
|
498
|
-
# @param feedback_id The unique id for the feedback message.
|
499
|
-
# @param body
|
500
|
-
# @param [Hash] opts the optional parameters
|
501
|
-
# @return [CampaignFeedback2]
|
502
|
-
def update_feedback_message(campaign_id = {}, feedback_id = {}, body = {}, opts = {})
|
503
|
-
data, _status_code, _headers = update_feedback_message_with_http_info(campaign_id, feedback_id, body, opts)
|
504
|
-
data
|
505
|
-
end
|
506
199
|
|
507
200
|
# Update campaign feedback message
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
# @param [Hash] opts the optional parameters
|
513
|
-
# @return [Array<(CampaignFeedback2, Fixnum, Hash)>] CampaignFeedback2 data, response status code and response headers
|
514
|
-
def update_feedback_message_with_http_info(campaign_id, feedback_id, body, opts = {})
|
515
|
-
# resource path
|
516
|
-
local_var_path = '/campaigns/{campaign_id}/feedback/{feedback_id}'.sub('{' + 'campaign_id' + '}', campaign_id.to_s).sub('{' + 'feedback_id' + '}', feedback_id.to_s)
|
201
|
+
def update_feedback_message(campaign_id, feedback_id, body, opts = {})
|
202
|
+
fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
|
203
|
+
fail ArgumentError, "Missing required param: 'feedback_id'" if feedback_id.nil?
|
204
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
517
205
|
|
518
|
-
# query parameters
|
519
206
|
query_params = {}
|
520
|
-
|
521
|
-
# header parameters
|
522
|
-
header_params = {}
|
523
|
-
# HTTP header 'Accept' (if needed)
|
524
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
525
|
-
# HTTP header 'Content-Type'
|
526
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
527
|
-
|
528
|
-
# form parameters
|
529
207
|
form_params = {}
|
530
|
-
|
531
|
-
# http body (model)
|
532
208
|
post_body = @api_client.object_to_http_body(body)
|
533
|
-
|
209
|
+
|
210
|
+
local_var_path = '/campaigns/{campaign_id}/feedback/{feedback_id}'.sub('{' + 'campaign_id' + '}', campaign_id.to_s).sub('{' + 'feedback_id' + '}', feedback_id.to_s)
|
534
211
|
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
535
|
-
:header_params => header_params,
|
536
212
|
:query_params => query_params,
|
537
213
|
:form_params => form_params,
|
538
|
-
:body => post_body
|
539
|
-
:auth_names => auth_names,
|
540
|
-
:return_type => 'CampaignFeedback2')
|
214
|
+
:body => post_body)
|
541
215
|
return data, status_code, headers
|
542
216
|
end
|
543
|
-
# Add campaign
|
544
|
-
# Create a new Mailchimp campaign.
|
545
|
-
# @param body
|
546
|
-
# @param [Hash] opts the optional parameters
|
547
|
-
# @return [Campaign]
|
548
|
-
def create(body = {}, opts = {})
|
549
|
-
data, _status_code, _headers = create_with_http_info(body, opts)
|
550
|
-
data
|
551
|
-
end
|
552
217
|
|
553
218
|
# Add campaign
|
554
|
-
|
555
|
-
|
556
|
-
# @param [Hash] opts the optional parameters
|
557
|
-
# @return [Array<(Campaign, Fixnum, Hash)>] Campaign data, response status code and response headers
|
558
|
-
def create_with_http_info(body, opts = {})
|
559
|
-
# resource path
|
560
|
-
local_var_path = '/campaigns'
|
219
|
+
def create(body, opts = {})
|
220
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
561
221
|
|
562
|
-
# query parameters
|
563
222
|
query_params = {}
|
564
|
-
|
565
|
-
# header parameters
|
566
|
-
header_params = {}
|
567
|
-
# HTTP header 'Accept' (if needed)
|
568
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
569
|
-
# HTTP header 'Content-Type'
|
570
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
571
|
-
|
572
|
-
# form parameters
|
573
223
|
form_params = {}
|
574
|
-
|
575
|
-
# http body (model)
|
576
224
|
post_body = @api_client.object_to_http_body(body)
|
577
|
-
|
225
|
+
|
226
|
+
local_var_path = '/campaigns'
|
578
227
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
579
|
-
:header_params => header_params,
|
580
228
|
:query_params => query_params,
|
581
229
|
:form_params => form_params,
|
582
|
-
:body => post_body
|
583
|
-
:auth_names => auth_names,
|
584
|
-
:return_type => 'Campaign')
|
230
|
+
:body => post_body)
|
585
231
|
return data, status_code, headers
|
586
232
|
end
|
587
|
-
# Cancel campaign
|
588
|
-
# Cancel a Regular or Plain-Text Campaign after you send, before all of your recipients receive it. This feature is included with Mailchimp Pro.
|
589
|
-
# @param campaign_id The unique id for the campaign.
|
590
|
-
# @param [Hash] opts the optional parameters
|
591
|
-
# @return [nil]
|
592
|
-
def cancel_send(campaign_id = {}, opts = {})
|
593
|
-
cancel_send_with_http_info(campaign_id, opts)
|
594
|
-
nil
|
595
|
-
end
|
596
233
|
|
597
234
|
# Cancel campaign
|
598
|
-
|
599
|
-
|
600
|
-
# @param [Hash] opts the optional parameters
|
601
|
-
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
602
|
-
def cancel_send_with_http_info(campaign_id, opts = {})
|
603
|
-
# resource path
|
604
|
-
local_var_path = '/campaigns/{campaign_id}/actions/cancel-send'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
|
235
|
+
def cancel_send(campaign_id, opts = {})
|
236
|
+
fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
|
605
237
|
|
606
|
-
# query parameters
|
607
238
|
query_params = {}
|
608
|
-
|
609
|
-
# header parameters
|
610
|
-
header_params = {}
|
611
|
-
# HTTP header 'Accept' (if needed)
|
612
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
613
|
-
# HTTP header 'Content-Type'
|
614
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
615
|
-
|
616
|
-
# form parameters
|
617
239
|
form_params = {}
|
618
|
-
|
619
|
-
# http body (model)
|
620
240
|
post_body = nil
|
621
|
-
|
241
|
+
|
242
|
+
local_var_path = '/campaigns/{campaign_id}/actions/cancel-send'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
|
622
243
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
623
|
-
:header_params => header_params,
|
624
244
|
:query_params => query_params,
|
625
245
|
:form_params => form_params,
|
626
|
-
:body => post_body
|
627
|
-
:auth_names => auth_names)
|
246
|
+
:body => post_body)
|
628
247
|
return data, status_code, headers
|
629
248
|
end
|
630
|
-
# Resend campaign
|
631
|
-
# Creates a Resend to Non-Openers version of this campaign. We will also check if this campaign meets the criteria for Resend to Non-Openers campaigns.
|
632
|
-
# @param campaign_id The unique id for the campaign.
|
633
|
-
# @param [Hash] opts the optional parameters
|
634
|
-
# @return [Campaign3]
|
635
|
-
def create_resend(campaign_id = {}, opts = {})
|
636
|
-
data, _status_code, _headers = create_resend_with_http_info(campaign_id, opts)
|
637
|
-
data
|
638
|
-
end
|
639
249
|
|
640
250
|
# Resend campaign
|
641
|
-
|
642
|
-
|
643
|
-
# @param [Hash] opts the optional parameters
|
644
|
-
# @return [Array<(Campaign3, Fixnum, Hash)>] Campaign3 data, response status code and response headers
|
645
|
-
def create_resend_with_http_info(campaign_id, opts = {})
|
646
|
-
# resource path
|
647
|
-
local_var_path = '/campaigns/{campaign_id}/actions/create-resend'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
|
251
|
+
def create_resend(campaign_id, opts = {})
|
252
|
+
fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
|
648
253
|
|
649
|
-
# query parameters
|
650
254
|
query_params = {}
|
651
|
-
|
652
|
-
# header parameters
|
653
|
-
header_params = {}
|
654
|
-
# HTTP header 'Accept' (if needed)
|
655
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
656
|
-
# HTTP header 'Content-Type'
|
657
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
658
|
-
|
659
|
-
# form parameters
|
660
255
|
form_params = {}
|
661
|
-
|
662
|
-
# http body (model)
|
663
256
|
post_body = nil
|
664
|
-
|
257
|
+
|
258
|
+
local_var_path = '/campaigns/{campaign_id}/actions/create-resend'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
|
665
259
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
666
|
-
:header_params => header_params,
|
667
260
|
:query_params => query_params,
|
668
261
|
:form_params => form_params,
|
669
|
-
:body => post_body
|
670
|
-
:auth_names => auth_names,
|
671
|
-
:return_type => 'Campaign3')
|
262
|
+
:body => post_body)
|
672
263
|
return data, status_code, headers
|
673
264
|
end
|
674
|
-
# Pause rss campaign
|
675
|
-
# Pause an RSS-Driven campaign.
|
676
|
-
# @param campaign_id The unique id for the campaign.
|
677
|
-
# @param [Hash] opts the optional parameters
|
678
|
-
# @return [nil]
|
679
|
-
def pause(campaign_id = {}, opts = {})
|
680
|
-
pause_with_http_info(campaign_id, opts)
|
681
|
-
nil
|
682
|
-
end
|
683
265
|
|
684
266
|
# Pause rss campaign
|
685
|
-
|
686
|
-
|
687
|
-
# @param [Hash] opts the optional parameters
|
688
|
-
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
689
|
-
def pause_with_http_info(campaign_id, opts = {})
|
690
|
-
# resource path
|
691
|
-
local_var_path = '/campaigns/{campaign_id}/actions/pause'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
|
267
|
+
def pause(campaign_id, opts = {})
|
268
|
+
fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
|
692
269
|
|
693
|
-
# query parameters
|
694
270
|
query_params = {}
|
695
|
-
|
696
|
-
# header parameters
|
697
|
-
header_params = {}
|
698
|
-
# HTTP header 'Accept' (if needed)
|
699
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
700
|
-
# HTTP header 'Content-Type'
|
701
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
702
|
-
|
703
|
-
# form parameters
|
704
271
|
form_params = {}
|
705
|
-
|
706
|
-
# http body (model)
|
707
272
|
post_body = nil
|
708
|
-
|
273
|
+
|
274
|
+
local_var_path = '/campaigns/{campaign_id}/actions/pause'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
|
709
275
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
710
|
-
:header_params => header_params,
|
711
276
|
:query_params => query_params,
|
712
277
|
:form_params => form_params,
|
713
|
-
:body => post_body
|
714
|
-
:auth_names => auth_names)
|
278
|
+
:body => post_body)
|
715
279
|
return data, status_code, headers
|
716
280
|
end
|
717
|
-
# Replicate campaign
|
718
|
-
# Replicate a campaign in saved or send status.
|
719
|
-
# @param campaign_id The unique id for the campaign.
|
720
|
-
# @param [Hash] opts the optional parameters
|
721
|
-
# @return [Campaign3]
|
722
|
-
def replicate(campaign_id = {}, opts = {})
|
723
|
-
data, _status_code, _headers = replicate_with_http_info(campaign_id, opts)
|
724
|
-
data
|
725
|
-
end
|
726
281
|
|
727
282
|
# Replicate campaign
|
728
|
-
|
729
|
-
|
730
|
-
# @param [Hash] opts the optional parameters
|
731
|
-
# @return [Array<(Campaign3, Fixnum, Hash)>] Campaign3 data, response status code and response headers
|
732
|
-
def replicate_with_http_info(campaign_id, opts = {})
|
733
|
-
# resource path
|
734
|
-
local_var_path = '/campaigns/{campaign_id}/actions/replicate'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
|
283
|
+
def replicate(campaign_id, opts = {})
|
284
|
+
fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
|
735
285
|
|
736
|
-
# query parameters
|
737
286
|
query_params = {}
|
738
|
-
|
739
|
-
# header parameters
|
740
|
-
header_params = {}
|
741
|
-
# HTTP header 'Accept' (if needed)
|
742
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
743
|
-
# HTTP header 'Content-Type'
|
744
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
745
|
-
|
746
|
-
# form parameters
|
747
287
|
form_params = {}
|
748
|
-
|
749
|
-
# http body (model)
|
750
288
|
post_body = nil
|
751
|
-
|
289
|
+
|
290
|
+
local_var_path = '/campaigns/{campaign_id}/actions/replicate'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
|
752
291
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
753
|
-
:header_params => header_params,
|
754
292
|
:query_params => query_params,
|
755
293
|
:form_params => form_params,
|
756
|
-
:body => post_body
|
757
|
-
:auth_names => auth_names,
|
758
|
-
:return_type => 'Campaign3')
|
294
|
+
:body => post_body)
|
759
295
|
return data, status_code, headers
|
760
296
|
end
|
761
|
-
# Resume rss campaign
|
762
|
-
# Resume an RSS-Driven campaign.
|
763
|
-
# @param campaign_id The unique id for the campaign.
|
764
|
-
# @param [Hash] opts the optional parameters
|
765
|
-
# @return [nil]
|
766
|
-
def resume(campaign_id = {}, opts = {})
|
767
|
-
resume_with_http_info(campaign_id, opts)
|
768
|
-
nil
|
769
|
-
end
|
770
297
|
|
771
298
|
# Resume rss campaign
|
772
|
-
|
773
|
-
|
774
|
-
# @param [Hash] opts the optional parameters
|
775
|
-
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
776
|
-
def resume_with_http_info(campaign_id, opts = {})
|
777
|
-
# resource path
|
778
|
-
local_var_path = '/campaigns/{campaign_id}/actions/resume'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
|
299
|
+
def resume(campaign_id, opts = {})
|
300
|
+
fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
|
779
301
|
|
780
|
-
# query parameters
|
781
302
|
query_params = {}
|
782
|
-
|
783
|
-
# header parameters
|
784
|
-
header_params = {}
|
785
|
-
# HTTP header 'Accept' (if needed)
|
786
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
787
|
-
# HTTP header 'Content-Type'
|
788
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
789
|
-
|
790
|
-
# form parameters
|
791
303
|
form_params = {}
|
792
|
-
|
793
|
-
# http body (model)
|
794
304
|
post_body = nil
|
795
|
-
|
305
|
+
|
306
|
+
local_var_path = '/campaigns/{campaign_id}/actions/resume'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
|
796
307
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
797
|
-
:header_params => header_params,
|
798
308
|
:query_params => query_params,
|
799
309
|
:form_params => form_params,
|
800
|
-
:body => post_body
|
801
|
-
:auth_names => auth_names)
|
310
|
+
:body => post_body)
|
802
311
|
return data, status_code, headers
|
803
312
|
end
|
804
|
-
# Schedule campaign
|
805
|
-
# Schedule a campaign for delivery. If you're using Multivariate Campaigns to test send times or sending RSS Campaigns, use the send action instead.
|
806
|
-
# @param campaign_id The unique id for the campaign.
|
807
|
-
# @param body
|
808
|
-
# @param [Hash] opts the optional parameters
|
809
|
-
# @return [nil]
|
810
|
-
def schedule(campaign_id = {}, body = {}, opts = {})
|
811
|
-
schedule_with_http_info(campaign_id, body, opts)
|
812
|
-
nil
|
813
|
-
end
|
814
313
|
|
815
314
|
# Schedule campaign
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
# @param [Hash] opts the optional parameters
|
820
|
-
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
821
|
-
def schedule_with_http_info(campaign_id, body, opts = {})
|
822
|
-
# resource path
|
823
|
-
local_var_path = '/campaigns/{campaign_id}/actions/schedule'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
|
315
|
+
def schedule(campaign_id, body, opts = {})
|
316
|
+
fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
|
317
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
824
318
|
|
825
|
-
# query parameters
|
826
319
|
query_params = {}
|
827
|
-
|
828
|
-
# header parameters
|
829
|
-
header_params = {}
|
830
|
-
# HTTP header 'Accept' (if needed)
|
831
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
832
|
-
# HTTP header 'Content-Type'
|
833
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
834
|
-
|
835
|
-
# form parameters
|
836
320
|
form_params = {}
|
837
|
-
|
838
|
-
# http body (model)
|
839
321
|
post_body = @api_client.object_to_http_body(body)
|
840
|
-
|
322
|
+
|
323
|
+
local_var_path = '/campaigns/{campaign_id}/actions/schedule'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
|
841
324
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
842
|
-
:header_params => header_params,
|
843
325
|
:query_params => query_params,
|
844
326
|
:form_params => form_params,
|
845
|
-
:body => post_body
|
846
|
-
:auth_names => auth_names)
|
327
|
+
:body => post_body)
|
847
328
|
return data, status_code, headers
|
848
329
|
end
|
849
|
-
# Send campaign
|
850
|
-
# Send a Mailchimp campaign. For RSS Campaigns, the campaign will send according to its schedule. All other campaigns will send immediately.
|
851
|
-
# @param campaign_id The unique id for the campaign.
|
852
|
-
# @param [Hash] opts the optional parameters
|
853
|
-
# @return [nil]
|
854
|
-
def send(campaign_id = {}, opts = {})
|
855
|
-
send_with_http_info(campaign_id, opts)
|
856
|
-
nil
|
857
|
-
end
|
858
330
|
|
859
331
|
# Send campaign
|
860
|
-
|
861
|
-
|
862
|
-
# @param [Hash] opts the optional parameters
|
863
|
-
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
864
|
-
def send_with_http_info(campaign_id, opts = {})
|
865
|
-
# resource path
|
866
|
-
local_var_path = '/campaigns/{campaign_id}/actions/send'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
|
332
|
+
def send(campaign_id, opts = {})
|
333
|
+
fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
|
867
334
|
|
868
|
-
# query parameters
|
869
335
|
query_params = {}
|
870
|
-
|
871
|
-
# header parameters
|
872
|
-
header_params = {}
|
873
|
-
# HTTP header 'Accept' (if needed)
|
874
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
875
|
-
# HTTP header 'Content-Type'
|
876
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
877
|
-
|
878
|
-
# form parameters
|
879
336
|
form_params = {}
|
880
|
-
|
881
|
-
# http body (model)
|
882
337
|
post_body = nil
|
883
|
-
|
338
|
+
|
339
|
+
local_var_path = '/campaigns/{campaign_id}/actions/send'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
|
884
340
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
885
|
-
:header_params => header_params,
|
886
341
|
:query_params => query_params,
|
887
342
|
:form_params => form_params,
|
888
|
-
:body => post_body
|
889
|
-
:auth_names => auth_names)
|
343
|
+
:body => post_body)
|
890
344
|
return data, status_code, headers
|
891
345
|
end
|
892
|
-
# Send test email
|
893
|
-
# Send a test email.
|
894
|
-
# @param campaign_id The unique id for the campaign.
|
895
|
-
# @param body
|
896
|
-
# @param [Hash] opts the optional parameters
|
897
|
-
# @return [nil]
|
898
|
-
def send_test_email(campaign_id = {}, body = {}, opts = {})
|
899
|
-
send_test_email_with_http_info(campaign_id, body, opts)
|
900
|
-
nil
|
901
|
-
end
|
902
346
|
|
903
347
|
# Send test email
|
904
|
-
|
905
|
-
|
906
|
-
|
907
|
-
# @param [Hash] opts the optional parameters
|
908
|
-
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
909
|
-
def send_test_email_with_http_info(campaign_id, body, opts = {})
|
910
|
-
# resource path
|
911
|
-
local_var_path = '/campaigns/{campaign_id}/actions/test'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
|
348
|
+
def send_test_email(campaign_id, body, opts = {})
|
349
|
+
fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
|
350
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
912
351
|
|
913
|
-
# query parameters
|
914
352
|
query_params = {}
|
915
|
-
|
916
|
-
# header parameters
|
917
|
-
header_params = {}
|
918
|
-
# HTTP header 'Accept' (if needed)
|
919
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
920
|
-
# HTTP header 'Content-Type'
|
921
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
922
|
-
|
923
|
-
# form parameters
|
924
353
|
form_params = {}
|
925
|
-
|
926
|
-
# http body (model)
|
927
354
|
post_body = @api_client.object_to_http_body(body)
|
928
|
-
|
355
|
+
|
356
|
+
local_var_path = '/campaigns/{campaign_id}/actions/test'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
|
929
357
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
930
|
-
:header_params => header_params,
|
931
358
|
:query_params => query_params,
|
932
359
|
:form_params => form_params,
|
933
|
-
:body => post_body
|
934
|
-
:auth_names => auth_names)
|
360
|
+
:body => post_body)
|
935
361
|
return data, status_code, headers
|
936
362
|
end
|
937
|
-
# Unschedule campaign
|
938
|
-
# Unschedule a scheduled campaign that hasn't started sending.
|
939
|
-
# @param campaign_id The unique id for the campaign.
|
940
|
-
# @param [Hash] opts the optional parameters
|
941
|
-
# @return [nil]
|
942
|
-
def unschedule(campaign_id = {}, opts = {})
|
943
|
-
unschedule_with_http_info(campaign_id, opts)
|
944
|
-
nil
|
945
|
-
end
|
946
363
|
|
947
364
|
# Unschedule campaign
|
948
|
-
|
949
|
-
|
950
|
-
# @param [Hash] opts the optional parameters
|
951
|
-
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
952
|
-
def unschedule_with_http_info(campaign_id, opts = {})
|
953
|
-
# resource path
|
954
|
-
local_var_path = '/campaigns/{campaign_id}/actions/unschedule'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
|
365
|
+
def unschedule(campaign_id, opts = {})
|
366
|
+
fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
|
955
367
|
|
956
|
-
# query parameters
|
957
368
|
query_params = {}
|
958
|
-
|
959
|
-
# header parameters
|
960
|
-
header_params = {}
|
961
|
-
# HTTP header 'Accept' (if needed)
|
962
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
963
|
-
# HTTP header 'Content-Type'
|
964
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
965
|
-
|
966
|
-
# form parameters
|
967
369
|
form_params = {}
|
968
|
-
|
969
|
-
# http body (model)
|
970
370
|
post_body = nil
|
971
|
-
|
371
|
+
|
372
|
+
local_var_path = '/campaigns/{campaign_id}/actions/unschedule'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
|
972
373
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
973
|
-
:header_params => header_params,
|
974
374
|
:query_params => query_params,
|
975
375
|
:form_params => form_params,
|
976
|
-
:body => post_body
|
977
|
-
:auth_names => auth_names)
|
376
|
+
:body => post_body)
|
978
377
|
return data, status_code, headers
|
979
378
|
end
|
980
|
-
# Add campaign feedback
|
981
|
-
# Add feedback on a specific campaign.
|
982
|
-
# @param campaign_id The unique id for the campaign.
|
983
|
-
# @param body
|
984
|
-
# @param [Hash] opts the optional parameters
|
985
|
-
# @return [CampaignFeedback2]
|
986
|
-
def add_feedback(campaign_id = {}, body = {}, opts = {})
|
987
|
-
data, _status_code, _headers = add_feedback_with_http_info(campaign_id, body, opts)
|
988
|
-
data
|
989
|
-
end
|
990
379
|
|
991
380
|
# Add campaign feedback
|
992
|
-
|
993
|
-
|
994
|
-
|
995
|
-
# @param [Hash] opts the optional parameters
|
996
|
-
# @return [Array<(CampaignFeedback2, Fixnum, Hash)>] CampaignFeedback2 data, response status code and response headers
|
997
|
-
def add_feedback_with_http_info(campaign_id, body, opts = {})
|
998
|
-
# resource path
|
999
|
-
local_var_path = '/campaigns/{campaign_id}/feedback'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
|
381
|
+
def add_feedback(campaign_id, body, opts = {})
|
382
|
+
fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
|
383
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
1000
384
|
|
1001
|
-
# query parameters
|
1002
385
|
query_params = {}
|
1003
|
-
|
1004
|
-
# header parameters
|
1005
|
-
header_params = {}
|
1006
|
-
# HTTP header 'Accept' (if needed)
|
1007
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
1008
|
-
# HTTP header 'Content-Type'
|
1009
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1010
|
-
|
1011
|
-
# form parameters
|
1012
386
|
form_params = {}
|
1013
|
-
|
1014
|
-
# http body (model)
|
1015
387
|
post_body = @api_client.object_to_http_body(body)
|
1016
|
-
|
388
|
+
|
389
|
+
local_var_path = '/campaigns/{campaign_id}/feedback'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
|
1017
390
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
1018
|
-
:header_params => header_params,
|
1019
391
|
:query_params => query_params,
|
1020
392
|
:form_params => form_params,
|
1021
|
-
:body => post_body
|
1022
|
-
:auth_names => auth_names,
|
1023
|
-
:return_type => 'CampaignFeedback2')
|
393
|
+
:body => post_body)
|
1024
394
|
return data, status_code, headers
|
1025
395
|
end
|
1026
|
-
# Set campaign content
|
1027
|
-
# Set the content for a campaign.
|
1028
|
-
# @param campaign_id The unique id for the campaign.
|
1029
|
-
# @param body
|
1030
|
-
# @param [Hash] opts the optional parameters
|
1031
|
-
# @return [CampaignContent]
|
1032
|
-
def set_content(campaign_id = {}, body = {}, opts = {})
|
1033
|
-
data, _status_code, _headers = set_content_with_http_info(campaign_id, body, opts)
|
1034
|
-
data
|
1035
|
-
end
|
1036
396
|
|
1037
397
|
# Set campaign content
|
1038
|
-
|
1039
|
-
|
1040
|
-
|
1041
|
-
# @param [Hash] opts the optional parameters
|
1042
|
-
# @return [Array<(CampaignContent, Fixnum, Hash)>] CampaignContent data, response status code and response headers
|
1043
|
-
def set_content_with_http_info(campaign_id, body, opts = {})
|
1044
|
-
# resource path
|
1045
|
-
local_var_path = '/campaigns/{campaign_id}/content'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
|
398
|
+
def set_content(campaign_id, body, opts = {})
|
399
|
+
fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
|
400
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
1046
401
|
|
1047
|
-
# query parameters
|
1048
402
|
query_params = {}
|
1049
|
-
|
1050
|
-
# header parameters
|
1051
|
-
header_params = {}
|
1052
|
-
# HTTP header 'Accept' (if needed)
|
1053
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
1054
|
-
# HTTP header 'Content-Type'
|
1055
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1056
|
-
|
1057
|
-
# form parameters
|
1058
403
|
form_params = {}
|
1059
|
-
|
1060
|
-
# http body (model)
|
1061
404
|
post_body = @api_client.object_to_http_body(body)
|
1062
|
-
|
405
|
+
|
406
|
+
local_var_path = '/campaigns/{campaign_id}/content'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
|
1063
407
|
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
1064
|
-
:header_params => header_params,
|
1065
408
|
:query_params => query_params,
|
1066
409
|
:form_params => form_params,
|
1067
|
-
:body => post_body
|
1068
|
-
:auth_names => auth_names,
|
1069
|
-
:return_type => 'CampaignContent')
|
410
|
+
:body => post_body)
|
1070
411
|
return data, status_code, headers
|
1071
412
|
end
|
1072
413
|
end
|