MailchimpMarketing 3.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +7 -0
- data/MailchimpMarketing.gemspec +45 -0
- data/README.md +378 -0
- data/lib/MailchimpMarketing.rb +162 -0
- data/lib/MailchimpMarketing/api/activity_feed_api.rb +57 -0
- data/lib/MailchimpMarketing/api/authorized_apps_api.rb +78 -0
- data/lib/MailchimpMarketing/api/automations_api.rb +351 -0
- data/lib/MailchimpMarketing/api/batch_webhooks_api.rb +111 -0
- data/lib/MailchimpMarketing/api/batches_api.rb +94 -0
- data/lib/MailchimpMarketing/api/campaign_folders_api.rb +111 -0
- data/lib/MailchimpMarketing/api/campaigns_api.rb +414 -0
- data/lib/MailchimpMarketing/api/connected_sites_api.rb +110 -0
- data/lib/MailchimpMarketing/api/conversations_api.rb +124 -0
- data/lib/MailchimpMarketing/api/dashboard_api.rb +128 -0
- data/lib/MailchimpMarketing/api/ecommerce_api.rb +1139 -0
- data/lib/MailchimpMarketing/api/external_auths_api.rb +78 -0
- data/lib/MailchimpMarketing/api/facebook_ads_api.rb +66 -0
- data/lib/MailchimpMarketing/api/file_manager_api.rb +224 -0
- data/lib/MailchimpMarketing/api/landing_pages_api.rb +164 -0
- data/lib/MailchimpMarketing/api/lists_api.rb +1302 -0
- data/lib/MailchimpMarketing/api/ping_api.rb +39 -0
- data/lib/MailchimpMarketing/api/postcards_api.rb +45 -0
- data/lib/MailchimpMarketing/api/reporting_api.rb +142 -0
- data/lib/MailchimpMarketing/api/reports_api.rb +464 -0
- data/lib/MailchimpMarketing/api/root_api.rb +41 -0
- data/lib/MailchimpMarketing/api/search_campaigns_api.rb +43 -0
- data/lib/MailchimpMarketing/api/search_members_api.rb +44 -0
- data/lib/MailchimpMarketing/api/template_folders_api.rb +111 -0
- data/lib/MailchimpMarketing/api/templates_api.rb +137 -0
- data/lib/MailchimpMarketing/api/verified_domains_api.rb +104 -0
- data/lib/MailchimpMarketing/api_client.rb +214 -0
- data/lib/MailchimpMarketing/api_error.rb +38 -0
- data/lib/MailchimpMarketing/configuration.rb +209 -0
- data/lib/MailchimpMarketing/version.rb +15 -0
- metadata +257 -0
@@ -0,0 +1,1302 @@
|
|
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.7
|
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
|
+
require 'json'
|
15
|
+
|
16
|
+
module MailchimpMarketing
|
17
|
+
class ListsApi
|
18
|
+
attr_accessor :api_client
|
19
|
+
|
20
|
+
def initialize(api_client)
|
21
|
+
@api_client = api_client
|
22
|
+
end
|
23
|
+
|
24
|
+
# Delete list
|
25
|
+
def delete_list(list_id, opts = {})
|
26
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
27
|
+
|
28
|
+
query_params = {}
|
29
|
+
form_params = {}
|
30
|
+
post_body = nil
|
31
|
+
|
32
|
+
local_var_path = '/lists/{list_id}'.sub('{' + 'list_id' + '}', list_id.to_s)
|
33
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
34
|
+
:query_params => query_params,
|
35
|
+
:form_params => form_params,
|
36
|
+
:body => post_body)
|
37
|
+
return data, status_code, headers
|
38
|
+
end
|
39
|
+
|
40
|
+
# Delete interest category
|
41
|
+
def delete_interest_category(list_id, interest_category_id, opts = {})
|
42
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
43
|
+
fail ArgumentError, "Missing required param: 'interest_category_id'" if interest_category_id.nil?
|
44
|
+
|
45
|
+
query_params = {}
|
46
|
+
form_params = {}
|
47
|
+
post_body = nil
|
48
|
+
|
49
|
+
local_var_path = '/lists/{list_id}/interest-categories/{interest_category_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'interest_category_id' + '}', interest_category_id.to_s)
|
50
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
51
|
+
:query_params => query_params,
|
52
|
+
:form_params => form_params,
|
53
|
+
:body => post_body)
|
54
|
+
return data, status_code, headers
|
55
|
+
end
|
56
|
+
|
57
|
+
# Delete interest in category
|
58
|
+
def delete_interest_category_interest(list_id, interest_category_id, interest_id, opts = {})
|
59
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
60
|
+
fail ArgumentError, "Missing required param: 'interest_category_id'" if interest_category_id.nil?
|
61
|
+
fail ArgumentError, "Missing required param: 'interest_id'" if interest_id.nil?
|
62
|
+
|
63
|
+
query_params = {}
|
64
|
+
form_params = {}
|
65
|
+
post_body = nil
|
66
|
+
|
67
|
+
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)
|
68
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
69
|
+
:query_params => query_params,
|
70
|
+
:form_params => form_params,
|
71
|
+
:body => post_body)
|
72
|
+
return data, status_code, headers
|
73
|
+
end
|
74
|
+
|
75
|
+
# Archive list member
|
76
|
+
def delete_list_member(list_id, subscriber_hash, opts = {})
|
77
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
78
|
+
fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
|
79
|
+
|
80
|
+
query_params = {}
|
81
|
+
form_params = {}
|
82
|
+
post_body = nil
|
83
|
+
|
84
|
+
local_var_path = '/lists/{list_id}/members/{subscriber_hash}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
|
85
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
86
|
+
:query_params => query_params,
|
87
|
+
:form_params => form_params,
|
88
|
+
:body => post_body)
|
89
|
+
return data, status_code, headers
|
90
|
+
end
|
91
|
+
|
92
|
+
# Delete note
|
93
|
+
def delete_list_member_note(list_id, subscriber_hash, note_id, opts = {})
|
94
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
95
|
+
fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
|
96
|
+
fail ArgumentError, "Missing required param: 'note_id'" if note_id.nil?
|
97
|
+
|
98
|
+
query_params = {}
|
99
|
+
form_params = {}
|
100
|
+
post_body = nil
|
101
|
+
|
102
|
+
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)
|
103
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
104
|
+
:query_params => query_params,
|
105
|
+
:form_params => form_params,
|
106
|
+
:body => post_body)
|
107
|
+
return data, status_code, headers
|
108
|
+
end
|
109
|
+
|
110
|
+
# Delete merge field
|
111
|
+
def delete_list_merge_field(list_id, merge_id, opts = {})
|
112
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
113
|
+
fail ArgumentError, "Missing required param: 'merge_id'" if merge_id.nil?
|
114
|
+
|
115
|
+
query_params = {}
|
116
|
+
form_params = {}
|
117
|
+
post_body = nil
|
118
|
+
|
119
|
+
local_var_path = '/lists/{list_id}/merge-fields/{merge_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'merge_id' + '}', merge_id.to_s)
|
120
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
121
|
+
:query_params => query_params,
|
122
|
+
:form_params => form_params,
|
123
|
+
:body => post_body)
|
124
|
+
return data, status_code, headers
|
125
|
+
end
|
126
|
+
|
127
|
+
# Delete segment
|
128
|
+
def delete_segment(list_id, segment_id, opts = {})
|
129
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
130
|
+
fail ArgumentError, "Missing required param: 'segment_id'" if segment_id.nil?
|
131
|
+
|
132
|
+
query_params = {}
|
133
|
+
form_params = {}
|
134
|
+
post_body = nil
|
135
|
+
|
136
|
+
local_var_path = '/lists/{list_id}/segments/{segment_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'segment_id' + '}', segment_id.to_s)
|
137
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
138
|
+
:query_params => query_params,
|
139
|
+
:form_params => form_params,
|
140
|
+
:body => post_body)
|
141
|
+
return data, status_code, headers
|
142
|
+
end
|
143
|
+
|
144
|
+
# Remove list member from segment
|
145
|
+
def remove_segment_member(list_id, segment_id, subscriber_hash, opts = {})
|
146
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
147
|
+
fail ArgumentError, "Missing required param: 'segment_id'" if segment_id.nil?
|
148
|
+
fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
|
149
|
+
|
150
|
+
query_params = {}
|
151
|
+
form_params = {}
|
152
|
+
post_body = nil
|
153
|
+
|
154
|
+
local_var_path = '/lists/{list_id}/segments/{segment_id}/members/{subscriber_hash}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'segment_id' + '}', segment_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
|
155
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
156
|
+
:query_params => query_params,
|
157
|
+
:form_params => form_params,
|
158
|
+
:body => post_body)
|
159
|
+
return data, status_code, headers
|
160
|
+
end
|
161
|
+
|
162
|
+
# Delete webhook
|
163
|
+
def delete_list_webhook(list_id, webhook_id, opts = {})
|
164
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
165
|
+
fail ArgumentError, "Missing required param: 'webhook_id'" if webhook_id.nil?
|
166
|
+
|
167
|
+
query_params = {}
|
168
|
+
form_params = {}
|
169
|
+
post_body = nil
|
170
|
+
|
171
|
+
local_var_path = '/lists/{list_id}/webhooks/{webhook_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'webhook_id' + '}', webhook_id.to_s)
|
172
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
173
|
+
:query_params => query_params,
|
174
|
+
:form_params => form_params,
|
175
|
+
:body => post_body)
|
176
|
+
return data, status_code, headers
|
177
|
+
end
|
178
|
+
|
179
|
+
# List member tags
|
180
|
+
def get_list_member_tags(list_id, subscriber_hash, opts = {})
|
181
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
182
|
+
fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
|
183
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
184
|
+
|
185
|
+
query_params = {}
|
186
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
187
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
188
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
189
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
190
|
+
form_params = {}
|
191
|
+
post_body = nil
|
192
|
+
|
193
|
+
local_var_path = '/lists/{list_id}/members/{subscriber_hash}/tags'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
|
194
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
195
|
+
:query_params => query_params,
|
196
|
+
:form_params => form_params,
|
197
|
+
:body => post_body)
|
198
|
+
return data, status_code, headers
|
199
|
+
end
|
200
|
+
|
201
|
+
# Get lists info
|
202
|
+
def get_all_lists(opts = {})
|
203
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
204
|
+
fail ArgumentError, 'invalid value for "sort_field", must be one of date_created' if opts[:'sort_field'] && !['date_created'].include?(opts[:'sort_field'])
|
205
|
+
fail ArgumentError, 'invalid value for "sort_dir", must be one of ASC, DESC' if opts[:'sort_dir'] && !['ASC', 'DESC'].include?(opts[:'sort_dir'])
|
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[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
211
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
212
|
+
query_params[:'before_date_created'] = opts[:'before_date_created'] if !opts[:'before_date_created'].nil?
|
213
|
+
query_params[:'since_date_created'] = opts[:'since_date_created'] if !opts[:'since_date_created'].nil?
|
214
|
+
query_params[:'before_campaign_last_sent'] = opts[:'before_campaign_last_sent'] if !opts[:'before_campaign_last_sent'].nil?
|
215
|
+
query_params[:'since_campaign_last_sent'] = opts[:'since_campaign_last_sent'] if !opts[:'since_campaign_last_sent'].nil?
|
216
|
+
query_params[:'email'] = opts[:'email'] if !opts[:'email'].nil?
|
217
|
+
query_params[:'sort_field'] = opts[:'sort_field'] if !opts[:'sort_field'].nil?
|
218
|
+
query_params[:'sort_dir'] = opts[:'sort_dir'] if !opts[:'sort_dir'].nil?
|
219
|
+
form_params = {}
|
220
|
+
post_body = nil
|
221
|
+
|
222
|
+
local_var_path = '/lists'
|
223
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
224
|
+
:query_params => query_params,
|
225
|
+
:form_params => form_params,
|
226
|
+
:body => post_body)
|
227
|
+
return data, status_code, headers
|
228
|
+
end
|
229
|
+
|
230
|
+
# Get list info
|
231
|
+
def get_list(list_id, opts = {})
|
232
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
233
|
+
|
234
|
+
query_params = {}
|
235
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
236
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
237
|
+
form_params = {}
|
238
|
+
post_body = nil
|
239
|
+
|
240
|
+
local_var_path = '/lists/{list_id}'.sub('{' + 'list_id' + '}', list_id.to_s)
|
241
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
242
|
+
:query_params => query_params,
|
243
|
+
:form_params => form_params,
|
244
|
+
:body => post_body)
|
245
|
+
return data, status_code, headers
|
246
|
+
end
|
247
|
+
|
248
|
+
# List abuse reports
|
249
|
+
def get_list_abuse_reports(list_id, opts = {})
|
250
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
251
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
252
|
+
|
253
|
+
query_params = {}
|
254
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
255
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
256
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
257
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
258
|
+
form_params = {}
|
259
|
+
post_body = nil
|
260
|
+
|
261
|
+
local_var_path = '/lists/{list_id}/abuse-reports'.sub('{' + 'list_id' + '}', list_id.to_s)
|
262
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
263
|
+
:query_params => query_params,
|
264
|
+
:form_params => form_params,
|
265
|
+
:body => post_body)
|
266
|
+
return data, status_code, headers
|
267
|
+
end
|
268
|
+
|
269
|
+
# Get abuse report
|
270
|
+
def get_list_abuse_report_details(list_id, report_id, opts = {})
|
271
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
272
|
+
fail ArgumentError, "Missing required param: 'report_id'" if report_id.nil?
|
273
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
274
|
+
|
275
|
+
query_params = {}
|
276
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
277
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
278
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
279
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
280
|
+
form_params = {}
|
281
|
+
post_body = nil
|
282
|
+
|
283
|
+
local_var_path = '/lists/{list_id}/abuse-reports/{report_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'report_id' + '}', report_id.to_s)
|
284
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
285
|
+
:query_params => query_params,
|
286
|
+
:form_params => form_params,
|
287
|
+
:body => post_body)
|
288
|
+
return data, status_code, headers
|
289
|
+
end
|
290
|
+
|
291
|
+
# List recent activity
|
292
|
+
def get_list_recent_activity(list_id, opts = {})
|
293
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
294
|
+
|
295
|
+
query_params = {}
|
296
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
297
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
298
|
+
form_params = {}
|
299
|
+
post_body = nil
|
300
|
+
|
301
|
+
local_var_path = '/lists/{list_id}/activity'.sub('{' + 'list_id' + '}', list_id.to_s)
|
302
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
303
|
+
:query_params => query_params,
|
304
|
+
:form_params => form_params,
|
305
|
+
:body => post_body)
|
306
|
+
return data, status_code, headers
|
307
|
+
end
|
308
|
+
|
309
|
+
# List top email clients
|
310
|
+
def get_list_clients(list_id, opts = {})
|
311
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
312
|
+
|
313
|
+
query_params = {}
|
314
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
315
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
316
|
+
form_params = {}
|
317
|
+
post_body = nil
|
318
|
+
|
319
|
+
local_var_path = '/lists/{list_id}/clients'.sub('{' + 'list_id' + '}', list_id.to_s)
|
320
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
321
|
+
:query_params => query_params,
|
322
|
+
:form_params => form_params,
|
323
|
+
:body => post_body)
|
324
|
+
return data, status_code, headers
|
325
|
+
end
|
326
|
+
|
327
|
+
# List external i ds
|
328
|
+
def get_list_external_ids(list_id, opts = {})
|
329
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
330
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
331
|
+
|
332
|
+
query_params = {}
|
333
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
334
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
335
|
+
form_params = {}
|
336
|
+
post_body = nil
|
337
|
+
|
338
|
+
local_var_path = '/lists/{list_id}/external-ids'.sub('{' + 'list_id' + '}', list_id.to_s)
|
339
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
340
|
+
:query_params => query_params,
|
341
|
+
:form_params => form_params,
|
342
|
+
:body => post_body)
|
343
|
+
return data, status_code, headers
|
344
|
+
end
|
345
|
+
|
346
|
+
# List growth history data
|
347
|
+
def get_list_growth_history(list_id, opts = {})
|
348
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
349
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
350
|
+
fail ArgumentError, 'invalid value for "sort_field", must be one of month' if opts[:'sort_field'] && !['month'].include?(opts[:'sort_field'])
|
351
|
+
fail ArgumentError, 'invalid value for "sort_dir", must be one of ASC, DESC' if opts[:'sort_dir'] && !['ASC', 'DESC'].include?(opts[:'sort_dir'])
|
352
|
+
|
353
|
+
query_params = {}
|
354
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
355
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
356
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
357
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
358
|
+
query_params[:'sort_field'] = opts[:'sort_field'] if !opts[:'sort_field'].nil?
|
359
|
+
query_params[:'sort_dir'] = opts[:'sort_dir'] if !opts[:'sort_dir'].nil?
|
360
|
+
form_params = {}
|
361
|
+
post_body = nil
|
362
|
+
|
363
|
+
local_var_path = '/lists/{list_id}/growth-history'.sub('{' + 'list_id' + '}', list_id.to_s)
|
364
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
365
|
+
:query_params => query_params,
|
366
|
+
:form_params => form_params,
|
367
|
+
:body => post_body)
|
368
|
+
return data, status_code, headers
|
369
|
+
end
|
370
|
+
|
371
|
+
# Get growth history by month
|
372
|
+
def get_list_growth_history_by_month(list_id, month, opts = {})
|
373
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
374
|
+
fail ArgumentError, "Missing required param: 'month'" if month.nil?
|
375
|
+
|
376
|
+
query_params = {}
|
377
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
378
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
379
|
+
form_params = {}
|
380
|
+
post_body = nil
|
381
|
+
|
382
|
+
local_var_path = '/lists/{list_id}/growth-history/{month}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'month' + '}', month.to_s)
|
383
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
384
|
+
:query_params => query_params,
|
385
|
+
:form_params => form_params,
|
386
|
+
:body => post_body)
|
387
|
+
return data, status_code, headers
|
388
|
+
end
|
389
|
+
|
390
|
+
# List interest categories
|
391
|
+
def get_list_interest_categories(list_id, opts = {})
|
392
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
393
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
394
|
+
|
395
|
+
query_params = {}
|
396
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
397
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
398
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
399
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
400
|
+
query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
|
401
|
+
form_params = {}
|
402
|
+
post_body = nil
|
403
|
+
|
404
|
+
local_var_path = '/lists/{list_id}/interest-categories'.sub('{' + 'list_id' + '}', list_id.to_s)
|
405
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
406
|
+
:query_params => query_params,
|
407
|
+
:form_params => form_params,
|
408
|
+
:body => post_body)
|
409
|
+
return data, status_code, headers
|
410
|
+
end
|
411
|
+
|
412
|
+
# Get interest category info
|
413
|
+
def get_interest_category(list_id, interest_category_id, opts = {})
|
414
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
415
|
+
fail ArgumentError, "Missing required param: 'interest_category_id'" if interest_category_id.nil?
|
416
|
+
|
417
|
+
query_params = {}
|
418
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
419
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
420
|
+
form_params = {}
|
421
|
+
post_body = nil
|
422
|
+
|
423
|
+
local_var_path = '/lists/{list_id}/interest-categories/{interest_category_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'interest_category_id' + '}', interest_category_id.to_s)
|
424
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
425
|
+
:query_params => query_params,
|
426
|
+
:form_params => form_params,
|
427
|
+
:body => post_body)
|
428
|
+
return data, status_code, headers
|
429
|
+
end
|
430
|
+
|
431
|
+
# List interests in category
|
432
|
+
def list_interest_category_interests(list_id, interest_category_id, opts = {})
|
433
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
434
|
+
fail ArgumentError, "Missing required param: 'interest_category_id'" if interest_category_id.nil?
|
435
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
436
|
+
|
437
|
+
query_params = {}
|
438
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
439
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
440
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
441
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
442
|
+
form_params = {}
|
443
|
+
post_body = nil
|
444
|
+
|
445
|
+
local_var_path = '/lists/{list_id}/interest-categories/{interest_category_id}/interests'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'interest_category_id' + '}', interest_category_id.to_s)
|
446
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
447
|
+
:query_params => query_params,
|
448
|
+
:form_params => form_params,
|
449
|
+
:body => post_body)
|
450
|
+
return data, status_code, headers
|
451
|
+
end
|
452
|
+
|
453
|
+
# Get interest in category
|
454
|
+
def get_interest_category_interest(list_id, interest_category_id, interest_id, opts = {})
|
455
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
456
|
+
fail ArgumentError, "Missing required param: 'interest_category_id'" if interest_category_id.nil?
|
457
|
+
fail ArgumentError, "Missing required param: 'interest_id'" if interest_id.nil?
|
458
|
+
|
459
|
+
query_params = {}
|
460
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
461
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
462
|
+
form_params = {}
|
463
|
+
post_body = nil
|
464
|
+
|
465
|
+
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)
|
466
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
467
|
+
:query_params => query_params,
|
468
|
+
:form_params => form_params,
|
469
|
+
:body => post_body)
|
470
|
+
return data, status_code, headers
|
471
|
+
end
|
472
|
+
|
473
|
+
# List locations
|
474
|
+
def get_list_locations(list_id, opts = {})
|
475
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
476
|
+
|
477
|
+
query_params = {}
|
478
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
479
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
480
|
+
form_params = {}
|
481
|
+
post_body = nil
|
482
|
+
|
483
|
+
local_var_path = '/lists/{list_id}/locations'.sub('{' + 'list_id' + '}', list_id.to_s)
|
484
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
485
|
+
:query_params => query_params,
|
486
|
+
:form_params => form_params,
|
487
|
+
:body => post_body)
|
488
|
+
return data, status_code, headers
|
489
|
+
end
|
490
|
+
|
491
|
+
# List members info
|
492
|
+
def get_list_members_info(list_id, opts = {})
|
493
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
494
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
495
|
+
fail ArgumentError, 'invalid value for "status", must be one of subscribed, unsubscribed, cleaned, pending, transactional, archived' if opts[:'status'] && !['subscribed', 'unsubscribed', 'cleaned', 'pending', 'transactional', 'archived'].include?(opts[:'status'])
|
496
|
+
fail ArgumentError, 'invalid value for "interest_match", must be one of any, all, none' if opts[:'interest_match'] && !['any', 'all', 'none'].include?(opts[:'interest_match'])
|
497
|
+
fail ArgumentError, 'invalid value for "sort_field", must be one of timestamp_opt, timestamp_signup, last_changed' if opts[:'sort_field'] && !['timestamp_opt', 'timestamp_signup', 'last_changed'].include?(opts[:'sort_field'])
|
498
|
+
fail ArgumentError, 'invalid value for "sort_dir", must be one of ASC, DESC' if opts[:'sort_dir'] && !['ASC', 'DESC'].include?(opts[:'sort_dir'])
|
499
|
+
|
500
|
+
query_params = {}
|
501
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
502
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
503
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
504
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
505
|
+
query_params[:'email_type'] = opts[:'email_type'] if !opts[:'email_type'].nil?
|
506
|
+
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
507
|
+
query_params[:'since_timestamp_opt'] = opts[:'since_timestamp_opt'] if !opts[:'since_timestamp_opt'].nil?
|
508
|
+
query_params[:'before_timestamp_opt'] = opts[:'before_timestamp_opt'] if !opts[:'before_timestamp_opt'].nil?
|
509
|
+
query_params[:'since_last_changed'] = opts[:'since_last_changed'] if !opts[:'since_last_changed'].nil?
|
510
|
+
query_params[:'before_last_changed'] = opts[:'before_last_changed'] if !opts[:'before_last_changed'].nil?
|
511
|
+
query_params[:'unique_email_id'] = opts[:'unique_email_id'] if !opts[:'unique_email_id'].nil?
|
512
|
+
query_params[:'vip_only'] = opts[:'vip_only'] if !opts[:'vip_only'].nil?
|
513
|
+
query_params[:'interest_category_id'] = opts[:'interest_category_id'] if !opts[:'interest_category_id'].nil?
|
514
|
+
query_params[:'interest_ids'] = opts[:'interest_ids'] if !opts[:'interest_ids'].nil?
|
515
|
+
query_params[:'interest_match'] = opts[:'interest_match'] if !opts[:'interest_match'].nil?
|
516
|
+
query_params[:'sort_field'] = opts[:'sort_field'] if !opts[:'sort_field'].nil?
|
517
|
+
query_params[:'sort_dir'] = opts[:'sort_dir'] if !opts[:'sort_dir'].nil?
|
518
|
+
query_params[:'since_last_campaign'] = opts[:'since_last_campaign'] if !opts[:'since_last_campaign'].nil?
|
519
|
+
query_params[:'unsubscribed_since'] = opts[:'unsubscribed_since'] if !opts[:'unsubscribed_since'].nil?
|
520
|
+
form_params = {}
|
521
|
+
post_body = nil
|
522
|
+
|
523
|
+
local_var_path = '/lists/{list_id}/members'.sub('{' + 'list_id' + '}', list_id.to_s)
|
524
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
525
|
+
:query_params => query_params,
|
526
|
+
:form_params => form_params,
|
527
|
+
:body => post_body)
|
528
|
+
return data, status_code, headers
|
529
|
+
end
|
530
|
+
|
531
|
+
# Get member info
|
532
|
+
def get_list_member(list_id, subscriber_hash, opts = {})
|
533
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
534
|
+
fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
|
535
|
+
|
536
|
+
query_params = {}
|
537
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
538
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
539
|
+
form_params = {}
|
540
|
+
post_body = nil
|
541
|
+
|
542
|
+
local_var_path = '/lists/{list_id}/members/{subscriber_hash}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
|
543
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
544
|
+
:query_params => query_params,
|
545
|
+
:form_params => form_params,
|
546
|
+
:body => post_body)
|
547
|
+
return data, status_code, headers
|
548
|
+
end
|
549
|
+
|
550
|
+
# View recent activity 50
|
551
|
+
def get_list_member_activity(list_id, subscriber_hash, opts = {})
|
552
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
553
|
+
fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
|
554
|
+
|
555
|
+
query_params = {}
|
556
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
557
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
558
|
+
query_params[:'action'] = @api_client.build_collection_param(opts[:'action'], :csv) if !opts[:'action'].nil?
|
559
|
+
form_params = {}
|
560
|
+
post_body = nil
|
561
|
+
|
562
|
+
local_var_path = '/lists/{list_id}/members/{subscriber_hash}/activity'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
|
563
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
564
|
+
:query_params => query_params,
|
565
|
+
:form_params => form_params,
|
566
|
+
:body => post_body)
|
567
|
+
return data, status_code, headers
|
568
|
+
end
|
569
|
+
|
570
|
+
# View recent activity 10
|
571
|
+
def get_list_member_activity_feed(list_id, subscriber_hash, opts = {})
|
572
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
573
|
+
fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
|
574
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
575
|
+
|
576
|
+
query_params = {}
|
577
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
578
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
579
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
580
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
581
|
+
query_params[:'activity_filters'] = @api_client.build_collection_param(opts[:'activity_filters'], :csv) if !opts[:'activity_filters'].nil?
|
582
|
+
form_params = {}
|
583
|
+
post_body = nil
|
584
|
+
|
585
|
+
local_var_path = '/lists/{list_id}/members/{subscriber_hash}/activity-feed'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
|
586
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
587
|
+
:query_params => query_params,
|
588
|
+
:form_params => form_params,
|
589
|
+
:body => post_body)
|
590
|
+
return data, status_code, headers
|
591
|
+
end
|
592
|
+
|
593
|
+
# List member events
|
594
|
+
def get_list_member_events(list_id, subscriber_hash, opts = {})
|
595
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
596
|
+
fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
|
597
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
598
|
+
|
599
|
+
query_params = {}
|
600
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
601
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
602
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
603
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
604
|
+
form_params = {}
|
605
|
+
post_body = nil
|
606
|
+
|
607
|
+
local_var_path = '/lists/{list_id}/members/{subscriber_hash}/events'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
|
608
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
609
|
+
:query_params => query_params,
|
610
|
+
:form_params => form_params,
|
611
|
+
:body => post_body)
|
612
|
+
return data, status_code, headers
|
613
|
+
end
|
614
|
+
|
615
|
+
# List member goal events
|
616
|
+
def getListMemberGoals(list_id, subscriber_hash, opts = {})
|
617
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
618
|
+
fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
|
619
|
+
|
620
|
+
query_params = {}
|
621
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
622
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
623
|
+
form_params = {}
|
624
|
+
post_body = nil
|
625
|
+
|
626
|
+
local_var_path = '/lists/{list_id}/members/{subscriber_hash}/goals'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
|
627
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
628
|
+
:query_params => query_params,
|
629
|
+
:form_params => form_params,
|
630
|
+
:body => post_body)
|
631
|
+
return data, status_code, headers
|
632
|
+
end
|
633
|
+
|
634
|
+
# List recent member notes
|
635
|
+
def get_list_member_notes(list_id, subscriber_hash, opts = {})
|
636
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
637
|
+
fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
|
638
|
+
fail ArgumentError, 'invalid value for "sort_field", must be one of created_at, updated_at, note_id' if opts[:'sort_field'] && !['created_at', 'updated_at', 'note_id'].include?(opts[:'sort_field'])
|
639
|
+
fail ArgumentError, 'invalid value for "sort_dir", must be one of ASC, DESC' if opts[:'sort_dir'] && !['ASC', 'DESC'].include?(opts[:'sort_dir'])
|
640
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
641
|
+
|
642
|
+
query_params = {}
|
643
|
+
query_params[:'sort_field'] = opts[:'sort_field'] if !opts[:'sort_field'].nil?
|
644
|
+
query_params[:'sort_dir'] = opts[:'sort_dir'] if !opts[:'sort_dir'].nil?
|
645
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
646
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
647
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
648
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
649
|
+
form_params = {}
|
650
|
+
post_body = nil
|
651
|
+
|
652
|
+
local_var_path = '/lists/{list_id}/members/{subscriber_hash}/notes'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
|
653
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
654
|
+
:query_params => query_params,
|
655
|
+
:form_params => form_params,
|
656
|
+
:body => post_body)
|
657
|
+
return data, status_code, headers
|
658
|
+
end
|
659
|
+
|
660
|
+
# Get member note
|
661
|
+
def get_list_member_note(list_id, subscriber_hash, note_id, opts = {})
|
662
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
663
|
+
fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
|
664
|
+
fail ArgumentError, "Missing required param: 'note_id'" if note_id.nil?
|
665
|
+
|
666
|
+
query_params = {}
|
667
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
668
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
669
|
+
form_params = {}
|
670
|
+
post_body = nil
|
671
|
+
|
672
|
+
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)
|
673
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
674
|
+
:query_params => query_params,
|
675
|
+
:form_params => form_params,
|
676
|
+
:body => post_body)
|
677
|
+
return data, status_code, headers
|
678
|
+
end
|
679
|
+
|
680
|
+
# List merge fields
|
681
|
+
def get_list_merge_fields(list_id, opts = {})
|
682
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
683
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
684
|
+
|
685
|
+
query_params = {}
|
686
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
687
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
688
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
689
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
690
|
+
query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
|
691
|
+
query_params[:'required'] = opts[:'required'] if !opts[:'required'].nil?
|
692
|
+
form_params = {}
|
693
|
+
post_body = nil
|
694
|
+
|
695
|
+
local_var_path = '/lists/{list_id}/merge-fields'.sub('{' + 'list_id' + '}', list_id.to_s)
|
696
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
697
|
+
:query_params => query_params,
|
698
|
+
:form_params => form_params,
|
699
|
+
:body => post_body)
|
700
|
+
return data, status_code, headers
|
701
|
+
end
|
702
|
+
|
703
|
+
# Get merge field
|
704
|
+
def get_list_merge_field(list_id, merge_id, opts = {})
|
705
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
706
|
+
fail ArgumentError, "Missing required param: 'merge_id'" if merge_id.nil?
|
707
|
+
|
708
|
+
query_params = {}
|
709
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
710
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
711
|
+
form_params = {}
|
712
|
+
post_body = nil
|
713
|
+
|
714
|
+
local_var_path = '/lists/{list_id}/merge-fields/{merge_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'merge_id' + '}', merge_id.to_s)
|
715
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
716
|
+
:query_params => query_params,
|
717
|
+
:form_params => form_params,
|
718
|
+
:body => post_body)
|
719
|
+
return data, status_code, headers
|
720
|
+
end
|
721
|
+
|
722
|
+
# Get segment info
|
723
|
+
def get_segment(list_id, segment_id, opts = {})
|
724
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
725
|
+
fail ArgumentError, "Missing required param: 'segment_id'" if segment_id.nil?
|
726
|
+
|
727
|
+
query_params = {}
|
728
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
729
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
730
|
+
query_params[:'include_cleaned'] = opts[:'include_cleaned'] if !opts[:'include_cleaned'].nil?
|
731
|
+
query_params[:'include_transactional'] = opts[:'include_transactional'] if !opts[:'include_transactional'].nil?
|
732
|
+
query_params[:'include_unsubscribed'] = opts[:'include_unsubscribed'] if !opts[:'include_unsubscribed'].nil?
|
733
|
+
form_params = {}
|
734
|
+
post_body = nil
|
735
|
+
|
736
|
+
local_var_path = '/lists/{list_id}/segments/{segment_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'segment_id' + '}', segment_id.to_s)
|
737
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
738
|
+
:query_params => query_params,
|
739
|
+
:form_params => form_params,
|
740
|
+
:body => post_body)
|
741
|
+
return data, status_code, headers
|
742
|
+
end
|
743
|
+
|
744
|
+
# List members in segment
|
745
|
+
def get_segment_members_list(list_id, segment_id, opts = {})
|
746
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
747
|
+
fail ArgumentError, "Missing required param: 'segment_id'" if segment_id.nil?
|
748
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
749
|
+
|
750
|
+
query_params = {}
|
751
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
752
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
753
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
754
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
755
|
+
query_params[:'include_cleaned'] = opts[:'include_cleaned'] if !opts[:'include_cleaned'].nil?
|
756
|
+
query_params[:'include_transactional'] = opts[:'include_transactional'] if !opts[:'include_transactional'].nil?
|
757
|
+
query_params[:'include_unsubscribed'] = opts[:'include_unsubscribed'] if !opts[:'include_unsubscribed'].nil?
|
758
|
+
form_params = {}
|
759
|
+
post_body = nil
|
760
|
+
|
761
|
+
local_var_path = '/lists/{list_id}/segments/{segment_id}/members'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'segment_id' + '}', segment_id.to_s)
|
762
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
763
|
+
:query_params => query_params,
|
764
|
+
:form_params => form_params,
|
765
|
+
:body => post_body)
|
766
|
+
return data, status_code, headers
|
767
|
+
end
|
768
|
+
|
769
|
+
# List signup forms
|
770
|
+
def get_list_signup_forms(list_id, opts = {})
|
771
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
772
|
+
|
773
|
+
query_params = {}
|
774
|
+
form_params = {}
|
775
|
+
post_body = nil
|
776
|
+
|
777
|
+
local_var_path = '/lists/{list_id}/signup-forms'.sub('{' + 'list_id' + '}', list_id.to_s)
|
778
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
779
|
+
:query_params => query_params,
|
780
|
+
:form_params => form_params,
|
781
|
+
:body => post_body)
|
782
|
+
return data, status_code, headers
|
783
|
+
end
|
784
|
+
|
785
|
+
# List webhooks
|
786
|
+
def get_list_webhooks(list_id, opts = {})
|
787
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
788
|
+
|
789
|
+
query_params = {}
|
790
|
+
form_params = {}
|
791
|
+
post_body = nil
|
792
|
+
|
793
|
+
local_var_path = '/lists/{list_id}/webhooks'.sub('{' + 'list_id' + '}', list_id.to_s)
|
794
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
795
|
+
:query_params => query_params,
|
796
|
+
:form_params => form_params,
|
797
|
+
:body => post_body)
|
798
|
+
return data, status_code, headers
|
799
|
+
end
|
800
|
+
|
801
|
+
# Get webhook info
|
802
|
+
def get_list_webhook(list_id, webhook_id, opts = {})
|
803
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
804
|
+
fail ArgumentError, "Missing required param: 'webhook_id'" if webhook_id.nil?
|
805
|
+
|
806
|
+
query_params = {}
|
807
|
+
form_params = {}
|
808
|
+
post_body = nil
|
809
|
+
|
810
|
+
local_var_path = '/lists/{list_id}/webhooks/{webhook_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'webhook_id' + '}', webhook_id.to_s)
|
811
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
812
|
+
:query_params => query_params,
|
813
|
+
:form_params => form_params,
|
814
|
+
:body => post_body)
|
815
|
+
return data, status_code, headers
|
816
|
+
end
|
817
|
+
|
818
|
+
# Update lists
|
819
|
+
def update_list(list_id, body, opts = {})
|
820
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
821
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
822
|
+
|
823
|
+
query_params = {}
|
824
|
+
form_params = {}
|
825
|
+
post_body = @api_client.object_to_http_body(body)
|
826
|
+
|
827
|
+
local_var_path = '/lists/{list_id}'.sub('{' + 'list_id' + '}', list_id.to_s)
|
828
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
829
|
+
:query_params => query_params,
|
830
|
+
:form_params => form_params,
|
831
|
+
:body => post_body)
|
832
|
+
return data, status_code, headers
|
833
|
+
end
|
834
|
+
|
835
|
+
# Update interest category
|
836
|
+
def update_interest_category(list_id, interest_category_id, body, opts = {})
|
837
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
838
|
+
fail ArgumentError, "Missing required param: 'interest_category_id'" if interest_category_id.nil?
|
839
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
840
|
+
|
841
|
+
query_params = {}
|
842
|
+
form_params = {}
|
843
|
+
post_body = @api_client.object_to_http_body(body)
|
844
|
+
|
845
|
+
local_var_path = '/lists/{list_id}/interest-categories/{interest_category_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'interest_category_id' + '}', interest_category_id.to_s)
|
846
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
847
|
+
:query_params => query_params,
|
848
|
+
:form_params => form_params,
|
849
|
+
:body => post_body)
|
850
|
+
return data, status_code, headers
|
851
|
+
end
|
852
|
+
|
853
|
+
# Update interest in category
|
854
|
+
def update_interest_category_interest(list_id, interest_category_id, interest_id, opts = {})
|
855
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
856
|
+
fail ArgumentError, "Missing required param: 'interest_category_id'" if interest_category_id.nil?
|
857
|
+
fail ArgumentError, "Missing required param: 'interest_id'" if interest_id.nil?
|
858
|
+
|
859
|
+
query_params = {}
|
860
|
+
form_params = {}
|
861
|
+
post_body = @api_client.object_to_http_body(opts[:'body'])
|
862
|
+
|
863
|
+
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)
|
864
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
865
|
+
:query_params => query_params,
|
866
|
+
:form_params => form_params,
|
867
|
+
:body => post_body)
|
868
|
+
return data, status_code, headers
|
869
|
+
end
|
870
|
+
|
871
|
+
# Update list member
|
872
|
+
def update_list_member(list_id, subscriber_hash, body, opts = {})
|
873
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
874
|
+
fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
|
875
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
876
|
+
|
877
|
+
query_params = {}
|
878
|
+
query_params[:'skip_merge_validation'] = opts[:'skip_merge_validation'] if !opts[:'skip_merge_validation'].nil?
|
879
|
+
form_params = {}
|
880
|
+
post_body = @api_client.object_to_http_body(body)
|
881
|
+
|
882
|
+
local_var_path = '/lists/{list_id}/members/{subscriber_hash}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
|
883
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
884
|
+
:query_params => query_params,
|
885
|
+
:form_params => form_params,
|
886
|
+
:body => post_body)
|
887
|
+
return data, status_code, headers
|
888
|
+
end
|
889
|
+
|
890
|
+
# Update note
|
891
|
+
def update_list_member_note(list_id, subscriber_hash, note_id, opts = {})
|
892
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
893
|
+
fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
|
894
|
+
fail ArgumentError, "Missing required param: 'note_id'" if note_id.nil?
|
895
|
+
|
896
|
+
query_params = {}
|
897
|
+
form_params = {}
|
898
|
+
post_body = @api_client.object_to_http_body(opts[:'body'])
|
899
|
+
|
900
|
+
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)
|
901
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
902
|
+
:query_params => query_params,
|
903
|
+
:form_params => form_params,
|
904
|
+
:body => post_body)
|
905
|
+
return data, status_code, headers
|
906
|
+
end
|
907
|
+
|
908
|
+
# Update merge field
|
909
|
+
def update_list_merge_field(list_id, merge_id, body, opts = {})
|
910
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
911
|
+
fail ArgumentError, "Missing required param: 'merge_id'" if merge_id.nil?
|
912
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
913
|
+
|
914
|
+
query_params = {}
|
915
|
+
form_params = {}
|
916
|
+
post_body = @api_client.object_to_http_body(body)
|
917
|
+
|
918
|
+
local_var_path = '/lists/{list_id}/merge-fields/{merge_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'merge_id' + '}', merge_id.to_s)
|
919
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
920
|
+
:query_params => query_params,
|
921
|
+
:form_params => form_params,
|
922
|
+
:body => post_body)
|
923
|
+
return data, status_code, headers
|
924
|
+
end
|
925
|
+
|
926
|
+
# Update segment
|
927
|
+
def update_segment(list_id, segment_id, body, opts = {})
|
928
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
929
|
+
fail ArgumentError, "Missing required param: 'segment_id'" if segment_id.nil?
|
930
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
931
|
+
|
932
|
+
query_params = {}
|
933
|
+
form_params = {}
|
934
|
+
post_body = @api_client.object_to_http_body(body)
|
935
|
+
|
936
|
+
local_var_path = '/lists/{list_id}/segments/{segment_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'segment_id' + '}', segment_id.to_s)
|
937
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
938
|
+
:query_params => query_params,
|
939
|
+
:form_params => form_params,
|
940
|
+
:body => post_body)
|
941
|
+
return data, status_code, headers
|
942
|
+
end
|
943
|
+
|
944
|
+
# Update webhook
|
945
|
+
def update_list_webhook(list_id, webhook_id, body, opts = {})
|
946
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
947
|
+
fail ArgumentError, "Missing required param: 'webhook_id'" if webhook_id.nil?
|
948
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
949
|
+
|
950
|
+
query_params = {}
|
951
|
+
form_params = {}
|
952
|
+
post_body = @api_client.object_to_http_body(body)
|
953
|
+
|
954
|
+
local_var_path = '/lists/{list_id}/webhooks/{webhook_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'webhook_id' + '}', webhook_id.to_s)
|
955
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
956
|
+
:query_params => query_params,
|
957
|
+
:form_params => form_params,
|
958
|
+
:body => post_body)
|
959
|
+
return data, status_code, headers
|
960
|
+
end
|
961
|
+
|
962
|
+
# Add event
|
963
|
+
def create_list_member_event(list_id, subscriber_hash, opts = {})
|
964
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
965
|
+
fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
|
966
|
+
|
967
|
+
query_params = {}
|
968
|
+
form_params = {}
|
969
|
+
post_body = @api_client.object_to_http_body(opts[:'body'])
|
970
|
+
|
971
|
+
local_var_path = '/lists/{list_id}/members/{subscriber_hash}/events'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
|
972
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
973
|
+
:query_params => query_params,
|
974
|
+
:form_params => form_params,
|
975
|
+
:body => post_body)
|
976
|
+
return data, status_code, headers
|
977
|
+
end
|
978
|
+
|
979
|
+
# Add or remove member tags
|
980
|
+
def update_list_member_tags(list_id, subscriber_hash, opts = {})
|
981
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
982
|
+
fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
|
983
|
+
|
984
|
+
query_params = {}
|
985
|
+
form_params = {}
|
986
|
+
post_body = @api_client.object_to_http_body(opts[:'body'])
|
987
|
+
|
988
|
+
local_var_path = '/lists/{list_id}/members/{subscriber_hash}/tags'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
|
989
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
990
|
+
:query_params => query_params,
|
991
|
+
:form_params => form_params,
|
992
|
+
:body => post_body)
|
993
|
+
return data, status_code, headers
|
994
|
+
end
|
995
|
+
|
996
|
+
# Add list
|
997
|
+
def create_list(body, opts = {})
|
998
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
999
|
+
|
1000
|
+
query_params = {}
|
1001
|
+
form_params = {}
|
1002
|
+
post_body = @api_client.object_to_http_body(body)
|
1003
|
+
|
1004
|
+
local_var_path = '/lists'
|
1005
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
1006
|
+
:query_params => query_params,
|
1007
|
+
:form_params => form_params,
|
1008
|
+
:body => post_body)
|
1009
|
+
return data, status_code, headers
|
1010
|
+
end
|
1011
|
+
|
1012
|
+
# Batch subscribe or unsubscibe
|
1013
|
+
def batch_list_members(list_id, body, opts = {})
|
1014
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
1015
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
1016
|
+
|
1017
|
+
query_params = {}
|
1018
|
+
query_params[:'skip_merge_validation'] = opts[:'skip_merge_validation'] if !opts[:'skip_merge_validation'].nil?
|
1019
|
+
query_params[:'skip_duplicate_check'] = opts[:'skip_duplicate_check'] if !opts[:'skip_duplicate_check'].nil?
|
1020
|
+
form_params = {}
|
1021
|
+
post_body = @api_client.object_to_http_body(body)
|
1022
|
+
|
1023
|
+
local_var_path = '/lists/{list_id}'.sub('{' + 'list_id' + '}', list_id.to_s)
|
1024
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
1025
|
+
:query_params => query_params,
|
1026
|
+
:form_params => form_params,
|
1027
|
+
:body => post_body)
|
1028
|
+
return data, status_code, headers
|
1029
|
+
end
|
1030
|
+
|
1031
|
+
# Add external id
|
1032
|
+
def create_list_external_id(list_id, opts = {})
|
1033
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
1034
|
+
|
1035
|
+
query_params = {}
|
1036
|
+
form_params = {}
|
1037
|
+
post_body = @api_client.object_to_http_body(opts[:'body'])
|
1038
|
+
|
1039
|
+
local_var_path = '/lists/{list_id}/external-ids'.sub('{' + 'list_id' + '}', list_id.to_s)
|
1040
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
1041
|
+
:query_params => query_params,
|
1042
|
+
:form_params => form_params,
|
1043
|
+
:body => post_body)
|
1044
|
+
return data, status_code, headers
|
1045
|
+
end
|
1046
|
+
|
1047
|
+
# Add interest category
|
1048
|
+
def create_list_interest_category(list_id, body, opts = {})
|
1049
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
1050
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
1051
|
+
|
1052
|
+
query_params = {}
|
1053
|
+
form_params = {}
|
1054
|
+
post_body = @api_client.object_to_http_body(body)
|
1055
|
+
|
1056
|
+
local_var_path = '/lists/{list_id}/interest-categories'.sub('{' + 'list_id' + '}', list_id.to_s)
|
1057
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
1058
|
+
:query_params => query_params,
|
1059
|
+
:form_params => form_params,
|
1060
|
+
:body => post_body)
|
1061
|
+
return data, status_code, headers
|
1062
|
+
end
|
1063
|
+
|
1064
|
+
# Add interest in category
|
1065
|
+
def create_interest_category_interest(list_id, interest_category_id, body, opts = {})
|
1066
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
1067
|
+
fail ArgumentError, "Missing required param: 'interest_category_id'" if interest_category_id.nil?
|
1068
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
1069
|
+
|
1070
|
+
query_params = {}
|
1071
|
+
form_params = {}
|
1072
|
+
post_body = @api_client.object_to_http_body(body)
|
1073
|
+
|
1074
|
+
local_var_path = '/lists/{list_id}/interest-categories/{interest_category_id}/interests'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'interest_category_id' + '}', interest_category_id.to_s)
|
1075
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
1076
|
+
:query_params => query_params,
|
1077
|
+
:form_params => form_params,
|
1078
|
+
:body => post_body)
|
1079
|
+
return data, status_code, headers
|
1080
|
+
end
|
1081
|
+
|
1082
|
+
# Add member to list
|
1083
|
+
def add_list_member(list_id, body, opts = {})
|
1084
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
1085
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
1086
|
+
|
1087
|
+
query_params = {}
|
1088
|
+
query_params[:'skip_merge_validation'] = opts[:'skip_merge_validation'] if !opts[:'skip_merge_validation'].nil?
|
1089
|
+
form_params = {}
|
1090
|
+
post_body = @api_client.object_to_http_body(body)
|
1091
|
+
|
1092
|
+
local_var_path = '/lists/{list_id}/members'.sub('{' + 'list_id' + '}', list_id.to_s)
|
1093
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
1094
|
+
:query_params => query_params,
|
1095
|
+
:form_params => form_params,
|
1096
|
+
:body => post_body)
|
1097
|
+
return data, status_code, headers
|
1098
|
+
end
|
1099
|
+
|
1100
|
+
# Delete list member
|
1101
|
+
def delete_list_member_permanent(list_id, subscriber_hash, opts = {})
|
1102
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
1103
|
+
fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
|
1104
|
+
|
1105
|
+
query_params = {}
|
1106
|
+
form_params = {}
|
1107
|
+
post_body = nil
|
1108
|
+
|
1109
|
+
local_var_path = '/lists/{list_id}/members/{subscriber_hash}/actions/delete-permanent'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
|
1110
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
1111
|
+
:query_params => query_params,
|
1112
|
+
:form_params => form_params,
|
1113
|
+
:body => post_body)
|
1114
|
+
return data, status_code, headers
|
1115
|
+
end
|
1116
|
+
|
1117
|
+
# Add member note
|
1118
|
+
def create_list_member_note(list_id, subscriber_hash, opts = {})
|
1119
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
1120
|
+
fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
|
1121
|
+
|
1122
|
+
query_params = {}
|
1123
|
+
form_params = {}
|
1124
|
+
post_body = @api_client.object_to_http_body(opts[:'body'])
|
1125
|
+
|
1126
|
+
local_var_path = '/lists/{list_id}/members/{subscriber_hash}/notes'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
|
1127
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
1128
|
+
:query_params => query_params,
|
1129
|
+
:form_params => form_params,
|
1130
|
+
:body => post_body)
|
1131
|
+
return data, status_code, headers
|
1132
|
+
end
|
1133
|
+
|
1134
|
+
# Add merge field
|
1135
|
+
def add_list_merge_field(list_id, body, opts = {})
|
1136
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
1137
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
1138
|
+
|
1139
|
+
query_params = {}
|
1140
|
+
form_params = {}
|
1141
|
+
post_body = @api_client.object_to_http_body(body)
|
1142
|
+
|
1143
|
+
local_var_path = '/lists/{list_id}/merge-fields'.sub('{' + 'list_id' + '}', list_id.to_s)
|
1144
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
1145
|
+
:query_params => query_params,
|
1146
|
+
:form_params => form_params,
|
1147
|
+
:body => post_body)
|
1148
|
+
return data, status_code, headers
|
1149
|
+
end
|
1150
|
+
|
1151
|
+
# Add segment
|
1152
|
+
def create_segment(list_id, body, opts = {})
|
1153
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
1154
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
1155
|
+
|
1156
|
+
query_params = {}
|
1157
|
+
form_params = {}
|
1158
|
+
post_body = @api_client.object_to_http_body(body)
|
1159
|
+
|
1160
|
+
local_var_path = '/lists/{list_id}/segments'.sub('{' + 'list_id' + '}', list_id.to_s)
|
1161
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
1162
|
+
:query_params => query_params,
|
1163
|
+
:form_params => form_params,
|
1164
|
+
:body => post_body)
|
1165
|
+
return data, status_code, headers
|
1166
|
+
end
|
1167
|
+
|
1168
|
+
# Batch add or remove members
|
1169
|
+
def batch_segment_members(body, list_id, segment_id, opts = {})
|
1170
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
1171
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
1172
|
+
fail ArgumentError, "Missing required param: 'segment_id'" if segment_id.nil?
|
1173
|
+
|
1174
|
+
query_params = {}
|
1175
|
+
form_params = {}
|
1176
|
+
post_body = @api_client.object_to_http_body(body)
|
1177
|
+
|
1178
|
+
local_var_path = '/lists/{list_id}/segments/{segment_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'segment_id' + '}', segment_id.to_s)
|
1179
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
1180
|
+
:query_params => query_params,
|
1181
|
+
:form_params => form_params,
|
1182
|
+
:body => post_body)
|
1183
|
+
return data, status_code, headers
|
1184
|
+
end
|
1185
|
+
|
1186
|
+
# Add member to segment
|
1187
|
+
def create_segment_member(list_id, segment_id, body, opts = {})
|
1188
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
1189
|
+
fail ArgumentError, "Missing required param: 'segment_id'" if segment_id.nil?
|
1190
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
1191
|
+
|
1192
|
+
query_params = {}
|
1193
|
+
form_params = {}
|
1194
|
+
post_body = @api_client.object_to_http_body(body)
|
1195
|
+
|
1196
|
+
local_var_path = '/lists/{list_id}/segments/{segment_id}/members'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'segment_id' + '}', segment_id.to_s)
|
1197
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
1198
|
+
:query_params => query_params,
|
1199
|
+
:form_params => form_params,
|
1200
|
+
:body => post_body)
|
1201
|
+
return data, status_code, headers
|
1202
|
+
end
|
1203
|
+
|
1204
|
+
# Customize signup form
|
1205
|
+
def update_list_signup_form(list_id, body, opts = {})
|
1206
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
1207
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
1208
|
+
|
1209
|
+
query_params = {}
|
1210
|
+
form_params = {}
|
1211
|
+
post_body = @api_client.object_to_http_body(body)
|
1212
|
+
|
1213
|
+
local_var_path = '/lists/{list_id}/signup-forms'.sub('{' + 'list_id' + '}', list_id.to_s)
|
1214
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
1215
|
+
:query_params => query_params,
|
1216
|
+
:form_params => form_params,
|
1217
|
+
:body => post_body)
|
1218
|
+
return data, status_code, headers
|
1219
|
+
end
|
1220
|
+
|
1221
|
+
# Add webhook
|
1222
|
+
def create_list_webhook(list_id, body, opts = {})
|
1223
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
1224
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
1225
|
+
|
1226
|
+
query_params = {}
|
1227
|
+
form_params = {}
|
1228
|
+
post_body = @api_client.object_to_http_body(body)
|
1229
|
+
|
1230
|
+
local_var_path = '/lists/{list_id}/webhooks'.sub('{' + 'list_id' + '}', list_id.to_s)
|
1231
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
1232
|
+
:query_params => query_params,
|
1233
|
+
:form_params => form_params,
|
1234
|
+
:body => post_body)
|
1235
|
+
return data, status_code, headers
|
1236
|
+
end
|
1237
|
+
|
1238
|
+
# List segments
|
1239
|
+
def list_segments(list_id, opts = {})
|
1240
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
1241
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
1242
|
+
|
1243
|
+
query_params = {}
|
1244
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
1245
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
1246
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
1247
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
1248
|
+
query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
|
1249
|
+
query_params[:'since_created_at'] = opts[:'since_created_at'] if !opts[:'since_created_at'].nil?
|
1250
|
+
query_params[:'before_created_at'] = opts[:'before_created_at'] if !opts[:'before_created_at'].nil?
|
1251
|
+
query_params[:'include_cleaned'] = opts[:'include_cleaned'] if !opts[:'include_cleaned'].nil?
|
1252
|
+
query_params[:'include_transactional'] = opts[:'include_transactional'] if !opts[:'include_transactional'].nil?
|
1253
|
+
query_params[:'include_unsubscribed'] = opts[:'include_unsubscribed'] if !opts[:'include_unsubscribed'].nil?
|
1254
|
+
query_params[:'since_updated_at'] = opts[:'since_updated_at'] if !opts[:'since_updated_at'].nil?
|
1255
|
+
query_params[:'before_updated_at'] = opts[:'before_updated_at'] if !opts[:'before_updated_at'].nil?
|
1256
|
+
form_params = {}
|
1257
|
+
post_body = nil
|
1258
|
+
|
1259
|
+
local_var_path = '/lists/{list_id}/segments'.sub('{' + 'list_id' + '}', list_id.to_s)
|
1260
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
1261
|
+
:query_params => query_params,
|
1262
|
+
:form_params => form_params,
|
1263
|
+
:body => post_body)
|
1264
|
+
return data, status_code, headers
|
1265
|
+
end
|
1266
|
+
|
1267
|
+
# Preview segment
|
1268
|
+
def preview_segment(list_id, opts = {})
|
1269
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
1270
|
+
|
1271
|
+
query_params = {}
|
1272
|
+
form_params = {}
|
1273
|
+
post_body = @api_client.object_to_http_body(opts[:'body'])
|
1274
|
+
|
1275
|
+
local_var_path = '/lists/{list_id}/preview-segment'.sub('{' + 'list_id' + '}', list_id.to_s)
|
1276
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
1277
|
+
:query_params => query_params,
|
1278
|
+
:form_params => form_params,
|
1279
|
+
:body => post_body)
|
1280
|
+
return data, status_code, headers
|
1281
|
+
end
|
1282
|
+
|
1283
|
+
# Add or update list member
|
1284
|
+
def set_list_member(list_id, subscriber_hash, body, opts = {})
|
1285
|
+
fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil?
|
1286
|
+
fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
|
1287
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
1288
|
+
|
1289
|
+
query_params = {}
|
1290
|
+
query_params[:'skip_merge_validation'] = opts[:'skip_merge_validation'] if !opts[:'skip_merge_validation'].nil?
|
1291
|
+
form_params = {}
|
1292
|
+
post_body = @api_client.object_to_http_body(body)
|
1293
|
+
|
1294
|
+
local_var_path = '/lists/{list_id}/members/{subscriber_hash}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
|
1295
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
1296
|
+
:query_params => query_params,
|
1297
|
+
:form_params => form_params,
|
1298
|
+
:body => post_body)
|
1299
|
+
return data, status_code, headers
|
1300
|
+
end
|
1301
|
+
end
|
1302
|
+
end
|