class TalonOne::IntegrationApi

Attributes

api_client[RW]

Public Class Methods

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

Public Instance Methods

create_coupon_reservation(coupon_value, body, opts = {}) click to toggle source

Create a new coupon reservation Creates a coupon reservation for all passed customer profiles on this couponID @param coupon_value [String] The value of a coupon @param body [CouponReservations] @param [Hash] opts the optional parameters @return [Coupon]

# File lib/talon_one/api/integration_api.rb, line 28
def create_coupon_reservation(coupon_value, body, opts = {})
  data, _status_code, _headers = create_coupon_reservation_with_http_info(coupon_value, body, opts)
  data
end
create_coupon_reservation_with_http_info(coupon_value, body, opts = {}) click to toggle source

Create a new coupon reservation Creates a coupon reservation for all passed customer profiles on this couponID @param coupon_value [String] The value of a coupon @param body [CouponReservations] @param [Hash] opts the optional parameters @return [Array<(Coupon, Integer, Hash)>] Coupon data, response status code and response headers

# File lib/talon_one/api/integration_api.rb, line 39
def create_coupon_reservation_with_http_info(coupon_value, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: IntegrationApi.create_coupon_reservation ...'
  end
  # verify the required parameter 'coupon_value' is set
  if @api_client.config.client_side_validation && coupon_value.nil?
    fail ArgumentError, "Missing the required parameter 'coupon_value' when calling IntegrationApi.create_coupon_reservation"
  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 IntegrationApi.create_coupon_reservation"
  end
  # resource path
  local_var_path = '/v1/coupon_reservations/{couponValue}'.sub('{' + 'couponValue' + '}', CGI.escape(coupon_value.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] || ['api_key_v1', '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: IntegrationApi#create_coupon_reservation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_referral(body, opts = {}) click to toggle source

Create a referral code for an advocate Creates a referral code for an advocate. The code will be valid for the referral campaign for which is created, indicated in the `campaignId` parameter, and will be associated with the profile specified in the `advocateProfileIntegrationId` parameter as the advocate's profile. @param body [NewReferral] @param [Hash] opts the optional parameters @return [Referral]

# File lib/talon_one/api/integration_api.rb, line 97
def create_referral(body, opts = {})
  data, _status_code, _headers = create_referral_with_http_info(body, opts)
  data
end
create_referral_with_http_info(body, opts = {}) click to toggle source

Create a referral code for an advocate Creates a referral code for an advocate. The code will be valid for the referral campaign for which is created, indicated in the &#x60;campaignId&#x60; parameter, and will be associated with the profile specified in the &#x60;advocateProfileIntegrationId&#x60; parameter as the advocate&#39;s profile. @param body [NewReferral] @param [Hash] opts the optional parameters @return [Array<(Referral, Integer, Hash)>] Referral data, response status code and response headers

# File lib/talon_one/api/integration_api.rb, line 107
def create_referral_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: IntegrationApi.create_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 IntegrationApi.create_referral"
  end
  # resource path
  local_var_path = '/v1/referrals'

  # 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] || ['api_key_v1', '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: IntegrationApi#create_referral\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_referrals_for_multiple_advocates(body, opts = {}) click to toggle source

Create referral codes for multiple advocates Creates unique referral codes for multiple advocates. The code will be valid for the referral campaign for which it is created, indicated in the `campaignId` parameter, and one referral code will be associated with one advocate using the profile specified in the `advocateProfileIntegrationId` parameter as the advocate's profile. @param body [NewReferralsForMultipleAdvocates] @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 [InlineResponse201]

# File lib/talon_one/api/integration_api.rb, line 162
def create_referrals_for_multiple_advocates(body, opts = {})
  data, _status_code, _headers = create_referrals_for_multiple_advocates_with_http_info(body, opts)
  data
end
create_referrals_for_multiple_advocates_with_http_info(body, opts = {}) click to toggle source

Create referral codes for multiple advocates Creates unique referral codes for multiple advocates. The code will be valid for the referral campaign for which it is created, indicated in the &#x60;campaignId&#x60; parameter, and one referral code will be associated with one advocate using the profile specified in the &#x60;advocateProfileIntegrationId&#x60; parameter as the advocate&#39;s profile. @param body [NewReferralsForMultipleAdvocates] @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<(InlineResponse201, Integer, Hash)>] InlineResponse201 data, response status code and response headers

# File lib/talon_one/api/integration_api.rb, line 173
def create_referrals_for_multiple_advocates_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: IntegrationApi.create_referrals_for_multiple_advocates ...'
  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 IntegrationApi.create_referrals_for_multiple_advocates"
  end
  # resource path
  local_var_path = '/v1/referrals_for_multiple_advocates'

  # 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] || 'InlineResponse201' 

  # auth_names
  auth_names = opts[:auth_names] || ['api_key_v1', '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: IntegrationApi#create_referrals_for_multiple_advocates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_coupon_reservation(coupon_value, body, opts = {}) click to toggle source

Delete coupon reservations Removes all passed customer profiles reservation from this coupon @param coupon_value [String] The value of a coupon @param body [CouponReservations] @param [Hash] opts the optional parameters @return [nil]

# File lib/talon_one/api/integration_api.rb, line 229
def delete_coupon_reservation(coupon_value, body, opts = {})
  delete_coupon_reservation_with_http_info(coupon_value, body, opts)
  nil
end
delete_coupon_reservation_with_http_info(coupon_value, body, opts = {}) click to toggle source

Delete coupon reservations Removes all passed customer profiles reservation from this coupon @param coupon_value [String] The value of a coupon @param body [CouponReservations] @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers

# File lib/talon_one/api/integration_api.rb, line 240
def delete_coupon_reservation_with_http_info(coupon_value, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: IntegrationApi.delete_coupon_reservation ...'
  end
  # verify the required parameter 'coupon_value' is set
  if @api_client.config.client_side_validation && coupon_value.nil?
    fail ArgumentError, "Missing the required parameter 'coupon_value' when calling IntegrationApi.delete_coupon_reservation"
  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 IntegrationApi.delete_coupon_reservation"
  end
  # resource path
  local_var_path = '/v1/coupon_reservations/{couponValue}'.sub('{' + 'couponValue' + '}', CGI.escape(coupon_value.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] || ['api_key_v1', '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(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: IntegrationApi#delete_coupon_reservation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_customer_data(integration_id, opts = {}) click to toggle source

Delete the personal data of a customer Delete all attributes on the customer profile and on entities that reference that customer profile. @param integration_id [String] The custom identifier for this profile, must be unique within the account. @param [Hash] opts the optional parameters @return [nil]

# File lib/talon_one/api/integration_api.rb, line 296
def delete_customer_data(integration_id, opts = {})
  delete_customer_data_with_http_info(integration_id, opts)
  nil
end
delete_customer_data_with_http_info(integration_id, opts = {}) click to toggle source

Delete the personal data of a customer Delete all attributes on the customer profile and on entities that reference that customer profile. @param integration_id [String] The custom identifier for this profile, must be unique within the account. @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers

# File lib/talon_one/api/integration_api.rb, line 306
def delete_customer_data_with_http_info(integration_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: IntegrationApi.delete_customer_data ...'
  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 IntegrationApi.delete_customer_data"
  end
  # resource path
  local_var_path = '/v1/customer_data/{integrationId}'.sub('{' + 'integrationId' + '}', CGI.escape(integration_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] || ['api_key_v1', '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(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: IntegrationApi#delete_customer_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_customer_inventory(integration_id, opts = {}) click to toggle source

Get an inventory of all data associated with a specific customer profile Get information regarding entities referencing this customer profile's integrationId. Currently we support customer profile information, referral codes and reserved coupons. In the future, this will be expanded with loyalty points. @param integration_id [String] The custom identifier for this profile, must be unique within the account. @param [Hash] opts the optional parameters @option opts [Boolean] :profile optional flag to decide if you would like customer profile information in the response @option opts [Boolean] :referrals optional flag to decide if you would like referral information in the response @option opts [Boolean] :coupons optional flag to decide if you would like coupon information in the response @option opts [Boolean] :loyalty optional flag to decide if you would like loyalty information in the response @option opts [Boolean] :giveaways optional flag to decide if you would like giveaways information in the response @return [CustomerInventory]

# File lib/talon_one/api/integration_api.rb, line 361
def get_customer_inventory(integration_id, opts = {})
  data, _status_code, _headers = get_customer_inventory_with_http_info(integration_id, opts)
  data
end
get_customer_inventory_with_http_info(integration_id, opts = {}) click to toggle source

Get an inventory of all data associated with a specific customer profile Get information regarding entities referencing this customer profile&#39;s integrationId. Currently we support customer profile information, referral codes and reserved coupons. In the future, this will be expanded with loyalty points. @param integration_id [String] The custom identifier for this profile, must be unique within the account. @param [Hash] opts the optional parameters @option opts [Boolean] :profile optional flag to decide if you would like customer profile information in the response @option opts [Boolean] :referrals optional flag to decide if you would like referral information in the response @option opts [Boolean] :coupons optional flag to decide if you would like coupon information in the response @option opts [Boolean] :loyalty optional flag to decide if you would like loyalty information in the response @option opts [Boolean] :giveaways optional flag to decide if you would like giveaways information in the response @return [Array<(CustomerInventory, Integer, Hash)>] CustomerInventory data, response status code and response headers

# File lib/talon_one/api/integration_api.rb, line 376
def get_customer_inventory_with_http_info(integration_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: IntegrationApi.get_customer_inventory ...'
  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 IntegrationApi.get_customer_inventory"
  end
  # resource path
  local_var_path = '/v1/customer_profiles/{integrationId}/inventory'.sub('{' + 'integrationId' + '}', CGI.escape(integration_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'profile'] = opts[:'profile'] if !opts[:'profile'].nil?
  query_params[:'referrals'] = opts[:'referrals'] if !opts[:'referrals'].nil?
  query_params[:'coupons'] = opts[:'coupons'] if !opts[:'coupons'].nil?
  query_params[:'loyalty'] = opts[:'loyalty'] if !opts[:'loyalty'].nil?
  query_params[:'giveaways'] = opts[:'giveaways'] if !opts[:'giveaways'].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] || 'CustomerInventory' 

  # auth_names
  auth_names = opts[:auth_names] || ['api_key_v1', '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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: IntegrationApi#get_customer_inventory\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_reserved_customers(coupon_value, opts = {}) click to toggle source

Get the users that have this coupon reserved Returns all users that have this coupon marked as reserved @param coupon_value [String] The value of a coupon @param [Hash] opts the optional parameters @return [InlineResponse200]

# File lib/talon_one/api/integration_api.rb, line 433
def get_reserved_customers(coupon_value, opts = {})
  data, _status_code, _headers = get_reserved_customers_with_http_info(coupon_value, opts)
  data
end
get_reserved_customers_with_http_info(coupon_value, opts = {}) click to toggle source

Get the users that have this coupon reserved Returns all users that have this coupon marked as reserved @param coupon_value [String] The value of a coupon @param [Hash] opts the optional parameters @return [Array<(InlineResponse200, Integer, Hash)>] InlineResponse200 data, response status code and response headers

# File lib/talon_one/api/integration_api.rb, line 443
def get_reserved_customers_with_http_info(coupon_value, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: IntegrationApi.get_reserved_customers ...'
  end
  # verify the required parameter 'coupon_value' is set
  if @api_client.config.client_side_validation && coupon_value.nil?
    fail ArgumentError, "Missing the required parameter 'coupon_value' when calling IntegrationApi.get_reserved_customers"
  end
  # resource path
  local_var_path = '/v1/coupon_reservations/customerprofiles/{couponValue}'.sub('{' + 'couponValue' + '}', CGI.escape(coupon_value.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] || 'InlineResponse200' 

  # auth_names
  auth_names = opts[:auth_names] || ['api_key_v1', '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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: IntegrationApi#get_reserved_customers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
track_event(body, opts = {}) click to toggle source

Track an Event Records an arbitrary event in a customer session. For example, an integration might record an event when a user updates their payment information. The `sessionId` body parameter is required, an event is always part of a session. Much like updating a customer session, if either the profile or the session do not exist, a new empty one will be created. Note that if the specified session already exists, it must belong to the same `profileId` or an error will be returned. As with customer sessions, you can use an empty string for `profileId` to indicate that this is an anonymous session. Updating a customer profile will return a response with the full integration state. This includes the current state of the customer profile, the customer session, the event that was recorded, and an array of effects that took place. @param body [NewEvent] @param [Hash] opts the optional parameters @option opts [Boolean] :dry Indicates whether to persist the changes. Changes are ignored when &#x60;dry&#x3D;true&#x60;. @return [IntegrationState]

# File lib/talon_one/api/integration_api.rb, line 496
def track_event(body, opts = {})
  data, _status_code, _headers = track_event_with_http_info(body, opts)
  data
end
track_event_with_http_info(body, opts = {}) click to toggle source

Track an Event Records an arbitrary event in a customer session. For example, an integration might record an event when a user updates their payment information. The &#x60;sessionId&#x60; body parameter is required, an event is always part of a session. Much like updating a customer session, if either the profile or the session do not exist, a new empty one will be created. Note that if the specified session already exists, it must belong to the same &#x60;profileId&#x60; or an error will be returned. As with customer sessions, you can use an empty string for &#x60;profileId&#x60; to indicate that this is an anonymous session. Updating a customer profile will return a response with the full integration state. This includes the current state of the customer profile, the customer session, the event that was recorded, and an array of effects that took place. @param body [NewEvent] @param [Hash] opts the optional parameters @option opts [Boolean] :dry Indicates whether to persist the changes. Changes are ignored when &#x60;dry&#x3D;true&#x60;. @return [Array<(IntegrationState, Integer, Hash)>] IntegrationState data, response status code and response headers

# File lib/talon_one/api/integration_api.rb, line 507
def track_event_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: IntegrationApi.track_event ...'
  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 IntegrationApi.track_event"
  end
  # resource path
  local_var_path = '/v1/events'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'dry'] = opts[:'dry'] if !opts[:'dry'].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] || 'IntegrationState' 

  # auth_names
  auth_names = opts[:auth_names] || ['api_key_v1', '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: IntegrationApi#track_event\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
update_customer_profile(integration_id, body, opts = {}) click to toggle source

Update a Customer Profile V1 ⚠️ Deprecation Notice: Support for requests to this endpoint will end on 15.07.2021. We will not remove the endpoint, and it will still be accessible for you to use. For new features support, migrate to [API V2.0](/Getting-Started/APIV2). Update (or create) a [Customer Profile](developers.talon.one/Getting-Started/entities#customer-profile). This profile information can then be matched and/or updated by campaign [Rules][]. The `integrationId` may be any identifier that will remain stable for the customer. For example, you might use a database ID, an email, or a phone number as the `integrationId`. It is vital that this ID not change over time, so **don't** use any identifier that the customer can update themselves. E.g. if your application allows a customer to update their e-mail address, you should instead use a database ID. Updating a customer profile will return a response with the full integration state. This includes the current state of the customer profile, the customer session, the event that was recorded, and an array of effects that took place. [Customer Profile]: /Getting-Started/entities#customer-profile [Rules]: /Getting-Started/entities#campaigns-rulesets-and-coupons @param integration_id [String] The custom identifier for this profile, must be unique within the account. @param body [NewCustomerProfile] @param [Hash] opts the optional parameters @option opts [Boolean] :dry Indicates whether to persist the changes. Changes are ignored when &#x60;dry&#x3D;true&#x60;. @return [IntegrationState]

# File lib/talon_one/api/integration_api.rb, line 564
def update_customer_profile(integration_id, body, opts = {})
  data, _status_code, _headers = update_customer_profile_with_http_info(integration_id, body, opts)
  data
end
update_customer_profile_audiences(body, opts = {}) click to toggle source

Update a Customer Profile Audiences Update one ore multiple Customer Profiles with the specified Audiences @param body [CustomerProfileAudienceRequest] @param [Hash] opts the optional parameters @return [nil]

# File lib/talon_one/api/integration_api.rb, line 635
def update_customer_profile_audiences(body, opts = {})
  update_customer_profile_audiences_with_http_info(body, opts)
  nil
end
update_customer_profile_audiences_with_http_info(body, opts = {}) click to toggle source

Update a Customer Profile Audiences Update one ore multiple Customer Profiles with the specified Audiences @param body [CustomerProfileAudienceRequest] @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers

# File lib/talon_one/api/integration_api.rb, line 645
def update_customer_profile_audiences_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: IntegrationApi.update_customer_profile_audiences ...'
  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 IntegrationApi.update_customer_profile_audiences"
  end
  # resource path
  local_var_path = '/v2/customer_audiences'

  # 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] || ['api_key_v1']

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

Update a Customer Profile Update (or create) a [Customer Profile](developers.talon.one/Getting-Started/entities#customer-profile). The `integrationId` must be any identifier that remains stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Updating a customer profile returns a response with the requested integration state. If `runRuleEngine` is set to `true`, the response includes: - The effects generated by the triggered campaigns. - The created coupons and referral objects. - Any entity that was requested in the `responseContent` request parameter. @param integration_id [String] The custom identifier for this profile. Must be unique within the account. @param body [CustomerProfileIntegrationRequestV2] @param [Hash] opts the optional parameters @option opts [Boolean] :run_rule_engine Indicates whether to run the rule engine. (default to false) @option opts [Boolean] :dry Indicates whether to persist the changes. Changes are ignored when &#x60;dry&#x3D;true&#x60;. Only used when &#x60;runRuleEngine&#x60; is set to &#x60;true&#x60;. @return [IntegrationStateV2]

# File lib/talon_one/api/integration_api.rb, line 700
def update_customer_profile_v2(integration_id, body, opts = {})
  data, _status_code, _headers = update_customer_profile_v2_with_http_info(integration_id, body, opts)
  data
end
update_customer_profile_v2_with_http_info(integration_id, body, opts = {}) click to toggle source

Update a Customer Profile Update (or create) a [Customer Profile](developers.talon.one/Getting-Started/entities#customer-profile). The &#x60;integrationId&#x60; must be any identifier that remains stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Updating a customer profile returns a response with the requested integration state. If &#x60;runRuleEngine&#x60; is set to &#x60;true&#x60;, the response includes: - The effects generated by the triggered campaigns. - The created coupons and referral objects. - Any entity that was requested in the &#x60;responseContent&#x60; request parameter. @param integration_id [String] The custom identifier for this profile. Must be unique within the account. @param body [CustomerProfileIntegrationRequestV2] @param [Hash] opts the optional parameters @option opts [Boolean] :run_rule_engine Indicates whether to run the rule engine. @option opts [Boolean] :dry Indicates whether to persist the changes. Changes are ignored when &#x60;dry&#x3D;true&#x60;. Only used when &#x60;runRuleEngine&#x60; is set to &#x60;true&#x60;. @return [Array<(IntegrationStateV2, Integer, Hash)>] IntegrationStateV2 data, response status code and response headers

# File lib/talon_one/api/integration_api.rb, line 713
def update_customer_profile_v2_with_http_info(integration_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: IntegrationApi.update_customer_profile_v2 ...'
  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 IntegrationApi.update_customer_profile_v2"
  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 IntegrationApi.update_customer_profile_v2"
  end
  # resource path
  local_var_path = '/v2/customer_profiles/{integrationId}'.sub('{' + 'integrationId' + '}', CGI.escape(integration_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'runRuleEngine'] = opts[:'run_rule_engine'] if !opts[:'run_rule_engine'].nil?
  query_params[:'dry'] = opts[:'dry'] if !opts[:'dry'].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] || 'IntegrationStateV2' 

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

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

Update a Customer Profile V1 ⚠️ Deprecation Notice: Support for requests to this endpoint will end on 15.07.2021. We will not remove the endpoint, and it will still be accessible for you to use. For new features support, migrate to [API V2.0](/Getting-Started/APIV2). Update (or create) a [Customer Profile](developers.talon.one/Getting-Started/entities#customer-profile). This profile information can then be matched and/or updated by campaign [Rules][]. The &#x60;integrationId&#x60; may be any identifier that will remain stable for the customer. For example, you might use a database ID, an email, or a phone number as the &#x60;integrationId&#x60;. It is vital that this ID not change over time, so **don&#39;t** use any identifier that the customer can update themselves. E.g. if your application allows a customer to update their e-mail address, you should instead use a database ID. Updating a customer profile will return a response with the full integration state. This includes the current state of the customer profile, the customer session, the event that was recorded, and an array of effects that took place. [Customer Profile]: /Getting-Started/entities#customer-profile [Rules]: /Getting-Started/entities#campaigns-rulesets-and-coupons @param integration_id [String] The custom identifier for this profile, must be unique within the account. @param body [NewCustomerProfile] @param [Hash] opts the optional parameters @option opts [Boolean] :dry Indicates whether to persist the changes. Changes are ignored when &#x60;dry&#x3D;true&#x60;. @return [Array<(IntegrationState, Integer, Hash)>] IntegrationState data, response status code and response headers

# File lib/talon_one/api/integration_api.rb, line 576
def update_customer_profile_with_http_info(integration_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: IntegrationApi.update_customer_profile ...'
  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 IntegrationApi.update_customer_profile"
  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 IntegrationApi.update_customer_profile"
  end
  # resource path
  local_var_path = '/v1/customer_profiles/{integrationId}'.sub('{' + 'integrationId' + '}', CGI.escape(integration_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'dry'] = opts[:'dry'] if !opts[:'dry'].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] || 'IntegrationState' 

  # auth_names
  auth_names = opts[:auth_names] || ['api_key_v1', '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(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: IntegrationApi#update_customer_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
update_customer_profiles_v2(body, opts = {}) click to toggle source

Update multiple Customer Profiles Update (or create) up to 1000 [Customer Profiles](developers.talon.one/Getting-Started/entities#customer-profile) in 1 request. The `integrationId` must be any identifier that remains stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. A customer profile [can be linked to one or more sessions](developers.talon.one/Integration-API/API-Reference#updateCustomerSessionV2). @param body [MultipleCustomerProfileIntegrationRequest] @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 [MultipleCustomerProfileIntegrationResponseV2]

# File lib/talon_one/api/integration_api.rb, line 774
def update_customer_profiles_v2(body, opts = {})
  data, _status_code, _headers = update_customer_profiles_v2_with_http_info(body, opts)
  data
end
update_customer_profiles_v2_with_http_info(body, opts = {}) click to toggle source

Update multiple Customer Profiles Update (or create) up to 1000 [Customer Profiles](developers.talon.one/Getting-Started/entities#customer-profile) in 1 request. The &#x60;integrationId&#x60; must be any identifier that remains stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. A customer profile [can be linked to one or more sessions](developers.talon.one/Integration-API/API-Reference#updateCustomerSessionV2). @param body [MultipleCustomerProfileIntegrationRequest] @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<(MultipleCustomerProfileIntegrationResponseV2, Integer, Hash)>] MultipleCustomerProfileIntegrationResponseV2 data, response status code and response headers

# File lib/talon_one/api/integration_api.rb, line 785
def update_customer_profiles_v2_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: IntegrationApi.update_customer_profiles_v2 ...'
  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 IntegrationApi.update_customer_profiles_v2"
  end
  # resource path
  local_var_path = '/v2/customer_profiles'

  # 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] || 'MultipleCustomerProfileIntegrationResponseV2' 

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

  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: IntegrationApi#update_customer_profiles_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
update_customer_session(customer_session_id, body, opts = {}) click to toggle source

Update a Customer Session V1 ⚠️ Deprecation Notice: Support for requests to this endpoint will end on 15.07.2021. We will not remove the endpoint, and it will still be accessible for you to use. For new features support, migrate to [API V2.0](developers.talon.one/Getting-Started/APIV2). Update (or create) a [Customer Session](developers.talon.one/Getting-Started/entities#customer-session). For example, use this endpoint to represent which items are in the customer's cart. The Talon.One platform supports multiple simultaneous sessions for the same profile. If you have multiple ways of accessing the same application you can either: - Track multiple independent sessions or, - Use the same session across all of them. You should share sessions when application access points share other state, such as the user's cart. If two points of access to the application have independent states, for example a user can have different items in their cart across the two) they should use independent customer session ID's. To link a session to a customer profile, set the `profileId` parameter in the request body to a customer profile's `integrationId`. To track an anonymous session use the empty string (`""`) as the `profileId`. Note: You do not have to create a customer profile first. If the specified profile does not exist, an empty profile is created automatically. Updating a customer profile returns a response with the full integration state. This includes the current state of the customer profile, the customer session, the event that was recorded, and an array of effects that took place. The currency for the session and the cart items in the session is the same as that of the application with which the session is associated. @param customer_session_id [String] The custom identifier for this session, must be unique within the account. @param body [NewCustomerSession] @param [Hash] opts the optional parameters @option opts [Boolean] :dry Indicates whether to persist the changes. Changes are ignored when &#x60;dry&#x3D;true&#x60;. @return [IntegrationState]

# File lib/talon_one/api/integration_api.rb, line 842
def update_customer_session(customer_session_id, body, opts = {})
  data, _status_code, _headers = update_customer_session_with_http_info(customer_session_id, body, opts)
  data
end
update_customer_session_v2(customer_session_id, body, opts = {}) click to toggle source

Update a Customer Session Update (or create) a [Customer Session](developers.talon.one/Getting-Started/entities#customer-session). For example, use this endpoint to represent which items are in the customer's cart. The Talon.One platform supports multiple simultaneous sessions for the same profile. If you have multiple ways of accessing the same application you can either: - Track multiple independent sessions or, - Use the same session across all of them. You should share sessions when application access points share other state, such as the user's cart. If two points of access to the application have independent states, for example a user can have different items in their cart across the two) they should use independent customer session ID's. To link a session to a customer profile, set the `profileId` parameter in the request body to a customer profile's `integrationId`. To track an anonymous session use the empty string (`""`) as the `profileId`. Note: You do not have to create a customer profile first. If the specified profile does not exist, an empty profile is created automatically. Updating a customer session returns a response with the requested integration state. If `runRuleEngine` is set to `true`, the response includes: - The effects generated by the triggered campaigns. - The created coupons and referral objects. - Any entity that was requested in the `responseContent` request parameter. The currency for the session and the cart items in the session is the same as that of the application with which the session is associated. @param customer_session_id [String] The custom identifier for this session, must be unique within the account. @param body [IntegrationRequest] @param [Hash] opts the optional parameters @option opts [Boolean] :dry Indicates whether to persist the changes. Changes are ignored when &#x60;dry&#x3D;true&#x60;. @return [IntegrationStateV2]

# File lib/talon_one/api/integration_api.rb, line 915
def update_customer_session_v2(customer_session_id, body, opts = {})
  data, _status_code, _headers = update_customer_session_v2_with_http_info(customer_session_id, body, opts)
  data
end
update_customer_session_v2_with_http_info(customer_session_id, body, opts = {}) click to toggle source

Update a Customer Session Update (or create) a [Customer Session](developers.talon.one/Getting-Started/entities#customer-session). For example, use this endpoint to represent which items are in the customer&#39;s cart. The Talon.One platform supports multiple simultaneous sessions for the same profile. If you have multiple ways of accessing the same application you can either: - Track multiple independent sessions or, - Use the same session across all of them. You should share sessions when application access points share other state, such as the user&#39;s cart. If two points of access to the application have independent states, for example a user can have different items in their cart across the two) they should use independent customer session ID&#39;s. To link a session to a customer profile, set the &#x60;profileId&#x60; parameter in the request body to a customer profile&#39;s &#x60;integrationId&#x60;. To track an anonymous session use the empty string (&#x60;&quot;&quot;&#x60;) as the &#x60;profileId&#x60;. Note: You do not have to create a customer profile first. If the specified profile does not exist, an empty profile is created automatically. Updating a customer session returns a response with the requested integration state. If &#x60;runRuleEngine&#x60; is set to &#x60;true&#x60;, the response includes: - The effects generated by the triggered campaigns. - The created coupons and referral objects. - Any entity that was requested in the &#x60;responseContent&#x60; request parameter. The currency for the session and the cart items in the session is the same as that of the application with which the session is associated. @param customer_session_id [String] The custom identifier for this session, must be unique within the account. @param body [IntegrationRequest] @param [Hash] opts the optional parameters @option opts [Boolean] :dry Indicates whether to persist the changes. Changes are ignored when &#x60;dry&#x3D;true&#x60;. @return [Array<(IntegrationStateV2, Integer, Hash)>] IntegrationStateV2 data, response status code and response headers

# File lib/talon_one/api/integration_api.rb, line 927
def update_customer_session_v2_with_http_info(customer_session_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: IntegrationApi.update_customer_session_v2 ...'
  end
  # verify the required parameter 'customer_session_id' is set
  if @api_client.config.client_side_validation && customer_session_id.nil?
    fail ArgumentError, "Missing the required parameter 'customer_session_id' when calling IntegrationApi.update_customer_session_v2"
  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 IntegrationApi.update_customer_session_v2"
  end
  # resource path
  local_var_path = '/v2/customer_sessions/{customerSessionId}'.sub('{' + 'customerSessionId' + '}', CGI.escape(customer_session_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'dry'] = opts[:'dry'] if !opts[:'dry'].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] || 'IntegrationStateV2' 

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

  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: IntegrationApi#update_customer_session_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
update_customer_session_with_http_info(customer_session_id, body, opts = {}) click to toggle source

Update a Customer Session V1 ⚠️ Deprecation Notice: Support for requests to this endpoint will end on 15.07.2021. We will not remove the endpoint, and it will still be accessible for you to use. For new features support, migrate to [API V2.0](developers.talon.one/Getting-Started/APIV2). Update (or create) a [Customer Session](developers.talon.one/Getting-Started/entities#customer-session). For example, use this endpoint to represent which items are in the customer&#39;s cart. The Talon.One platform supports multiple simultaneous sessions for the same profile. If you have multiple ways of accessing the same application you can either: - Track multiple independent sessions or, - Use the same session across all of them. You should share sessions when application access points share other state, such as the user&#39;s cart. If two points of access to the application have independent states, for example a user can have different items in their cart across the two) they should use independent customer session ID&#39;s. To link a session to a customer profile, set the &#x60;profileId&#x60; parameter in the request body to a customer profile&#39;s &#x60;integrationId&#x60;. To track an anonymous session use the empty string (&#x60;&quot;&quot;&#x60;) as the &#x60;profileId&#x60;. Note: You do not have to create a customer profile first. If the specified profile does not exist, an empty profile is created automatically. Updating a customer profile returns a response with the full integration state. This includes the current state of the customer profile, the customer session, the event that was recorded, and an array of effects that took place. The currency for the session and the cart items in the session is the same as that of the application with which the session is associated. @param customer_session_id [String] The custom identifier for this session, must be unique within the account. @param body [NewCustomerSession] @param [Hash] opts the optional parameters @option opts [Boolean] :dry Indicates whether to persist the changes. Changes are ignored when &#x60;dry&#x3D;true&#x60;. @return [Array<(IntegrationState, Integer, Hash)>] IntegrationState data, response status code and response headers

# File lib/talon_one/api/integration_api.rb, line 854
def update_customer_session_with_http_info(customer_session_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: IntegrationApi.update_customer_session ...'
  end
  # verify the required parameter 'customer_session_id' is set
  if @api_client.config.client_side_validation && customer_session_id.nil?
    fail ArgumentError, "Missing the required parameter 'customer_session_id' when calling IntegrationApi.update_customer_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 IntegrationApi.update_customer_session"
  end
  # resource path
  local_var_path = '/v1/customer_sessions/{customerSessionId}'.sub('{' + 'customerSessionId' + '}', CGI.escape(customer_session_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'dry'] = opts[:'dry'] if !opts[:'dry'].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] || 'IntegrationState' 

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