Class: ElasticEmail::SuppressionsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/ElasticEmail/api/suppressions_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ SuppressionsApi

Returns a new instance of SuppressionsApi.



19
20
21
# File 'lib/ElasticEmail/api/suppressions_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/ElasticEmail/api/suppressions_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#suppressions_bounces_get(opts = {}) ⇒ Array<Suppression>

Get Bounce List Retrieve your list of bounced emails. Required Access Level: ViewContacts, ViewSuppressions

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :search (String)

    Text fragment used for searching.

  • :limit (Integer)

    Maximum number of returned items.

  • :offset (Integer)

    How many items should be returned ahead.

Returns:



29
30
31
32
# File 'lib/ElasticEmail/api/suppressions_api.rb', line 29

def suppressions_bounces_get(opts = {})
  data, _status_code, _headers = suppressions_bounces_get_with_http_info(opts)
  data
end

#suppressions_bounces_get_with_http_info(opts = {}) ⇒ Array<(Array<Suppression>, Integer, Hash)>

Get Bounce List Retrieve your list of bounced emails. Required Access Level: ViewContacts, ViewSuppressions

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :search (String)

    Text fragment used for searching.

  • :limit (Integer)

    Maximum number of returned items.

  • :offset (Integer)

    How many items should be returned ahead.

Returns:

  • (Array<(Array<Suppression>, Integer, Hash)>)

    Array<Suppression> data, response status code and response headers



41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'lib/ElasticEmail/api/suppressions_api.rb', line 41

def suppressions_bounces_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SuppressionsApi.suppressions_bounces_get ...'
  end
  # resource path
  local_var_path = '/suppressions/bounces'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<Suppression>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apikey']

  new_options = opts.merge(
    :operation => :"SuppressionsApi.suppressions_bounces_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SuppressionsApi#suppressions_bounces_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#suppressions_bounces_import_post(opts = {}) ⇒ nil

Add Bounces Async Add Bounced. Required Access Level: ModifyContacts, ModifySuppressions

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :file (File)

Returns:

  • (nil)


93
94
95
96
# File 'lib/ElasticEmail/api/suppressions_api.rb', line 93

def suppressions_bounces_import_post(opts = {})
  suppressions_bounces_import_post_with_http_info(opts)
  nil
end

#suppressions_bounces_import_post_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>

Add Bounces Async Add Bounced. Required Access Level: ModifyContacts, ModifySuppressions

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :file (File)

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# File 'lib/ElasticEmail/api/suppressions_api.rb', line 103

def suppressions_bounces_import_post_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SuppressionsApi.suppressions_bounces_import_post ...'
  end
  # resource path
  local_var_path = '/suppressions/bounces/import'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['multipart/form-data'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}
  form_params['file'] = opts[:'file'] if !opts[:'file'].nil?

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apikey']

  new_options = opts.merge(
    :operation => :"SuppressionsApi.suppressions_bounces_import_post",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SuppressionsApi#suppressions_bounces_import_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#suppressions_bounces_post(request_body, opts = {}) ⇒ Array<Suppression>

Add Bounces Add Bounced. Required Access Level: ModifyContacts, ModifySuppressions

Parameters:

  • request_body (Array<String>)

    Emails to add as bounces. Limited to 1000 per request

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



156
157
158
159
# File 'lib/ElasticEmail/api/suppressions_api.rb', line 156

def suppressions_bounces_post(request_body, opts = {})
  data, _status_code, _headers = suppressions_bounces_post_with_http_info(request_body, opts)
  data
end

#suppressions_bounces_post_with_http_info(request_body, opts = {}) ⇒ Array<(Array<Suppression>, Integer, Hash)>

Add Bounces Add Bounced. Required Access Level: ModifyContacts, ModifySuppressions

Parameters:

  • request_body (Array<String>)

    Emails to add as bounces. Limited to 1000 per request

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Array<Suppression>, Integer, Hash)>)

    Array<Suppression> data, response status code and response headers



166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
# File 'lib/ElasticEmail/api/suppressions_api.rb', line 166

def suppressions_bounces_post_with_http_info(request_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SuppressionsApi.suppressions_bounces_post ...'
  end
  # verify the required parameter 'request_body' is set
  if @api_client.config.client_side_validation && request_body.nil?
    fail ArgumentError, "Missing the required parameter 'request_body' when calling SuppressionsApi.suppressions_bounces_post"
  end
  # resource path
  local_var_path = '/suppressions/bounces'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)

  # return_type
  return_type = opts[:debug_return_type] || 'Array<Suppression>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apikey']

  new_options = opts.merge(
    :operation => :"SuppressionsApi.suppressions_bounces_post",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SuppressionsApi#suppressions_bounces_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#suppressions_by_email_delete(email, opts = {}) ⇒ nil

Delete Suppression Delete Suppression. Required Access Level: ViewContacts, ViewSuppressions

Parameters:

  • email (String)

    Proper email address.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


224
225
226
227
# File 'lib/ElasticEmail/api/suppressions_api.rb', line 224

def suppressions_by_email_delete(email, opts = {})
  suppressions_by_email_delete_with_http_info(email, opts)
  nil
end

#suppressions_by_email_delete_with_http_info(email, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete Suppression Delete Suppression. Required Access Level: ViewContacts, ViewSuppressions

Parameters:

  • email (String)

    Proper email address.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
# File 'lib/ElasticEmail/api/suppressions_api.rb', line 234

def suppressions_by_email_delete_with_http_info(email, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SuppressionsApi.suppressions_by_email_delete ...'
  end
  # verify the required parameter 'email' is set
  if @api_client.config.client_side_validation && email.nil?
    fail ArgumentError, "Missing the required parameter 'email' when calling SuppressionsApi.suppressions_by_email_delete"
  end
  # resource path
  local_var_path = '/suppressions/{email}'.sub('{' + 'email' + '}', CGI.escape(email.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apikey']

  new_options = opts.merge(
    :operation => :"SuppressionsApi.suppressions_by_email_delete",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SuppressionsApi#suppressions_by_email_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#suppressions_by_email_get(email, opts = {}) ⇒ Suppression

Get Suppression Retrieve your suppression. Required Access Level: ViewContacts, ViewSuppressions

Parameters:

  • email (String)

    Proper email address.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



285
286
287
288
# File 'lib/ElasticEmail/api/suppressions_api.rb', line 285

def suppressions_by_email_get(email, opts = {})
  data, _status_code, _headers = suppressions_by_email_get_with_http_info(email, opts)
  data
end

#suppressions_by_email_get_with_http_info(email, opts = {}) ⇒ Array<(Suppression, Integer, Hash)>

Get Suppression Retrieve your suppression. Required Access Level: ViewContacts, ViewSuppressions

Parameters:

  • email (String)

    Proper email address.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Suppression, Integer, Hash)>)

    Suppression data, response status code and response headers



295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
# File 'lib/ElasticEmail/api/suppressions_api.rb', line 295

def suppressions_by_email_get_with_http_info(email, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SuppressionsApi.suppressions_by_email_get ...'
  end
  # verify the required parameter 'email' is set
  if @api_client.config.client_side_validation && email.nil?
    fail ArgumentError, "Missing the required parameter 'email' when calling SuppressionsApi.suppressions_by_email_get"
  end
  # resource path
  local_var_path = '/suppressions/{email}'.sub('{' + 'email' + '}', CGI.escape(email.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Suppression'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apikey']

  new_options = opts.merge(
    :operation => :"SuppressionsApi.suppressions_by_email_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SuppressionsApi#suppressions_by_email_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#suppressions_complaints_get(opts = {}) ⇒ Array<Suppression>

Get Complaints List Retrieve your list of complaints. Required Access Level: ViewContacts, ViewSuppressions

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :search (String)

    Text fragment used for searching.

  • :limit (Integer)

    Maximum number of returned items.

  • :offset (Integer)

    How many items should be returned ahead.

Returns:



350
351
352
353
# File 'lib/ElasticEmail/api/suppressions_api.rb', line 350

def suppressions_complaints_get(opts = {})
  data, _status_code, _headers = suppressions_complaints_get_with_http_info(opts)
  data
end

#suppressions_complaints_get_with_http_info(opts = {}) ⇒ Array<(Array<Suppression>, Integer, Hash)>

Get Complaints List Retrieve your list of complaints. Required Access Level: ViewContacts, ViewSuppressions

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :search (String)

    Text fragment used for searching.

  • :limit (Integer)

    Maximum number of returned items.

  • :offset (Integer)

    How many items should be returned ahead.

Returns:

  • (Array<(Array<Suppression>, Integer, Hash)>)

    Array<Suppression> data, response status code and response headers



362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
# File 'lib/ElasticEmail/api/suppressions_api.rb', line 362

def suppressions_complaints_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SuppressionsApi.suppressions_complaints_get ...'
  end
  # resource path
  local_var_path = '/suppressions/complaints'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<Suppression>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apikey']

  new_options = opts.merge(
    :operation => :"SuppressionsApi.suppressions_complaints_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SuppressionsApi#suppressions_complaints_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#suppressions_complaints_import_post(opts = {}) ⇒ nil

Add Complaints Async Add Complaints. Required Access Level: ModifyContacts, ModifySuppressions

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :file (File)

Returns:

  • (nil)


414
415
416
417
# File 'lib/ElasticEmail/api/suppressions_api.rb', line 414

def suppressions_complaints_import_post(opts = {})
  suppressions_complaints_import_post_with_http_info(opts)
  nil
end

#suppressions_complaints_import_post_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>

Add Complaints Async Add Complaints. Required Access Level: ModifyContacts, ModifySuppressions

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :file (File)

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
# File 'lib/ElasticEmail/api/suppressions_api.rb', line 424

def suppressions_complaints_import_post_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SuppressionsApi.suppressions_complaints_import_post ...'
  end
  # resource path
  local_var_path = '/suppressions/complaints/import'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['multipart/form-data'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}
  form_params['file'] = opts[:'file'] if !opts[:'file'].nil?

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apikey']

  new_options = opts.merge(
    :operation => :"SuppressionsApi.suppressions_complaints_import_post",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SuppressionsApi#suppressions_complaints_import_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#suppressions_complaints_post(request_body, opts = {}) ⇒ Array<Suppression>

Add Complaints Add Complaints. Required Access Level: ModifyContacts, ModifySuppressions

Parameters:

  • request_body (Array<String>)

    Emails to add as complaints. Limited to 1000 per request

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



477
478
479
480
# File 'lib/ElasticEmail/api/suppressions_api.rb', line 477

def suppressions_complaints_post(request_body, opts = {})
  data, _status_code, _headers = suppressions_complaints_post_with_http_info(request_body, opts)
  data
end

#suppressions_complaints_post_with_http_info(request_body, opts = {}) ⇒ Array<(Array<Suppression>, Integer, Hash)>

Add Complaints Add Complaints. Required Access Level: ModifyContacts, ModifySuppressions

Parameters:

  • request_body (Array<String>)

    Emails to add as complaints. Limited to 1000 per request

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Array<Suppression>, Integer, Hash)>)

    Array<Suppression> data, response status code and response headers



487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
# File 'lib/ElasticEmail/api/suppressions_api.rb', line 487

def suppressions_complaints_post_with_http_info(request_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SuppressionsApi.suppressions_complaints_post ...'
  end
  # verify the required parameter 'request_body' is set
  if @api_client.config.client_side_validation && request_body.nil?
    fail ArgumentError, "Missing the required parameter 'request_body' when calling SuppressionsApi.suppressions_complaints_post"
  end
  # resource path
  local_var_path = '/suppressions/complaints'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)

  # return_type
  return_type = opts[:debug_return_type] || 'Array<Suppression>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apikey']

  new_options = opts.merge(
    :operation => :"SuppressionsApi.suppressions_complaints_post",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SuppressionsApi#suppressions_complaints_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#suppressions_get(opts = {}) ⇒ Array<Suppression>

Get Suppressions Retrieve your suppressions. Required Access Level: ViewContacts, ViewSuppressions

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    Maximum number of returned items.

  • :offset (Integer)

    How many items should be returned ahead.

Returns:



546
547
548
549
# File 'lib/ElasticEmail/api/suppressions_api.rb', line 546

def suppressions_get(opts = {})
  data, _status_code, _headers = suppressions_get_with_http_info(opts)
  data
end

#suppressions_get_with_http_info(opts = {}) ⇒ Array<(Array<Suppression>, Integer, Hash)>

Get Suppressions Retrieve your suppressions. Required Access Level: ViewContacts, ViewSuppressions

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    Maximum number of returned items.

  • :offset (Integer)

    How many items should be returned ahead.

Returns:

  • (Array<(Array<Suppression>, Integer, Hash)>)

    Array<Suppression> data, response status code and response headers



557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
# File 'lib/ElasticEmail/api/suppressions_api.rb', line 557

def suppressions_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SuppressionsApi.suppressions_get ...'
  end
  # resource path
  local_var_path = '/suppressions'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<Suppression>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apikey']

  new_options = opts.merge(
    :operation => :"SuppressionsApi.suppressions_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SuppressionsApi#suppressions_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#suppressions_unsubscribes_get(opts = {}) ⇒ Array<Suppression>

Get Unsubscribes List Retrieve your list of unsubscribes. Required Access Level: ViewContacts, ViewSuppressions

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :search (String)

    Text fragment used for searching.

  • :limit (Integer)

    Maximum number of returned items.

  • :offset (Integer)

    How many items should be returned ahead.

Returns:



610
611
612
613
# File 'lib/ElasticEmail/api/suppressions_api.rb', line 610

def suppressions_unsubscribes_get(opts = {})
  data, _status_code, _headers = suppressions_unsubscribes_get_with_http_info(opts)
  data
end

#suppressions_unsubscribes_get_with_http_info(opts = {}) ⇒ Array<(Array<Suppression>, Integer, Hash)>

Get Unsubscribes List Retrieve your list of unsubscribes. Required Access Level: ViewContacts, ViewSuppressions

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :search (String)

    Text fragment used for searching.

  • :limit (Integer)

    Maximum number of returned items.

  • :offset (Integer)

    How many items should be returned ahead.

Returns:

  • (Array<(Array<Suppression>, Integer, Hash)>)

    Array<Suppression> data, response status code and response headers



622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
# File 'lib/ElasticEmail/api/suppressions_api.rb', line 622

def suppressions_unsubscribes_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SuppressionsApi.suppressions_unsubscribes_get ...'
  end
  # resource path
  local_var_path = '/suppressions/unsubscribes'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<Suppression>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apikey']

  new_options = opts.merge(
    :operation => :"SuppressionsApi.suppressions_unsubscribes_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SuppressionsApi#suppressions_unsubscribes_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#suppressions_unsubscribes_import_post(opts = {}) ⇒ nil

Add Unsubscribes Async Add Unsubscribes. Required Access Level: ModifyContacts, ModifySuppressions

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :file (File)

Returns:

  • (nil)


674
675
676
677
# File 'lib/ElasticEmail/api/suppressions_api.rb', line 674

def suppressions_unsubscribes_import_post(opts = {})
  suppressions_unsubscribes_import_post_with_http_info(opts)
  nil
end

#suppressions_unsubscribes_import_post_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>

Add Unsubscribes Async Add Unsubscribes. Required Access Level: ModifyContacts, ModifySuppressions

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :file (File)

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
# File 'lib/ElasticEmail/api/suppressions_api.rb', line 684

def suppressions_unsubscribes_import_post_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SuppressionsApi.suppressions_unsubscribes_import_post ...'
  end
  # resource path
  local_var_path = '/suppressions/unsubscribes/import'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['multipart/form-data'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}
  form_params['file'] = opts[:'file'] if !opts[:'file'].nil?

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apikey']

  new_options = opts.merge(
    :operation => :"SuppressionsApi.suppressions_unsubscribes_import_post",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SuppressionsApi#suppressions_unsubscribes_import_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#suppressions_unsubscribes_post(request_body, opts = {}) ⇒ Array<Suppression>

Add Unsubscribes Add Unsubscribes. Required Access Level: ModifyContacts, ModifySuppressions

Parameters:

  • request_body (Array<String>)

    Emails to add as unsubscribes. Limited to 1000 per request

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



737
738
739
740
# File 'lib/ElasticEmail/api/suppressions_api.rb', line 737

def suppressions_unsubscribes_post(request_body, opts = {})
  data, _status_code, _headers = suppressions_unsubscribes_post_with_http_info(request_body, opts)
  data
end

#suppressions_unsubscribes_post_with_http_info(request_body, opts = {}) ⇒ Array<(Array<Suppression>, Integer, Hash)>

Add Unsubscribes Add Unsubscribes. Required Access Level: ModifyContacts, ModifySuppressions

Parameters:

  • request_body (Array<String>)

    Emails to add as unsubscribes. Limited to 1000 per request

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Array<Suppression>, Integer, Hash)>)

    Array<Suppression> data, response status code and response headers



747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
# File 'lib/ElasticEmail/api/suppressions_api.rb', line 747

def suppressions_unsubscribes_post_with_http_info(request_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SuppressionsApi.suppressions_unsubscribes_post ...'
  end
  # verify the required parameter 'request_body' is set
  if @api_client.config.client_side_validation && request_body.nil?
    fail ArgumentError, "Missing the required parameter 'request_body' when calling SuppressionsApi.suppressions_unsubscribes_post"
  end
  # resource path
  local_var_path = '/suppressions/unsubscribes'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)

  # return_type
  return_type = opts[:debug_return_type] || 'Array<Suppression>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apikey']

  new_options = opts.merge(
    :operation => :"SuppressionsApi.suppressions_unsubscribes_post",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SuppressionsApi#suppressions_unsubscribes_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end