MailchimpMarketing 3.0.2 → 3.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/MailchimpMarketing.gemspec +2 -2
  4. data/README.md +55 -46
  5. data/lib/MailchimpMarketing.rb +5 -6
  6. data/lib/MailchimpMarketing/api/activity_feed_api.rb +12 -73
  7. data/lib/MailchimpMarketing/api/authorized_apps_api.rb +19 -119
  8. data/lib/MailchimpMarketing/api/automations_api.rb +129 -723
  9. data/lib/MailchimpMarketing/api/batch_webhooks_api.rb +32 -192
  10. data/lib/MailchimpMarketing/api/batches_api.rb +25 -154
  11. data/lib/MailchimpMarketing/api/campaign_folders_api.rb +32 -192
  12. data/lib/MailchimpMarketing/api/campaigns_api.rb +143 -847
  13. data/lib/MailchimpMarketing/api/connected_sites_api.rb +31 -189
  14. data/lib/MailchimpMarketing/api/conversations_api.rb +35 -215
  15. data/lib/MailchimpMarketing/api/dashboard_api.rb +31 -233
  16. data/lib/MailchimpMarketing/api/ecommerce_api.rb +446 -2430
  17. data/lib/MailchimpMarketing/api/external_auths_api.rb +19 -119
  18. data/lib/MailchimpMarketing/api/facebook_ads_api.rb +15 -87
  19. data/lib/MailchimpMarketing/api/file_manager_api.rb +70 -435
  20. data/lib/MailchimpMarketing/api/landing_pages_api.rb +50 -302
  21. data/lib/MailchimpMarketing/api/lists_api.rb +746 -3034
  22. data/lib/MailchimpMarketing/api/ping_api.rb +6 -35
  23. data/lib/MailchimpMarketing/api/postcards_api.rb +8 -43
  24. data/lib/MailchimpMarketing/api/reporting_api.rb +40 -249
  25. data/lib/MailchimpMarketing/api/reports_api.rb +152 -947
  26. data/lib/MailchimpMarketing/api/root_api.rb +6 -39
  27. data/lib/MailchimpMarketing/api/search_campaigns_api.rb +7 -41
  28. data/lib/MailchimpMarketing/api/search_members_api.rb +7 -43
  29. data/lib/MailchimpMarketing/api/template_folders_api.rb +32 -192
  30. data/lib/MailchimpMarketing/api/templates_api.rb +39 -246
  31. data/lib/MailchimpMarketing/api/verified_domains_api.rb +31 -180
  32. data/lib/MailchimpMarketing/api_client.rb +34 -157
  33. data/lib/MailchimpMarketing/api_error.rb +1 -1
  34. data/lib/MailchimpMarketing/configuration.rb +1 -1
  35. data/lib/MailchimpMarketing/version.rb +2 -2
  36. metadata +5 -11
@@ -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.2
6
+ OpenAPI spec version: 3.0.9
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
@@ -19,241 +19,81 @@ module MailchimpMarketing
19
19
  def initialize(api_client)
20
20
  @api_client = api_client
21
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
22
 
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)
23
+ # Delete campaign folder
24
+ def remove(folder_id, opts = {})
25
+ fail ArgumentError, "Missing required param: 'folder_id'" if folder_id.nil?
40
26
 
41
- # query parameters
42
27
  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
28
  post_body = nil
56
- auth_names = ['basicAuth']
29
+
30
+ local_var_path = '/campaign-folders/{folder_id}'.sub('{' + 'folder_id' + '}', folder_id.to_s)
57
31
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
58
- :header_params => header_params,
59
32
  :query_params => query_params,
60
- :form_params => form_params,
61
- :body => post_body,
62
- :auth_names => auth_names)
33
+ :body => post_body)
63
34
  return data, status_code, headers
64
35
  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
36
 
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'
37
+ # List campaign folders
38
+ def list(opts = {})
39
+ fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
89
40
 
90
- # query parameters
91
41
  query_params = {}
92
42
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
93
43
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
94
44
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
95
45
  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
46
  post_body = nil
109
- auth_names = ['basicAuth']
47
+
48
+ local_var_path = '/campaign-folders'
110
49
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
111
- :header_params => header_params,
112
50
  :query_params => query_params,
113
- :form_params => form_params,
114
- :body => post_body,
115
- :auth_names => auth_names,
116
- :return_type => 'CampaignFolders')
51
+ :body => post_body)
117
52
  return data, status_code, headers
118
53
  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
54
 
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)
55
+ # Get campaign folder
56
+ def get(folder_id, opts = {})
57
+ fail ArgumentError, "Missing required param: 'folder_id'" if folder_id.nil?
141
58
 
142
- # query parameters
143
59
  query_params = {}
144
60
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
145
61
  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
62
  post_body = nil
159
- auth_names = ['basicAuth']
63
+
64
+ local_var_path = '/campaign-folders/{folder_id}'.sub('{' + 'folder_id' + '}', folder_id.to_s)
160
65
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
161
- :header_params => header_params,
162
66
  :query_params => query_params,
163
- :form_params => form_params,
164
- :body => post_body,
165
- :auth_names => auth_names,
166
- :return_type => 'CampaignFolder')
67
+ :body => post_body)
167
68
  return data, status_code, headers
168
69
  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
70
 
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)
71
+ # Update campaign folder
72
+ def update(folder_id, body, opts = {})
73
+ fail ArgumentError, "Missing required param: 'folder_id'" if folder_id.nil?
74
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
189
75
 
190
- # query parameters
191
76
  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
77
  post_body = @api_client.object_to_http_body(body)
205
- auth_names = ['basicAuth']
78
+
79
+ local_var_path = '/campaign-folders/{folder_id}'.sub('{' + 'folder_id' + '}', folder_id.to_s)
206
80
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
207
- :header_params => header_params,
208
81
  :query_params => query_params,
209
- :form_params => form_params,
210
- :body => post_body,
211
- :auth_names => auth_names,
212
- :return_type => 'CampaignFolder')
82
+ :body => post_body)
213
83
  return data, status_code, headers
214
84
  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
85
 
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'
86
+ # Add campaign folder
87
+ def create(body, opts = {})
88
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
233
89
 
234
- # query parameters
235
90
  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
91
  post_body = @api_client.object_to_http_body(body)
249
- auth_names = ['basicAuth']
92
+
93
+ local_var_path = '/campaign-folders'
250
94
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
251
- :header_params => header_params,
252
95
  :query_params => query_params,
253
- :form_params => form_params,
254
- :body => post_body,
255
- :auth_names => auth_names,
256
- :return_type => 'CampaignFolder')
96
+ :body => post_body)
257
97
  return data, status_code, headers
258
98
  end
259
99
  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.2
6
+ OpenAPI spec version: 3.0.9
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
@@ -19,142 +19,44 @@ module MailchimpMarketing
19
19
  def initialize(api_client)
20
20
  @api_client = api_client
21
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
22
 
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)
23
+ # Delete campaign
24
+ def remove(campaign_id, opts = {})
25
+ fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
40
26
 
41
- # query parameters
42
27
  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
28
  post_body = nil
56
- auth_names = ['basicAuth']
29
+
30
+ local_var_path = '/campaigns/{campaign_id}'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
57
31
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
58
- :header_params => header_params,
59
32
  :query_params => query_params,
60
- :form_params => form_params,
61
- :body => post_body,
62
- :auth_names => auth_names)
33
+ :body => post_body)
63
34
  return data, status_code, headers
64
35
  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
36
 
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)
37
+ # Delete campaign feedback message
38
+ def delete_feedback_message(campaign_id, feedback_id, opts = {})
39
+ fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
40
+ fail ArgumentError, "Missing required param: 'feedback_id'" if feedback_id.nil?
85
41
 
86
- # query parameters
87
42
  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
43
  post_body = nil
101
- auth_names = ['basicAuth']
44
+
45
+ local_var_path = '/campaigns/{campaign_id}/feedback/{feedback_id}'.sub('{' + 'campaign_id' + '}', campaign_id.to_s).sub('{' + 'feedback_id' + '}', feedback_id.to_s)
102
46
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
103
- :header_params => header_params,
104
47
  :query_params => query_params,
105
- :form_params => form_params,
106
- :body => post_body,
107
- :auth_names => auth_names)
48
+ :body => post_body)
108
49
  return data, status_code, headers
109
50
  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
51
 
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'
52
+ # List campaigns
53
+ def list(opts = {})
54
+ fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
55
+ 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'])
56
+ 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'])
57
+ 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'])
58
+ fail ArgumentError, 'invalid value for "sort_dir", must be one of ASC, DESC' if opts[:'sort_dir'] && !['ASC', 'DESC'].include?(opts[:'sort_dir'])
156
59
 
157
- # query parameters
158
60
  query_params = {}
159
61
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
160
62
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
@@ -171,902 +73,296 @@ module MailchimpMarketing
171
73
  query_params[:'member_id'] = opts[:'member_id'] if !opts[:'member_id'].nil?
172
74
  query_params[:'sort_field'] = opts[:'sort_field'] if !opts[:'sort_field'].nil?
173
75
  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
76
  post_body = nil
187
- auth_names = ['basicAuth']
77
+
78
+ local_var_path = '/campaigns'
188
79
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
189
- :header_params => header_params,
190
80
  :query_params => query_params,
191
- :form_params => form_params,
192
- :body => post_body,
193
- :auth_names => auth_names,
194
- :return_type => 'InlineResponse2005')
81
+ :body => post_body)
195
82
  return data, status_code, headers
196
83
  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
84
 
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)
85
+ # Get campaign info
86
+ def get(campaign_id, opts = {})
87
+ fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
219
88
 
220
- # query parameters
221
89
  query_params = {}
222
90
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
223
91
  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
92
  post_body = nil
237
- auth_names = ['basicAuth']
93
+
94
+ local_var_path = '/campaigns/{campaign_id}'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
238
95
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
239
- :header_params => header_params,
240
96
  :query_params => query_params,
241
- :form_params => form_params,
242
- :body => post_body,
243
- :auth_names => auth_names,
244
- :return_type => 'Campaign')
97
+ :body => post_body)
245
98
  return data, status_code, headers
246
99
  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
100
 
259
101
  # 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)
102
+ def get_content(campaign_id, opts = {})
103
+ fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
269
104
 
270
- # query parameters
271
105
  query_params = {}
272
106
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
273
107
  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
108
  post_body = nil
287
- auth_names = ['basicAuth']
109
+
110
+ local_var_path = '/campaigns/{campaign_id}/content'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
288
111
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
289
- :header_params => header_params,
290
112
  :query_params => query_params,
291
- :form_params => form_params,
292
- :body => post_body,
293
- :auth_names => auth_names,
294
- :return_type => 'CampaignContent')
113
+ :body => post_body)
295
114
  return data, status_code, headers
296
115
  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
116
 
309
- # Get feedback about a campaign
310
- # Get team feedback while you&#39;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)
117
+ # List campaign feedback
118
+ def get_feedback(campaign_id, opts = {})
119
+ fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
319
120
 
320
- # query parameters
321
121
  query_params = {}
322
122
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
323
123
  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
124
  post_body = nil
337
- auth_names = ['basicAuth']
125
+
126
+ local_var_path = '/campaigns/{campaign_id}/feedback'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
338
127
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
339
- :header_params => header_params,
340
128
  :query_params => query_params,
341
- :form_params => form_params,
342
- :body => post_body,
343
- :auth_names => auth_names,
344
- :return_type => 'CampaignReports')
129
+ :body => post_body)
345
130
  return data, status_code, headers
346
131
  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
132
 
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)
133
+ # Get campaign feedback message
134
+ def get_feedback_message(campaign_id, feedback_id, opts = {})
135
+ fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
136
+ fail ArgumentError, "Missing required param: 'feedback_id'" if feedback_id.nil?
371
137
 
372
- # query parameters
373
138
  query_params = {}
374
139
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
375
140
  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
141
  post_body = nil
389
- auth_names = ['basicAuth']
142
+
143
+ local_var_path = '/campaigns/{campaign_id}/feedback/{feedback_id}'.sub('{' + 'campaign_id' + '}', campaign_id.to_s).sub('{' + 'feedback_id' + '}', feedback_id.to_s)
390
144
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
391
- :header_params => header_params,
392
145
  :query_params => query_params,
393
- :form_params => form_params,
394
- :body => post_body,
395
- :auth_names => auth_names,
396
- :return_type => 'CampaignFeedback2')
146
+ :body => post_body)
397
147
  return data, status_code, headers
398
148
  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
149
 
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)
150
+ # Get campaign send checklist
151
+ def get_send_checklist(campaign_id, opts = {})
152
+ fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
421
153
 
422
- # query parameters
423
154
  query_params = {}
424
155
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
425
156
  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
157
  post_body = nil
439
- auth_names = ['basicAuth']
158
+
159
+ local_var_path = '/campaigns/{campaign_id}/send-checklist'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
440
160
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
441
- :header_params => header_params,
442
161
  :query_params => query_params,
443
- :form_params => form_params,
444
- :body => post_body,
445
- :auth_names => auth_names,
446
- :return_type => 'SendChecklist')
162
+ :body => post_body)
447
163
  return data, status_code, headers
448
164
  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
165
 
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)
166
+ # Update campaign settings
167
+ def update(campaign_id, body, opts = {})
168
+ fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
169
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
469
170
 
470
- # query parameters
471
171
  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
172
  post_body = @api_client.object_to_http_body(body)
485
- auth_names = ['basicAuth']
173
+
174
+ local_var_path = '/campaigns/{campaign_id}'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
486
175
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
487
- :header_params => header_params,
488
176
  :query_params => query_params,
489
- :form_params => form_params,
490
- :body => post_body,
491
- :auth_names => auth_names,
492
- :return_type => 'Campaign')
177
+ :body => post_body)
493
178
  return data, status_code, headers
494
179
  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
180
 
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)
181
+ # Update campaign feedback message
182
+ def update_feedback_message(campaign_id, feedback_id, body, opts = {})
183
+ fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
184
+ fail ArgumentError, "Missing required param: 'feedback_id'" if feedback_id.nil?
185
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
517
186
 
518
- # query parameters
519
187
  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
188
  post_body = @api_client.object_to_http_body(body)
533
- auth_names = ['basicAuth']
189
+
190
+ local_var_path = '/campaigns/{campaign_id}/feedback/{feedback_id}'.sub('{' + 'campaign_id' + '}', campaign_id.to_s).sub('{' + 'feedback_id' + '}', feedback_id.to_s)
534
191
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
535
- :header_params => header_params,
536
192
  :query_params => query_params,
537
- :form_params => form_params,
538
- :body => post_body,
539
- :auth_names => auth_names,
540
- :return_type => 'CampaignFeedback2')
193
+ :body => post_body)
541
194
  return data, status_code, headers
542
195
  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
196
 
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'
197
+ # Add campaign
198
+ def create(body, opts = {})
199
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
561
200
 
562
- # query parameters
563
201
  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
202
  post_body = @api_client.object_to_http_body(body)
577
- auth_names = ['basicAuth']
203
+
204
+ local_var_path = '/campaigns'
578
205
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
579
- :header_params => header_params,
580
206
  :query_params => query_params,
581
- :form_params => form_params,
582
- :body => post_body,
583
- :auth_names => auth_names,
584
- :return_type => 'Campaign')
207
+ :body => post_body)
585
208
  return data, status_code, headers
586
209
  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
210
 
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&#x3D;mc-api&amp;utm_medium&#x3D;docs&amp;utm_campaign&#x3D;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)
211
+ # Cancel campaign
212
+ def cancel_send(campaign_id, opts = {})
213
+ fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
605
214
 
606
- # query parameters
607
215
  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
216
  post_body = nil
621
- auth_names = ['basicAuth']
217
+
218
+ local_var_path = '/campaigns/{campaign_id}/actions/cancel-send'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
622
219
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
623
- :header_params => header_params,
624
220
  :query_params => query_params,
625
- :form_params => form_params,
626
- :body => post_body,
627
- :auth_names => auth_names)
221
+ :body => post_body)
628
222
  return data, status_code, headers
629
223
  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
224
 
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)
225
+ # Resend campaign
226
+ def create_resend(campaign_id, opts = {})
227
+ fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
648
228
 
649
- # query parameters
650
229
  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
230
  post_body = nil
664
- auth_names = ['basicAuth']
231
+
232
+ local_var_path = '/campaigns/{campaign_id}/actions/create-resend'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
665
233
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
666
- :header_params => header_params,
667
234
  :query_params => query_params,
668
- :form_params => form_params,
669
- :body => post_body,
670
- :auth_names => auth_names,
671
- :return_type => 'Campaign3')
235
+ :body => post_body)
672
236
  return data, status_code, headers
673
237
  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
238
 
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)
239
+ # Pause rss campaign
240
+ def pause(campaign_id, opts = {})
241
+ fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
692
242
 
693
- # query parameters
694
243
  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
244
  post_body = nil
708
- auth_names = ['basicAuth']
245
+
246
+ local_var_path = '/campaigns/{campaign_id}/actions/pause'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
709
247
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
710
- :header_params => header_params,
711
248
  :query_params => query_params,
712
- :form_params => form_params,
713
- :body => post_body,
714
- :auth_names => auth_names)
249
+ :body => post_body)
715
250
  return data, status_code, headers
716
251
  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
252
 
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)
253
+ # Replicate campaign
254
+ def replicate(campaign_id, opts = {})
255
+ fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
735
256
 
736
- # query parameters
737
257
  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
258
  post_body = nil
751
- auth_names = ['basicAuth']
259
+
260
+ local_var_path = '/campaigns/{campaign_id}/actions/replicate'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
752
261
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
753
- :header_params => header_params,
754
262
  :query_params => query_params,
755
- :form_params => form_params,
756
- :body => post_body,
757
- :auth_names => auth_names,
758
- :return_type => 'Campaign3')
263
+ :body => post_body)
759
264
  return data, status_code, headers
760
265
  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
266
 
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)
267
+ # Resume rss campaign
268
+ def resume(campaign_id, opts = {})
269
+ fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
779
270
 
780
- # query parameters
781
271
  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
272
  post_body = nil
795
- auth_names = ['basicAuth']
273
+
274
+ local_var_path = '/campaigns/{campaign_id}/actions/resume'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
796
275
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
797
- :header_params => header_params,
798
276
  :query_params => query_params,
799
- :form_params => form_params,
800
- :body => post_body,
801
- :auth_names => auth_names)
277
+ :body => post_body)
802
278
  return data, status_code, headers
803
279
  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
280
 
815
- # Schedule a campaign
816
- # [Schedule a campaign](https://mailchimp.com/help/schedule-or-pause-a-regular-email-campaign/) for delivery. If you&#39;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)
281
+ # Schedule campaign
282
+ def schedule(campaign_id, body, opts = {})
283
+ fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
284
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
824
285
 
825
- # query parameters
826
286
  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
287
  post_body = @api_client.object_to_http_body(body)
840
- auth_names = ['basicAuth']
288
+
289
+ local_var_path = '/campaigns/{campaign_id}/actions/schedule'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
841
290
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
842
- :header_params => header_params,
843
291
  :query_params => query_params,
844
- :form_params => form_params,
845
- :body => post_body,
846
- :auth_names => auth_names)
292
+ :body => post_body)
847
293
  return data, status_code, headers
848
294
  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
295
 
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)
296
+ # Send campaign
297
+ def send(campaign_id, opts = {})
298
+ fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
867
299
 
868
- # query parameters
869
300
  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
301
  post_body = nil
883
- auth_names = ['basicAuth']
302
+
303
+ local_var_path = '/campaigns/{campaign_id}/actions/send'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
884
304
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
885
- :header_params => header_params,
886
305
  :query_params => query_params,
887
- :form_params => form_params,
888
- :body => post_body,
889
- :auth_names => auth_names)
306
+ :body => post_body)
890
307
  return data, status_code, headers
891
308
  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
309
 
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)
310
+ # Send test email
311
+ def send_test_email(campaign_id, body, opts = {})
312
+ fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
313
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
912
314
 
913
- # query parameters
914
315
  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
316
  post_body = @api_client.object_to_http_body(body)
928
- auth_names = ['basicAuth']
317
+
318
+ local_var_path = '/campaigns/{campaign_id}/actions/test'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
929
319
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
930
- :header_params => header_params,
931
320
  :query_params => query_params,
932
- :form_params => form_params,
933
- :body => post_body,
934
- :auth_names => auth_names)
321
+ :body => post_body)
935
322
  return data, status_code, headers
936
323
  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
324
 
947
- # Unschedule a campaign
948
- # [Unschedule](https://mailchimp.com/help/schedule-or-pause-a-regular-email-campaign/) a scheduled campaign that hasn&#39;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)
325
+ # Unschedule campaign
326
+ def unschedule(campaign_id, opts = {})
327
+ fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
955
328
 
956
- # query parameters
957
329
  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
330
  post_body = nil
971
- auth_names = ['basicAuth']
331
+
332
+ local_var_path = '/campaigns/{campaign_id}/actions/unschedule'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
972
333
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
973
- :header_params => header_params,
974
334
  :query_params => query_params,
975
- :form_params => form_params,
976
- :body => post_body,
977
- :auth_names => auth_names)
335
+ :body => post_body)
978
336
  return data, status_code, headers
979
337
  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
338
 
991
339
  # 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)
340
+ def add_feedback(campaign_id, body, opts = {})
341
+ fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
342
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
1000
343
 
1001
- # query parameters
1002
344
  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
345
  post_body = @api_client.object_to_http_body(body)
1016
- auth_names = ['basicAuth']
346
+
347
+ local_var_path = '/campaigns/{campaign_id}/feedback'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
1017
348
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
1018
- :header_params => header_params,
1019
349
  :query_params => query_params,
1020
- :form_params => form_params,
1021
- :body => post_body,
1022
- :auth_names => auth_names,
1023
- :return_type => 'CampaignFeedback2')
350
+ :body => post_body)
1024
351
  return data, status_code, headers
1025
352
  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
353
 
1037
354
  # 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)
355
+ def set_content(campaign_id, body, opts = {})
356
+ fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
357
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
1046
358
 
1047
- # query parameters
1048
359
  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
360
  post_body = @api_client.object_to_http_body(body)
1062
- auth_names = ['basicAuth']
361
+
362
+ local_var_path = '/campaigns/{campaign_id}/content'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
1063
363
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1064
- :header_params => header_params,
1065
364
  :query_params => query_params,
1066
- :form_params => form_params,
1067
- :body => post_body,
1068
- :auth_names => auth_names,
1069
- :return_type => 'CampaignContent')
365
+ :body => post_body)
1070
366
  return data, status_code, headers
1071
367
  end
1072
368
  end