class ClickSendClient::EmailMarketingApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/clicksend_client/api/email_marketing_api.rb, line 19
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

allowed_email_address_get(opts = {}) click to toggle source

Get all email addresses Get all email addresses @param [Hash] opts the optional parameters @option opts [Integer] :page Page number (default to 1) @option opts [Integer] :limit Number of records per page (default to 10) @return [String]

# File lib/clicksend_client/api/email_marketing_api.rb, line 28
def allowed_email_address_get(opts = {})
  data, _status_code, _headers = allowed_email_address_get_with_http_info(opts)
  data
end
allowed_email_address_get_with_http_info(opts = {}) click to toggle source

Get all email addresses Get all email addresses @param [Hash] opts the optional parameters @option opts [Integer] :page Page number @option opts [Integer] :limit Number of records per page @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers

# File lib/clicksend_client/api/email_marketing_api.rb, line 39
def allowed_email_address_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EmailMarketingApi.allowed_email_address_get ...'
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling EmailMarketingApi.allowed_email_address_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling EmailMarketingApi.allowed_email_address_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/email/addresses'

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

  # header parameters
  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 = {}

  # http body (model)
  post_body = nil
  auth_names = ['BasicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EmailMarketingApi#allowed_email_address_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
allowed_email_address_post(opts = {}) click to toggle source

Create allowed Email Address Create allowed Email Address @param [Hash] opts the optional parameters @option opts [EmailAddress] :email_address @return [String]

# File lib/clicksend_client/api/email_marketing_api.rb, line 89
def allowed_email_address_post(opts = {})
  data, _status_code, _headers = allowed_email_address_post_with_http_info(opts)
  data
end
allowed_email_address_post_with_http_info(opts = {}) click to toggle source

Create allowed Email Address Create allowed Email Address @param [Hash] opts the optional parameters @option opts [EmailAddress] :email_address @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers

# File lib/clicksend_client/api/email_marketing_api.rb, line 99
def allowed_email_address_post_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EmailMarketingApi.allowed_email_address_post ...'
  end
  # resource path
  local_var_path = '/email/addresses'

  # query parameters
  query_params = {}

  # header parameters
  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 = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(opts[:'email_address'])
  auth_names = ['BasicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EmailMarketingApi#allowed_email_address_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
cancel_email_campaign_put(email_campaign_id, opts = {}) click to toggle source

Cancel email campaign Cancel email campaign @param email_campaign_id Allowed email campaign id @param [Hash] opts the optional parameters @return [String]

# File lib/clicksend_client/api/email_marketing_api.rb, line 139
def cancel_email_campaign_put(email_campaign_id, opts = {})
  data, _status_code, _headers = cancel_email_campaign_put_with_http_info(email_campaign_id, opts)
  data
end
cancel_email_campaign_put_with_http_info(email_campaign_id, opts = {}) click to toggle source

Cancel email campaign Cancel email campaign @param email_campaign_id Allowed email campaign id @param [Hash] opts the optional parameters @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers

# File lib/clicksend_client/api/email_marketing_api.rb, line 149
def cancel_email_campaign_put_with_http_info(email_campaign_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EmailMarketingApi.cancel_email_campaign_put ...'
  end
  # verify the required parameter 'email_campaign_id' is set
  if @api_client.config.client_side_validation && email_campaign_id.nil?
    fail ArgumentError, "Missing the required parameter 'email_campaign_id' when calling EmailMarketingApi.cancel_email_campaign_put"
  end
  # resource path
  local_var_path = '/email-campaigns/{email_campaign_id}/cancel'.sub('{' + 'email_campaign_id' + '}', email_campaign_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  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 = {}

  # http body (model)
  post_body = nil
  auth_names = ['BasicAuth']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EmailMarketingApi#cancel_email_campaign_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
email_campaign_get(email_campaign_id, opts = {}) click to toggle source

Get specific email campaign Get specific email campaign @param email_campaign_id Allowed email campaign id @param [Hash] opts the optional parameters @return [String]

# File lib/clicksend_client/api/email_marketing_api.rb, line 193
def email_campaign_get(email_campaign_id, opts = {})
  data, _status_code, _headers = email_campaign_get_with_http_info(email_campaign_id, opts)
  data
end
email_campaign_get_with_http_info(email_campaign_id, opts = {}) click to toggle source

Get specific email campaign Get specific email campaign @param email_campaign_id Allowed email campaign id @param [Hash] opts the optional parameters @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers

# File lib/clicksend_client/api/email_marketing_api.rb, line 203
def email_campaign_get_with_http_info(email_campaign_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EmailMarketingApi.email_campaign_get ...'
  end
  # verify the required parameter 'email_campaign_id' is set
  if @api_client.config.client_side_validation && email_campaign_id.nil?
    fail ArgumentError, "Missing the required parameter 'email_campaign_id' when calling EmailMarketingApi.email_campaign_get"
  end
  # resource path
  local_var_path = '/email-campaigns/{email_campaign_id}'.sub('{' + 'email_campaign_id' + '}', email_campaign_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  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 = {}

  # http body (model)
  post_body = nil
  auth_names = ['BasicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EmailMarketingApi#email_campaign_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
email_campaign_history_export_get(email_campaign_id, opts = {}) click to toggle source

Export specific email campaign history Export specific email campaign history @param email_campaign_id Allowed email campaign id @param [Hash] opts the optional parameters @option opts [Integer] :date_from Start date @option opts [Integer] :date_to End date @return [String]

# File lib/clicksend_client/api/email_marketing_api.rb, line 249
def email_campaign_history_export_get(email_campaign_id, opts = {})
  data, _status_code, _headers = email_campaign_history_export_get_with_http_info(email_campaign_id, opts)
  data
end
email_campaign_history_export_get_with_http_info(email_campaign_id, opts = {}) click to toggle source

Export specific email campaign history Export specific email campaign history @param email_campaign_id Allowed email campaign id @param [Hash] opts the optional parameters @option opts [Integer] :date_from Start date @option opts [Integer] :date_to End date @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers

# File lib/clicksend_client/api/email_marketing_api.rb, line 261
def email_campaign_history_export_get_with_http_info(email_campaign_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EmailMarketingApi.email_campaign_history_export_get ...'
  end
  # verify the required parameter 'email_campaign_id' is set
  if @api_client.config.client_side_validation && email_campaign_id.nil?
    fail ArgumentError, "Missing the required parameter 'email_campaign_id' when calling EmailMarketingApi.email_campaign_history_export_get"
  end
  # resource path
  local_var_path = '/email-campaigns/{email_campaign_id}/history/export'.sub('{' + 'email_campaign_id' + '}', email_campaign_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'date_from'] = opts[:'date_from'] if !opts[:'date_from'].nil?
  query_params[:'date_to'] = opts[:'date_to'] if !opts[:'date_to'].nil?

  # header parameters
  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 = {}

  # http body (model)
  post_body = nil
  auth_names = ['BasicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EmailMarketingApi#email_campaign_history_export_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
email_campaign_history_get(email_campaign_id, opts = {}) click to toggle source

Get specific email campaign history Get specific email campaign history @param email_campaign_id Allowed email campaign id @param [Hash] opts the optional parameters @option opts [Integer] :date_from Start date @option opts [Integer] :date_to End date @option opts [Integer] :page Page number (default to 1) @option opts [Integer] :limit Number of records per page (default to 10) @return [String]

# File lib/clicksend_client/api/email_marketing_api.rb, line 311
def email_campaign_history_get(email_campaign_id, opts = {})
  data, _status_code, _headers = email_campaign_history_get_with_http_info(email_campaign_id, opts)
  data
end
email_campaign_history_get_with_http_info(email_campaign_id, opts = {}) click to toggle source

Get specific email campaign history Get specific email campaign history @param email_campaign_id Allowed email campaign id @param [Hash] opts the optional parameters @option opts [Integer] :date_from Start date @option opts [Integer] :date_to End date @option opts [Integer] :page Page number @option opts [Integer] :limit Number of records per page @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers

# File lib/clicksend_client/api/email_marketing_api.rb, line 325
def email_campaign_history_get_with_http_info(email_campaign_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EmailMarketingApi.email_campaign_history_get ...'
  end
  # verify the required parameter 'email_campaign_id' is set
  if @api_client.config.client_side_validation && email_campaign_id.nil?
    fail ArgumentError, "Missing the required parameter 'email_campaign_id' when calling EmailMarketingApi.email_campaign_history_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling EmailMarketingApi.email_campaign_history_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling EmailMarketingApi.email_campaign_history_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/email-campaigns/{email_campaign_id}/history'.sub('{' + 'email_campaign_id' + '}', email_campaign_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'date_from'] = opts[:'date_from'] if !opts[:'date_from'].nil?
  query_params[:'date_to'] = opts[:'date_to'] if !opts[:'date_to'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?

  # header parameters
  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 = {}

  # http body (model)
  post_body = nil
  auth_names = ['BasicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EmailMarketingApi#email_campaign_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
email_campaign_post(email_campaign, opts = {}) click to toggle source

Send email campaign Send email campaign @param email_campaign Email model @param [Hash] opts the optional parameters @return [String]

# File lib/clicksend_client/api/email_marketing_api.rb, line 381
def email_campaign_post(email_campaign, opts = {})
  data, _status_code, _headers = email_campaign_post_with_http_info(email_campaign, opts)
  data
end
email_campaign_post_with_http_info(email_campaign, opts = {}) click to toggle source

Send email campaign Send email campaign @param email_campaign Email model @param [Hash] opts the optional parameters @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers

# File lib/clicksend_client/api/email_marketing_api.rb, line 391
def email_campaign_post_with_http_info(email_campaign, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EmailMarketingApi.email_campaign_post ...'
  end
  # verify the required parameter 'email_campaign' is set
  if @api_client.config.client_side_validation && email_campaign.nil?
    fail ArgumentError, "Missing the required parameter 'email_campaign' when calling EmailMarketingApi.email_campaign_post"
  end
  # resource path
  local_var_path = '/email-campaigns/send'

  # query parameters
  query_params = {}

  # header parameters
  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 = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(email_campaign)
  auth_names = ['BasicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EmailMarketingApi#email_campaign_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
email_campaign_price_post(email_campaign, opts = {}) click to toggle source

Calculate email campaign price Calculate email campaign price @param email_campaign Email model @param [Hash] opts the optional parameters @return [String]

# File lib/clicksend_client/api/email_marketing_api.rb, line 435
def email_campaign_price_post(email_campaign, opts = {})
  data, _status_code, _headers = email_campaign_price_post_with_http_info(email_campaign, opts)
  data
end
email_campaign_price_post_with_http_info(email_campaign, opts = {}) click to toggle source

Calculate email campaign price Calculate email campaign price @param email_campaign Email model @param [Hash] opts the optional parameters @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers

# File lib/clicksend_client/api/email_marketing_api.rb, line 445
def email_campaign_price_post_with_http_info(email_campaign, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EmailMarketingApi.email_campaign_price_post ...'
  end
  # verify the required parameter 'email_campaign' is set
  if @api_client.config.client_side_validation && email_campaign.nil?
    fail ArgumentError, "Missing the required parameter 'email_campaign' when calling EmailMarketingApi.email_campaign_price_post"
  end
  # resource path
  local_var_path = '/email-campaigns/price'

  # query parameters
  query_params = {}

  # header parameters
  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 = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(email_campaign)
  auth_names = ['BasicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EmailMarketingApi#email_campaign_price_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
email_campaign_put(email_campaign_id, email_campaign, opts = {}) click to toggle source

Edit email campaign Edit email campaign @param email_campaign_id Allowed email campaign id @param email_campaign Email model @param [Hash] opts the optional parameters @return [String]

# File lib/clicksend_client/api/email_marketing_api.rb, line 490
def email_campaign_put(email_campaign_id, email_campaign, opts = {})
  data, _status_code, _headers = email_campaign_put_with_http_info(email_campaign_id, email_campaign, opts)
  data
end
email_campaign_put_with_http_info(email_campaign_id, email_campaign, opts = {}) click to toggle source

Edit email campaign Edit email campaign @param email_campaign_id Allowed email campaign id @param email_campaign Email model @param [Hash] opts the optional parameters @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers

# File lib/clicksend_client/api/email_marketing_api.rb, line 501
def email_campaign_put_with_http_info(email_campaign_id, email_campaign, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EmailMarketingApi.email_campaign_put ...'
  end
  # verify the required parameter 'email_campaign_id' is set
  if @api_client.config.client_side_validation && email_campaign_id.nil?
    fail ArgumentError, "Missing the required parameter 'email_campaign_id' when calling EmailMarketingApi.email_campaign_put"
  end
  # verify the required parameter 'email_campaign' is set
  if @api_client.config.client_side_validation && email_campaign.nil?
    fail ArgumentError, "Missing the required parameter 'email_campaign' when calling EmailMarketingApi.email_campaign_put"
  end
  # resource path
  local_var_path = '/email-campaigns/{email_campaign_id}'.sub('{' + 'email_campaign_id' + '}', email_campaign_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  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 = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(email_campaign)
  auth_names = ['BasicAuth']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EmailMarketingApi#email_campaign_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
email_campaigns_get(opts = {}) click to toggle source

Get all email campaigns Get all email campaigns @param [Hash] opts the optional parameters @option opts [Integer] :page Page number (default to 1) @option opts [Integer] :limit Number of records per page (default to 10) @return [String]

# File lib/clicksend_client/api/email_marketing_api.rb, line 550
def email_campaigns_get(opts = {})
  data, _status_code, _headers = email_campaigns_get_with_http_info(opts)
  data
end
email_campaigns_get_with_http_info(opts = {}) click to toggle source

Get all email campaigns Get all email campaigns @param [Hash] opts the optional parameters @option opts [Integer] :page Page number @option opts [Integer] :limit Number of records per page @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers

# File lib/clicksend_client/api/email_marketing_api.rb, line 561
def email_campaigns_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EmailMarketingApi.email_campaigns_get ...'
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling EmailMarketingApi.email_campaigns_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling EmailMarketingApi.email_campaigns_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/email-campaigns'

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

  # header parameters
  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 = {}

  # http body (model)
  post_body = nil
  auth_names = ['BasicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EmailMarketingApi#email_campaigns_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
send_verification_token_get(email_address_id, opts = {}) click to toggle source

Send verification token Send verification token @param email_address_id Allowed email address id @param [Hash] opts the optional parameters @return [String]

# File lib/clicksend_client/api/email_marketing_api.rb, line 611
def send_verification_token_get(email_address_id, opts = {})
  data, _status_code, _headers = send_verification_token_get_with_http_info(email_address_id, opts)
  data
end
send_verification_token_get_with_http_info(email_address_id, opts = {}) click to toggle source

Send verification token Send verification token @param email_address_id Allowed email address id @param [Hash] opts the optional parameters @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers

# File lib/clicksend_client/api/email_marketing_api.rb, line 621
def send_verification_token_get_with_http_info(email_address_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EmailMarketingApi.send_verification_token_get ...'
  end
  # verify the required parameter 'email_address_id' is set
  if @api_client.config.client_side_validation && email_address_id.nil?
    fail ArgumentError, "Missing the required parameter 'email_address_id' when calling EmailMarketingApi.send_verification_token_get"
  end
  # resource path
  local_var_path = '/email/address-verify/{email_address_id}/send'.sub('{' + 'email_address_id' + '}', email_address_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  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 = {}

  # http body (model)
  post_body = nil
  auth_names = ['BasicAuth']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EmailMarketingApi#send_verification_token_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
specific_allowed_email_address_delete(email_address_id, opts = {}) click to toggle source

Delete specific email address Delete specific email address @param email_address_id Allowed email address id @param [Hash] opts the optional parameters @return [String]

# File lib/clicksend_client/api/email_marketing_api.rb, line 665
def specific_allowed_email_address_delete(email_address_id, opts = {})
  data, _status_code, _headers = specific_allowed_email_address_delete_with_http_info(email_address_id, opts)
  data
end
specific_allowed_email_address_delete_with_http_info(email_address_id, opts = {}) click to toggle source

Delete specific email address Delete specific email address @param email_address_id Allowed email address id @param [Hash] opts the optional parameters @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers

# File lib/clicksend_client/api/email_marketing_api.rb, line 675
def specific_allowed_email_address_delete_with_http_info(email_address_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EmailMarketingApi.specific_allowed_email_address_delete ...'
  end
  # verify the required parameter 'email_address_id' is set
  if @api_client.config.client_side_validation && email_address_id.nil?
    fail ArgumentError, "Missing the required parameter 'email_address_id' when calling EmailMarketingApi.specific_allowed_email_address_delete"
  end
  # resource path
  local_var_path = '/email/addresses/{email_address_id}'.sub('{' + 'email_address_id' + '}', email_address_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  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 = {}

  # http body (model)
  post_body = nil
  auth_names = ['BasicAuth']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EmailMarketingApi#specific_allowed_email_address_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
specific_allowed_email_address_get(email_address_id, opts = {}) click to toggle source

Get specific email address Get specific email address @param email_address_id Allowed email address id @param [Hash] opts the optional parameters @return [String]

# File lib/clicksend_client/api/email_marketing_api.rb, line 719
def specific_allowed_email_address_get(email_address_id, opts = {})
  data, _status_code, _headers = specific_allowed_email_address_get_with_http_info(email_address_id, opts)
  data
end
specific_allowed_email_address_get_with_http_info(email_address_id, opts = {}) click to toggle source

Get specific email address Get specific email address @param email_address_id Allowed email address id @param [Hash] opts the optional parameters @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers

# File lib/clicksend_client/api/email_marketing_api.rb, line 729
def specific_allowed_email_address_get_with_http_info(email_address_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EmailMarketingApi.specific_allowed_email_address_get ...'
  end
  # verify the required parameter 'email_address_id' is set
  if @api_client.config.client_side_validation && email_address_id.nil?
    fail ArgumentError, "Missing the required parameter 'email_address_id' when calling EmailMarketingApi.specific_allowed_email_address_get"
  end
  # resource path
  local_var_path = '/email/addresses/{email_address_id}'.sub('{' + 'email_address_id' + '}', email_address_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  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 = {}

  # http body (model)
  post_body = nil
  auth_names = ['BasicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EmailMarketingApi#specific_allowed_email_address_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
verify_allowed_email_address_get(email_address_id, activation_token, opts = {}) click to toggle source

Verify email address using verification token Verify email address using verification token @param email_address_id Allowed email address id @param activation_token Your activation token. @param [Hash] opts the optional parameters @return [String]

# File lib/clicksend_client/api/email_marketing_api.rb, line 774
def verify_allowed_email_address_get(email_address_id, activation_token, opts = {})
  data, _status_code, _headers = verify_allowed_email_address_get_with_http_info(email_address_id, activation_token, opts)
  data
end
verify_allowed_email_address_get_with_http_info(email_address_id, activation_token, opts = {}) click to toggle source

Verify email address using verification token Verify email address using verification token @param email_address_id Allowed email address id @param activation_token Your activation token. @param [Hash] opts the optional parameters @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers

# File lib/clicksend_client/api/email_marketing_api.rb, line 785
def verify_allowed_email_address_get_with_http_info(email_address_id, activation_token, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EmailMarketingApi.verify_allowed_email_address_get ...'
  end
  # verify the required parameter 'email_address_id' is set
  if @api_client.config.client_side_validation && email_address_id.nil?
    fail ArgumentError, "Missing the required parameter 'email_address_id' when calling EmailMarketingApi.verify_allowed_email_address_get"
  end
  # verify the required parameter 'activation_token' is set
  if @api_client.config.client_side_validation && activation_token.nil?
    fail ArgumentError, "Missing the required parameter 'activation_token' when calling EmailMarketingApi.verify_allowed_email_address_get"
  end
  # resource path
  local_var_path = '/email/address-verify/{email_address_id}/verify/{activation_token}'.sub('{' + 'email_address_id' + '}', email_address_id.to_s).sub('{' + 'activation_token' + '}', activation_token.to_s)

  # query parameters
  query_params = {}

  # header parameters
  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 = {}

  # http body (model)
  post_body = nil
  auth_names = ['BasicAuth']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EmailMarketingApi#verify_allowed_email_address_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end