MailchimpMarketing 3.0.12 → 3.0.80

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +62 -0
  3. data/MailchimpMarketing.gemspec +6 -6
  4. data/README.md +33 -29
  5. data/lib/MailchimpMarketing/api/account_export_api.rb +39 -0
  6. data/lib/MailchimpMarketing/api/{postcards_api.rb → account_exports_api.rb} +20 -7
  7. data/lib/MailchimpMarketing/api/activity_feed_api.rb +1 -14
  8. data/lib/MailchimpMarketing/api/authorized_apps_api.rb +1 -15
  9. data/lib/MailchimpMarketing/api/automations_api.rb +6 -18
  10. data/lib/MailchimpMarketing/api/batch_webhooks_api.rb +1 -1
  11. data/lib/MailchimpMarketing/api/batches_api.rb +1 -1
  12. data/lib/MailchimpMarketing/api/campaign_folders_api.rb +1 -1
  13. data/lib/MailchimpMarketing/api/campaigns_api.rb +1 -1
  14. data/lib/MailchimpMarketing/api/connected_sites_api.rb +1 -1
  15. data/lib/MailchimpMarketing/api/conversations_api.rb +1 -16
  16. data/lib/MailchimpMarketing/api/customer_journeys_api.rb +39 -0
  17. data/lib/MailchimpMarketing/api/ecommerce_api.rb +1 -16
  18. data/lib/MailchimpMarketing/api/facebook_ads_api.rb +1 -1
  19. data/lib/MailchimpMarketing/api/file_manager_api.rb +1 -14
  20. data/lib/MailchimpMarketing/api/landing_pages_api.rb +2 -1
  21. data/lib/MailchimpMarketing/api/lists_api.rb +64 -55
  22. data/lib/MailchimpMarketing/api/ping_api.rb +1 -1
  23. data/lib/MailchimpMarketing/api/reporting_api.rb +122 -14
  24. data/lib/MailchimpMarketing/api/reports_api.rb +2 -2
  25. data/lib/MailchimpMarketing/api/root_api.rb +1 -1
  26. data/lib/MailchimpMarketing/api/search_campaigns_api.rb +1 -1
  27. data/lib/MailchimpMarketing/api/search_members_api.rb +1 -1
  28. data/lib/MailchimpMarketing/api/surveys_api.rb +53 -0
  29. data/lib/MailchimpMarketing/api/template_folders_api.rb +1 -1
  30. data/lib/MailchimpMarketing/api/templates_api.rb +6 -4
  31. data/lib/MailchimpMarketing/api/verified_domains_api.rb +1 -1
  32. data/lib/MailchimpMarketing/api_client.rb +18 -5
  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. data/lib/MailchimpMarketing.rb +20 -15
  37. metadata +19 -11
  38. data/lib/MailchimpMarketing/api/dashboard_api.rb +0 -115
  39. data/lib/MailchimpMarketing/api/external_auths_api.rb +0 -71
@@ -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.12
6
+ OpenAPI spec version: 3.0.80
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
@@ -189,19 +189,6 @@ module MailchimpMarketing
189
189
  return data
190
190
  end
191
191
 
192
- # List e commerce api resources
193
- def info(opts = {})
194
-
195
- query_params = {}
196
- post_body = nil
197
-
198
- local_var_path = '/ecommerce'
199
- data = @api_client.call_api(:GET, local_var_path,
200
- :query_params => query_params,
201
- :body => post_body)
202
- return data
203
- end
204
-
205
192
  # List account orders
206
193
  def orders(opts = {})
207
194
  fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
@@ -450,13 +437,11 @@ module MailchimpMarketing
450
437
  # List product
451
438
  def get_all_store_products(store_id, opts = {})
452
439
  fail ArgumentError, "Missing required param: 'store_id'" if store_id.nil?
453
- fail ArgumentError, 'invalid value for "sort_field", must be one of title, created_at, price' if opts[:'sort_field'] && !['title', 'created_at', 'price'].include?(opts[:'sort_field'])
454
440
  fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
455
441
 
456
442
  query_params = {}
457
443
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
458
444
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
459
- query_params[:'sort_field'] = opts[:'sort_field'] if !opts[:'sort_field'].nil?
460
445
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
461
446
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
462
447
  post_body = nil
@@ -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.12
6
+ OpenAPI spec version: 3.0.80
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
@@ -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.12
6
+ OpenAPI spec version: 3.0.80
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
@@ -48,19 +48,6 @@ module MailchimpMarketing
48
48
  return data
49
49
  end
50
50
 
51
- # List file manager resources
52
- def get(opts = {})
53
-
54
- query_params = {}
55
- post_body = nil
56
-
57
- local_var_path = '/file-manager'
58
- data = @api_client.call_api(:GET, local_var_path,
59
- :query_params => query_params,
60
- :body => post_body)
61
- return data
62
- end
63
-
64
51
  # List stored files
65
52
  def files(opts = {})
66
53
  fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
@@ -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.12
6
+ OpenAPI spec version: 3.0.80
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
@@ -107,6 +107,7 @@ module MailchimpMarketing
107
107
  fail ArgumentError, "Missing required param: 'body'" if body.nil?
108
108
 
109
109
  query_params = {}
110
+ query_params[:'use_default_list'] = opts[:'use_default_list'] if !opts[:'use_default_list'].nil?
110
111
  post_body = @api_client.object_to_http_body(body)
111
112
 
112
113
  local_var_path = '/landing-pages'
@@ -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.12
6
+ OpenAPI spec version: 3.0.80
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
@@ -195,6 +195,8 @@ module MailchimpMarketing
195
195
  query_params[:'email'] = opts[:'email'] if !opts[:'email'].nil?
196
196
  query_params[:'sort_field'] = opts[:'sort_field'] if !opts[:'sort_field'].nil?
197
197
  query_params[:'sort_dir'] = opts[:'sort_dir'] if !opts[:'sort_dir'].nil?
198
+ query_params[:'has_ecommerce_store'] = opts[:'has_ecommerce_store'] if !opts[:'has_ecommerce_store'].nil?
199
+ query_params[:'include_total_contacts'] = opts[:'include_total_contacts'] if !opts[:'include_total_contacts'].nil?
198
200
  post_body = nil
199
201
 
200
202
  local_var_path = '/lists'
@@ -211,6 +213,7 @@ module MailchimpMarketing
211
213
  query_params = {}
212
214
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
213
215
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
216
+ query_params[:'include_total_contacts'] = opts[:'include_total_contacts'] if !opts[:'include_total_contacts'].nil?
214
217
  post_body = nil
215
218
 
216
219
  local_var_path = '/lists/{list_id}'.sub('{' + 'list_id' + '}', list_id.to_s)
@@ -262,8 +265,11 @@ module MailchimpMarketing
262
265
  # List recent activity
263
266
  def get_list_recent_activity(list_id, opts = {})
264
267
  fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
268
+ fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
265
269
 
266
270
  query_params = {}
271
+ query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
272
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
267
273
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
268
274
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
269
275
  post_body = nil
@@ -291,23 +297,6 @@ module MailchimpMarketing
291
297
  return data
292
298
  end
293
299
 
294
- # List external i ds
295
- def get_list_external_ids(list_id, opts = {})
296
- fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
297
- fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
298
-
299
- query_params = {}
300
- query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
301
- query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
302
- post_body = nil
303
-
304
- local_var_path = '/lists/{list_id}/external-ids'.sub('{' + 'list_id' + '}', list_id.to_s)
305
- data = @api_client.call_api(:GET, local_var_path,
306
- :query_params => query_params,
307
- :body => post_body)
308
- return data
309
- end
310
-
311
300
  # List growth history data
312
301
  def get_list_growth_history(list_id, opts = {})
313
302
  fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
@@ -512,7 +501,7 @@ module MailchimpMarketing
512
501
  return data
513
502
  end
514
503
 
515
- # View recent activity 10
504
+ # View recent activity
516
505
  def get_list_member_activity_feed(list_id, subscriber_hash, opts = {})
517
506
  fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
518
507
  fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
@@ -707,6 +696,35 @@ module MailchimpMarketing
707
696
  return data
708
697
  end
709
698
 
699
+ # Get information about all surveys for a list
700
+ def get_all_surveys_for_list(list_id, opts = {})
701
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
702
+
703
+ query_params = {}
704
+ post_body = nil
705
+
706
+ local_var_path = '/lists/{list_id}/surveys'.sub('{' + 'list_id' + '}', list_id.to_s)
707
+ data = @api_client.call_api(:GET, local_var_path,
708
+ :query_params => query_params,
709
+ :body => post_body)
710
+ return data
711
+ end
712
+
713
+ # Get survey
714
+ def get_survey(list_id, survey_id, opts = {})
715
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
716
+ fail ArgumentError, "Missing required param: 'survey_id'" if survey_id.nil?
717
+
718
+ query_params = {}
719
+ post_body = nil
720
+
721
+ local_var_path = '/lists/{list_id}/surveys/{survey_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'survey_id' + '}', survey_id.to_s)
722
+ data = @api_client.call_api(:GET, local_var_path,
723
+ :query_params => query_params,
724
+ :body => post_body)
725
+ return data
726
+ end
727
+
710
728
  # List webhooks
711
729
  def get_list_webhooks(list_id, opts = {})
712
730
  fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
@@ -768,13 +786,14 @@ module MailchimpMarketing
768
786
  end
769
787
 
770
788
  # Update interest in category
771
- def update_interest_category_interest(list_id, interest_category_id, interest_id, opts = {})
789
+ def update_interest_category_interest(list_id, interest_category_id, interest_id, body, opts = {})
772
790
  fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
773
791
  fail ArgumentError, "Missing required param: 'interest_category_id'" if interest_category_id.nil?
774
792
  fail ArgumentError, "Missing required param: 'interest_id'" if interest_id.nil?
793
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
775
794
 
776
795
  query_params = {}
777
- post_body = @api_client.object_to_http_body(opts[:'body'])
796
+ post_body = @api_client.object_to_http_body(body)
778
797
 
779
798
  local_var_path = '/lists/{list_id}/interest-categories/{interest_category_id}/interests/{interest_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'interest_category_id' + '}', interest_category_id.to_s).sub('{' + 'interest_id' + '}', interest_id.to_s)
780
799
  data = @api_client.call_api(:PATCH, local_var_path,
@@ -801,13 +820,14 @@ module MailchimpMarketing
801
820
  end
802
821
 
803
822
  # Update note
804
- def update_list_member_note(list_id, subscriber_hash, note_id, opts = {})
823
+ def update_list_member_note(list_id, subscriber_hash, note_id, body, opts = {})
805
824
  fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
806
825
  fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
807
826
  fail ArgumentError, "Missing required param: 'note_id'" if note_id.nil?
827
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
808
828
 
809
829
  query_params = {}
810
- post_body = @api_client.object_to_http_body(opts[:'body'])
830
+ post_body = @api_client.object_to_http_body(body)
811
831
 
812
832
  local_var_path = '/lists/{list_id}/members/{subscriber_hash}/notes/{note_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s).sub('{' + 'note_id' + '}', note_id.to_s)
813
833
  data = @api_client.call_api(:PATCH, local_var_path,
@@ -881,12 +901,13 @@ module MailchimpMarketing
881
901
  end
882
902
 
883
903
  # Add or remove member tags
884
- def update_list_member_tags(list_id, subscriber_hash, opts = {})
904
+ def update_list_member_tags(list_id, subscriber_hash, body, opts = {})
885
905
  fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
886
906
  fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
907
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
887
908
 
888
909
  query_params = {}
889
- post_body = @api_client.object_to_http_body(opts[:'body'])
910
+ post_body = @api_client.object_to_http_body(body)
890
911
 
891
912
  local_var_path = '/lists/{list_id}/members/{subscriber_hash}/tags'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
892
913
  data = @api_client.call_api(:POST, local_var_path,
@@ -909,7 +930,7 @@ module MailchimpMarketing
909
930
  return data
910
931
  end
911
932
 
912
- # Batch subscribe or unsubscibe
933
+ # Batch subscribe or unsubscribe
913
934
  def batch_list_members(list_id, body, opts = {})
914
935
  fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
915
936
  fail ArgumentError, "Missing required param: 'body'" if body.nil?
@@ -926,20 +947,6 @@ module MailchimpMarketing
926
947
  return data
927
948
  end
928
949
 
929
- # Add external id
930
- def create_list_external_id(list_id, opts = {})
931
- fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
932
-
933
- query_params = {}
934
- post_body = @api_client.object_to_http_body(opts[:'body'])
935
-
936
- local_var_path = '/lists/{list_id}/external-ids'.sub('{' + 'list_id' + '}', list_id.to_s)
937
- data = @api_client.call_api(:POST, local_var_path,
938
- :query_params => query_params,
939
- :body => post_body)
940
- return data
941
- end
942
-
943
950
  # Add interest category
944
951
  def create_list_interest_category(list_id, body, opts = {})
945
952
  fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
@@ -1003,12 +1010,13 @@ module MailchimpMarketing
1003
1010
  end
1004
1011
 
1005
1012
  # Add member note
1006
- def create_list_member_note(list_id, subscriber_hash, opts = {})
1013
+ def create_list_member_note(list_id, subscriber_hash, body, opts = {})
1007
1014
  fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
1008
1015
  fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
1016
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
1009
1017
 
1010
1018
  query_params = {}
1011
- post_body = @api_client.object_to_http_body(opts[:'body'])
1019
+ post_body = @api_client.object_to_http_body(body)
1012
1020
 
1013
1021
  local_var_path = '/lists/{list_id}/members/{subscriber_hash}/notes'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
1014
1022
  data = @api_client.call_api(:POST, local_var_path,
@@ -1136,32 +1144,33 @@ module MailchimpMarketing
1136
1144
  return data
1137
1145
  end
1138
1146
 
1139
- # Preview segment
1140
- def preview_segment(list_id, opts = {})
1147
+ # Add or update list member
1148
+ def set_list_member(list_id, subscriber_hash, body, opts = {})
1141
1149
  fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
1150
+ fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
1151
+ fail ArgumentError, "Missing required param: 'body'" if body.nil?
1142
1152
 
1143
1153
  query_params = {}
1144
- post_body = @api_client.object_to_http_body(opts[:'body'])
1154
+ query_params[:'skip_merge_validation'] = opts[:'skip_merge_validation'] if !opts[:'skip_merge_validation'].nil?
1155
+ post_body = @api_client.object_to_http_body(body)
1145
1156
 
1146
- local_var_path = '/lists/{list_id}/preview-segment'.sub('{' + 'list_id' + '}', list_id.to_s)
1147
- data = @api_client.call_api(:POST, local_var_path,
1157
+ local_var_path = '/lists/{list_id}/members/{subscriber_hash}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
1158
+ data = @api_client.call_api(:PUT, local_var_path,
1148
1159
  :query_params => query_params,
1149
1160
  :body => post_body)
1150
1161
  return data
1151
1162
  end
1152
1163
 
1153
- # Add or update list member
1154
- def set_list_member(list_id, subscriber_hash, body, opts = {})
1164
+ # Search for tags on a list by name.
1165
+ def tag_search(list_id, opts = {})
1155
1166
  fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
1156
- fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
1157
- fail ArgumentError, "Missing required param: 'body'" if body.nil?
1158
1167
 
1159
1168
  query_params = {}
1160
- query_params[:'skip_merge_validation'] = opts[:'skip_merge_validation'] if !opts[:'skip_merge_validation'].nil?
1161
- post_body = @api_client.object_to_http_body(body)
1169
+ query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
1170
+ post_body = nil
1162
1171
 
1163
- local_var_path = '/lists/{list_id}/members/{subscriber_hash}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
1164
- data = @api_client.call_api(:PUT, local_var_path,
1172
+ local_var_path = '/lists/{list_id}/tag-search'.sub('{' + 'list_id' + '}', list_id.to_s)
1173
+ data = @api_client.call_api(:GET, local_var_path,
1165
1174
  :query_params => query_params,
1166
1175
  :body => post_body)
1167
1176
  return data
@@ -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.12
6
+ OpenAPI spec version: 3.0.80
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
@@ -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.12
6
+ OpenAPI spec version: 3.0.80
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
@@ -20,19 +20,6 @@ module MailchimpMarketing
20
20
  @api_client = api_client
21
21
  end
22
22
 
23
- # List reporting resources
24
- def info(opts = {})
25
-
26
- query_params = {}
27
- post_body = nil
28
-
29
- local_var_path = '/reporting'
30
- data = @api_client.call_api(:GET, local_var_path,
31
- :query_params => query_params,
32
- :body => post_body)
33
- return data
34
- end
35
-
36
23
  # List facebook ads reports
37
24
  def get_facebook_ads_report_all(opts = {})
38
25
  fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
@@ -125,5 +112,126 @@ module MailchimpMarketing
125
112
  :body => post_body)
126
113
  return data
127
114
  end
115
+
116
+ # List survey reports
117
+ def get_survey_reports_all(opts = {})
118
+ fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
119
+
120
+ query_params = {}
121
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
122
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
123
+ query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
124
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
125
+ post_body = nil
126
+
127
+ local_var_path = '/reporting/surveys'
128
+ data = @api_client.call_api(:GET, local_var_path,
129
+ :query_params => query_params,
130
+ :body => post_body)
131
+ return data
132
+ end
133
+
134
+ # Get survey report
135
+ def get_survey_report(outreach_id, opts = {})
136
+ fail ArgumentError, "Missing required param: 'outreach_id'" if outreach_id.nil?
137
+
138
+ query_params = {}
139
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
140
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
141
+ post_body = nil
142
+
143
+ local_var_path = '/reporting/surveys/{outreach_id}'.sub('{' + 'outreach_id' + '}', outreach_id.to_s)
144
+ data = @api_client.call_api(:GET, local_var_path,
145
+ :query_params => query_params,
146
+ :body => post_body)
147
+ return data
148
+ end
149
+
150
+ # List survey question reports
151
+ def get_survey_question_reports_all(outreach_id, opts = {})
152
+ fail ArgumentError, "Missing required param: 'outreach_id'" if outreach_id.nil?
153
+
154
+ query_params = {}
155
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
156
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
157
+ post_body = nil
158
+
159
+ local_var_path = '/reporting/surveys/{outreach_id}/questions'.sub('{' + 'outreach_id' + '}', outreach_id.to_s)
160
+ data = @api_client.call_api(:GET, local_var_path,
161
+ :query_params => query_params,
162
+ :body => post_body)
163
+ return data
164
+ end
165
+
166
+ # Get survey question report
167
+ def get_survey_question_report(outreach_id, question_id, opts = {})
168
+ fail ArgumentError, "Missing required param: 'outreach_id'" if outreach_id.nil?
169
+ fail ArgumentError, "Missing required param: 'question_id'" if question_id.nil?
170
+
171
+ query_params = {}
172
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
173
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
174
+ post_body = nil
175
+
176
+ local_var_path = '/reporting/surveys/{outreach_id}/questions/{question_id}'.sub('{' + 'outreach_id' + '}', outreach_id.to_s).sub('{' + 'question_id' + '}', question_id.to_s)
177
+ data = @api_client.call_api(:GET, local_var_path,
178
+ :query_params => query_params,
179
+ :body => post_body)
180
+ return data
181
+ end
182
+
183
+ # List answers for question
184
+ def get_survey_question_answers(outreach_id, question_id, opts = {})
185
+ fail ArgumentError, "Missing required param: 'outreach_id'" if outreach_id.nil?
186
+ fail ArgumentError, "Missing required param: 'question_id'" if question_id.nil?
187
+ fail ArgumentError, 'invalid value for "respondent_familiarity_is", must be one of new, known, unknown' if opts[:'respondent_familiarity_is'] && !['new', 'known', 'unknown'].include?(opts[:'respondent_familiarity_is'])
188
+
189
+ query_params = {}
190
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
191
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
192
+ query_params[:'respondent_familiarity_is'] = opts[:'respondent_familiarity_is'] if !opts[:'respondent_familiarity_is'].nil?
193
+ post_body = nil
194
+
195
+ local_var_path = '/reporting/surveys/{outreach_id}/questions/{question_id}/answers'.sub('{' + 'outreach_id' + '}', outreach_id.to_s).sub('{' + 'question_id' + '}', question_id.to_s)
196
+ data = @api_client.call_api(:GET, local_var_path,
197
+ :query_params => query_params,
198
+ :body => post_body)
199
+ return data
200
+ end
201
+
202
+ # List survey responses
203
+ def get_survey_responses_all(outreach_id, opts = {})
204
+ fail ArgumentError, "Missing required param: 'outreach_id'" if outreach_id.nil?
205
+ fail ArgumentError, 'invalid value for "respondent_familiarity_is", must be one of new, known, unknown' if opts[:'respondent_familiarity_is'] && !['new', 'known', 'unknown'].include?(opts[:'respondent_familiarity_is'])
206
+
207
+ query_params = {}
208
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
209
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
210
+ query_params[:'answered_question'] = opts[:'answered_question'] if !opts[:'answered_question'].nil?
211
+ query_params[:'chose_answer'] = opts[:'chose_answer'] if !opts[:'chose_answer'].nil?
212
+ query_params[:'respondent_familiarity_is'] = opts[:'respondent_familiarity_is'] if !opts[:'respondent_familiarity_is'].nil?
213
+ post_body = nil
214
+
215
+ local_var_path = '/reporting/surveys/{outreach_id}/responses'.sub('{' + 'outreach_id' + '}', outreach_id.to_s)
216
+ data = @api_client.call_api(:GET, local_var_path,
217
+ :query_params => query_params,
218
+ :body => post_body)
219
+ return data
220
+ end
221
+
222
+ # Get survey response
223
+ def get_survey_response(outreach_id, response_id, opts = {})
224
+ fail ArgumentError, "Missing required param: 'outreach_id'" if outreach_id.nil?
225
+ fail ArgumentError, "Missing required param: 'response_id'" if response_id.nil?
226
+
227
+ query_params = {}
228
+ post_body = nil
229
+
230
+ local_var_path = '/reporting/surveys/{outreach_id}/responses/{response_id}'.sub('{' + 'outreach_id' + '}', outreach_id.to_s).sub('{' + 'response_id' + '}', response_id.to_s)
231
+ data = @api_client.call_api(:GET, local_var_path,
232
+ :query_params => query_params,
233
+ :body => post_body)
234
+ return data
235
+ end
128
236
  end
129
237
  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.12
6
+ OpenAPI spec version: 3.0.80
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
@@ -218,7 +218,7 @@ module MailchimpMarketing
218
218
  return data
219
219
  end
220
220
 
221
- # List eep url activity
221
+ # List EepURL activity
222
222
  def get_eepurl_activity_for_campaign(campaign_id, opts = {})
223
223
  fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
224
224
 
@@ -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.12
6
+ OpenAPI spec version: 3.0.80
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
@@ -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.12
6
+ OpenAPI spec version: 3.0.80
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
@@ -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.12
6
+ OpenAPI spec version: 3.0.80
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
@@ -0,0 +1,53 @@
1
+ =begin
2
+ #Mailchimp Marketing API
3
+
4
+ #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
+
6
+ OpenAPI spec version: 3.0.80
7
+ Contact: apihelp@mailchimp.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.12
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module MailchimpMarketing
16
+ class SurveysApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client)
20
+ @api_client = api_client
21
+ end
22
+
23
+ # Publish a Survey
24
+ def publish_survey(list_id, survey_id, opts = {})
25
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
26
+ fail ArgumentError, "Missing required param: 'survey_id'" if survey_id.nil?
27
+
28
+ query_params = {}
29
+ post_body = nil
30
+
31
+ local_var_path = '/lists/{list_id}/surveys/{survey_id}/actions/publish'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'survey_id' + '}', survey_id.to_s)
32
+ data = @api_client.call_api(:POST, local_var_path,
33
+ :query_params => query_params,
34
+ :body => post_body)
35
+ return data
36
+ end
37
+
38
+ # Unpublish a Survey
39
+ def unpublish_survey(list_id, survey_id, opts = {})
40
+ fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
41
+ fail ArgumentError, "Missing required param: 'survey_id'" if survey_id.nil?
42
+
43
+ query_params = {}
44
+ post_body = nil
45
+
46
+ local_var_path = '/lists/{list_id}/surveys/{survey_id}/actions/unpublish'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'survey_id' + '}', survey_id.to_s)
47
+ data = @api_client.call_api(:POST, local_var_path,
48
+ :query_params => query_params,
49
+ :body => post_body)
50
+ return data
51
+ end
52
+ end
53
+ 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.12
6
+ OpenAPI spec version: 3.0.80
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