MailchimpMarketing 3.0.1 → 3.0.8

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 +1 -1
  4. data/README.md +55 -46
  5. data/lib/MailchimpMarketing.rb +5 -6
  6. data/lib/MailchimpMarketing/api/activity_feed_api.rb +13 -69
  7. data/lib/MailchimpMarketing/api/authorized_apps_api.rb +20 -113
  8. data/lib/MailchimpMarketing/api/automations_api.rb +130 -685
  9. data/lib/MailchimpMarketing/api/batch_webhooks_api.rb +33 -182
  10. data/lib/MailchimpMarketing/api/batches_api.rb +26 -146
  11. data/lib/MailchimpMarketing/api/campaign_folders_api.rb +33 -182
  12. data/lib/MailchimpMarketing/api/campaigns_api.rb +144 -803
  13. data/lib/MailchimpMarketing/api/connected_sites_api.rb +32 -179
  14. data/lib/MailchimpMarketing/api/conversations_api.rb +36 -205
  15. data/lib/MailchimpMarketing/api/dashboard_api.rb +32 -221
  16. data/lib/MailchimpMarketing/api/ecommerce_api.rb +447 -2312
  17. data/lib/MailchimpMarketing/api/external_auths_api.rb +20 -113
  18. data/lib/MailchimpMarketing/api/facebook_ads_api.rb +16 -83
  19. data/lib/MailchimpMarketing/api/file_manager_api.rb +71 -413
  20. data/lib/MailchimpMarketing/api/landing_pages_api.rb +51 -286
  21. data/lib/MailchimpMarketing/api/lists_api.rb +721 -2876
  22. data/lib/MailchimpMarketing/api/ping_api.rb +7 -33
  23. data/lib/MailchimpMarketing/api/postcards_api.rb +9 -41
  24. data/lib/MailchimpMarketing/api/reporting_api.rb +41 -237
  25. data/lib/MailchimpMarketing/api/reports_api.rb +153 -903
  26. data/lib/MailchimpMarketing/api/root_api.rb +7 -37
  27. data/lib/MailchimpMarketing/api/search_campaigns_api.rb +8 -39
  28. data/lib/MailchimpMarketing/api/search_members_api.rb +8 -41
  29. data/lib/MailchimpMarketing/api/template_folders_api.rb +33 -182
  30. data/lib/MailchimpMarketing/api/templates_api.rb +40 -234
  31. data/lib/MailchimpMarketing/api/verified_domains_api.rb +32 -170
  32. data/lib/MailchimpMarketing/api_client.rb +94 -64
  33. data/lib/MailchimpMarketing/api_error.rb +4 -4
  34. data/lib/MailchimpMarketing/configuration.rb +1 -1
  35. data/lib/MailchimpMarketing/version.rb +2 -2
  36. metadata +2 -2
@@ -3,7 +3,7 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 3.0.1
6
+ OpenAPI spec version: 3.0.8
7
7
  Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
@@ -11,6 +11,7 @@ Swagger Codegen version: 2.4.12
11
11
  =end
12
12
 
13
13
  require 'uri'
14
+ require 'json'
14
15
 
15
16
  module MailchimpMarketing
16
17
  class ReportsApi
@@ -19,38 +20,12 @@ module MailchimpMarketing
19
20
  def initialize(api_client)
20
21
  @api_client = api_client
21
22
  end
22
- # Get campaign reports
23
- # Get campaign reports.
24
- # @param [Hash] opts the optional parameters
25
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
26
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
27
- # @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)
28
- # @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)
29
- # @option opts [String] :type The campaign type.
30
- # @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.
31
- # @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.
32
- # @return [CampaignReports1]
33
- def get_all_campaign_reports(opts = {})
34
- data, _status_code, _headers = get_all_campaign_reports_with_http_info(opts)
35
- data
36
- end
37
23
 
38
- # Get campaign reports
39
- # Get campaign reports.
40
- # @param [Hash] opts the optional parameters
41
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
42
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
43
- # @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**
44
- # @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**.
45
- # @option opts [String] :type The campaign type.
46
- # @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.
47
- # @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.
48
- # @return [Array<(CampaignReports1, Fixnum, Hash)>] CampaignReports1 data, response status code and response headers
49
- def get_all_campaign_reports_with_http_info(opts = {})
50
- # resource path
51
- local_var_path = '/reports'
24
+ # List campaign reports
25
+ def get_all_campaign_reports(opts = {})
26
+ fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
27
+ 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'])
52
28
 
53
- # query parameters
54
29
  query_params = {}
55
30
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
56
31
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
@@ -59,1155 +34,430 @@ module MailchimpMarketing
59
34
  query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
60
35
  query_params[:'before_send_time'] = opts[:'before_send_time'] if !opts[:'before_send_time'].nil?
61
36
  query_params[:'since_send_time'] = opts[:'since_send_time'] if !opts[:'since_send_time'].nil?
62
-
63
- # header parameters
64
- header_params = {}
65
- # HTTP header 'Accept' (if needed)
66
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
67
- # HTTP header 'Content-Type'
68
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
69
-
70
- # form parameters
71
37
  form_params = {}
72
-
73
- # http body (model)
74
38
  post_body = nil
75
- auth_names = ['basicAuth']
39
+
40
+ local_var_path = '/reports'
76
41
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
77
- :header_params => header_params,
78
42
  :query_params => query_params,
79
43
  :form_params => form_params,
80
- :body => post_body,
81
- :auth_names => auth_names,
82
- :return_type => 'CampaignReports1')
44
+ :body => post_body)
83
45
  return data, status_code, headers
84
46
  end
85
- # Get a specific campaign report
86
- # Get report details for a specific sent campaign.
87
- # @param campaign_id The unique id for the campaign.
88
- # @param [Hash] opts the optional parameters
89
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
90
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
91
- # @return [CampaignReport]
92
- def get_campaign_report(campaign_id = {}, opts = {})
93
- data, _status_code, _headers = get_campaign_report_with_http_info(campaign_id, opts)
94
- data
95
- end
96
47
 
97
- # Get a specific campaign report
98
- # Get report details for a specific sent campaign.
99
- # @param campaign_id The unique id for the campaign.
100
- # @param [Hash] opts the optional parameters
101
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
102
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
103
- # @return [Array<(CampaignReport, Fixnum, Hash)>] CampaignReport data, response status code and response headers
104
- def get_campaign_report_with_http_info(campaign_id, opts = {})
105
- # resource path
106
- local_var_path = '/reports/{campaign_id}'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
48
+ # Get campaign report
49
+ def get_campaign_report(campaign_id, opts = {})
50
+ fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
107
51
 
108
- # query parameters
109
52
  query_params = {}
110
53
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
111
54
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
112
-
113
- # header parameters
114
- header_params = {}
115
- # HTTP header 'Accept' (if needed)
116
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
117
- # HTTP header 'Content-Type'
118
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
119
-
120
- # form parameters
121
55
  form_params = {}
122
-
123
- # http body (model)
124
56
  post_body = nil
125
- auth_names = ['basicAuth']
57
+
58
+ local_var_path = '/reports/{campaign_id}'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
126
59
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
127
- :header_params => header_params,
128
60
  :query_params => query_params,
129
61
  :form_params => form_params,
130
- :body => post_body,
131
- :auth_names => auth_names,
132
- :return_type => 'CampaignReport')
62
+ :body => post_body)
133
63
  return data, status_code, headers
134
64
  end
135
- # Get abuse complaints for a campaign
136
- # Get a list of [abuse complaints](https://mailchimp.com/help/about-abuse-complaints/) for a specific campaign.
137
- # @param campaign_id The unique id for the campaign.
138
- # @param [Hash] opts the optional parameters
139
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
140
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
141
- # @return [AbuseComplaints1]
142
- def get_campaign_abuse_reports(campaign_id = {}, opts = {})
143
- data, _status_code, _headers = get_campaign_abuse_reports_with_http_info(campaign_id, opts)
144
- data
145
- end
146
65
 
147
- # Get abuse complaints for a campaign
148
- # Get a list of [abuse complaints](https://mailchimp.com/help/about-abuse-complaints/) for a specific campaign.
149
- # @param campaign_id The unique id for the campaign.
150
- # @param [Hash] opts the optional parameters
151
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
152
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
153
- # @return [Array<(AbuseComplaints1, Fixnum, Hash)>] AbuseComplaints1 data, response status code and response headers
154
- def get_campaign_abuse_reports_with_http_info(campaign_id, opts = {})
155
- # resource path
156
- local_var_path = '/reports/{campaign_id}/abuse-reports'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
66
+ # List abuse reports
67
+ def get_campaign_abuse_reports(campaign_id, opts = {})
68
+ fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
157
69
 
158
- # query parameters
159
70
  query_params = {}
160
71
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
161
72
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
162
-
163
- # header parameters
164
- header_params = {}
165
- # HTTP header 'Accept' (if needed)
166
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
167
- # HTTP header 'Content-Type'
168
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
169
-
170
- # form parameters
171
73
  form_params = {}
172
-
173
- # http body (model)
174
74
  post_body = nil
175
- auth_names = ['basicAuth']
75
+
76
+ local_var_path = '/reports/{campaign_id}/abuse-reports'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
176
77
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
177
- :header_params => header_params,
178
78
  :query_params => query_params,
179
79
  :form_params => form_params,
180
- :body => post_body,
181
- :auth_names => auth_names,
182
- :return_type => 'AbuseComplaints1')
80
+ :body => post_body)
183
81
  return data, status_code, headers
184
82
  end
185
- # Get information about a specific abuse report
186
- # Get information about a specific abuse report for a campaign.
187
- # @param campaign_id The unique id for the campaign.
188
- # @param report_id The id for the abuse report.
189
- # @param [Hash] opts the optional parameters
190
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
191
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
192
- # @return [AbuseComplaint1]
193
- def get_campaign_abuse_report(campaign_id = {}, report_id = {}, opts = {})
194
- data, _status_code, _headers = get_campaign_abuse_report_with_http_info(campaign_id, report_id, opts)
195
- data
196
- end
197
83
 
198
- # Get information about a specific abuse report
199
- # Get information about a specific abuse report for a campaign.
200
- # @param campaign_id The unique id for the campaign.
201
- # @param report_id The id for the abuse report.
202
- # @param [Hash] opts the optional parameters
203
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
204
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
205
- # @return [Array<(AbuseComplaint1, Fixnum, Hash)>] AbuseComplaint1 data, response status code and response headers
206
- def get_campaign_abuse_report_with_http_info(campaign_id, report_id, opts = {})
207
- # resource path
208
- local_var_path = '/reports/{campaign_id}/abuse-reports/{report_id}'.sub('{' + 'campaign_id' + '}', campaign_id.to_s).sub('{' + 'report_id' + '}', report_id.to_s)
84
+ # Get abuse report
85
+ def get_campaign_abuse_report(campaign_id, report_id, opts = {})
86
+ fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
87
+ fail ArgumentError, "Missing required param: 'report_id'" if report_id.nil?
209
88
 
210
- # query parameters
211
89
  query_params = {}
212
90
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
213
91
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
214
-
215
- # header parameters
216
- header_params = {}
217
- # HTTP header 'Accept' (if needed)
218
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
219
- # HTTP header 'Content-Type'
220
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
221
-
222
- # form parameters
223
92
  form_params = {}
224
-
225
- # http body (model)
226
93
  post_body = nil
227
- auth_names = ['basicAuth']
94
+
95
+ local_var_path = '/reports/{campaign_id}/abuse-reports/{report_id}'.sub('{' + 'campaign_id' + '}', campaign_id.to_s).sub('{' + 'report_id' + '}', report_id.to_s)
228
96
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
229
- :header_params => header_params,
230
97
  :query_params => query_params,
231
98
  :form_params => form_params,
232
- :body => post_body,
233
- :auth_names => auth_names,
234
- :return_type => 'AbuseComplaint1')
99
+ :body => post_body)
235
100
  return data, status_code, headers
236
101
  end
237
- # Get campaign feedback
238
- # Get feedback based on a campaign's statistics. Advice feedback is based on campaign stats like opens, clicks, unsubscribes, bounces, and more.
239
- # @param campaign_id The unique id for the campaign.
240
- # @param [Hash] opts the optional parameters
241
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
242
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
243
- # @return [CampaignAdviceReport]
244
- def get_campaign_advice(campaign_id = {}, opts = {})
245
- data, _status_code, _headers = get_campaign_advice_with_http_info(campaign_id, opts)
246
- data
247
- end
248
102
 
249
- # Get campaign feedback
250
- # Get feedback based on a campaign&#39;s statistics. Advice feedback is based on campaign stats like opens, clicks, unsubscribes, bounces, and more.
251
- # @param campaign_id The unique id for the campaign.
252
- # @param [Hash] opts the optional parameters
253
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
254
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
255
- # @return [Array<(CampaignAdviceReport, Fixnum, Hash)>] CampaignAdviceReport data, response status code and response headers
256
- def get_campaign_advice_with_http_info(campaign_id, opts = {})
257
- # resource path
258
- local_var_path = '/reports/{campaign_id}/advice'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
103
+ # List campaign feedback
104
+ def get_campaign_advice(campaign_id, opts = {})
105
+ fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
259
106
 
260
- # query parameters
261
107
  query_params = {}
262
108
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
263
109
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
264
-
265
- # header parameters
266
- header_params = {}
267
- # HTTP header 'Accept' (if needed)
268
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
269
- # HTTP header 'Content-Type'
270
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
271
-
272
- # form parameters
273
110
  form_params = {}
274
-
275
- # http body (model)
276
111
  post_body = nil
277
- auth_names = ['basicAuth']
112
+
113
+ local_var_path = '/reports/{campaign_id}/advice'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
278
114
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
279
- :header_params => header_params,
280
115
  :query_params => query_params,
281
116
  :form_params => form_params,
282
- :body => post_body,
283
- :auth_names => auth_names,
284
- :return_type => 'CampaignAdviceReport')
117
+ :body => post_body)
285
118
  return data, status_code, headers
286
119
  end
287
- # Get campaign click details
288
- # Get information about [clicks](https://mailchimp.com/help/enable-and-view-click-tracking/) on specific links in your Mailchimp campaigns.
289
- # @param campaign_id The unique id for the campaign.
290
- # @param [Hash] opts the optional parameters
291
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
292
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
293
- # @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)
294
- # @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)
295
- # @return [ClickDetailReport]
296
- def get_campaign_click_details(campaign_id = {}, opts = {})
297
- data, _status_code, _headers = get_campaign_click_details_with_http_info(campaign_id, opts)
298
- data
299
- end
300
120
 
301
- # Get campaign click details
302
- # Get information about [clicks](https://mailchimp.com/help/enable-and-view-click-tracking/) on specific links in your Mailchimp campaigns.
303
- # @param campaign_id The unique id for the campaign.
304
- # @param [Hash] opts the optional parameters
305
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
306
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
307
- # @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**
308
- # @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**.
309
- # @return [Array<(ClickDetailReport, Fixnum, Hash)>] ClickDetailReport data, response status code and response headers
310
- def get_campaign_click_details_with_http_info(campaign_id, opts = {})
311
- # resource path
312
- local_var_path = '/reports/{campaign_id}/click-details'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
121
+ # List campaign details
122
+ def get_campaign_click_details(campaign_id, opts = {})
123
+ fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
124
+ fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
313
125
 
314
- # query parameters
315
126
  query_params = {}
316
127
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
317
128
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
318
129
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
319
130
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
320
-
321
- # header parameters
322
- header_params = {}
323
- # HTTP header 'Accept' (if needed)
324
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
325
- # HTTP header 'Content-Type'
326
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
327
-
328
- # form parameters
329
131
  form_params = {}
330
-
331
- # http body (model)
332
132
  post_body = nil
333
- auth_names = ['basicAuth']
133
+
134
+ local_var_path = '/reports/{campaign_id}/click-details'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
334
135
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
335
- :header_params => header_params,
336
136
  :query_params => query_params,
337
137
  :form_params => form_params,
338
- :body => post_body,
339
- :auth_names => auth_names,
340
- :return_type => 'ClickDetailReport')
138
+ :body => post_body)
341
139
  return data, status_code, headers
342
140
  end
343
- # Get click details for a specific link
344
- # Get click details for a specific link in a campaign.
345
- # @param campaign_id The unique id for the campaign.
346
- # @param link_id The id for the link.
347
- # @param [Hash] opts the optional parameters
348
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
349
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
350
- # @return [ClickDetailReport]
351
- def get_campaign_click_details_for_link(campaign_id = {}, link_id = {}, opts = {})
352
- data, _status_code, _headers = get_campaign_click_details_for_link_with_http_info(campaign_id, link_id, opts)
353
- data
354
- end
355
141
 
356
- # Get click details for a specific link
357
- # Get click details for a specific link in a campaign.
358
- # @param campaign_id The unique id for the campaign.
359
- # @param link_id The id for the link.
360
- # @param [Hash] opts the optional parameters
361
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
362
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
363
- # @return [Array<(ClickDetailReport, Fixnum, Hash)>] ClickDetailReport data, response status code and response headers
364
- def get_campaign_click_details_for_link_with_http_info(campaign_id, link_id, opts = {})
365
- # resource path
366
- local_var_path = '/reports/{campaign_id}/click-details/{link_id}'.sub('{' + 'campaign_id' + '}', campaign_id.to_s).sub('{' + 'link_id' + '}', link_id.to_s)
142
+ # Get campaign link details
143
+ def get_campaign_click_details_for_link(campaign_id, link_id, opts = {})
144
+ fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
145
+ fail ArgumentError, "Missing required param: 'link_id'" if link_id.nil?
367
146
 
368
- # query parameters
369
147
  query_params = {}
370
148
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
371
149
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
372
-
373
- # header parameters
374
- header_params = {}
375
- # HTTP header 'Accept' (if needed)
376
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
377
- # HTTP header 'Content-Type'
378
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
379
-
380
- # form parameters
381
150
  form_params = {}
382
-
383
- # http body (model)
384
151
  post_body = nil
385
- auth_names = ['basicAuth']
152
+
153
+ local_var_path = '/reports/{campaign_id}/click-details/{link_id}'.sub('{' + 'campaign_id' + '}', campaign_id.to_s).sub('{' + 'link_id' + '}', link_id.to_s)
386
154
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
387
- :header_params => header_params,
388
155
  :query_params => query_params,
389
156
  :form_params => form_params,
390
- :body => post_body,
391
- :auth_names => auth_names,
392
- :return_type => 'ClickDetailReport')
157
+ :body => post_body)
393
158
  return data, status_code, headers
394
159
  end
395
- # Get information about subscribers who clicked a link
396
- # Get information about list members who clicked on a specific link in a campaign.
397
- # @param campaign_id The unique id for the campaign.
398
- # @param link_id The id for the link.
399
- # @param [Hash] opts the optional parameters
400
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
401
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
402
- # @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)
403
- # @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)
404
- # @return [ClickDetailMembers]
405
- def get_subscribers_info(campaign_id = {}, link_id = {}, opts = {})
406
- data, _status_code, _headers = get_subscribers_info_with_http_info(campaign_id, link_id, opts)
407
- data
408
- end
409
160
 
410
- # Get information about subscribers who clicked a link
411
- # Get information about list members who clicked on a specific link in a campaign.
412
- # @param campaign_id The unique id for the campaign.
413
- # @param link_id The id for the link.
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
- # @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**
418
- # @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**.
419
- # @return [Array<(ClickDetailMembers, Fixnum, Hash)>] ClickDetailMembers data, response status code and response headers
420
- def get_subscribers_info_with_http_info(campaign_id, link_id, opts = {})
421
- # resource path
422
- local_var_path = '/reports/{campaign_id}/click-details/{link_id}/members'.sub('{' + 'campaign_id' + '}', campaign_id.to_s).sub('{' + 'link_id' + '}', link_id.to_s)
161
+ # List clicked link subscribers
162
+ def get_subscribers_info(campaign_id, link_id, opts = {})
163
+ fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
164
+ fail ArgumentError, "Missing required param: 'link_id'" if link_id.nil?
165
+ fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
423
166
 
424
- # query parameters
425
167
  query_params = {}
426
168
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
427
169
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
428
170
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
429
171
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
430
-
431
- # header parameters
432
- header_params = {}
433
- # HTTP header 'Accept' (if needed)
434
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
435
- # HTTP header 'Content-Type'
436
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
437
-
438
- # form parameters
439
172
  form_params = {}
440
-
441
- # http body (model)
442
173
  post_body = nil
443
- auth_names = ['basicAuth']
174
+
175
+ local_var_path = '/reports/{campaign_id}/click-details/{link_id}/members'.sub('{' + 'campaign_id' + '}', campaign_id.to_s).sub('{' + 'link_id' + '}', link_id.to_s)
444
176
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
445
- :header_params => header_params,
446
177
  :query_params => query_params,
447
178
  :form_params => form_params,
448
- :body => post_body,
449
- :auth_names => auth_names,
450
- :return_type => 'ClickDetailMembers')
179
+ :body => post_body)
451
180
  return data, status_code, headers
452
181
  end
453
- # Get information about a specific subscriber who clicked a link
454
- # Get information about a specific subscriber who clicked a link in a specific campaign.
455
- # @param campaign_id The unique id for the campaign.
456
- # @param link_id The id for the link.
457
- # @param subscriber_hash The MD5 hash of the lowercase version of the list member&#39;s email address.
458
- # @param [Hash] opts the optional parameters
459
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
460
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
461
- # @return [ClickDetailMember]
462
- def get_subscriber_info(campaign_id = {}, link_id = {}, subscriber_hash = {}, opts = {})
463
- data, _status_code, _headers = get_subscriber_info_with_http_info(campaign_id, link_id, subscriber_hash, opts)
464
- data
465
- end
466
182
 
467
- # Get information about a specific subscriber who clicked a link
468
- # Get information about a specific subscriber who clicked a link in a specific campaign.
469
- # @param campaign_id The unique id for the campaign.
470
- # @param link_id The id for the link.
471
- # @param subscriber_hash The MD5 hash of the lowercase version of the list member&#39;s email address.
472
- # @param [Hash] opts the optional parameters
473
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
474
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
475
- # @return [Array<(ClickDetailMember, Fixnum, Hash)>] ClickDetailMember data, response status code and response headers
476
- def get_subscriber_info_with_http_info(campaign_id, link_id, subscriber_hash, opts = {})
477
- # resource path
478
- local_var_path = '/reports/{campaign_id}/click-details/{link_id}/members/{subscriber_hash}'.sub('{' + 'campaign_id' + '}', campaign_id.to_s).sub('{' + 'link_id' + '}', link_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
183
+ # Get clicked link subscriber
184
+ def get_subscriber_info(campaign_id, link_id, subscriber_hash, opts = {})
185
+ fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
186
+ fail ArgumentError, "Missing required param: 'link_id'" if link_id.nil?
187
+ fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
479
188
 
480
- # query parameters
481
189
  query_params = {}
482
190
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
483
191
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
484
-
485
- # header parameters
486
- header_params = {}
487
- # HTTP header 'Accept' (if needed)
488
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
489
- # HTTP header 'Content-Type'
490
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
491
-
492
- # form parameters
493
192
  form_params = {}
494
-
495
- # http body (model)
496
193
  post_body = nil
497
- auth_names = ['basicAuth']
194
+
195
+ local_var_path = '/reports/{campaign_id}/click-details/{link_id}/members/{subscriber_hash}'.sub('{' + 'campaign_id' + '}', campaign_id.to_s).sub('{' + 'link_id' + '}', link_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
498
196
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
499
- :header_params => header_params,
500
197
  :query_params => query_params,
501
198
  :form_params => form_params,
502
- :body => post_body,
503
- :auth_names => auth_names,
504
- :return_type => 'ClickDetailMember')
199
+ :body => post_body)
505
200
  return data, status_code, headers
506
201
  end
507
- # Get domain performance stats
508
- # Get statistics for the top-performing email domains in a campaign.
509
- # @param campaign_id The unique id for the campaign.
510
- # @param [Hash] opts the optional parameters
511
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
512
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
513
- # @return [DomainPerformance]
514
- def get_domain_performance_for_campaign(campaign_id = {}, opts = {})
515
- data, _status_code, _headers = get_domain_performance_for_campaign_with_http_info(campaign_id, opts)
516
- data
517
- end
518
202
 
519
- # Get domain performance stats
520
- # Get statistics for the top-performing email domains in a campaign.
521
- # @param campaign_id The unique id for the campaign.
522
- # @param [Hash] opts the optional parameters
523
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
524
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
525
- # @return [Array<(DomainPerformance, Fixnum, Hash)>] DomainPerformance data, response status code and response headers
526
- def get_domain_performance_for_campaign_with_http_info(campaign_id, opts = {})
527
- # resource path
528
- local_var_path = '/reports/{campaign_id}/domain-performance'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
203
+ # List domain performance stats
204
+ def get_domain_performance_for_campaign(campaign_id, opts = {})
205
+ fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
529
206
 
530
- # query parameters
531
207
  query_params = {}
532
208
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
533
209
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
534
-
535
- # header parameters
536
- header_params = {}
537
- # HTTP header 'Accept' (if needed)
538
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
539
- # HTTP header 'Content-Type'
540
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
541
-
542
- # form parameters
543
210
  form_params = {}
544
-
545
- # http body (model)
546
211
  post_body = nil
547
- auth_names = ['basicAuth']
212
+
213
+ local_var_path = '/reports/{campaign_id}/domain-performance'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
548
214
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
549
- :header_params => header_params,
550
215
  :query_params => query_params,
551
216
  :form_params => form_params,
552
- :body => post_body,
553
- :auth_names => auth_names,
554
- :return_type => 'DomainPerformance')
217
+ :body => post_body)
555
218
  return data, status_code, headers
556
219
  end
557
- # __summary__
558
- # Get breakdown of product activity for a campaign
559
- # @param campaign_id The unique id for the campaign.
560
- # @param [Hash] opts the optional parameters
561
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
562
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
563
- # @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)
564
- # @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)
565
- # @option opts [String] :sort_field Returns files sorted by the specified field.
566
- # @return [InlineResponse2008]
567
- def get_ecommerce_product_activity_for_campaign(campaign_id = {}, opts = {})
568
- data, _status_code, _headers = get_ecommerce_product_activity_for_campaign_with_http_info(campaign_id, opts)
569
- data
570
- end
571
220
 
572
- # __summary__
573
- # Get breakdown of product activity for a campaign
574
- # @param campaign_id The unique id for the campaign.
575
- # @param [Hash] opts the optional parameters
576
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
577
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
578
- # @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**
579
- # @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**.
580
- # @option opts [String] :sort_field Returns files sorted by the specified field.
581
- # @return [Array<(InlineResponse2008, Fixnum, Hash)>] InlineResponse2008 data, response status code and response headers
582
- def get_ecommerce_product_activity_for_campaign_with_http_info(campaign_id, opts = {})
583
- # resource path
584
- local_var_path = '/reports/{campaign_id}/ecommerce-product-activity'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
221
+ # List campaign product activity
222
+ def get_ecommerce_product_activity_for_campaign(campaign_id, opts = {})
223
+ fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
224
+ fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
225
+ fail ArgumentError, 'invalid value for "sort_field", must be one of title, total_revenue, total_purchased' if opts[:'sort_field'] && !['title', 'total_revenue', 'total_purchased'].include?(opts[:'sort_field'])
585
226
 
586
- # query parameters
587
227
  query_params = {}
588
228
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
589
229
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
590
230
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
591
231
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
592
232
  query_params[:'sort_field'] = opts[:'sort_field'] if !opts[:'sort_field'].nil?
593
-
594
- # header parameters
595
- header_params = {}
596
- # HTTP header 'Accept' (if needed)
597
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
598
- # HTTP header 'Content-Type'
599
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
600
-
601
- # form parameters
602
233
  form_params = {}
603
-
604
- # http body (model)
605
234
  post_body = nil
606
- auth_names = ['basicAuth']
235
+
236
+ local_var_path = '/reports/{campaign_id}/ecommerce-product-activity'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
607
237
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
608
- :header_params => header_params,
609
238
  :query_params => query_params,
610
239
  :form_params => form_params,
611
- :body => post_body,
612
- :auth_names => auth_names,
613
- :return_type => 'InlineResponse2008')
240
+ :body => post_body)
614
241
  return data, status_code, headers
615
242
  end
616
- # Get Eepurl activity
617
- # Get a summary of social activity for the campaign, tracked by EepURL.
618
- # @param campaign_id The unique id for the campaign.
619
- # @param [Hash] opts the optional parameters
620
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
621
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
622
- # @return [EepurlActivity]
623
- def get_eepurl_activity_for_campaign(campaign_id = {}, opts = {})
624
- data, _status_code, _headers = get_eepurl_activity_for_campaign_with_http_info(campaign_id, opts)
625
- data
626
- end
627
243
 
628
- # Get Eepurl activity
629
- # Get a summary of social activity for the campaign, tracked by EepURL.
630
- # @param campaign_id The unique id for the campaign.
631
- # @param [Hash] opts the optional parameters
632
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
633
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
634
- # @return [Array<(EepurlActivity, Fixnum, Hash)>] EepurlActivity data, response status code and response headers
635
- def get_eepurl_activity_for_campaign_with_http_info(campaign_id, opts = {})
636
- # resource path
637
- local_var_path = '/reports/{campaign_id}/eepurl'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
244
+ # List eep url activity
245
+ def get_eepurl_activity_for_campaign(campaign_id, opts = {})
246
+ fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
638
247
 
639
- # query parameters
640
248
  query_params = {}
641
249
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
642
250
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
643
-
644
- # header parameters
645
- header_params = {}
646
- # HTTP header 'Accept' (if needed)
647
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
648
- # HTTP header 'Content-Type'
649
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
650
-
651
- # form parameters
652
251
  form_params = {}
653
-
654
- # http body (model)
655
252
  post_body = nil
656
- auth_names = ['basicAuth']
253
+
254
+ local_var_path = '/reports/{campaign_id}/eepurl'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
657
255
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
658
- :header_params => header_params,
659
256
  :query_params => query_params,
660
257
  :form_params => form_params,
661
- :body => post_body,
662
- :auth_names => auth_names,
663
- :return_type => 'EepurlActivity')
258
+ :body => post_body)
664
259
  return data, status_code, headers
665
260
  end
666
- # Get email activity
667
- # Get a list of member's subscriber activity in a specific campaign.
668
- # @param campaign_id The unique id for the campaign.
669
- # @param [Hash] opts the optional parameters
670
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
671
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
672
- # @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)
673
- # @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)
674
- # @option opts [String] :since Restrict results to email activity events that occur after a specific time. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
675
- # @return [EmailActivity]
676
- def get_email_activity_for_campaign(campaign_id = {}, opts = {})
677
- data, _status_code, _headers = get_email_activity_for_campaign_with_http_info(campaign_id, opts)
678
- data
679
- end
680
261
 
681
- # Get email activity
682
- # Get a list of member&#39;s subscriber activity in a specific campaign.
683
- # @param campaign_id The unique id for the campaign.
684
- # @param [Hash] opts the optional parameters
685
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
686
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
687
- # @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**
688
- # @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**.
689
- # @option opts [String] :since Restrict results to email activity events that occur after a specific time. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
690
- # @return [Array<(EmailActivity, Fixnum, Hash)>] EmailActivity data, response status code and response headers
691
- def get_email_activity_for_campaign_with_http_info(campaign_id, opts = {})
692
- # resource path
693
- local_var_path = '/reports/{campaign_id}/email-activity'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
262
+ # List email activity
263
+ def get_email_activity_for_campaign(campaign_id, opts = {})
264
+ fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
265
+ fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
694
266
 
695
- # query parameters
696
267
  query_params = {}
697
268
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
698
269
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
699
270
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
700
271
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
701
272
  query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
702
-
703
- # header parameters
704
- header_params = {}
705
- # HTTP header 'Accept' (if needed)
706
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
707
- # HTTP header 'Content-Type'
708
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
709
-
710
- # form parameters
711
273
  form_params = {}
712
-
713
- # http body (model)
714
274
  post_body = nil
715
- auth_names = ['basicAuth']
275
+
276
+ local_var_path = '/reports/{campaign_id}/email-activity'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
716
277
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
717
- :header_params => header_params,
718
278
  :query_params => query_params,
719
279
  :form_params => form_params,
720
- :body => post_body,
721
- :auth_names => auth_names,
722
- :return_type => 'EmailActivity')
280
+ :body => post_body)
723
281
  return data, status_code, headers
724
282
  end
725
- # Get email activity for a specific subscriber
726
- # Get a specific list member's activity in a campaign including opens, clicks, and bounces.
727
- # @param campaign_id The unique id for the campaign.
728
- # @param subscriber_hash The MD5 hash of the lowercase version of the list member&#39;s email address.
729
- # @param [Hash] opts the optional parameters
730
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
731
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
732
- # @option opts [String] :since Restrict results to email activity events that occur after a specific time. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
733
- # @return [EmailActivity]
734
- def get_email_activity_for_subscriber(campaign_id = {}, subscriber_hash = {}, opts = {})
735
- data, _status_code, _headers = get_email_activity_for_subscriber_with_http_info(campaign_id, subscriber_hash, opts)
736
- data
737
- end
738
283
 
739
- # Get email activity for a specific subscriber
740
- # Get a specific list member&#39;s activity in a campaign including opens, clicks, and bounces.
741
- # @param campaign_id The unique id for the campaign.
742
- # @param subscriber_hash The MD5 hash of the lowercase version of the list member&#39;s email address.
743
- # @param [Hash] opts the optional parameters
744
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
745
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
746
- # @option opts [String] :since Restrict results to email activity events that occur after a specific time. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
747
- # @return [Array<(EmailActivity, Fixnum, Hash)>] EmailActivity data, response status code and response headers
748
- def get_email_activity_for_subscriber_with_http_info(campaign_id, subscriber_hash, opts = {})
749
- # resource path
750
- local_var_path = '/reports/{campaign_id}/email-activity/{subscriber_hash}'.sub('{' + 'campaign_id' + '}', campaign_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
284
+ # Get subscriber email activity
285
+ def get_email_activity_for_subscriber(campaign_id, subscriber_hash, opts = {})
286
+ fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
287
+ fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
751
288
 
752
- # query parameters
753
289
  query_params = {}
754
290
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
755
291
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
756
292
  query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
757
-
758
- # header parameters
759
- header_params = {}
760
- # HTTP header 'Accept' (if needed)
761
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
762
- # HTTP header 'Content-Type'
763
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
764
-
765
- # form parameters
766
293
  form_params = {}
767
-
768
- # http body (model)
769
294
  post_body = nil
770
- auth_names = ['basicAuth']
295
+
296
+ local_var_path = '/reports/{campaign_id}/email-activity/{subscriber_hash}'.sub('{' + 'campaign_id' + '}', campaign_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
771
297
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
772
- :header_params => header_params,
773
298
  :query_params => query_params,
774
299
  :form_params => form_params,
775
- :body => post_body,
776
- :auth_names => auth_names,
777
- :return_type => 'EmailActivity')
300
+ :body => post_body)
778
301
  return data, status_code, headers
779
302
  end
780
- # Get top open locations
781
- # Get top open locations for a specific campaign.
782
- # @param campaign_id The unique id for the campaign.
783
- # @param [Hash] opts the optional parameters
784
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
785
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
786
- # @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)
787
- # @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)
788
- # @return [OpenLocations]
789
- def get_locations_for_campaign(campaign_id = {}, opts = {})
790
- data, _status_code, _headers = get_locations_for_campaign_with_http_info(campaign_id, opts)
791
- data
792
- end
793
303
 
794
- # Get top open locations
795
- # Get top open locations for a specific campaign.
796
- # @param campaign_id The unique id for the campaign.
797
- # @param [Hash] opts the optional parameters
798
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
799
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
800
- # @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**
801
- # @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**.
802
- # @return [Array<(OpenLocations, Fixnum, Hash)>] OpenLocations data, response status code and response headers
803
- def get_locations_for_campaign_with_http_info(campaign_id, opts = {})
804
- # resource path
805
- local_var_path = '/reports/{campaign_id}/locations'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
304
+ # List top open activities
305
+ def get_locations_for_campaign(campaign_id, opts = {})
306
+ fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
307
+ fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
806
308
 
807
- # query parameters
808
309
  query_params = {}
809
310
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
810
311
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
811
312
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
812
313
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
813
-
814
- # header parameters
815
- header_params = {}
816
- # HTTP header 'Accept' (if needed)
817
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
818
- # HTTP header 'Content-Type'
819
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
820
-
821
- # form parameters
822
314
  form_params = {}
823
-
824
- # http body (model)
825
315
  post_body = nil
826
- auth_names = ['basicAuth']
316
+
317
+ local_var_path = '/reports/{campaign_id}/locations'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
827
318
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
828
- :header_params => header_params,
829
319
  :query_params => query_params,
830
320
  :form_params => form_params,
831
- :body => post_body,
832
- :auth_names => auth_names,
833
- :return_type => 'OpenLocations')
321
+ :body => post_body)
834
322
  return data, status_code, headers
835
323
  end
836
- # Get campaign Open details
837
- # Get detailed information about any campaign emails that were opened by a list member.
838
- # @param campaign_id The unique id for the campaign.
839
- # @param [Hash] opts the optional parameters
840
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
841
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
842
- # @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)
843
- # @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)
844
- # @option opts [String] :since Restrict results to campaign open events that occur after a specific time. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
845
- # @return [OpenDetailReport]
846
- def get_campaign_open_details(campaign_id = {}, opts = {})
847
- data, _status_code, _headers = get_campaign_open_details_with_http_info(campaign_id, opts)
848
- data
849
- end
850
324
 
851
- # Get campaign Open details
852
- # Get detailed information about any campaign emails that were opened by a list member.
853
- # @param campaign_id The unique id for the campaign.
854
- # @param [Hash] opts the optional parameters
855
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
856
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
857
- # @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**
858
- # @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**.
859
- # @option opts [String] :since Restrict results to campaign open events that occur after a specific time. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
860
- # @return [Array<(OpenDetailReport, Fixnum, Hash)>] OpenDetailReport data, response status code and response headers
861
- def get_campaign_open_details_with_http_info(campaign_id, opts = {})
862
- # resource path
863
- local_var_path = '/reports/{campaign_id}/open-details'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
325
+ # List campaign open details
326
+ def get_campaign_open_details(campaign_id, opts = {})
327
+ fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
328
+ fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
864
329
 
865
- # query parameters
866
330
  query_params = {}
867
331
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
868
332
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
869
333
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
870
334
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
871
335
  query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
872
-
873
- # header parameters
874
- header_params = {}
875
- # HTTP header 'Accept' (if needed)
876
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
877
- # HTTP header 'Content-Type'
878
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
879
-
880
- # form parameters
881
336
  form_params = {}
882
-
883
- # http body (model)
884
337
  post_body = nil
885
- auth_names = ['basicAuth']
338
+
339
+ local_var_path = '/reports/{campaign_id}/open-details'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
886
340
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
887
- :header_params => header_params,
888
341
  :query_params => query_params,
889
342
  :form_params => form_params,
890
- :body => post_body,
891
- :auth_names => auth_names,
892
- :return_type => 'OpenDetailReport')
343
+ :body => post_body)
893
344
  return data, status_code, headers
894
345
  end
895
- # Get information about a specific subscriber who opened a campaign
896
- # Get information about a specific subscriber who opened a campaign.
897
- # @param campaign_id The unique id for the campaign.
898
- # @param subscriber_hash The MD5 hash of the lowercase version of the list member&#39;s email address.
899
- # @param [Hash] opts the optional parameters
900
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
901
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
902
- # @return [OpenActivity]
903
- def get_subscriber_info_for_opened_campaign(campaign_id = {}, subscriber_hash = {}, opts = {})
904
- data, _status_code, _headers = get_subscriber_info_for_opened_campaign_with_http_info(campaign_id, subscriber_hash, opts)
905
- data
906
- end
907
346
 
908
- # Get information about a specific subscriber who opened a campaign
909
- # Get information about a specific subscriber who opened a campaign.
910
- # @param campaign_id The unique id for the campaign.
911
- # @param subscriber_hash The MD5 hash of the lowercase version of the list member&#39;s email address.
912
- # @param [Hash] opts the optional parameters
913
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
914
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
915
- # @return [Array<(OpenActivity, Fixnum, Hash)>] OpenActivity data, response status code and response headers
916
- def get_subscriber_info_for_opened_campaign_with_http_info(campaign_id, subscriber_hash, opts = {})
917
- # resource path
918
- local_var_path = '/reports/{campaign_id}/open-details/{subscriber_hash}'.sub('{' + 'campaign_id' + '}', campaign_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
347
+ # Get opened campaign subscriber
348
+ def get_subscriber_info_for_opened_campaign(campaign_id, subscriber_hash, opts = {})
349
+ fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
350
+ fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
919
351
 
920
- # query parameters
921
352
  query_params = {}
922
353
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
923
354
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
924
-
925
- # header parameters
926
- header_params = {}
927
- # HTTP header 'Accept' (if needed)
928
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
929
- # HTTP header 'Content-Type'
930
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
931
-
932
- # form parameters
933
355
  form_params = {}
934
-
935
- # http body (model)
936
356
  post_body = nil
937
- auth_names = ['basicAuth']
357
+
358
+ local_var_path = '/reports/{campaign_id}/open-details/{subscriber_hash}'.sub('{' + 'campaign_id' + '}', campaign_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
938
359
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
939
- :header_params => header_params,
940
360
  :query_params => query_params,
941
361
  :form_params => form_params,
942
- :body => post_body,
943
- :auth_names => auth_names,
944
- :return_type => 'OpenActivity')
362
+ :body => post_body)
945
363
  return data, status_code, headers
946
364
  end
947
- # Get information about campaign recipients
948
- # Get information about campaign recipients.
949
- # @param campaign_id The unique id for the campaign.
950
- # @param [Hash] opts the optional parameters
951
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
952
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
953
- # @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)
954
- # @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)
955
- # @return [SentTo]
956
- def get_campaign_recipients(campaign_id = {}, opts = {})
957
- data, _status_code, _headers = get_campaign_recipients_with_http_info(campaign_id, opts)
958
- data
959
- end
960
365
 
961
- # Get information about campaign recipients
962
- # Get information about campaign recipients.
963
- # @param campaign_id The unique id for the campaign.
964
- # @param [Hash] opts the optional parameters
965
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
966
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
967
- # @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**
968
- # @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**.
969
- # @return [Array<(SentTo, Fixnum, Hash)>] SentTo data, response status code and response headers
970
- def get_campaign_recipients_with_http_info(campaign_id, opts = {})
971
- # resource path
972
- local_var_path = '/reports/{campaign_id}/sent-to'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
366
+ # List campaign recipients
367
+ def get_campaign_recipients(campaign_id, opts = {})
368
+ fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
369
+ fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
973
370
 
974
- # query parameters
975
371
  query_params = {}
976
372
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
977
373
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
978
374
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
979
375
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
980
-
981
- # header parameters
982
- header_params = {}
983
- # HTTP header 'Accept' (if needed)
984
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
985
- # HTTP header 'Content-Type'
986
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
987
-
988
- # form parameters
989
376
  form_params = {}
990
-
991
- # http body (model)
992
377
  post_body = nil
993
- auth_names = ['basicAuth']
378
+
379
+ local_var_path = '/reports/{campaign_id}/sent-to'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
994
380
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
995
- :header_params => header_params,
996
381
  :query_params => query_params,
997
382
  :form_params => form_params,
998
- :body => post_body,
999
- :auth_names => auth_names,
1000
- :return_type => 'SentTo')
383
+ :body => post_body)
1001
384
  return data, status_code, headers
1002
385
  end
1003
- # Get information about a specific campaign recipient
1004
- # Get information about a specific campaign recipient.
1005
- # @param campaign_id The unique id for the campaign.
1006
- # @param subscriber_hash The MD5 hash of the lowercase version of the list member&#39;s email address.
1007
- # @param [Hash] opts the optional parameters
1008
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1009
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1010
- # @return [SentTo]
1011
- def get_campaign_recipient(campaign_id = {}, subscriber_hash = {}, opts = {})
1012
- data, _status_code, _headers = get_campaign_recipient_with_http_info(campaign_id, subscriber_hash, opts)
1013
- data
1014
- end
1015
386
 
1016
- # Get information about a specific campaign recipient
1017
- # Get information about a specific campaign recipient.
1018
- # @param campaign_id The unique id for the campaign.
1019
- # @param subscriber_hash The MD5 hash of the lowercase version of the list member&#39;s email address.
1020
- # @param [Hash] opts the optional parameters
1021
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1022
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1023
- # @return [Array<(SentTo, Fixnum, Hash)>] SentTo data, response status code and response headers
1024
- def get_campaign_recipient_with_http_info(campaign_id, subscriber_hash, opts = {})
1025
- # resource path
1026
- local_var_path = '/reports/{campaign_id}/sent-to/{subscriber_hash}'.sub('{' + 'campaign_id' + '}', campaign_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
387
+ # Get campaign recipient info
388
+ def get_campaign_recipient(campaign_id, subscriber_hash, opts = {})
389
+ fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
390
+ fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
1027
391
 
1028
- # query parameters
1029
392
  query_params = {}
1030
393
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1031
394
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
1032
-
1033
- # header parameters
1034
- header_params = {}
1035
- # HTTP header 'Accept' (if needed)
1036
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
1037
- # HTTP header 'Content-Type'
1038
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1039
-
1040
- # form parameters
1041
395
  form_params = {}
1042
-
1043
- # http body (model)
1044
396
  post_body = nil
1045
- auth_names = ['basicAuth']
397
+
398
+ local_var_path = '/reports/{campaign_id}/sent-to/{subscriber_hash}'.sub('{' + 'campaign_id' + '}', campaign_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
1046
399
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1047
- :header_params => header_params,
1048
400
  :query_params => query_params,
1049
401
  :form_params => form_params,
1050
- :body => post_body,
1051
- :auth_names => auth_names,
1052
- :return_type => 'SentTo')
402
+ :body => post_body)
1053
403
  return data, status_code, headers
1054
404
  end
1055
- # Get reports for child campaigns
1056
- # Get a list of reports with child campaigns for a specific parent campaign.
1057
- # @param campaign_id The unique id for the campaign.
1058
- # @param [Hash] opts the optional parameters
1059
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1060
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1061
- # @return [CampaignSubReports]
1062
- def get_sub_reports_for_campaign(campaign_id = {}, opts = {})
1063
- data, _status_code, _headers = get_sub_reports_for_campaign_with_http_info(campaign_id, opts)
1064
- data
1065
- end
1066
405
 
1067
- # Get reports for child campaigns
1068
- # Get a list of reports with child campaigns for a specific parent campaign.
1069
- # @param campaign_id The unique id for the campaign.
1070
- # @param [Hash] opts the optional parameters
1071
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1072
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1073
- # @return [Array<(CampaignSubReports, Fixnum, Hash)>] CampaignSubReports data, response status code and response headers
1074
- def get_sub_reports_for_campaign_with_http_info(campaign_id, opts = {})
1075
- # resource path
1076
- local_var_path = '/reports/{campaign_id}/sub-reports'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
406
+ # List child campaign reports
407
+ def get_sub_reports_for_campaign(campaign_id, opts = {})
408
+ fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
1077
409
 
1078
- # query parameters
1079
410
  query_params = {}
1080
411
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1081
412
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
1082
-
1083
- # header parameters
1084
- header_params = {}
1085
- # HTTP header 'Accept' (if needed)
1086
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
1087
- # HTTP header 'Content-Type'
1088
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1089
-
1090
- # form parameters
1091
413
  form_params = {}
1092
-
1093
- # http body (model)
1094
414
  post_body = nil
1095
- auth_names = ['basicAuth']
415
+
416
+ local_var_path = '/reports/{campaign_id}/sub-reports'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
1096
417
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1097
- :header_params => header_params,
1098
418
  :query_params => query_params,
1099
419
  :form_params => form_params,
1100
- :body => post_body,
1101
- :auth_names => auth_names,
1102
- :return_type => 'CampaignSubReports')
420
+ :body => post_body)
1103
421
  return data, status_code, headers
1104
422
  end
1105
- # Get unsubscribed list members
1106
- # Get information about members who have unsubscribed from a specific campaign.
1107
- # @param campaign_id The unique id for the campaign.
1108
- # @param [Hash] opts the optional parameters
1109
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1110
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1111
- # @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)
1112
- # @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)
1113
- # @return [Unsubscribes]
1114
- def get_unsubscribed_list_for_campaign(campaign_id = {}, opts = {})
1115
- data, _status_code, _headers = get_unsubscribed_list_for_campaign_with_http_info(campaign_id, opts)
1116
- data
1117
- end
1118
423
 
1119
- # Get unsubscribed list members
1120
- # Get information about members who have unsubscribed from a specific campaign.
1121
- # @param campaign_id The unique id for the campaign.
1122
- # @param [Hash] opts the optional parameters
1123
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1124
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1125
- # @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**
1126
- # @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**.
1127
- # @return [Array<(Unsubscribes, Fixnum, Hash)>] Unsubscribes data, response status code and response headers
1128
- def get_unsubscribed_list_for_campaign_with_http_info(campaign_id, opts = {})
1129
- # resource path
1130
- local_var_path = '/reports/{campaign_id}/unsubscribed'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
424
+ # List unsubscribed members
425
+ def get_unsubscribed_list_for_campaign(campaign_id, opts = {})
426
+ fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
427
+ fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
1131
428
 
1132
- # query parameters
1133
429
  query_params = {}
1134
430
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1135
431
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
1136
432
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
1137
433
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
1138
-
1139
- # header parameters
1140
- header_params = {}
1141
- # HTTP header 'Accept' (if needed)
1142
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
1143
- # HTTP header 'Content-Type'
1144
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1145
-
1146
- # form parameters
1147
434
  form_params = {}
1148
-
1149
- # http body (model)
1150
435
  post_body = nil
1151
- auth_names = ['basicAuth']
436
+
437
+ local_var_path = '/reports/{campaign_id}/unsubscribed'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
1152
438
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1153
- :header_params => header_params,
1154
439
  :query_params => query_params,
1155
440
  :form_params => form_params,
1156
- :body => post_body,
1157
- :auth_names => auth_names,
1158
- :return_type => 'Unsubscribes')
441
+ :body => post_body)
1159
442
  return data, status_code, headers
1160
443
  end
1161
- # Get information about a specific list member who unsubscribed
1162
- # Get information about a specific list member who unsubscribed from a campaign.
1163
- # @param campaign_id The unique id for the campaign.
1164
- # @param subscriber_hash The MD5 hash of the lowercase version of the list member&#39;s email address.
1165
- # @param [Hash] opts the optional parameters
1166
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1167
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1168
- # @return [Unsubscribes]
1169
- def get_unsubscribed_list_member(campaign_id = {}, subscriber_hash = {}, opts = {})
1170
- data, _status_code, _headers = get_unsubscribed_list_member_with_http_info(campaign_id, subscriber_hash, opts)
1171
- data
1172
- end
1173
444
 
1174
- # Get information about a specific list member who unsubscribed
1175
- # Get information about a specific list member who unsubscribed from a campaign.
1176
- # @param campaign_id The unique id for the campaign.
1177
- # @param subscriber_hash The MD5 hash of the lowercase version of the list member&#39;s email address.
1178
- # @param [Hash] opts the optional parameters
1179
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
1180
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
1181
- # @return [Array<(Unsubscribes, Fixnum, Hash)>] Unsubscribes data, response status code and response headers
1182
- def get_unsubscribed_list_member_with_http_info(campaign_id, subscriber_hash, opts = {})
1183
- # resource path
1184
- local_var_path = '/reports/{campaign_id}/unsubscribed/{subscriber_hash}'.sub('{' + 'campaign_id' + '}', campaign_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
445
+ # Get unsubscribed member
446
+ def get_unsubscribed_list_member(campaign_id, subscriber_hash, opts = {})
447
+ fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
448
+ fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
1185
449
 
1186
- # query parameters
1187
450
  query_params = {}
1188
451
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1189
452
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
1190
-
1191
- # header parameters
1192
- header_params = {}
1193
- # HTTP header 'Accept' (if needed)
1194
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
1195
- # HTTP header 'Content-Type'
1196
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1197
-
1198
- # form parameters
1199
453
  form_params = {}
1200
-
1201
- # http body (model)
1202
454
  post_body = nil
1203
- auth_names = ['basicAuth']
455
+
456
+ local_var_path = '/reports/{campaign_id}/unsubscribed/{subscriber_hash}'.sub('{' + 'campaign_id' + '}', campaign_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
1204
457
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1205
- :header_params => header_params,
1206
458
  :query_params => query_params,
1207
459
  :form_params => form_params,
1208
- :body => post_body,
1209
- :auth_names => auth_names,
1210
- :return_type => 'Unsubscribes')
460
+ :body => post_body)
1211
461
  return data, status_code, headers
1212
462
  end
1213
463
  end