class ElasticEmail::SuppressionsApi
Attributes
Public Class Methods
# File lib/ElasticEmail/api/suppressions_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Get Bounce List Retrieve your list of bounced emails. Required Access Level: ViewContacts @param [Hash] opts the optional parameters @option opts [String] :search Text fragment used for searching. @option opts [Integer] :limit Maximum number of returned items. @option opts [Integer] :offset How many items should be returned ahead. @return [Array<Suppression>]
# 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
Get Bounce List Retrieve your list of bounced emails. Required Access Level: ViewContacts @param [Hash] opts the optional parameters @option opts [String] :search Text fragment used for searching. @option opts [Integer] :limit Maximum number of returned items. @option opts [Integer] :offset How many items should be returned ahead. @return [Array<(Array<Suppression>, Integer, Hash)>] Array<Suppression> data, response status code and response headers
# 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
Add Bounces Async Add Bounced. Required Access Level: ModifyContacts @param [Hash] opts the optional parameters @option opts [File] :file @return [nil]
# 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
Add Bounces Async Add Bounced. Required Access Level: ModifyContacts @param [Hash] opts the optional parameters @option opts [File] :file @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# 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' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # 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
Add Bounces Add Bounced. Required Access Level: ModifyContacts @param request_body [Array<String>] Emails to add as bounces. Limited to 1000 per request @param [Hash] opts the optional parameters @return [Array<Suppression>]
# File lib/ElasticEmail/api/suppressions_api.rb, line 153 def suppressions_bounces_post(request_body, opts = {}) data, _status_code, _headers = suppressions_bounces_post_with_http_info(request_body, opts) data end
Add Bounces Add Bounced. Required Access Level: ModifyContacts @param request_body [Array<String>] Emails to add as bounces. Limited to 1000 per request @param [Hash] opts the optional parameters @return [Array<(Array<Suppression>, Integer, Hash)>] Array<Suppression> data, response status code and response headers
# File lib/ElasticEmail/api/suppressions_api.rb, line 163 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' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # 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
Delete Suppression
Delete Suppression
. Required Access Level: ViewContacts @param email [String] Proper email address. @param [Hash] opts the optional parameters @return [nil]
# File lib/ElasticEmail/api/suppressions_api.rb, line 218 def suppressions_by_email_delete(email, opts = {}) suppressions_by_email_delete_with_http_info(email, opts) nil end
Delete Suppression
Delete Suppression
. Required Access Level: ViewContacts @param email [String] Proper email address. @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# File lib/ElasticEmail/api/suppressions_api.rb, line 228 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
Get Suppression
Retrieve your suppression. Required Access Level: ViewContacts @param email [String] Proper email address. @param [Hash] opts the optional parameters @return [Suppression]
# File lib/ElasticEmail/api/suppressions_api.rb, line 279 def suppressions_by_email_get(email, opts = {}) data, _status_code, _headers = suppressions_by_email_get_with_http_info(email, opts) data end
Get Suppression
Retrieve your suppression. Required Access Level: ViewContacts @param email [String] Proper email address. @param [Hash] opts the optional parameters @return [Array<(Suppression
, Integer, Hash)>] Suppression
data, response status code and response headers
# File lib/ElasticEmail/api/suppressions_api.rb, line 289 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
Get Complaints List Retrieve your list of complaints. Required Access Level: ViewContacts @param [Hash] opts the optional parameters @option opts [String] :search Text fragment used for searching. @option opts [Integer] :limit Maximum number of returned items. @option opts [Integer] :offset How many items should be returned ahead. @return [Array<Suppression>]
# File lib/ElasticEmail/api/suppressions_api.rb, line 344 def suppressions_complaints_get(opts = {}) data, _status_code, _headers = suppressions_complaints_get_with_http_info(opts) data end
Get Complaints List Retrieve your list of complaints. Required Access Level: ViewContacts @param [Hash] opts the optional parameters @option opts [String] :search Text fragment used for searching. @option opts [Integer] :limit Maximum number of returned items. @option opts [Integer] :offset How many items should be returned ahead. @return [Array<(Array<Suppression>, Integer, Hash)>] Array<Suppression> data, response status code and response headers
# File lib/ElasticEmail/api/suppressions_api.rb, line 356 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
Add Complaints Async Add Complaints. Required Access Level: ModifyContacts @param [Hash] opts the optional parameters @option opts [File] :file @return [nil]
# File lib/ElasticEmail/api/suppressions_api.rb, line 408 def suppressions_complaints_import_post(opts = {}) suppressions_complaints_import_post_with_http_info(opts) nil end
Add Complaints Async Add Complaints. Required Access Level: ModifyContacts @param [Hash] opts the optional parameters @option opts [File] :file @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# File lib/ElasticEmail/api/suppressions_api.rb, line 418 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' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # 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
Add Complaints Add Complaints. Required Access Level: ModifyContacts @param request_body [Array<String>] Emails to add as complaints. Limited to 1000 per request @param [Hash] opts the optional parameters @return [Array<Suppression>]
# File lib/ElasticEmail/api/suppressions_api.rb, line 468 def suppressions_complaints_post(request_body, opts = {}) data, _status_code, _headers = suppressions_complaints_post_with_http_info(request_body, opts) data end
Add Complaints Add Complaints. Required Access Level: ModifyContacts @param request_body [Array<String>] Emails to add as complaints. Limited to 1000 per request @param [Hash] opts the optional parameters @return [Array<(Array<Suppression>, Integer, Hash)>] Array<Suppression> data, response status code and response headers
# File lib/ElasticEmail/api/suppressions_api.rb, line 478 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' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # 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
Get Suppressions Retrieve your suppressions. Required Access Level: ViewContacts @param [Hash] opts the optional parameters @option opts [Integer] :limit Maximum number of returned items. @option opts [Integer] :offset How many items should be returned ahead. @return [Array<Suppression>]
# File lib/ElasticEmail/api/suppressions_api.rb, line 534 def suppressions_get(opts = {}) data, _status_code, _headers = suppressions_get_with_http_info(opts) data end
Get Suppressions Retrieve your suppressions. Required Access Level: ViewContacts @param [Hash] opts the optional parameters @option opts [Integer] :limit Maximum number of returned items. @option opts [Integer] :offset How many items should be returned ahead. @return [Array<(Array<Suppression>, Integer, Hash)>] Array<Suppression> data, response status code and response headers
# File lib/ElasticEmail/api/suppressions_api.rb, line 545 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
Get Unsubscribes List Retrieve your list of unsubscribes. Required Access Level: ViewContacts @param [Hash] opts the optional parameters @option opts [String] :search Text fragment used for searching. @option opts [Integer] :limit Maximum number of returned items. @option opts [Integer] :offset How many items should be returned ahead. @return [Array<Suppression>]
# File lib/ElasticEmail/api/suppressions_api.rb, line 598 def suppressions_unsubscribes_get(opts = {}) data, _status_code, _headers = suppressions_unsubscribes_get_with_http_info(opts) data end
Get Unsubscribes List Retrieve your list of unsubscribes. Required Access Level: ViewContacts @param [Hash] opts the optional parameters @option opts [String] :search Text fragment used for searching. @option opts [Integer] :limit Maximum number of returned items. @option opts [Integer] :offset How many items should be returned ahead. @return [Array<(Array<Suppression>, Integer, Hash)>] Array<Suppression> data, response status code and response headers
# File lib/ElasticEmail/api/suppressions_api.rb, line 610 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
Add Unsubscribes Async Add Unsubscribes. Required Access Level: ModifyContacts @param [Hash] opts the optional parameters @option opts [File] :file @return [nil]
# File lib/ElasticEmail/api/suppressions_api.rb, line 662 def suppressions_unsubscribes_import_post(opts = {}) suppressions_unsubscribes_import_post_with_http_info(opts) nil end
Add Unsubscribes Async Add Unsubscribes. Required Access Level: ModifyContacts @param [Hash] opts the optional parameters @option opts [File] :file @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# File lib/ElasticEmail/api/suppressions_api.rb, line 672 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' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # 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
Add Unsubscribes Add Unsubscribes. Required Access Level: ModifyContacts @param request_body [Array<String>] Emails to add as unsubscribes. Limited to 1000 per request @param [Hash] opts the optional parameters @return [Array<Suppression>]
# File lib/ElasticEmail/api/suppressions_api.rb, line 722 def suppressions_unsubscribes_post(request_body, opts = {}) data, _status_code, _headers = suppressions_unsubscribes_post_with_http_info(request_body, opts) data end
Add Unsubscribes Add Unsubscribes. Required Access Level: ModifyContacts @param request_body [Array<String>] Emails to add as unsubscribes. Limited to 1000 per request @param [Hash] opts the optional parameters @return [Array<(Array<Suppression>, Integer, Hash)>] Array<Suppression> data, response status code and response headers
# File lib/ElasticEmail/api/suppressions_api.rb, line 732 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' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # 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