class TalonOne::ManagementApi

Attributes

api_client[RW]

Public Class Methods

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

Public Instance Methods

add_loyalty_points(program_id, integration_id, body, opts = {}) click to toggle source

Add points in a certain loyalty program for the specified customer @param program_id [String] @param integration_id [String] @param body [LoyaltyPoints] @param [Hash] opts the optional parameters @return [nil]

# File lib/talon_one/api/management_api.rb, line 28
def add_loyalty_points(program_id, integration_id, body, opts = {})
  add_loyalty_points_with_http_info(program_id, integration_id, body, opts)
  nil
end
add_loyalty_points_with_http_info(program_id, integration_id, body, opts = {}) click to toggle source

Add points in a certain loyalty program for the specified customer @param program_id [String] @param integration_id [String] @param body [LoyaltyPoints] @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 39
def add_loyalty_points_with_http_info(program_id, integration_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.add_loyalty_points ...'
  end
  # verify the required parameter 'program_id' is set
  if @api_client.config.client_side_validation && program_id.nil?
    fail ArgumentError, "Missing the required parameter 'program_id' when calling ManagementApi.add_loyalty_points"
  end
  # verify the required parameter 'integration_id' is set
  if @api_client.config.client_side_validation && integration_id.nil?
    fail ArgumentError, "Missing the required parameter 'integration_id' when calling ManagementApi.add_loyalty_points"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling ManagementApi.add_loyalty_points"
  end
  # resource path
  local_var_path = '/v1/loyalty_programs/{programID}/profile/{integrationID}/add_points'.sub('{' + 'programID' + '}', CGI.escape(program_id.to_s)).sub('{' + 'integrationID' + '}', CGI.escape(integration_id.to_s))

  # 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(['application/json'])

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

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

  # return_type
  return_type = opts[:return_type] 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ManagementApi#add_loyalty_points\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
copy_campaign_to_applications(application_id, campaign_id, body, opts = {}) click to toggle source

Copy the campaign into every specified application Copy the campaign into every specified application. @param application_id [Integer] @param campaign_id [Integer] @param body [CampaignCopy] @param [Hash] opts the optional parameters @return [InlineResponse2002]

# File lib/talon_one/api/management_api.rb, line 101
def copy_campaign_to_applications(application_id, campaign_id, body, opts = {})
  data, _status_code, _headers = copy_campaign_to_applications_with_http_info(application_id, campaign_id, body, opts)
  data
end
copy_campaign_to_applications_with_http_info(application_id, campaign_id, body, opts = {}) click to toggle source

Copy the campaign into every specified application Copy the campaign into every specified application. @param application_id [Integer] @param campaign_id [Integer] @param body [CampaignCopy] @param [Hash] opts the optional parameters @return [Array<(InlineResponse2002, Integer, Hash)>] InlineResponse2002 data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 113
def copy_campaign_to_applications_with_http_info(application_id, campaign_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.copy_campaign_to_applications ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.copy_campaign_to_applications"
  end
  # verify the required parameter 'campaign_id' is set
  if @api_client.config.client_side_validation && campaign_id.nil?
    fail ArgumentError, "Missing the required parameter 'campaign_id' when calling ManagementApi.copy_campaign_to_applications"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling ManagementApi.copy_campaign_to_applications"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/copy'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s)).sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.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'])
  # 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[:body] || @api_client.object_to_http_body(body) 

  # return_type
  return_type = opts[:return_type] || 'InlineResponse2002' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#copy_campaign_to_applications\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_additional_cost(body, opts = {}) click to toggle source

Define a new additional cost Defines a new _additional cost_ in this account. These additional costs are shared across all applications in your account, and are never required. @param body [NewAdditionalCost] @param [Hash] opts the optional parameters @return [AccountAdditionalCost]

# File lib/talon_one/api/management_api.rb, line 175
def create_additional_cost(body, opts = {})
  data, _status_code, _headers = create_additional_cost_with_http_info(body, opts)
  data
end
create_additional_cost_with_http_info(body, opts = {}) click to toggle source

Define a new additional cost Defines a new _additional cost_ in this account. These additional costs are shared across all applications in your account, and are never required. @param body [NewAdditionalCost] @param [Hash] opts the optional parameters @return [Array<(AccountAdditionalCost, Integer, Hash)>] AccountAdditionalCost data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 185
def create_additional_cost_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.create_additional_cost ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling ManagementApi.create_additional_cost"
  end
  # resource path
  local_var_path = '/v1/additional_costs'

  # 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[:body] || @api_client.object_to_http_body(body) 

  # return_type
  return_type = opts[:return_type] || 'AccountAdditionalCost' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#create_additional_cost\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_attribute(body, opts = {}) click to toggle source

Define a new custom attribute Defines a new _custom attribute_ in this account. Custom attributes allow you to attach new fields to Talon.One domain objects like campaigns, coupons, customers and so on. These attributes can then be given values when creating / updating these objects, and these values can be used in your campaign rules. For example, you could define a `zipCode` field for customer sessions, and add a rule to your campaign that only allows certain ZIP codes. These attributes are shared across all applications in your account, and are never required. @param body [NewAttribute] @param [Hash] opts the optional parameters @return [Attribute]

# File lib/talon_one/api/management_api.rb, line 239
def create_attribute(body, opts = {})
  data, _status_code, _headers = create_attribute_with_http_info(body, opts)
  data
end
create_attribute_with_http_info(body, opts = {}) click to toggle source

Define a new custom attribute Defines a new _custom attribute_ in this account. Custom attributes allow you to attach new fields to Talon.One domain objects like campaigns, coupons, customers and so on. These attributes can then be given values when creating / updating these objects, and these values can be used in your campaign rules. For example, you could define a &#x60;zipCode&#x60; field for customer sessions, and add a rule to your campaign that only allows certain ZIP codes. These attributes are shared across all applications in your account, and are never required. @param body [NewAttribute] @param [Hash] opts the optional parameters @return [Array<(Attribute, Integer, Hash)>] Attribute data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 249
def create_attribute_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.create_attribute ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling ManagementApi.create_attribute"
  end
  # resource path
  local_var_path = '/v1/attributes'

  # 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[:body] || @api_client.object_to_http_body(body) 

  # return_type
  return_type = opts[:return_type] || 'Attribute' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#create_attribute\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_campaign(application_id, body, opts = {}) click to toggle source

Create a Campaign @param application_id [Integer] @param body [NewCampaign] @param [Hash] opts the optional parameters @return [Campaign]

# File lib/talon_one/api/management_api.rb, line 303
def create_campaign(application_id, body, opts = {})
  data, _status_code, _headers = create_campaign_with_http_info(application_id, body, opts)
  data
end
create_campaign_with_http_info(application_id, body, opts = {}) click to toggle source

Create a Campaign @param application_id [Integer] @param body [NewCampaign] @param [Hash] opts the optional parameters @return [Array<(Campaign, Integer, Hash)>] Campaign data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 313
def create_campaign_with_http_info(application_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.create_campaign ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.create_campaign"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling ManagementApi.create_campaign"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.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'])
  # 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[:body] || @api_client.object_to_http_body(body) 

  # return_type
  return_type = opts[:return_type] || 'Campaign' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#create_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_coupons(application_id, campaign_id, body, opts = {}) click to toggle source

Create Coupons Create coupons according to some pattern. Up to 20.000 coupons can be created without a unique prefix. When a unique prefix is provided, up to 200.000 coupons can be created. @param application_id [Integer] @param campaign_id [Integer] @param body [NewCoupons] @param [Hash] opts the optional parameters @option opts [String] :silent If set to &#x60;yes&#x60;, response will be an empty 204, otherwise a list of integration states will be generated (up to 1000). @return [InlineResponse2004]

# File lib/talon_one/api/management_api.rb, line 374
def create_coupons(application_id, campaign_id, body, opts = {})
  data, _status_code, _headers = create_coupons_with_http_info(application_id, campaign_id, body, opts)
  data
end
create_coupons_for_multiple_recipients(application_id, campaign_id, body, opts = {}) click to toggle source

Create Coupons for Multiple Recipients Create coupons according to some pattern for up to 1000 recipients. @param application_id [Integer] @param campaign_id [Integer] @param body [NewCouponsForMultipleRecipients] @param [Hash] opts the optional parameters @option opts [String] :silent If set to &#x60;yes&#x60;, response will be an empty 204, otherwise a list of integration states will be generated (up to 1000). @return [InlineResponse2004]

# File lib/talon_one/api/management_api.rb, line 453
def create_coupons_for_multiple_recipients(application_id, campaign_id, body, opts = {})
  data, _status_code, _headers = create_coupons_for_multiple_recipients_with_http_info(application_id, campaign_id, body, opts)
  data
end
create_coupons_for_multiple_recipients_with_http_info(application_id, campaign_id, body, opts = {}) click to toggle source

Create Coupons for Multiple Recipients Create coupons according to some pattern for up to 1000 recipients. @param application_id [Integer] @param campaign_id [Integer] @param body [NewCouponsForMultipleRecipients] @param [Hash] opts the optional parameters @option opts [String] :silent If set to &#x60;yes&#x60;, response will be an empty 204, otherwise a list of integration states will be generated (up to 1000). @return [Array<(InlineResponse2004, Integer, Hash)>] InlineResponse2004 data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 466
def create_coupons_for_multiple_recipients_with_http_info(application_id, campaign_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.create_coupons_for_multiple_recipients ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.create_coupons_for_multiple_recipients"
  end
  # verify the required parameter 'campaign_id' is set
  if @api_client.config.client_side_validation && campaign_id.nil?
    fail ArgumentError, "Missing the required parameter 'campaign_id' when calling ManagementApi.create_coupons_for_multiple_recipients"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling ManagementApi.create_coupons_for_multiple_recipients"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/coupons_with_recipients'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s)).sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s))

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

  # 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[:body] || @api_client.object_to_http_body(body) 

  # return_type
  return_type = opts[:return_type] || 'InlineResponse2004' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#create_coupons_for_multiple_recipients\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_coupons_with_http_info(application_id, campaign_id, body, opts = {}) click to toggle source

Create Coupons Create coupons according to some pattern. Up to 20.000 coupons can be created without a unique prefix. When a unique prefix is provided, up to 200.000 coupons can be created. @param application_id [Integer] @param campaign_id [Integer] @param body [NewCoupons] @param [Hash] opts the optional parameters @option opts [String] :silent If set to &#x60;yes&#x60;, response will be an empty 204, otherwise a list of integration states will be generated (up to 1000). @return [Array<(InlineResponse2004, Integer, Hash)>] InlineResponse2004 data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 387
def create_coupons_with_http_info(application_id, campaign_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.create_coupons ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.create_coupons"
  end
  # verify the required parameter 'campaign_id' is set
  if @api_client.config.client_side_validation && campaign_id.nil?
    fail ArgumentError, "Missing the required parameter 'campaign_id' when calling ManagementApi.create_coupons"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling ManagementApi.create_coupons"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/coupons'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s)).sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s))

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

  # 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[:body] || @api_client.object_to_http_body(body) 

  # return_type
  return_type = opts[:return_type] || 'InlineResponse2004' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#create_coupons\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_password_recovery_email(body, opts = {}) click to toggle source

Request a password reset Sends an email with a password recovery link to the email of an existing account. @param body [NewPasswordEmail] @param [Hash] opts the optional parameters @return [NewPasswordEmail]

# File lib/talon_one/api/management_api.rb, line 529
def create_password_recovery_email(body, opts = {})
  data, _status_code, _headers = create_password_recovery_email_with_http_info(body, opts)
  data
end
create_password_recovery_email_with_http_info(body, opts = {}) click to toggle source

Request a password reset Sends an email with a password recovery link to the email of an existing account. @param body [NewPasswordEmail] @param [Hash] opts the optional parameters @return [Array<(NewPasswordEmail, Integer, Hash)>] NewPasswordEmail data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 539
def create_password_recovery_email_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.create_password_recovery_email ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling ManagementApi.create_password_recovery_email"
  end
  # resource path
  local_var_path = '/v1/password_recovery_emails'

  # 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[:body] || @api_client.object_to_http_body(body) 

  # return_type
  return_type = opts[:return_type] || 'NewPasswordEmail' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#create_password_recovery_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_ruleset(application_id, campaign_id, body, opts = {}) click to toggle source

Create a Ruleset @param application_id [Integer] @param campaign_id [Integer] @param body [NewRuleset] @param [Hash] opts the optional parameters @return [Ruleset]

# File lib/talon_one/api/management_api.rb, line 594
def create_ruleset(application_id, campaign_id, body, opts = {})
  data, _status_code, _headers = create_ruleset_with_http_info(application_id, campaign_id, body, opts)
  data
end
create_ruleset_with_http_info(application_id, campaign_id, body, opts = {}) click to toggle source

Create a Ruleset @param application_id [Integer] @param campaign_id [Integer] @param body [NewRuleset] @param [Hash] opts the optional parameters @return [Array<(Ruleset, Integer, Hash)>] Ruleset data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 605
def create_ruleset_with_http_info(application_id, campaign_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.create_ruleset ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.create_ruleset"
  end
  # verify the required parameter 'campaign_id' is set
  if @api_client.config.client_side_validation && campaign_id.nil?
    fail ArgumentError, "Missing the required parameter 'campaign_id' when calling ManagementApi.create_ruleset"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling ManagementApi.create_ruleset"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/rulesets'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s)).sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.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'])
  # 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[:body] || @api_client.object_to_http_body(body) 

  # return_type
  return_type = opts[:return_type] || 'Ruleset' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#create_ruleset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_session(body, opts = {}) click to toggle source

Create a Session @param body [LoginParams] @param [Hash] opts the optional parameters @return [Session]

# File lib/talon_one/api/management_api.rb, line 666
def create_session(body, opts = {})
  data, _status_code, _headers = create_session_with_http_info(body, opts)
  data
end
create_session_with_http_info(body, opts = {}) click to toggle source

Create a Session @param body [LoginParams] @param [Hash] opts the optional parameters @return [Array<(Session, Integer, Hash)>] Session data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 675
def create_session_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.create_session ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling ManagementApi.create_session"
  end
  # resource path
  local_var_path = '/v1/sessions'

  # 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[:body] || @api_client.object_to_http_body(body) 

  # return_type
  return_type = opts[:return_type] || 'Session' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#create_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_campaign(application_id, campaign_id, opts = {}) click to toggle source

Delete a Campaign @param application_id [Integer] @param campaign_id [Integer] @param [Hash] opts the optional parameters @return [nil]

# File lib/talon_one/api/management_api.rb, line 729
def delete_campaign(application_id, campaign_id, opts = {})
  delete_campaign_with_http_info(application_id, campaign_id, opts)
  nil
end
delete_campaign_with_http_info(application_id, campaign_id, opts = {}) click to toggle source

Delete a Campaign @param application_id [Integer] @param campaign_id [Integer] @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 739
def delete_campaign_with_http_info(application_id, campaign_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.delete_campaign ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.delete_campaign"
  end
  # verify the required parameter 'campaign_id' is set
  if @api_client.config.client_side_validation && campaign_id.nil?
    fail ArgumentError, "Missing the required parameter 'campaign_id' when calling ManagementApi.delete_campaign"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s)).sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.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[:body] 

  # return_type
  return_type = opts[:return_type] 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#delete_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_coupon(application_id, campaign_id, coupon_id, opts = {}) click to toggle source

Delete one Coupon @param application_id [Integer] @param campaign_id [Integer] @param coupon_id [String] The ID of the coupon code to delete @param [Hash] opts the optional parameters @return [nil]

# File lib/talon_one/api/management_api.rb, line 794
def delete_coupon(application_id, campaign_id, coupon_id, opts = {})
  delete_coupon_with_http_info(application_id, campaign_id, coupon_id, opts)
  nil
end
delete_coupon_with_http_info(application_id, campaign_id, coupon_id, opts = {}) click to toggle source

Delete one Coupon @param application_id [Integer] @param campaign_id [Integer] @param coupon_id [String] The ID of the coupon code to delete @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 805
def delete_coupon_with_http_info(application_id, campaign_id, coupon_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.delete_coupon ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.delete_coupon"
  end
  # verify the required parameter 'campaign_id' is set
  if @api_client.config.client_side_validation && campaign_id.nil?
    fail ArgumentError, "Missing the required parameter 'campaign_id' when calling ManagementApi.delete_coupon"
  end
  # verify the required parameter 'coupon_id' is set
  if @api_client.config.client_side_validation && coupon_id.nil?
    fail ArgumentError, "Missing the required parameter 'coupon_id' when calling ManagementApi.delete_coupon"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/coupons/{couponId}'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s)).sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s)).sub('{' + 'couponId' + '}', CGI.escape(coupon_id.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[:body] 

  # return_type
  return_type = opts[:return_type] 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#delete_coupon\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_coupons(application_id, campaign_id, opts = {}) click to toggle source

Delete Coupons @param application_id [Integer] @param campaign_id [Integer] @param [Hash] opts the optional parameters @option opts [String] :value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :starts_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :starts_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :expires_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :expires_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [String] :valid Either "expired&quot;, "validNow&quot;, or "validFuture&quot;. The first option matches coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry date is null or in the future, the third matches coupons in which start date is set and in the future. @option opts [String] :batch_id Filter results by batches of coupons @option opts [String] :usable Either "true&quot; or "false&quot;. If "true&quot;, only coupons where &#x60;usageCounter &lt; usageLimit&#x60; will be returned, "false&quot; will return only coupons where &#x60;usageCounter &gt;&#x3D; usageLimit&#x60;. @option opts [Integer] :referral_id Filter the results by matching them with the Id of a referral, that meaning the coupons that had been created as an effect of the usage of a referral code. @option opts [String] :recipient_integration_id Filter results by match with a profile id specified in the coupon&#39;s RecipientIntegrationId field @option opts [Boolean] :exact_match Filter results to an exact case-insensitive matching against the coupon code (default to false) @return [nil]

# File lib/talon_one/api/management_api.rb, line 876
def delete_coupons(application_id, campaign_id, opts = {})
  delete_coupons_with_http_info(application_id, campaign_id, opts)
  nil
end
delete_coupons_with_http_info(application_id, campaign_id, opts = {}) click to toggle source

Delete Coupons @param application_id [Integer] @param campaign_id [Integer] @param [Hash] opts the optional parameters @option opts [String] :value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :starts_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :starts_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :expires_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :expires_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [String] :valid Either "expired&quot;, "validNow&quot;, or "validFuture&quot;. The first option matches coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry date is null or in the future, the third matches coupons in which start date is set and in the future. @option opts [String] :batch_id Filter results by batches of coupons @option opts [String] :usable Either "true&quot; or "false&quot;. If "true&quot;, only coupons where &#x60;usageCounter &lt; usageLimit&#x60; will be returned, "false&quot; will return only coupons where &#x60;usageCounter &gt;&#x3D; usageLimit&#x60;. @option opts [Integer] :referral_id Filter the results by matching them with the Id of a referral, that meaning the coupons that had been created as an effect of the usage of a referral code. @option opts [String] :recipient_integration_id Filter results by match with a profile id specified in the coupon&#39;s RecipientIntegrationId field @option opts [Boolean] :exact_match Filter results to an exact case-insensitive matching against the coupon code @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 899
def delete_coupons_with_http_info(application_id, campaign_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.delete_coupons ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.delete_coupons"
  end
  # verify the required parameter 'campaign_id' is set
  if @api_client.config.client_side_validation && campaign_id.nil?
    fail ArgumentError, "Missing the required parameter 'campaign_id' when calling ManagementApi.delete_coupons"
  end
  allowable_values = ["expired", "validNow", "validFuture"]
  if @api_client.config.client_side_validation && opts[:'valid'] && !allowable_values.include?(opts[:'valid'])
    fail ArgumentError, "invalid value for \"valid\", must be one of #{allowable_values}"
  end
  allowable_values = ["true", "false"]
  if @api_client.config.client_side_validation && opts[:'usable'] && !allowable_values.include?(opts[:'usable'])
    fail ArgumentError, "invalid value for \"usable\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/coupons'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s)).sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'value'] = opts[:'value'] if !opts[:'value'].nil?
  query_params[:'createdBefore'] = opts[:'created_before'] if !opts[:'created_before'].nil?
  query_params[:'createdAfter'] = opts[:'created_after'] if !opts[:'created_after'].nil?
  query_params[:'startsAfter'] = opts[:'starts_after'] if !opts[:'starts_after'].nil?
  query_params[:'startsBefore'] = opts[:'starts_before'] if !opts[:'starts_before'].nil?
  query_params[:'expiresAfter'] = opts[:'expires_after'] if !opts[:'expires_after'].nil?
  query_params[:'expiresBefore'] = opts[:'expires_before'] if !opts[:'expires_before'].nil?
  query_params[:'valid'] = opts[:'valid'] if !opts[:'valid'].nil?
  query_params[:'batchId'] = opts[:'batch_id'] if !opts[:'batch_id'].nil?
  query_params[:'usable'] = opts[:'usable'] if !opts[:'usable'].nil?
  query_params[:'referralId'] = opts[:'referral_id'] if !opts[:'referral_id'].nil?
  query_params[:'recipientIntegrationId'] = opts[:'recipient_integration_id'] if !opts[:'recipient_integration_id'].nil?
  query_params[:'exactMatch'] = opts[:'exact_match'] if !opts[:'exact_match'].nil?

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

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

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

  # return_type
  return_type = opts[:return_type] 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#delete_coupons\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_referral(application_id, campaign_id, referral_id, opts = {}) click to toggle source

Delete one Referral @param application_id [Integer] @param campaign_id [Integer] @param referral_id [String] The ID of the referral code to delete @param [Hash] opts the optional parameters @return [nil]

# File lib/talon_one/api/management_api.rb, line 975
def delete_referral(application_id, campaign_id, referral_id, opts = {})
  delete_referral_with_http_info(application_id, campaign_id, referral_id, opts)
  nil
end
delete_referral_with_http_info(application_id, campaign_id, referral_id, opts = {}) click to toggle source

Delete one Referral @param application_id [Integer] @param campaign_id [Integer] @param referral_id [String] The ID of the referral code to delete @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 986
def delete_referral_with_http_info(application_id, campaign_id, referral_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.delete_referral ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.delete_referral"
  end
  # verify the required parameter 'campaign_id' is set
  if @api_client.config.client_side_validation && campaign_id.nil?
    fail ArgumentError, "Missing the required parameter 'campaign_id' when calling ManagementApi.delete_referral"
  end
  # verify the required parameter 'referral_id' is set
  if @api_client.config.client_side_validation && referral_id.nil?
    fail ArgumentError, "Missing the required parameter 'referral_id' when calling ManagementApi.delete_referral"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/referrals/{referralId}'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s)).sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s)).sub('{' + 'referralId' + '}', CGI.escape(referral_id.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[:body] 

  # return_type
  return_type = opts[:return_type] 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#delete_referral\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_ruleset(application_id, campaign_id, ruleset_id, opts = {}) click to toggle source

Delete a Ruleset @param application_id [Integer] @param campaign_id [Integer] @param ruleset_id [Integer] @param [Hash] opts the optional parameters @return [nil]

# File lib/talon_one/api/management_api.rb, line 1045
def delete_ruleset(application_id, campaign_id, ruleset_id, opts = {})
  delete_ruleset_with_http_info(application_id, campaign_id, ruleset_id, opts)
  nil
end
delete_ruleset_with_http_info(application_id, campaign_id, ruleset_id, opts = {}) click to toggle source

Delete a Ruleset @param application_id [Integer] @param campaign_id [Integer] @param ruleset_id [Integer] @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 1056
def delete_ruleset_with_http_info(application_id, campaign_id, ruleset_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.delete_ruleset ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.delete_ruleset"
  end
  # verify the required parameter 'campaign_id' is set
  if @api_client.config.client_side_validation && campaign_id.nil?
    fail ArgumentError, "Missing the required parameter 'campaign_id' when calling ManagementApi.delete_ruleset"
  end
  # verify the required parameter 'ruleset_id' is set
  if @api_client.config.client_side_validation && ruleset_id.nil?
    fail ArgumentError, "Missing the required parameter 'ruleset_id' when calling ManagementApi.delete_ruleset"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/rulesets/{rulesetId}'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s)).sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s)).sub('{' + 'rulesetId' + '}', CGI.escape(ruleset_id.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[:body] 

  # return_type
  return_type = opts[:return_type] 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#delete_ruleset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
destroy_session(opts = {}) click to toggle source

Destroy a Session @param [Hash] opts the optional parameters @return [nil]

# File lib/talon_one/api/management_api.rb, line 1112
def destroy_session(opts = {})
  destroy_session_with_http_info(opts)
  nil
end
destroy_session_with_http_info(opts = {}) click to toggle source

Destroy a Session @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 1120
def destroy_session_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.destroy_session ...'
  end
  # resource path
  local_var_path = '/v1/sessions'

  # 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[:body] 

  # return_type
  return_type = opts[:return_type] 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#destroy_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
export_coupons(application_id, opts = {}) click to toggle source

Export Coupons to a CSV file Download a file with the coupons that match the given attributes. @param application_id [Integer] @param [Hash] opts the optional parameters @option opts [Float] :campaign_id Filter results by campaign. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @option opts [String] :value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [String] :valid Either "expired&quot;, "validNow&quot;, or "validFuture&quot;. The first option matches coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry date is null or in the future, the third matches coupons in which start date is set and in the future. @option opts [String] :usable Either "true&quot; or "false&quot;. If "true&quot;, only coupons where &#x60;usageCounter &lt; usageLimit&#x60; will be returned, "false&quot; will return only coupons where &#x60;usageCounter &gt;&#x3D; usageLimit&#x60;. @option opts [Integer] :referral_id Filter the results by matching them with the Id of a referral, that meaning the coupons that had been created as an effect of the usage of a referral code. @option opts [String] :recipient_integration_id Filter results by match with a profile id specified in the coupon&#39;s RecipientIntegrationId field @option opts [String] :batch_id Filter results by batches of coupons @option opts [Boolean] :exact_match Filter results to an exact case-insensitive matching against the coupon code (default to false) @option opts [String] :date_format Determines the format of dates in the export document. @option opts [String] :campaign_state Filter results by the state of the campaign. @return [String]

# File lib/talon_one/api/management_api.rb, line 1179
def export_coupons(application_id, opts = {})
  data, _status_code, _headers = export_coupons_with_http_info(application_id, opts)
  data
end
export_coupons_with_http_info(application_id, opts = {}) click to toggle source

Export Coupons to a CSV file Download a file with the coupons that match the given attributes. @param application_id [Integer] @param [Hash] opts the optional parameters @option opts [Float] :campaign_id Filter results by campaign. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @option opts [String] :value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [String] :valid Either "expired&quot;, "validNow&quot;, or "validFuture&quot;. The first option matches coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry date is null or in the future, the third matches coupons in which start date is set and in the future. @option opts [String] :usable Either "true&quot; or "false&quot;. If "true&quot;, only coupons where &#x60;usageCounter &lt; usageLimit&#x60; will be returned, "false&quot; will return only coupons where &#x60;usageCounter &gt;&#x3D; usageLimit&#x60;. @option opts [Integer] :referral_id Filter the results by matching them with the Id of a referral, that meaning the coupons that had been created as an effect of the usage of a referral code. @option opts [String] :recipient_integration_id Filter results by match with a profile id specified in the coupon&#39;s RecipientIntegrationId field @option opts [String] :batch_id Filter results by batches of coupons @option opts [Boolean] :exact_match Filter results to an exact case-insensitive matching against the coupon code @option opts [String] :date_format Determines the format of dates in the export document. @option opts [String] :campaign_state Filter results by the state of the campaign. @return [Array<(String, Integer, Hash)>] String data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 1202
def export_coupons_with_http_info(application_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.export_coupons ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.export_coupons"
  end
  allowable_values = ["expired", "validNow", "validFuture"]
  if @api_client.config.client_side_validation && opts[:'valid'] && !allowable_values.include?(opts[:'valid'])
    fail ArgumentError, "invalid value for \"valid\", must be one of #{allowable_values}"
  end
  allowable_values = ["true", "false"]
  if @api_client.config.client_side_validation && opts[:'usable'] && !allowable_values.include?(opts[:'usable'])
    fail ArgumentError, "invalid value for \"usable\", must be one of #{allowable_values}"
  end
  allowable_values = ["excel", "ISO8601"]
  if @api_client.config.client_side_validation && opts[:'date_format'] && !allowable_values.include?(opts[:'date_format'])
    fail ArgumentError, "invalid value for \"date_format\", must be one of #{allowable_values}"
  end
  allowable_values = ["enabled", "disabled", "archived", "draft", "scheduled", "running", "expired"]
  if @api_client.config.client_side_validation && opts[:'campaign_state'] && !allowable_values.include?(opts[:'campaign_state'])
    fail ArgumentError, "invalid value for \"campaign_state\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/export_coupons'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'campaignId'] = opts[:'campaign_id'] if !opts[:'campaign_id'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'value'] = opts[:'value'] if !opts[:'value'].nil?
  query_params[:'createdBefore'] = opts[:'created_before'] if !opts[:'created_before'].nil?
  query_params[:'createdAfter'] = opts[:'created_after'] if !opts[:'created_after'].nil?
  query_params[:'valid'] = opts[:'valid'] if !opts[:'valid'].nil?
  query_params[:'usable'] = opts[:'usable'] if !opts[:'usable'].nil?
  query_params[:'referralId'] = opts[:'referral_id'] if !opts[:'referral_id'].nil?
  query_params[:'recipientIntegrationId'] = opts[:'recipient_integration_id'] if !opts[:'recipient_integration_id'].nil?
  query_params[:'batchId'] = opts[:'batch_id'] if !opts[:'batch_id'].nil?
  query_params[:'exactMatch'] = opts[:'exact_match'] if !opts[:'exact_match'].nil?
  query_params[:'dateFormat'] = opts[:'date_format'] if !opts[:'date_format'].nil?
  query_params[:'campaignState'] = opts[:'campaign_state'] if !opts[:'campaign_state'].nil?

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

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

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

  # return_type
  return_type = opts[:return_type] || 'String' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#export_coupons\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
export_customer_sessions(application_id, opts = {}) click to toggle source

Export Customer Sessions to a CSV file Download a file with the customer sessions that match the request. @param application_id [Integer] @param [Hash] opts the optional parameters @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string. @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string. @option opts [String] :profile_integration_id Only return sessions for the customer that matches this customer integration ID. @option opts [String] :date_format Determines the format of dates in the export document. @option opts [String] :customer_session_state Filter results by state. @return [String]

# File lib/talon_one/api/management_api.rb, line 1288
def export_customer_sessions(application_id, opts = {})
  data, _status_code, _headers = export_customer_sessions_with_http_info(application_id, opts)
  data
end
export_customer_sessions_with_http_info(application_id, opts = {}) click to toggle source

Export Customer Sessions to a CSV file Download a file with the customer sessions that match the request. @param application_id [Integer] @param [Hash] opts the optional parameters @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string. @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string. @option opts [String] :profile_integration_id Only return sessions for the customer that matches this customer integration ID. @option opts [String] :date_format Determines the format of dates in the export document. @option opts [String] :customer_session_state Filter results by state. @return [Array<(String, Integer, Hash)>] String data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 1303
def export_customer_sessions_with_http_info(application_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.export_customer_sessions ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.export_customer_sessions"
  end
  allowable_values = ["excel", "ISO8601"]
  if @api_client.config.client_side_validation && opts[:'date_format'] && !allowable_values.include?(opts[:'date_format'])
    fail ArgumentError, "invalid value for \"date_format\", must be one of #{allowable_values}"
  end
  allowable_values = ["open", "closed", "cancelled"]
  if @api_client.config.client_side_validation && opts[:'customer_session_state'] && !allowable_values.include?(opts[:'customer_session_state'])
    fail ArgumentError, "invalid value for \"customer_session_state\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/export_customer_sessions'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'createdBefore'] = opts[:'created_before'] if !opts[:'created_before'].nil?
  query_params[:'createdAfter'] = opts[:'created_after'] if !opts[:'created_after'].nil?
  query_params[:'profileIntegrationId'] = opts[:'profile_integration_id'] if !opts[:'profile_integration_id'].nil?
  query_params[:'dateFormat'] = opts[:'date_format'] if !opts[:'date_format'].nil?
  query_params[:'customerSessionState'] = opts[:'customer_session_state'] if !opts[:'customer_session_state'].nil?

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

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

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

  # return_type
  return_type = opts[:return_type] || 'String' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#export_customer_sessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
export_effects(application_id, opts = {}) click to toggle source

Export triggered Effects to a CSV file Download a file with the triggered effects that match the given attributes. @param application_id [Integer] @param [Hash] opts the optional parameters @option opts [Float] :campaign_id Filter results by campaign. @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [String] :date_format Determines the format of dates in the export document. @return [String]

# File lib/talon_one/api/management_api.rb, line 1372
def export_effects(application_id, opts = {})
  data, _status_code, _headers = export_effects_with_http_info(application_id, opts)
  data
end
export_effects_with_http_info(application_id, opts = {}) click to toggle source

Export triggered Effects to a CSV file Download a file with the triggered effects that match the given attributes. @param application_id [Integer] @param [Hash] opts the optional parameters @option opts [Float] :campaign_id Filter results by campaign. @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [String] :date_format Determines the format of dates in the export document. @return [Array<(String, Integer, Hash)>] String data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 1386
def export_effects_with_http_info(application_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.export_effects ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.export_effects"
  end
  allowable_values = ["excel", "ISO8601"]
  if @api_client.config.client_side_validation && opts[:'date_format'] && !allowable_values.include?(opts[:'date_format'])
    fail ArgumentError, "invalid value for \"date_format\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/export_effects'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'campaignId'] = opts[:'campaign_id'] if !opts[:'campaign_id'].nil?
  query_params[:'createdBefore'] = opts[:'created_before'] if !opts[:'created_before'].nil?
  query_params[:'createdAfter'] = opts[:'created_after'] if !opts[:'created_after'].nil?
  query_params[:'dateFormat'] = opts[:'date_format'] if !opts[:'date_format'].nil?

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

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

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

  # return_type
  return_type = opts[:return_type] || 'String' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#export_effects\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
export_loyalty_balance(program_id, opts = {}) click to toggle source

Export customer loyalty balance to a CSV file Download a file with the balance of each customer in the loyalty program @param program_id [String] @param [Hash] opts the optional parameters @return [String]

# File lib/talon_one/api/management_api.rb, line 1446
def export_loyalty_balance(program_id, opts = {})
  data, _status_code, _headers = export_loyalty_balance_with_http_info(program_id, opts)
  data
end
export_loyalty_balance_with_http_info(program_id, opts = {}) click to toggle source

Export customer loyalty balance to a CSV file Download a file with the balance of each customer in the loyalty program @param program_id [String] @param [Hash] opts the optional parameters @return [Array<(String, Integer, Hash)>] String data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 1456
def export_loyalty_balance_with_http_info(program_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.export_loyalty_balance ...'
  end
  # verify the required parameter 'program_id' is set
  if @api_client.config.client_side_validation && program_id.nil?
    fail ArgumentError, "Missing the required parameter 'program_id' when calling ManagementApi.export_loyalty_balance"
  end
  # resource path
  local_var_path = '/v1/loyalty_programs/{programID}/export_customer_balance'.sub('{' + 'programID' + '}', CGI.escape(program_id.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/csv'])

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

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

  # return_type
  return_type = opts[:return_type] || 'String' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#export_loyalty_balance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
export_loyalty_ledger(range_start, range_end, program_id, integration_id, opts = {}) click to toggle source

Export a customer's loyalty ledger log to a CSV file Download a file with a customer's ledger log in the loyalty program @param range_start [DateTime] Only return results from after this timestamp, must be an RFC3339 timestamp string @param range_end [DateTime] Only return results from before this timestamp, must be an RFC3339 timestamp string @param program_id [String] @param integration_id [String] @param [Hash] opts the optional parameters @option opts [String] :date_format Determines the format of dates in the export document. @return [String]

# File lib/talon_one/api/management_api.rb, line 1512
def export_loyalty_ledger(range_start, range_end, program_id, integration_id, opts = {})
  data, _status_code, _headers = export_loyalty_ledger_with_http_info(range_start, range_end, program_id, integration_id, opts)
  data
end
export_loyalty_ledger_with_http_info(range_start, range_end, program_id, integration_id, opts = {}) click to toggle source

Export a customer&#39;s loyalty ledger log to a CSV file Download a file with a customer&#39;s ledger log in the loyalty program @param range_start [DateTime] Only return results from after this timestamp, must be an RFC3339 timestamp string @param range_end [DateTime] Only return results from before this timestamp, must be an RFC3339 timestamp string @param program_id [String] @param integration_id [String] @param [Hash] opts the optional parameters @option opts [String] :date_format Determines the format of dates in the export document. @return [Array<(String, Integer, Hash)>] String data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 1526
def export_loyalty_ledger_with_http_info(range_start, range_end, program_id, integration_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.export_loyalty_ledger ...'
  end
  # verify the required parameter 'range_start' is set
  if @api_client.config.client_side_validation && range_start.nil?
    fail ArgumentError, "Missing the required parameter 'range_start' when calling ManagementApi.export_loyalty_ledger"
  end
  # verify the required parameter 'range_end' is set
  if @api_client.config.client_side_validation && range_end.nil?
    fail ArgumentError, "Missing the required parameter 'range_end' when calling ManagementApi.export_loyalty_ledger"
  end
  # verify the required parameter 'program_id' is set
  if @api_client.config.client_side_validation && program_id.nil?
    fail ArgumentError, "Missing the required parameter 'program_id' when calling ManagementApi.export_loyalty_ledger"
  end
  # verify the required parameter 'integration_id' is set
  if @api_client.config.client_side_validation && integration_id.nil?
    fail ArgumentError, "Missing the required parameter 'integration_id' when calling ManagementApi.export_loyalty_ledger"
  end
  allowable_values = ["excel", "ISO8601"]
  if @api_client.config.client_side_validation && opts[:'date_format'] && !allowable_values.include?(opts[:'date_format'])
    fail ArgumentError, "invalid value for \"date_format\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/loyalty_programs/{programID}/profile/{integrationID}/export_log'.sub('{' + 'programID' + '}', CGI.escape(program_id.to_s)).sub('{' + 'integrationID' + '}', CGI.escape(integration_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'rangeStart'] = range_start
  query_params[:'rangeEnd'] = range_end
  query_params[:'dateFormat'] = opts[:'date_format'] if !opts[:'date_format'].nil?

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

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

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

  # return_type
  return_type = opts[:return_type] || 'String' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#export_loyalty_ledger\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_access_logs(application_id, range_start, range_end, opts = {}) click to toggle source

Get access logs for application (with total count) @param application_id [Integer] @param range_start [DateTime] Only return results from after this timestamp, must be an RFC3339 timestamp string @param range_end [DateTime] Only return results from before this timestamp, must be an RFC3339 timestamp string @param [Hash] opts the optional parameters @option opts [String] :path Only return results where the request path matches the given regular expression. @option opts [String] :method Only return results where the request method matches the given regular expression. @option opts [String] :status Filter results by HTTP status codes. @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @return [InlineResponse2008]

# File lib/talon_one/api/management_api.rb, line 1604
def get_access_logs(application_id, range_start, range_end, opts = {})
  data, _status_code, _headers = get_access_logs_with_http_info(application_id, range_start, range_end, opts)
  data
end
get_access_logs_with_http_info(application_id, range_start, range_end, opts = {}) click to toggle source

Get access logs for application (with total count) @param application_id [Integer] @param range_start [DateTime] Only return results from after this timestamp, must be an RFC3339 timestamp string @param range_end [DateTime] Only return results from before this timestamp, must be an RFC3339 timestamp string @param [Hash] opts the optional parameters @option opts [String] :path Only return results where the request path matches the given regular expression. @option opts [String] :method Only return results where the request method matches the given regular expression. @option opts [String] :status Filter results by HTTP status codes. @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @return [Array<(InlineResponse2008, Integer, Hash)>] InlineResponse2008 data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 1621
def get_access_logs_with_http_info(application_id, range_start, range_end, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_access_logs ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.get_access_logs"
  end
  # verify the required parameter 'range_start' is set
  if @api_client.config.client_side_validation && range_start.nil?
    fail ArgumentError, "Missing the required parameter 'range_start' when calling ManagementApi.get_access_logs"
  end
  # verify the required parameter 'range_end' is set
  if @api_client.config.client_side_validation && range_end.nil?
    fail ArgumentError, "Missing the required parameter 'range_end' when calling ManagementApi.get_access_logs"
  end
  allowable_values = ["get", "put", "post", "delete", "patch"]
  if @api_client.config.client_side_validation && opts[:'method'] && !allowable_values.include?(opts[:'method'])
    fail ArgumentError, "invalid value for \"method\", must be one of #{allowable_values}"
  end
  allowable_values = ["success", "error"]
  if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
    fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/access_logs'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'rangeStart'] = range_start
  query_params[:'rangeEnd'] = range_end
  query_params[:'path'] = opts[:'path'] if !opts[:'path'].nil?
  query_params[:'method'] = opts[:'method'] if !opts[:'method'].nil?
  query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].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[:body] 

  # return_type
  return_type = opts[:return_type] || 'InlineResponse2008' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_access_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_access_logs_without_total_count(application_id, range_start, range_end, opts = {}) click to toggle source

Get access logs for application @param application_id [Integer] @param range_start [DateTime] Only return results from after this timestamp, must be an RFC3339 timestamp string @param range_end [DateTime] Only return results from before this timestamp, must be an RFC3339 timestamp string @param [Hash] opts the optional parameters @option opts [String] :path Only return results where the request path matches the given regular expression. @option opts [String] :method Only return results where the request method matches the given regular expression. @option opts [String] :status Filter results by HTTP status codes. @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @return [InlineResponse2009]

# File lib/talon_one/api/management_api.rb, line 1704
def get_access_logs_without_total_count(application_id, range_start, range_end, opts = {})
  data, _status_code, _headers = get_access_logs_without_total_count_with_http_info(application_id, range_start, range_end, opts)
  data
end
get_access_logs_without_total_count_with_http_info(application_id, range_start, range_end, opts = {}) click to toggle source

Get access logs for application @param application_id [Integer] @param range_start [DateTime] Only return results from after this timestamp, must be an RFC3339 timestamp string @param range_end [DateTime] Only return results from before this timestamp, must be an RFC3339 timestamp string @param [Hash] opts the optional parameters @option opts [String] :path Only return results where the request path matches the given regular expression. @option opts [String] :method Only return results where the request method matches the given regular expression. @option opts [String] :status Filter results by HTTP status codes. @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @return [Array<(InlineResponse2009, Integer, Hash)>] InlineResponse2009 data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 1721
def get_access_logs_without_total_count_with_http_info(application_id, range_start, range_end, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_access_logs_without_total_count ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.get_access_logs_without_total_count"
  end
  # verify the required parameter 'range_start' is set
  if @api_client.config.client_side_validation && range_start.nil?
    fail ArgumentError, "Missing the required parameter 'range_start' when calling ManagementApi.get_access_logs_without_total_count"
  end
  # verify the required parameter 'range_end' is set
  if @api_client.config.client_side_validation && range_end.nil?
    fail ArgumentError, "Missing the required parameter 'range_end' when calling ManagementApi.get_access_logs_without_total_count"
  end
  allowable_values = ["get", "put", "post", "delete", "patch"]
  if @api_client.config.client_side_validation && opts[:'method'] && !allowable_values.include?(opts[:'method'])
    fail ArgumentError, "invalid value for \"method\", must be one of #{allowable_values}"
  end
  allowable_values = ["success", "error"]
  if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
    fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/access_logs/no_total'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'rangeStart'] = range_start
  query_params[:'rangeEnd'] = range_end
  query_params[:'path'] = opts[:'path'] if !opts[:'path'].nil?
  query_params[:'method'] = opts[:'method'] if !opts[:'method'].nil?
  query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].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[:body] 

  # return_type
  return_type = opts[:return_type] || 'InlineResponse2009' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_access_logs_without_total_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_account(account_id, opts = {}) click to toggle source

Get Account Details Return the details of your companies Talon.One account. @param account_id [Integer] @param [Hash] opts the optional parameters @return [Account]

# File lib/talon_one/api/management_api.rb, line 1797
def get_account(account_id, opts = {})
  data, _status_code, _headers = get_account_with_http_info(account_id, opts)
  data
end
get_account_analytics(account_id, opts = {}) click to toggle source

Get Account Analytics Return the analytics of your companies Talon.One account. @param account_id [Integer] @param [Hash] opts the optional parameters @return [AccountAnalytics]

# File lib/talon_one/api/management_api.rb, line 1859
def get_account_analytics(account_id, opts = {})
  data, _status_code, _headers = get_account_analytics_with_http_info(account_id, opts)
  data
end
get_account_analytics_with_http_info(account_id, opts = {}) click to toggle source

Get Account Analytics Return the analytics of your companies Talon.One account. @param account_id [Integer] @param [Hash] opts the optional parameters @return [Array<(AccountAnalytics, Integer, Hash)>] AccountAnalytics data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 1869
def get_account_analytics_with_http_info(account_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_account_analytics ...'
  end
  # verify the required parameter 'account_id' is set
  if @api_client.config.client_side_validation && account_id.nil?
    fail ArgumentError, "Missing the required parameter 'account_id' when calling ManagementApi.get_account_analytics"
  end
  # resource path
  local_var_path = '/v1/accounts/{accountId}/analytics'.sub('{' + 'accountId' + '}', CGI.escape(account_id.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[:body] 

  # return_type
  return_type = opts[:return_type] || 'AccountAnalytics' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_account_analytics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_account_with_http_info(account_id, opts = {}) click to toggle source

Get Account Details Return the details of your companies Talon.One account. @param account_id [Integer] @param [Hash] opts the optional parameters @return [Array<(Account, Integer, Hash)>] Account data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 1807
def get_account_with_http_info(account_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_account ...'
  end
  # verify the required parameter 'account_id' is set
  if @api_client.config.client_side_validation && account_id.nil?
    fail ArgumentError, "Missing the required parameter 'account_id' when calling ManagementApi.get_account"
  end
  # resource path
  local_var_path = '/v1/accounts/{accountId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.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[:body] 

  # return_type
  return_type = opts[:return_type] || 'Account' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_additional_cost(additional_cost_id, opts = {}) click to toggle source

Get an additional cost Returns additional cost for the account by its id. @param additional_cost_id [Integer] @param [Hash] opts the optional parameters @return [AccountAdditionalCost]

# File lib/talon_one/api/management_api.rb, line 1921
def get_additional_cost(additional_cost_id, opts = {})
  data, _status_code, _headers = get_additional_cost_with_http_info(additional_cost_id, opts)
  data
end
get_additional_cost_with_http_info(additional_cost_id, opts = {}) click to toggle source

Get an additional cost Returns additional cost for the account by its id. @param additional_cost_id [Integer] @param [Hash] opts the optional parameters @return [Array<(AccountAdditionalCost, Integer, Hash)>] AccountAdditionalCost data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 1931
def get_additional_cost_with_http_info(additional_cost_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_additional_cost ...'
  end
  # verify the required parameter 'additional_cost_id' is set
  if @api_client.config.client_side_validation && additional_cost_id.nil?
    fail ArgumentError, "Missing the required parameter 'additional_cost_id' when calling ManagementApi.get_additional_cost"
  end
  # resource path
  local_var_path = '/v1/additional_costs/{additionalCostId}'.sub('{' + 'additionalCostId' + '}', CGI.escape(additional_cost_id.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[:body] 

  # return_type
  return_type = opts[:return_type] || 'AccountAdditionalCost' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_additional_cost\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_additional_costs(opts = {}) click to toggle source

List additional costs Returns all the defined additional costs for the account. @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @return [InlineResponse20021]

# File lib/talon_one/api/management_api.rb, line 1985
def get_additional_costs(opts = {})
  data, _status_code, _headers = get_additional_costs_with_http_info(opts)
  data
end
get_additional_costs_with_http_info(opts = {}) click to toggle source

List additional costs Returns all the defined additional costs for the account. @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @return [Array<(InlineResponse20021, Integer, Hash)>] InlineResponse20021 data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 1997
def get_additional_costs_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_additional_costs ...'
  end
  # resource path
  local_var_path = '/v1/additional_costs'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].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[:body] 

  # return_type
  return_type = opts[:return_type] || 'InlineResponse20021' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_additional_costs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_all_access_logs(range_start, range_end, opts = {}) click to toggle source

Get all access logs Fetches the access logs for the entire account. Sensitive requests (logins) are always filtered from the logs. @param range_start [DateTime] Only return results from after this timestamp, must be an RFC3339 timestamp string @param range_end [DateTime] Only return results from before this timestamp, must be an RFC3339 timestamp string @param [Hash] opts the optional parameters @option opts [String] :path Only return results where the request path matches the given regular expression. @option opts [String] :method Only return results where the request method matches the given regular expression. @option opts [String] :status Filter results by HTTP status codes. @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @return [InlineResponse2008]

# File lib/talon_one/api/management_api.rb, line 2055
def get_all_access_logs(range_start, range_end, opts = {})
  data, _status_code, _headers = get_all_access_logs_with_http_info(range_start, range_end, opts)
  data
end
get_all_access_logs_with_http_info(range_start, range_end, opts = {}) click to toggle source

Get all access logs Fetches the access logs for the entire account. Sensitive requests (logins) are always filtered from the logs. @param range_start [DateTime] Only return results from after this timestamp, must be an RFC3339 timestamp string @param range_end [DateTime] Only return results from before this timestamp, must be an RFC3339 timestamp string @param [Hash] opts the optional parameters @option opts [String] :path Only return results where the request path matches the given regular expression. @option opts [String] :method Only return results where the request method matches the given regular expression. @option opts [String] :status Filter results by HTTP status codes. @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @return [Array<(InlineResponse2008, Integer, Hash)>] InlineResponse2008 data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 2072
def get_all_access_logs_with_http_info(range_start, range_end, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_all_access_logs ...'
  end
  # verify the required parameter 'range_start' is set
  if @api_client.config.client_side_validation && range_start.nil?
    fail ArgumentError, "Missing the required parameter 'range_start' when calling ManagementApi.get_all_access_logs"
  end
  # verify the required parameter 'range_end' is set
  if @api_client.config.client_side_validation && range_end.nil?
    fail ArgumentError, "Missing the required parameter 'range_end' when calling ManagementApi.get_all_access_logs"
  end
  allowable_values = ["get", "put", "post", "delete", "patch"]
  if @api_client.config.client_side_validation && opts[:'method'] && !allowable_values.include?(opts[:'method'])
    fail ArgumentError, "invalid value for \"method\", must be one of #{allowable_values}"
  end
  allowable_values = ["success", "error"]
  if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
    fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/access_logs'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'rangeStart'] = range_start
  query_params[:'rangeEnd'] = range_end
  query_params[:'path'] = opts[:'path'] if !opts[:'path'].nil?
  query_params[:'method'] = opts[:'method'] if !opts[:'method'].nil?
  query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].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[:body] 

  # return_type
  return_type = opts[:return_type] || 'InlineResponse2008' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_all_access_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_all_roles(opts = {}) click to toggle source

Get all roles @param [Hash] opts the optional parameters @return [InlineResponse20029]

# File lib/talon_one/api/management_api.rb, line 2142
def get_all_roles(opts = {})
  data, _status_code, _headers = get_all_roles_with_http_info(opts)
  data
end
get_all_roles_with_http_info(opts = {}) click to toggle source

Get all roles @param [Hash] opts the optional parameters @return [Array<(InlineResponse20029, Integer, Hash)>] InlineResponse20029 data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 2150
def get_all_roles_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_all_roles ...'
  end
  # resource path
  local_var_path = '/v1/roles'

  # 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[:body] 

  # return_type
  return_type = opts[:return_type] || 'InlineResponse20029' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_all_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_application(application_id, opts = {}) click to toggle source

Get Application Get the application specified by the ID. @param application_id [Integer] @param [Hash] opts the optional parameters @return [Application]

# File lib/talon_one/api/management_api.rb, line 2198
def get_application(application_id, opts = {})
  data, _status_code, _headers = get_application_with_http_info(application_id, opts)
  data
end
get_application_api_health(application_id, opts = {}) click to toggle source

Get report of health of application API @param application_id [Integer] @param [Hash] opts the optional parameters @return [ApplicationApiHealth]

# File lib/talon_one/api/management_api.rb, line 2259
def get_application_api_health(application_id, opts = {})
  data, _status_code, _headers = get_application_api_health_with_http_info(application_id, opts)
  data
end
get_application_api_health_with_http_info(application_id, opts = {}) click to toggle source

Get report of health of application API @param application_id [Integer] @param [Hash] opts the optional parameters @return [Array<(ApplicationApiHealth, Integer, Hash)>] ApplicationApiHealth data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 2268
def get_application_api_health_with_http_info(application_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_application_api_health ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.get_application_api_health"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/health_report'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.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[:body] 

  # return_type
  return_type = opts[:return_type] || 'ApplicationApiHealth' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_application_api_health\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_application_customer(application_id, customer_id, opts = {}) click to toggle source

Get Application Customer @param application_id [Integer] @param customer_id [Integer] @param [Hash] opts the optional parameters @return [ApplicationCustomer]

# File lib/talon_one/api/management_api.rb, line 2320
def get_application_customer(application_id, customer_id, opts = {})
  data, _status_code, _headers = get_application_customer_with_http_info(application_id, customer_id, opts)
  data
end
get_application_customer_with_http_info(application_id, customer_id, opts = {}) click to toggle source

Get Application Customer @param application_id [Integer] @param customer_id [Integer] @param [Hash] opts the optional parameters @return [Array<(ApplicationCustomer, Integer, Hash)>] ApplicationCustomer data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 2330
def get_application_customer_with_http_info(application_id, customer_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_application_customer ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.get_application_customer"
  end
  # verify the required parameter 'customer_id' is set
  if @api_client.config.client_side_validation && customer_id.nil?
    fail ArgumentError, "Missing the required parameter 'customer_id' when calling ManagementApi.get_application_customer"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/customers/{customerId}'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s)).sub('{' + 'customerId' + '}', CGI.escape(customer_id.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[:body] 

  # return_type
  return_type = opts[:return_type] || 'ApplicationCustomer' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_application_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_application_customers(application_id, opts = {}) click to toggle source

List Application Customers @param application_id [Integer] @param [Hash] opts the optional parameters @option opts [String] :integration_id Filter results performing an exact matching against the profile integration identifier. @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [Boolean] :with_total_result_size When this flag is set, the result will include the total size of the result, across all pages. This might decrease performance on large data sets. With this flag set to true, &#x60;hasMore&#x60; will be true whenever there is a next page. &#x60;totalResultSize&#x60; will always be zero. With this flag set to false, &#x60;hasMore&#x60; will always be set to false. &#x60;totalResultSize&#x60; will contain the total number of results for this query. @return [InlineResponse20011]

# File lib/talon_one/api/management_api.rb, line 2389
def get_application_customers(application_id, opts = {})
  data, _status_code, _headers = get_application_customers_with_http_info(application_id, opts)
  data
end
get_application_customers_by_attributes(body, opts = {}) click to toggle source

Get a list of the customer profiles that match the given attributes (with total count) Gets a list of all the customer profiles for the account that exactly match a set of attributes. The match is successful if all the attributes of the request are found in a profile, even if the profile has more attributes that are not present on the request. [Customer Profile]: help.talon.one/hc/en-us/articles/360005130739-Data-Model#CustomerProfile @param body [ApplicationCustomerSearch] @param [Hash] opts the optional parameters @return [InlineResponse20012]

# File lib/talon_one/api/management_api.rb, line 2458
def get_application_customers_by_attributes(body, opts = {})
  data, _status_code, _headers = get_application_customers_by_attributes_with_http_info(body, opts)
  data
end
get_application_customers_by_attributes_with_http_info(body, opts = {}) click to toggle source

Get a list of the customer profiles that match the given attributes (with total count) Gets a list of all the customer profiles for the account that exactly match a set of attributes. The match is successful if all the attributes of the request are found in a profile, even if the profile has more attributes that are not present on the request. [Customer Profile]: help.talon.one/hc/en-us/articles/360005130739-Data-Model#CustomerProfile @param body [ApplicationCustomerSearch] @param [Hash] opts the optional parameters @return [Array<(InlineResponse20012, Integer, Hash)>] InlineResponse20012 data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 2468
def get_application_customers_by_attributes_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_application_customers_by_attributes ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling ManagementApi.get_application_customers_by_attributes"
  end
  # resource path
  local_var_path = '/v1/application_customer_search'

  # 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[:body] || @api_client.object_to_http_body(body) 

  # return_type
  return_type = opts[:return_type] || 'InlineResponse20012' 

  # auth_names
  auth_names = opts[:auth_names] || ['integration_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_application_customers_by_attributes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_application_customers_with_http_info(application_id, opts = {}) click to toggle source

List Application Customers @param application_id [Integer] @param [Hash] opts the optional parameters @option opts [String] :integration_id Filter results performing an exact matching against the profile integration identifier. @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [Boolean] :with_total_result_size When this flag is set, the result will include the total size of the result, across all pages. This might decrease performance on large data sets. With this flag set to true, &#x60;hasMore&#x60; will be true whenever there is a next page. &#x60;totalResultSize&#x60; will always be zero. With this flag set to false, &#x60;hasMore&#x60; will always be set to false. &#x60;totalResultSize&#x60; will contain the total number of results for this query. @return [Array<(InlineResponse20011, Integer, Hash)>] InlineResponse20011 data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 2402
def get_application_customers_with_http_info(application_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_application_customers ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.get_application_customers"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/customers'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'integrationId'] = opts[:'integration_id'] if !opts[:'integration_id'].nil?
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
  query_params[:'withTotalResultSize'] = opts[:'with_total_result_size'] if !opts[:'with_total_result_size'].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[:body] 

  # return_type
  return_type = opts[:return_type] || 'InlineResponse20011' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_application_customers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_application_event_types(application_id, opts = {}) click to toggle source

List Applications Event Types Get all of the distinct values of the Event `type` property for events recorded in the application. See also: [Track an event](/integration-api/reference/#trackEvent) @param application_id [Integer] @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @return [InlineResponse20018]

# File lib/talon_one/api/management_api.rb, line 2525
def get_application_event_types(application_id, opts = {})
  data, _status_code, _headers = get_application_event_types_with_http_info(application_id, opts)
  data
end
get_application_event_types_with_http_info(application_id, opts = {}) click to toggle source

List Applications Event Types Get all of the distinct values of the Event &#x60;type&#x60; property for events recorded in the application. See also: [Track an event](/integration-api/reference/#trackEvent) @param application_id [Integer] @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @return [Array<(InlineResponse20018, Integer, Hash)>] InlineResponse20018 data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 2538
def get_application_event_types_with_http_info(application_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_application_event_types ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.get_application_event_types"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/event_types'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].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[:body] 

  # return_type
  return_type = opts[:return_type] || 'InlineResponse20018' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_application_event_types\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_application_events(application_id, opts = {}) click to toggle source

List Applications Events (with total count) Lists all events recorded for an application. @param application_id [Integer] @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @option opts [String] :type Comma-separated list of types by which to filter events. Must be exact match(es). @option opts [DateTime] :created_before Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :created_after Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. @option opts [String] :session Session integration ID filter for events. Must be exact match. @option opts [String] :profile Profile integration ID filter for events. Must be exact match. @option opts [String] :customer_name Customer name filter for events. Will match substrings case-insensitively. @option opts [String] :customer_email Customer e-mail address filter for events. Will match substrings case-insensitively. @option opts [String] :coupon_code Coupon code @option opts [String] :referral_code Referral code @option opts [String] :rule_query Rule name filter for events @option opts [String] :campaign_query Campaign name filter for events @return [InlineResponse20016]

# File lib/talon_one/api/management_api.rb, line 2607
def get_application_events(application_id, opts = {})
  data, _status_code, _headers = get_application_events_with_http_info(application_id, opts)
  data
end
get_application_events_with_http_info(application_id, opts = {}) click to toggle source

List Applications Events (with total count) Lists all events recorded for an application. @param application_id [Integer] @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @option opts [String] :type Comma-separated list of types by which to filter events. Must be exact match(es). @option opts [DateTime] :created_before Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :created_after Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. @option opts [String] :session Session integration ID filter for events. Must be exact match. @option opts [String] :profile Profile integration ID filter for events. Must be exact match. @option opts [String] :customer_name Customer name filter for events. Will match substrings case-insensitively. @option opts [String] :customer_email Customer e-mail address filter for events. Will match substrings case-insensitively. @option opts [String] :coupon_code Coupon code @option opts [String] :referral_code Referral code @option opts [String] :rule_query Rule name filter for events @option opts [String] :campaign_query Campaign name filter for events @return [Array<(InlineResponse20016, Integer, Hash)>] InlineResponse20016 data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 2631
def get_application_events_with_http_info(application_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_application_events ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.get_application_events"
  end
  if @api_client.config.client_side_validation && !opts[:'customer_name'].nil? && opts[:'customer_name'].to_s.length < 2
    fail ArgumentError, 'invalid value for "opts[:"customer_name"]" when calling ManagementApi.get_application_events, the character length must be great than or equal to 2.'
  end

  if @api_client.config.client_side_validation && !opts[:'customer_email'].nil? && opts[:'customer_email'].to_s.length < 2
    fail ArgumentError, 'invalid value for "opts[:"customer_email"]" when calling ManagementApi.get_application_events, the character length must be great than or equal to 2.'
  end

  # resource path
  local_var_path = '/v1/applications/{applicationId}/events'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
  query_params[:'createdBefore'] = opts[:'created_before'] if !opts[:'created_before'].nil?
  query_params[:'createdAfter'] = opts[:'created_after'] if !opts[:'created_after'].nil?
  query_params[:'session'] = opts[:'session'] if !opts[:'session'].nil?
  query_params[:'profile'] = opts[:'profile'] if !opts[:'profile'].nil?
  query_params[:'customerName'] = opts[:'customer_name'] if !opts[:'customer_name'].nil?
  query_params[:'customerEmail'] = opts[:'customer_email'] if !opts[:'customer_email'].nil?
  query_params[:'couponCode'] = opts[:'coupon_code'] if !opts[:'coupon_code'].nil?
  query_params[:'referralCode'] = opts[:'referral_code'] if !opts[:'referral_code'].nil?
  query_params[:'ruleQuery'] = opts[:'rule_query'] if !opts[:'rule_query'].nil?
  query_params[:'campaignQuery'] = opts[:'campaign_query'] if !opts[:'campaign_query'].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[:body] 

  # return_type
  return_type = opts[:return_type] || 'InlineResponse20016' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_application_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_application_events_without_total_count(application_id, opts = {}) click to toggle source

List Applications Events Lists all events recorded for an application. Instead of having the total number of results in the response, this endpoint only if there are more results. @param application_id [Integer] @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @option opts [String] :type Comma-separated list of types by which to filter events. Must be exact match(es). @option opts [DateTime] :created_before Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :created_after Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. @option opts [String] :session Session integration ID filter for events. Must be exact match. @option opts [String] :profile Profile integration ID filter for events. Must be exact match. @option opts [String] :customer_name Customer name filter for events. Will match substrings case-insensitively. @option opts [String] :customer_email Customer e-mail address filter for events. Will match substrings case-insensitively. @option opts [String] :coupon_code Coupon code @option opts [String] :referral_code Referral code @option opts [String] :rule_query Rule name filter for events @option opts [String] :campaign_query Campaign name filter for events @return [InlineResponse20017]

# File lib/talon_one/api/management_api.rb, line 2719
def get_application_events_without_total_count(application_id, opts = {})
  data, _status_code, _headers = get_application_events_without_total_count_with_http_info(application_id, opts)
  data
end
get_application_events_without_total_count_with_http_info(application_id, opts = {}) click to toggle source

List Applications Events Lists all events recorded for an application. Instead of having the total number of results in the response, this endpoint only if there are more results. @param application_id [Integer] @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @option opts [String] :type Comma-separated list of types by which to filter events. Must be exact match(es). @option opts [DateTime] :created_before Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :created_after Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. @option opts [String] :session Session integration ID filter for events. Must be exact match. @option opts [String] :profile Profile integration ID filter for events. Must be exact match. @option opts [String] :customer_name Customer name filter for events. Will match substrings case-insensitively. @option opts [String] :customer_email Customer e-mail address filter for events. Will match substrings case-insensitively. @option opts [String] :coupon_code Coupon code @option opts [String] :referral_code Referral code @option opts [String] :rule_query Rule name filter for events @option opts [String] :campaign_query Campaign name filter for events @return [Array<(InlineResponse20017, Integer, Hash)>] InlineResponse20017 data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 2743
def get_application_events_without_total_count_with_http_info(application_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_application_events_without_total_count ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.get_application_events_without_total_count"
  end
  if @api_client.config.client_side_validation && !opts[:'customer_name'].nil? && opts[:'customer_name'].to_s.length < 2
    fail ArgumentError, 'invalid value for "opts[:"customer_name"]" when calling ManagementApi.get_application_events_without_total_count, the character length must be great than or equal to 2.'
  end

  if @api_client.config.client_side_validation && !opts[:'customer_email'].nil? && opts[:'customer_email'].to_s.length < 2
    fail ArgumentError, 'invalid value for "opts[:"customer_email"]" when calling ManagementApi.get_application_events_without_total_count, the character length must be great than or equal to 2.'
  end

  # resource path
  local_var_path = '/v1/applications/{applicationId}/events/no_total'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
  query_params[:'createdBefore'] = opts[:'created_before'] if !opts[:'created_before'].nil?
  query_params[:'createdAfter'] = opts[:'created_after'] if !opts[:'created_after'].nil?
  query_params[:'session'] = opts[:'session'] if !opts[:'session'].nil?
  query_params[:'profile'] = opts[:'profile'] if !opts[:'profile'].nil?
  query_params[:'customerName'] = opts[:'customer_name'] if !opts[:'customer_name'].nil?
  query_params[:'customerEmail'] = opts[:'customer_email'] if !opts[:'customer_email'].nil?
  query_params[:'couponCode'] = opts[:'coupon_code'] if !opts[:'coupon_code'].nil?
  query_params[:'referralCode'] = opts[:'referral_code'] if !opts[:'referral_code'].nil?
  query_params[:'ruleQuery'] = opts[:'rule_query'] if !opts[:'rule_query'].nil?
  query_params[:'campaignQuery'] = opts[:'campaign_query'] if !opts[:'campaign_query'].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[:body] 

  # return_type
  return_type = opts[:return_type] || 'InlineResponse20017' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_application_events_without_total_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_application_session(application_id, session_id, opts = {}) click to toggle source

Get Application Session @param application_id [Integer] @param session_id [Integer] @param [Hash] opts the optional parameters @return [ApplicationSession]

# File lib/talon_one/api/management_api.rb, line 2817
def get_application_session(application_id, session_id, opts = {})
  data, _status_code, _headers = get_application_session_with_http_info(application_id, session_id, opts)
  data
end
get_application_session_with_http_info(application_id, session_id, opts = {}) click to toggle source

Get Application Session @param application_id [Integer] @param session_id [Integer] @param [Hash] opts the optional parameters @return [Array<(ApplicationSession, Integer, Hash)>] ApplicationSession data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 2827
def get_application_session_with_http_info(application_id, session_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_application_session ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.get_application_session"
  end
  # verify the required parameter 'session_id' is set
  if @api_client.config.client_side_validation && session_id.nil?
    fail ArgumentError, "Missing the required parameter 'session_id' when calling ManagementApi.get_application_session"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/sessions/{sessionId}'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s)).sub('{' + 'sessionId' + '}', CGI.escape(session_id.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[:body] 

  # return_type
  return_type = opts[:return_type] || 'ApplicationSession' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_application_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_application_sessions(application_id, opts = {}) click to toggle source

List Application Sessions @param application_id [Integer] @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @option opts [String] :profile Profile integration ID filter for sessions. Must be exact match. @option opts [String] :state Filter by sessions with this state. Must be exact match. @option opts [DateTime] :created_before Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :created_after Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. @option opts [String] :coupon Filter by sessions with this coupon. Must be exact match. @option opts [String] :referral Filter by sessions with this referral. Must be exact match. @option opts [String] :integration_id Filter by sessions with this integrationId. Must be exact match. @return [InlineResponse20015]

# File lib/talon_one/api/management_api.rb, line 2892
def get_application_sessions(application_id, opts = {})
  data, _status_code, _headers = get_application_sessions_with_http_info(application_id, opts)
  data
end
get_application_sessions_with_http_info(application_id, opts = {}) click to toggle source

List Application Sessions @param application_id [Integer] @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @option opts [String] :profile Profile integration ID filter for sessions. Must be exact match. @option opts [String] :state Filter by sessions with this state. Must be exact match. @option opts [DateTime] :created_before Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :created_after Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. @option opts [String] :coupon Filter by sessions with this coupon. Must be exact match. @option opts [String] :referral Filter by sessions with this referral. Must be exact match. @option opts [String] :integration_id Filter by sessions with this integrationId. Must be exact match. @return [Array<(InlineResponse20015, Integer, Hash)>] InlineResponse20015 data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 2911
def get_application_sessions_with_http_info(application_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_application_sessions ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.get_application_sessions"
  end
  allowable_values = ["open", "closed", "cancelled"]
  if @api_client.config.client_side_validation && opts[:'state'] && !allowable_values.include?(opts[:'state'])
    fail ArgumentError, "invalid value for \"state\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/sessions'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'profile'] = opts[:'profile'] if !opts[:'profile'].nil?
  query_params[:'state'] = opts[:'state'] if !opts[:'state'].nil?
  query_params[:'createdBefore'] = opts[:'created_before'] if !opts[:'created_before'].nil?
  query_params[:'createdAfter'] = opts[:'created_after'] if !opts[:'created_after'].nil?
  query_params[:'coupon'] = opts[:'coupon'] if !opts[:'coupon'].nil?
  query_params[:'referral'] = opts[:'referral'] if !opts[:'referral'].nil?
  query_params[:'integrationId'] = opts[:'integration_id'] if !opts[:'integration_id'].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[:body] 

  # return_type
  return_type = opts[:return_type] || 'InlineResponse20015' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_application_sessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_application_with_http_info(application_id, opts = {}) click to toggle source

Get Application Get the application specified by the ID. @param application_id [Integer] @param [Hash] opts the optional parameters @return [Array<(Application, Integer, Hash)>] Application data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 2208
def get_application_with_http_info(application_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_application ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.get_application"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.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[:body] 

  # return_type
  return_type = opts[:return_type] || 'Application' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_application\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_applications(opts = {}) click to toggle source

List Applications List all application in the current account. @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @return [InlineResponse2001]

# File lib/talon_one/api/management_api.rb, line 2979
def get_applications(opts = {})
  data, _status_code, _headers = get_applications_with_http_info(opts)
  data
end
get_applications_with_http_info(opts = {}) click to toggle source

List Applications List all application in the current account. @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @return [Array<(InlineResponse2001, Integer, Hash)>] InlineResponse2001 data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 2991
def get_applications_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_applications ...'
  end
  # resource path
  local_var_path = '/v1/applications'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].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[:body] 

  # return_type
  return_type = opts[:return_type] || 'InlineResponse2001' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_applications\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_attribute(attribute_id, opts = {}) click to toggle source

Get a custom attribute Returns custom attribute for the account by its id. @param attribute_id [Integer] @param [Hash] opts the optional parameters @return [Attribute]

# File lib/talon_one/api/management_api.rb, line 3042
def get_attribute(attribute_id, opts = {})
  data, _status_code, _headers = get_attribute_with_http_info(attribute_id, opts)
  data
end
get_attribute_with_http_info(attribute_id, opts = {}) click to toggle source

Get a custom attribute Returns custom attribute for the account by its id. @param attribute_id [Integer] @param [Hash] opts the optional parameters @return [Array<(Attribute, Integer, Hash)>] Attribute data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 3052
def get_attribute_with_http_info(attribute_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_attribute ...'
  end
  # verify the required parameter 'attribute_id' is set
  if @api_client.config.client_side_validation && attribute_id.nil?
    fail ArgumentError, "Missing the required parameter 'attribute_id' when calling ManagementApi.get_attribute"
  end
  # resource path
  local_var_path = '/v1/attributes/{attributeId}'.sub('{' + 'attributeId' + '}', CGI.escape(attribute_id.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[:body] 

  # return_type
  return_type = opts[:return_type] || 'Attribute' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_attribute\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_attributes(opts = {}) click to toggle source

List custom attributes Returns all the defined custom attributes for the account. @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @option opts [String] :entity Returned attributes will be filtered by supplied entity @return [InlineResponse20020]

# File lib/talon_one/api/management_api.rb, line 3107
def get_attributes(opts = {})
  data, _status_code, _headers = get_attributes_with_http_info(opts)
  data
end
get_attributes_with_http_info(opts = {}) click to toggle source

List custom attributes Returns all the defined custom attributes for the account. @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @option opts [String] :entity Returned attributes will be filtered by supplied entity @return [Array<(InlineResponse20020, Integer, Hash)>] InlineResponse20020 data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 3120
def get_attributes_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_attributes ...'
  end
  # resource path
  local_var_path = '/v1/attributes'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'entity'] = opts[:'entity'] if !opts[:'entity'].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[:body] 

  # return_type
  return_type = opts[:return_type] || 'InlineResponse20020' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_attributes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_audiences(opts = {}) click to toggle source

Get all audiences Get All audiences created in the account. @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @option opts [Boolean] :with_total_result_size When this flag is set, the result will include the total size of the result, across all pages. This might decrease performance on large data sets. With this flag set to true, &#x60;hasMore&#x60; will be true whenever there is a next page. &#x60;totalResultSize&#x60; will always be zero. With this flag set to false, &#x60;hasMore&#x60; will always be set to false. &#x60;totalResultSize&#x60; will contain the total number of results for this query. @return [InlineResponse20019]

# File lib/talon_one/api/management_api.rb, line 3175
def get_audiences(opts = {})
  data, _status_code, _headers = get_audiences_with_http_info(opts)
  data
end
get_audiences_with_http_info(opts = {}) click to toggle source

Get all audiences Get All audiences created in the account. @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @option opts [Boolean] :with_total_result_size When this flag is set, the result will include the total size of the result, across all pages. This might decrease performance on large data sets. With this flag set to true, &#x60;hasMore&#x60; will be true whenever there is a next page. &#x60;totalResultSize&#x60; will always be zero. With this flag set to false, &#x60;hasMore&#x60; will always be set to false. &#x60;totalResultSize&#x60; will contain the total number of results for this query. @return [Array<(InlineResponse20019, Integer, Hash)>] InlineResponse20019 data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 3188
def get_audiences_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_audiences ...'
  end
  # resource path
  local_var_path = '/v1/audiences'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'withTotalResultSize'] = opts[:'with_total_result_size'] if !opts[:'with_total_result_size'].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[:body] 

  # return_type
  return_type = opts[:return_type] || 'InlineResponse20019' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_audiences\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_campaign(application_id, campaign_id, opts = {}) click to toggle source

Get a Campaign @param application_id [Integer] @param campaign_id [Integer] @param [Hash] opts the optional parameters @return [Campaign]

# File lib/talon_one/api/management_api.rb, line 3240
def get_campaign(application_id, campaign_id, opts = {})
  data, _status_code, _headers = get_campaign_with_http_info(application_id, campaign_id, opts)
  data
end
get_campaign_analytics(application_id, campaign_id, range_start, range_end, opts = {}) click to toggle source

Get analytics of campaigns @param application_id [Integer] @param campaign_id [Integer] @param range_start [DateTime] Only return results from after this timestamp, must be an RFC3339 timestamp string @param range_end [DateTime] Only return results from before this timestamp, must be an RFC3339 timestamp string @param [Hash] opts the optional parameters @option opts [String] :granularity The time interval between the results in the returned time-series. @return [InlineResponse20010]

# File lib/talon_one/api/management_api.rb, line 3309
def get_campaign_analytics(application_id, campaign_id, range_start, range_end, opts = {})
  data, _status_code, _headers = get_campaign_analytics_with_http_info(application_id, campaign_id, range_start, range_end, opts)
  data
end
get_campaign_analytics_with_http_info(application_id, campaign_id, range_start, range_end, opts = {}) click to toggle source

Get analytics of campaigns @param application_id [Integer] @param campaign_id [Integer] @param range_start [DateTime] Only return results from after this timestamp, must be an RFC3339 timestamp string @param range_end [DateTime] Only return results from before this timestamp, must be an RFC3339 timestamp string @param [Hash] opts the optional parameters @option opts [String] :granularity The time interval between the results in the returned time-series. @return [Array<(InlineResponse20010, Integer, Hash)>] InlineResponse20010 data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 3322
def get_campaign_analytics_with_http_info(application_id, campaign_id, range_start, range_end, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_campaign_analytics ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.get_campaign_analytics"
  end
  # verify the required parameter 'campaign_id' is set
  if @api_client.config.client_side_validation && campaign_id.nil?
    fail ArgumentError, "Missing the required parameter 'campaign_id' when calling ManagementApi.get_campaign_analytics"
  end
  # verify the required parameter 'range_start' is set
  if @api_client.config.client_side_validation && range_start.nil?
    fail ArgumentError, "Missing the required parameter 'range_start' when calling ManagementApi.get_campaign_analytics"
  end
  # verify the required parameter 'range_end' is set
  if @api_client.config.client_side_validation && range_end.nil?
    fail ArgumentError, "Missing the required parameter 'range_end' when calling ManagementApi.get_campaign_analytics"
  end
  allowable_values = ["1 hour", "1 day", "1 week", "1 month", "1 year"]
  if @api_client.config.client_side_validation && opts[:'granularity'] && !allowable_values.include?(opts[:'granularity'])
    fail ArgumentError, "invalid value for \"granularity\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/analytics'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s)).sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'rangeStart'] = range_start
  query_params[:'rangeEnd'] = range_end
  query_params[:'granularity'] = opts[:'granularity'] if !opts[:'granularity'].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[:body] 

  # return_type
  return_type = opts[:return_type] || 'InlineResponse20010' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_campaign_analytics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_campaign_by_attributes(application_id, body, opts = {}) click to toggle source

Get a list of all campaigns that match the given attributes Gets a list of all the campaigns that exactly match a set of attributes. @param application_id [Integer] @param body [CampaignSearch] @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @option opts [String] :campaign_state Filter results by the state of the campaign. @return [InlineResponse2002]

# File lib/talon_one/api/management_api.rb, line 3398
def get_campaign_by_attributes(application_id, body, opts = {})
  data, _status_code, _headers = get_campaign_by_attributes_with_http_info(application_id, body, opts)
  data
end
get_campaign_by_attributes_with_http_info(application_id, body, opts = {}) click to toggle source

Get a list of all campaigns that match the given attributes Gets a list of all the campaigns that exactly match a set of attributes. @param application_id [Integer] @param body [CampaignSearch] @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @option opts [String] :campaign_state Filter results by the state of the campaign. @return [Array<(InlineResponse2002, Integer, Hash)>] InlineResponse2002 data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 3413
def get_campaign_by_attributes_with_http_info(application_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_campaign_by_attributes ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.get_campaign_by_attributes"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling ManagementApi.get_campaign_by_attributes"
  end
  allowable_values = ["enabled", "disabled", "archived", "draft", "scheduled", "running", "expired"]
  if @api_client.config.client_side_validation && opts[:'campaign_state'] && !allowable_values.include?(opts[:'campaign_state'])
    fail ArgumentError, "invalid value for \"campaign_state\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns_search'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'campaignState'] = opts[:'campaign_state'] if !opts[:'campaign_state'].nil?

  # 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[:body] || @api_client.object_to_http_body(body) 

  # return_type
  return_type = opts[:return_type] || 'InlineResponse2002' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_campaign_by_attributes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_campaign_with_http_info(application_id, campaign_id, opts = {}) click to toggle source

Get a Campaign @param application_id [Integer] @param campaign_id [Integer] @param [Hash] opts the optional parameters @return [Array<(Campaign, Integer, Hash)>] Campaign data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 3250
def get_campaign_with_http_info(application_id, campaign_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_campaign ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.get_campaign"
  end
  # verify the required parameter 'campaign_id' is set
  if @api_client.config.client_side_validation && campaign_id.nil?
    fail ArgumentError, "Missing the required parameter 'campaign_id' when calling ManagementApi.get_campaign"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s)).sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.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[:body] 

  # return_type
  return_type = opts[:return_type] || 'Campaign' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_campaigns(application_id, opts = {}) click to toggle source

List your Campaigns @param application_id [Integer] @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @option opts [String] :campaign_state Filter results by the state of the campaign. @option opts [String] :name Filter results performing case-insensitive matching against the name of the campaign. @option opts [String] :tags Filter results performing case-insensitive matching against the tags of the campaign. When used in conjunction with the "name&quot; query parameter, a logical OR will be performed to search both tags and name for the provided values @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [Integer] :campaign_group_id Filter results to campaigns owned by the specified campaign group ID. @return [InlineResponse2002]

# File lib/talon_one/api/management_api.rb, line 3487
def get_campaigns(application_id, opts = {})
  data, _status_code, _headers = get_campaigns_with_http_info(application_id, opts)
  data
end
get_campaigns_with_http_info(application_id, opts = {}) click to toggle source

List your Campaigns @param application_id [Integer] @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @option opts [String] :campaign_state Filter results by the state of the campaign. @option opts [String] :name Filter results performing case-insensitive matching against the name of the campaign. @option opts [String] :tags Filter results performing case-insensitive matching against the tags of the campaign. When used in conjunction with the "name&quot; query parameter, a logical OR will be performed to search both tags and name for the provided values @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [Integer] :campaign_group_id Filter results to campaigns owned by the specified campaign group ID. @return [Array<(InlineResponse2002, Integer, Hash)>] InlineResponse2002 data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 3505
def get_campaigns_with_http_info(application_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_campaigns ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.get_campaigns"
  end
  allowable_values = ["enabled", "disabled", "archived", "draft", "scheduled", "running", "expired"]
  if @api_client.config.client_side_validation && opts[:'campaign_state'] && !allowable_values.include?(opts[:'campaign_state'])
    fail ArgumentError, "invalid value for \"campaign_state\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'campaignState'] = opts[:'campaign_state'] if !opts[:'campaign_state'].nil?
  query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
  query_params[:'tags'] = opts[:'tags'] if !opts[:'tags'].nil?
  query_params[:'createdBefore'] = opts[:'created_before'] if !opts[:'created_before'].nil?
  query_params[:'createdAfter'] = opts[:'created_after'] if !opts[:'created_after'].nil?
  query_params[:'campaignGroupId'] = opts[:'campaign_group_id'] if !opts[:'campaign_group_id'].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[:body] 

  # return_type
  return_type = opts[:return_type] || 'InlineResponse2002' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_campaigns\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_changes(opts = {}) click to toggle source

Get audit log for an account Get list of changes caused by API calls for an account. Only accessible for admins. @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @option opts [Integer] :application_id @option opts [String] :entity_path Filter results on a case insensitive matching of the url path of the entity @option opts [Integer] :user_id @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [Boolean] :with_total_result_size When this flag is set, the result will include the total size of the result, across all pages. This might decrease performance on large data sets. With this flag set to true, &#x60;hasMore&#x60; will be true whenever there is a next page. &#x60;totalResultSize&#x60; will always be zero. With this flag set to false, &#x60;hasMore&#x60; will always be set to false. &#x60;totalResultSize&#x60; will contain the total number of results for this query. @option opts [Boolean] :include_old When this flag is set to false, the state without the change will not be returned. The default value is true. @return [InlineResponse20027]

# File lib/talon_one/api/management_api.rb, line 3579
def get_changes(opts = {})
  data, _status_code, _headers = get_changes_with_http_info(opts)
  data
end
get_changes_with_http_info(opts = {}) click to toggle source

Get audit log for an account Get list of changes caused by API calls for an account. Only accessible for admins. @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @option opts [Integer] :application_id @option opts [String] :entity_path Filter results on a case insensitive matching of the url path of the entity @option opts [Integer] :user_id @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [Boolean] :with_total_result_size When this flag is set, the result will include the total size of the result, across all pages. This might decrease performance on large data sets. With this flag set to true, &#x60;hasMore&#x60; will be true whenever there is a next page. &#x60;totalResultSize&#x60; will always be zero. With this flag set to false, &#x60;hasMore&#x60; will always be set to false. &#x60;totalResultSize&#x60; will contain the total number of results for this query. @option opts [Boolean] :include_old When this flag is set to false, the state without the change will not be returned. The default value is true. @return [Array<(InlineResponse20027, Integer, Hash)>] InlineResponse20027 data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 3598
def get_changes_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_changes ...'
  end
  # resource path
  local_var_path = '/v1/changes'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'applicationId'] = opts[:'application_id'] if !opts[:'application_id'].nil?
  query_params[:'entityPath'] = opts[:'entity_path'] if !opts[:'entity_path'].nil?
  query_params[:'userId'] = opts[:'user_id'] if !opts[:'user_id'].nil?
  query_params[:'createdBefore'] = opts[:'created_before'] if !opts[:'created_before'].nil?
  query_params[:'createdAfter'] = opts[:'created_after'] if !opts[:'created_after'].nil?
  query_params[:'withTotalResultSize'] = opts[:'with_total_result_size'] if !opts[:'with_total_result_size'].nil?
  query_params[:'includeOld'] = opts[:'include_old'] if !opts[:'include_old'].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[:body] 

  # return_type
  return_type = opts[:return_type] || 'InlineResponse20027' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_changes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_coupons(application_id, campaign_id, opts = {}) click to toggle source

List Coupons (with total count) @param application_id [Integer] @param campaign_id [Integer] @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @option opts [String] :value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :starts_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :starts_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :expires_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :expires_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [String] :valid Either "expired&quot;, "validNow&quot;, or "validFuture&quot;. The first option matches coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry date is null or in the future, the third matches coupons in which start date is set and in the future. @option opts [String] :batch_id Filter results by batches of coupons @option opts [String] :usable Either "true&quot; or "false&quot;. If "true&quot;, only coupons where &#x60;usageCounter &lt; usageLimit&#x60; will be returned, "false&quot; will return only coupons where &#x60;usageCounter &gt;&#x3D; usageLimit&#x60;. @option opts [Integer] :referral_id Filter the results by matching them with the Id of a referral, that meaning the coupons that had been created as an effect of the usage of a referral code. @option opts [String] :recipient_integration_id Filter results by match with a profile id specified in the coupon&#39;s RecipientIntegrationId field @option opts [Boolean] :exact_match Filter results to an exact case-insensitive matching against the coupon code (default to false) @return [InlineResponse2004]

# File lib/talon_one/api/management_api.rb, line 3672
def get_coupons(application_id, campaign_id, opts = {})
  data, _status_code, _headers = get_coupons_with_http_info(application_id, campaign_id, opts)
  data
end
get_coupons_by_attributes(application_id, campaign_id, body, opts = {}) click to toggle source

Get a list of the coupons that match the given attributes Gets a list of all the coupons that exactly match a set of attributes. The match is successful if all the attributes of the request are found in a coupon, even if the coupon has more attributes that are not present on the request. @param application_id [Integer] @param campaign_id [Integer] @param body [CouponSearch] @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @option opts [String] :value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [String] :valid Either "expired&quot;, "validNow&quot;, or "validFuture&quot;. The first option matches coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry date is null or in the future, the third matches coupons in which start date is set and in the future. @option opts [String] :usable Either "true&quot; or "false&quot;. If "true&quot;, only coupons where &#x60;usageCounter &lt; usageLimit&#x60; will be returned, "false&quot; will return only coupons where &#x60;usageCounter &gt;&#x3D; usageLimit&#x60;. @option opts [Integer] :referral_id Filter the results by matching them with the Id of a referral, that meaning the coupons that had been created as an effect of the usage of a referral code. @option opts [String] :recipient_integration_id Filter results by match with a profile id specified in the coupon&#39;s RecipientIntegrationId field @option opts [Boolean] :exact_match Filter results to an exact case-insensitive matching against the coupon code (default to false) @option opts [String] :batch_id Filter results by batches of coupons @return [InlineResponse2004]

# File lib/talon_one/api/management_api.rb, line 3792
def get_coupons_by_attributes(application_id, campaign_id, body, opts = {})
  data, _status_code, _headers = get_coupons_by_attributes_with_http_info(application_id, campaign_id, body, opts)
  data
end
get_coupons_by_attributes_application_wide(application_id, body, opts = {}) click to toggle source

Get a list of the coupons that match the given attributes in all active campaigns of an application (with total count) Gets a list of all the coupons with attributes matching the query criteria Application wide @param application_id [Integer] @param body [CouponSearch] @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @option opts [String] :value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [String] :valid Either "expired&quot;, "validNow&quot;, or "validFuture&quot;. The first option matches coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry date is null or in the future, the third matches coupons in which start date is set and in the future. @option opts [String] :usable Either "true&quot; or "false&quot;. If "true&quot;, only coupons where &#x60;usageCounter &lt; usageLimit&#x60; will be returned, "false&quot; will return only coupons where &#x60;usageCounter &gt;&#x3D; usageLimit&#x60;. @option opts [Integer] :referral_id Filter the results by matching them with the Id of a referral, that meaning the coupons that had been created as an effect of the usage of a referral code. @option opts [String] :recipient_integration_id Filter results by match with a profile id specified in the coupon&#39;s RecipientIntegrationId field @option opts [String] :batch_id Filter results by batches of coupons @option opts [Boolean] :exact_match Filter results to an exact case-insensitive matching against the coupon code (default to false) @option opts [String] :campaign_state Filter results by the state of the campaign. @return [InlineResponse2004]

# File lib/talon_one/api/management_api.rb, line 3912
def get_coupons_by_attributes_application_wide(application_id, body, opts = {})
  data, _status_code, _headers = get_coupons_by_attributes_application_wide_with_http_info(application_id, body, opts)
  data
end
get_coupons_by_attributes_application_wide_with_http_info(application_id, body, opts = {}) click to toggle source

Get a list of the coupons that match the given attributes in all active campaigns of an application (with total count) Gets a list of all the coupons with attributes matching the query criteria Application wide @param application_id [Integer] @param body [CouponSearch] @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @option opts [String] :value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [String] :valid Either "expired&quot;, "validNow&quot;, or "validFuture&quot;. The first option matches coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry date is null or in the future, the third matches coupons in which start date is set and in the future. @option opts [String] :usable Either "true&quot; or "false&quot;. If "true&quot;, only coupons where &#x60;usageCounter &lt; usageLimit&#x60; will be returned, "false&quot; will return only coupons where &#x60;usageCounter &gt;&#x3D; usageLimit&#x60;. @option opts [Integer] :referral_id Filter the results by matching them with the Id of a referral, that meaning the coupons that had been created as an effect of the usage of a referral code. @option opts [String] :recipient_integration_id Filter results by match with a profile id specified in the coupon&#39;s RecipientIntegrationId field @option opts [String] :batch_id Filter results by batches of coupons @option opts [Boolean] :exact_match Filter results to an exact case-insensitive matching against the coupon code @option opts [String] :campaign_state Filter results by the state of the campaign. @return [Array<(InlineResponse2004, Integer, Hash)>] InlineResponse2004 data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 3936
def get_coupons_by_attributes_application_wide_with_http_info(application_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_coupons_by_attributes_application_wide ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.get_coupons_by_attributes_application_wide"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling ManagementApi.get_coupons_by_attributes_application_wide"
  end
  allowable_values = ["expired", "validNow", "validFuture"]
  if @api_client.config.client_side_validation && opts[:'valid'] && !allowable_values.include?(opts[:'valid'])
    fail ArgumentError, "invalid value for \"valid\", must be one of #{allowable_values}"
  end
  allowable_values = ["true", "false"]
  if @api_client.config.client_side_validation && opts[:'usable'] && !allowable_values.include?(opts[:'usable'])
    fail ArgumentError, "invalid value for \"usable\", must be one of #{allowable_values}"
  end
  allowable_values = ["enabled", "disabled", "archived", "draft", "scheduled", "running", "expired"]
  if @api_client.config.client_side_validation && opts[:'campaign_state'] && !allowable_values.include?(opts[:'campaign_state'])
    fail ArgumentError, "invalid value for \"campaign_state\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/coupons_search'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'value'] = opts[:'value'] if !opts[:'value'].nil?
  query_params[:'createdBefore'] = opts[:'created_before'] if !opts[:'created_before'].nil?
  query_params[:'createdAfter'] = opts[:'created_after'] if !opts[:'created_after'].nil?
  query_params[:'valid'] = opts[:'valid'] if !opts[:'valid'].nil?
  query_params[:'usable'] = opts[:'usable'] if !opts[:'usable'].nil?
  query_params[:'referralId'] = opts[:'referral_id'] if !opts[:'referral_id'].nil?
  query_params[:'recipientIntegrationId'] = opts[:'recipient_integration_id'] if !opts[:'recipient_integration_id'].nil?
  query_params[:'batchId'] = opts[:'batch_id'] if !opts[:'batch_id'].nil?
  query_params[:'exactMatch'] = opts[:'exact_match'] if !opts[:'exact_match'].nil?
  query_params[:'campaignState'] = opts[:'campaign_state'] if !opts[:'campaign_state'].nil?

  # 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[:body] || @api_client.object_to_http_body(body) 

  # return_type
  return_type = opts[:return_type] || 'InlineResponse2004' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_coupons_by_attributes_application_wide\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_coupons_by_attributes_with_http_info(application_id, campaign_id, body, opts = {}) click to toggle source

Get a list of the coupons that match the given attributes Gets a list of all the coupons that exactly match a set of attributes. The match is successful if all the attributes of the request are found in a coupon, even if the coupon has more attributes that are not present on the request. @param application_id [Integer] @param campaign_id [Integer] @param body [CouponSearch] @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @option opts [String] :value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [String] :valid Either "expired&quot;, "validNow&quot;, or "validFuture&quot;. The first option matches coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry date is null or in the future, the third matches coupons in which start date is set and in the future. @option opts [String] :usable Either "true&quot; or "false&quot;. If "true&quot;, only coupons where &#x60;usageCounter &lt; usageLimit&#x60; will be returned, "false&quot; will return only coupons where &#x60;usageCounter &gt;&#x3D; usageLimit&#x60;. @option opts [Integer] :referral_id Filter the results by matching them with the Id of a referral, that meaning the coupons that had been created as an effect of the usage of a referral code. @option opts [String] :recipient_integration_id Filter results by match with a profile id specified in the coupon&#39;s RecipientIntegrationId field @option opts [Boolean] :exact_match Filter results to an exact case-insensitive matching against the coupon code @option opts [String] :batch_id Filter results by batches of coupons @return [Array<(InlineResponse2004, Integer, Hash)>] InlineResponse2004 data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 3816
def get_coupons_by_attributes_with_http_info(application_id, campaign_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_coupons_by_attributes ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.get_coupons_by_attributes"
  end
  # verify the required parameter 'campaign_id' is set
  if @api_client.config.client_side_validation && campaign_id.nil?
    fail ArgumentError, "Missing the required parameter 'campaign_id' when calling ManagementApi.get_coupons_by_attributes"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling ManagementApi.get_coupons_by_attributes"
  end
  allowable_values = ["expired", "validNow", "validFuture"]
  if @api_client.config.client_side_validation && opts[:'valid'] && !allowable_values.include?(opts[:'valid'])
    fail ArgumentError, "invalid value for \"valid\", must be one of #{allowable_values}"
  end
  allowable_values = ["true", "false"]
  if @api_client.config.client_side_validation && opts[:'usable'] && !allowable_values.include?(opts[:'usable'])
    fail ArgumentError, "invalid value for \"usable\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/coupons_search'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s)).sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'value'] = opts[:'value'] if !opts[:'value'].nil?
  query_params[:'createdBefore'] = opts[:'created_before'] if !opts[:'created_before'].nil?
  query_params[:'createdAfter'] = opts[:'created_after'] if !opts[:'created_after'].nil?
  query_params[:'valid'] = opts[:'valid'] if !opts[:'valid'].nil?
  query_params[:'usable'] = opts[:'usable'] if !opts[:'usable'].nil?
  query_params[:'referralId'] = opts[:'referral_id'] if !opts[:'referral_id'].nil?
  query_params[:'recipientIntegrationId'] = opts[:'recipient_integration_id'] if !opts[:'recipient_integration_id'].nil?
  query_params[:'exactMatch'] = opts[:'exact_match'] if !opts[:'exact_match'].nil?
  query_params[:'batchId'] = opts[:'batch_id'] if !opts[:'batch_id'].nil?

  # 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[:body] || @api_client.object_to_http_body(body) 

  # return_type
  return_type = opts[:return_type] || 'InlineResponse2004' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_coupons_by_attributes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_coupons_with_http_info(application_id, campaign_id, opts = {}) click to toggle source

List Coupons (with total count) @param application_id [Integer] @param campaign_id [Integer] @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @option opts [String] :value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :starts_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :starts_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :expires_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :expires_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [String] :valid Either "expired&quot;, "validNow&quot;, or "validFuture&quot;. The first option matches coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry date is null or in the future, the third matches coupons in which start date is set and in the future. @option opts [String] :batch_id Filter results by batches of coupons @option opts [String] :usable Either "true&quot; or "false&quot;. If "true&quot;, only coupons where &#x60;usageCounter &lt; usageLimit&#x60; will be returned, "false&quot; will return only coupons where &#x60;usageCounter &gt;&#x3D; usageLimit&#x60;. @option opts [Integer] :referral_id Filter the results by matching them with the Id of a referral, that meaning the coupons that had been created as an effect of the usage of a referral code. @option opts [String] :recipient_integration_id Filter results by match with a profile id specified in the coupon&#39;s RecipientIntegrationId field @option opts [Boolean] :exact_match Filter results to an exact case-insensitive matching against the coupon code @return [Array<(InlineResponse2004, Integer, Hash)>] InlineResponse2004 data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 3698
def get_coupons_with_http_info(application_id, campaign_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_coupons ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.get_coupons"
  end
  # verify the required parameter 'campaign_id' is set
  if @api_client.config.client_side_validation && campaign_id.nil?
    fail ArgumentError, "Missing the required parameter 'campaign_id' when calling ManagementApi.get_coupons"
  end
  allowable_values = ["expired", "validNow", "validFuture"]
  if @api_client.config.client_side_validation && opts[:'valid'] && !allowable_values.include?(opts[:'valid'])
    fail ArgumentError, "invalid value for \"valid\", must be one of #{allowable_values}"
  end
  allowable_values = ["true", "false"]
  if @api_client.config.client_side_validation && opts[:'usable'] && !allowable_values.include?(opts[:'usable'])
    fail ArgumentError, "invalid value for \"usable\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/coupons'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s)).sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'value'] = opts[:'value'] if !opts[:'value'].nil?
  query_params[:'createdBefore'] = opts[:'created_before'] if !opts[:'created_before'].nil?
  query_params[:'createdAfter'] = opts[:'created_after'] if !opts[:'created_after'].nil?
  query_params[:'startsAfter'] = opts[:'starts_after'] if !opts[:'starts_after'].nil?
  query_params[:'startsBefore'] = opts[:'starts_before'] if !opts[:'starts_before'].nil?
  query_params[:'expiresAfter'] = opts[:'expires_after'] if !opts[:'expires_after'].nil?
  query_params[:'expiresBefore'] = opts[:'expires_before'] if !opts[:'expires_before'].nil?
  query_params[:'valid'] = opts[:'valid'] if !opts[:'valid'].nil?
  query_params[:'batchId'] = opts[:'batch_id'] if !opts[:'batch_id'].nil?
  query_params[:'usable'] = opts[:'usable'] if !opts[:'usable'].nil?
  query_params[:'referralId'] = opts[:'referral_id'] if !opts[:'referral_id'].nil?
  query_params[:'recipientIntegrationId'] = opts[:'recipient_integration_id'] if !opts[:'recipient_integration_id'].nil?
  query_params[:'exactMatch'] = opts[:'exact_match'] if !opts[:'exact_match'].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[:body] 

  # return_type
  return_type = opts[:return_type] || 'InlineResponse2004' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_coupons\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_coupons_without_total_count(application_id, campaign_id, opts = {}) click to toggle source

List Coupons @param application_id [Integer] @param campaign_id [Integer] @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @option opts [String] :value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [String] :valid Either "expired&quot;, "validNow&quot;, or "validFuture&quot;. The first option matches coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry date is null or in the future, the third matches coupons in which start date is set and in the future. @option opts [String] :usable Either "true&quot; or "false&quot;. If "true&quot;, only coupons where &#x60;usageCounter &lt; usageLimit&#x60; will be returned, "false&quot; will return only coupons where &#x60;usageCounter &gt;&#x3D; usageLimit&#x60;. @option opts [Integer] :referral_id Filter the results by matching them with the Id of a referral, that meaning the coupons that had been created as an effect of the usage of a referral code. @option opts [String] :recipient_integration_id Filter results by match with a profile id specified in the coupon&#39;s RecipientIntegrationId field @option opts [String] :batch_id Filter results by batches of coupons @option opts [Boolean] :exact_match Filter results to an exact case-insensitive matching against the coupon code (default to false) @return [InlineResponse2005]

# File lib/talon_one/api/management_api.rb, line 4031
def get_coupons_without_total_count(application_id, campaign_id, opts = {})
  data, _status_code, _headers = get_coupons_without_total_count_with_http_info(application_id, campaign_id, opts)
  data
end
get_coupons_without_total_count_with_http_info(application_id, campaign_id, opts = {}) click to toggle source

List Coupons @param application_id [Integer] @param campaign_id [Integer] @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @option opts [String] :value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [String] :valid Either "expired&quot;, "validNow&quot;, or "validFuture&quot;. The first option matches coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry date is null or in the future, the third matches coupons in which start date is set and in the future. @option opts [String] :usable Either "true&quot; or "false&quot;. If "true&quot;, only coupons where &#x60;usageCounter &lt; usageLimit&#x60; will be returned, "false&quot; will return only coupons where &#x60;usageCounter &gt;&#x3D; usageLimit&#x60;. @option opts [Integer] :referral_id Filter the results by matching them with the Id of a referral, that meaning the coupons that had been created as an effect of the usage of a referral code. @option opts [String] :recipient_integration_id Filter results by match with a profile id specified in the coupon&#39;s RecipientIntegrationId field @option opts [String] :batch_id Filter results by batches of coupons @option opts [Boolean] :exact_match Filter results to an exact case-insensitive matching against the coupon code @return [Array<(InlineResponse2005, Integer, Hash)>] InlineResponse2005 data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 4053
def get_coupons_without_total_count_with_http_info(application_id, campaign_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_coupons_without_total_count ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.get_coupons_without_total_count"
  end
  # verify the required parameter 'campaign_id' is set
  if @api_client.config.client_side_validation && campaign_id.nil?
    fail ArgumentError, "Missing the required parameter 'campaign_id' when calling ManagementApi.get_coupons_without_total_count"
  end
  allowable_values = ["expired", "validNow", "validFuture"]
  if @api_client.config.client_side_validation && opts[:'valid'] && !allowable_values.include?(opts[:'valid'])
    fail ArgumentError, "invalid value for \"valid\", must be one of #{allowable_values}"
  end
  allowable_values = ["true", "false"]
  if @api_client.config.client_side_validation && opts[:'usable'] && !allowable_values.include?(opts[:'usable'])
    fail ArgumentError, "invalid value for \"usable\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/coupons/no_total'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s)).sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'value'] = opts[:'value'] if !opts[:'value'].nil?
  query_params[:'createdBefore'] = opts[:'created_before'] if !opts[:'created_before'].nil?
  query_params[:'createdAfter'] = opts[:'created_after'] if !opts[:'created_after'].nil?
  query_params[:'valid'] = opts[:'valid'] if !opts[:'valid'].nil?
  query_params[:'usable'] = opts[:'usable'] if !opts[:'usable'].nil?
  query_params[:'referralId'] = opts[:'referral_id'] if !opts[:'referral_id'].nil?
  query_params[:'recipientIntegrationId'] = opts[:'recipient_integration_id'] if !opts[:'recipient_integration_id'].nil?
  query_params[:'batchId'] = opts[:'batch_id'] if !opts[:'batch_id'].nil?
  query_params[:'exactMatch'] = opts[:'exact_match'] if !opts[:'exact_match'].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[:body] 

  # return_type
  return_type = opts[:return_type] || 'InlineResponse2005' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_coupons_without_total_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_customer_activity_report(range_start, range_end, application_id, customer_id, opts = {}) click to toggle source

Get Activity Report for Single Customer Fetch summary report for single application customer based on a time range @param range_start [DateTime] Only return results from after this timestamp, must be an RFC3339 timestamp string @param range_end [DateTime] Only return results from before this timestamp, must be an RFC3339 timestamp string @param application_id [Integer] @param customer_id [Integer] @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @return [CustomerActivityReport]

# File lib/talon_one/api/management_api.rb, line 4134
def get_customer_activity_report(range_start, range_end, application_id, customer_id, opts = {})
  data, _status_code, _headers = get_customer_activity_report_with_http_info(range_start, range_end, application_id, customer_id, opts)
  data
end
get_customer_activity_report_with_http_info(range_start, range_end, application_id, customer_id, opts = {}) click to toggle source

Get Activity Report for Single Customer Fetch summary report for single application customer based on a time range @param range_start [DateTime] Only return results from after this timestamp, must be an RFC3339 timestamp string @param range_end [DateTime] Only return results from before this timestamp, must be an RFC3339 timestamp string @param application_id [Integer] @param customer_id [Integer] @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @return [Array<(CustomerActivityReport, Integer, Hash)>] CustomerActivityReport data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 4149
def get_customer_activity_report_with_http_info(range_start, range_end, application_id, customer_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_customer_activity_report ...'
  end
  # verify the required parameter 'range_start' is set
  if @api_client.config.client_side_validation && range_start.nil?
    fail ArgumentError, "Missing the required parameter 'range_start' when calling ManagementApi.get_customer_activity_report"
  end
  # verify the required parameter 'range_end' is set
  if @api_client.config.client_side_validation && range_end.nil?
    fail ArgumentError, "Missing the required parameter 'range_end' when calling ManagementApi.get_customer_activity_report"
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.get_customer_activity_report"
  end
  # verify the required parameter 'customer_id' is set
  if @api_client.config.client_side_validation && customer_id.nil?
    fail ArgumentError, "Missing the required parameter 'customer_id' when calling ManagementApi.get_customer_activity_report"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/customer_activity_reports/{customerId}'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s)).sub('{' + 'customerId' + '}', CGI.escape(customer_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'rangeStart'] = range_start
  query_params[:'rangeEnd'] = range_end
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].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[:body] 

  # return_type
  return_type = opts[:return_type] || 'CustomerActivityReport' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_customer_activity_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_customer_activity_reports(range_start, range_end, application_id, opts = {}) click to toggle source

Get Activity Reports for Application Customers (with total count) Fetch summary reports for all application customers based on a time range @param range_start [DateTime] Only return results from after this timestamp, must be an RFC3339 timestamp string @param range_end [DateTime] Only return results from before this timestamp, must be an RFC3339 timestamp string @param application_id [Integer] @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @option opts [String] :name Only return reports matching the customer name @option opts [String] :integration_id Only return reports matching the integrationId @option opts [String] :campaign_name Only return reports matching the campaignName @option opts [String] :advocate_name Only return reports matching the current customer referrer name @return [InlineResponse20013]

# File lib/talon_one/api/management_api.rb, line 4226
def get_customer_activity_reports(range_start, range_end, application_id, opts = {})
  data, _status_code, _headers = get_customer_activity_reports_with_http_info(range_start, range_end, application_id, opts)
  data
end
get_customer_activity_reports_with_http_info(range_start, range_end, application_id, opts = {}) click to toggle source

Get Activity Reports for Application Customers (with total count) Fetch summary reports for all application customers based on a time range @param range_start [DateTime] Only return results from after this timestamp, must be an RFC3339 timestamp string @param range_end [DateTime] Only return results from before this timestamp, must be an RFC3339 timestamp string @param application_id [Integer] @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @option opts [String] :name Only return reports matching the customer name @option opts [String] :integration_id Only return reports matching the integrationId @option opts [String] :campaign_name Only return reports matching the campaignName @option opts [String] :advocate_name Only return reports matching the current customer referrer name @return [Array<(InlineResponse20013, Integer, Hash)>] InlineResponse20013 data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 4245
def get_customer_activity_reports_with_http_info(range_start, range_end, application_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_customer_activity_reports ...'
  end
  # verify the required parameter 'range_start' is set
  if @api_client.config.client_side_validation && range_start.nil?
    fail ArgumentError, "Missing the required parameter 'range_start' when calling ManagementApi.get_customer_activity_reports"
  end
  # verify the required parameter 'range_end' is set
  if @api_client.config.client_side_validation && range_end.nil?
    fail ArgumentError, "Missing the required parameter 'range_end' when calling ManagementApi.get_customer_activity_reports"
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.get_customer_activity_reports"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/customer_activity_reports'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'rangeStart'] = range_start
  query_params[:'rangeEnd'] = range_end
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
  query_params[:'integrationId'] = opts[:'integration_id'] if !opts[:'integration_id'].nil?
  query_params[:'campaignName'] = opts[:'campaign_name'] if !opts[:'campaign_name'].nil?
  query_params[:'advocateName'] = opts[:'advocate_name'] if !opts[:'advocate_name'].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[:body] 

  # return_type
  return_type = opts[:return_type] || 'InlineResponse20013' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_customer_activity_reports\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_customer_activity_reports_without_total_count(range_start, range_end, application_id, opts = {}) click to toggle source

Get Activity Reports for Application Customers Fetch summary reports for all application customers based on a time range. Instead of having the total number of results in the response, this endpoint only if there are more results. @param range_start [DateTime] Only return results from after this timestamp, must be an RFC3339 timestamp string @param range_end [DateTime] Only return results from before this timestamp, must be an RFC3339 timestamp string @param application_id [Integer] @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @option opts [String] :name Only return reports matching the customer name @option opts [String] :integration_id Only return reports matching the integrationId @option opts [String] :campaign_name Only return reports matching the campaignName @option opts [String] :advocate_name Only return reports matching the current customer referrer name @return [InlineResponse20014]

# File lib/talon_one/api/management_api.rb, line 4323
def get_customer_activity_reports_without_total_count(range_start, range_end, application_id, opts = {})
  data, _status_code, _headers = get_customer_activity_reports_without_total_count_with_http_info(range_start, range_end, application_id, opts)
  data
end
get_customer_activity_reports_without_total_count_with_http_info(range_start, range_end, application_id, opts = {}) click to toggle source

Get Activity Reports for Application Customers Fetch summary reports for all application customers based on a time range. Instead of having the total number of results in the response, this endpoint only if there are more results. @param range_start [DateTime] Only return results from after this timestamp, must be an RFC3339 timestamp string @param range_end [DateTime] Only return results from before this timestamp, must be an RFC3339 timestamp string @param application_id [Integer] @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @option opts [String] :name Only return reports matching the customer name @option opts [String] :integration_id Only return reports matching the integrationId @option opts [String] :campaign_name Only return reports matching the campaignName @option opts [String] :advocate_name Only return reports matching the current customer referrer name @return [Array<(InlineResponse20014, Integer, Hash)>] InlineResponse20014 data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 4342
def get_customer_activity_reports_without_total_count_with_http_info(range_start, range_end, application_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_customer_activity_reports_without_total_count ...'
  end
  # verify the required parameter 'range_start' is set
  if @api_client.config.client_side_validation && range_start.nil?
    fail ArgumentError, "Missing the required parameter 'range_start' when calling ManagementApi.get_customer_activity_reports_without_total_count"
  end
  # verify the required parameter 'range_end' is set
  if @api_client.config.client_side_validation && range_end.nil?
    fail ArgumentError, "Missing the required parameter 'range_end' when calling ManagementApi.get_customer_activity_reports_without_total_count"
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.get_customer_activity_reports_without_total_count"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/customer_activity_reports/no_total'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'rangeStart'] = range_start
  query_params[:'rangeEnd'] = range_end
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
  query_params[:'integrationId'] = opts[:'integration_id'] if !opts[:'integration_id'].nil?
  query_params[:'campaignName'] = opts[:'campaign_name'] if !opts[:'campaign_name'].nil?
  query_params[:'advocateName'] = opts[:'advocate_name'] if !opts[:'advocate_name'].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[:body] 

  # return_type
  return_type = opts[:return_type] || 'InlineResponse20014' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_customer_activity_reports_without_total_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_customer_analytics(application_id, customer_id, opts = {}) click to toggle source

Get Analytics Report for a Customer Fetch analytics for single application customer @param application_id [Integer] @param customer_id [Integer] @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @return [CustomerAnalytics]

# File lib/talon_one/api/management_api.rb, line 4415
def get_customer_analytics(application_id, customer_id, opts = {})
  data, _status_code, _headers = get_customer_analytics_with_http_info(application_id, customer_id, opts)
  data
end
get_customer_analytics_with_http_info(application_id, customer_id, opts = {}) click to toggle source

Get Analytics Report for a Customer Fetch analytics for single application customer @param application_id [Integer] @param customer_id [Integer] @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @return [Array<(CustomerAnalytics, Integer, Hash)>] CustomerAnalytics data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 4429
def get_customer_analytics_with_http_info(application_id, customer_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_customer_analytics ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.get_customer_analytics"
  end
  # verify the required parameter 'customer_id' is set
  if @api_client.config.client_side_validation && customer_id.nil?
    fail ArgumentError, "Missing the required parameter 'customer_id' when calling ManagementApi.get_customer_analytics"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/customers/{customerId}/analytics'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s)).sub('{' + 'customerId' + '}', CGI.escape(customer_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].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[:body] 

  # return_type
  return_type = opts[:return_type] || 'CustomerAnalytics' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_customer_analytics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_customer_profile(customer_id, opts = {}) click to toggle source

Get Customer Profile @param customer_id [Integer] @param [Hash] opts the optional parameters @return [ApplicationCustomer]

# File lib/talon_one/api/management_api.rb, line 4487
def get_customer_profile(customer_id, opts = {})
  data, _status_code, _headers = get_customer_profile_with_http_info(customer_id, opts)
  data
end
get_customer_profile_with_http_info(customer_id, opts = {}) click to toggle source

Get Customer Profile @param customer_id [Integer] @param [Hash] opts the optional parameters @return [Array<(ApplicationCustomer, Integer, Hash)>] ApplicationCustomer data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 4496
def get_customer_profile_with_http_info(customer_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_customer_profile ...'
  end
  # verify the required parameter 'customer_id' is set
  if @api_client.config.client_side_validation && customer_id.nil?
    fail ArgumentError, "Missing the required parameter 'customer_id' when calling ManagementApi.get_customer_profile"
  end
  # resource path
  local_var_path = '/v1/customers/{customerId}'.sub('{' + 'customerId' + '}', CGI.escape(customer_id.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[:body] 

  # return_type
  return_type = opts[:return_type] || 'ApplicationCustomer' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_customer_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_customer_profiles(opts = {}) click to toggle source

List Customer Profiles @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @return [InlineResponse20012]

# File lib/talon_one/api/management_api.rb, line 4548
def get_customer_profiles(opts = {})
  data, _status_code, _headers = get_customer_profiles_with_http_info(opts)
  data
end
get_customer_profiles_with_http_info(opts = {}) click to toggle source

List Customer Profiles @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @return [Array<(InlineResponse20012, Integer, Hash)>] InlineResponse20012 data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 4558
def get_customer_profiles_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_customer_profiles ...'
  end
  # resource path
  local_var_path = '/v1/customers/no_total'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].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[:body] 

  # return_type
  return_type = opts[:return_type] || 'InlineResponse20012' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_customer_profiles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_customers_by_attributes(body, opts = {}) click to toggle source

Get a list of the customer profiles that match the given attributes Gets a list of all the customer profiles for the account that exactly match a set of attributes. The match is successful if all the attributes of the request are found in a profile, even if the profile has more attributes that are not present on the request. [Customer Profile]: help.talon.one/hc/en-us/articles/360005130739-Data-Model#CustomerProfile @param body [ApplicationCustomerSearch] @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @return [InlineResponse20012]

# File lib/talon_one/api/management_api.rb, line 4610
def get_customers_by_attributes(body, opts = {})
  data, _status_code, _headers = get_customers_by_attributes_with_http_info(body, opts)
  data
end
get_customers_by_attributes_with_http_info(body, opts = {}) click to toggle source

Get a list of the customer profiles that match the given attributes Gets a list of all the customer profiles for the account that exactly match a set of attributes. The match is successful if all the attributes of the request are found in a profile, even if the profile has more attributes that are not present on the request. [Customer Profile]: help.talon.one/hc/en-us/articles/360005130739-Data-Model#CustomerProfile @param body [ApplicationCustomerSearch] @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @return [Array<(InlineResponse20012, Integer, Hash)>] InlineResponse20012 data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 4622
def get_customers_by_attributes_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_customers_by_attributes ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling ManagementApi.get_customers_by_attributes"
  end
  # resource path
  local_var_path = '/v1/customer_search/no_total'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?

  # 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[:body] || @api_client.object_to_http_body(body) 

  # return_type
  return_type = opts[:return_type] || 'InlineResponse20012' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_customers_by_attributes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_event_types(opts = {}) click to toggle source

List Event Types Fetch all event type definitions for your account. Each event type can be @param [Hash] opts the optional parameters @option opts [String] :application_ids Filter by one or more application ids separated by comma @option opts [String] :name Filter results to event types with the given name. This parameter implies &#x60;includeOldVersions&#x60;. @option opts [Boolean] :include_old_versions Include all versions of every event type. (default to false) @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @return [InlineResponse20025]

# File lib/talon_one/api/management_api.rb, line 4683
def get_event_types(opts = {})
  data, _status_code, _headers = get_event_types_with_http_info(opts)
  data
end
get_event_types_with_http_info(opts = {}) click to toggle source

List Event Types Fetch all event type definitions for your account. Each event type can be @param [Hash] opts the optional parameters @option opts [String] :application_ids Filter by one or more application ids separated by comma @option opts [String] :name Filter results to event types with the given name. This parameter implies &#x60;includeOldVersions&#x60;. @option opts [Boolean] :include_old_versions Include all versions of every event type. @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @return [Array<(InlineResponse20025, Integer, Hash)>] InlineResponse20025 data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 4698
def get_event_types_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_event_types ...'
  end
  # resource path
  local_var_path = '/v1/event_types'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'applicationIds'] = opts[:'application_ids'] if !opts[:'application_ids'].nil?
  query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
  query_params[:'includeOldVersions'] = opts[:'include_old_versions'] if !opts[:'include_old_versions'].nil?
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].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[:body] 

  # return_type
  return_type = opts[:return_type] || 'InlineResponse20025' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_event_types\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_exports(opts = {}) click to toggle source

Get Exports Get a list of all past exports @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [Integer] :application_id @option opts [Integer] :campaign_id @option opts [String] :entity The name of the entity type that was exported. @return [InlineResponse20028]

# File lib/talon_one/api/management_api.rb, line 4756
def get_exports(opts = {})
  data, _status_code, _headers = get_exports_with_http_info(opts)
  data
end
get_exports_with_http_info(opts = {}) click to toggle source

Get Exports Get a list of all past exports @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [Integer] :application_id @option opts [Integer] :campaign_id @option opts [String] :entity The name of the entity type that was exported. @return [Array<(InlineResponse20028, Integer, Hash)>] InlineResponse20028 data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 4770
def get_exports_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_exports ...'
  end
  allowable_values = ["Coupon", "Effect", "CustomerSession", "LoyaltyLedger", "LoyaltyLedgerLog"]
  if @api_client.config.client_side_validation && opts[:'entity'] && !allowable_values.include?(opts[:'entity'])
    fail ArgumentError, "invalid value for \"entity\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/exports'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
  query_params[:'applicationId'] = opts[:'application_id'] if !opts[:'application_id'].nil?
  query_params[:'campaignId'] = opts[:'campaign_id'] if !opts[:'campaign_id'].nil?
  query_params[:'entity'] = opts[:'entity'] if !opts[:'entity'].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[:body] 

  # return_type
  return_type = opts[:return_type] || 'InlineResponse20028' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_exports\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_loyalty_points(program_id, integration_id, opts = {}) click to toggle source

get the Loyalty Ledger for this integrationID Get the Loyalty Ledger for this profile integration ID. @param program_id [String] The identifier for the application, must be unique within the account. @param integration_id [String] The identifier for the application, must be unique within the account. @param [Hash] opts the optional parameters @return [LoyaltyLedger]

# File lib/talon_one/api/management_api.rb, line 4828
def get_loyalty_points(program_id, integration_id, opts = {})
  data, _status_code, _headers = get_loyalty_points_with_http_info(program_id, integration_id, opts)
  data
end
get_loyalty_points_with_http_info(program_id, integration_id, opts = {}) click to toggle source

get the Loyalty Ledger for this integrationID Get the Loyalty Ledger for this profile integration ID. @param program_id [String] The identifier for the application, must be unique within the account. @param integration_id [String] The identifier for the application, must be unique within the account. @param [Hash] opts the optional parameters @return [Array<(LoyaltyLedger, Integer, Hash)>] LoyaltyLedger data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 4839
def get_loyalty_points_with_http_info(program_id, integration_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_loyalty_points ...'
  end
  # verify the required parameter 'program_id' is set
  if @api_client.config.client_side_validation && program_id.nil?
    fail ArgumentError, "Missing the required parameter 'program_id' when calling ManagementApi.get_loyalty_points"
  end
  # verify the required parameter 'integration_id' is set
  if @api_client.config.client_side_validation && integration_id.nil?
    fail ArgumentError, "Missing the required parameter 'integration_id' when calling ManagementApi.get_loyalty_points"
  end
  # resource path
  local_var_path = '/v1/loyalty_programs/{programID}/profile/{integrationID}'.sub('{' + 'programID' + '}', CGI.escape(program_id.to_s)).sub('{' + 'integrationID' + '}', CGI.escape(integration_id.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[:body] 

  # return_type
  return_type = opts[:return_type] || 'LoyaltyLedger' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_loyalty_points\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_loyalty_program(program_id, opts = {}) click to toggle source

Get a loyalty program @param program_id [Integer] @param [Hash] opts the optional parameters @return [LoyaltyProgram]

# File lib/talon_one/api/management_api.rb, line 4894
def get_loyalty_program(program_id, opts = {})
  data, _status_code, _headers = get_loyalty_program_with_http_info(program_id, opts)
  data
end
get_loyalty_program_with_http_info(program_id, opts = {}) click to toggle source

Get a loyalty program @param program_id [Integer] @param [Hash] opts the optional parameters @return [Array<(LoyaltyProgram, Integer, Hash)>] LoyaltyProgram data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 4903
def get_loyalty_program_with_http_info(program_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_loyalty_program ...'
  end
  # verify the required parameter 'program_id' is set
  if @api_client.config.client_side_validation && program_id.nil?
    fail ArgumentError, "Missing the required parameter 'program_id' when calling ManagementApi.get_loyalty_program"
  end
  # resource path
  local_var_path = '/v1/loyalty_programs/{programID}'.sub('{' + 'programID' + '}', CGI.escape(program_id.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[:body] 

  # return_type
  return_type = opts[:return_type] || 'LoyaltyProgram' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_loyalty_program\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_loyalty_programs(opts = {}) click to toggle source

List all loyalty Programs @param [Hash] opts the optional parameters @return [InlineResponse2007]

# File lib/talon_one/api/management_api.rb, line 4953
def get_loyalty_programs(opts = {})
  data, _status_code, _headers = get_loyalty_programs_with_http_info(opts)
  data
end
get_loyalty_programs_with_http_info(opts = {}) click to toggle source

List all loyalty Programs @param [Hash] opts the optional parameters @return [Array<(InlineResponse2007, Integer, Hash)>] InlineResponse2007 data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 4961
def get_loyalty_programs_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_loyalty_programs ...'
  end
  # resource path
  local_var_path = '/v1/loyalty_programs'

  # 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[:body] 

  # return_type
  return_type = opts[:return_type] || 'InlineResponse2007' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_loyalty_programs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_loyalty_statistics(program_id, opts = {}) click to toggle source

Get loyalty program statistics by loyalty program ID @param program_id [String] @param [Hash] opts the optional parameters @return [LoyaltyStatistics]

# File lib/talon_one/api/management_api.rb, line 5008
def get_loyalty_statistics(program_id, opts = {})
  data, _status_code, _headers = get_loyalty_statistics_with_http_info(program_id, opts)
  data
end
get_loyalty_statistics_with_http_info(program_id, opts = {}) click to toggle source

Get loyalty program statistics by loyalty program ID @param program_id [String] @param [Hash] opts the optional parameters @return [Array<(LoyaltyStatistics, Integer, Hash)>] LoyaltyStatistics data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 5017
def get_loyalty_statistics_with_http_info(program_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_loyalty_statistics ...'
  end
  # verify the required parameter 'program_id' is set
  if @api_client.config.client_side_validation && program_id.nil?
    fail ArgumentError, "Missing the required parameter 'program_id' when calling ManagementApi.get_loyalty_statistics"
  end
  # resource path
  local_var_path = '/v1/loyalty_programs/{programID}/statistics'.sub('{' + 'programID' + '}', CGI.escape(program_id.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[:body] 

  # return_type
  return_type = opts[:return_type] || 'LoyaltyStatistics' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_loyalty_statistics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_referrals(application_id, campaign_id, opts = {}) click to toggle source

List Referrals (with total count) @param application_id [Integer] @param campaign_id [Integer] @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @option opts [String] :code Filter results performing case-insensitive matching against the referral code. Both the code and the query are folded to remove all non-alpha-numeric characters. @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [String] :valid Either "expired&quot;, "validNow&quot;, or "validFuture&quot;. The first option matches referrals in which the expiry date is set and in the past. The second matches referrals in which start date is null or in the past and expiry date is null or in the future, the third matches referrals in which start date is set and in the future. @option opts [String] :usable Either "true&quot; or "false&quot;. If "true&quot;, only referrals where &#x60;usageCounter &lt; usageLimit&#x60; will be returned, "false&quot; will return only referrals where &#x60;usageCounter &gt;&#x3D; usageLimit&#x60;. @option opts [String] :advocate Filter results by match with a profile id specified in the referral&#39;s AdvocateProfileIntegrationId field @return [InlineResponse201]

# File lib/talon_one/api/management_api.rb, line 5078
def get_referrals(application_id, campaign_id, opts = {})
  data, _status_code, _headers = get_referrals_with_http_info(application_id, campaign_id, opts)
  data
end
get_referrals_with_http_info(application_id, campaign_id, opts = {}) click to toggle source

List Referrals (with total count) @param application_id [Integer] @param campaign_id [Integer] @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @option opts [String] :code Filter results performing case-insensitive matching against the referral code. Both the code and the query are folded to remove all non-alpha-numeric characters. @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [String] :valid Either "expired&quot;, "validNow&quot;, or "validFuture&quot;. The first option matches referrals in which the expiry date is set and in the past. The second matches referrals in which start date is null or in the past and expiry date is null or in the future, the third matches referrals in which start date is set and in the future. @option opts [String] :usable Either "true&quot; or "false&quot;. If "true&quot;, only referrals where &#x60;usageCounter &lt; usageLimit&#x60; will be returned, "false&quot; will return only referrals where &#x60;usageCounter &gt;&#x3D; usageLimit&#x60;. @option opts [String] :advocate Filter results by match with a profile id specified in the referral&#39;s AdvocateProfileIntegrationId field @return [Array<(InlineResponse201, Integer, Hash)>] InlineResponse201 data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 5097
def get_referrals_with_http_info(application_id, campaign_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_referrals ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.get_referrals"
  end
  # verify the required parameter 'campaign_id' is set
  if @api_client.config.client_side_validation && campaign_id.nil?
    fail ArgumentError, "Missing the required parameter 'campaign_id' when calling ManagementApi.get_referrals"
  end
  allowable_values = ["expired", "validNow", "validFuture"]
  if @api_client.config.client_side_validation && opts[:'valid'] && !allowable_values.include?(opts[:'valid'])
    fail ArgumentError, "invalid value for \"valid\", must be one of #{allowable_values}"
  end
  allowable_values = ["true", "false"]
  if @api_client.config.client_side_validation && opts[:'usable'] && !allowable_values.include?(opts[:'usable'])
    fail ArgumentError, "invalid value for \"usable\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/referrals'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s)).sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'code'] = opts[:'code'] if !opts[:'code'].nil?
  query_params[:'createdBefore'] = opts[:'created_before'] if !opts[:'created_before'].nil?
  query_params[:'createdAfter'] = opts[:'created_after'] if !opts[:'created_after'].nil?
  query_params[:'valid'] = opts[:'valid'] if !opts[:'valid'].nil?
  query_params[:'usable'] = opts[:'usable'] if !opts[:'usable'].nil?
  query_params[:'advocate'] = opts[:'advocate'] if !opts[:'advocate'].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[:body] 

  # return_type
  return_type = opts[:return_type] || 'InlineResponse201' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_referrals\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_referrals_without_total_count(application_id, campaign_id, opts = {}) click to toggle source

List Referrals @param application_id [Integer] @param campaign_id [Integer] @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @option opts [String] :code Filter results performing case-insensitive matching against the referral code. Both the code and the query are folded to remove all non-alpha-numeric characters. @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [String] :valid Either "expired&quot;, "validNow&quot;, or "validFuture&quot;. The first option matches referrals in which the expiry date is set and in the past. The second matches referrals in which start date is null or in the past and expiry date is null or in the future, the third matches referrals in which start date is set and in the future. @option opts [String] :usable Either "true&quot; or "false&quot;. If "true&quot;, only referrals where &#x60;usageCounter &lt; usageLimit&#x60; will be returned, "false&quot; will return only referrals where &#x60;usageCounter &gt;&#x3D; usageLimit&#x60;. @option opts [String] :advocate Filter results by match with a profile id specified in the referral&#39;s AdvocateProfileIntegrationId field @return [InlineResponse2006]

# File lib/talon_one/api/management_api.rb, line 5179
def get_referrals_without_total_count(application_id, campaign_id, opts = {})
  data, _status_code, _headers = get_referrals_without_total_count_with_http_info(application_id, campaign_id, opts)
  data
end
get_referrals_without_total_count_with_http_info(application_id, campaign_id, opts = {}) click to toggle source

List Referrals @param application_id [Integer] @param campaign_id [Integer] @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @option opts [String] :code Filter results performing case-insensitive matching against the referral code. Both the code and the query are folded to remove all non-alpha-numeric characters. @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [String] :valid Either "expired&quot;, "validNow&quot;, or "validFuture&quot;. The first option matches referrals in which the expiry date is set and in the past. The second matches referrals in which start date is null or in the past and expiry date is null or in the future, the third matches referrals in which start date is set and in the future. @option opts [String] :usable Either "true&quot; or "false&quot;. If "true&quot;, only referrals where &#x60;usageCounter &lt; usageLimit&#x60; will be returned, "false&quot; will return only referrals where &#x60;usageCounter &gt;&#x3D; usageLimit&#x60;. @option opts [String] :advocate Filter results by match with a profile id specified in the referral&#39;s AdvocateProfileIntegrationId field @return [Array<(InlineResponse2006, Integer, Hash)>] InlineResponse2006 data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 5198
def get_referrals_without_total_count_with_http_info(application_id, campaign_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_referrals_without_total_count ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.get_referrals_without_total_count"
  end
  # verify the required parameter 'campaign_id' is set
  if @api_client.config.client_side_validation && campaign_id.nil?
    fail ArgumentError, "Missing the required parameter 'campaign_id' when calling ManagementApi.get_referrals_without_total_count"
  end
  allowable_values = ["expired", "validNow", "validFuture"]
  if @api_client.config.client_side_validation && opts[:'valid'] && !allowable_values.include?(opts[:'valid'])
    fail ArgumentError, "invalid value for \"valid\", must be one of #{allowable_values}"
  end
  allowable_values = ["true", "false"]
  if @api_client.config.client_side_validation && opts[:'usable'] && !allowable_values.include?(opts[:'usable'])
    fail ArgumentError, "invalid value for \"usable\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/referrals/no_total'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s)).sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'code'] = opts[:'code'] if !opts[:'code'].nil?
  query_params[:'createdBefore'] = opts[:'created_before'] if !opts[:'created_before'].nil?
  query_params[:'createdAfter'] = opts[:'created_after'] if !opts[:'created_after'].nil?
  query_params[:'valid'] = opts[:'valid'] if !opts[:'valid'].nil?
  query_params[:'usable'] = opts[:'usable'] if !opts[:'usable'].nil?
  query_params[:'advocate'] = opts[:'advocate'] if !opts[:'advocate'].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[:body] 

  # return_type
  return_type = opts[:return_type] || 'InlineResponse2006' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_referrals_without_total_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_role(role_id, opts = {}) click to toggle source

Get information for the specified role @param role_id [Integer] @param [Hash] opts the optional parameters @return [Role]

# File lib/talon_one/api/management_api.rb, line 5270
def get_role(role_id, opts = {})
  data, _status_code, _headers = get_role_with_http_info(role_id, opts)
  data
end
get_role_with_http_info(role_id, opts = {}) click to toggle source

Get information for the specified role @param role_id [Integer] @param [Hash] opts the optional parameters @return [Array<(Role, Integer, Hash)>] Role data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 5279
def get_role_with_http_info(role_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_role ...'
  end
  # verify the required parameter 'role_id' is set
  if @api_client.config.client_side_validation && role_id.nil?
    fail ArgumentError, "Missing the required parameter 'role_id' when calling ManagementApi.get_role"
  end
  # resource path
  local_var_path = '/v1/roles/{roleId}'.sub('{' + 'roleId' + '}', CGI.escape(role_id.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[:body] 

  # return_type
  return_type = opts[:return_type] || 'Role' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_ruleset(application_id, campaign_id, ruleset_id, opts = {}) click to toggle source

Get a Ruleset @param application_id [Integer] @param campaign_id [Integer] @param ruleset_id [Integer] @param [Hash] opts the optional parameters @return [Ruleset]

# File lib/talon_one/api/management_api.rb, line 5332
def get_ruleset(application_id, campaign_id, ruleset_id, opts = {})
  data, _status_code, _headers = get_ruleset_with_http_info(application_id, campaign_id, ruleset_id, opts)
  data
end
get_ruleset_with_http_info(application_id, campaign_id, ruleset_id, opts = {}) click to toggle source

Get a Ruleset @param application_id [Integer] @param campaign_id [Integer] @param ruleset_id [Integer] @param [Hash] opts the optional parameters @return [Array<(Ruleset, Integer, Hash)>] Ruleset data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 5343
def get_ruleset_with_http_info(application_id, campaign_id, ruleset_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_ruleset ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.get_ruleset"
  end
  # verify the required parameter 'campaign_id' is set
  if @api_client.config.client_side_validation && campaign_id.nil?
    fail ArgumentError, "Missing the required parameter 'campaign_id' when calling ManagementApi.get_ruleset"
  end
  # verify the required parameter 'ruleset_id' is set
  if @api_client.config.client_side_validation && ruleset_id.nil?
    fail ArgumentError, "Missing the required parameter 'ruleset_id' when calling ManagementApi.get_ruleset"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/rulesets/{rulesetId}'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s)).sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s)).sub('{' + 'rulesetId' + '}', CGI.escape(ruleset_id.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[:body] 

  # return_type
  return_type = opts[:return_type] || 'Ruleset' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_ruleset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_rulesets(application_id, campaign_id, opts = {}) click to toggle source

List Campaign Rulesets @param application_id [Integer] @param campaign_id [Integer] @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @return [InlineResponse2003]

# File lib/talon_one/api/management_api.rb, line 5406
def get_rulesets(application_id, campaign_id, opts = {})
  data, _status_code, _headers = get_rulesets_with_http_info(application_id, campaign_id, opts)
  data
end
get_rulesets_with_http_info(application_id, campaign_id, opts = {}) click to toggle source

List Campaign Rulesets @param application_id [Integer] @param campaign_id [Integer] @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @return [Array<(InlineResponse2003, Integer, Hash)>] InlineResponse2003 data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 5419
def get_rulesets_with_http_info(application_id, campaign_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_rulesets ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.get_rulesets"
  end
  # verify the required parameter 'campaign_id' is set
  if @api_client.config.client_side_validation && campaign_id.nil?
    fail ArgumentError, "Missing the required parameter 'campaign_id' when calling ManagementApi.get_rulesets"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/rulesets'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s)).sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].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[:body] 

  # return_type
  return_type = opts[:return_type] || 'InlineResponse2003' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_rulesets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_user(user_id, opts = {}) click to toggle source

Get a single User Retrieves the data (including an invitation code) for a user. Non-admin users can only get themselves. @param user_id [Integer] @param [Hash] opts the optional parameters @return [User]

# File lib/talon_one/api/management_api.rb, line 5478
def get_user(user_id, opts = {})
  data, _status_code, _headers = get_user_with_http_info(user_id, opts)
  data
end
get_user_with_http_info(user_id, opts = {}) click to toggle source

Get a single User Retrieves the data (including an invitation code) for a user. Non-admin users can only get themselves. @param user_id [Integer] @param [Hash] opts the optional parameters @return [Array<(User, Integer, Hash)>] User data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 5488
def get_user_with_http_info(user_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_user ...'
  end
  # verify the required parameter 'user_id' is set
  if @api_client.config.client_side_validation && user_id.nil?
    fail ArgumentError, "Missing the required parameter 'user_id' when calling ManagementApi.get_user"
  end
  # resource path
  local_var_path = '/v1/users/{userId}'.sub('{' + 'userId' + '}', CGI.escape(user_id.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[:body] 

  # return_type
  return_type = opts[:return_type] || 'User' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_users(opts = {}) click to toggle source

List Users in your account Retrieve all users in your account. @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @return [InlineResponse20026]

# File lib/talon_one/api/management_api.rb, line 5542
def get_users(opts = {})
  data, _status_code, _headers = get_users_with_http_info(opts)
  data
end
get_users_with_http_info(opts = {}) click to toggle source

List Users in your account Retrieve all users in your account. @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @return [Array<(InlineResponse20026, Integer, Hash)>] InlineResponse20026 data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 5554
def get_users_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_users ...'
  end
  # resource path
  local_var_path = '/v1/users'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].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[:body] 

  # return_type
  return_type = opts[:return_type] || 'InlineResponse20026' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_webhook(webhook_id, opts = {}) click to toggle source

Get Webhook Returns an webhook by its id. @param webhook_id [Integer] @param [Hash] opts the optional parameters @return [Webhook]

# File lib/talon_one/api/management_api.rb, line 5605
def get_webhook(webhook_id, opts = {})
  data, _status_code, _headers = get_webhook_with_http_info(webhook_id, opts)
  data
end
get_webhook_activation_logs(opts = {}) click to toggle source

List Webhook activation Log Entries Webhook activation log entries would be created as soon as an integration request triggered an effect with a webhook @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @option opts [String] :integration_request_uuid Filter results by integration request UUID. @option opts [Float] :webhook_id Filter results by Webhook. @option opts [Float] :application_id @option opts [Float] :campaign_id Filter results by campaign. @option opts [DateTime] :created_before Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :created_after Filter results where request and response times to return entries after parameter value, expected to be an RFC3339 timestamp string. You can use any timezone. Talon.One will convert to UTC internally. @return [InlineResponse20023]

# File lib/talon_one/api/management_api.rb, line 5675
def get_webhook_activation_logs(opts = {})
  data, _status_code, _headers = get_webhook_activation_logs_with_http_info(opts)
  data
end
get_webhook_activation_logs_with_http_info(opts = {}) click to toggle source

List Webhook activation Log Entries Webhook activation log entries would be created as soon as an integration request triggered an effect with a webhook @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @option opts [String] :integration_request_uuid Filter results by integration request UUID. @option opts [Float] :webhook_id Filter results by Webhook. @option opts [Float] :application_id @option opts [Float] :campaign_id Filter results by campaign. @option opts [DateTime] :created_before Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :created_after Filter results where request and response times to return entries after parameter value, expected to be an RFC3339 timestamp string. You can use any timezone. Talon.One will convert to UTC internally. @return [Array<(InlineResponse20023, Integer, Hash)>] InlineResponse20023 data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 5693
def get_webhook_activation_logs_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_webhook_activation_logs ...'
  end
  # resource path
  local_var_path = '/v1/webhook_activation_logs'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'integrationRequestUuid'] = opts[:'integration_request_uuid'] if !opts[:'integration_request_uuid'].nil?
  query_params[:'webhookId'] = opts[:'webhook_id'] if !opts[:'webhook_id'].nil?
  query_params[:'applicationId'] = opts[:'application_id'] if !opts[:'application_id'].nil?
  query_params[:'campaignId'] = opts[:'campaign_id'] if !opts[:'campaign_id'].nil?
  query_params[:'createdBefore'] = opts[:'created_before'] if !opts[:'created_before'].nil?
  query_params[:'createdAfter'] = opts[:'created_after'] if !opts[:'created_after'].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[:body] 

  # return_type
  return_type = opts[:return_type] || 'InlineResponse20023' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_webhook_activation_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_webhook_logs(opts = {}) click to toggle source

List Webhook Log Entries @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @option opts [String] :status Filter results by HTTP status codes. @option opts [Float] :webhook_id Filter results by Webhook. @option opts [Float] :application_id @option opts [Float] :campaign_id Filter results by campaign. @option opts [String] :request_uuid Filter results by request UUID. @option opts [DateTime] :created_before Filter results where request and response times to return entries before parameter value, expected to be an RFC3339 timestamp string. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :created_after Filter results where request and response times to return entries after parameter value, expected to be an RFC3339 timestamp string. You can use any timezone. Talon.One will convert to UTC internally. @return [InlineResponse20024]

# File lib/talon_one/api/management_api.rb, line 5758
def get_webhook_logs(opts = {})
  data, _status_code, _headers = get_webhook_logs_with_http_info(opts)
  data
end
get_webhook_logs_with_http_info(opts = {}) click to toggle source

List Webhook Log Entries @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @option opts [String] :status Filter results by HTTP status codes. @option opts [Float] :webhook_id Filter results by Webhook. @option opts [Float] :application_id @option opts [Float] :campaign_id Filter results by campaign. @option opts [String] :request_uuid Filter results by request UUID. @option opts [DateTime] :created_before Filter results where request and response times to return entries before parameter value, expected to be an RFC3339 timestamp string. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :created_after Filter results where request and response times to return entries after parameter value, expected to be an RFC3339 timestamp string. You can use any timezone. Talon.One will convert to UTC internally. @return [Array<(InlineResponse20024, Integer, Hash)>] InlineResponse20024 data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 5776
def get_webhook_logs_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_webhook_logs ...'
  end
  allowable_values = ["success", "error"]
  if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
    fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/webhook_logs'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
  query_params[:'webhookId'] = opts[:'webhook_id'] if !opts[:'webhook_id'].nil?
  query_params[:'applicationId'] = opts[:'application_id'] if !opts[:'application_id'].nil?
  query_params[:'campaignId'] = opts[:'campaign_id'] if !opts[:'campaign_id'].nil?
  query_params[:'requestUuid'] = opts[:'request_uuid'] if !opts[:'request_uuid'].nil?
  query_params[:'createdBefore'] = opts[:'created_before'] if !opts[:'created_before'].nil?
  query_params[:'createdAfter'] = opts[:'created_after'] if !opts[:'created_after'].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[:body] 

  # return_type
  return_type = opts[:return_type] || 'InlineResponse20024' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_webhook_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_webhook_with_http_info(webhook_id, opts = {}) click to toggle source

Get Webhook Returns an webhook by its id. @param webhook_id [Integer] @param [Hash] opts the optional parameters @return [Array<(Webhook, Integer, Hash)>] Webhook data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 5615
def get_webhook_with_http_info(webhook_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_webhook ...'
  end
  # verify the required parameter 'webhook_id' is set
  if @api_client.config.client_side_validation && webhook_id.nil?
    fail ArgumentError, "Missing the required parameter 'webhook_id' when calling ManagementApi.get_webhook"
  end
  # resource path
  local_var_path = '/v1/webhooks/{webhookId}'.sub('{' + 'webhookId' + '}', CGI.escape(webhook_id.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[:body] 

  # return_type
  return_type = opts[:return_type] || 'Webhook' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_webhooks(opts = {}) click to toggle source

List Webhooks @param [Hash] opts the optional parameters @option opts [String] :application_ids Filter by one or more application ids separated by comma @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @return [InlineResponse20022]

# File lib/talon_one/api/management_api.rb, line 5840
def get_webhooks(opts = {})
  data, _status_code, _headers = get_webhooks_with_http_info(opts)
  data
end
get_webhooks_with_http_info(opts = {}) click to toggle source

List Webhooks @param [Hash] opts the optional parameters @option opts [String] :application_ids Filter by one or more application ids separated by comma @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @return [Array<(InlineResponse20022, Integer, Hash)>] InlineResponse20022 data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 5852
def get_webhooks_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_webhooks ...'
  end
  # resource path
  local_var_path = '/v1/webhooks'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'applicationIds'] = opts[:'application_ids'] if !opts[:'application_ids'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].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[:body] 

  # return_type
  return_type = opts[:return_type] || 'InlineResponse20022' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#get_webhooks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
import_coupons(application_id, campaign_id, opts = {}) click to toggle source

Import coupons via CSV file Upload a CSV file containing the coupons that should be created. The file should be sent as multipart data. @param application_id [Integer] @param campaign_id [Integer] @param [Hash] opts the optional parameters @option opts [String] :up_file The file with the information about the data that should be imported. @return [Import]

# File lib/talon_one/api/management_api.rb, line 5906
def import_coupons(application_id, campaign_id, opts = {})
  data, _status_code, _headers = import_coupons_with_http_info(application_id, campaign_id, opts)
  data
end
import_coupons_with_http_info(application_id, campaign_id, opts = {}) click to toggle source

Import coupons via CSV file Upload a CSV file containing the coupons that should be created. The file should be sent as multipart data. @param application_id [Integer] @param campaign_id [Integer] @param [Hash] opts the optional parameters @option opts [String] :up_file The file with the information about the data that should be imported. @return [Array<(Import, Integer, Hash)>] Import data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 5918
def import_coupons_with_http_info(application_id, campaign_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.import_coupons ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.import_coupons"
  end
  # verify the required parameter 'campaign_id' is set
  if @api_client.config.client_side_validation && campaign_id.nil?
    fail ArgumentError, "Missing the required parameter 'campaign_id' when calling ManagementApi.import_coupons"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/import_coupons'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s)).sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.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'])
  # 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['upFile'] = opts[:'up_file'] if !opts[:'up_file'].nil?

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

  # return_type
  return_type = opts[:return_type] || 'Import' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#import_coupons\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
import_loyalty_points(program_id, opts = {}) click to toggle source

Import loyalty points via CSV file Upload a CSV file containing the loyalty points that should be created. The file should be sent as multipart data. @param program_id [Integer] @param [Hash] opts the optional parameters @option opts [String] :up_file The file with the information about the data that should be imported. @return [Import]

# File lib/talon_one/api/management_api.rb, line 5978
def import_loyalty_points(program_id, opts = {})
  data, _status_code, _headers = import_loyalty_points_with_http_info(program_id, opts)
  data
end
import_loyalty_points_with_http_info(program_id, opts = {}) click to toggle source

Import loyalty points via CSV file Upload a CSV file containing the loyalty points that should be created. The file should be sent as multipart data. @param program_id [Integer] @param [Hash] opts the optional parameters @option opts [String] :up_file The file with the information about the data that should be imported. @return [Array<(Import, Integer, Hash)>] Import data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 5989
def import_loyalty_points_with_http_info(program_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.import_loyalty_points ...'
  end
  # verify the required parameter 'program_id' is set
  if @api_client.config.client_side_validation && program_id.nil?
    fail ArgumentError, "Missing the required parameter 'program_id' when calling ManagementApi.import_loyalty_points"
  end
  # resource path
  local_var_path = '/v1/loyalty_programs/{programID}/import_points'.sub('{' + 'programID' + '}', CGI.escape(program_id.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'])
  # 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['upFile'] = opts[:'up_file'] if !opts[:'up_file'].nil?

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

  # return_type
  return_type = opts[:return_type] || 'Import' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#import_loyalty_points\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
import_pool_giveaways(pool_id, opts = {}) click to toggle source

Import giveaways codes into a giveaways pool Upload a CSV file containing the giveaways codes that should be created. Send the file as multipart data. The CSV file can contain the following columns: - `code` (required): the code of your giveaway, for instance, a gift card redemption code. - `startdate`: the start date in RFC3339 of the code redemption period. - `enddate`: the last date in RFC3339 of the code redemption period. - `attributes`: A json object describing custom giveaways attribute names and their values. Double the double-quotes in the object. For example, if you created a custom attribute called `provider`, set it with `"{""provider"": ""myPartnerCompany""}"`. The `startdate` and `enddate` have nothing to do with the validity of the codes. They are only used by the Rule Engine to award the codes or not. You can use the timezone of your choice. It is converted to UTC internally by Talon.One. @param pool_id [Integer] @param [Hash] opts the optional parameters @option opts [String] :up_file The file with the information about the data that should be imported. @return [Import]

# File lib/talon_one/api/management_api.rb, line 6045
def import_pool_giveaways(pool_id, opts = {})
  data, _status_code, _headers = import_pool_giveaways_with_http_info(pool_id, opts)
  data
end
import_pool_giveaways_with_http_info(pool_id, opts = {}) click to toggle source

Import giveaways codes into a giveaways pool Upload a CSV file containing the giveaways codes that should be created. Send the file as multipart data. The CSV file can contain the following columns: - &#x60;code&#x60; (required): the code of your giveaway, for instance, a gift card redemption code. - &#x60;startdate&#x60;: the start date in RFC3339 of the code redemption period. - &#x60;enddate&#x60;: the last date in RFC3339 of the code redemption period. - &#x60;attributes&#x60;: A json object describing custom giveaways attribute names and their values. Double the double-quotes in the object. For example, if you created a custom attribute called &#x60;provider&#x60;, set it with &#x60;&quot;{&quot;&quot;provider&quot;&quot;: "&quot;myPartnerCompany&quot;&quot;}&quot;&#x60;. The &#x60;startdate&#x60; and &#x60;enddate&#x60; have nothing to do with the validity of the codes. They are only used by the Rule Engine to award the codes or not. You can use the timezone of your choice. It is converted to UTC internally by Talon.One. @param pool_id [Integer] @param [Hash] opts the optional parameters @option opts [String] :up_file The file with the information about the data that should be imported. @return [Array<(Import, Integer, Hash)>] Import data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 6056
def import_pool_giveaways_with_http_info(pool_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.import_pool_giveaways ...'
  end
  # verify the required parameter 'pool_id' is set
  if @api_client.config.client_side_validation && pool_id.nil?
    fail ArgumentError, "Missing the required parameter 'pool_id' when calling ManagementApi.import_pool_giveaways"
  end
  # resource path
  local_var_path = '/v1/giveaways/pools/{poolId}/import'.sub('{' + 'poolId' + '}', CGI.escape(pool_id.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'])
  # 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['upFile'] = opts[:'up_file'] if !opts[:'up_file'].nil?

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

  # return_type
  return_type = opts[:return_type] || 'Import' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#import_pool_giveaways\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
import_referrals(application_id, campaign_id, opts = {}) click to toggle source

Import referrals via CSV file Upload a CSV file containing the referrals that should be created. The file should be sent as multipart data. The CSV file can contain the following colums: - `code` (required): the referral code. - `advocateprofileintegrationid` (required): The profile ID of the advocate. - `startdate`: the start date in RFC3339 of the code redemption period. - `expirydate`: the end date in RFC3339 of the code redemption period. - `limitval`: The maximum amount of redemptions of this code. Unlimited (0) when blank. - `attributes`: A json object describing custom referral attribute names and their values. Double the double-quotes in the object. For example, if you created a custom attribute called `category`, set it with `"{""category"": ""10_off""}"`. You can use the timezone of your choice. It is converted to UTC internally by Talon.One. @param application_id [Integer] @param campaign_id [Integer] @param [Hash] opts the optional parameters @option opts [String] :up_file The file with the information about the data that should be imported. @return [Import]

# File lib/talon_one/api/management_api.rb, line 6113
def import_referrals(application_id, campaign_id, opts = {})
  data, _status_code, _headers = import_referrals_with_http_info(application_id, campaign_id, opts)
  data
end
import_referrals_with_http_info(application_id, campaign_id, opts = {}) click to toggle source

Import referrals via CSV file Upload a CSV file containing the referrals that should be created. The file should be sent as multipart data. The CSV file can contain the following colums: - &#x60;code&#x60; (required): the referral code. - &#x60;advocateprofileintegrationid&#x60; (required): The profile ID of the advocate. - &#x60;startdate&#x60;: the start date in RFC3339 of the code redemption period. - &#x60;expirydate&#x60;: the end date in RFC3339 of the code redemption period. - &#x60;limitval&#x60;: The maximum amount of redemptions of this code. Unlimited (0) when blank. - &#x60;attributes&#x60;: A json object describing custom referral attribute names and their values. Double the double-quotes in the object. For example, if you created a custom attribute called &#x60;category&#x60;, set it with &#x60;&quot;{&quot;&quot;category&quot;&quot;: "&quot;10_off&quot;&quot;}&quot;&#x60;. You can use the timezone of your choice. It is converted to UTC internally by Talon.One. @param application_id [Integer] @param campaign_id [Integer] @param [Hash] opts the optional parameters @option opts [String] :up_file The file with the information about the data that should be imported. @return [Array<(Import, Integer, Hash)>] Import data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 6125
def import_referrals_with_http_info(application_id, campaign_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.import_referrals ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.import_referrals"
  end
  # verify the required parameter 'campaign_id' is set
  if @api_client.config.client_side_validation && campaign_id.nil?
    fail ArgumentError, "Missing the required parameter 'campaign_id' when calling ManagementApi.import_referrals"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/import_referrals'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s)).sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.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'])
  # 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['upFile'] = opts[:'up_file'] if !opts[:'up_file'].nil?

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

  # return_type
  return_type = opts[:return_type] || 'Import' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#import_referrals\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
remove_loyalty_points(program_id, integration_id, body, opts = {}) click to toggle source

Deduct points in a certain loyalty program for the specified customer @param program_id [String] @param integration_id [String] @param body [LoyaltyPoints] @param [Hash] opts the optional parameters @return [nil]

# File lib/talon_one/api/management_api.rb, line 6185
def remove_loyalty_points(program_id, integration_id, body, opts = {})
  remove_loyalty_points_with_http_info(program_id, integration_id, body, opts)
  nil
end
remove_loyalty_points_with_http_info(program_id, integration_id, body, opts = {}) click to toggle source

Deduct points in a certain loyalty program for the specified customer @param program_id [String] @param integration_id [String] @param body [LoyaltyPoints] @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 6196
def remove_loyalty_points_with_http_info(program_id, integration_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.remove_loyalty_points ...'
  end
  # verify the required parameter 'program_id' is set
  if @api_client.config.client_side_validation && program_id.nil?
    fail ArgumentError, "Missing the required parameter 'program_id' when calling ManagementApi.remove_loyalty_points"
  end
  # verify the required parameter 'integration_id' is set
  if @api_client.config.client_side_validation && integration_id.nil?
    fail ArgumentError, "Missing the required parameter 'integration_id' when calling ManagementApi.remove_loyalty_points"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling ManagementApi.remove_loyalty_points"
  end
  # resource path
  local_var_path = '/v1/loyalty_programs/{programID}/profile/{integrationID}/deduct_points'.sub('{' + 'programID' + '}', CGI.escape(program_id.to_s)).sub('{' + 'integrationID' + '}', CGI.escape(integration_id.to_s))

  # 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(['application/json'])

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

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

  # return_type
  return_type = opts[:return_type] 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ManagementApi#remove_loyalty_points\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
reset_password(body, opts = {}) click to toggle source

Reset password Consumes the supplied password reset token and updates the password for the associated account. @param body [NewPassword] @param [Hash] opts the optional parameters @return [NewPassword]

# File lib/talon_one/api/management_api.rb, line 6256
def reset_password(body, opts = {})
  data, _status_code, _headers = reset_password_with_http_info(body, opts)
  data
end
reset_password_with_http_info(body, opts = {}) click to toggle source

Reset password Consumes the supplied password reset token and updates the password for the associated account. @param body [NewPassword] @param [Hash] opts the optional parameters @return [Array<(NewPassword, Integer, Hash)>] NewPassword data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 6266
def reset_password_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.reset_password ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling ManagementApi.reset_password"
  end
  # resource path
  local_var_path = '/v1/reset_password'

  # 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[:body] || @api_client.object_to_http_body(body) 

  # return_type
  return_type = opts[:return_type] || 'NewPassword' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#reset_password\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
search_coupons_advanced(application_id, campaign_id, body, opts = {}) click to toggle source

Get a list of the coupons that match the given attributes (with total count) Gets a list of all the coupons with attributes matching the query criteria @param application_id [Integer] @param campaign_id [Integer] @param body [Object] @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @option opts [String] :value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [String] :valid Either "expired&quot;, "validNow&quot;, or "validFuture&quot;. The first option matches coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry date is null or in the future, the third matches coupons in which start date is set and in the future. @option opts [String] :usable Either "true&quot; or "false&quot;. If "true&quot;, only coupons where &#x60;usageCounter &lt; usageLimit&#x60; will be returned, "false&quot; will return only coupons where &#x60;usageCounter &gt;&#x3D; usageLimit&#x60;. @option opts [Integer] :referral_id Filter the results by matching them with the Id of a referral, that meaning the coupons that had been created as an effect of the usage of a referral code. @option opts [String] :recipient_integration_id Filter results by match with a profile id specified in the coupon&#39;s RecipientIntegrationId field @option opts [Boolean] :exact_match Filter results to an exact case-insensitive matching against the coupon code (default to false) @option opts [String] :batch_id Filter results by batches of coupons @return [InlineResponse2004]

# File lib/talon_one/api/management_api.rb, line 6334
def search_coupons_advanced(application_id, campaign_id, body, opts = {})
  data, _status_code, _headers = search_coupons_advanced_with_http_info(application_id, campaign_id, body, opts)
  data
end
search_coupons_advanced_application_wide(application_id, body, opts = {}) click to toggle source

Get a list of the coupons that match the given attributes in all active campaigns of an application (with total count) Gets a list of all the coupons with attributes matching the query criteria in all active campaigns of an application @param application_id [Integer] @param body [Object] @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @option opts [String] :value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [String] :valid Either "expired&quot;, "validNow&quot;, or "validFuture&quot;. The first option matches coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry date is null or in the future, the third matches coupons in which start date is set and in the future. @option opts [String] :usable Either "true&quot; or "false&quot;. If "true&quot;, only coupons where &#x60;usageCounter &lt; usageLimit&#x60; will be returned, "false&quot; will return only coupons where &#x60;usageCounter &gt;&#x3D; usageLimit&#x60;. @option opts [Integer] :referral_id Filter the results by matching them with the Id of a referral, that meaning the coupons that had been created as an effect of the usage of a referral code. @option opts [String] :recipient_integration_id Filter results by match with a profile id specified in the coupon&#39;s RecipientIntegrationId field @option opts [String] :batch_id Filter results by batches of coupons @option opts [Boolean] :exact_match Filter results to an exact case-insensitive matching against the coupon code (default to false) @option opts [String] :campaign_state Filter results by the state of the campaign. @return [InlineResponse2004]

# File lib/talon_one/api/management_api.rb, line 6454
def search_coupons_advanced_application_wide(application_id, body, opts = {})
  data, _status_code, _headers = search_coupons_advanced_application_wide_with_http_info(application_id, body, opts)
  data
end
search_coupons_advanced_application_wide_with_http_info(application_id, body, opts = {}) click to toggle source

Get a list of the coupons that match the given attributes in all active campaigns of an application (with total count) Gets a list of all the coupons with attributes matching the query criteria in all active campaigns of an application @param application_id [Integer] @param body [Object] @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @option opts [String] :value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [String] :valid Either "expired&quot;, "validNow&quot;, or "validFuture&quot;. The first option matches coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry date is null or in the future, the third matches coupons in which start date is set and in the future. @option opts [String] :usable Either "true&quot; or "false&quot;. If "true&quot;, only coupons where &#x60;usageCounter &lt; usageLimit&#x60; will be returned, "false&quot; will return only coupons where &#x60;usageCounter &gt;&#x3D; usageLimit&#x60;. @option opts [Integer] :referral_id Filter the results by matching them with the Id of a referral, that meaning the coupons that had been created as an effect of the usage of a referral code. @option opts [String] :recipient_integration_id Filter results by match with a profile id specified in the coupon&#39;s RecipientIntegrationId field @option opts [String] :batch_id Filter results by batches of coupons @option opts [Boolean] :exact_match Filter results to an exact case-insensitive matching against the coupon code @option opts [String] :campaign_state Filter results by the state of the campaign. @return [Array<(InlineResponse2004, Integer, Hash)>] InlineResponse2004 data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 6478
def search_coupons_advanced_application_wide_with_http_info(application_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.search_coupons_advanced_application_wide ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.search_coupons_advanced_application_wide"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling ManagementApi.search_coupons_advanced_application_wide"
  end
  allowable_values = ["expired", "validNow", "validFuture"]
  if @api_client.config.client_side_validation && opts[:'valid'] && !allowable_values.include?(opts[:'valid'])
    fail ArgumentError, "invalid value for \"valid\", must be one of #{allowable_values}"
  end
  allowable_values = ["true", "false"]
  if @api_client.config.client_side_validation && opts[:'usable'] && !allowable_values.include?(opts[:'usable'])
    fail ArgumentError, "invalid value for \"usable\", must be one of #{allowable_values}"
  end
  allowable_values = ["enabled", "disabled", "archived", "draft", "scheduled", "running", "expired"]
  if @api_client.config.client_side_validation && opts[:'campaign_state'] && !allowable_values.include?(opts[:'campaign_state'])
    fail ArgumentError, "invalid value for \"campaign_state\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/coupons_search_advanced'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'value'] = opts[:'value'] if !opts[:'value'].nil?
  query_params[:'createdBefore'] = opts[:'created_before'] if !opts[:'created_before'].nil?
  query_params[:'createdAfter'] = opts[:'created_after'] if !opts[:'created_after'].nil?
  query_params[:'valid'] = opts[:'valid'] if !opts[:'valid'].nil?
  query_params[:'usable'] = opts[:'usable'] if !opts[:'usable'].nil?
  query_params[:'referralId'] = opts[:'referral_id'] if !opts[:'referral_id'].nil?
  query_params[:'recipientIntegrationId'] = opts[:'recipient_integration_id'] if !opts[:'recipient_integration_id'].nil?
  query_params[:'batchId'] = opts[:'batch_id'] if !opts[:'batch_id'].nil?
  query_params[:'exactMatch'] = opts[:'exact_match'] if !opts[:'exact_match'].nil?
  query_params[:'campaignState'] = opts[:'campaign_state'] if !opts[:'campaign_state'].nil?

  # 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[:body] || @api_client.object_to_http_body(body) 

  # return_type
  return_type = opts[:return_type] || 'InlineResponse2004' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#search_coupons_advanced_application_wide\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
search_coupons_advanced_application_wide_without_total_count(application_id, body, opts = {}) click to toggle source

Get a list of the coupons that match the given attributes in all active campaigns of an application Gets a list of all the coupons with attributes matching the query criteria in all active campaigns of an application @param application_id [Integer] @param body [Object] @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @option opts [String] :value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [String] :valid Either "expired&quot;, "validNow&quot;, or "validFuture&quot;. The first option matches coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry date is null or in the future, the third matches coupons in which start date is set and in the future. @option opts [String] :usable Either "true&quot; or "false&quot;. If "true&quot;, only coupons where &#x60;usageCounter &lt; usageLimit&#x60; will be returned, "false&quot; will return only coupons where &#x60;usageCounter &gt;&#x3D; usageLimit&#x60;. @option opts [Integer] :referral_id Filter the results by matching them with the Id of a referral, that meaning the coupons that had been created as an effect of the usage of a referral code. @option opts [String] :recipient_integration_id Filter results by match with a profile id specified in the coupon&#39;s RecipientIntegrationId field @option opts [String] :batch_id Filter results by batches of coupons @option opts [Boolean] :exact_match Filter results to an exact case-insensitive matching against the coupon code (default to false) @option opts [String] :campaign_state Filter results by the state of the campaign. @return [InlineResponse2005]

# File lib/talon_one/api/management_api.rb, line 6575
def search_coupons_advanced_application_wide_without_total_count(application_id, body, opts = {})
  data, _status_code, _headers = search_coupons_advanced_application_wide_without_total_count_with_http_info(application_id, body, opts)
  data
end
search_coupons_advanced_application_wide_without_total_count_with_http_info(application_id, body, opts = {}) click to toggle source

Get a list of the coupons that match the given attributes in all active campaigns of an application Gets a list of all the coupons with attributes matching the query criteria in all active campaigns of an application @param application_id [Integer] @param body [Object] @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @option opts [String] :value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [String] :valid Either "expired&quot;, "validNow&quot;, or "validFuture&quot;. The first option matches coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry date is null or in the future, the third matches coupons in which start date is set and in the future. @option opts [String] :usable Either "true&quot; or "false&quot;. If "true&quot;, only coupons where &#x60;usageCounter &lt; usageLimit&#x60; will be returned, "false&quot; will return only coupons where &#x60;usageCounter &gt;&#x3D; usageLimit&#x60;. @option opts [Integer] :referral_id Filter the results by matching them with the Id of a referral, that meaning the coupons that had been created as an effect of the usage of a referral code. @option opts [String] :recipient_integration_id Filter results by match with a profile id specified in the coupon&#39;s RecipientIntegrationId field @option opts [String] :batch_id Filter results by batches of coupons @option opts [Boolean] :exact_match Filter results to an exact case-insensitive matching against the coupon code @option opts [String] :campaign_state Filter results by the state of the campaign. @return [Array<(InlineResponse2005, Integer, Hash)>] InlineResponse2005 data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 6599
def search_coupons_advanced_application_wide_without_total_count_with_http_info(application_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.search_coupons_advanced_application_wide_without_total_count ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.search_coupons_advanced_application_wide_without_total_count"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling ManagementApi.search_coupons_advanced_application_wide_without_total_count"
  end
  allowable_values = ["expired", "validNow", "validFuture"]
  if @api_client.config.client_side_validation && opts[:'valid'] && !allowable_values.include?(opts[:'valid'])
    fail ArgumentError, "invalid value for \"valid\", must be one of #{allowable_values}"
  end
  allowable_values = ["true", "false"]
  if @api_client.config.client_side_validation && opts[:'usable'] && !allowable_values.include?(opts[:'usable'])
    fail ArgumentError, "invalid value for \"usable\", must be one of #{allowable_values}"
  end
  allowable_values = ["enabled", "disabled", "archived", "draft", "scheduled", "running", "expired"]
  if @api_client.config.client_side_validation && opts[:'campaign_state'] && !allowable_values.include?(opts[:'campaign_state'])
    fail ArgumentError, "invalid value for \"campaign_state\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/coupons_search_advanced/no_total'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'value'] = opts[:'value'] if !opts[:'value'].nil?
  query_params[:'createdBefore'] = opts[:'created_before'] if !opts[:'created_before'].nil?
  query_params[:'createdAfter'] = opts[:'created_after'] if !opts[:'created_after'].nil?
  query_params[:'valid'] = opts[:'valid'] if !opts[:'valid'].nil?
  query_params[:'usable'] = opts[:'usable'] if !opts[:'usable'].nil?
  query_params[:'referralId'] = opts[:'referral_id'] if !opts[:'referral_id'].nil?
  query_params[:'recipientIntegrationId'] = opts[:'recipient_integration_id'] if !opts[:'recipient_integration_id'].nil?
  query_params[:'batchId'] = opts[:'batch_id'] if !opts[:'batch_id'].nil?
  query_params[:'exactMatch'] = opts[:'exact_match'] if !opts[:'exact_match'].nil?
  query_params[:'campaignState'] = opts[:'campaign_state'] if !opts[:'campaign_state'].nil?

  # 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[:body] || @api_client.object_to_http_body(body) 

  # return_type
  return_type = opts[:return_type] || 'InlineResponse2005' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#search_coupons_advanced_application_wide_without_total_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
search_coupons_advanced_with_http_info(application_id, campaign_id, body, opts = {}) click to toggle source

Get a list of the coupons that match the given attributes (with total count) Gets a list of all the coupons with attributes matching the query criteria @param application_id [Integer] @param campaign_id [Integer] @param body [Object] @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @option opts [String] :value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [String] :valid Either "expired&quot;, "validNow&quot;, or "validFuture&quot;. The first option matches coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry date is null or in the future, the third matches coupons in which start date is set and in the future. @option opts [String] :usable Either "true&quot; or "false&quot;. If "true&quot;, only coupons where &#x60;usageCounter &lt; usageLimit&#x60; will be returned, "false&quot; will return only coupons where &#x60;usageCounter &gt;&#x3D; usageLimit&#x60;. @option opts [Integer] :referral_id Filter the results by matching them with the Id of a referral, that meaning the coupons that had been created as an effect of the usage of a referral code. @option opts [String] :recipient_integration_id Filter results by match with a profile id specified in the coupon&#39;s RecipientIntegrationId field @option opts [Boolean] :exact_match Filter results to an exact case-insensitive matching against the coupon code @option opts [String] :batch_id Filter results by batches of coupons @return [Array<(InlineResponse2004, Integer, Hash)>] InlineResponse2004 data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 6358
def search_coupons_advanced_with_http_info(application_id, campaign_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.search_coupons_advanced ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.search_coupons_advanced"
  end
  # verify the required parameter 'campaign_id' is set
  if @api_client.config.client_side_validation && campaign_id.nil?
    fail ArgumentError, "Missing the required parameter 'campaign_id' when calling ManagementApi.search_coupons_advanced"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling ManagementApi.search_coupons_advanced"
  end
  allowable_values = ["expired", "validNow", "validFuture"]
  if @api_client.config.client_side_validation && opts[:'valid'] && !allowable_values.include?(opts[:'valid'])
    fail ArgumentError, "invalid value for \"valid\", must be one of #{allowable_values}"
  end
  allowable_values = ["true", "false"]
  if @api_client.config.client_side_validation && opts[:'usable'] && !allowable_values.include?(opts[:'usable'])
    fail ArgumentError, "invalid value for \"usable\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/coupons_search_advanced'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s)).sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'value'] = opts[:'value'] if !opts[:'value'].nil?
  query_params[:'createdBefore'] = opts[:'created_before'] if !opts[:'created_before'].nil?
  query_params[:'createdAfter'] = opts[:'created_after'] if !opts[:'created_after'].nil?
  query_params[:'valid'] = opts[:'valid'] if !opts[:'valid'].nil?
  query_params[:'usable'] = opts[:'usable'] if !opts[:'usable'].nil?
  query_params[:'referralId'] = opts[:'referral_id'] if !opts[:'referral_id'].nil?
  query_params[:'recipientIntegrationId'] = opts[:'recipient_integration_id'] if !opts[:'recipient_integration_id'].nil?
  query_params[:'exactMatch'] = opts[:'exact_match'] if !opts[:'exact_match'].nil?
  query_params[:'batchId'] = opts[:'batch_id'] if !opts[:'batch_id'].nil?

  # 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[:body] || @api_client.object_to_http_body(body) 

  # return_type
  return_type = opts[:return_type] || 'InlineResponse2004' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#search_coupons_advanced\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
search_coupons_advanced_without_total_count(application_id, campaign_id, body, opts = {}) click to toggle source

Get a list of the coupons that match the given attributes Gets a list of all the coupons with attributes matching the query criteria @param application_id [Integer] @param campaign_id [Integer] @param body [Object] @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @option opts [String] :value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [String] :valid Either "expired&quot;, "validNow&quot;, or "validFuture&quot;. The first option matches coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry date is null or in the future, the third matches coupons in which start date is set and in the future. @option opts [String] :usable Either "true&quot; or "false&quot;. If "true&quot;, only coupons where &#x60;usageCounter &lt; usageLimit&#x60; will be returned, "false&quot; will return only coupons where &#x60;usageCounter &gt;&#x3D; usageLimit&#x60;. @option opts [Integer] :referral_id Filter the results by matching them with the Id of a referral, that meaning the coupons that had been created as an effect of the usage of a referral code. @option opts [String] :recipient_integration_id Filter results by match with a profile id specified in the coupon&#39;s RecipientIntegrationId field @option opts [Boolean] :exact_match Filter results to an exact case-insensitive matching against the coupon code (default to false) @option opts [String] :batch_id Filter results by batches of coupons @return [InlineResponse2005]

# File lib/talon_one/api/management_api.rb, line 6696
def search_coupons_advanced_without_total_count(application_id, campaign_id, body, opts = {})
  data, _status_code, _headers = search_coupons_advanced_without_total_count_with_http_info(application_id, campaign_id, body, opts)
  data
end
search_coupons_advanced_without_total_count_with_http_info(application_id, campaign_id, body, opts = {}) click to toggle source

Get a list of the coupons that match the given attributes Gets a list of all the coupons with attributes matching the query criteria @param application_id [Integer] @param campaign_id [Integer] @param body [Object] @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used. @option opts [Integer] :skip Skips the given number of items when paging through large result sets. @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with &#x60;-&#x60; to sort in descending order. @option opts [String] :value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @option opts [String] :valid Either "expired&quot;, "validNow&quot;, or "validFuture&quot;. The first option matches coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry date is null or in the future, the third matches coupons in which start date is set and in the future. @option opts [String] :usable Either "true&quot; or "false&quot;. If "true&quot;, only coupons where &#x60;usageCounter &lt; usageLimit&#x60; will be returned, "false&quot; will return only coupons where &#x60;usageCounter &gt;&#x3D; usageLimit&#x60;. @option opts [Integer] :referral_id Filter the results by matching them with the Id of a referral, that meaning the coupons that had been created as an effect of the usage of a referral code. @option opts [String] :recipient_integration_id Filter results by match with a profile id specified in the coupon&#39;s RecipientIntegrationId field @option opts [Boolean] :exact_match Filter results to an exact case-insensitive matching against the coupon code @option opts [String] :batch_id Filter results by batches of coupons @return [Array<(InlineResponse2005, Integer, Hash)>] InlineResponse2005 data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 6720
def search_coupons_advanced_without_total_count_with_http_info(application_id, campaign_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.search_coupons_advanced_without_total_count ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.search_coupons_advanced_without_total_count"
  end
  # verify the required parameter 'campaign_id' is set
  if @api_client.config.client_side_validation && campaign_id.nil?
    fail ArgumentError, "Missing the required parameter 'campaign_id' when calling ManagementApi.search_coupons_advanced_without_total_count"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling ManagementApi.search_coupons_advanced_without_total_count"
  end
  allowable_values = ["expired", "validNow", "validFuture"]
  if @api_client.config.client_side_validation && opts[:'valid'] && !allowable_values.include?(opts[:'valid'])
    fail ArgumentError, "invalid value for \"valid\", must be one of #{allowable_values}"
  end
  allowable_values = ["true", "false"]
  if @api_client.config.client_side_validation && opts[:'usable'] && !allowable_values.include?(opts[:'usable'])
    fail ArgumentError, "invalid value for \"usable\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/coupons_search_advanced/no_total'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s)).sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'value'] = opts[:'value'] if !opts[:'value'].nil?
  query_params[:'createdBefore'] = opts[:'created_before'] if !opts[:'created_before'].nil?
  query_params[:'createdAfter'] = opts[:'created_after'] if !opts[:'created_after'].nil?
  query_params[:'valid'] = opts[:'valid'] if !opts[:'valid'].nil?
  query_params[:'usable'] = opts[:'usable'] if !opts[:'usable'].nil?
  query_params[:'referralId'] = opts[:'referral_id'] if !opts[:'referral_id'].nil?
  query_params[:'recipientIntegrationId'] = opts[:'recipient_integration_id'] if !opts[:'recipient_integration_id'].nil?
  query_params[:'exactMatch'] = opts[:'exact_match'] if !opts[:'exact_match'].nil?
  query_params[:'batchId'] = opts[:'batch_id'] if !opts[:'batch_id'].nil?

  # 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[:body] || @api_client.object_to_http_body(body) 

  # return_type
  return_type = opts[:return_type] || 'InlineResponse2005' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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: ManagementApi#search_coupons_advanced_without_total_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
update_additional_cost(additional_cost_id, body, opts = {}) click to toggle source

Update an additional cost Updates an existing additional cost. Once created, the only property of an additional cost that can be changed is the title (human readable description). This restriction is in place to prevent accidentally breaking live integrations. @param additional_cost_id [Integer] @param body [NewAdditionalCost] @param [Hash] opts the optional parameters @return [AccountAdditionalCost]

# File lib/talon_one/api/management_api.rb, line 6803
def update_additional_cost(additional_cost_id, body, opts = {})
  data, _status_code, _headers = update_additional_cost_with_http_info(additional_cost_id, body, opts)
  data
end
update_additional_cost_with_http_info(additional_cost_id, body, opts = {}) click to toggle source

Update an additional cost Updates an existing additional cost. Once created, the only property of an additional cost that can be changed is the title (human readable description). This restriction is in place to prevent accidentally breaking live integrations. @param additional_cost_id [Integer] @param body [NewAdditionalCost] @param [Hash] opts the optional parameters @return [Array<(AccountAdditionalCost, Integer, Hash)>] AccountAdditionalCost data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 6814
def update_additional_cost_with_http_info(additional_cost_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.update_additional_cost ...'
  end
  # verify the required parameter 'additional_cost_id' is set
  if @api_client.config.client_side_validation && additional_cost_id.nil?
    fail ArgumentError, "Missing the required parameter 'additional_cost_id' when calling ManagementApi.update_additional_cost"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling ManagementApi.update_additional_cost"
  end
  # resource path
  local_var_path = '/v1/additional_costs/{additionalCostId}'.sub('{' + 'additionalCostId' + '}', CGI.escape(additional_cost_id.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'])
  # 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[:body] || @api_client.object_to_http_body(body) 

  # return_type
  return_type = opts[:return_type] || 'AccountAdditionalCost' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ManagementApi#update_additional_cost\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
update_attribute(attribute_id, body, opts = {}) click to toggle source

Update a custom attribute Updates an existing custom attribute. Once created, the only property of a custom attribute that can be changed is the title (human readable description). This restriction is in place to prevent accidentally breaking live integrations. E.g. if you have a customer profile attribute with the name `region`, and your integration is sending `attributes.region` with customer profile updates, changing the name to `locale` would cause the integration requests to begin failing. If you really need to change the `type` or `name` property of a custom attribute, create a new attribute and update any relevant integrations and rules to use the new attribute. Then delete the old attribute when you are confident you have migrated any needed data from the old attribute to the new one. @param attribute_id [Integer] @param body [NewAttribute] @param [Hash] opts the optional parameters @return [Attribute]

# File lib/talon_one/api/management_api.rb, line 6873
def update_attribute(attribute_id, body, opts = {})
  data, _status_code, _headers = update_attribute_with_http_info(attribute_id, body, opts)
  data
end
update_attribute_with_http_info(attribute_id, body, opts = {}) click to toggle source

Update a custom attribute Updates an existing custom attribute. Once created, the only property of a custom attribute that can be changed is the title (human readable description). This restriction is in place to prevent accidentally breaking live integrations. E.g. if you have a customer profile attribute with the name &#x60;region&#x60;, and your integration is sending &#x60;attributes.region&#x60; with customer profile updates, changing the name to &#x60;locale&#x60; would cause the integration requests to begin failing. If you really need to change the &#x60;type&#x60; or &#x60;name&#x60; property of a custom attribute, create a new attribute and update any relevant integrations and rules to use the new attribute. Then delete the old attribute when you are confident you have migrated any needed data from the old attribute to the new one. @param attribute_id [Integer] @param body [NewAttribute] @param [Hash] opts the optional parameters @return [Array<(Attribute, Integer, Hash)>] Attribute data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 6884
def update_attribute_with_http_info(attribute_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.update_attribute ...'
  end
  # verify the required parameter 'attribute_id' is set
  if @api_client.config.client_side_validation && attribute_id.nil?
    fail ArgumentError, "Missing the required parameter 'attribute_id' when calling ManagementApi.update_attribute"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling ManagementApi.update_attribute"
  end
  # resource path
  local_var_path = '/v1/attributes/{attributeId}'.sub('{' + 'attributeId' + '}', CGI.escape(attribute_id.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'])
  # 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[:body] || @api_client.object_to_http_body(body) 

  # return_type
  return_type = opts[:return_type] || 'Attribute' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ManagementApi#update_attribute\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
update_campaign(application_id, campaign_id, body, opts = {}) click to toggle source

Update a Campaign @param application_id [Integer] @param campaign_id [Integer] @param body [UpdateCampaign] @param [Hash] opts the optional parameters @return [Campaign]

# File lib/talon_one/api/management_api.rb, line 6943
def update_campaign(application_id, campaign_id, body, opts = {})
  data, _status_code, _headers = update_campaign_with_http_info(application_id, campaign_id, body, opts)
  data
end
update_campaign_with_http_info(application_id, campaign_id, body, opts = {}) click to toggle source

Update a Campaign @param application_id [Integer] @param campaign_id [Integer] @param body [UpdateCampaign] @param [Hash] opts the optional parameters @return [Array<(Campaign, Integer, Hash)>] Campaign data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 6954
def update_campaign_with_http_info(application_id, campaign_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.update_campaign ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.update_campaign"
  end
  # verify the required parameter 'campaign_id' is set
  if @api_client.config.client_side_validation && campaign_id.nil?
    fail ArgumentError, "Missing the required parameter 'campaign_id' when calling ManagementApi.update_campaign"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling ManagementApi.update_campaign"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s)).sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.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'])
  # 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[:body] || @api_client.object_to_http_body(body) 

  # return_type
  return_type = opts[:return_type] || 'Campaign' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ManagementApi#update_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
update_coupon(application_id, campaign_id, coupon_id, body, opts = {}) click to toggle source

Update a Coupon @param application_id [Integer] @param campaign_id [Integer] @param coupon_id [String] The ID of the coupon code to update @param body [UpdateCoupon] @param [Hash] opts the optional parameters @return [Coupon]

# File lib/talon_one/api/management_api.rb, line 7018
def update_coupon(application_id, campaign_id, coupon_id, body, opts = {})
  data, _status_code, _headers = update_coupon_with_http_info(application_id, campaign_id, coupon_id, body, opts)
  data
end
update_coupon_batch(application_id, campaign_id, body, opts = {}) click to toggle source

Update a Batch of Coupons @param application_id [Integer] @param campaign_id [Integer] @param body [UpdateCouponBatch] @param [Hash] opts the optional parameters @return [nil]

# File lib/talon_one/api/management_api.rb, line 7097
def update_coupon_batch(application_id, campaign_id, body, opts = {})
  update_coupon_batch_with_http_info(application_id, campaign_id, body, opts)
  nil
end
update_coupon_batch_with_http_info(application_id, campaign_id, body, opts = {}) click to toggle source

Update a Batch of Coupons @param application_id [Integer] @param campaign_id [Integer] @param body [UpdateCouponBatch] @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 7108
def update_coupon_batch_with_http_info(application_id, campaign_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.update_coupon_batch ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.update_coupon_batch"
  end
  # verify the required parameter 'campaign_id' is set
  if @api_client.config.client_side_validation && campaign_id.nil?
    fail ArgumentError, "Missing the required parameter 'campaign_id' when calling ManagementApi.update_coupon_batch"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling ManagementApi.update_coupon_batch"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/coupons'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s)).sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s))

  # 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(['application/json'])

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

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

  # return_type
  return_type = opts[:return_type] 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ManagementApi#update_coupon_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
update_coupon_with_http_info(application_id, campaign_id, coupon_id, body, opts = {}) click to toggle source

Update a Coupon @param application_id [Integer] @param campaign_id [Integer] @param coupon_id [String] The ID of the coupon code to update @param body [UpdateCoupon] @param [Hash] opts the optional parameters @return [Array<(Coupon, Integer, Hash)>] Coupon data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 7030
def update_coupon_with_http_info(application_id, campaign_id, coupon_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.update_coupon ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.update_coupon"
  end
  # verify the required parameter 'campaign_id' is set
  if @api_client.config.client_side_validation && campaign_id.nil?
    fail ArgumentError, "Missing the required parameter 'campaign_id' when calling ManagementApi.update_coupon"
  end
  # verify the required parameter 'coupon_id' is set
  if @api_client.config.client_side_validation && coupon_id.nil?
    fail ArgumentError, "Missing the required parameter 'coupon_id' when calling ManagementApi.update_coupon"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling ManagementApi.update_coupon"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/coupons/{couponId}'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s)).sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s)).sub('{' + 'couponId' + '}', CGI.escape(coupon_id.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'])
  # 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[:body] || @api_client.object_to_http_body(body) 

  # return_type
  return_type = opts[:return_type] || 'Coupon' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ManagementApi#update_coupon\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
update_referral(application_id, campaign_id, referral_id, body, opts = {}) click to toggle source

Update one Referral @param application_id [Integer] @param campaign_id [Integer] @param referral_id [String] The ID of the referral code to delete @param body [UpdateReferral] @param [Hash] opts the optional parameters @return [Referral]

# File lib/talon_one/api/management_api.rb, line 7170
def update_referral(application_id, campaign_id, referral_id, body, opts = {})
  data, _status_code, _headers = update_referral_with_http_info(application_id, campaign_id, referral_id, body, opts)
  data
end
update_referral_with_http_info(application_id, campaign_id, referral_id, body, opts = {}) click to toggle source

Update one Referral @param application_id [Integer] @param campaign_id [Integer] @param referral_id [String] The ID of the referral code to delete @param body [UpdateReferral] @param [Hash] opts the optional parameters @return [Array<(Referral, Integer, Hash)>] Referral data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 7182
def update_referral_with_http_info(application_id, campaign_id, referral_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.update_referral ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.update_referral"
  end
  # verify the required parameter 'campaign_id' is set
  if @api_client.config.client_side_validation && campaign_id.nil?
    fail ArgumentError, "Missing the required parameter 'campaign_id' when calling ManagementApi.update_referral"
  end
  # verify the required parameter 'referral_id' is set
  if @api_client.config.client_side_validation && referral_id.nil?
    fail ArgumentError, "Missing the required parameter 'referral_id' when calling ManagementApi.update_referral"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling ManagementApi.update_referral"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/referrals/{referralId}'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s)).sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s)).sub('{' + 'referralId' + '}', CGI.escape(referral_id.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'])
  # 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[:body] || @api_client.object_to_http_body(body) 

  # return_type
  return_type = opts[:return_type] || 'Referral' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ManagementApi#update_referral\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
update_ruleset(application_id, campaign_id, ruleset_id, body, opts = {}) click to toggle source

Update a Ruleset @param application_id [Integer] @param campaign_id [Integer] @param ruleset_id [Integer] @param body [NewRuleset] @param [Hash] opts the optional parameters @return [Ruleset]

# File lib/talon_one/api/management_api.rb, line 7250
def update_ruleset(application_id, campaign_id, ruleset_id, body, opts = {})
  data, _status_code, _headers = update_ruleset_with_http_info(application_id, campaign_id, ruleset_id, body, opts)
  data
end
update_ruleset_with_http_info(application_id, campaign_id, ruleset_id, body, opts = {}) click to toggle source

Update a Ruleset @param application_id [Integer] @param campaign_id [Integer] @param ruleset_id [Integer] @param body [NewRuleset] @param [Hash] opts the optional parameters @return [Array<(Ruleset, Integer, Hash)>] Ruleset data, response status code and response headers

# File lib/talon_one/api/management_api.rb, line 7262
def update_ruleset_with_http_info(application_id, campaign_id, ruleset_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.update_ruleset ...'
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling ManagementApi.update_ruleset"
  end
  # verify the required parameter 'campaign_id' is set
  if @api_client.config.client_side_validation && campaign_id.nil?
    fail ArgumentError, "Missing the required parameter 'campaign_id' when calling ManagementApi.update_ruleset"
  end
  # verify the required parameter 'ruleset_id' is set
  if @api_client.config.client_side_validation && ruleset_id.nil?
    fail ArgumentError, "Missing the required parameter 'ruleset_id' when calling ManagementApi.update_ruleset"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling ManagementApi.update_ruleset"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/rulesets/{rulesetId}'.sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s)).sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s)).sub('{' + 'rulesetId' + '}', CGI.escape(ruleset_id.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'])
  # 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[:body] || @api_client.object_to_http_body(body) 

  # return_type
  return_type = opts[:return_type] || 'Ruleset' 

  # auth_names
  auth_names = opts[:auth_names] || ['manager_auth']

  new_options = opts.merge(
    :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(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ManagementApi#update_ruleset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end