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,260 @@
|
|
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 CampaignFoldersApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Delete a 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
|
+
|
32
|
+
# Delete a campaign folder
|
33
|
+
# Delete a specific campaign folder, and mark all the campaigns in the folder as 'unfiled'.
|
34
|
+
# @param folder_id The unique id for the campaign folder.
|
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)
|
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 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
|
+
|
78
|
+
# Get all campaign folders
|
79
|
+
# Get all folders used to organize campaigns.
|
80
|
+
# @param [Hash] opts the optional parameters
|
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'
|
89
|
+
|
90
|
+
# query parameters
|
91
|
+
query_params = {}
|
92
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
93
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
94
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
95
|
+
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
|
+
form_params = {}
|
106
|
+
|
107
|
+
# http body (model)
|
108
|
+
post_body = nil
|
109
|
+
auth_names = ['basicAuth']
|
110
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
111
|
+
:header_params => header_params,
|
112
|
+
:query_params => query_params,
|
113
|
+
:form_params => form_params,
|
114
|
+
:body => post_body,
|
115
|
+
:auth_names => auth_names,
|
116
|
+
:return_type => 'CampaignFolders')
|
117
|
+
return data, status_code, headers
|
118
|
+
end
|
119
|
+
# Get a specific 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
|
+
|
131
|
+
# Get a specific campaign folder
|
132
|
+
# Get information about a specific folder used to organize campaigns.
|
133
|
+
# @param folder_id The unique id for the campaign folder.
|
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)
|
141
|
+
|
142
|
+
# query parameters
|
143
|
+
query_params = {}
|
144
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
145
|
+
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
|
+
form_params = {}
|
156
|
+
|
157
|
+
# http body (model)
|
158
|
+
post_body = nil
|
159
|
+
auth_names = ['basicAuth']
|
160
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
161
|
+
:header_params => header_params,
|
162
|
+
:query_params => query_params,
|
163
|
+
:form_params => form_params,
|
164
|
+
:body => post_body,
|
165
|
+
:auth_names => auth_names,
|
166
|
+
:return_type => 'CampaignFolder')
|
167
|
+
return data, status_code, headers
|
168
|
+
end
|
169
|
+
# Update a 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
|
+
|
180
|
+
# Update a campaign folder
|
181
|
+
# Update a specific folder used to organize campaigns.
|
182
|
+
# @param folder_id The unique id for the campaign folder.
|
183
|
+
# @param body
|
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)
|
189
|
+
|
190
|
+
# query parameters
|
191
|
+
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
|
+
form_params = {}
|
202
|
+
|
203
|
+
# http body (model)
|
204
|
+
post_body = @api_client.object_to_http_body(body)
|
205
|
+
auth_names = ['basicAuth']
|
206
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
207
|
+
:header_params => header_params,
|
208
|
+
:query_params => query_params,
|
209
|
+
:form_params => form_params,
|
210
|
+
:body => post_body,
|
211
|
+
:auth_names => auth_names,
|
212
|
+
:return_type => 'CampaignFolder')
|
213
|
+
return data, status_code, headers
|
214
|
+
end
|
215
|
+
# Create 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
|
+
|
225
|
+
# Create campaign folder
|
226
|
+
# Create a new campaign folder.
|
227
|
+
# @param body
|
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'
|
233
|
+
|
234
|
+
# query parameters
|
235
|
+
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
|
+
form_params = {}
|
246
|
+
|
247
|
+
# http body (model)
|
248
|
+
post_body = @api_client.object_to_http_body(body)
|
249
|
+
auth_names = ['basicAuth']
|
250
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
251
|
+
:header_params => header_params,
|
252
|
+
:query_params => query_params,
|
253
|
+
:form_params => form_params,
|
254
|
+
:body => post_body,
|
255
|
+
:auth_names => auth_names,
|
256
|
+
:return_type => 'CampaignFolder')
|
257
|
+
return data, status_code, headers
|
258
|
+
end
|
259
|
+
end
|
260
|
+
end
|
@@ -0,0 +1,1073 @@
|
|
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 CampaignsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Delete a 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
|
+
|
32
|
+
# Delete a campaign
|
33
|
+
# Remove a campaign from your Mailchimp account.
|
34
|
+
# @param campaign_id The unique id for the campaign.
|
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)
|
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
|
+
# Delete a 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
|
+
|
76
|
+
# Delete a campaign feedback message
|
77
|
+
# Remove a specific feedback message for a campaign.
|
78
|
+
# @param campaign_id The unique id for the campaign.
|
79
|
+
# @param feedback_id The unique id for the feedback message.
|
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)
|
85
|
+
|
86
|
+
# query parameters
|
87
|
+
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
|
+
form_params = {}
|
98
|
+
|
99
|
+
# http body (model)
|
100
|
+
post_body = nil
|
101
|
+
auth_names = ['basicAuth']
|
102
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
103
|
+
:header_params => header_params,
|
104
|
+
:query_params => query_params,
|
105
|
+
:form_params => form_params,
|
106
|
+
:body => post_body,
|
107
|
+
:auth_names => auth_names)
|
108
|
+
return data, status_code, headers
|
109
|
+
end
|
110
|
+
# Get all 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
|
+
|
134
|
+
# Get all campaigns
|
135
|
+
# Get all campaigns in an account.
|
136
|
+
# @param [Hash] opts the optional parameters
|
137
|
+
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
138
|
+
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
139
|
+
# @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**
|
140
|
+
# @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**.
|
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'
|
156
|
+
|
157
|
+
# query parameters
|
158
|
+
query_params = {}
|
159
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
160
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
161
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
162
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
163
|
+
query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
|
164
|
+
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
165
|
+
query_params[:'before_send_time'] = opts[:'before_send_time'] if !opts[:'before_send_time'].nil?
|
166
|
+
query_params[:'since_send_time'] = opts[:'since_send_time'] if !opts[:'since_send_time'].nil?
|
167
|
+
query_params[:'before_create_time'] = opts[:'before_create_time'] if !opts[:'before_create_time'].nil?
|
168
|
+
query_params[:'since_create_time'] = opts[:'since_create_time'] if !opts[:'since_create_time'].nil?
|
169
|
+
query_params[:'list_id'] = opts[:'list_id'] if !opts[:'list_id'].nil?
|
170
|
+
query_params[:'folder_id'] = opts[:'folder_id'] if !opts[:'folder_id'].nil?
|
171
|
+
query_params[:'member_id'] = opts[:'member_id'] if !opts[:'member_id'].nil?
|
172
|
+
query_params[:'sort_field'] = opts[:'sort_field'] if !opts[:'sort_field'].nil?
|
173
|
+
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
|
+
form_params = {}
|
184
|
+
|
185
|
+
# http body (model)
|
186
|
+
post_body = nil
|
187
|
+
auth_names = ['basicAuth']
|
188
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
189
|
+
:header_params => header_params,
|
190
|
+
:query_params => query_params,
|
191
|
+
:form_params => form_params,
|
192
|
+
:body => post_body,
|
193
|
+
:auth_names => auth_names,
|
194
|
+
:return_type => 'InlineResponse2005')
|
195
|
+
return data, status_code, headers
|
196
|
+
end
|
197
|
+
# Get information about a specific campaign
|
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
|
+
|
209
|
+
# Get information about a specific campaign
|
210
|
+
# Get information about a specific campaign.
|
211
|
+
# @param campaign_id The unique id for the campaign.
|
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)
|
219
|
+
|
220
|
+
# query parameters
|
221
|
+
query_params = {}
|
222
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
223
|
+
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
|
+
form_params = {}
|
234
|
+
|
235
|
+
# http body (model)
|
236
|
+
post_body = nil
|
237
|
+
auth_names = ['basicAuth']
|
238
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
239
|
+
:header_params => header_params,
|
240
|
+
:query_params => query_params,
|
241
|
+
:form_params => form_params,
|
242
|
+
:body => post_body,
|
243
|
+
:auth_names => auth_names,
|
244
|
+
:return_type => 'Campaign')
|
245
|
+
return data, status_code, headers
|
246
|
+
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
|
+
|
259
|
+
# Get campaign content
|
260
|
+
# Get the the HTML and plain-text content for a campaign.
|
261
|
+
# @param campaign_id The unique id for the campaign.
|
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)
|
269
|
+
|
270
|
+
# query parameters
|
271
|
+
query_params = {}
|
272
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
273
|
+
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
|
+
form_params = {}
|
284
|
+
|
285
|
+
# http body (model)
|
286
|
+
post_body = nil
|
287
|
+
auth_names = ['basicAuth']
|
288
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
289
|
+
:header_params => header_params,
|
290
|
+
:query_params => query_params,
|
291
|
+
:form_params => form_params,
|
292
|
+
:body => post_body,
|
293
|
+
:auth_names => auth_names,
|
294
|
+
:return_type => 'CampaignContent')
|
295
|
+
return data, status_code, headers
|
296
|
+
end
|
297
|
+
# Get feedback about a campaign
|
298
|
+
# Get team feedback while you're [working together on a Mailchimp campaign](https://mailchimp.com/help/collaborate-on-campaigns/).
|
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
|
+
|
309
|
+
# Get feedback about a campaign
|
310
|
+
# Get team feedback while you're [working together on a Mailchimp campaign](https://mailchimp.com/help/collaborate-on-campaigns/).
|
311
|
+
# @param campaign_id The unique id for the campaign.
|
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)
|
319
|
+
|
320
|
+
# query parameters
|
321
|
+
query_params = {}
|
322
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
323
|
+
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
|
+
form_params = {}
|
334
|
+
|
335
|
+
# http body (model)
|
336
|
+
post_body = nil
|
337
|
+
auth_names = ['basicAuth']
|
338
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
339
|
+
:header_params => header_params,
|
340
|
+
:query_params => query_params,
|
341
|
+
:form_params => form_params,
|
342
|
+
:body => post_body,
|
343
|
+
:auth_names => auth_names,
|
344
|
+
:return_type => 'CampaignReports')
|
345
|
+
return data, status_code, headers
|
346
|
+
end
|
347
|
+
# Get a specific 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
|
+
|
360
|
+
# Get a specific feedback message
|
361
|
+
# Get a specific feedback message from a campaign.
|
362
|
+
# @param campaign_id The unique id for the campaign.
|
363
|
+
# @param feedback_id The unique id for the feedback message.
|
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)
|
371
|
+
|
372
|
+
# query parameters
|
373
|
+
query_params = {}
|
374
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
375
|
+
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
|
+
form_params = {}
|
386
|
+
|
387
|
+
# http body (model)
|
388
|
+
post_body = nil
|
389
|
+
auth_names = ['basicAuth']
|
390
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
391
|
+
:header_params => header_params,
|
392
|
+
:query_params => query_params,
|
393
|
+
:form_params => form_params,
|
394
|
+
:body => post_body,
|
395
|
+
:auth_names => auth_names,
|
396
|
+
:return_type => 'CampaignFeedback2')
|
397
|
+
return data, status_code, headers
|
398
|
+
end
|
399
|
+
# Get the send checklist for a campaign
|
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
|
+
|
411
|
+
# Get the send checklist for a campaign
|
412
|
+
# Review the send checklist for a campaign, and resolve any issues before sending.
|
413
|
+
# @param campaign_id The unique id for the campaign.
|
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)
|
421
|
+
|
422
|
+
# query parameters
|
423
|
+
query_params = {}
|
424
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
425
|
+
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
|
+
form_params = {}
|
436
|
+
|
437
|
+
# http body (model)
|
438
|
+
post_body = nil
|
439
|
+
auth_names = ['basicAuth']
|
440
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
441
|
+
:header_params => header_params,
|
442
|
+
:query_params => query_params,
|
443
|
+
:form_params => form_params,
|
444
|
+
:body => post_body,
|
445
|
+
:auth_names => auth_names,
|
446
|
+
:return_type => 'SendChecklist')
|
447
|
+
return data, status_code, headers
|
448
|
+
end
|
449
|
+
# Update the settings for a campaign
|
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
|
+
|
460
|
+
# Update the settings for a campaign
|
461
|
+
# Update some or all of the settings for a specific campaign.
|
462
|
+
# @param campaign_id The unique id for the campaign.
|
463
|
+
# @param body
|
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)
|
469
|
+
|
470
|
+
# query parameters
|
471
|
+
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
|
+
form_params = {}
|
482
|
+
|
483
|
+
# http body (model)
|
484
|
+
post_body = @api_client.object_to_http_body(body)
|
485
|
+
auth_names = ['basicAuth']
|
486
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
487
|
+
:header_params => header_params,
|
488
|
+
:query_params => query_params,
|
489
|
+
:form_params => form_params,
|
490
|
+
:body => post_body,
|
491
|
+
:auth_names => auth_names,
|
492
|
+
:return_type => 'Campaign')
|
493
|
+
return data, status_code, headers
|
494
|
+
end
|
495
|
+
# Update a 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
|
+
|
507
|
+
# Update a campaign feedback message
|
508
|
+
# Update a specific feedback message for a campaign.
|
509
|
+
# @param campaign_id The unique id for the campaign.
|
510
|
+
# @param feedback_id The unique id for the feedback message.
|
511
|
+
# @param body
|
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)
|
517
|
+
|
518
|
+
# query parameters
|
519
|
+
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
|
+
form_params = {}
|
530
|
+
|
531
|
+
# http body (model)
|
532
|
+
post_body = @api_client.object_to_http_body(body)
|
533
|
+
auth_names = ['basicAuth']
|
534
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
535
|
+
:header_params => header_params,
|
536
|
+
:query_params => query_params,
|
537
|
+
:form_params => form_params,
|
538
|
+
:body => post_body,
|
539
|
+
:auth_names => auth_names,
|
540
|
+
:return_type => 'CampaignFeedback2')
|
541
|
+
return data, status_code, headers
|
542
|
+
end
|
543
|
+
# Create a new 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
|
+
|
553
|
+
# Create a new campaign
|
554
|
+
# Create a new Mailchimp campaign.
|
555
|
+
# @param body
|
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'
|
561
|
+
|
562
|
+
# query parameters
|
563
|
+
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
|
+
form_params = {}
|
574
|
+
|
575
|
+
# http body (model)
|
576
|
+
post_body = @api_client.object_to_http_body(body)
|
577
|
+
auth_names = ['basicAuth']
|
578
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
579
|
+
:header_params => header_params,
|
580
|
+
:query_params => query_params,
|
581
|
+
:form_params => form_params,
|
582
|
+
:body => post_body,
|
583
|
+
:auth_names => auth_names,
|
584
|
+
:return_type => 'Campaign')
|
585
|
+
return data, status_code, headers
|
586
|
+
end
|
587
|
+
# Cancel a 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](https://mailchimp.com/pro?utm_source=mc-api&utm_medium=docs&utm_campaign=apidocs).
|
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
|
+
|
597
|
+
# Cancel a campaign
|
598
|
+
# Cancel a Regular or Plain-Text Campaign after you send, before all of your recipients receive it. This feature is included with [Mailchimp Pro](https://mailchimp.com/pro?utm_source=mc-api&utm_medium=docs&utm_campaign=apidocs).
|
599
|
+
# @param campaign_id The unique id for the campaign.
|
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)
|
605
|
+
|
606
|
+
# query parameters
|
607
|
+
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
|
+
form_params = {}
|
618
|
+
|
619
|
+
# http body (model)
|
620
|
+
post_body = nil
|
621
|
+
auth_names = ['basicAuth']
|
622
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
623
|
+
:header_params => header_params,
|
624
|
+
:query_params => query_params,
|
625
|
+
:form_params => form_params,
|
626
|
+
:body => post_body,
|
627
|
+
:auth_names => auth_names)
|
628
|
+
return data, status_code, headers
|
629
|
+
end
|
630
|
+
# Resend a 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
|
+
|
640
|
+
# Resend a campaign
|
641
|
+
# 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.
|
642
|
+
# @param campaign_id The unique id for the campaign.
|
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)
|
648
|
+
|
649
|
+
# query parameters
|
650
|
+
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
|
+
form_params = {}
|
661
|
+
|
662
|
+
# http body (model)
|
663
|
+
post_body = nil
|
664
|
+
auth_names = ['basicAuth']
|
665
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
666
|
+
:header_params => header_params,
|
667
|
+
:query_params => query_params,
|
668
|
+
:form_params => form_params,
|
669
|
+
:body => post_body,
|
670
|
+
:auth_names => auth_names,
|
671
|
+
:return_type => 'Campaign3')
|
672
|
+
return data, status_code, headers
|
673
|
+
end
|
674
|
+
# Pause an RSS-Driven campaign
|
675
|
+
# [Pause an RSS-Driven campaign](https://mailchimp.com/help/pause-or-reactivate-an-rss-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
|
+
|
684
|
+
# Pause an RSS-Driven campaign
|
685
|
+
# [Pause an RSS-Driven campaign](https://mailchimp.com/help/pause-or-reactivate-an-rss-campaign/).
|
686
|
+
# @param campaign_id The unique id for the campaign.
|
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)
|
692
|
+
|
693
|
+
# query parameters
|
694
|
+
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
|
+
form_params = {}
|
705
|
+
|
706
|
+
# http body (model)
|
707
|
+
post_body = nil
|
708
|
+
auth_names = ['basicAuth']
|
709
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
710
|
+
:header_params => header_params,
|
711
|
+
:query_params => query_params,
|
712
|
+
:form_params => form_params,
|
713
|
+
:body => post_body,
|
714
|
+
:auth_names => auth_names)
|
715
|
+
return data, status_code, headers
|
716
|
+
end
|
717
|
+
# Replicate a campaign
|
718
|
+
# [Replicate a campaign](https://mailchimp.com/help/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
|
+
|
727
|
+
# Replicate a campaign
|
728
|
+
# [Replicate a campaign](https://mailchimp.com/help/replicate-a-campaign/) in saved or send status.
|
729
|
+
# @param campaign_id The unique id for the campaign.
|
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)
|
735
|
+
|
736
|
+
# query parameters
|
737
|
+
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
|
+
form_params = {}
|
748
|
+
|
749
|
+
# http body (model)
|
750
|
+
post_body = nil
|
751
|
+
auth_names = ['basicAuth']
|
752
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
753
|
+
:header_params => header_params,
|
754
|
+
:query_params => query_params,
|
755
|
+
:form_params => form_params,
|
756
|
+
:body => post_body,
|
757
|
+
:auth_names => auth_names,
|
758
|
+
:return_type => 'Campaign3')
|
759
|
+
return data, status_code, headers
|
760
|
+
end
|
761
|
+
# Resume an RSS-Driven campaign
|
762
|
+
# [Resume an RSS-Driven campaign](https://mailchimp.com/help/pause-or-reactivate-an-rss-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
|
+
|
771
|
+
# Resume an RSS-Driven campaign
|
772
|
+
# [Resume an RSS-Driven campaign](https://mailchimp.com/help/pause-or-reactivate-an-rss-campaign/).
|
773
|
+
# @param campaign_id The unique id for the campaign.
|
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)
|
779
|
+
|
780
|
+
# query parameters
|
781
|
+
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
|
+
form_params = {}
|
792
|
+
|
793
|
+
# http body (model)
|
794
|
+
post_body = nil
|
795
|
+
auth_names = ['basicAuth']
|
796
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
797
|
+
:header_params => header_params,
|
798
|
+
:query_params => query_params,
|
799
|
+
:form_params => form_params,
|
800
|
+
:body => post_body,
|
801
|
+
:auth_names => auth_names)
|
802
|
+
return data, status_code, headers
|
803
|
+
end
|
804
|
+
# Schedule a campaign
|
805
|
+
# [Schedule a campaign](https://mailchimp.com/help/schedule-or-pause-a-regular-email-campaign/) for delivery. If you're using [Multivariate Campaigns](https://mailchimp.com/help/about-multivariate-campaigns/) to test send times or sending [RSS Campaigns](https://mailchimp.com/help/share-your-blog-posts-with-mailchimp/), use the [send](/developer/reference/campaigns/#action-post_campaigns_campaign_id_actions_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
|
+
|
815
|
+
# Schedule a campaign
|
816
|
+
# [Schedule a campaign](https://mailchimp.com/help/schedule-or-pause-a-regular-email-campaign/) for delivery. If you're using [Multivariate Campaigns](https://mailchimp.com/help/about-multivariate-campaigns/) to test send times or sending [RSS Campaigns](https://mailchimp.com/help/share-your-blog-posts-with-mailchimp/), use the [send](/developer/reference/campaigns/#action-post_campaigns_campaign_id_actions_send) action instead.
|
817
|
+
# @param campaign_id The unique id for the campaign.
|
818
|
+
# @param body
|
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)
|
824
|
+
|
825
|
+
# query parameters
|
826
|
+
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
|
+
form_params = {}
|
837
|
+
|
838
|
+
# http body (model)
|
839
|
+
post_body = @api_client.object_to_http_body(body)
|
840
|
+
auth_names = ['basicAuth']
|
841
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
842
|
+
:header_params => header_params,
|
843
|
+
:query_params => query_params,
|
844
|
+
:form_params => form_params,
|
845
|
+
:body => post_body,
|
846
|
+
:auth_names => auth_names)
|
847
|
+
return data, status_code, headers
|
848
|
+
end
|
849
|
+
# Send a campaign
|
850
|
+
# Send a Mailchimp campaign. For [RSS Campaigns](https://mailchimp.com/help/share-your-blog-posts-with-mailchimp/), 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
|
+
|
859
|
+
# Send a campaign
|
860
|
+
# Send a Mailchimp campaign. For [RSS Campaigns](https://mailchimp.com/help/share-your-blog-posts-with-mailchimp/), the campaign will send according to its schedule. All other campaigns will send immediately.
|
861
|
+
# @param campaign_id The unique id for the campaign.
|
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)
|
867
|
+
|
868
|
+
# query parameters
|
869
|
+
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
|
+
form_params = {}
|
880
|
+
|
881
|
+
# http body (model)
|
882
|
+
post_body = nil
|
883
|
+
auth_names = ['basicAuth']
|
884
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
885
|
+
:header_params => header_params,
|
886
|
+
:query_params => query_params,
|
887
|
+
:form_params => form_params,
|
888
|
+
:body => post_body,
|
889
|
+
:auth_names => auth_names)
|
890
|
+
return data, status_code, headers
|
891
|
+
end
|
892
|
+
# Send a test email
|
893
|
+
# Send a [test email](https://mailchimp.com/help/preview-and-test-your-email-campaign/).
|
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
|
+
|
903
|
+
# Send a test email
|
904
|
+
# Send a [test email](https://mailchimp.com/help/preview-and-test-your-email-campaign/).
|
905
|
+
# @param campaign_id The unique id for the campaign.
|
906
|
+
# @param body
|
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)
|
912
|
+
|
913
|
+
# query parameters
|
914
|
+
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
|
+
form_params = {}
|
925
|
+
|
926
|
+
# http body (model)
|
927
|
+
post_body = @api_client.object_to_http_body(body)
|
928
|
+
auth_names = ['basicAuth']
|
929
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
930
|
+
:header_params => header_params,
|
931
|
+
:query_params => query_params,
|
932
|
+
:form_params => form_params,
|
933
|
+
:body => post_body,
|
934
|
+
:auth_names => auth_names)
|
935
|
+
return data, status_code, headers
|
936
|
+
end
|
937
|
+
# Unschedule a campaign
|
938
|
+
# [Unschedule](https://mailchimp.com/help/schedule-or-pause-a-regular-email-campaign/) 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
|
+
|
947
|
+
# Unschedule a campaign
|
948
|
+
# [Unschedule](https://mailchimp.com/help/schedule-or-pause-a-regular-email-campaign/) a scheduled campaign that hasn't started sending.
|
949
|
+
# @param campaign_id The unique id for the campaign.
|
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)
|
955
|
+
|
956
|
+
# query parameters
|
957
|
+
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
|
+
form_params = {}
|
968
|
+
|
969
|
+
# http body (model)
|
970
|
+
post_body = nil
|
971
|
+
auth_names = ['basicAuth']
|
972
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
973
|
+
:header_params => header_params,
|
974
|
+
:query_params => query_params,
|
975
|
+
:form_params => form_params,
|
976
|
+
:body => post_body,
|
977
|
+
:auth_names => auth_names)
|
978
|
+
return data, status_code, headers
|
979
|
+
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
|
+
|
991
|
+
# Add campaign feedback
|
992
|
+
# Add feedback on a specific campaign.
|
993
|
+
# @param campaign_id The unique id for the campaign.
|
994
|
+
# @param body
|
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)
|
1000
|
+
|
1001
|
+
# query parameters
|
1002
|
+
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
|
+
form_params = {}
|
1013
|
+
|
1014
|
+
# http body (model)
|
1015
|
+
post_body = @api_client.object_to_http_body(body)
|
1016
|
+
auth_names = ['basicAuth']
|
1017
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
1018
|
+
:header_params => header_params,
|
1019
|
+
:query_params => query_params,
|
1020
|
+
:form_params => form_params,
|
1021
|
+
:body => post_body,
|
1022
|
+
:auth_names => auth_names,
|
1023
|
+
:return_type => 'CampaignFeedback2')
|
1024
|
+
return data, status_code, headers
|
1025
|
+
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
|
+
|
1037
|
+
# Set campaign content
|
1038
|
+
# Set the content for a campaign.
|
1039
|
+
# @param campaign_id The unique id for the campaign.
|
1040
|
+
# @param body
|
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)
|
1046
|
+
|
1047
|
+
# query parameters
|
1048
|
+
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
|
+
form_params = {}
|
1059
|
+
|
1060
|
+
# http body (model)
|
1061
|
+
post_body = @api_client.object_to_http_body(body)
|
1062
|
+
auth_names = ['basicAuth']
|
1063
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
1064
|
+
:header_params => header_params,
|
1065
|
+
:query_params => query_params,
|
1066
|
+
:form_params => form_params,
|
1067
|
+
:body => post_body,
|
1068
|
+
:auth_names => auth_names,
|
1069
|
+
:return_type => 'CampaignContent')
|
1070
|
+
return data, status_code, headers
|
1071
|
+
end
|
1072
|
+
end
|
1073
|
+
end
|