Class: TalonOne::ManagementApi

Inherits:
Object
  • Object
show all
Defined in:
lib/talon_one_sdk/api/management_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ ManagementApi

Returns a new instance of ManagementApi.



19
20
21
# File 'lib/talon_one_sdk/api/management_api.rb', line 19

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/talon_one_sdk/api/management_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#activate_user_by_email(activate_user_request, opts = {}) ⇒ nil

Enable user by email address Enable a [disabled user](docs.talon.one/docs/product/account/account-settings/managing-users#disabling-a-user) by their email address.

Parameters:

  • activate_user_request (ActivateUserRequest)

    body

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

    the optional parameters

Returns:

  • (nil)


27
28
29
30
# File 'lib/talon_one_sdk/api/management_api.rb', line 27

def activate_user_by_email(activate_user_request, opts = {})
  activate_user_by_email_with_http_info(activate_user_request, opts)
  nil
end

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

Enable user by email address Enable a [disabled user](docs.talon.one/docs/product/account/account-settings/managing-users#disabling-a-user) by their email address.

Parameters:

  • activate_user_request (ActivateUserRequest)

    body

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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

def activate_user_by_email_with_http_info(activate_user_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.activate_user_by_email ...'
  end
  # verify the required parameter 'activate_user_request' is set
  if @api_client.config.client_side_validation && activate_user_request.nil?
    fail ArgumentError, "Missing the required parameter 'activate_user_request' when calling ManagementApi.activate_user_by_email"
  end
  # resource path
  local_var_path = '/v1/users/activate'

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

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

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

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

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"ManagementApi.activate_user_by_email",
    :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#activate_user_by_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#add_loyalty_card_points(loyalty_program_id, loyalty_card_id, add_loyalty_points, opts = {}) ⇒ nil

Add points to card Add points to the given loyalty card in the specified card-based loyalty program.

Parameters:

Returns:

  • (nil)


95
96
97
98
# File 'lib/talon_one_sdk/api/management_api.rb', line 95

def add_loyalty_card_points(loyalty_program_id, loyalty_card_id, add_loyalty_points, opts = {})
  add_loyalty_card_points_with_http_info(loyalty_program_id, loyalty_card_id, add_loyalty_points, opts)
  nil
end

#add_loyalty_card_points_with_http_info(loyalty_program_id, loyalty_card_id, add_loyalty_points, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Add points to card Add points to the given loyalty card in the specified card-based loyalty program.

Parameters:

Returns:

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

    nil, response status code and response headers



107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
# File 'lib/talon_one_sdk/api/management_api.rb', line 107

def add_loyalty_card_points_with_http_info(loyalty_program_id, loyalty_card_id, add_loyalty_points, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.add_loyalty_card_points ...'
  end
  # verify the required parameter 'loyalty_program_id' is set
  if @api_client.config.client_side_validation && loyalty_program_id.nil?
    fail ArgumentError, "Missing the required parameter 'loyalty_program_id' when calling ManagementApi.add_loyalty_card_points"
  end
  # verify the required parameter 'loyalty_card_id' is set
  if @api_client.config.client_side_validation && loyalty_card_id.nil?
    fail ArgumentError, "Missing the required parameter 'loyalty_card_id' when calling ManagementApi.add_loyalty_card_points"
  end
  if @api_client.config.client_side_validation && loyalty_card_id.to_s.length > 108
    fail ArgumentError, 'invalid value for "loyalty_card_id" when calling ManagementApi.add_loyalty_card_points, the character length must be smaller than or equal to 108.'
  end

  if @api_client.config.client_side_validation && loyalty_card_id.to_s.length < 4
    fail ArgumentError, 'invalid value for "loyalty_card_id" when calling ManagementApi.add_loyalty_card_points, the character length must be greater than or equal to 4.'
  end

  # verify the required parameter 'add_loyalty_points' is set
  if @api_client.config.client_side_validation && add_loyalty_points.nil?
    fail ArgumentError, "Missing the required parameter 'add_loyalty_points' when calling ManagementApi.add_loyalty_card_points"
  end
  # resource path
  local_var_path = '/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/add_points'.sub('{loyaltyProgramId}', CGI.escape(loyalty_program_id.to_s)).sub('{loyaltyCardId}', CGI.escape(loyalty_card_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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"ManagementApi.add_loyalty_card_points",
    :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_card_points\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#add_loyalty_points(loyalty_program_id, integration_id, add_loyalty_points, opts = {}) ⇒ nil

Add points to customer profile Add points in the specified loyalty program for the given customer. To get the ‘integrationId` of the profile from a `sessionId`, use the [Update customer session](docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) endpoint.

Parameters:

  • loyalty_program_id (String)

    The identifier for the loyalty program.

  • integration_id (String)

    The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier.

  • add_loyalty_points (AddLoyaltyPoints)

    body

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

    the optional parameters

Returns:

  • (nil)


183
184
185
186
# File 'lib/talon_one_sdk/api/management_api.rb', line 183

def add_loyalty_points(loyalty_program_id, integration_id, add_loyalty_points, opts = {})
  add_loyalty_points_with_http_info(loyalty_program_id, integration_id, add_loyalty_points, opts)
  nil
end

#add_loyalty_points_with_http_info(loyalty_program_id, integration_id, add_loyalty_points, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Add points to customer profile Add points in the specified loyalty program for the given customer. To get the &#x60;integrationId&#x60; of the profile from a &#x60;sessionId&#x60;, use the [Update customer session](docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) endpoint.

Parameters:

  • loyalty_program_id (String)

    The identifier for the loyalty program.

  • integration_id (String)

    The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier.

  • add_loyalty_points (AddLoyaltyPoints)

    body

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
# File 'lib/talon_one_sdk/api/management_api.rb', line 195

def add_loyalty_points_with_http_info(loyalty_program_id, integration_id, add_loyalty_points, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.add_loyalty_points ...'
  end
  # verify the required parameter 'loyalty_program_id' is set
  if @api_client.config.client_side_validation && loyalty_program_id.nil?
    fail ArgumentError, "Missing the required parameter 'loyalty_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 'add_loyalty_points' is set
  if @api_client.config.client_side_validation && add_loyalty_points.nil?
    fail ArgumentError, "Missing the required parameter 'add_loyalty_points' when calling ManagementApi.add_loyalty_points"
  end
  # resource path
  local_var_path = '/v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/add_points'.sub('{loyaltyProgramId}', CGI.escape(loyalty_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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"ManagementApi.add_loyalty_points",
    :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, campaign_copy, opts = {}) ⇒ GetCampaigns200Response

Copy the campaign into the specified Application Copy the campaign into all specified Applications.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • campaign_copy (CampaignCopy)

    body

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

    the optional parameters

Returns:



263
264
265
266
# File 'lib/talon_one_sdk/api/management_api.rb', line 263

def copy_campaign_to_applications(application_id, campaign_id, campaign_copy, opts = {})
  data, _status_code, _headers = copy_campaign_to_applications_with_http_info(application_id, campaign_id, campaign_copy, opts)
  data
end

#copy_campaign_to_applications_with_http_info(application_id, campaign_id, campaign_copy, opts = {}) ⇒ Array<(GetCampaigns200Response, Integer, Hash)>

Copy the campaign into the specified Application Copy the campaign into all specified Applications.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • campaign_copy (CampaignCopy)

    body

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

    the optional parameters

Returns:

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

    GetCampaigns200Response data, response status code and response headers



275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
# File 'lib/talon_one_sdk/api/management_api.rb', line 275

def copy_campaign_to_applications_with_http_info(application_id, campaign_id, campaign_copy, 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 'campaign_copy' is set
  if @api_client.config.client_side_validation && campaign_copy.nil?
    fail ArgumentError, "Missing the required parameter 'campaign_copy' 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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.copy_campaign_to_applications",
    :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_account_collection(new_collection, opts = {}) ⇒ Collection

Create account-level collection Create an account-level collection.

Parameters:

  • new_collection (NewCollection)

    body

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

    the optional parameters

Returns:



341
342
343
344
# File 'lib/talon_one_sdk/api/management_api.rb', line 341

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

#create_account_collection_with_http_info(new_collection, opts = {}) ⇒ Array<(Collection, Integer, Hash)>

Create account-level collection Create an account-level collection.

Parameters:

  • new_collection (NewCollection)

    body

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

    the optional parameters

Returns:

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

    Collection data, response status code and response headers



351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
# File 'lib/talon_one_sdk/api/management_api.rb', line 351

def (new_collection, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.create_account_collection ...'
  end
  # verify the required parameter 'new_collection' is set
  if @api_client.config.client_side_validation && new_collection.nil?
    fail ArgumentError, "Missing the required parameter 'new_collection' when calling ManagementApi.create_account_collection"
  end
  # resource path
  local_var_path = '/v1/collections'

  # 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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.create_account_collection",
    :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_account_collection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_achievement(application_id, campaign_id, create_achievement, opts = {}) ⇒ Achievement

Create achievement Create a new achievement in a specific campaign.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • create_achievement (CreateAchievement)

    body

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

    the optional parameters

Returns:



411
412
413
414
# File 'lib/talon_one_sdk/api/management_api.rb', line 411

def create_achievement(application_id, campaign_id, create_achievement, opts = {})
  data, _status_code, _headers = create_achievement_with_http_info(application_id, campaign_id, create_achievement, opts)
  data
end

#create_achievement_with_http_info(application_id, campaign_id, create_achievement, opts = {}) ⇒ Array<(Achievement, Integer, Hash)>

Create achievement Create a new achievement in a specific campaign.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • create_achievement (CreateAchievement)

    body

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

    the optional parameters

Returns:

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

    Achievement data, response status code and response headers



423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
# File 'lib/talon_one_sdk/api/management_api.rb', line 423

def create_achievement_with_http_info(application_id, campaign_id, create_achievement, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.create_achievement ...'
  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_achievement"
  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_achievement"
  end
  # verify the required parameter 'create_achievement' is set
  if @api_client.config.client_side_validation && create_achievement.nil?
    fail ArgumentError, "Missing the required parameter 'create_achievement' when calling ManagementApi.create_achievement"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/achievements'.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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.create_achievement",
    :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_achievement\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_additional_cost(new_additional_cost, opts = {}) ⇒ AccountAdditionalCost

Create additional cost Create an [additional cost](docs.talon.one/docs/product/account/dev-tools/managing-additional-costs). These additional costs are shared across all applications in your account, and are never required.

Parameters:

  • new_additional_cost (NewAdditionalCost)

    body

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

    the optional parameters

Returns:



489
490
491
492
# File 'lib/talon_one_sdk/api/management_api.rb', line 489

def create_additional_cost(new_additional_cost, opts = {})
  data, _status_code, _headers = create_additional_cost_with_http_info(new_additional_cost, opts)
  data
end

#create_additional_cost_with_http_info(new_additional_cost, opts = {}) ⇒ Array<(AccountAdditionalCost, Integer, Hash)>

Create additional cost Create an [additional cost](docs.talon.one/docs/product/account/dev-tools/managing-additional-costs). These additional costs are shared across all applications in your account, and are never required.

Parameters:

  • new_additional_cost (NewAdditionalCost)

    body

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

    the optional parameters

Returns:

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

    AccountAdditionalCost data, response status code and response headers



499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
# File 'lib/talon_one_sdk/api/management_api.rb', line 499

def create_additional_cost_with_http_info(new_additional_cost, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.create_additional_cost ...'
  end
  # verify the required parameter 'new_additional_cost' is set
  if @api_client.config.client_side_validation && new_additional_cost.nil?
    fail ArgumentError, "Missing the required parameter 'new_additional_cost' 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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.create_additional_cost",
    :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(new_attribute, opts = {}) ⇒ Attribute

Create custom attribute Create a _custom attribute_ in this account. [Custom attributes](docs.talon.one/docs/dev/concepts/attributes) allow you to add data to Talon.One domain entities like campaigns, coupons, customers and so on. These attributes can then be given values when creating/updating these entities, 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.

Parameters:

  • new_attribute (NewAttribute)

    body

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

    the optional parameters

Returns:



557
558
559
560
# File 'lib/talon_one_sdk/api/management_api.rb', line 557

def create_attribute(new_attribute, opts = {})
  data, _status_code, _headers = create_attribute_with_http_info(new_attribute, opts)
  data
end

#create_attribute_with_http_info(new_attribute, opts = {}) ⇒ Array<(Attribute, Integer, Hash)>

Create custom attribute Create a _custom attribute_ in this account. [Custom attributes](docs.talon.one/docs/dev/concepts/attributes) allow you to add data to Talon.One domain entities like campaigns, coupons, customers and so on. These attributes can then be given values when creating/updating these entities, 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.

Parameters:

  • new_attribute (NewAttribute)

    body

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

    the optional parameters

Returns:

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

    Attribute data, response status code and response headers



567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
# File 'lib/talon_one_sdk/api/management_api.rb', line 567

def create_attribute_with_http_info(new_attribute, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.create_attribute ...'
  end
  # verify the required parameter 'new_attribute' is set
  if @api_client.config.client_side_validation && new_attribute.nil?
    fail ArgumentError, "Missing the required parameter 'new_attribute' 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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.create_attribute",
    :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_batch_loyalty_cards(loyalty_program_id, loyalty_card_batch, opts = {}) ⇒ LoyaltyCardBatchResponse

Create loyalty cards Create a batch of loyalty cards in a specified [card-based loyalty program](docs.talon.one/docs/product/loyalty-programs/overview#loyalty-program-types). Customers can use loyalty cards to collect and spend loyalty points. > [!important] Note > - The specified card-based loyalty program must have a defined card code > format that is used to generate the loyalty card codes. > - Trying to create more than 20,000 loyalty cards in a single request > returns an error message with a ‘400` status code.

Parameters:

Returns:



626
627
628
629
# File 'lib/talon_one_sdk/api/management_api.rb', line 626

def create_batch_loyalty_cards(loyalty_program_id, loyalty_card_batch, opts = {})
  data, _status_code, _headers = create_batch_loyalty_cards_with_http_info(loyalty_program_id, loyalty_card_batch, opts)
  data
end

#create_batch_loyalty_cards_with_http_info(loyalty_program_id, loyalty_card_batch, opts = {}) ⇒ Array<(LoyaltyCardBatchResponse, Integer, Hash)>

Create loyalty cards Create a batch of loyalty cards in a specified [card-based loyalty program](docs.talon.one/docs/product/loyalty-programs/overview#loyalty-program-types). Customers can use loyalty cards to collect and spend loyalty points. &gt; [!important] Note &gt; - The specified card-based loyalty program must have a defined card code &gt; format that is used to generate the loyalty card codes. &gt; - Trying to create more than 20,000 loyalty cards in a single request &gt; returns an error message with a &#x60;400&#x60; status code.

Parameters:

Returns:

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

    LoyaltyCardBatchResponse data, response status code and response headers



637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
# File 'lib/talon_one_sdk/api/management_api.rb', line 637

def create_batch_loyalty_cards_with_http_info(loyalty_program_id, loyalty_card_batch, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.create_batch_loyalty_cards ...'
  end
  # verify the required parameter 'loyalty_program_id' is set
  if @api_client.config.client_side_validation && loyalty_program_id.nil?
    fail ArgumentError, "Missing the required parameter 'loyalty_program_id' when calling ManagementApi.create_batch_loyalty_cards"
  end
  # verify the required parameter 'loyalty_card_batch' is set
  if @api_client.config.client_side_validation && loyalty_card_batch.nil?
    fail ArgumentError, "Missing the required parameter 'loyalty_card_batch' when calling ManagementApi.create_batch_loyalty_cards"
  end
  # resource path
  local_var_path = '/v1/loyalty_programs/{loyaltyProgramId}/cards/batch'.sub('{loyaltyProgramId}', CGI.escape(loyalty_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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.create_batch_loyalty_cards",
    :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_batch_loyalty_cards\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_campaign_from_template(application_id, create_template_campaign, opts = {}) ⇒ CreateTemplateCampaignResponse

Create campaign from campaign template Use the campaign template referenced in the request body to create a new campaign in one of the connected Applications. If the template was created from a campaign with rules referencing [campaign collections](docs.talon.one/docs/product/campaigns/managing-collections), the corresponding collections for the new campaign are created automatically.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • create_template_campaign (CreateTemplateCampaign)

    body

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

    the optional parameters

Returns:



700
701
702
703
# File 'lib/talon_one_sdk/api/management_api.rb', line 700

def create_campaign_from_template(application_id, create_template_campaign, opts = {})
  data, _status_code, _headers = create_campaign_from_template_with_http_info(application_id, create_template_campaign, opts)
  data
end

#create_campaign_from_template_with_http_info(application_id, create_template_campaign, opts = {}) ⇒ Array<(CreateTemplateCampaignResponse, Integer, Hash)>

Create campaign from campaign template Use the campaign template referenced in the request body to create a new campaign in one of the connected Applications. If the template was created from a campaign with rules referencing [campaign collections](docs.talon.one/docs/product/campaigns/managing-collections), the corresponding collections for the new campaign are created automatically.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • create_template_campaign (CreateTemplateCampaign)

    body

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

    the optional parameters

Returns:



711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
# File 'lib/talon_one_sdk/api/management_api.rb', line 711

def create_campaign_from_template_with_http_info(application_id, create_template_campaign, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.create_campaign_from_template ...'
  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_from_template"
  end
  # verify the required parameter 'create_template_campaign' is set
  if @api_client.config.client_side_validation && create_template_campaign.nil?
    fail ArgumentError, "Missing the required parameter 'create_template_campaign' when calling ManagementApi.create_campaign_from_template"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/create_campaign_from_template'.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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.create_campaign_from_template",
    :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_from_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_campaign_store_budget(application_id, campaign_id, new_campaign_store_budget, opts = {}) ⇒ nil

Create campaign store budget Create a new store budget for a given campaign.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • new_campaign_store_budget (NewCampaignStoreBudget)

    body

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

    the optional parameters

Returns:

  • (nil)


775
776
777
778
# File 'lib/talon_one_sdk/api/management_api.rb', line 775

def create_campaign_store_budget(application_id, campaign_id, new_campaign_store_budget, opts = {})
  create_campaign_store_budget_with_http_info(application_id, campaign_id, new_campaign_store_budget, opts)
  nil
end

#create_campaign_store_budget_with_http_info(application_id, campaign_id, new_campaign_store_budget, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Create campaign store budget Create a new store budget for a given campaign.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • new_campaign_store_budget (NewCampaignStoreBudget)

    body

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
# File 'lib/talon_one_sdk/api/management_api.rb', line 787

def create_campaign_store_budget_with_http_info(application_id, campaign_id, new_campaign_store_budget, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.create_campaign_store_budget ...'
  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_store_budget"
  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_campaign_store_budget"
  end
  # verify the required parameter 'new_campaign_store_budget' is set
  if @api_client.config.client_side_validation && new_campaign_store_budget.nil?
    fail ArgumentError, "Missing the required parameter 'new_campaign_store_budget' when calling ManagementApi.create_campaign_store_budget"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/stores/budgets'.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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"ManagementApi.create_campaign_store_budget",
    :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_store_budget\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_collection(application_id, campaign_id, new_campaign_collection, opts = {}) ⇒ Collection

Create campaign-level collection Create a campaign-level collection in a given campaign.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • new_campaign_collection (NewCampaignCollection)

    body

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

    the optional parameters

Returns:



855
856
857
858
# File 'lib/talon_one_sdk/api/management_api.rb', line 855

def create_collection(application_id, campaign_id, new_campaign_collection, opts = {})
  data, _status_code, _headers = create_collection_with_http_info(application_id, campaign_id, new_campaign_collection, opts)
  data
end

#create_collection_with_http_info(application_id, campaign_id, new_campaign_collection, opts = {}) ⇒ Array<(Collection, Integer, Hash)>

Create campaign-level collection Create a campaign-level collection in a given campaign.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • new_campaign_collection (NewCampaignCollection)

    body

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

    the optional parameters

Returns:

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

    Collection data, response status code and response headers



867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
# File 'lib/talon_one_sdk/api/management_api.rb', line 867

def create_collection_with_http_info(application_id, campaign_id, new_campaign_collection, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.create_collection ...'
  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_collection"
  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_collection"
  end
  # verify the required parameter 'new_campaign_collection' is set
  if @api_client.config.client_side_validation && new_campaign_collection.nil?
    fail ArgumentError, "Missing the required parameter 'new_campaign_collection' when calling ManagementApi.create_collection"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/collections'.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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.create_collection",
    :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_collection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_coupons(application_id, campaign_id, new_coupons, opts = {}) ⇒ CreateCoupons200Response

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.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • new_coupons (NewCoupons)

    body

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

    the optional parameters

Options Hash (opts):

  • :silent (String)

    Possible values: &#x60;yes&#x60; or &#x60;no&#x60;. - &#x60;yes&#x60;: Increases the performance of the API call by returning a 204 response. - &#x60;no&#x60;: Returns a 200 response that contains the updated customer profiles. (default to ‘yes’)

Returns:



936
937
938
939
# File 'lib/talon_one_sdk/api/management_api.rb', line 936

def create_coupons(application_id, campaign_id, new_coupons, opts = {})
  data, _status_code, _headers = create_coupons_with_http_info(application_id, campaign_id, new_coupons, opts)
  data
end

#create_coupons_asynchronously(application_id, campaign_id, new_coupon_creation_job, opts = {}) ⇒ AsyncCouponCreationResponse

Create coupons asynchronously Create up to 5,000,000 coupons asynchronously. You should typically use this enpdoint when you create at least 20,001 coupons. You receive an email when the creation is complete. If you want to create less than 20,001 coupons, you can use the [Create coupons](docs.talon.one/management-api#tag/Coupons/operation/createCoupons) endpoint.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • new_coupon_creation_job (NewCouponCreationJob)

    body

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

    the optional parameters

Returns:



1018
1019
1020
1021
# File 'lib/talon_one_sdk/api/management_api.rb', line 1018

def create_coupons_asynchronously(application_id, campaign_id, new_coupon_creation_job, opts = {})
  data, _status_code, _headers = create_coupons_asynchronously_with_http_info(application_id, campaign_id, new_coupon_creation_job, opts)
  data
end

#create_coupons_asynchronously_with_http_info(application_id, campaign_id, new_coupon_creation_job, opts = {}) ⇒ Array<(AsyncCouponCreationResponse, Integer, Hash)>

Create coupons asynchronously Create up to 5,000,000 coupons asynchronously. You should typically use this enpdoint when you create at least 20,001 coupons. You receive an email when the creation is complete. If you want to create less than 20,001 coupons, you can use the [Create coupons](docs.talon.one/management-api#tag/Coupons/operation/createCoupons) endpoint.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • new_coupon_creation_job (NewCouponCreationJob)

    body

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

    the optional parameters

Returns:

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

    AsyncCouponCreationResponse data, response status code and response headers



1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
# File 'lib/talon_one_sdk/api/management_api.rb', line 1030

def create_coupons_asynchronously_with_http_info(application_id, campaign_id, new_coupon_creation_job, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.create_coupons_asynchronously ...'
  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_asynchronously"
  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_asynchronously"
  end
  # verify the required parameter 'new_coupon_creation_job' is set
  if @api_client.config.client_side_validation && new_coupon_creation_job.nil?
    fail ArgumentError, "Missing the required parameter 'new_coupon_creation_job' when calling ManagementApi.create_coupons_asynchronously"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/coupons_async'.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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.create_coupons_asynchronously",
    :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_asynchronously\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_coupons_deletion_job(application_id, campaign_id, new_coupon_deletion_job, opts = {}) ⇒ AsyncCouponDeletionJobResponse

Creates a coupon deletion job This endpoint handles creating a job to delete coupons asynchronously.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • new_coupon_deletion_job (NewCouponDeletionJob)

    body

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

    the optional parameters

Returns:



1098
1099
1100
1101
# File 'lib/talon_one_sdk/api/management_api.rb', line 1098

def create_coupons_deletion_job(application_id, campaign_id, new_coupon_deletion_job, opts = {})
  data, _status_code, _headers = create_coupons_deletion_job_with_http_info(application_id, campaign_id, new_coupon_deletion_job, opts)
  data
end

#create_coupons_deletion_job_with_http_info(application_id, campaign_id, new_coupon_deletion_job, opts = {}) ⇒ Array<(AsyncCouponDeletionJobResponse, Integer, Hash)>

Creates a coupon deletion job This endpoint handles creating a job to delete coupons asynchronously.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • new_coupon_deletion_job (NewCouponDeletionJob)

    body

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

    the optional parameters

Returns:



1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
# File 'lib/talon_one_sdk/api/management_api.rb', line 1110

def create_coupons_deletion_job_with_http_info(application_id, campaign_id, new_coupon_deletion_job, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.create_coupons_deletion_job ...'
  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_deletion_job"
  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_deletion_job"
  end
  # verify the required parameter 'new_coupon_deletion_job' is set
  if @api_client.config.client_side_validation && new_coupon_deletion_job.nil?
    fail ArgumentError, "Missing the required parameter 'new_coupon_deletion_job' when calling ManagementApi.create_coupons_deletion_job"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/coupons_deletion_jobs'.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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.create_coupons_deletion_job",
    :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_deletion_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_coupons_for_multiple_recipients(application_id, campaign_id, new_coupons_for_multiple_recipients, opts = {}) ⇒ CreateCoupons200Response

Create coupons for multiple recipients Create coupons according to some pattern for up to 1000 recipients.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • new_coupons_for_multiple_recipients (NewCouponsForMultipleRecipients)

    body

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

    the optional parameters

Options Hash (opts):

  • :silent (String)

    Possible values: &#x60;yes&#x60; or &#x60;no&#x60;. - &#x60;yes&#x60;: Increases the performance of the API call by returning a 204 response. - &#x60;no&#x60;: Returns a 200 response that contains the updated customer profiles. (default to ‘yes’)

Returns:



1179
1180
1181
1182
# File 'lib/talon_one_sdk/api/management_api.rb', line 1179

def create_coupons_for_multiple_recipients(application_id, campaign_id, new_coupons_for_multiple_recipients, opts = {})
  data, _status_code, _headers = create_coupons_for_multiple_recipients_with_http_info(application_id, campaign_id, new_coupons_for_multiple_recipients, opts)
  data
end

#create_coupons_for_multiple_recipients_with_http_info(application_id, campaign_id, new_coupons_for_multiple_recipients, opts = {}) ⇒ Array<(CreateCoupons200Response, Integer, Hash)>

Create coupons for multiple recipients Create coupons according to some pattern for up to 1000 recipients.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • new_coupons_for_multiple_recipients (NewCouponsForMultipleRecipients)

    body

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

    the optional parameters

Options Hash (opts):

  • :silent (String)

    Possible values: &#x60;yes&#x60; or &#x60;no&#x60;. - &#x60;yes&#x60;: Increases the performance of the API call by returning a 204 response. - &#x60;no&#x60;: Returns a 200 response that contains the updated customer profiles. (default to ‘yes’)

Returns:

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

    CreateCoupons200Response data, response status code and response headers



1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
# File 'lib/talon_one_sdk/api/management_api.rb', line 1192

def create_coupons_for_multiple_recipients_with_http_info(application_id, campaign_id, new_coupons_for_multiple_recipients, 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 'new_coupons_for_multiple_recipients' is set
  if @api_client.config.client_side_validation && new_coupons_for_multiple_recipients.nil?
    fail ArgumentError, "Missing the required parameter 'new_coupons_for_multiple_recipients' 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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.create_coupons_for_multiple_recipients",
    :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, new_coupons, opts = {}) ⇒ Array<(CreateCoupons200Response, Integer, Hash)>

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.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • new_coupons (NewCoupons)

    body

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

    the optional parameters

Options Hash (opts):

  • :silent (String)

    Possible values: &#x60;yes&#x60; or &#x60;no&#x60;. - &#x60;yes&#x60;: Increases the performance of the API call by returning a 204 response. - &#x60;no&#x60;: Returns a 200 response that contains the updated customer profiles. (default to ‘yes’)

Returns:

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

    CreateCoupons200Response data, response status code and response headers



949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
# File 'lib/talon_one_sdk/api/management_api.rb', line 949

def create_coupons_with_http_info(application_id, campaign_id, new_coupons, 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 'new_coupons' is set
  if @api_client.config.client_side_validation && new_coupons.nil?
    fail ArgumentError, "Missing the required parameter 'new_coupons' 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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.create_coupons",
    :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_invite_email(new_invite_email, opts = {}) ⇒ NewInviteEmail

Resend invitation email Resend an email invitation to an existing user. > [!note] The invitation token is valid for 24 hours after the email has been sent.

Parameters:

  • new_invite_email (NewInviteEmail)

    body

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

    the optional parameters

Returns:



1259
1260
1261
1262
# File 'lib/talon_one_sdk/api/management_api.rb', line 1259

def create_invite_email(new_invite_email, opts = {})
  data, _status_code, _headers = create_invite_email_with_http_info(new_invite_email, opts)
  data
end

#create_invite_email_with_http_info(new_invite_email, opts = {}) ⇒ Array<(NewInviteEmail, Integer, Hash)>

Resend invitation email Resend an email invitation to an existing user. &gt; [!note] The invitation token is valid for 24 hours after the email has been sent.

Parameters:

  • new_invite_email (NewInviteEmail)

    body

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

    the optional parameters

Returns:

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

    NewInviteEmail data, response status code and response headers



1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
# File 'lib/talon_one_sdk/api/management_api.rb', line 1269

def create_invite_email_with_http_info(new_invite_email, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.create_invite_email ...'
  end
  # verify the required parameter 'new_invite_email' is set
  if @api_client.config.client_side_validation && new_invite_email.nil?
    fail ArgumentError, "Missing the required parameter 'new_invite_email' when calling ManagementApi.create_invite_email"
  end
  # resource path
  local_var_path = '/v1/invite_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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.create_invite_email",
    :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_invite_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_invite_v2(new_invitation, opts = {}) ⇒ User

Invite user Create a new user in the account and send an invitation to their email address. > [!note] The invitation token is valid for 24 hours after the email has > been sent. You can resend an invitation to a user with the [Resend > invitation email](docs.talon.one/management-api#tag/Accounts-and-users/operation/createInviteEmail) > endpoint.

Parameters:

  • new_invitation (NewInvitation)

    body

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

    the optional parameters

Returns:



1327
1328
1329
1330
# File 'lib/talon_one_sdk/api/management_api.rb', line 1327

def create_invite_v2(new_invitation, opts = {})
  data, _status_code, _headers = create_invite_v2_with_http_info(new_invitation, opts)
  data
end

#create_invite_v2_with_http_info(new_invitation, opts = {}) ⇒ Array<(User, Integer, Hash)>

Invite user Create a new user in the account and send an invitation to their email address. &gt; [!note] The invitation token is valid for 24 hours after the email has &gt; been sent. You can resend an invitation to a user with the [Resend &gt; invitation email](docs.talon.one/management-api#tag/Accounts-and-users/operation/createInviteEmail) &gt; endpoint.

Parameters:

  • new_invitation (NewInvitation)

    body

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

    the optional parameters

Returns:

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

    User data, response status code and response headers



1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
# File 'lib/talon_one_sdk/api/management_api.rb', line 1337

def create_invite_v2_with_http_info(new_invitation, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.create_invite_v2 ...'
  end
  # verify the required parameter 'new_invitation' is set
  if @api_client.config.client_side_validation && new_invitation.nil?
    fail ArgumentError, "Missing the required parameter 'new_invitation' when calling ManagementApi.create_invite_v2"
  end
  # resource path
  local_var_path = '/v2/invites'

  # 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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.create_invite_v2",
    :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_invite_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_password_recovery_email(new_password_email, opts = {}) ⇒ NewPasswordEmail

Request a password reset Send an email with a password recovery link to the email address of an existing account. > [!note] The password recovery link expires 30 minutes after this endpoint is triggered.

Parameters:

  • new_password_email (NewPasswordEmail)

    body

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

    the optional parameters

Returns:



1395
1396
1397
1398
# File 'lib/talon_one_sdk/api/management_api.rb', line 1395

def create_password_recovery_email(new_password_email, opts = {})
  data, _status_code, _headers = create_password_recovery_email_with_http_info(new_password_email, opts)
  data
end

#create_password_recovery_email_with_http_info(new_password_email, opts = {}) ⇒ Array<(NewPasswordEmail, Integer, Hash)>

Request a password reset Send an email with a password recovery link to the email address of an existing account. &gt; [!note] The password recovery link expires 30 minutes after this endpoint is triggered.

Parameters:

  • new_password_email (NewPasswordEmail)

    body

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

    the optional parameters

Returns:

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

    NewPasswordEmail data, response status code and response headers



1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
# File 'lib/talon_one_sdk/api/management_api.rb', line 1405

def create_password_recovery_email_with_http_info(new_password_email, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.create_password_recovery_email ...'
  end
  # verify the required parameter 'new_password_email' is set
  if @api_client.config.client_side_validation && new_password_email.nil?
    fail ArgumentError, "Missing the required parameter 'new_password_email' 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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.create_password_recovery_email",
    :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_session(login_params, opts = {}) ⇒ Session

Create session Create a session to use the Management API endpoints. Use the value of the ‘token` property provided in the response as bearer token in other API calls. A token is valid for 3 months. In accordance with best pratices, use your generated token for all your API requests. Do not regenerate a token for each request. This endpoint has a rate limit of 3 to 6 requests per second per account, depending on your setup. > [!note] > Instead of using a session, you can also use the <a href="docs.talon.one/docs/product/account/dev-tools/managing-mapi-keys">Management API key feature</a> > in the Campaign Manager to decide which endpoints can be used with a given key.

Parameters:

  • login_params (LoginParams)

    body

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

    the optional parameters

Returns:



1463
1464
1465
1466
# File 'lib/talon_one_sdk/api/management_api.rb', line 1463

def create_session(, opts = {})
  data, _status_code, _headers = create_session_with_http_info(, opts)
  data
end

#create_session_with_http_info(login_params, opts = {}) ⇒ Array<(Session, Integer, Hash)>

Create session Create a session to use the Management API endpoints. Use the value of the &#x60;token&#x60; property provided in the response as bearer token in other API calls. A token is valid for 3 months. In accordance with best pratices, use your generated token for all your API requests. Do not regenerate a token for each request. This endpoint has a rate limit of 3 to 6 requests per second per account, depending on your setup. &gt; [!note] &gt; Instead of using a session, you can also use the &lt;a href&#x3D;&quot;docs.talon.one/docs/product/account/dev-tools/managing-mapi-keys&quot;&gt;Management API key feature&lt;/a&gt; &gt; in the Campaign Manager to decide which endpoints can be used with a given key.

Parameters:

  • login_params (LoginParams)

    body

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

    the optional parameters

Returns:

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

    Session data, response status code and response headers



1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
# File 'lib/talon_one_sdk/api/management_api.rb', line 1473

def create_session_with_http_info(, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.create_session ...'
  end
  # verify the required parameter 'login_params' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'login_params' 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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.create_session",
    :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

#create_store(application_id, new_store, opts = {}) ⇒ Store

Create store Create a new store in a specific Application.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • new_store (NewStore)

    body

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

    the optional parameters

Returns:



1532
1533
1534
1535
# File 'lib/talon_one_sdk/api/management_api.rb', line 1532

def create_store(application_id, new_store, opts = {})
  data, _status_code, _headers = create_store_with_http_info(application_id, new_store, opts)
  data
end

#create_store_with_http_info(application_id, new_store, opts = {}) ⇒ Array<(Store, Integer, Hash)>

Create store Create a new store in a specific Application.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • new_store (NewStore)

    body

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

    the optional parameters

Returns:

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

    Store data, response status code and response headers



1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
# File 'lib/talon_one_sdk/api/management_api.rb', line 1543

def create_store_with_http_info(application_id, new_store, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.create_store ...'
  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_store"
  end
  # verify the required parameter 'new_store' is set
  if @api_client.config.client_side_validation && new_store.nil?
    fail ArgumentError, "Missing the required parameter 'new_store' when calling ManagementApi.create_store"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/stores'.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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.create_store",
    :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_store\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#deactivate_user_by_email(deactivate_user_request, opts = {}) ⇒ nil

Disable user by email address [Disable a specific user](docs.talon.one/docs/product/account/account-settings/managing-users#disabling-a-user) by their email address.

Parameters:

  • deactivate_user_request (DeactivateUserRequest)

    body

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

    the optional parameters

Returns:

  • (nil)


1605
1606
1607
1608
# File 'lib/talon_one_sdk/api/management_api.rb', line 1605

def deactivate_user_by_email(deactivate_user_request, opts = {})
  deactivate_user_by_email_with_http_info(deactivate_user_request, opts)
  nil
end

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

Disable user by email address [Disable a specific user](docs.talon.one/docs/product/account/account-settings/managing-users#disabling-a-user) by their email address.

Parameters:

  • deactivate_user_request (DeactivateUserRequest)

    body

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
# File 'lib/talon_one_sdk/api/management_api.rb', line 1615

def deactivate_user_by_email_with_http_info(deactivate_user_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.deactivate_user_by_email ...'
  end
  # verify the required parameter 'deactivate_user_request' is set
  if @api_client.config.client_side_validation && deactivate_user_request.nil?
    fail ArgumentError, "Missing the required parameter 'deactivate_user_request' when calling ManagementApi.deactivate_user_by_email"
  end
  # resource path
  local_var_path = '/v1/users/deactivate'

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

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

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

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

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"ManagementApi.deactivate_user_by_email",
    :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#deactivate_user_by_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#deduct_loyalty_card_points(loyalty_program_id, loyalty_card_id, deduct_loyalty_points, opts = {}) ⇒ nil

Deduct points from card Deduct points from the given loyalty card in the specified card-based loyalty program.

Parameters:

Returns:

  • (nil)


1673
1674
1675
1676
# File 'lib/talon_one_sdk/api/management_api.rb', line 1673

def deduct_loyalty_card_points(loyalty_program_id, loyalty_card_id, deduct_loyalty_points, opts = {})
  deduct_loyalty_card_points_with_http_info(loyalty_program_id, loyalty_card_id, deduct_loyalty_points, opts)
  nil
end

#deduct_loyalty_card_points_with_http_info(loyalty_program_id, loyalty_card_id, deduct_loyalty_points, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Deduct points from card Deduct points from the given loyalty card in the specified card-based loyalty program.

Parameters:

Returns:

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

    nil, response status code and response headers



1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
# File 'lib/talon_one_sdk/api/management_api.rb', line 1685

def deduct_loyalty_card_points_with_http_info(loyalty_program_id, loyalty_card_id, deduct_loyalty_points, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.deduct_loyalty_card_points ...'
  end
  # verify the required parameter 'loyalty_program_id' is set
  if @api_client.config.client_side_validation && loyalty_program_id.nil?
    fail ArgumentError, "Missing the required parameter 'loyalty_program_id' when calling ManagementApi.deduct_loyalty_card_points"
  end
  # verify the required parameter 'loyalty_card_id' is set
  if @api_client.config.client_side_validation && loyalty_card_id.nil?
    fail ArgumentError, "Missing the required parameter 'loyalty_card_id' when calling ManagementApi.deduct_loyalty_card_points"
  end
  if @api_client.config.client_side_validation && loyalty_card_id.to_s.length > 108
    fail ArgumentError, 'invalid value for "loyalty_card_id" when calling ManagementApi.deduct_loyalty_card_points, the character length must be smaller than or equal to 108.'
  end

  if @api_client.config.client_side_validation && loyalty_card_id.to_s.length < 4
    fail ArgumentError, 'invalid value for "loyalty_card_id" when calling ManagementApi.deduct_loyalty_card_points, the character length must be greater than or equal to 4.'
  end

  # verify the required parameter 'deduct_loyalty_points' is set
  if @api_client.config.client_side_validation && deduct_loyalty_points.nil?
    fail ArgumentError, "Missing the required parameter 'deduct_loyalty_points' when calling ManagementApi.deduct_loyalty_card_points"
  end
  # resource path
  local_var_path = '/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/deduct_points'.sub('{loyaltyProgramId}', CGI.escape(loyalty_program_id.to_s)).sub('{loyaltyCardId}', CGI.escape(loyalty_card_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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"ManagementApi.deduct_loyalty_card_points",
    :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#deduct_loyalty_card_points\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_account_collection(collection_id, opts = {}) ⇒ nil

Delete account-level collection Delete a given account-level collection.

Parameters:

  • collection_id (Integer)

    The ID of the collection. You can get it with the [List collections in account](#tag/Collections/operation/listAccountCollections) endpoint.

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

    the optional parameters

Returns:

  • (nil)


1759
1760
1761
1762
# File 'lib/talon_one_sdk/api/management_api.rb', line 1759

def (collection_id, opts = {})
  (collection_id, opts)
  nil
end

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

Delete account-level collection Delete a given account-level collection.

Parameters:

  • collection_id (Integer)

    The ID of the collection. You can get it with the [List collections in account](#tag/Collections/operation/listAccountCollections) endpoint.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
# File 'lib/talon_one_sdk/api/management_api.rb', line 1769

def (collection_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.delete_account_collection ...'
  end
  # verify the required parameter 'collection_id' is set
  if @api_client.config.client_side_validation && collection_id.nil?
    fail ArgumentError, "Missing the required parameter 'collection_id' when calling ManagementApi.delete_account_collection"
  end
  # resource path
  local_var_path = '/v1/collections/{collectionId}'.sub('{collectionId}', CGI.escape(collection_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']) unless header_params['Accept']

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

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

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"ManagementApi.delete_account_collection",
    :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_account_collection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_achievement(application_id, campaign_id, achievement_id, opts = {}) ⇒ nil

Delete achievement Delete the specified achievement.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • achievement_id (Integer)

    The ID of the achievement. You can get this ID with the [List achievement](docs.talon.one/management-api#tag/Achievements/operation/listAchievements) endpoint.

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

    the optional parameters

Returns:

  • (nil)


1824
1825
1826
1827
# File 'lib/talon_one_sdk/api/management_api.rb', line 1824

def delete_achievement(application_id, campaign_id, achievement_id, opts = {})
  delete_achievement_with_http_info(application_id, campaign_id, achievement_id, opts)
  nil
end

#delete_achievement_with_http_info(application_id, campaign_id, achievement_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete achievement Delete the specified achievement.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • achievement_id (Integer)

    The ID of the achievement. You can get this ID with the [List achievement](docs.talon.one/management-api#tag/Achievements/operation/listAchievements) endpoint.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
# File 'lib/talon_one_sdk/api/management_api.rb', line 1836

def delete_achievement_with_http_info(application_id, campaign_id, achievement_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.delete_achievement ...'
  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_achievement"
  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_achievement"
  end
  # verify the required parameter 'achievement_id' is set
  if @api_client.config.client_side_validation && achievement_id.nil?
    fail ArgumentError, "Missing the required parameter 'achievement_id' when calling ManagementApi.delete_achievement"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/achievements/{achievementId}'.sub('{applicationId}', CGI.escape(application_id.to_s)).sub('{campaignId}', CGI.escape(campaign_id.to_s)).sub('{achievementId}', CGI.escape(achievement_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']) unless header_params['Accept']

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

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

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"ManagementApi.delete_achievement",
    :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_achievement\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_campaign(application_id, campaign_id, opts = {}) ⇒ nil

Delete campaign Delete the given campaign.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

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

    the optional parameters

Returns:

  • (nil)


1898
1899
1900
1901
# File 'lib/talon_one_sdk/api/management_api.rb', line 1898

def delete_campaign(application_id, campaign_id, opts = {})
  delete_campaign_with_http_info(application_id, campaign_id, opts)
  nil
end

#delete_campaign_store_budgets(application_id, campaign_id, opts = {}) ⇒ nil

Delete campaign store budgets Delete the store budgets for a given campaign.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

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

    the optional parameters

Options Hash (opts):

  • :action (String)

    The action that this budget is limiting.

  • :period (String)

    The period to which the limit applies. Note: For budgets with no period, set this to &#x60;overall&#x60;.

Returns:

  • (nil)


1967
1968
1969
1970
# File 'lib/talon_one_sdk/api/management_api.rb', line 1967

def delete_campaign_store_budgets(application_id, campaign_id, opts = {})
  delete_campaign_store_budgets_with_http_info(application_id, campaign_id, opts)
  nil
end

#delete_campaign_store_budgets_with_http_info(application_id, campaign_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete campaign store budgets Delete the store budgets for a given campaign.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

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

    the optional parameters

Options Hash (opts):

  • :action (String)

    The action that this budget is limiting.

  • :period (String)

    The period to which the limit applies. Note: For budgets with no period, set this to &#x60;overall&#x60;.

Returns:

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

    nil, response status code and response headers



1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
# File 'lib/talon_one_sdk/api/management_api.rb', line 1980

def delete_campaign_store_budgets_with_http_info(application_id, campaign_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.delete_campaign_store_budgets ...'
  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_store_budgets"
  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_store_budgets"
  end
  allowable_values = ["setDiscount"]
  if @api_client.config.client_side_validation && opts[:'action'] && !allowable_values.include?(opts[:'action'])
    fail ArgumentError, "invalid value for \"action\", must be one of #{allowable_values}"
  end
  allowable_values = ["overall", "daily", "weekly", "monthly", "yearly"]
  if @api_client.config.client_side_validation && opts[:'period'] && !allowable_values.include?(opts[:'period'])
    fail ArgumentError, "invalid value for \"period\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/stores/budgets'.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[:'action'] = opts[:'action'] if !opts[:'action'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

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

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

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

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"ManagementApi.delete_campaign_store_budgets",
    :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_store_budgets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_campaign_with_http_info(application_id, campaign_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete campaign Delete the given campaign.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
# File 'lib/talon_one_sdk/api/management_api.rb', line 1909

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[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"ManagementApi.delete_campaign",
    :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_collection(application_id, campaign_id, collection_id, opts = {}) ⇒ nil

Delete campaign-level collection Delete a given campaign-level collection.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • collection_id (Integer)

    The ID of the collection. You can get it with the [List collections in Application](#tag/Collections/operation/listCollectionsInApplication) endpoint.

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

    the optional parameters

Returns:

  • (nil)


2049
2050
2051
2052
# File 'lib/talon_one_sdk/api/management_api.rb', line 2049

def delete_collection(application_id, campaign_id, collection_id, opts = {})
  delete_collection_with_http_info(application_id, campaign_id, collection_id, opts)
  nil
end

#delete_collection_with_http_info(application_id, campaign_id, collection_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete campaign-level collection Delete a given campaign-level collection.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • collection_id (Integer)

    The ID of the collection. You can get it with the [List collections in Application](#tag/Collections/operation/listCollectionsInApplication) endpoint.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
# File 'lib/talon_one_sdk/api/management_api.rb', line 2061

def delete_collection_with_http_info(application_id, campaign_id, collection_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.delete_collection ...'
  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_collection"
  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_collection"
  end
  # verify the required parameter 'collection_id' is set
  if @api_client.config.client_side_validation && collection_id.nil?
    fail ArgumentError, "Missing the required parameter 'collection_id' when calling ManagementApi.delete_collection"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}'.sub('{applicationId}', CGI.escape(application_id.to_s)).sub('{campaignId}', CGI.escape(campaign_id.to_s)).sub('{collectionId}', CGI.escape(collection_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']) unless header_params['Accept']

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

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

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"ManagementApi.delete_collection",
    :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_collection\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 = {}) ⇒ nil

Delete coupon Delete the specified coupon.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • coupon_id (String)

    The internal ID of the coupon code. You can find this value in the &#x60;id&#x60; property from the [List coupons](docs.talon.one/management-api#tag/Coupons/operation/getCouponsWithoutTotalCount) endpoint response.

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

    the optional parameters

Returns:

  • (nil)


2124
2125
2126
2127
# File 'lib/talon_one_sdk/api/management_api.rb', line 2124

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 = {}) ⇒ Array<(nil, Integer, Hash)>

Delete coupon Delete the specified coupon.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • coupon_id (String)

    The internal ID of the coupon code. You can find this value in the &#x60;id&#x60; property from the [List coupons](docs.talon.one/management-api#tag/Coupons/operation/getCouponsWithoutTotalCount) endpoint response.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
# File 'lib/talon_one_sdk/api/management_api.rb', line 2136

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[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"ManagementApi.delete_coupon",
    :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 = {}) ⇒ nil

Delete coupons Deletes all the coupons matching the specified criteria.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

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

    the optional parameters

Options Hash (opts):

  • :value (String)

    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.

  • :created_before (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :created_after (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :starts_after (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon start date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :starts_before (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon start date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :expires_after (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon expiration date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :expires_before (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon expiration date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :valid (String)
    • &#x60;expired&#x60;: Matches coupons in which the expiration date is set and in the past. - &#x60;validNow&#x60;: Matches coupons in which start date is null or in the past and expiration date is null or in the future. - &#x60;validFuture&#x60;: Matches coupons in which start date is set and in the future.

  • :batch_id (String)

    Filter results by batches of coupons

  • :usable (String)
    • &#x60;true&#x60;: only coupons where &#x60;usageCounter &lt; usageLimit&#x60; will be returned. - &#x60;false&#x60;: only coupons where &#x60;usageCounter &gt;&#x3D; usageLimit&#x60; will be returned.

  • :referral_id (Integer)

    Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code.

  • :recipient_integration_id (String)

    Filter results by match with a profile ID specified in the coupon&#39;s &#x60;RecipientIntegrationId&#x60; field.

  • :exact_match (Boolean)

    Filter results to an exact case-insensitive matching against the coupon code (default to false)

Returns:

  • (nil)


2209
2210
2211
2212
# File 'lib/talon_one_sdk/api/management_api.rb', line 2209

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 = {}) ⇒ Array<(nil, Integer, Hash)>

Delete coupons Deletes all the coupons matching the specified criteria.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

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

    the optional parameters

Options Hash (opts):

  • :value (String)

    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.

  • :created_before (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :created_after (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :starts_after (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon start date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :starts_before (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon start date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :expires_after (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon expiration date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :expires_before (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon expiration date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :valid (String)
    • &#x60;expired&#x60;: Matches coupons in which the expiration date is set and in the past. - &#x60;validNow&#x60;: Matches coupons in which start date is null or in the past and expiration date is null or in the future. - &#x60;validFuture&#x60;: Matches coupons in which start date is set and in the future.

  • :batch_id (String)

    Filter results by batches of coupons

  • :usable (String)
    • &#x60;true&#x60;: only coupons where &#x60;usageCounter &lt; usageLimit&#x60; will be returned. - &#x60;false&#x60;: only coupons where &#x60;usageCounter &gt;&#x3D; usageLimit&#x60; will be returned.

  • :referral_id (Integer)

    Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code.

  • :recipient_integration_id (String)

    Filter results by match with a profile ID specified in the coupon&#39;s &#x60;RecipientIntegrationId&#x60; field.

  • :exact_match (Boolean)

    Filter results to an exact case-insensitive matching against the coupon code (default to false)

Returns:

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

    nil, response status code and response headers



2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
# File 'lib/talon_one_sdk/api/management_api.rb', line 2233

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[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"ManagementApi.delete_coupons",
    :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_loyalty_card(loyalty_program_id, loyalty_card_id, opts = {}) ⇒ nil

Delete loyalty card Delete the given loyalty card.

Parameters:

Returns:

  • (nil)


2310
2311
2312
2313
# File 'lib/talon_one_sdk/api/management_api.rb', line 2310

def delete_loyalty_card(loyalty_program_id, loyalty_card_id, opts = {})
  delete_loyalty_card_with_http_info(loyalty_program_id, loyalty_card_id, opts)
  nil
end

#delete_loyalty_card_with_http_info(loyalty_program_id, loyalty_card_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete loyalty card Delete the given loyalty card.

Parameters:

Returns:

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

    nil, response status code and response headers



2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
# File 'lib/talon_one_sdk/api/management_api.rb', line 2321

def delete_loyalty_card_with_http_info(loyalty_program_id, loyalty_card_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.delete_loyalty_card ...'
  end
  # verify the required parameter 'loyalty_program_id' is set
  if @api_client.config.client_side_validation && loyalty_program_id.nil?
    fail ArgumentError, "Missing the required parameter 'loyalty_program_id' when calling ManagementApi.delete_loyalty_card"
  end
  # verify the required parameter 'loyalty_card_id' is set
  if @api_client.config.client_side_validation && loyalty_card_id.nil?
    fail ArgumentError, "Missing the required parameter 'loyalty_card_id' when calling ManagementApi.delete_loyalty_card"
  end
  if @api_client.config.client_side_validation && loyalty_card_id.to_s.length > 108
    fail ArgumentError, 'invalid value for "loyalty_card_id" when calling ManagementApi.delete_loyalty_card, the character length must be smaller than or equal to 108.'
  end

  if @api_client.config.client_side_validation && loyalty_card_id.to_s.length < 4
    fail ArgumentError, 'invalid value for "loyalty_card_id" when calling ManagementApi.delete_loyalty_card, the character length must be greater than or equal to 4.'
  end

  # resource path
  local_var_path = '/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}'.sub('{loyaltyProgramId}', CGI.escape(loyalty_program_id.to_s)).sub('{loyaltyCardId}', CGI.escape(loyalty_card_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']) unless header_params['Accept']

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

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

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"ManagementApi.delete_loyalty_card",
    :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_loyalty_card\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 = {}) ⇒ nil

Delete referral Delete the specified referral.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • referral_id (String)

    The ID of the referral code.

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

    the optional parameters

Returns:

  • (nil)


2388
2389
2390
2391
# File 'lib/talon_one_sdk/api/management_api.rb', line 2388

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 = {}) ⇒ Array<(nil, Integer, Hash)>

Delete referral Delete the specified referral.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • referral_id (String)

    The ID of the referral code.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
# File 'lib/talon_one_sdk/api/management_api.rb', line 2400

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[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"ManagementApi.delete_referral",
    :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_store(application_id, store_id, opts = {}) ⇒ nil

Delete store Delete the specified store.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • store_id (String)

    The ID of the store. You can get this ID with the [List stores](#tag/Stores/operation/listStores) endpoint.

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

    the optional parameters

Returns:

  • (nil)


2460
2461
2462
2463
# File 'lib/talon_one_sdk/api/management_api.rb', line 2460

def delete_store(application_id, store_id, opts = {})
  delete_store_with_http_info(application_id, store_id, opts)
  nil
end

#delete_store_with_http_info(application_id, store_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete store Delete the specified store.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • store_id (String)

    The ID of the store. You can get this ID with the [List stores](#tag/Stores/operation/listStores) endpoint.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
# File 'lib/talon_one_sdk/api/management_api.rb', line 2471

def delete_store_with_http_info(application_id, store_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.delete_store ...'
  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_store"
  end
  # verify the required parameter 'store_id' is set
  if @api_client.config.client_side_validation && store_id.nil?
    fail ArgumentError, "Missing the required parameter 'store_id' when calling ManagementApi.delete_store"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/stores/{storeId}'.sub('{applicationId}', CGI.escape(application_id.to_s)).sub('{storeId}', CGI.escape(store_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']) unless header_params['Accept']

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

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

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"ManagementApi.delete_store",
    :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_store\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_user(user_id, opts = {}) ⇒ nil

Delete user Delete a specific user.

Parameters:

  • user_id (Integer)

    The ID of the user.

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

    the optional parameters

Returns:

  • (nil)


2528
2529
2530
2531
# File 'lib/talon_one_sdk/api/management_api.rb', line 2528

def delete_user(user_id, opts = {})
  delete_user_with_http_info(user_id, opts)
  nil
end

#delete_user_by_email(delete_user_request, opts = {}) ⇒ nil

Delete user by email address [Delete a specific user](docs.talon.one/docs/product/account/account-settings/managing-users#deleting-a-user) by their email address.

Parameters:

  • delete_user_request (DeleteUserRequest)

    body

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

    the optional parameters

Returns:

  • (nil)


2589
2590
2591
2592
# File 'lib/talon_one_sdk/api/management_api.rb', line 2589

def delete_user_by_email(delete_user_request, opts = {})
  delete_user_by_email_with_http_info(delete_user_request, opts)
  nil
end

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

Delete user by email address [Delete a specific user](docs.talon.one/docs/product/account/account-settings/managing-users#deleting-a-user) by their email address.

Parameters:

  • delete_user_request (DeleteUserRequest)

    body

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
# File 'lib/talon_one_sdk/api/management_api.rb', line 2599

def delete_user_by_email_with_http_info(delete_user_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.delete_user_by_email ...'
  end
  # verify the required parameter 'delete_user_request' is set
  if @api_client.config.client_side_validation && delete_user_request.nil?
    fail ArgumentError, "Missing the required parameter 'delete_user_request' when calling ManagementApi.delete_user_by_email"
  end
  # resource path
  local_var_path = '/v1/users/delete'

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

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

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

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

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"ManagementApi.delete_user_by_email",
    :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#delete_user_by_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

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

Delete user Delete a specific user.

Parameters:

  • user_id (Integer)

    The ID of the user.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
# File 'lib/talon_one_sdk/api/management_api.rb', line 2538

def delete_user_with_http_info(user_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.delete_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.delete_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] || {}

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

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

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"ManagementApi.delete_user",
    :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_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#destroy_session(opts = {}) ⇒ nil

Destroy session Destroys the session.

Parameters:

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

    the optional parameters

Returns:

  • (nil)


2654
2655
2656
2657
# File 'lib/talon_one_sdk/api/management_api.rb', line 2654

def destroy_session(opts = {})
  destroy_session_with_http_info(opts)
  nil
end

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

Destroy session Destroys the session.

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
# File 'lib/talon_one_sdk/api/management_api.rb', line 2663

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[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"ManagementApi.destroy_session",
    :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

#disconnect_campaign_stores(application_id, campaign_id, opts = {}) ⇒ nil

Disconnect stores Disconnect the stores linked to a specific campaign.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

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

    the optional parameters

Returns:

  • (nil)


2711
2712
2713
2714
# File 'lib/talon_one_sdk/api/management_api.rb', line 2711

def disconnect_campaign_stores(application_id, campaign_id, opts = {})
  disconnect_campaign_stores_with_http_info(application_id, campaign_id, opts)
  nil
end

#disconnect_campaign_stores_with_http_info(application_id, campaign_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Disconnect stores Disconnect the stores linked to a specific campaign.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
# File 'lib/talon_one_sdk/api/management_api.rb', line 2722

def disconnect_campaign_stores_with_http_info(application_id, campaign_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.disconnect_campaign_stores ...'
  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.disconnect_campaign_stores"
  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.disconnect_campaign_stores"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/stores'.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']) unless header_params['Accept']

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

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

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"ManagementApi.disconnect_campaign_stores",
    :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#disconnect_campaign_stores\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#export_account_collection_items(collection_id, opts = {}) ⇒ String

Export account-level collection’s items Download a CSV file containing items from a given account-level collection. > [!tip] If the exported CSV file is too large to view, you can > [split it into multiple files](www.google.com/search?q=split+CSV+into+multiple+files).

Parameters:

  • collection_id (Integer)

    The ID of the collection. You can get it with the [List collections in account](#tag/Collections/operation/listAccountCollections) endpoint.

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

    the optional parameters

Returns:

  • (String)


2779
2780
2781
2782
# File 'lib/talon_one_sdk/api/management_api.rb', line 2779

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

#export_account_collection_items_with_http_info(collection_id, opts = {}) ⇒ Array<(String, Integer, Hash)>

Export account-level collection&#39;s items Download a CSV file containing items from a given account-level collection. &gt; [!tip] If the exported CSV file is too large to view, you can &gt; [split it into multiple files](www.google.com/search?q&#x3D;split+CSV+into+multiple+files).

Parameters:

  • collection_id (Integer)

    The ID of the collection. You can get it with the [List collections in account](#tag/Collections/operation/listAccountCollections) endpoint.

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

    the optional parameters

Returns:

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

    String data, response status code and response headers



2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
# File 'lib/talon_one_sdk/api/management_api.rb', line 2789

def (collection_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.export_account_collection_items ...'
  end
  # verify the required parameter 'collection_id' is set
  if @api_client.config.client_side_validation && collection_id.nil?
    fail ArgumentError, "Missing the required parameter 'collection_id' when calling ManagementApi.export_account_collection_items"
  end
  # resource path
  local_var_path = '/v1/collections/{collectionId}/export'.sub('{collectionId}', CGI.escape(collection_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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.export_account_collection_items",
    :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_account_collection_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#export_achievements(application_id, campaign_id, achievement_id, opts = {}) ⇒ String

Export achievement customer data Download a CSV file containing a list of all the customers who have participated in and are currently participating in the given achievement. The CSV file contains the following columns: - ‘profileIntegrationID`: The integration ID of the customer profile participating in the achievement. - `title`: The display name of the achievement in the Campaign Manager. - `target`: The required number of actions or the transactional milestone to complete the achievement. - `progress`: The current progress of the customer in the achievement. - `status`: The status of the achievement. Can be one of: [’inprogress’, ‘completed’, ‘expired’]. - ‘startDate`: The date on which the customer profile started the achievement in RFC3339. - `endDate`: The date on which the achievement ends and resets for the customer profile in RFC3339. - `completionDate`: The date on which the customer profile completed the achievement in RFC3339.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • achievement_id (Integer)

    The ID of the achievement. You can get this ID with the [List achievement](docs.talon.one/management-api#tag/Achievements/operation/listAchievements) endpoint.

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

    the optional parameters

Returns:

  • (String)


2844
2845
2846
2847
# File 'lib/talon_one_sdk/api/management_api.rb', line 2844

def export_achievements(application_id, campaign_id, achievement_id, opts = {})
  data, _status_code, _headers = export_achievements_with_http_info(application_id, campaign_id, achievement_id, opts)
  data
end

#export_achievements_with_http_info(application_id, campaign_id, achievement_id, opts = {}) ⇒ Array<(String, Integer, Hash)>

Export achievement customer data Download a CSV file containing a list of all the customers who have participated in and are currently participating in the given achievement. The CSV file contains the following columns: - &#x60;profileIntegrationID&#x60;: The integration ID of the customer profile participating in the achievement. - &#x60;title&#x60;: The display name of the achievement in the Campaign Manager. - &#x60;target&#x60;: The required number of actions or the transactional milestone to complete the achievement. - &#x60;progress&#x60;: The current progress of the customer in the achievement. - &#x60;status&#x60;: The status of the achievement. Can be one of: [&#39;inprogress&#39;, &#39;completed&#39;, &#39;expired&#39;]. - &#x60;startDate&#x60;: The date on which the customer profile started the achievement in RFC3339. - &#x60;endDate&#x60;: The date on which the achievement ends and resets for the customer profile in RFC3339. - &#x60;completionDate&#x60;: The date on which the customer profile completed the achievement in RFC3339.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • achievement_id (Integer)

    The ID of the achievement. You can get this ID with the [List achievement](docs.talon.one/management-api#tag/Achievements/operation/listAchievements) endpoint.

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

    the optional parameters

Returns:

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

    String data, response status code and response headers



2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
# File 'lib/talon_one_sdk/api/management_api.rb', line 2856

def export_achievements_with_http_info(application_id, campaign_id, achievement_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.export_achievements ...'
  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_achievements"
  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.export_achievements"
  end
  # verify the required parameter 'achievement_id' is set
  if @api_client.config.client_side_validation && achievement_id.nil?
    fail ArgumentError, "Missing the required parameter 'achievement_id' when calling ManagementApi.export_achievements"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/achievements/{achievementId}/export'.sub('{applicationId}', CGI.escape(application_id.to_s)).sub('{campaignId}', CGI.escape(campaign_id.to_s)).sub('{achievementId}', CGI.escape(achievement_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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.export_achievements",
    :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_achievements\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#export_application_campaign_analytics(application_id, range_start, range_end, opts = {}) ⇒ String

Export Application analytics aggregated by campaign Download a CSV file containing analytics data aggregated by campaign for the campaigns of an Application. > [!tip] If the exported CSV file is too large to view, you can > [split it into multiple files](www.google.com/search?q=split+CSV+into+multiple+files). The CSV file contains the following columns: - ‘campaign_id`: The ID of the campaign. This column also contains labels for the [total and influenced values](docs.talon.one/docs/product/campaigns/analytics/application-dashboard#display-the-analytics-data). - `start_date`: The start of the aggregation time frame in UTC. - `end_date`: The end of the aggregation time frame in UTC. - `revenue`: The total, pre-discount value of all items purchased in a customer session. - `sessions`: The number of all closed sessions. - `average_session_value`: The average customer session value, calculated by dividing the revenue value by the number of sessions. - `average_items_per_session`: The number of items from sessions divided by the number of sessions. - `coupons`: The number of times a coupon was successfully redeemed in sessions. - `discounts`: The total value of discounts given for cart items in sessions.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • range_start (Time)

    Only return results from after this timestamp. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered.

  • range_end (Time)

    Only return results from before this timestamp. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered.

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

    the optional parameters

Options Hash (opts):

  • :campaign_ids (Array<String>)

    Filter by one or more Campaign IDs, separated by a comma. Note: If no campaigns are specified, data for all the campaigns in the Application is returned.

Returns:

  • (String)


2920
2921
2922
2923
# File 'lib/talon_one_sdk/api/management_api.rb', line 2920

def export_application_campaign_analytics(application_id, range_start, range_end, opts = {})
  data, _status_code, _headers = export_application_campaign_analytics_with_http_info(application_id, range_start, range_end, opts)
  data
end

#export_application_campaign_analytics_with_http_info(application_id, range_start, range_end, opts = {}) ⇒ Array<(String, Integer, Hash)>

Export Application analytics aggregated by campaign Download a CSV file containing analytics data aggregated by campaign for the campaigns of an Application. &gt; [!tip] If the exported CSV file is too large to view, you can &gt; [split it into multiple files](www.google.com/search?q&#x3D;split+CSV+into+multiple+files). The CSV file contains the following columns: - &#x60;campaign_id&#x60;: The ID of the campaign. This column also contains labels for the [total and influenced values](docs.talon.one/docs/product/campaigns/analytics/application-dashboard#display-the-analytics-data). - &#x60;start_date&#x60;: The start of the aggregation time frame in UTC. - &#x60;end_date&#x60;: The end of the aggregation time frame in UTC. - &#x60;revenue&#x60;: The total, pre-discount value of all items purchased in a customer session. - &#x60;sessions&#x60;: The number of all closed sessions. - &#x60;average_session_value&#x60;: The average customer session value, calculated by dividing the revenue value by the number of sessions. - &#x60;average_items_per_session&#x60;: The number of items from sessions divided by the number of sessions. - &#x60;coupons&#x60;: The number of times a coupon was successfully redeemed in sessions. - &#x60;discounts&#x60;: The total value of discounts given for cart items in sessions.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • range_start (Time)

    Only return results from after this timestamp. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered.

  • range_end (Time)

    Only return results from before this timestamp. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered.

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

    the optional parameters

Options Hash (opts):

  • :campaign_ids (Array<String>)

    Filter by one or more Campaign IDs, separated by a comma. Note: If no campaigns are specified, data for all the campaigns in the Application is returned.

Returns:

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

    String data, response status code and response headers



2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
# File 'lib/talon_one_sdk/api/management_api.rb', line 2933

def export_application_campaign_analytics_with_http_info(application_id, range_start, range_end, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.export_application_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.export_application_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.export_application_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.export_application_campaign_analytics"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaign_analytics/export'.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[:'campaignIds'] = @api_client.build_collection_param(opts[:'campaign_ids'], :csv) if !opts[:'campaign_ids'].nil?

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.export_application_campaign_analytics",
    :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_application_campaign_analytics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#export_audiences_memberships(audience_id, opts = {}) ⇒ String

Export audience members Download a CSV file containing the integration IDs of the members of an audience. > [!tip] If the exported CSV file is too large to view, you can > [split it into multiple files](www.google.com/search?q=split+CSV+into+multiple+files). The file contains the following column: - ‘profileintegrationid`: The integration ID of the customer profile.

Parameters:

  • audience_id (Integer)

    The ID of the audience.

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

    the optional parameters

Returns:

  • (String)


2997
2998
2999
3000
# File 'lib/talon_one_sdk/api/management_api.rb', line 2997

def export_audiences_memberships(audience_id, opts = {})
  data, _status_code, _headers = export_audiences_memberships_with_http_info(audience_id, opts)
  data
end

#export_audiences_memberships_with_http_info(audience_id, opts = {}) ⇒ Array<(String, Integer, Hash)>

Export audience members Download a CSV file containing the integration IDs of the members of an audience. &gt; [!tip] If the exported CSV file is too large to view, you can &gt; [split it into multiple files](www.google.com/search?q&#x3D;split+CSV+into+multiple+files). The file contains the following column: - &#x60;profileintegrationid&#x60;: The integration ID of the customer profile.

Parameters:

  • audience_id (Integer)

    The ID of the audience.

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

    the optional parameters

Returns:

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

    String data, response status code and response headers



3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
# File 'lib/talon_one_sdk/api/management_api.rb', line 3007

def export_audiences_memberships_with_http_info(audience_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.export_audiences_memberships ...'
  end
  # verify the required parameter 'audience_id' is set
  if @api_client.config.client_side_validation && audience_id.nil?
    fail ArgumentError, "Missing the required parameter 'audience_id' when calling ManagementApi.export_audiences_memberships"
  end
  # resource path
  local_var_path = '/v1/audiences/{audienceId}/memberships/export'.sub('{audienceId}', CGI.escape(audience_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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.export_audiences_memberships",
    :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_audiences_memberships\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#export_campaign_store_budgets(application_id, campaign_id, opts = {}) ⇒ String

Export campaign store budgets Download a CSV file containing the store budgets for a given campaign. > [!tip] If the exported CSV file is too large to view, you can > [split it into multiple files](www.google.com/search?q=split+CSV+into+multiple+files). The CSV file contains the following columns: - ‘store_integration_id`: The identifier of the store. - `limit`: The budget limit for the store.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

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

    the optional parameters

Options Hash (opts):

  • :action (String)

    The action that this budget is limiting.

  • :period (String)

    The period to which the limit applies. Note: For budgets with no period, set this to &#x60;overall&#x60;.

Returns:

  • (String)


3063
3064
3065
3066
# File 'lib/talon_one_sdk/api/management_api.rb', line 3063

def export_campaign_store_budgets(application_id, campaign_id, opts = {})
  data, _status_code, _headers = export_campaign_store_budgets_with_http_info(application_id, campaign_id, opts)
  data
end

#export_campaign_store_budgets_with_http_info(application_id, campaign_id, opts = {}) ⇒ Array<(String, Integer, Hash)>

Export campaign store budgets Download a CSV file containing the store budgets for a given campaign. &gt; [!tip] If the exported CSV file is too large to view, you can &gt; [split it into multiple files](www.google.com/search?q&#x3D;split+CSV+into+multiple+files). The CSV file contains the following columns: - &#x60;store_integration_id&#x60;: The identifier of the store. - &#x60;limit&#x60;: The budget limit for the store.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

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

    the optional parameters

Options Hash (opts):

  • :action (String)

    The action that this budget is limiting.

  • :period (String)

    The period to which the limit applies. Note: For budgets with no period, set this to &#x60;overall&#x60;.

Returns:

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

    String data, response status code and response headers



3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
# File 'lib/talon_one_sdk/api/management_api.rb', line 3076

def export_campaign_store_budgets_with_http_info(application_id, campaign_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.export_campaign_store_budgets ...'
  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_campaign_store_budgets"
  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.export_campaign_store_budgets"
  end
  allowable_values = ["setDiscount"]
  if @api_client.config.client_side_validation && opts[:'action'] && !allowable_values.include?(opts[:'action'])
    fail ArgumentError, "invalid value for \"action\", must be one of #{allowable_values}"
  end
  allowable_values = ["overall", "daily", "weekly", "monthly", "yearly"]
  if @api_client.config.client_side_validation && opts[:'period'] && !allowable_values.include?(opts[:'period'])
    fail ArgumentError, "invalid value for \"period\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/stores/budgets/export'.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[:'action'] = opts[:'action'] if !opts[:'action'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.export_campaign_store_budgets",
    :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_campaign_store_budgets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#export_campaign_stores(application_id, campaign_id, opts = {}) ⇒ String

Export stores Download a CSV file containing the stores linked to a specific campaign. > [!tip] If the exported CSV file is too large to view, you can > [split it into multiple files](www.google.com/search?q=split+CSV+into+multiple+files). The CSV file contains the following column: - ‘store_integration_id`: The identifier of the store.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

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

    the optional parameters

Returns:

  • (String)


3144
3145
3146
3147
# File 'lib/talon_one_sdk/api/management_api.rb', line 3144

def export_campaign_stores(application_id, campaign_id, opts = {})
  data, _status_code, _headers = export_campaign_stores_with_http_info(application_id, campaign_id, opts)
  data
end

#export_campaign_stores_with_http_info(application_id, campaign_id, opts = {}) ⇒ Array<(String, Integer, Hash)>

Export stores Download a CSV file containing the stores linked to a specific campaign. &gt; [!tip] If the exported CSV file is too large to view, you can &gt; [split it into multiple files](www.google.com/search?q&#x3D;split+CSV+into+multiple+files). The CSV file contains the following column: - &#x60;store_integration_id&#x60;: The identifier of the store.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

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

    the optional parameters

Returns:

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

    String data, response status code and response headers



3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
# File 'lib/talon_one_sdk/api/management_api.rb', line 3155

def export_campaign_stores_with_http_info(application_id, campaign_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.export_campaign_stores ...'
  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_campaign_stores"
  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.export_campaign_stores"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/stores/export'.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/csv']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.export_campaign_stores",
    :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_campaign_stores\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#export_campaign_value_map(application_id, campaign_id, value_map_id, opts = {}) ⇒ String

Export campaign value map Download a CSV file containing all the value map items in a campaign. If there are multiple versions of the value map, only the items of the current version are exported. > [!tip] If the exported CSV file is too large to view, you can > [split it into multiple files](www.google.com/search?q=split+CSV+into+multiple+files). The generated file can contain the following columns: - ‘identifier`: The value of the attribute in the targeted item, for example, an item’s SKU. - ‘value`: The value that is associated with the identifier, for example, the item’s price.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • value_map_id (Integer)

    The ID of the value map.

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

    the optional parameters

Returns:

  • (String)


3214
3215
3216
3217
# File 'lib/talon_one_sdk/api/management_api.rb', line 3214

def export_campaign_value_map(application_id, campaign_id, value_map_id, opts = {})
  data, _status_code, _headers = export_campaign_value_map_with_http_info(application_id, campaign_id, value_map_id, opts)
  data
end

#export_campaign_value_map_with_http_info(application_id, campaign_id, value_map_id, opts = {}) ⇒ Array<(String, Integer, Hash)>

Export campaign value map Download a CSV file containing all the value map items in a campaign. If there are multiple versions of the value map, only the items of the current version are exported. &gt; [!tip] If the exported CSV file is too large to view, you can &gt; [split it into multiple files](www.google.com/search?q&#x3D;split+CSV+into+multiple+files). The generated file can contain the following columns: - &#x60;identifier&#x60;: The value of the attribute in the targeted item, for example, an item&#39;s SKU. - &#x60;value&#x60;: The value that is associated with the identifier, for example, the item&#39;s price.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • value_map_id (Integer)

    The ID of the value map.

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

    the optional parameters

Returns:

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

    String data, response status code and response headers



3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
# File 'lib/talon_one_sdk/api/management_api.rb', line 3226

def export_campaign_value_map_with_http_info(application_id, campaign_id, value_map_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.export_campaign_value_map ...'
  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_campaign_value_map"
  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.export_campaign_value_map"
  end
  # verify the required parameter 'value_map_id' is set
  if @api_client.config.client_side_validation && value_map_id.nil?
    fail ArgumentError, "Missing the required parameter 'value_map_id' when calling ManagementApi.export_campaign_value_map"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/value_maps/{valueMapId}/export'.sub('{applicationId}', CGI.escape(application_id.to_s)).sub('{campaignId}', CGI.escape(campaign_id.to_s)).sub('{valueMapId}', CGI.escape(value_map_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', 'application/json']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.export_campaign_value_map",
    :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_campaign_value_map\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#export_collection_items(application_id, campaign_id, collection_id, opts = {}) ⇒ String

Export campaign-level collection’s items Download a CSV file containing items from a given campaign-level collection. > [!tip] If the exported CSV file is too large to view, you can > [split it into multiple files](www.google.com/search?q=split+CSV+into+multiple+files).

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • collection_id (Integer)

    The ID of the collection. You can get it with the [List collections in Application](#tag/Collections/operation/listCollectionsInApplication) endpoint.

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

    the optional parameters

Returns:

  • (String)


3289
3290
3291
3292
# File 'lib/talon_one_sdk/api/management_api.rb', line 3289

def export_collection_items(application_id, campaign_id, collection_id, opts = {})
  data, _status_code, _headers = export_collection_items_with_http_info(application_id, campaign_id, collection_id, opts)
  data
end

#export_collection_items_with_http_info(application_id, campaign_id, collection_id, opts = {}) ⇒ Array<(String, Integer, Hash)>

Export campaign-level collection&#39;s items Download a CSV file containing items from a given campaign-level collection. &gt; [!tip] If the exported CSV file is too large to view, you can &gt; [split it into multiple files](www.google.com/search?q&#x3D;split+CSV+into+multiple+files).

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • collection_id (Integer)

    The ID of the collection. You can get it with the [List collections in Application](#tag/Collections/operation/listCollectionsInApplication) endpoint.

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

    the optional parameters

Returns:

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

    String data, response status code and response headers



3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
# File 'lib/talon_one_sdk/api/management_api.rb', line 3301

def export_collection_items_with_http_info(application_id, campaign_id, collection_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.export_collection_items ...'
  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_collection_items"
  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.export_collection_items"
  end
  # verify the required parameter 'collection_id' is set
  if @api_client.config.client_side_validation && collection_id.nil?
    fail ArgumentError, "Missing the required parameter 'collection_id' when calling ManagementApi.export_collection_items"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}/export'.sub('{applicationId}', CGI.escape(application_id.to_s)).sub('{campaignId}', CGI.escape(campaign_id.to_s)).sub('{collectionId}', CGI.escape(collection_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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.export_collection_items",
    :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_collection_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#export_coupons(application_id, opts = {}) ⇒ String

Export coupons Download a CSV file containing the coupons that match the given properties. > [!tip] If the exported CSV file is too large to view, you can > [split it into multiple files](www.google.com/search?q=split+CSV+into+multiple+files). The CSV file can contain the following columns: - ‘accountid`: The ID of your deployment. - `applicationid`: The ID of the Application this coupon is related to. - `attributes`: A json object describing custom referral attribute names and their values. - `batchid`: The ID of the batch this coupon is part of. - `campaignid`: The ID of the campaign this coupon is related to. - `counter`: The number of times this coupon has been redeemed. - `created`: The creation date in RFC3339 of the coupon code. - `deleted`: Whether the coupon code is deleted. - `deleted_changelogid`: The ID of the delete event in the logs. - `discount_counter`: The amount of discount given by this coupon. - `discount_limitval`: The maximum discount amount that can be given be this coupon. - `expirydate`: The end date in RFC3339 of the code redemption period. - `id`: The internal ID of the coupon code. - `importid`: The ID of the import job that created this coupon. - `is_reservation_mandatory`: Whether this coupon requires a reservation to be redeemed. - `limits`: The limits set on this coupon. - `limitval`: The maximum number of redemptions of this code. - `recipientintegrationid`: The integration ID of the recipient of the coupon. Only the customer with this integration ID can redeem this code. Available only for personal codes. - `referralid`: The ID of the referral code that triggered the creation of this coupon (create coupon effect). - `reservation`: Whether the coupon can be reserved for multiple customers. - `reservation_counter`: How many times this coupon has been reserved. - `reservation_limitval`: The maximum of number of reservations this coupon can have. - `startdate`: The start date in RFC3339 of the code redemption period. - `value`: The coupon code.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

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

    the optional parameters

Options Hash (opts):

  • :campaign_id (Float)

    Filter results by campaign ID.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

  • :value (String)

    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.

  • :created_before (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :created_after (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :valid (String)

    Either &quot;expired&quot;, &quot;validNow&quot;, or &quot;validFuture&quot;. The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future.

  • :usable (String)

    Either &quot;true&quot; or &quot;false&quot;. If &quot;true&quot;, only coupons where &#x60;usageCounter &lt; usageLimit&#x60; will be returned, &quot;false&quot; will return only coupons where &#x60;usageCounter &gt;&#x3D; usageLimit&#x60;.

  • :referral_id (Integer)

    Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code.

  • :recipient_integration_id (String)

    Filter results by match with a profile id specified in the coupon&#39;s RecipientIntegrationId field.

  • :batch_id (String)

    Filter results by batches of coupons

  • :exact_match (Boolean)

    Filter results to an exact case-insensitive matching against the coupon code. (default to false)

  • :date_format (String)

    Determines the format of dates in the export document.

  • :campaign_state (String)

    Filter results by the state of the campaign. - &#x60;enabled&#x60;: Campaigns that are scheduled, running (activated), or expired. - &#x60;running&#x60;: Campaigns that are running (activated). - &#x60;disabled&#x60;: Campaigns that are disabled. - &#x60;expired&#x60;: Campaigns that are expired. - &#x60;archived&#x60;: Campaigns that are archived.

  • :values_only (Boolean)

    Filter results to only return the coupon codes (&#x60;value&#x60; column) without the associated coupon data. (default to false)

Returns:

  • (String)


3376
3377
3378
3379
# File 'lib/talon_one_sdk/api/management_api.rb', line 3376

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 = {}) ⇒ Array<(String, Integer, Hash)>

Export coupons Download a CSV file containing the coupons that match the given properties. &gt; [!tip] If the exported CSV file is too large to view, you can &gt; [split it into multiple files](www.google.com/search?q&#x3D;split+CSV+into+multiple+files). The CSV file can contain the following columns: - &#x60;accountid&#x60;: The ID of your deployment. - &#x60;applicationid&#x60;: The ID of the Application this coupon is related to. - &#x60;attributes&#x60;: A json object describing custom referral attribute names and their values. - &#x60;batchid&#x60;: The ID of the batch this coupon is part of. - &#x60;campaignid&#x60;: The ID of the campaign this coupon is related to. - &#x60;counter&#x60;: The number of times this coupon has been redeemed. - &#x60;created&#x60;: The creation date in RFC3339 of the coupon code. - &#x60;deleted&#x60;: Whether the coupon code is deleted. - &#x60;deleted_changelogid&#x60;: The ID of the delete event in the logs. - &#x60;discount_counter&#x60;: The amount of discount given by this coupon. - &#x60;discount_limitval&#x60;: The maximum discount amount that can be given be this coupon. - &#x60;expirydate&#x60;: The end date in RFC3339 of the code redemption period. - &#x60;id&#x60;: The internal ID of the coupon code. - &#x60;importid&#x60;: The ID of the import job that created this coupon. - &#x60;is_reservation_mandatory&#x60;: Whether this coupon requires a reservation to be redeemed. - &#x60;limits&#x60;: The limits set on this coupon. - &#x60;limitval&#x60;: The maximum number of redemptions of this code. - &#x60;recipientintegrationid&#x60;: The integration ID of the recipient of the coupon. Only the customer with this integration ID can redeem this code. Available only for personal codes. - &#x60;referralid&#x60;: The ID of the referral code that triggered the creation of this coupon (create coupon effect). - &#x60;reservation&#x60;: Whether the coupon can be reserved for multiple customers. - &#x60;reservation_counter&#x60;: How many times this coupon has been reserved. - &#x60;reservation_limitval&#x60;: The maximum of number of reservations this coupon can have. - &#x60;startdate&#x60;: The start date in RFC3339 of the code redemption period. - &#x60;value&#x60;: The coupon code.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

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

    the optional parameters

Options Hash (opts):

  • :campaign_id (Float)

    Filter results by campaign ID.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

  • :value (String)

    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.

  • :created_before (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :created_after (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :valid (String)

    Either &quot;expired&quot;, &quot;validNow&quot;, or &quot;validFuture&quot;. The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future.

  • :usable (String)

    Either &quot;true&quot; or &quot;false&quot;. If &quot;true&quot;, only coupons where &#x60;usageCounter &lt; usageLimit&#x60; will be returned, &quot;false&quot; will return only coupons where &#x60;usageCounter &gt;&#x3D; usageLimit&#x60;.

  • :referral_id (Integer)

    Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code.

  • :recipient_integration_id (String)

    Filter results by match with a profile id specified in the coupon&#39;s RecipientIntegrationId field.

  • :batch_id (String)

    Filter results by batches of coupons

  • :exact_match (Boolean)

    Filter results to an exact case-insensitive matching against the coupon code. (default to false)

  • :date_format (String)

    Determines the format of dates in the export document.

  • :campaign_state (String)

    Filter results by the state of the campaign. - &#x60;enabled&#x60;: Campaigns that are scheduled, running (activated), or expired. - &#x60;running&#x60;: Campaigns that are running (activated). - &#x60;disabled&#x60;: Campaigns that are disabled. - &#x60;expired&#x60;: Campaigns that are expired. - &#x60;archived&#x60;: Campaigns that are archived.

  • :values_only (Boolean)

    Filter results to only return the coupon codes (&#x60;value&#x60; column) without the associated coupon data. (default to false)

Returns:

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

    String data, response status code and response headers



3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
# File 'lib/talon_one_sdk/api/management_api.rb', line 3400

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", "scheduled", "running", "expired", "staged"]
  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?
  query_params[:'valuesOnly'] = opts[:'values_only'] if !opts[:'values_only'].nil?

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.export_coupons",
    :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 = {}) ⇒ String

Export customer sessions Download a CSV file containing the customer sessions that match the request. > [!important] Archived sessions cannot be exported. See the [retention > policy](docs.talon.one/docs/dev/server-infrastructure-and-data-retention). > [!tip] If the exported CSV file is too large to view, you can > [split it into multiple files](www.google.com/search?q=split+CSV+into+multiple+files). - ‘id`: The internal ID of the session. - `firstsession`: Whether this is a first session. - `integrationid`: The integration ID of the session. - `applicationid`: The ID of the Application. - `profileid`: The internal ID of the customer profile. - `profileintegrationid`: The integration ID of the customer profile. - `created`: The timestamp when the session was created. - `state`: The [state](docs.talon.one/docs/dev/concepts/entities/customer-sessions#customer-session-states) of the session. - `cartitems`: The cart items in the session. - `discounts`: The discounts in the session. - `total`: The total value of cart items and additional costs in the session, before any discounts are applied. - `attributes`: The attributes set in the session. - `closedat`: Timestamp when the session was closed. - `cancelledat`: Timestamp when the session was cancelled. - `referral`: The referral code in the session. - `identifiers`: The identifiers in the session. - `additional_costs`: The [additional costs](docs.talon.one/docs/product/account/dev-tools/managing-additional-costs) in the session. - `updated`: Timestamp of the last session update. - `store_integration_id`: The integration ID of the store. - `coupons`: Coupon codes in the session.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

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

    the optional parameters

Options Hash (opts):

  • :created_before (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string.

  • :created_after (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string.

  • :updated_before (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string.

  • :updated_after (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string.

  • :profile_integration_id (String)

    Only return sessions for the customer that matches this customer integration ID.

  • :date_format (String)

    Determines the format of dates in the export document.

  • :customer_session_state (String)

    Filter results by state.

Returns:

  • (String)


3490
3491
3492
3493
# File 'lib/talon_one_sdk/api/management_api.rb', line 3490

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 = {}) ⇒ Array<(String, Integer, Hash)>

Export customer sessions Download a CSV file containing the customer sessions that match the request. &gt; [!important] Archived sessions cannot be exported. See the [retention &gt; policy](docs.talon.one/docs/dev/server-infrastructure-and-data-retention). &gt; [!tip] If the exported CSV file is too large to view, you can &gt; [split it into multiple files](www.google.com/search?q&#x3D;split+CSV+into+multiple+files). - &#x60;id&#x60;: The internal ID of the session. - &#x60;firstsession&#x60;: Whether this is a first session. - &#x60;integrationid&#x60;: The integration ID of the session. - &#x60;applicationid&#x60;: The ID of the Application. - &#x60;profileid&#x60;: The internal ID of the customer profile. - &#x60;profileintegrationid&#x60;: The integration ID of the customer profile. - &#x60;created&#x60;: The timestamp when the session was created. - &#x60;state&#x60;: The [state](docs.talon.one/docs/dev/concepts/entities/customer-sessions#customer-session-states) of the session. - &#x60;cartitems&#x60;: The cart items in the session. - &#x60;discounts&#x60;: The discounts in the session. - &#x60;total&#x60;: The total value of cart items and additional costs in the session, before any discounts are applied. - &#x60;attributes&#x60;: The attributes set in the session. - &#x60;closedat&#x60;: Timestamp when the session was closed. - &#x60;cancelledat&#x60;: Timestamp when the session was cancelled. - &#x60;referral&#x60;: The referral code in the session. - &#x60;identifiers&#x60;: The identifiers in the session. - &#x60;additional_costs&#x60;: The [additional costs](docs.talon.one/docs/product/account/dev-tools/managing-additional-costs) in the session. - &#x60;updated&#x60;: Timestamp of the last session update. - &#x60;store_integration_id&#x60;: The integration ID of the store. - &#x60;coupons&#x60;: Coupon codes in the session.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

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

    the optional parameters

Options Hash (opts):

  • :created_before (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string.

  • :created_after (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string.

  • :updated_before (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string.

  • :updated_after (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string.

  • :profile_integration_id (String)

    Only return sessions for the customer that matches this customer integration ID.

  • :date_format (String)

    Determines the format of dates in the export document.

  • :customer_session_state (String)

    Filter results by state.

Returns:

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

    String data, response status code and response headers



3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
# File 'lib/talon_one_sdk/api/management_api.rb', line 3507

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", "partially_returned", "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[:'updatedBefore'] = opts[:'updated_before'] if !opts[:'updated_before'].nil?
  query_params[:'updatedAfter'] = opts[:'updated_after'] if !opts[:'updated_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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.export_customer_sessions",
    :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_customers_tiers(loyalty_program_id, opts = {}) ⇒ String

Export customers’ tier data Download a CSV file containing the tier information for customers of the specified loyalty program. The generated file contains the following columns: - ‘programid`: The identifier of the loyalty program. It is displayed in your Talon.One deployment URL. - `subledgerid`: The ID of the subledger associated with the loyalty program. This column is empty if the loyalty program has no subledger. In this case, refer to the export file name to get the ID of the loyalty program. - `customerprofileid`: The ID used to integrate customer profiles with the loyalty program. - `tiername`: The name of the tier. - `startdate`: The tier start date in RFC3339. - `expirydate`: The tier expiry date in RFC3339. You can filter the results by providing the following optional input parameters: - `subledgerIds` (optional): Filter results by an array of subledger IDs. If no value is provided, all subledger data for the specified loyalty program will be exported. - `tierNames` (optional): Filter results by an array of tier names. If no value is provided, all tier data for the specified loyalty program will be exported.

Parameters:

  • loyalty_program_id (String)

    The identifier for the loyalty program.

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

    the optional parameters

Options Hash (opts):

  • :subledger_ids (Array<String>)

    An array of subledgers IDs to filter the export by.

  • :tier_names (Array<String>)

    An array of tier names to filter the export by.

Returns:

  • (String)


3577
3578
3579
3580
# File 'lib/talon_one_sdk/api/management_api.rb', line 3577

def export_customers_tiers(loyalty_program_id, opts = {})
  data, _status_code, _headers = export_customers_tiers_with_http_info(loyalty_program_id, opts)
  data
end

#export_customers_tiers_with_http_info(loyalty_program_id, opts = {}) ⇒ Array<(String, Integer, Hash)>

Export customers&#39; tier data Download a CSV file containing the tier information for customers of the specified loyalty program. The generated file contains the following columns: - &#x60;programid&#x60;: The identifier of the loyalty program. It is displayed in your Talon.One deployment URL. - &#x60;subledgerid&#x60;: The ID of the subledger associated with the loyalty program. This column is empty if the loyalty program has no subledger. In this case, refer to the export file name to get the ID of the loyalty program. - &#x60;customerprofileid&#x60;: The ID used to integrate customer profiles with the loyalty program. - &#x60;tiername&#x60;: The name of the tier. - &#x60;startdate&#x60;: The tier start date in RFC3339. - &#x60;expirydate&#x60;: The tier expiry date in RFC3339. You can filter the results by providing the following optional input parameters: - &#x60;subledgerIds&#x60; (optional): Filter results by an array of subledger IDs. If no value is provided, all subledger data for the specified loyalty program will be exported. - &#x60;tierNames&#x60; (optional): Filter results by an array of tier names. If no value is provided, all tier data for the specified loyalty program will be exported.

Parameters:

  • loyalty_program_id (String)

    The identifier for the loyalty program.

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

    the optional parameters

Options Hash (opts):

  • :subledger_ids (Array<String>)

    An array of subledgers IDs to filter the export by.

  • :tier_names (Array<String>)

    An array of tier names to filter the export by.

Returns:

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

    String data, response status code and response headers



3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
# File 'lib/talon_one_sdk/api/management_api.rb', line 3589

def export_customers_tiers_with_http_info(loyalty_program_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.export_customers_tiers ...'
  end
  # verify the required parameter 'loyalty_program_id' is set
  if @api_client.config.client_side_validation && loyalty_program_id.nil?
    fail ArgumentError, "Missing the required parameter 'loyalty_program_id' when calling ManagementApi.export_customers_tiers"
  end
  # resource path
  local_var_path = '/v1/loyalty_programs/{loyaltyProgramId}/export_customers_tiers'.sub('{loyaltyProgramId}', CGI.escape(loyalty_program_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'subledgerIds'] = @api_client.build_collection_param(opts[:'subledger_ids'], :csv) if !opts[:'subledger_ids'].nil?
  query_params[:'tierNames'] = @api_client.build_collection_param(opts[:'tier_names'], :csv) if !opts[:'tier_names'].nil?

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.export_customers_tiers",
    :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_customers_tiers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#export_effects(application_id, opts = {}) ⇒ String

Export triggered effects Download a CSV file containing the triggered effects that match the given attributes. > [!tip] If the exported CSV file is too large to view, you can > [split it into multiple files](www.google.com/search?q=split+CSV+into+multiple+files). The generated file can contain the following columns: - ‘applicationid`: The ID of the Application. - `campaignid`: The ID of the campaign. - `couponid`: The ID of the coupon, when applicable to the effect. - `created`: The timestamp of the effect. - `event_type`: The name of the event. See the [docs](docs.talon.one/docs/dev/concepts/entities/events). - `eventid`: The internal ID of the effect. - `name`: The effect name. See the [docs](docs.talon.one/docs/dev/integration-api/api-effects). - `profileintegrationid`: The ID of the customer profile, when applicable. - `props`: The [properties](docs.talon.one/docs/dev/integration-api/api-effects) of the effect. - `ruleindex`: The index of the rule. - `rulesetid`: The ID of the rule set. - `sessionid`: The internal ID of the session that triggered the effect. - `profileid`: The internal ID of the customer profile. - `sessionintegrationid`: The integration ID of the session. - `total_revenue`: The total revenue. - `store_integration_id`: The integration ID of the store. You choose this ID when you create a store.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

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

    the optional parameters

Options Hash (opts):

  • :campaign_id (Float)

    Filter results by campaign ID.

  • :created_before (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :created_after (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :date_format (String)

    Determines the format of dates in the export document.

Returns:

  • (String)


3648
3649
3650
3651
# File 'lib/talon_one_sdk/api/management_api.rb', line 3648

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 = {}) ⇒ Array<(String, Integer, Hash)>

Export triggered effects Download a CSV file containing the triggered effects that match the given attributes. &gt; [!tip] If the exported CSV file is too large to view, you can &gt; [split it into multiple files](www.google.com/search?q&#x3D;split+CSV+into+multiple+files). The generated file can contain the following columns: - &#x60;applicationid&#x60;: The ID of the Application. - &#x60;campaignid&#x60;: The ID of the campaign. - &#x60;couponid&#x60;: The ID of the coupon, when applicable to the effect. - &#x60;created&#x60;: The timestamp of the effect. - &#x60;event_type&#x60;: The name of the event. See the [docs](docs.talon.one/docs/dev/concepts/entities/events). - &#x60;eventid&#x60;: The internal ID of the effect. - &#x60;name&#x60;: The effect name. See the [docs](docs.talon.one/docs/dev/integration-api/api-effects). - &#x60;profileintegrationid&#x60;: The ID of the customer profile, when applicable. - &#x60;props&#x60;: The [properties](docs.talon.one/docs/dev/integration-api/api-effects) of the effect. - &#x60;ruleindex&#x60;: The index of the rule. - &#x60;rulesetid&#x60;: The ID of the rule set. - &#x60;sessionid&#x60;: The internal ID of the session that triggered the effect. - &#x60;profileid&#x60;: The internal ID of the customer profile. - &#x60;sessionintegrationid&#x60;: The integration ID of the session. - &#x60;total_revenue&#x60;: The total revenue. - &#x60;store_integration_id&#x60;: The integration ID of the store. You choose this ID when you create a store.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

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

    the optional parameters

Options Hash (opts):

  • :campaign_id (Float)

    Filter results by campaign ID.

  • :created_before (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :created_after (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :date_format (String)

    Determines the format of dates in the export document.

Returns:

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

    String data, response status code and response headers



3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
# File 'lib/talon_one_sdk/api/management_api.rb', line 3662

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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.export_effects",
    :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(loyalty_program_id, opts = {}) ⇒ String

Export customer loyalty balance to CSV To export customer loyalty balances to CSV, use the [Export customer loyalty balances to CSV](/management-api#tag/Loyalty/operation/exportLoyaltyBalances) endpoint. Download a CSV file containing the balance of each customer in the loyalty program. > [!tip] If the exported CSV file is too large to view, you can > [split it into multiple files](www.google.com/search?q=split+CSV+into+multiple+files).

Parameters:

  • loyalty_program_id (String)

    The identifier for the loyalty program.

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

    the optional parameters

Options Hash (opts):

  • :end_date (Time)

    Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered.

  • :balances (String)

    Filters which balance fields are included in the CSV export. &#x60;currentBalance&#x60; is always returned. By default, all balance fields are included. When this parameter is provided, only the listed fields contain values and the rest are returned empty. Accepted values: - &#x60;currentBalance&#x60; - &#x60;pendingBalance&#x60; - &#x60;expiredBalance&#x60; - &#x60;spentBalance&#x60; - &#x60;negativeBalance&#x60; Multiple values must be provided as a comma-separated list.

Returns:

  • (String)


3725
3726
3727
3728
# File 'lib/talon_one_sdk/api/management_api.rb', line 3725

def export_loyalty_balance(loyalty_program_id, opts = {})
  data, _status_code, _headers = export_loyalty_balance_with_http_info(loyalty_program_id, opts)
  data
end

#export_loyalty_balance_with_http_info(loyalty_program_id, opts = {}) ⇒ Array<(String, Integer, Hash)>

Export customer loyalty balance to CSV To export customer loyalty balances to CSV, use the [Export customer loyalty balances to CSV](/management-api#tag/Loyalty/operation/exportLoyaltyBalances) endpoint. Download a CSV file containing the balance of each customer in the loyalty program. &gt; [!tip] If the exported CSV file is too large to view, you can &gt; [split it into multiple files](www.google.com/search?q&#x3D;split+CSV+into+multiple+files).

Parameters:

  • loyalty_program_id (String)

    The identifier for the loyalty program.

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

    the optional parameters

Options Hash (opts):

  • :end_date (Time)

    Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered.

  • :balances (String)

    Filters which balance fields are included in the CSV export. &#x60;currentBalance&#x60; is always returned. By default, all balance fields are included. When this parameter is provided, only the listed fields contain values and the rest are returned empty. Accepted values: - &#x60;currentBalance&#x60; - &#x60;pendingBalance&#x60; - &#x60;expiredBalance&#x60; - &#x60;spentBalance&#x60; - &#x60;negativeBalance&#x60; Multiple values must be provided as a comma-separated list.

Returns:

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

    String data, response status code and response headers



3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
# File 'lib/talon_one_sdk/api/management_api.rb', line 3737

def export_loyalty_balance_with_http_info(loyalty_program_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.export_loyalty_balance ...'
  end
  # verify the required parameter 'loyalty_program_id' is set
  if @api_client.config.client_side_validation && loyalty_program_id.nil?
    fail ArgumentError, "Missing the required parameter 'loyalty_program_id' when calling ManagementApi.export_loyalty_balance"
  end
  # resource path
  local_var_path = '/v1/loyalty_programs/{loyaltyProgramId}/export_customer_balance'.sub('{loyaltyProgramId}', CGI.escape(loyalty_program_id.to_s))

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

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.export_loyalty_balance",
    :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_balances(loyalty_program_id, opts = {}) ⇒ String

Export customer loyalty balances Download a CSV file containing the balance of each customer in the loyalty program. > [!tip] If the exported CSV file is too large to view, you can > [split it into multiple files](www.google.com/search?q=split+CSV+into+multiple+files). The generated file can contain the following columns: - ‘loyaltyProgramID`: The ID of the loyalty program. - `loyaltySubledger`: The name of the subledger, when applicable. - `profileIntegrationID`: The integration ID of the customer profile. - `currentBalance`: The current point balance. - `pendingBalance`: The number of pending points. - `expiredBalance`: The number of expired points. - `spentBalance`: The number of spent points. - `currentTier`: The tier that the customer is in at the time of the export.

Parameters:

  • loyalty_program_id (String)

    The identifier for the loyalty program.

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

    the optional parameters

Options Hash (opts):

  • :end_date (Time)

    Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered. &gt; - This parameter does not affect the &#x60;currentTier&#x60; field in the CSV file, which shows the customer&#39;s tier at the time of export.

  • :balances (String)

    Filters which balance fields are included in the CSV export. &#x60;currentBalance&#x60; is always returned. By default, all balance fields are included. When this parameter is provided, only the listed fields contain values and the rest are returned empty. Accepted values: - &#x60;currentBalance&#x60; - &#x60;pendingBalance&#x60; - &#x60;expiredBalance&#x60; - &#x60;spentBalance&#x60; - &#x60;negativeBalance&#x60; Multiple values must be provided as a comma-separated list.

Returns:

  • (String)


3794
3795
3796
3797
# File 'lib/talon_one_sdk/api/management_api.rb', line 3794

def export_loyalty_balances(loyalty_program_id, opts = {})
  data, _status_code, _headers = export_loyalty_balances_with_http_info(loyalty_program_id, opts)
  data
end

#export_loyalty_balances_with_http_info(loyalty_program_id, opts = {}) ⇒ Array<(String, Integer, Hash)>

Export customer loyalty balances Download a CSV file containing the balance of each customer in the loyalty program. &gt; [!tip] If the exported CSV file is too large to view, you can &gt; [split it into multiple files](www.google.com/search?q&#x3D;split+CSV+into+multiple+files). The generated file can contain the following columns: - &#x60;loyaltyProgramID&#x60;: The ID of the loyalty program. - &#x60;loyaltySubledger&#x60;: The name of the subledger, when applicable. - &#x60;profileIntegrationID&#x60;: The integration ID of the customer profile. - &#x60;currentBalance&#x60;: The current point balance. - &#x60;pendingBalance&#x60;: The number of pending points. - &#x60;expiredBalance&#x60;: The number of expired points. - &#x60;spentBalance&#x60;: The number of spent points. - &#x60;currentTier&#x60;: The tier that the customer is in at the time of the export.

Parameters:

  • loyalty_program_id (String)

    The identifier for the loyalty program.

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

    the optional parameters

Options Hash (opts):

  • :end_date (Time)

    Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered. &gt; - This parameter does not affect the &#x60;currentTier&#x60; field in the CSV file, which shows the customer&#39;s tier at the time of export.

  • :balances (String)

    Filters which balance fields are included in the CSV export. &#x60;currentBalance&#x60; is always returned. By default, all balance fields are included. When this parameter is provided, only the listed fields contain values and the rest are returned empty. Accepted values: - &#x60;currentBalance&#x60; - &#x60;pendingBalance&#x60; - &#x60;expiredBalance&#x60; - &#x60;spentBalance&#x60; - &#x60;negativeBalance&#x60; Multiple values must be provided as a comma-separated list.

Returns:

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

    String data, response status code and response headers



3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
# File 'lib/talon_one_sdk/api/management_api.rb', line 3806

def export_loyalty_balances_with_http_info(loyalty_program_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.export_loyalty_balances ...'
  end
  # verify the required parameter 'loyalty_program_id' is set
  if @api_client.config.client_side_validation && loyalty_program_id.nil?
    fail ArgumentError, "Missing the required parameter 'loyalty_program_id' when calling ManagementApi.export_loyalty_balances"
  end
  # resource path
  local_var_path = '/v1/loyalty_programs/{loyaltyProgramId}/export_customer_balances'.sub('{loyaltyProgramId}', CGI.escape(loyalty_program_id.to_s))

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

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.export_loyalty_balances",
    :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_balances\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#export_loyalty_card_balances(loyalty_program_id, opts = {}) ⇒ String

Export all card transaction logs Download a CSV file containing the balances of all cards in the loyalty program. > [!tip] If the exported CSV file is too large to view, you can > [split it into multiple files](www.google.com/search?q=split+CSV+into+multiple+files). The CSV file contains the following columns: - ‘loyaltyProgramID`: The ID of the loyalty program. - `loyaltySubledger`: The name of the subdleger, when applicatble. - `cardIdentifier`: The identifier of the loyalty card, which must match the regular expression `^[A-Za-z0-9._%+@-]+$`. - `cardState`:The state of the loyalty card. It can be `active` or `inactive`. - `currentBalance`: The current point balance. - `pendingBalance`: The number of pending points. - `expiredBalance`: The number of expired points. - `spentBalance`: The number of spent points.

Parameters:

Options Hash (opts):

  • :end_date (Time)

    Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered.

  • :balances (String)

    Filters which balance fields are included in the CSV export. By default, all balance fields are included. When this parameter is provided, only the listed fields contain values and the rest are returned empty. Accepted values: - &#x60;currentBalance&#x60; - &#x60;pendingBalance&#x60; - &#x60;expiredBalance&#x60; - &#x60;spentBalance&#x60; - &#x60;negativeBalance&#x60; Multiple values must be provided as a comma-separated list. Note: - The &#x60;negativeBalance&#x60; value is not supported for card balance exports. - Providing an unsupported or invalid value returns a &#x60;400 Bad Request&#x60; error.

Returns:

  • (String)


3863
3864
3865
3866
# File 'lib/talon_one_sdk/api/management_api.rb', line 3863

def export_loyalty_card_balances(loyalty_program_id, opts = {})
  data, _status_code, _headers = export_loyalty_card_balances_with_http_info(loyalty_program_id, opts)
  data
end

#export_loyalty_card_balances_with_http_info(loyalty_program_id, opts = {}) ⇒ Array<(String, Integer, Hash)>

Export all card transaction logs Download a CSV file containing the balances of all cards in the loyalty program. &gt; [!tip] If the exported CSV file is too large to view, you can &gt; [split it into multiple files](www.google.com/search?q&#x3D;split+CSV+into+multiple+files). The CSV file contains the following columns: - &#x60;loyaltyProgramID&#x60;: The ID of the loyalty program. - &#x60;loyaltySubledger&#x60;: The name of the subdleger, when applicatble. - &#x60;cardIdentifier&#x60;: The identifier of the loyalty card, which must match the regular expression &#x60;^+$&#x60;. - &#x60;cardState&#x60;:The state of the loyalty card. It can be &#x60;active&#x60; or &#x60;inactive&#x60;. - &#x60;currentBalance&#x60;: The current point balance. - &#x60;pendingBalance&#x60;: The number of pending points. - &#x60;expiredBalance&#x60;: The number of expired points. - &#x60;spentBalance&#x60;: The number of spent points.

Parameters:

Options Hash (opts):

  • :end_date (Time)

    Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered.

  • :balances (String)

    Filters which balance fields are included in the CSV export. By default, all balance fields are included. When this parameter is provided, only the listed fields contain values and the rest are returned empty. Accepted values: - &#x60;currentBalance&#x60; - &#x60;pendingBalance&#x60; - &#x60;expiredBalance&#x60; - &#x60;spentBalance&#x60; - &#x60;negativeBalance&#x60; Multiple values must be provided as a comma-separated list. Note: - The &#x60;negativeBalance&#x60; value is not supported for card balance exports. - Providing an unsupported or invalid value returns a &#x60;400 Bad Request&#x60; error.

Returns:

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

    String data, response status code and response headers



3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
# File 'lib/talon_one_sdk/api/management_api.rb', line 3875

def export_loyalty_card_balances_with_http_info(loyalty_program_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.export_loyalty_card_balances ...'
  end
  # verify the required parameter 'loyalty_program_id' is set
  if @api_client.config.client_side_validation && loyalty_program_id.nil?
    fail ArgumentError, "Missing the required parameter 'loyalty_program_id' when calling ManagementApi.export_loyalty_card_balances"
  end
  # resource path
  local_var_path = '/v1/loyalty_programs/{loyaltyProgramId}/export_card_balances'.sub('{loyaltyProgramId}', CGI.escape(loyalty_program_id.to_s))

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

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.export_loyalty_card_balances",
    :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_card_balances\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#export_loyalty_card_ledger(loyalty_program_id, loyalty_card_id, range_start, range_end, opts = {}) ⇒ String

Export card’s ledger log Download a CSV file containing a loyalty card ledger log of the loyalty program. > [!tip] If the exported CSV file is too large to view, you can > [split it into multiple files](www.google.com/search?q=split+CSV+into+multiple+files).

Parameters:

  • loyalty_program_id (Integer)

    Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint.

  • loyalty_card_id (String)

    Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. Important: The loyalty card ID requires [URL encoding](www.w3schools.com/tags//ref_urlencode.asp) if it contains special characters. For example, you must encode &#x60;NewCard2026%&#x60; as &#x60;NewCard2026%25&#x60;.

  • range_start (Time)

    Only return results from after this timestamp. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered.

  • range_end (Time)

    Only return results from before this timestamp. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered.

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

    the optional parameters

Options Hash (opts):

  • :date_format (String)

    Determines the format of dates in the export document.

Returns:

  • (String)


3934
3935
3936
3937
# File 'lib/talon_one_sdk/api/management_api.rb', line 3934

def export_loyalty_card_ledger(loyalty_program_id, loyalty_card_id, range_start, range_end, opts = {})
  data, _status_code, _headers = export_loyalty_card_ledger_with_http_info(loyalty_program_id, loyalty_card_id, range_start, range_end, opts)
  data
end

#export_loyalty_card_ledger_with_http_info(loyalty_program_id, loyalty_card_id, range_start, range_end, opts = {}) ⇒ Array<(String, Integer, Hash)>

Export card&#39;s ledger log Download a CSV file containing a loyalty card ledger log of the loyalty program. &gt; [!tip] If the exported CSV file is too large to view, you can &gt; [split it into multiple files](www.google.com/search?q&#x3D;split+CSV+into+multiple+files).

Parameters:

  • loyalty_program_id (Integer)

    Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint.

  • loyalty_card_id (String)

    Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. Important: The loyalty card ID requires [URL encoding](www.w3schools.com/tags//ref_urlencode.asp) if it contains special characters. For example, you must encode &#x60;NewCard2026%&#x60; as &#x60;NewCard2026%25&#x60;.

  • range_start (Time)

    Only return results from after this timestamp. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered.

  • range_end (Time)

    Only return results from before this timestamp. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered.

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

    the optional parameters

Options Hash (opts):

  • :date_format (String)

    Determines the format of dates in the export document.

Returns:

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

    String data, response status code and response headers



3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
# File 'lib/talon_one_sdk/api/management_api.rb', line 3948

def export_loyalty_card_ledger_with_http_info(loyalty_program_id, loyalty_card_id, range_start, range_end, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.export_loyalty_card_ledger ...'
  end
  # verify the required parameter 'loyalty_program_id' is set
  if @api_client.config.client_side_validation && loyalty_program_id.nil?
    fail ArgumentError, "Missing the required parameter 'loyalty_program_id' when calling ManagementApi.export_loyalty_card_ledger"
  end
  # verify the required parameter 'loyalty_card_id' is set
  if @api_client.config.client_side_validation && loyalty_card_id.nil?
    fail ArgumentError, "Missing the required parameter 'loyalty_card_id' when calling ManagementApi.export_loyalty_card_ledger"
  end
  if @api_client.config.client_side_validation && loyalty_card_id.to_s.length > 108
    fail ArgumentError, 'invalid value for "loyalty_card_id" when calling ManagementApi.export_loyalty_card_ledger, the character length must be smaller than or equal to 108.'
  end

  if @api_client.config.client_side_validation && loyalty_card_id.to_s.length < 4
    fail ArgumentError, 'invalid value for "loyalty_card_id" when calling ManagementApi.export_loyalty_card_ledger, the character length must be greater than or equal to 4.'
  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_card_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_card_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/{loyaltyProgramId}/cards/{loyaltyCardId}/export_log'.sub('{loyaltyProgramId}', CGI.escape(loyalty_program_id.to_s)).sub('{loyaltyCardId}', CGI.escape(loyalty_card_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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.export_loyalty_card_ledger",
    :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_card_ledger\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#export_loyalty_cards(loyalty_program_id, opts = {}) ⇒ String

Export loyalty cards Download a CSV file containing the loyalty cards from a specified loyalty program. > [!tip] If the exported CSV file is too large to view, you can > [split it into multiple files](www.google.com/search?q=split+CSV+into+multiple+files). The CSV file contains the following columns: - ‘identifier`: The unique identifier of the loyalty card. - `created`: The date and time the loyalty card was created. - `status`: The status of the loyalty card. - `userpercardlimit`: The maximum number of customer profiles that can be linked to the card. - `customerprofileids`: Integration IDs of the customer profiles linked to the card. - `blockreason`: The reason for transferring and blocking the loyalty card. - `generated`: An indicator of whether the loyalty card was generated. - `batchid`: The ID of the batch the loyalty card is in. - `attributes`: The custom attributes of this loyalty card.

Parameters:

Options Hash (opts):

  • :batch_id (String)

    Filter results by loyalty card batch ID.

  • :created_before (Time)

    Only return loyalty cards created before this timestamp. Note: This must be an RFC3339 timestamp string.

  • :created_after (Time)

    Only return loyalty cards created after this timestamp. Note: This must be an RFC3339 timestamp string.

  • :date_format (String)

    Determines the format of dates in the export document.

Returns:

  • (String)


4032
4033
4034
4035
# File 'lib/talon_one_sdk/api/management_api.rb', line 4032

def export_loyalty_cards(loyalty_program_id, opts = {})
  data, _status_code, _headers = export_loyalty_cards_with_http_info(loyalty_program_id, opts)
  data
end

#export_loyalty_cards_with_http_info(loyalty_program_id, opts = {}) ⇒ Array<(String, Integer, Hash)>

Export loyalty cards Download a CSV file containing the loyalty cards from a specified loyalty program. &gt; [!tip] If the exported CSV file is too large to view, you can &gt; [split it into multiple files](www.google.com/search?q&#x3D;split+CSV+into+multiple+files). The CSV file contains the following columns: - &#x60;identifier&#x60;: The unique identifier of the loyalty card. - &#x60;created&#x60;: The date and time the loyalty card was created. - &#x60;status&#x60;: The status of the loyalty card. - &#x60;userpercardlimit&#x60;: The maximum number of customer profiles that can be linked to the card. - &#x60;customerprofileids&#x60;: Integration IDs of the customer profiles linked to the card. - &#x60;blockreason&#x60;: The reason for transferring and blocking the loyalty card. - &#x60;generated&#x60;: An indicator of whether the loyalty card was generated. - &#x60;batchid&#x60;: The ID of the batch the loyalty card is in. - &#x60;attributes&#x60;: The custom attributes of this loyalty card.

Parameters:

Options Hash (opts):

  • :batch_id (String)

    Filter results by loyalty card batch ID.

  • :created_before (Time)

    Only return loyalty cards created before this timestamp. Note: This must be an RFC3339 timestamp string.

  • :created_after (Time)

    Only return loyalty cards created after this timestamp. Note: This must be an RFC3339 timestamp string.

  • :date_format (String)

    Determines the format of dates in the export document.

Returns:

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

    String data, response status code and response headers



4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
# File 'lib/talon_one_sdk/api/management_api.rb', line 4046

def export_loyalty_cards_with_http_info(loyalty_program_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.export_loyalty_cards ...'
  end
  # verify the required parameter 'loyalty_program_id' is set
  if @api_client.config.client_side_validation && loyalty_program_id.nil?
    fail ArgumentError, "Missing the required parameter 'loyalty_program_id' when calling ManagementApi.export_loyalty_cards"
  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/{loyaltyProgramId}/cards/export'.sub('{loyaltyProgramId}', CGI.escape(loyalty_program_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'batchId'] = opts[:'batch_id'] if !opts[:'batch_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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.export_loyalty_cards",
    :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_cards\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#export_loyalty_join_dates(loyalty_program_id, opts = {}) ⇒ String

Export customers’ loyalty program join dates Download a CSV file containing the join dates of all customers in the loyalty program. > [!tip] If the exported CSV file is too large to view, you can > [split it into multiple files](www.google.com/search?q=split+CSV+into+multiple+files). The generated file can contain the following columns: - ‘loyaltyProgramID`: The ID of the loyalty program. - `profileIntegrationID`: The integration ID of the customer profile. - `joinDate`: The customer’s loyalty program join date in RFC3339 format.

Parameters:

  • loyalty_program_id (String)

    The identifier of the loyalty program.

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

    the optional parameters

Returns:

  • (String)


4107
4108
4109
4110
# File 'lib/talon_one_sdk/api/management_api.rb', line 4107

def export_loyalty_join_dates(loyalty_program_id, opts = {})
  data, _status_code, _headers = export_loyalty_join_dates_with_http_info(loyalty_program_id, opts)
  data
end

#export_loyalty_join_dates_with_http_info(loyalty_program_id, opts = {}) ⇒ Array<(String, Integer, Hash)>

Export customers&#39; loyalty program join dates Download a CSV file containing the join dates of all customers in the loyalty program. &gt; [!tip] If the exported CSV file is too large to view, you can &gt; [split it into multiple files](www.google.com/search?q&#x3D;split+CSV+into+multiple+files). The generated file can contain the following columns: - &#x60;loyaltyProgramID&#x60;: The ID of the loyalty program. - &#x60;profileIntegrationID&#x60;: The integration ID of the customer profile. - &#x60;joinDate&#x60;: The customer&#39;s loyalty program join date in RFC3339 format.

Parameters:

  • loyalty_program_id (String)

    The identifier of the loyalty program.

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

    the optional parameters

Returns:

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

    String data, response status code and response headers



4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
# File 'lib/talon_one_sdk/api/management_api.rb', line 4117

def export_loyalty_join_dates_with_http_info(loyalty_program_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.export_loyalty_join_dates ...'
  end
  # verify the required parameter 'loyalty_program_id' is set
  if @api_client.config.client_side_validation && loyalty_program_id.nil?
    fail ArgumentError, "Missing the required parameter 'loyalty_program_id' when calling ManagementApi.export_loyalty_join_dates"
  end
  # resource path
  local_var_path = '/v1/loyalty_programs/{loyaltyProgramId}/export_join_dates'.sub('{loyaltyProgramId}', CGI.escape(loyalty_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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.export_loyalty_join_dates",
    :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_join_dates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#export_loyalty_ledger(range_start, range_end, loyalty_program_id, integration_id, opts = {}) ⇒ String

Export customer’s transaction logs Download a CSV file containing a customer’s transaction logs in the loyalty program. > [!tip] If the exported CSV file is too large to view, you can > [split it into multiple files](www.google.com/search?q=split+CSV+into+multiple+files). The generated file can contain the following columns: - ‘customerprofileid`: The ID of the profile. - `customersessionid`: The ID of the customer session. - `rulesetid`: The ID of the rule set. - `rulename`: The name of the rule. - `programid`: The ID of the loyalty program. - `type`: The transaction type, such as `addition` or `subtraction`. - `name`: The reason for the transaction. - `subledgerid`: The ID of the subledger, when applicable. - `startdate`: The start date of the program. - `expirydate`: The expiration date of the program. - `id`: The ID of the transaction. - `created`: The timestamp of the creation of the loyalty program. - `amount`: The number of points in that transaction. - `archived`: Whether the session related to the transaction is archived. - `campaignid`: The ID of the campaign. - `flags`: The flags of the transaction, when applicable. The `createsNegativeBalance` flag indicates whether the transaction results in a negative balance. - `transactionUUID`: Unique identifier of the transaction in the UUID format.

Parameters:

  • range_start (Time)

    Only return results from after this timestamp. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered.

  • range_end (Time)

    Only return results from before this timestamp. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered.

  • loyalty_program_id (String)

    The identifier for the loyalty program.

  • integration_id (String)

    The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier.

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

    the optional parameters

Options Hash (opts):

  • :date_format (String)

    Determines the format of dates in the export document.

Returns:

  • (String)


4174
4175
4176
4177
# File 'lib/talon_one_sdk/api/management_api.rb', line 4174

def export_loyalty_ledger(range_start, range_end, loyalty_program_id, integration_id, opts = {})
  data, _status_code, _headers = export_loyalty_ledger_with_http_info(range_start, range_end, loyalty_program_id, integration_id, opts)
  data
end

#export_loyalty_ledger_with_http_info(range_start, range_end, loyalty_program_id, integration_id, opts = {}) ⇒ Array<(String, Integer, Hash)>

Export customer&#39;s transaction logs Download a CSV file containing a customer&#39;s transaction logs in the loyalty program. &gt; [!tip] If the exported CSV file is too large to view, you can &gt; [split it into multiple files](www.google.com/search?q&#x3D;split+CSV+into+multiple+files). The generated file can contain the following columns: - &#x60;customerprofileid&#x60;: The ID of the profile. - &#x60;customersessionid&#x60;: The ID of the customer session. - &#x60;rulesetid&#x60;: The ID of the rule set. - &#x60;rulename&#x60;: The name of the rule. - &#x60;programid&#x60;: The ID of the loyalty program. - &#x60;type&#x60;: The transaction type, such as &#x60;addition&#x60; or &#x60;subtraction&#x60;. - &#x60;name&#x60;: The reason for the transaction. - &#x60;subledgerid&#x60;: The ID of the subledger, when applicable. - &#x60;startdate&#x60;: The start date of the program. - &#x60;expirydate&#x60;: The expiration date of the program. - &#x60;id&#x60;: The ID of the transaction. - &#x60;created&#x60;: The timestamp of the creation of the loyalty program. - &#x60;amount&#x60;: The number of points in that transaction. - &#x60;archived&#x60;: Whether the session related to the transaction is archived. - &#x60;campaignid&#x60;: The ID of the campaign. - &#x60;flags&#x60;: The flags of the transaction, when applicable. The &#x60;createsNegativeBalance&#x60; flag indicates whether the transaction results in a negative balance. - &#x60;transactionUUID&#x60;: Unique identifier of the transaction in the UUID format.

Parameters:

  • range_start (Time)

    Only return results from after this timestamp. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered.

  • range_end (Time)

    Only return results from before this timestamp. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered.

  • loyalty_program_id (String)

    The identifier for the loyalty program.

  • integration_id (String)

    The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier.

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

    the optional parameters

Options Hash (opts):

  • :date_format (String)

    Determines the format of dates in the export document.

Returns:

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

    String data, response status code and response headers



4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
# File 'lib/talon_one_sdk/api/management_api.rb', line 4188

def export_loyalty_ledger_with_http_info(range_start, range_end, loyalty_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 'loyalty_program_id' is set
  if @api_client.config.client_side_validation && loyalty_program_id.nil?
    fail ArgumentError, "Missing the required parameter 'loyalty_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/{loyaltyProgramId}/profile/{integrationId}/export_log'.sub('{loyaltyProgramId}', CGI.escape(loyalty_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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.export_loyalty_ledger",
    :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

#export_pool_giveaways(pool_id, opts = {}) ⇒ String

Export giveaway codes of a giveaway pool Download a CSV file containing the giveaway codes of a specific giveaway pool. > [!tip] If the exported CSV file is too large to view, you can > [split it into multiple files](www.google.com/search?q=split+CSV+into+multiple+files). The CSV file contains the following columns: - ‘id`: The internal ID of the giveaway. - `poolid`: The internal ID of the giveaway pool. - `code`: The giveaway code. - `startdate`: The validity start date in RFC3339 of the giveaway (can be empty). - `enddate`: The validity end date in RFC3339 of the giveaway (can be empty). - `attributes`: Any custom attributes associated with the giveaway code (can be empty). - `used`: An indication of whether the giveaway is already awarded. - `importid`: The ID of the import which created the giveaway. - `created`: The creation time of the giveaway code. - `profileintegrationid`: The third-party integration ID of the customer profile that was awarded the giveaway. Can be empty if the giveaway was not awarded. - `profileid`: The internal ID of the customer profile that was awarded the giveaway. Can be empty if the giveaway was not awarded or an internal ID does not exist.

Parameters:

  • pool_id (Integer)

    The ID of the pool. You can find it in the Campaign Manager, in the Giveaways section.

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

    the optional parameters

Options Hash (opts):

  • :created_before (Time)

    Timestamp that filters the results to only contain giveaways created before this date. Must be an RFC3339 timestamp string.

  • :created_after (Time)

    Timestamp that filters the results to only contain giveaways created after this date. Must be an RFC3339 timestamp string.

Returns:

  • (String)


4262
4263
4264
4265
# File 'lib/talon_one_sdk/api/management_api.rb', line 4262

def export_pool_giveaways(pool_id, opts = {})
  data, _status_code, _headers = export_pool_giveaways_with_http_info(pool_id, opts)
  data
end

#export_pool_giveaways_with_http_info(pool_id, opts = {}) ⇒ Array<(String, Integer, Hash)>

Export giveaway codes of a giveaway pool Download a CSV file containing the giveaway codes of a specific giveaway pool. &gt; [!tip] If the exported CSV file is too large to view, you can &gt; [split it into multiple files](www.google.com/search?q&#x3D;split+CSV+into+multiple+files). The CSV file contains the following columns: - &#x60;id&#x60;: The internal ID of the giveaway. - &#x60;poolid&#x60;: The internal ID of the giveaway pool. - &#x60;code&#x60;: The giveaway code. - &#x60;startdate&#x60;: The validity start date in RFC3339 of the giveaway (can be empty). - &#x60;enddate&#x60;: The validity end date in RFC3339 of the giveaway (can be empty). - &#x60;attributes&#x60;: Any custom attributes associated with the giveaway code (can be empty). - &#x60;used&#x60;: An indication of whether the giveaway is already awarded. - &#x60;importid&#x60;: The ID of the import which created the giveaway. - &#x60;created&#x60;: The creation time of the giveaway code. - &#x60;profileintegrationid&#x60;: The third-party integration ID of the customer profile that was awarded the giveaway. Can be empty if the giveaway was not awarded. - &#x60;profileid&#x60;: The internal ID of the customer profile that was awarded the giveaway. Can be empty if the giveaway was not awarded or an internal ID does not exist.

Parameters:

  • pool_id (Integer)

    The ID of the pool. You can find it in the Campaign Manager, in the Giveaways section.

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

    the optional parameters

Options Hash (opts):

  • :created_before (Time)

    Timestamp that filters the results to only contain giveaways created before this date. Must be an RFC3339 timestamp string.

  • :created_after (Time)

    Timestamp that filters the results to only contain giveaways created after this date. Must be an RFC3339 timestamp string.

Returns:

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

    String data, response status code and response headers



4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
# File 'lib/talon_one_sdk/api/management_api.rb', line 4274

def export_pool_giveaways_with_http_info(pool_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.export_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.export_pool_giveaways"
  end
  # resource path
  local_var_path = '/v1/giveaways/pools/{poolId}/export'.sub('{poolId}', CGI.escape(pool_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?

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.export_pool_giveaways",
    :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_pool_giveaways\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#export_referrals(application_id, opts = {}) ⇒ String

Export referrals Download a CSV file containing the referrals that match the given parameters. > [!tip] If the exported CSV file is too large to view, you can > [split it into multiple files](www.google.com/search?q=split+CSV+into+multiple+files). The CSV file contains the following columns: - ‘code`: The referral code. - `advocateprofileintegrationid`: 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 number of redemptions of this code. Defaults to `1` when left blank. - `attributes`: A json object describing custom referral attribute names and their values.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

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

    the optional parameters

Options Hash (opts):

  • :campaign_id (Float)

    Filter results by campaign ID.

  • :created_before (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :created_after (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :valid (String)
    • &#x60;expired&#x60;: Matches referrals in which the expiration date is set and in the past. - &#x60;validNow&#x60;: Matches referrals in which start date is null or in the past and expiration date is null or in the future. - &#x60;validFuture&#x60;: Matches referrals in which start date is set and in the future.

  • :usable (String)
    • &#x60;true&#x60;, only referrals where &#x60;usageCounter &lt; usageLimit&#x60; will be returned. - &#x60;false&#x60;, only referrals where &#x60;usageCounter &gt;&#x3D; usageLimit&#x60; will be returned.

  • :batch_id (String)

    Filter results by batches of referrals

  • :date_format (String)

    Determines the format of dates in the export document.

Returns:

  • (String)


4336
4337
4338
4339
# File 'lib/talon_one_sdk/api/management_api.rb', line 4336

def export_referrals(application_id, opts = {})
  data, _status_code, _headers = export_referrals_with_http_info(application_id, opts)
  data
end

#export_referrals_with_http_info(application_id, opts = {}) ⇒ Array<(String, Integer, Hash)>

Export referrals Download a CSV file containing the referrals that match the given parameters. &gt; [!tip] If the exported CSV file is too large to view, you can &gt; [split it into multiple files](www.google.com/search?q&#x3D;split+CSV+into+multiple+files). The CSV file contains the following columns: - &#x60;code&#x60;: The referral code. - &#x60;advocateprofileintegrationid&#x60;: 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 number of redemptions of this code. Defaults to &#x60;1&#x60; when left blank. - &#x60;attributes&#x60;: A json object describing custom referral attribute names and their values.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

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

    the optional parameters

Options Hash (opts):

  • :campaign_id (Float)

    Filter results by campaign ID.

  • :created_before (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :created_after (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :valid (String)
    • &#x60;expired&#x60;: Matches referrals in which the expiration date is set and in the past. - &#x60;validNow&#x60;: Matches referrals in which start date is null or in the past and expiration date is null or in the future. - &#x60;validFuture&#x60;: Matches referrals in which start date is set and in the future.

  • :usable (String)
    • &#x60;true&#x60;, only referrals where &#x60;usageCounter &lt; usageLimit&#x60; will be returned. - &#x60;false&#x60;, only referrals where &#x60;usageCounter &gt;&#x3D; usageLimit&#x60; will be returned.

  • :batch_id (String)

    Filter results by batches of referrals

  • :date_format (String)

    Determines the format of dates in the export document.

Returns:

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

    String data, response status code and response headers



4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
# File 'lib/talon_one_sdk/api/management_api.rb', line 4353

def export_referrals_with_http_info(application_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.export_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.export_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
  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_referrals'.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[:'valid'] = opts[:'valid'] if !opts[:'valid'].nil?
  query_params[:'usable'] = opts[:'usable'] if !opts[:'usable'].nil?
  query_params[:'batchId'] = opts[:'batch_id'] if !opts[:'batch_id'].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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.export_referrals",
    :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_referrals\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#generate_coupon_rejections(session_integration_id, opts = {}) ⇒ GenerateCouponRejections200Response

Summarize coupon redemption failures in session Create a summary of the reasons for coupon redemption failures in a given customer session.

Parameters:

  • session_integration_id (String)

    The integration ID of the session to summarize.

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

    the optional parameters

Options Hash (opts):

  • :application_id (Float)

    Filter results by Application ID.

  • :language (String)

    The [ISO-639](en.wikipedia.org/wiki/List_of_ISO_639_language_codes) code of the language in which the summary will be generated.

  • :coupon_code (String)

    The coupon code for which to get the rejection reason.

Returns:



4428
4429
4430
4431
# File 'lib/talon_one_sdk/api/management_api.rb', line 4428

def generate_coupon_rejections(session_integration_id, opts = {})
  data, _status_code, _headers = generate_coupon_rejections_with_http_info(session_integration_id, opts)
  data
end

#generate_coupon_rejections_with_http_info(session_integration_id, opts = {}) ⇒ Array<(GenerateCouponRejections200Response, Integer, Hash)>

Summarize coupon redemption failures in session Create a summary of the reasons for coupon redemption failures in a given customer session.

Parameters:

  • session_integration_id (String)

    The integration ID of the session to summarize.

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

    the optional parameters

Options Hash (opts):

  • :application_id (Float)

    Filter results by Application ID.

  • :language (String)

    The [ISO-639](en.wikipedia.org/wiki/List_of_ISO_639_language_codes) code of the language in which the summary will be generated.

  • :coupon_code (String)

    The coupon code for which to get the rejection reason.

Returns:



4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
# File 'lib/talon_one_sdk/api/management_api.rb', line 4441

def generate_coupon_rejections_with_http_info(session_integration_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.generate_coupon_rejections ...'
  end
  # verify the required parameter 'session_integration_id' is set
  if @api_client.config.client_side_validation && session_integration_id.nil?
    fail ArgumentError, "Missing the required parameter 'session_integration_id' when calling ManagementApi.generate_coupon_rejections"
  end
  # resource path
  local_var_path = '/v1/coupon_rejections'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'sessionIntegrationId'] = session_integration_id
  query_params[:'applicationId'] = opts[:'application_id'] if !opts[:'application_id'].nil?
  query_params[:'language'] = opts[:'language'] if !opts[:'language'].nil?
  query_params[:'couponCode'] = opts[:'coupon_code'] if !opts[:'coupon_code'].nil?

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.generate_coupon_rejections",
    :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#generate_coupon_rejections\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 = {}) ⇒ GetAccessLogsWithoutTotalCount200Response

Get access logs for Application Retrieve the list of API calls sent to the specified Application.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • range_start (Time)

    Only return results from after this timestamp. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered.

  • range_end (Time)

    Only return results from before this timestamp. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered.

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

    the optional parameters

Options Hash (opts):

  • :path (String)

    Only return results where the request path matches the given regular expression.

  • :method (String)

    Only return results where the request method matches the given regular expression.

  • :status (String)

    Filter results by HTTP status codes.

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

Returns:



4506
4507
4508
4509
# File 'lib/talon_one_sdk/api/management_api.rb', line 4506

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 = {}) ⇒ Array<(GetAccessLogsWithoutTotalCount200Response, Integer, Hash)>

Get access logs for Application Retrieve the list of API calls sent to the specified Application.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • range_start (Time)

    Only return results from after this timestamp. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered.

  • range_end (Time)

    Only return results from before this timestamp. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered.

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

    the optional parameters

Options Hash (opts):

  • :path (String)

    Only return results where the request path matches the given regular expression.

  • :method (String)

    Only return results where the request method matches the given regular expression.

  • :status (String)

    Filter results by HTTP status codes.

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

Returns:



4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
# File 'lib/talon_one_sdk/api/management_api.rb', line 4524

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
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_access_logs_without_total_count, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_access_logs_without_total_count, must be greater than or equal to 1.'
  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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_access_logs_without_total_count",
    :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 = {}) ⇒ Account

Get account details Return the details of your companies Talon.One account.

Parameters:

Returns:



4609
4610
4611
4612
# File 'lib/talon_one_sdk/api/management_api.rb', line 4609

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

#get_account_analytics(account_id, opts = {}) ⇒ AccountAnalytics

Get account analytics Return the analytics of your Talon.One account.

Parameters:

Returns:



4672
4673
4674
4675
# File 'lib/talon_one_sdk/api/management_api.rb', line 4672

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

#get_account_analytics_with_http_info(account_id, opts = {}) ⇒ Array<(AccountAnalytics, Integer, Hash)>

Get account analytics Return the analytics of your Talon.One account.

Parameters:

Returns:

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

    AccountAnalytics data, response status code and response headers



4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
# File 'lib/talon_one_sdk/api/management_api.rb', line 4682

def (, 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 && .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(.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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_account_analytics",
    :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_collection(collection_id, opts = {}) ⇒ Collection

Get account-level collection Retrieve a given account-level collection.

Parameters:

  • collection_id (Integer)

    The ID of the collection. You can get it with the [List collections in account](#tag/Collections/operation/listAccountCollections) endpoint.

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

    the optional parameters

Returns:



4735
4736
4737
4738
# File 'lib/talon_one_sdk/api/management_api.rb', line 4735

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

#get_account_collection_with_http_info(collection_id, opts = {}) ⇒ Array<(Collection, Integer, Hash)>

Get account-level collection Retrieve a given account-level collection.

Parameters:

  • collection_id (Integer)

    The ID of the collection. You can get it with the [List collections in account](#tag/Collections/operation/listAccountCollections) endpoint.

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

    the optional parameters

Returns:

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

    Collection data, response status code and response headers



4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
# File 'lib/talon_one_sdk/api/management_api.rb', line 4745

def (collection_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_account_collection ...'
  end
  # verify the required parameter 'collection_id' is set
  if @api_client.config.client_side_validation && collection_id.nil?
    fail ArgumentError, "Missing the required parameter 'collection_id' when calling ManagementApi.get_account_collection"
  end
  # resource path
  local_var_path = '/v1/collections/{collectionId}'.sub('{collectionId}', CGI.escape(collection_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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_account_collection",
    :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_collection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_account_with_http_info(account_id, opts = {}) ⇒ Array<(Account, Integer, Hash)>

Get account details Return the details of your companies Talon.One account.

Parameters:

Returns:

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

    Account data, response status code and response headers



4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
# File 'lib/talon_one_sdk/api/management_api.rb', line 4619

def (, 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 && .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(.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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_account",
    :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_achievement(application_id, campaign_id, achievement_id, opts = {}) ⇒ Achievement

Get achievement Get the details of a specific achievement.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • achievement_id (Integer)

    The ID of the achievement. You can get this ID with the [List achievement](docs.talon.one/management-api#tag/Achievements/operation/listAchievements) endpoint.

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

    the optional parameters

Returns:



4800
4801
4802
4803
# File 'lib/talon_one_sdk/api/management_api.rb', line 4800

def get_achievement(application_id, campaign_id, achievement_id, opts = {})
  data, _status_code, _headers = get_achievement_with_http_info(application_id, campaign_id, achievement_id, opts)
  data
end

#get_achievement_with_http_info(application_id, campaign_id, achievement_id, opts = {}) ⇒ Array<(Achievement, Integer, Hash)>

Get achievement Get the details of a specific achievement.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • achievement_id (Integer)

    The ID of the achievement. You can get this ID with the [List achievement](docs.talon.one/management-api#tag/Achievements/operation/listAchievements) endpoint.

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

    the optional parameters

Returns:

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

    Achievement data, response status code and response headers



4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
# File 'lib/talon_one_sdk/api/management_api.rb', line 4812

def get_achievement_with_http_info(application_id, campaign_id, achievement_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_achievement ...'
  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_achievement"
  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_achievement"
  end
  # verify the required parameter 'achievement_id' is set
  if @api_client.config.client_side_validation && achievement_id.nil?
    fail ArgumentError, "Missing the required parameter 'achievement_id' when calling ManagementApi.get_achievement"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/achievements/{achievementId}'.sub('{applicationId}', CGI.escape(application_id.to_s)).sub('{campaignId}', CGI.escape(campaign_id.to_s)).sub('{achievementId}', CGI.escape(achievement_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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_achievement",
    :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_achievement\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_additional_cost(additional_cost_id, opts = {}) ⇒ AccountAdditionalCost

Get additional cost Returns the additional cost.

Parameters:

  • additional_cost_id (Integer)

    The ID of the additional cost. You can find the ID the the Campaign Manager&#39;s URL when you display the details of the cost in Account &gt; Tools &gt; **Additional costs**.

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

    the optional parameters

Returns:



4873
4874
4875
4876
# File 'lib/talon_one_sdk/api/management_api.rb', line 4873

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 = {}) ⇒ Array<(AccountAdditionalCost, Integer, Hash)>

Get additional cost Returns the additional cost.

Parameters:

  • additional_cost_id (Integer)

    The ID of the additional cost. You can find the ID the the Campaign Manager&#39;s URL when you display the details of the cost in Account &gt; Tools &gt; **Additional costs**.

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

    the optional parameters

Returns:

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

    AccountAdditionalCost data, response status code and response headers



4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
# File 'lib/talon_one_sdk/api/management_api.rb', line 4883

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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_additional_cost",
    :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 = {}) ⇒ GetAdditionalCosts200Response

List additional costs Returns all the defined additional costs for the account.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

Returns:



4938
4939
4940
4941
# File 'lib/talon_one_sdk/api/management_api.rb', line 4938

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 = {}) ⇒ Array<(GetAdditionalCosts200Response, Integer, Hash)>

List additional costs Returns all the defined additional costs for the account.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

Returns:



4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
# File 'lib/talon_one_sdk/api/management_api.rb', line 4950

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
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_additional_costs, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_additional_costs, must be greater than or equal to 1.'
  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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_additional_costs",
    :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_application(application_id, opts = {}) ⇒ Application

Get Application Get the Application specified by the ID.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

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

    the optional parameters

Returns:



5010
5011
5012
5013
# File 'lib/talon_one_sdk/api/management_api.rb', line 5010

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 = {}) ⇒ ApplicationApiHealth

Get Application health Display the health of the Application and show the last time the Application was used. You can also find this information in the Campaign Manager. In your Application, click Settings > **Integration API Keys**. See the [docs](docs.talon.one/docs/dev/tutorials/monitoring-integration-status).

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

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

    the optional parameters

Returns:



5073
5074
5075
5076
# File 'lib/talon_one_sdk/api/management_api.rb', line 5073

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 = {}) ⇒ Array<(ApplicationApiHealth, Integer, Hash)>

Get Application health Display the health of the Application and show the last time the Application was used. You can also find this information in the Campaign Manager. In your Application, click Settings &gt; **Integration API Keys**. See the [docs](docs.talon.one/docs/dev/tutorials/monitoring-integration-status).

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

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

    the optional parameters

Returns:

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

    ApplicationApiHealth data, response status code and response headers



5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
# File 'lib/talon_one_sdk/api/management_api.rb', line 5083

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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_application_api_health",
    :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_cart_item_filter_expression(application_id, cart_item_filter_id, expression_id, opts = {}) ⇒ ApplicationCIFExpression

Get Application cart item filter expression Get an Application cart item filter expression for a specific Application.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • cart_item_filter_id (Integer)

    The ID of the Application cart item filter. You can get this ID with the [List Application cart item filters](docs.talon.one/management-api#tag/Applications/operation/listApplicationCartItemFilters) endpoint.

  • expression_id (Integer)

    The ID of the Application cart item filter expression.

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

    the optional parameters

Returns:



5138
5139
5140
5141
# File 'lib/talon_one_sdk/api/management_api.rb', line 5138

def get_application_cart_item_filter_expression(application_id, cart_item_filter_id, expression_id, opts = {})
  data, _status_code, _headers = get_application_cart_item_filter_expression_with_http_info(application_id, cart_item_filter_id, expression_id, opts)
  data
end

#get_application_cart_item_filter_expression_with_http_info(application_id, cart_item_filter_id, expression_id, opts = {}) ⇒ Array<(ApplicationCIFExpression, Integer, Hash)>

Get Application cart item filter expression Get an Application cart item filter expression for a specific Application.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • cart_item_filter_id (Integer)

    The ID of the Application cart item filter. You can get this ID with the [List Application cart item filters](docs.talon.one/management-api#tag/Applications/operation/listApplicationCartItemFilters) endpoint.

  • expression_id (Integer)

    The ID of the Application cart item filter expression.

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

    the optional parameters

Returns:

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

    ApplicationCIFExpression data, response status code and response headers



5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
# File 'lib/talon_one_sdk/api/management_api.rb', line 5150

def get_application_cart_item_filter_expression_with_http_info(application_id, cart_item_filter_id, expression_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_application_cart_item_filter_expression ...'
  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_cart_item_filter_expression"
  end
  # verify the required parameter 'cart_item_filter_id' is set
  if @api_client.config.client_side_validation && cart_item_filter_id.nil?
    fail ArgumentError, "Missing the required parameter 'cart_item_filter_id' when calling ManagementApi.get_application_cart_item_filter_expression"
  end
  # verify the required parameter 'expression_id' is set
  if @api_client.config.client_side_validation && expression_id.nil?
    fail ArgumentError, "Missing the required parameter 'expression_id' when calling ManagementApi.get_application_cart_item_filter_expression"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/cart_item_filters/{cartItemFilterId}/expressions/{expressionId}'.sub('{applicationId}', CGI.escape(application_id.to_s)).sub('{cartItemFilterId}', CGI.escape(cart_item_filter_id.to_s)).sub('{expressionId}', CGI.escape(expression_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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_application_cart_item_filter_expression",
    :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_cart_item_filter_expression\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_application_customer(application_id, customer_id, opts = {}) ⇒ ApplicationCustomer

Get application’s customer Retrieve the customers of the specified application.

Parameters:

Returns:



5212
5213
5214
5215
# File 'lib/talon_one_sdk/api/management_api.rb', line 5212

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_friends(application_id, integration_id, opts = {}) ⇒ GetApplicationCustomerFriends200Response

List friends referred by customer profile List the friends referred by the specified customer profile in this Application.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • integration_id (String)

    The Integration ID of the Advocate&#39;s Profile.

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

  • :with_total_result_size (Boolean)

    When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When &#x60;true&#x60;: &#x60;totalResultSize&#x60; contains the total number of results for this query. - When &#x60;false&#x60;: Only &#x60;hasMore&#x60; is returned, and it is set to &#x60;true&#x60; when there are more results than shown on the page.

Returns:



5285
5286
5287
5288
# File 'lib/talon_one_sdk/api/management_api.rb', line 5285

def get_application_customer_friends(application_id, integration_id, opts = {})
  data, _status_code, _headers = get_application_customer_friends_with_http_info(application_id, integration_id, opts)
  data
end

#get_application_customer_friends_with_http_info(application_id, integration_id, opts = {}) ⇒ Array<(GetApplicationCustomerFriends200Response, Integer, Hash)>

List friends referred by customer profile List the friends referred by the specified customer profile in this Application.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • integration_id (String)

    The Integration ID of the Advocate&#39;s Profile.

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

  • :with_total_result_size (Boolean)

    When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When &#x60;true&#x60;: &#x60;totalResultSize&#x60; contains the total number of results for this query. - When &#x60;false&#x60;: Only &#x60;hasMore&#x60; is returned, and it is set to &#x60;true&#x60; when there are more results than shown on the page.

Returns:



5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
# File 'lib/talon_one_sdk/api/management_api.rb', line 5300

def get_application_customer_friends_with_http_info(application_id, integration_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_application_customer_friends ...'
  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_friends"
  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_application_customer_friends"
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_application_customer_friends, must be smaller than or equal to 1000.'
  end

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

  # resource path
  local_var_path = '/v1/applications/{applicationId}/profile/{integrationId}/friends'.sub('{applicationId}', CGI.escape(application_id.to_s)).sub('{integrationId}', CGI.escape(integration_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[:'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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_application_customer_friends",
    :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_friends\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_application_customer_with_http_info(application_id, customer_id, opts = {}) ⇒ Array<(ApplicationCustomer, Integer, Hash)>

Get application&#39;s customer Retrieve the customers of the specified application.

Parameters:

Returns:

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

    ApplicationCustomer data, response status code and response headers



5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
# File 'lib/talon_one_sdk/api/management_api.rb', line 5223

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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_application_customer",
    :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 = {}) ⇒ GetApplicationCustomers200Response

List application’s customers List all the customers of the specified application.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

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

    the optional parameters

Options Hash (opts):

  • :integration_id (String)

    Filter results performing an exact matching against the profile integration identifier.

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :with_total_result_size (Boolean)

    When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When &#x60;true&#x60;: &#x60;totalResultSize&#x60; contains the total number of results for this query. - When &#x60;false&#x60;: Only &#x60;hasMore&#x60; is returned, and it is set to &#x60;true&#x60; when there are more results than shown on the page.

Returns:



5373
5374
5375
5376
# File 'lib/talon_one_sdk/api/management_api.rb', line 5373

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(application_id, customer_profile_search_query, opts = {}) ⇒ GetApplicationCustomersByAttributes200Response

List application customers matching the given attributes Get a list of the application customers matching the provided criteria. 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.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • customer_profile_search_query (CustomerProfileSearchQuery)

    body

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :with_total_result_size (Boolean)

    When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When &#x60;true&#x60;: &#x60;totalResultSize&#x60; contains the total number of results for this query. - When &#x60;false&#x60;: Only &#x60;hasMore&#x60; is returned, and it is set to &#x60;true&#x60; when there are more results than shown on the page.

Returns:



5456
5457
5458
5459
# File 'lib/talon_one_sdk/api/management_api.rb', line 5456

def get_application_customers_by_attributes(application_id, customer_profile_search_query, opts = {})
  data, _status_code, _headers = get_application_customers_by_attributes_with_http_info(application_id, customer_profile_search_query, opts)
  data
end

#get_application_customers_by_attributes_with_http_info(application_id, customer_profile_search_query, opts = {}) ⇒ Array<(GetApplicationCustomersByAttributes200Response, Integer, Hash)>

List application customers matching the given attributes Get a list of the application customers matching the provided criteria. 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.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • customer_profile_search_query (CustomerProfileSearchQuery)

    body

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :with_total_result_size (Boolean)

    When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When &#x60;true&#x60;: &#x60;totalResultSize&#x60; contains the total number of results for this query. - When &#x60;false&#x60;: Only &#x60;hasMore&#x60; is returned, and it is set to &#x60;true&#x60; when there are more results than shown on the page.

Returns:



5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
# File 'lib/talon_one_sdk/api/management_api.rb', line 5470

def get_application_customers_by_attributes_with_http_info(application_id, customer_profile_search_query, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_application_customers_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_application_customers_by_attributes"
  end
  # verify the required parameter 'customer_profile_search_query' is set
  if @api_client.config.client_side_validation && customer_profile_search_query.nil?
    fail ArgumentError, "Missing the required parameter 'customer_profile_search_query' when calling ManagementApi.get_application_customers_by_attributes"
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_application_customers_by_attributes, must be smaller than or equal to 1000.'
  end

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

  # resource path
  local_var_path = '/v1/applications/{applicationId}/customer_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[:'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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_application_customers_by_attributes",
    :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 = {}) ⇒ Array<(GetApplicationCustomers200Response, Integer, Hash)>

List application&#39;s customers List all the customers of the specified application.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

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

    the optional parameters

Options Hash (opts):

  • :integration_id (String)

    Filter results performing an exact matching against the profile integration identifier.

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :with_total_result_size (Boolean)

    When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When &#x60;true&#x60;: &#x60;totalResultSize&#x60; contains the total number of results for this query. - When &#x60;false&#x60;: Only &#x60;hasMore&#x60; is returned, and it is set to &#x60;true&#x60; when there are more results than shown on the page.

Returns:



5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
# File 'lib/talon_one_sdk/api/management_api.rb', line 5387

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
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_application_customers, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_application_customers, must be greater than or equal to 1.'
  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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_application_customers",
    :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 = {}) ⇒ GetApplicationEventTypes200Response

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](docs.talon.one/integration-api#tag/Events/operation/trackEventV2)

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

Returns:



5546
5547
5548
5549
# File 'lib/talon_one_sdk/api/management_api.rb', line 5546

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 = {}) ⇒ Array<(GetApplicationEventTypes200Response, Integer, Hash)>

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](docs.talon.one/integration-api#tag/Events/operation/trackEventV2)

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

Returns:



5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
# File 'lib/talon_one_sdk/api/management_api.rb', line 5559

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
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_application_event_types, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_application_event_types, must be greater than or equal to 1.'
  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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_application_event_types",
    :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_without_total_count(application_id, opts = {}) ⇒ GetApplicationEventsWithoutTotalCount200Response

List Applications events Lists all events recorded for an application. Instead of having the total number of results in the response, this endpoint only mentions whether there are more results.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

  • :type (String)

    Comma-separated list of types by which to filter events. Must be exact match(es).

  • :created_before (Time)

    Only return events created before this date. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :created_after (Time)

    Only return events created after this date. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :session (String)

    Session integration ID filter for events. Must be exact match.

  • :profile (String)

    Profile integration ID filter for events. Must be exact match.

  • :customer_name (String)

    Customer name filter for events. Will match substrings case-insensitively.

  • :customer_email (String)

    Customer e-mail address filter for events. Will match substrings case-insensitively.

  • :coupon_code (String)

    Coupon code

  • :referral_code (String)

    Referral code

  • :rule_query (String)

    Rule name filter for events

  • :campaign_query (String)

    Campaign name filter for events

  • :effect_type (String)

    The type of effect that was triggered. See [API effects](docs.talon.one/docs/dev/integration-api/api-effects).

Returns:



5638
5639
5640
5641
# File 'lib/talon_one_sdk/api/management_api.rb', line 5638

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 = {}) ⇒ Array<(GetApplicationEventsWithoutTotalCount200Response, Integer, Hash)>

List Applications events Lists all events recorded for an application. Instead of having the total number of results in the response, this endpoint only mentions whether there are more results.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

  • :type (String)

    Comma-separated list of types by which to filter events. Must be exact match(es).

  • :created_before (Time)

    Only return events created before this date. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :created_after (Time)

    Only return events created after this date. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :session (String)

    Session integration ID filter for events. Must be exact match.

  • :profile (String)

    Profile integration ID filter for events. Must be exact match.

  • :customer_name (String)

    Customer name filter for events. Will match substrings case-insensitively.

  • :customer_email (String)

    Customer e-mail address filter for events. Will match substrings case-insensitively.

  • :coupon_code (String)

    Coupon code

  • :referral_code (String)

    Referral code

  • :rule_query (String)

    Rule name filter for events

  • :campaign_query (String)

    Campaign name filter for events

  • :effect_type (String)

    The type of effect that was triggered. See [API effects](docs.talon.one/docs/dev/integration-api/api-effects).

Returns:



5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
# File 'lib/talon_one_sdk/api/management_api.rb', line 5663

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[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_application_events_without_total_count, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_application_events_without_total_count, must be greater than or equal to 1.'
  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 greater 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 greater 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?
  query_params[:'effectType'] = opts[:'effect_type'] if !opts[:'effect_type'].nil?

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_application_events_without_total_count",
    :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 = {}) ⇒ ApplicationSession

Get Application session Get the details of the given session. You can list the sessions with the [List Application sessions](docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint.

Parameters:

Returns:



5748
5749
5750
5751
# File 'lib/talon_one_sdk/api/management_api.rb', line 5748

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 = {}) ⇒ Array<(ApplicationSession, Integer, Hash)>

Get Application session Get the details of the given session. You can list the sessions with the [List Application sessions](docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint.

Parameters:

Returns:

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

    ApplicationSession data, response status code and response headers



5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
# File 'lib/talon_one_sdk/api/management_api.rb', line 5759

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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_application_session",
    :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 = {}) ⇒ GetApplicationSessions200Response

List Application sessions List all the sessions of the specified Application.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

  • :partial_match (Boolean)

    Enables partial matching for a single text search field. When enabled, the search term matches anywhere within the field value (case-insensitive). Minimum 3 characters required for partial matches; shorter inputs automatically fall back to exact match. Note: Use with one of: &#x60;integrationId&#x60;, &#x60;profile&#x60;, &#x60;coupon&#x60;, &#x60;referral&#x60;, or &#x60;storeIntegrationId&#x60;. (default to false)

  • :profile (String)

    Filter by sessions with this profile integration ID. By default, requires exact match. Use &#x60;partialMatch&#x3D;true&#x60; to search for partial matches (minimum 3 characters).

  • :state (String)

    Filter by sessions with this state. Must be exact match.

  • :created_before (Time)

    Only return events created before this date. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :created_after (Time)

    Only return events created after this date. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :coupon (String)

    Filter by sessions with this coupon. By default, requires exact match. Use &#x60;partialMatch&#x3D;true&#x60; to search for partial matches (minimum 3 characters).

  • :referral (String)

    Filter by sessions with this referral. By default, requires exact match. Use &#x60;partialMatch&#x3D;true&#x60; to search for partial matches (minimum 3 characters).

  • :integration_id (String)

    Filter by sessions with this integration ID. By default, requires exact match. Use &#x60;partialMatch&#x3D;true&#x60; to search for partial matches (minimum 3 characters).

  • :store_integration_id (String)

    The integration ID of the store. You choose this ID when you create a store. By default, requires exact match. Use &#x60;partialMatch&#x3D;true&#x60; to search for partial matches (minimum 3 characters).

Returns:



5828
5829
5830
5831
# File 'lib/talon_one_sdk/api/management_api.rb', line 5828

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 = {}) ⇒ Array<(GetApplicationSessions200Response, Integer, Hash)>

List Application sessions List all the sessions of the specified Application.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

  • :partial_match (Boolean)

    Enables partial matching for a single text search field. When enabled, the search term matches anywhere within the field value (case-insensitive). Minimum 3 characters required for partial matches; shorter inputs automatically fall back to exact match. Note: Use with one of: &#x60;integrationId&#x60;, &#x60;profile&#x60;, &#x60;coupon&#x60;, &#x60;referral&#x60;, or &#x60;storeIntegrationId&#x60;. (default to false)

  • :profile (String)

    Filter by sessions with this profile integration ID. By default, requires exact match. Use &#x60;partialMatch&#x3D;true&#x60; to search for partial matches (minimum 3 characters).

  • :state (String)

    Filter by sessions with this state. Must be exact match.

  • :created_before (Time)

    Only return events created before this date. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :created_after (Time)

    Only return events created after this date. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :coupon (String)

    Filter by sessions with this coupon. By default, requires exact match. Use &#x60;partialMatch&#x3D;true&#x60; to search for partial matches (minimum 3 characters).

  • :referral (String)

    Filter by sessions with this referral. By default, requires exact match. Use &#x60;partialMatch&#x3D;true&#x60; to search for partial matches (minimum 3 characters).

  • :integration_id (String)

    Filter by sessions with this integration ID. By default, requires exact match. Use &#x60;partialMatch&#x3D;true&#x60; to search for partial matches (minimum 3 characters).

  • :store_integration_id (String)

    The integration ID of the store. You choose this ID when you create a store. By default, requires exact match. Use &#x60;partialMatch&#x3D;true&#x60; to search for partial matches (minimum 3 characters).

Returns:



5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
# File 'lib/talon_one_sdk/api/management_api.rb', line 5850

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
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_application_sessions, must be smaller than or equal to 1000.'
  end

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

  allowable_values = ["open", "closed", "partially_returned", "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[:'partialMatch'] = opts[:'partial_match'] if !opts[:'partial_match'].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?
  query_params[:'storeIntegrationId'] = opts[:'store_integration_id'] if !opts[:'store_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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_application_sessions",
    :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 = {}) ⇒ Array<(Application, Integer, Hash)>

Get Application Get the Application specified by the ID.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

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

    the optional parameters

Returns:

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

    Application data, response status code and response headers



5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
# File 'lib/talon_one_sdk/api/management_api.rb', line 5020

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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_application",
    :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 = {}) ⇒ GetApplications200Response

List Applications List all the Applications in the current account.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

Returns:



5929
5930
5931
5932
# File 'lib/talon_one_sdk/api/management_api.rb', line 5929

def get_applications(opts = {})
  data, _status_code, _headers = get_applications_with_http_info(opts)
  data
end

#get_applications_with_http_info(opts = {}) ⇒ Array<(GetApplications200Response, Integer, Hash)>

List Applications List all the Applications in the current account.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

Returns:

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

    GetApplications200Response data, response status code and response headers



5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
# File 'lib/talon_one_sdk/api/management_api.rb', line 5941

def get_applications_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_applications ...'
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_applications, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_applications, must be greater than or equal to 1.'
  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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_applications",
    :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 = {}) ⇒ Attribute

Get custom attribute Retrieve the specified custom attribute.

Parameters:

  • attribute_id (Integer)

    The ID of the attribute. You can find the ID in the Campaign Manager&#39;s URL when you display the details of an attribute in Account &gt; Tools &gt; Attributes.

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

    the optional parameters

Returns:



6001
6002
6003
6004
# File 'lib/talon_one_sdk/api/management_api.rb', line 6001

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 = {}) ⇒ Array<(Attribute, Integer, Hash)>

Get custom attribute Retrieve the specified custom attribute.

Parameters:

  • attribute_id (Integer)

    The ID of the attribute. You can find the ID in the Campaign Manager&#39;s URL when you display the details of an attribute in Account &gt; Tools &gt; Attributes.

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

    the optional parameters

Returns:

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

    Attribute data, response status code and response headers



6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
# File 'lib/talon_one_sdk/api/management_api.rb', line 6011

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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_attribute",
    :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 = {}) ⇒ GetAttributes200Response

List custom attributes Return all the custom attributes for the account.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

  • :entity (String)

    Returned attributes will be filtered by supplied entity.

  • :application_ids (String)

    Returned attributes will be filtered by supplied application ids

  • :type (String)

    Returned attributes will be filtered by supplied type

  • :kind (String)

    Returned attributes will be filtered by supplied kind (builtin or custom)

  • :search (String)

    Returned attributes will be filtered by searching case insensitive through Attribute name, description and type

Returns:



6071
6072
6073
6074
# File 'lib/talon_one_sdk/api/management_api.rb', line 6071

def get_attributes(opts = {})
  data, _status_code, _headers = get_attributes_with_http_info(opts)
  data
end

#get_attributes_with_http_info(opts = {}) ⇒ Array<(GetAttributes200Response, Integer, Hash)>

List custom attributes Return all the custom attributes for the account.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

  • :entity (String)

    Returned attributes will be filtered by supplied entity.

  • :application_ids (String)

    Returned attributes will be filtered by supplied application ids

  • :type (String)

    Returned attributes will be filtered by supplied type

  • :kind (String)

    Returned attributes will be filtered by supplied kind (builtin or custom)

  • :search (String)

    Returned attributes will be filtered by searching case insensitive through Attribute name, description and type

Returns:

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

    GetAttributes200Response data, response status code and response headers



6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
# File 'lib/talon_one_sdk/api/management_api.rb', line 6088

def get_attributes_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_attributes ...'
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_attributes, must be smaller than or equal to 1000.'
  end

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

  allowable_values = ["builtin", "custom"]
  if @api_client.config.client_side_validation && opts[:'kind'] && !allowable_values.include?(opts[:'kind'])
    fail ArgumentError, "invalid value for \"kind\", must be one of #{allowable_values}"
  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?
  query_params[:'applicationIds'] = opts[:'application_ids'] if !opts[:'application_ids'].nil?
  query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
  query_params[:'kind'] = opts[:'kind'] if !opts[:'kind'].nil?
  query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_attributes",
    :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_audience_memberships(audience_id, opts = {}) ⇒ GetAudienceMemberships200Response

List audience members Get a paginated list of the customer profiles in a given audience. A maximum of 1000 customer profiles per page is allowed.

Parameters:

  • audience_id (Integer)

    The ID of the audience.

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

  • :profile_query (String)

    The filter to select a profile.

Returns:



6161
6162
6163
6164
# File 'lib/talon_one_sdk/api/management_api.rb', line 6161

def get_audience_memberships(audience_id, opts = {})
  data, _status_code, _headers = get_audience_memberships_with_http_info(audience_id, opts)
  data
end

#get_audience_memberships_with_http_info(audience_id, opts = {}) ⇒ Array<(GetAudienceMemberships200Response, Integer, Hash)>

List audience members Get a paginated list of the customer profiles in a given audience. A maximum of 1000 customer profiles per page is allowed.

Parameters:

  • audience_id (Integer)

    The ID of the audience.

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

  • :profile_query (String)

    The filter to select a profile.

Returns:



6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
# File 'lib/talon_one_sdk/api/management_api.rb', line 6175

def get_audience_memberships_with_http_info(audience_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_audience_memberships ...'
  end
  # verify the required parameter 'audience_id' is set
  if @api_client.config.client_side_validation && audience_id.nil?
    fail ArgumentError, "Missing the required parameter 'audience_id' when calling ManagementApi.get_audience_memberships"
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_audience_memberships, must be smaller than or equal to 1000.'
  end

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

  # resource path
  local_var_path = '/v1/audiences/{audienceId}/memberships'.sub('{audienceId}', CGI.escape(audience_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[:'profileQuery'] = opts[:'profile_query'] if !opts[:'profile_query'].nil?

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_audience_memberships",
    :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_audience_memberships\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_audiences(opts = {}) ⇒ GetAudiences200Response

List audiences Get all audiences created in the account. To create an audience, use [Create audience](docs.talon.one/integration-api#tag/Audiences/operation/createAudienceV2).

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

  • :with_total_result_size (Boolean)

    When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When &#x60;true&#x60;: &#x60;totalResultSize&#x60; contains the total number of results for this query. - When &#x60;false&#x60;: Only &#x60;hasMore&#x60; is returned, and it is set to &#x60;true&#x60; when there are more results than shown on the page.

Returns:



6243
6244
6245
6246
# File 'lib/talon_one_sdk/api/management_api.rb', line 6243

def get_audiences(opts = {})
  data, _status_code, _headers = get_audiences_with_http_info(opts)
  data
end

#get_audiences_analytics(audience_ids, opts = {}) ⇒ GetAudiencesAnalytics200Response

List audience analytics Get a list of audience IDs and their member count.

Parameters:

  • audience_ids (String)

    The IDs of one or more audiences, separated by commas, by which to filter results. Do not provide more than 1000 audience IDs.

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

    the optional parameters

Options Hash (opts):

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

Returns:



6318
6319
6320
6321
# File 'lib/talon_one_sdk/api/management_api.rb', line 6318

def get_audiences_analytics(audience_ids, opts = {})
  data, _status_code, _headers = get_audiences_analytics_with_http_info(audience_ids, opts)
  data
end

#get_audiences_analytics_with_http_info(audience_ids, opts = {}) ⇒ Array<(GetAudiencesAnalytics200Response, Integer, Hash)>

List audience analytics Get a list of audience IDs and their member count.

Parameters:

  • audience_ids (String)

    The IDs of one or more audiences, separated by commas, by which to filter results. Do not provide more than 1000 audience IDs.

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

    the optional parameters

Options Hash (opts):

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

Returns:



6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
# File 'lib/talon_one_sdk/api/management_api.rb', line 6329

def get_audiences_analytics_with_http_info(audience_ids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_audiences_analytics ...'
  end
  # verify the required parameter 'audience_ids' is set
  if @api_client.config.client_side_validation && audience_ids.nil?
    fail ArgumentError, "Missing the required parameter 'audience_ids' when calling ManagementApi.get_audiences_analytics"
  end
  # resource path
  local_var_path = '/v1/audiences/analytics'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'audienceIds'] = audience_ids
  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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_audiences_analytics",
    :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_analytics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_audiences_with_http_info(opts = {}) ⇒ Array<(GetAudiences200Response, Integer, Hash)>

List audiences Get all audiences created in the account. To create an audience, use [Create audience](docs.talon.one/integration-api#tag/Audiences/operation/createAudienceV2).

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

  • :with_total_result_size (Boolean)

    When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When &#x60;true&#x60;: &#x60;totalResultSize&#x60; contains the total number of results for this query. - When &#x60;false&#x60;: Only &#x60;hasMore&#x60; is returned, and it is set to &#x60;true&#x60; when there are more results than shown on the page.

Returns:

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

    GetAudiences200Response data, response status code and response headers



6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
# File 'lib/talon_one_sdk/api/management_api.rb', line 6256

def get_audiences_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_audiences ...'
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_audiences, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_audiences, must be greater than or equal to 1.'
  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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_audiences",
    :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 = {}) ⇒ Campaign

Get campaign Retrieve the given campaign.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

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

    the optional parameters

Returns:



6385
6386
6387
6388
# File 'lib/talon_one_sdk/api/management_api.rb', line 6385

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 = {}) ⇒ GetCampaignAnalytics200Response

Get analytics of campaigns Retrieve statistical data about the performance of the given campaign.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • range_start (Time)

    Only return results from after this timestamp. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered.

  • range_end (Time)

    Only return results from before this timestamp. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered.

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

    the optional parameters

Options Hash (opts):

  • :granularity (String)

    The time interval between the results in the returned time-series.

Returns:



6457
6458
6459
6460
# File 'lib/talon_one_sdk/api/management_api.rb', line 6457

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 = {}) ⇒ Array<(GetCampaignAnalytics200Response, Integer, Hash)>

Get analytics of campaigns Retrieve statistical data about the performance of the given campaign.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • range_start (Time)

    Only return results from after this timestamp. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered.

  • range_end (Time)

    Only return results from before this timestamp. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered.

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

    the optional parameters

Options Hash (opts):

  • :granularity (String)

    The time interval between the results in the returned time-series.

Returns:



6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
# File 'lib/talon_one_sdk/api/management_api.rb', line 6471

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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_campaign_analytics",
    :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, campaign_search, opts = {}) ⇒ GetCampaigns200Response

List campaigns that match the given attributes Get a list of all the campaigns that match a set of attributes.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_search (CampaignSearch)

    body

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

  • :campaign_state (String)

    Filter results by the state of the campaign. - &#x60;enabled&#x60;: Campaigns that are scheduled, running (activated), or expired. - &#x60;running&#x60;: Campaigns that are running (activated). - &#x60;disabled&#x60;: Campaigns that are disabled. - &#x60;expired&#x60;: Campaigns that are expired. - &#x60;archived&#x60;: Campaigns that are archived.

Returns:



6548
6549
6550
6551
# File 'lib/talon_one_sdk/api/management_api.rb', line 6548

def get_campaign_by_attributes(application_id, campaign_search, opts = {})
  data, _status_code, _headers = get_campaign_by_attributes_with_http_info(application_id, campaign_search, opts)
  data
end

#get_campaign_by_attributes_with_http_info(application_id, campaign_search, opts = {}) ⇒ Array<(GetCampaigns200Response, Integer, Hash)>

List campaigns that match the given attributes Get a list of all the campaigns that match a set of attributes.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_search (CampaignSearch)

    body

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

  • :campaign_state (String)

    Filter results by the state of the campaign. - &#x60;enabled&#x60;: Campaigns that are scheduled, running (activated), or expired. - &#x60;running&#x60;: Campaigns that are running (activated). - &#x60;disabled&#x60;: Campaigns that are disabled. - &#x60;expired&#x60;: Campaigns that are expired. - &#x60;archived&#x60;: Campaigns that are archived.

Returns:

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

    GetCampaigns200Response data, response status code and response headers



6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
# File 'lib/talon_one_sdk/api/management_api.rb', line 6563

def get_campaign_by_attributes_with_http_info(application_id, campaign_search, 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 'campaign_search' is set
  if @api_client.config.client_side_validation && campaign_search.nil?
    fail ArgumentError, "Missing the required parameter 'campaign_search' when calling ManagementApi.get_campaign_by_attributes"
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_campaign_by_attributes, must be smaller than or equal to 1000.'
  end

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

  allowable_values = ["enabled", "disabled", "archived", "scheduled", "running", "expired", "staged"]
  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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_campaign_by_attributes",
    :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_group(campaign_group_id, opts = {}) ⇒ CampaignGroup

Get campaign access group Get a campaign access group specified by its ID.

Parameters:

  • campaign_group_id (Integer)

    The ID of the campaign access group.

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

    the optional parameters

Returns:



6641
6642
6643
6644
# File 'lib/talon_one_sdk/api/management_api.rb', line 6641

def get_campaign_group(campaign_group_id, opts = {})
  data, _status_code, _headers = get_campaign_group_with_http_info(campaign_group_id, opts)
  data
end

#get_campaign_group_with_http_info(campaign_group_id, opts = {}) ⇒ Array<(CampaignGroup, Integer, Hash)>

Get campaign access group Get a campaign access group specified by its ID.

Parameters:

  • campaign_group_id (Integer)

    The ID of the campaign access group.

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

    the optional parameters

Returns:

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

    CampaignGroup data, response status code and response headers



6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
# File 'lib/talon_one_sdk/api/management_api.rb', line 6651

def get_campaign_group_with_http_info(campaign_group_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_campaign_group ...'
  end
  # verify the required parameter 'campaign_group_id' is set
  if @api_client.config.client_side_validation && campaign_group_id.nil?
    fail ArgumentError, "Missing the required parameter 'campaign_group_id' when calling ManagementApi.get_campaign_group"
  end
  # resource path
  local_var_path = '/v1/campaign_groups/{campaignGroupId}'.sub('{campaignGroupId}', CGI.escape(campaign_group_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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_campaign_group",
    :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_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_campaign_groups(opts = {}) ⇒ GetCampaignGroups200Response

List campaign access groups List the campaign access groups in the current account.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

Returns:



6706
6707
6708
6709
# File 'lib/talon_one_sdk/api/management_api.rb', line 6706

def get_campaign_groups(opts = {})
  data, _status_code, _headers = get_campaign_groups_with_http_info(opts)
  data
end

#get_campaign_groups_with_http_info(opts = {}) ⇒ Array<(GetCampaignGroups200Response, Integer, Hash)>

List campaign access groups List the campaign access groups in the current account.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

Returns:



6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
# File 'lib/talon_one_sdk/api/management_api.rb', line 6718

def get_campaign_groups_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_campaign_groups ...'
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_campaign_groups, must be smaller than or equal to 1000.'
  end

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

  # resource path
  local_var_path = '/v1/campaign_groups'

  # 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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_campaign_groups",
    :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_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_campaign_templates(opts = {}) ⇒ GetCampaignTemplates200Response

List campaign templates Retrieve a list of campaign templates.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

  • :state (String)

    Filter results by the state of the campaign template.

  • :name (String)

    Filter results performing case-insensitive matching against the name of the campaign template.

  • :tags (String)

    Filter results performing case-insensitive matching against the tags of the campaign template. When used in conjunction with the &quot;name&quot; query parameter, a logical OR will be performed to search both tags and name for the provided values.

  • :user_id (Integer)

    Filter results by user ID.

Returns:



6784
6785
6786
6787
# File 'lib/talon_one_sdk/api/management_api.rb', line 6784

def get_campaign_templates(opts = {})
  data, _status_code, _headers = get_campaign_templates_with_http_info(opts)
  data
end

#get_campaign_templates_with_http_info(opts = {}) ⇒ Array<(GetCampaignTemplates200Response, Integer, Hash)>

List campaign templates Retrieve a list of campaign templates.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

  • :state (String)

    Filter results by the state of the campaign template.

  • :name (String)

    Filter results performing case-insensitive matching against the name of the campaign template.

  • :tags (String)

    Filter results performing case-insensitive matching against the tags of the campaign template. When used in conjunction with the &quot;name&quot; query parameter, a logical OR will be performed to search both tags and name for the provided values.

  • :user_id (Integer)

    Filter results by user ID.

Returns:



6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
# File 'lib/talon_one_sdk/api/management_api.rb', line 6800

def get_campaign_templates_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_campaign_templates ...'
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_campaign_templates, must be smaller than or equal to 1000.'
  end

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

  allowable_values = ["draft", "enabled", "disabled"]
  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/campaign_templates'

  # 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[:'state'] = opts[:'state'] if !opts[:'state'].nil?
  query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
  query_params[:'tags'] = opts[:'tags'] if !opts[:'tags'].nil?
  query_params[:'userId'] = opts[:'user_id'] if !opts[:'user_id'].nil?

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_campaign_templates",
    :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_templates\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 = {}) ⇒ Array<(Campaign, Integer, Hash)>

Get campaign Retrieve the given campaign.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

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

    the optional parameters

Returns:

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

    Campaign data, response status code and response headers



6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
# File 'lib/talon_one_sdk/api/management_api.rb', line 6396

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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_campaign",
    :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 = {}) ⇒ GetCampaigns200Response

List campaigns List the campaigns of the specified application that match your filter criteria.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

  • :campaign_state (String)

    Filter results by the state of the campaign. - &#x60;enabled&#x60;: Campaigns that are scheduled, running (activated), or expired. - &#x60;running&#x60;: Campaigns that are running (activated). - &#x60;disabled&#x60;: Campaigns that are disabled. - &#x60;expired&#x60;: Campaigns that are expired. - &#x60;archived&#x60;: Campaigns that are archived.

  • :name (String)

    Filter results performing case-insensitive matching against the name of the campaign.

  • :tags (String)

    Filter results performing case-insensitive matching against the tags of the campaign. When used in conjunction with the &quot;name&quot; query parameter, a logical OR will be performed to search both tags and name for the provided values

  • :created_before (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :created_after (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :start_before (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign start time timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :start_after (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign start time timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :end_before (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign end time timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :end_after (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign end time timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :campaign_group_id (Integer)

    Filter results to campaigns owned by the specified campaign access group ID.

  • :template_id (Integer)

    The ID of the campaign template this campaign was created from.

  • :store_id (Integer)

    Filter results to campaigns linked to the specified store ID.

Returns:



6883
6884
6885
6886
# File 'lib/talon_one_sdk/api/management_api.rb', line 6883

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 = {}) ⇒ Array<(GetCampaigns200Response, Integer, Hash)>

List campaigns List the campaigns of the specified application that match your filter criteria.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

  • :campaign_state (String)

    Filter results by the state of the campaign. - &#x60;enabled&#x60;: Campaigns that are scheduled, running (activated), or expired. - &#x60;running&#x60;: Campaigns that are running (activated). - &#x60;disabled&#x60;: Campaigns that are disabled. - &#x60;expired&#x60;: Campaigns that are expired. - &#x60;archived&#x60;: Campaigns that are archived.

  • :name (String)

    Filter results performing case-insensitive matching against the name of the campaign.

  • :tags (String)

    Filter results performing case-insensitive matching against the tags of the campaign. When used in conjunction with the &quot;name&quot; query parameter, a logical OR will be performed to search both tags and name for the provided values

  • :created_before (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :created_after (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :start_before (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign start time timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :start_after (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign start time timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :end_before (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign end time timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :end_after (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign end time timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :campaign_group_id (Integer)

    Filter results to campaigns owned by the specified campaign access group ID.

  • :template_id (Integer)

    The ID of the campaign template this campaign was created from.

  • :store_id (Integer)

    Filter results to campaigns linked to the specified store ID.

Returns:

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

    GetCampaigns200Response data, response status code and response headers



6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
# File 'lib/talon_one_sdk/api/management_api.rb', line 6908

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
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_campaigns, must be smaller than or equal to 1000.'
  end

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

  allowable_values = ["enabled", "disabled", "archived", "scheduled", "running", "expired", "staged"]
  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[:'startBefore'] = opts[:'start_before'] if !opts[:'start_before'].nil?
  query_params[:'startAfter'] = opts[:'start_after'] if !opts[:'start_after'].nil?
  query_params[:'endBefore'] = opts[:'end_before'] if !opts[:'end_before'].nil?
  query_params[:'endAfter'] = opts[:'end_after'] if !opts[:'end_after'].nil?
  query_params[:'campaignGroupId'] = opts[:'campaign_group_id'] if !opts[:'campaign_group_id'].nil?
  query_params[:'templateId'] = opts[:'template_id'] if !opts[:'template_id'].nil?
  query_params[:'storeId'] = opts[:'store_id'] if !opts[:'store_id'].nil?

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_campaigns",
    :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 = {}) ⇒ GetChanges200Response

Get audit logs for an account Retrieve the audit logs displayed in **Accounts > Audit logs**.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

  • :application_id (Float)

    Filter results by Application ID.

  • :entity_path (String)

    Filter results on a case insensitive matching of the url path of the entity

  • :user_id (Integer)

    Filter results by user ID.

  • :created_before (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :created_after (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :with_total_result_size (Boolean)

    When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When &#x60;true&#x60;: &#x60;totalResultSize&#x60; contains the total number of results for this query. - When &#x60;false&#x60;: Only &#x60;hasMore&#x60; is returned, and it is set to &#x60;true&#x60; when there are more results than shown on the page.

  • :management_key_id (Integer)

    Filter results that match the given management key ID.

  • :include_old (Boolean)

    When this flag is set to false, the state without the change will not be returned. The default value is true.

Returns:



6998
6999
7000
7001
# File 'lib/talon_one_sdk/api/management_api.rb', line 6998

def get_changes(opts = {})
  data, _status_code, _headers = get_changes_with_http_info(opts)
  data
end

#get_changes_with_http_info(opts = {}) ⇒ Array<(GetChanges200Response, Integer, Hash)>

Get audit logs for an account Retrieve the audit logs displayed in **Accounts &gt; Audit logs**.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

  • :application_id (Float)

    Filter results by Application ID.

  • :entity_path (String)

    Filter results on a case insensitive matching of the url path of the entity

  • :user_id (Integer)

    Filter results by user ID.

  • :created_before (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :created_after (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :with_total_result_size (Boolean)

    When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When &#x60;true&#x60;: &#x60;totalResultSize&#x60; contains the total number of results for this query. - When &#x60;false&#x60;: Only &#x60;hasMore&#x60; is returned, and it is set to &#x60;true&#x60; when there are more results than shown on the page.

  • :management_key_id (Integer)

    Filter results that match the given management key ID.

  • :include_old (Boolean)

    When this flag is set to false, the state without the change will not be returned. The default value is true.

Returns:

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

    GetChanges200Response data, response status code and response headers



7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
# File 'lib/talon_one_sdk/api/management_api.rb', line 7018

def get_changes_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_changes ...'
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_changes, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_changes, must be greater than or equal to 1.'
  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[:'managementKeyId'] = opts[:'management_key_id'] if !opts[:'management_key_id'].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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_changes",
    :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_collection(application_id, campaign_id, collection_id, opts = {}) ⇒ Collection

Get campaign-level collection Retrieve a given campaign-level collection.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • collection_id (Integer)

    The ID of the collection. You can get it with the [List collections in Application](#tag/Collections/operation/listCollectionsInApplication) endpoint.

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

    the optional parameters

Returns:



7088
7089
7090
7091
# File 'lib/talon_one_sdk/api/management_api.rb', line 7088

def get_collection(application_id, campaign_id, collection_id, opts = {})
  data, _status_code, _headers = get_collection_with_http_info(application_id, campaign_id, collection_id, opts)
  data
end

#get_collection_items(collection_id, opts = {}) ⇒ GetCollectionItems200Response

Get collection items Retrieve items from a given collection. You can retrieve items from both account-level collections and campaign-level collections using this endpoint.

Parameters:

  • collection_id (Integer)

    The ID of the collection. You can get it with the [List collections in account](#tag/Collections/operation/listAccountCollections) endpoint.

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

Returns:



7163
7164
7165
7166
# File 'lib/talon_one_sdk/api/management_api.rb', line 7163

def get_collection_items(collection_id, opts = {})
  data, _status_code, _headers = get_collection_items_with_http_info(collection_id, opts)
  data
end

#get_collection_items_with_http_info(collection_id, opts = {}) ⇒ Array<(GetCollectionItems200Response, Integer, Hash)>

Get collection items Retrieve items from a given collection. You can retrieve items from both account-level collections and campaign-level collections using this endpoint.

Parameters:

  • collection_id (Integer)

    The ID of the collection. You can get it with the [List collections in account](#tag/Collections/operation/listAccountCollections) endpoint.

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

Returns:



7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
# File 'lib/talon_one_sdk/api/management_api.rb', line 7175

def get_collection_items_with_http_info(collection_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_collection_items ...'
  end
  # verify the required parameter 'collection_id' is set
  if @api_client.config.client_side_validation && collection_id.nil?
    fail ArgumentError, "Missing the required parameter 'collection_id' when calling ManagementApi.get_collection_items"
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_collection_items, must be smaller than or equal to 1000.'
  end

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

  # resource path
  local_var_path = '/v1/collections/{collectionId}/items'.sub('{collectionId}', CGI.escape(collection_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?

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_collection_items",
    :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_collection_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_collection_with_http_info(application_id, campaign_id, collection_id, opts = {}) ⇒ Array<(Collection, Integer, Hash)>

Get campaign-level collection Retrieve a given campaign-level collection.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • collection_id (Integer)

    The ID of the collection. You can get it with the [List collections in Application](#tag/Collections/operation/listCollectionsInApplication) endpoint.

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

    the optional parameters

Returns:

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

    Collection data, response status code and response headers



7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
# File 'lib/talon_one_sdk/api/management_api.rb', line 7100

def get_collection_with_http_info(application_id, campaign_id, collection_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_collection ...'
  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_collection"
  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_collection"
  end
  # verify the required parameter 'collection_id' is set
  if @api_client.config.client_side_validation && collection_id.nil?
    fail ArgumentError, "Missing the required parameter 'collection_id' when calling ManagementApi.get_collection"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}'.sub('{applicationId}', CGI.escape(application_id.to_s)).sub('{campaignId}', CGI.escape(campaign_id.to_s)).sub('{collectionId}', CGI.escape(collection_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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_collection",
    :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_collection\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 = {}) ⇒ GetCouponsWithoutTotalCount200Response

List coupons List all the coupons matching the specified criteria.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

  • :value (String)

    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.

  • :created_before (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :created_after (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :valid (String)

    Either &quot;expired&quot;, &quot;validNow&quot;, or &quot;validFuture&quot;. The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future.

  • :usable (String)

    Either &quot;true&quot; or &quot;false&quot;. If &quot;true&quot;, only coupons where &#x60;usageCounter &lt; usageLimit&#x60; will be returned, &quot;false&quot; will return only coupons where &#x60;usageCounter &gt;&#x3D; usageLimit&#x60;.

  • :redeemed (String)
    • &#x60;true&#x60;: only coupons where &#x60;usageCounter &gt; 0&#x60; will be returned. - &#x60;false&#x60;: only coupons where &#x60;usageCounter &#x3D; 0&#x60; will be returned. - This field cannot be used in conjunction with the &#x60;usable&#x60; query parameter.

  • :referral_id (Integer)

    Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code.

  • :recipient_integration_id (String)

    Filter results by match with a profile ID specified in the coupon&#39;s RecipientIntegrationId field.

  • :batch_id (String)

    Filter results by batches of coupons

  • :exact_match (Boolean)

    Filter results to an exact case-insensitive matching against the coupon code. (default to false)

  • :expires_before (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon expiration date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :expires_after (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon expiration date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :starts_before (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon start date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :starts_after (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon start date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :values_only (Boolean)

    Filter results to only return the coupon codes (&#x60;value&#x60; column) without the associated coupon data. (default to false)

Returns:



7257
7258
7259
7260
# File 'lib/talon_one_sdk/api/management_api.rb', line 7257

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 = {}) ⇒ Array<(GetCouponsWithoutTotalCount200Response, Integer, Hash)>

List coupons List all the coupons matching the specified criteria.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

  • :value (String)

    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.

  • :created_before (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :created_after (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :valid (String)

    Either &quot;expired&quot;, &quot;validNow&quot;, or &quot;validFuture&quot;. The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future.

  • :usable (String)

    Either &quot;true&quot; or &quot;false&quot;. If &quot;true&quot;, only coupons where &#x60;usageCounter &lt; usageLimit&#x60; will be returned, &quot;false&quot; will return only coupons where &#x60;usageCounter &gt;&#x3D; usageLimit&#x60;.

  • :redeemed (String)
    • &#x60;true&#x60;: only coupons where &#x60;usageCounter &gt; 0&#x60; will be returned. - &#x60;false&#x60;: only coupons where &#x60;usageCounter &#x3D; 0&#x60; will be returned. - This field cannot be used in conjunction with the &#x60;usable&#x60; query parameter.

  • :referral_id (Integer)

    Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code.

  • :recipient_integration_id (String)

    Filter results by match with a profile ID specified in the coupon&#39;s RecipientIntegrationId field.

  • :batch_id (String)

    Filter results by batches of coupons

  • :exact_match (Boolean)

    Filter results to an exact case-insensitive matching against the coupon code. (default to false)

  • :expires_before (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon expiration date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :expires_after (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon expiration date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :starts_before (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon start date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :starts_after (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon start date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :values_only (Boolean)

    Filter results to only return the coupon codes (&#x60;value&#x60; column) without the associated coupon data. (default to false)

Returns:



7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
# File 'lib/talon_one_sdk/api/management_api.rb', line 7286

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
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_coupons_without_total_count, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_coupons_without_total_count, must be greater than or equal to 1.'
  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 = ["true", "false"]
  if @api_client.config.client_side_validation && opts[:'redeemed'] && !allowable_values.include?(opts[:'redeemed'])
    fail ArgumentError, "invalid value for \"redeemed\", 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[:'redeemed'] = opts[:'redeemed'] if !opts[:'redeemed'].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[:'expiresBefore'] = opts[:'expires_before'] if !opts[:'expires_before'].nil?
  query_params[:'expiresAfter'] = opts[:'expires_after'] if !opts[:'expires_after'].nil?
  query_params[:'startsBefore'] = opts[:'starts_before'] if !opts[:'starts_before'].nil?
  query_params[:'startsAfter'] = opts[:'starts_after'] if !opts[:'starts_after'].nil?
  query_params[:'valuesOnly'] = opts[:'values_only'] if !opts[:'values_only'].nil?

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_coupons_without_total_count",
    :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 = {}) ⇒ CustomerActivityReport

Get customer’s activity report Fetch the summary report of a given customer in the given application, in a time range.

Parameters:

  • range_start (Time)

    Only return results from after this timestamp. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered.

  • range_end (Time)

    Only return results from before this timestamp. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered.

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • customer_id (Integer)

    The value of the &#x60;id&#x60; property of a customer profile. Get it with the [List Application&#39;s customers](docs.talon.one/management-api#tag/Customer-data/operation/getApplicationCustomers) endpoint.

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

Returns:



7386
7387
7388
7389
# File 'lib/talon_one_sdk/api/management_api.rb', line 7386

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 = {}) ⇒ Array<(CustomerActivityReport, Integer, Hash)>

Get customer&#39;s activity report Fetch the summary report of a given customer in the given application, in a time range.

Parameters:

  • range_start (Time)

    Only return results from after this timestamp. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered.

  • range_end (Time)

    Only return results from before this timestamp. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered.

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • customer_id (Integer)

    The value of the &#x60;id&#x60; property of a customer profile. Get it with the [List Application&#39;s customers](docs.talon.one/management-api#tag/Customer-data/operation/getApplicationCustomers) endpoint.

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

Returns:

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

    CustomerActivityReport data, response status code and response headers



7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
# File 'lib/talon_one_sdk/api/management_api.rb', line 7401

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
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_customer_activity_report, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_customer_activity_report, must be greater than or equal to 1.'
  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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_customer_activity_report",
    :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_without_total_count(range_start, range_end, application_id, opts = {}) ⇒ GetCustomerActivityReportsWithoutTotalCount200Response

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 mentions whether there are more results.

Parameters:

  • range_start (Time)

    Only return results from after this timestamp. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered.

  • range_end (Time)

    Only return results from before this timestamp. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered.

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

  • :name (String)

    Only return reports matching the customer name.

  • :integration_id (String)

    Filter results performing an exact matching against the profile integration identifier.

  • :campaign_name (String)

    Only return reports matching the campaign name.

  • :advocate_name (String)

    Only return reports matching the current customer referrer name.

Returns:



7487
7488
7489
7490
# File 'lib/talon_one_sdk/api/management_api.rb', line 7487

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 = {}) ⇒ Array<(GetCustomerActivityReportsWithoutTotalCount200Response, Integer, Hash)>

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 mentions whether there are more results.

Parameters:

  • range_start (Time)

    Only return results from after this timestamp. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered.

  • range_end (Time)

    Only return results from before this timestamp. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered.

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

  • :name (String)

    Only return reports matching the customer name.

  • :integration_id (String)

    Filter results performing an exact matching against the profile integration identifier.

  • :campaign_name (String)

    Only return reports matching the campaign name.

  • :advocate_name (String)

    Only return reports matching the current customer referrer name.

Returns:



7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
# File 'lib/talon_one_sdk/api/management_api.rb', line 7506

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
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_customer_activity_reports_without_total_count, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_customer_activity_reports_without_total_count, must be greater than or equal to 1.'
  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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_customer_activity_reports_without_total_count",
    :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 = {}) ⇒ CustomerAnalytics

Get customer’s analytics report Fetch analytics for a given customer in the given application.

Parameters:

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

Returns:



7588
7589
7590
7591
# File 'lib/talon_one_sdk/api/management_api.rb', line 7588

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 = {}) ⇒ Array<(CustomerAnalytics, Integer, Hash)>

Get customer&#39;s analytics report Fetch analytics for a given customer in the given application.

Parameters:

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

Returns:

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

    CustomerAnalytics data, response status code and response headers



7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
# File 'lib/talon_one_sdk/api/management_api.rb', line 7602

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
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_customer_analytics, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_customer_analytics, must be greater than or equal to 1.'
  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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_customer_analytics",
    :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 = {}) ⇒ CustomerProfile

Get customer profile Return the details of the specified customer profile. > [!note] > You can retrieve the same information via the Integration API, which can save you extra API requests. Consider these options: > - Request the customer profile to be part of the response content using > [Update Customer Session](docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2). > - Send an empty update with the [Update Customer Profile](docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfileV2) endpoint with ‘runRuleEngine=false`.

Parameters:

Returns:



7670
7671
7672
7673
# File 'lib/talon_one_sdk/api/management_api.rb', line 7670

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_achievement_progress(application_id, integration_id, opts = {}) ⇒ GetCustomerProfileAchievementProgress200Response

List customer achievements For the given customer profile, list all the achievements that match your filter criteria.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • integration_id (String)

    The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier.

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 50)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :achievement_id (Integer)

    The ID of the achievement. You can get this ID with the [List achievement](docs.talon.one/management-api#tag/Achievements/operation/listAchievements) endpoint.

  • :title (String)

    Filter results by the &#x60;title&#x60; of an achievement.

Returns:



7738
7739
7740
7741
# File 'lib/talon_one_sdk/api/management_api.rb', line 7738

def get_customer_profile_achievement_progress(application_id, integration_id, opts = {})
  data, _status_code, _headers = get_customer_profile_achievement_progress_with_http_info(application_id, integration_id, opts)
  data
end

#get_customer_profile_achievement_progress_with_http_info(application_id, integration_id, opts = {}) ⇒ Array<(GetCustomerProfileAchievementProgress200Response, Integer, Hash)>

List customer achievements For the given customer profile, list all the achievements that match your filter criteria.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • integration_id (String)

    The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier.

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 50)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :achievement_id (Integer)

    The ID of the achievement. You can get this ID with the [List achievement](docs.talon.one/management-api#tag/Achievements/operation/listAchievements) endpoint.

  • :title (String)

    Filter results by the &#x60;title&#x60; of an achievement.

Returns:



7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
# File 'lib/talon_one_sdk/api/management_api.rb', line 7753

def get_customer_profile_achievement_progress_with_http_info(application_id, integration_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_customer_profile_achievement_progress ...'
  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_profile_achievement_progress"
  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_customer_profile_achievement_progress"
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 50
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_customer_profile_achievement_progress, must be smaller than or equal to 50.'
  end

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

  # resource path
  local_var_path = '/v1/applications/{applicationId}/achievement_progress/{integrationId}'.sub('{applicationId}', CGI.escape(application_id.to_s)).sub('{integrationId}', CGI.escape(integration_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[:'achievementId'] = opts[:'achievement_id'] if !opts[:'achievement_id'].nil?
  query_params[:'title'] = opts[:'title'] if !opts[:'title'].nil?

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_customer_profile_achievement_progress",
    :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_achievement_progress\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_customer_profile_with_http_info(customer_id, opts = {}) ⇒ Array<(CustomerProfile, Integer, Hash)>

Get customer profile Return the details of the specified customer profile. &gt; [!note] &gt; You can retrieve the same information via the Integration API, which can save you extra API requests. Consider these options: &gt; - Request the customer profile to be part of the response content using &gt; [Update Customer Session](docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2). &gt; - Send an empty update with the [Update Customer Profile](docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfileV2) endpoint with &#x60;runRuleEngine&#x3D;false&#x60;.

Parameters:

Returns:

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

    CustomerProfile data, response status code and response headers



7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
# File 'lib/talon_one_sdk/api/management_api.rb', line 7680

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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_customer_profile",
    :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 = {}) ⇒ GetCustomerProfiles200Response

List customer profiles List all customer profiles.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sandbox (Boolean)

    Indicates whether you are pointing to a sandbox or live customer. (default to false)

Returns:



7824
7825
7826
7827
# File 'lib/talon_one_sdk/api/management_api.rb', line 7824

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 = {}) ⇒ Array<(GetCustomerProfiles200Response, Integer, Hash)>

List customer profiles List all customer profiles.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sandbox (Boolean)

    Indicates whether you are pointing to a sandbox or live customer. (default to false)

Returns:



7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
# File 'lib/talon_one_sdk/api/management_api.rb', line 7836

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
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_customer_profiles, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_customer_profiles, must be greater than or equal to 1.'
  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?
  query_params[:'sandbox'] = opts[:'sandbox'] if !opts[:'sandbox'].nil?

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_customer_profiles",
    :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(customer_profile_search_query, opts = {}) ⇒ GetCustomersByAttributes200Response

List customer profiles matching the given attributes Get a list of the customer profiles matching the provided criteria. 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.

Parameters:

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sandbox (Boolean)

    Indicates whether you are pointing to a sandbox or live customer. (default to false)

Returns:



7899
7900
7901
7902
# File 'lib/talon_one_sdk/api/management_api.rb', line 7899

def get_customers_by_attributes(customer_profile_search_query, opts = {})
  data, _status_code, _headers = get_customers_by_attributes_with_http_info(customer_profile_search_query, opts)
  data
end

#get_customers_by_attributes_with_http_info(customer_profile_search_query, opts = {}) ⇒ Array<(GetCustomersByAttributes200Response, Integer, Hash)>

List customer profiles matching the given attributes Get a list of the customer profiles matching the provided criteria. 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.

Parameters:

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sandbox (Boolean)

    Indicates whether you are pointing to a sandbox or live customer. (default to false)

Returns:



7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
# File 'lib/talon_one_sdk/api/management_api.rb', line 7912

def get_customers_by_attributes_with_http_info(customer_profile_search_query, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_customers_by_attributes ...'
  end
  # verify the required parameter 'customer_profile_search_query' is set
  if @api_client.config.client_side_validation && customer_profile_search_query.nil?
    fail ArgumentError, "Missing the required parameter 'customer_profile_search_query' when calling ManagementApi.get_customers_by_attributes"
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_customers_by_attributes, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_customers_by_attributes, must be greater than or equal to 1.'
  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?
  query_params[:'sandbox'] = opts[:'sandbox'] if !opts[:'sandbox'].nil?

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_customers_by_attributes",
    :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_dashboard_statistics(loyalty_program_id, range_start, range_end, opts = {}) ⇒ GetDashboardStatistics200Response

Get statistics for loyalty dashboard Retrieve the statistics displayed on the specified loyalty program’s dashboard, such as the total active points, pending points, spent points, and expired points. > [!important] The returned data does not include the current day. All statistics > are updated daily at 11:59 PM in the loyalty program time zone.

Parameters:

  • loyalty_program_id (Integer)

    Identifier of the loyalty program. You can get the ID with the [List loyalty programs](docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint.

  • range_start (Time)

    Only return results from after this timestamp. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered.

  • range_end (Time)

    Only return results from before this timestamp. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered.

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

    the optional parameters

Options Hash (opts):

  • :subledger_id (String)

    The ID of the subledger by which we filter the data.

Returns:



7984
7985
7986
7987
# File 'lib/talon_one_sdk/api/management_api.rb', line 7984

def get_dashboard_statistics(loyalty_program_id, range_start, range_end, opts = {})
  data, _status_code, _headers = get_dashboard_statistics_with_http_info(loyalty_program_id, range_start, range_end, opts)
  data
end

#get_dashboard_statistics_with_http_info(loyalty_program_id, range_start, range_end, opts = {}) ⇒ Array<(GetDashboardStatistics200Response, Integer, Hash)>

Get statistics for loyalty dashboard Retrieve the statistics displayed on the specified loyalty program&#39;s dashboard, such as the total active points, pending points, spent points, and expired points. &gt; [!important] The returned data does not include the current day. All statistics &gt; are updated daily at 11:59 PM in the loyalty program time zone.

Parameters:

  • loyalty_program_id (Integer)

    Identifier of the loyalty program. You can get the ID with the [List loyalty programs](docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint.

  • range_start (Time)

    Only return results from after this timestamp. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered.

  • range_end (Time)

    Only return results from before this timestamp. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered.

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

    the optional parameters

Options Hash (opts):

  • :subledger_id (String)

    The ID of the subledger by which we filter the data.

Returns:



7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
# File 'lib/talon_one_sdk/api/management_api.rb', line 7997

def get_dashboard_statistics_with_http_info(loyalty_program_id, range_start, range_end, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_dashboard_statistics ...'
  end
  # verify the required parameter 'loyalty_program_id' is set
  if @api_client.config.client_side_validation && loyalty_program_id.nil?
    fail ArgumentError, "Missing the required parameter 'loyalty_program_id' when calling ManagementApi.get_dashboard_statistics"
  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_dashboard_statistics"
  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_dashboard_statistics"
  end
  # resource path
  local_var_path = '/v1/loyalty_programs/{loyaltyProgramId}/dashboard'.sub('{loyaltyProgramId}', CGI.escape(loyalty_program_id.to_s))

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

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_dashboard_statistics",
    :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_dashboard_statistics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_event_types(opts = {}) ⇒ GetEventTypes200Response

List event types Fetch all event type definitions for your account.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :name (String)

    Filter results to event types with the given name. This parameter implies &#x60;includeOldVersions&#x60;.

  • :include_old_versions (Boolean)

    Include all versions of every event type. (default to false)

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

Returns:



8065
8066
8067
8068
# File 'lib/talon_one_sdk/api/management_api.rb', line 8065

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 = {}) ⇒ Array<(GetEventTypes200Response, Integer, Hash)>

List event types Fetch all event type definitions for your account.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :name (String)

    Filter results to event types with the given name. This parameter implies &#x60;includeOldVersions&#x60;.

  • :include_old_versions (Boolean)

    Include all versions of every event type. (default to false)

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

Returns:

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

    GetEventTypes200Response data, response status code and response headers



8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
# File 'lib/talon_one_sdk/api/management_api.rb', line 8079

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
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_event_types, must be smaller than or equal to 1000.'
  end

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

  # resource path
  local_var_path = '/v1/event_types'

  # query parameters
  query_params = opts[:query_params] || {}
  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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_event_types",
    :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_experiment(application_id, experiment_id, opts = {}) ⇒ Experiment

Get experiment in Application Retrieve the given experiment associated with the Application.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • experiment_id (Integer)

    The ID of the experiment.

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

    the optional parameters

Returns:



8142
8143
8144
8145
# File 'lib/talon_one_sdk/api/management_api.rb', line 8142

def get_experiment(application_id, experiment_id, opts = {})
  data, _status_code, _headers = get_experiment_with_http_info(application_id, experiment_id, opts)
  data
end

#get_experiment_with_http_info(application_id, experiment_id, opts = {}) ⇒ Array<(Experiment, Integer, Hash)>

Get experiment in Application Retrieve the given experiment associated with the Application.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • experiment_id (Integer)

    The ID of the experiment.

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

    the optional parameters

Returns:

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

    Experiment data, response status code and response headers



8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
# File 'lib/talon_one_sdk/api/management_api.rb', line 8153

def get_experiment_with_http_info(application_id, experiment_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_experiment ...'
  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_experiment"
  end
  # verify the required parameter 'experiment_id' is set
  if @api_client.config.client_side_validation && experiment_id.nil?
    fail ArgumentError, "Missing the required parameter 'experiment_id' when calling ManagementApi.get_experiment"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/experiments/{experimentId}'.sub('{applicationId}', CGI.escape(application_id.to_s)).sub('{experimentId}', CGI.escape(experiment_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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_experiment",
    :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_experiment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_exports(opts = {}) ⇒ GetExports200Response

Get exports List all past exports

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :application_id (Float)

    Filter results by Application ID.

  • :campaign_id (Integer)

    Filter by the campaign ID on which the limit counters are used.

  • :entity (String)

    The name of the entity type that was exported.

Returns:



8214
8215
8216
8217
# File 'lib/talon_one_sdk/api/management_api.rb', line 8214

def get_exports(opts = {})
  data, _status_code, _headers = get_exports_with_http_info(opts)
  data
end

#get_exports_with_http_info(opts = {}) ⇒ Array<(GetExports200Response, Integer, Hash)>

Get exports List all past exports

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :application_id (Float)

    Filter results by Application ID.

  • :campaign_id (Integer)

    Filter by the campaign ID on which the limit counters are used.

  • :entity (String)

    The name of the entity type that was exported.

Returns:

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

    GetExports200Response data, response status code and response headers



8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
# File 'lib/talon_one_sdk/api/management_api.rb', line 8228

def get_exports_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_exports ...'
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_exports, must be smaller than or equal to 1000.'
  end

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

  allowable_values = ["Coupon", "Referral", "Effect", "CustomerSession", "LoyaltyLedger", "LoyaltyLedgerLog", "Collection", "AudienceMembership"]
  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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_exports",
    :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_card(loyalty_program_id, loyalty_card_id, opts = {}) ⇒ LoyaltyCard

Get loyalty card Get the given loyalty card.

Parameters:

Returns:



8295
8296
8297
8298
# File 'lib/talon_one_sdk/api/management_api.rb', line 8295

def get_loyalty_card(loyalty_program_id, loyalty_card_id, opts = {})
  data, _status_code, _headers = get_loyalty_card_with_http_info(loyalty_program_id, loyalty_card_id, opts)
  data
end

#get_loyalty_card_transaction_logs(loyalty_program_id, loyalty_card_id, opts = {}) ⇒ GetLoyaltyCardTransactionLogs200Response

List card’s transactions (Management API) Retrieve the transaction logs for the given [loyalty card](docs.talon.one/docs/product/loyalty-programs/card-based/card-based-overview) within the specified [card-based loyalty program](docs.talon.one/docs/product/loyalty-programs/overview#loyalty-program-types) with filtering options applied. > [!note] For most use cases, especially real-time integrations, use the Integration API endpoint: > [List card’s transactions](docs.talon.one/integration-api#tag/Loyalty-cards/operation/getLoyaltyCardTransactions). If no filtering options are applied, the last 50 loyalty transactions for the given loyalty card are returned.

Parameters:

Options Hash (opts):

  • :start_date (Time)

    Date and time from which results are returned. Results are filtered by transaction creation date. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered.

  • :end_date (Time)

    Date and time by which results are returned. Results are filtered by transaction creation date. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered.

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :subledger_id (String)

    The ID of the subledger by which we filter the data.

  • :customer_session_ids (Array<String>)

    Filter the results by a list of customer session IDs. To include multiple IDs, repeat the parameter for each one, for example, &#x60;?customerSessionIDs&#x3D;id1&amp;customerSessionIDs&#x3D;id2&#x60;. The response contains only data associated with the specified sessions.

  • :transaction_uuids (Array<String>)

    Filter the results by a list of transaction UUIDs. To include multiple IDs, repeat the parameter for each one, for example, &#x60;?transactionUUIDs&#x3D;uuid1&amp;transactionUUIDs&#x3D;uuid2&#x60;. The response contains only data associated with the specified transactions.

Returns:



8379
8380
8381
8382
# File 'lib/talon_one_sdk/api/management_api.rb', line 8379

def get_loyalty_card_transaction_logs(loyalty_program_id, loyalty_card_id, opts = {})
  data, _status_code, _headers = get_loyalty_card_transaction_logs_with_http_info(loyalty_program_id, loyalty_card_id, opts)
  data
end

#get_loyalty_card_transaction_logs_with_http_info(loyalty_program_id, loyalty_card_id, opts = {}) ⇒ Array<(GetLoyaltyCardTransactionLogs200Response, Integer, Hash)>

List card&#39;s transactions (Management API) Retrieve the transaction logs for the given [loyalty card](docs.talon.one/docs/product/loyalty-programs/card-based/card-based-overview) within the specified [card-based loyalty program](docs.talon.one/docs/product/loyalty-programs/overview#loyalty-program-types) with filtering options applied. &gt; [!note] For most use cases, especially real-time integrations, use the Integration API endpoint: &gt; [List card&#39;s transactions](docs.talon.one/integration-api#tag/Loyalty-cards/operation/getLoyaltyCardTransactions). If no filtering options are applied, the last 50 loyalty transactions for the given loyalty card are returned.

Parameters:

Options Hash (opts):

  • :start_date (Time)

    Date and time from which results are returned. Results are filtered by transaction creation date. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered.

  • :end_date (Time)

    Date and time by which results are returned. Results are filtered by transaction creation date. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered.

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :subledger_id (String)

    The ID of the subledger by which we filter the data.

  • :customer_session_ids (Array<String>)

    Filter the results by a list of customer session IDs. To include multiple IDs, repeat the parameter for each one, for example, &#x60;?customerSessionIDs&#x3D;id1&amp;customerSessionIDs&#x3D;id2&#x60;. The response contains only data associated with the specified sessions.

  • :transaction_uuids (Array<String>)

    Filter the results by a list of transaction UUIDs. To include multiple IDs, repeat the parameter for each one, for example, &#x60;?transactionUUIDs&#x3D;uuid1&amp;transactionUUIDs&#x3D;uuid2&#x60;. The response contains only data associated with the specified transactions.

Returns:



8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
# File 'lib/talon_one_sdk/api/management_api.rb', line 8397

def get_loyalty_card_transaction_logs_with_http_info(loyalty_program_id, loyalty_card_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_loyalty_card_transaction_logs ...'
  end
  # verify the required parameter 'loyalty_program_id' is set
  if @api_client.config.client_side_validation && loyalty_program_id.nil?
    fail ArgumentError, "Missing the required parameter 'loyalty_program_id' when calling ManagementApi.get_loyalty_card_transaction_logs"
  end
  # verify the required parameter 'loyalty_card_id' is set
  if @api_client.config.client_side_validation && loyalty_card_id.nil?
    fail ArgumentError, "Missing the required parameter 'loyalty_card_id' when calling ManagementApi.get_loyalty_card_transaction_logs"
  end
  if @api_client.config.client_side_validation && loyalty_card_id.to_s.length > 108
    fail ArgumentError, 'invalid value for "loyalty_card_id" when calling ManagementApi.get_loyalty_card_transaction_logs, the character length must be smaller than or equal to 108.'
  end

  if @api_client.config.client_side_validation && loyalty_card_id.to_s.length < 4
    fail ArgumentError, 'invalid value for "loyalty_card_id" when calling ManagementApi.get_loyalty_card_transaction_logs, the character length must be greater than or equal to 4.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_loyalty_card_transaction_logs, must be smaller than or equal to 1000.'
  end

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

  # resource path
  local_var_path = '/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/logs'.sub('{loyaltyProgramId}', CGI.escape(loyalty_program_id.to_s)).sub('{loyaltyCardId}', CGI.escape(loyalty_card_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'startDate'] = opts[:'start_date'] if !opts[:'start_date'].nil?
  query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil?
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
  query_params[:'subledgerId'] = opts[:'subledger_id'] if !opts[:'subledger_id'].nil?
  query_params[:'customerSessionIDs'] = @api_client.build_collection_param(opts[:'customer_session_ids'], :multi) if !opts[:'customer_session_ids'].nil?
  query_params[:'transactionUUIDs'] = @api_client.build_collection_param(opts[:'transaction_uuids'], :multi) if !opts[:'transaction_uuids'].nil?

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_loyalty_card_transaction_logs",
    :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_card_transaction_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_loyalty_card_with_http_info(loyalty_program_id, loyalty_card_id, opts = {}) ⇒ Array<(LoyaltyCard, Integer, Hash)>

Get loyalty card Get the given loyalty card.

Parameters:

Returns:

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

    LoyaltyCard data, response status code and response headers



8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
# File 'lib/talon_one_sdk/api/management_api.rb', line 8306

def get_loyalty_card_with_http_info(loyalty_program_id, loyalty_card_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_loyalty_card ...'
  end
  # verify the required parameter 'loyalty_program_id' is set
  if @api_client.config.client_side_validation && loyalty_program_id.nil?
    fail ArgumentError, "Missing the required parameter 'loyalty_program_id' when calling ManagementApi.get_loyalty_card"
  end
  # verify the required parameter 'loyalty_card_id' is set
  if @api_client.config.client_side_validation && loyalty_card_id.nil?
    fail ArgumentError, "Missing the required parameter 'loyalty_card_id' when calling ManagementApi.get_loyalty_card"
  end
  if @api_client.config.client_side_validation && loyalty_card_id.to_s.length > 108
    fail ArgumentError, 'invalid value for "loyalty_card_id" when calling ManagementApi.get_loyalty_card, the character length must be smaller than or equal to 108.'
  end

  if @api_client.config.client_side_validation && loyalty_card_id.to_s.length < 4
    fail ArgumentError, 'invalid value for "loyalty_card_id" when calling ManagementApi.get_loyalty_card, the character length must be greater than or equal to 4.'
  end

  # resource path
  local_var_path = '/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}'.sub('{loyaltyProgramId}', CGI.escape(loyalty_program_id.to_s)).sub('{loyaltyCardId}', CGI.escape(loyalty_card_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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_loyalty_card",
    :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_card\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_loyalty_cards(loyalty_program_id, opts = {}) ⇒ GetLoyaltyCards200Response

List loyalty cards For the given card-based loyalty program, list the loyalty cards that match your filter criteria.

Parameters:

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

  • :identifier (String)

    The card code by which to filter loyalty cards in the response. Important: The loyalty card ID requires [URL encoding](www.w3schools.com/tags//ref_urlencode.asp) if it contains special characters. For example, you must encode &#x60;NewCard2026%&#x60; as &#x60;NewCard2026%25&#x60;.

  • :profile_id (Integer)

    Filter results by customer profile ID.

  • :batch_id (String)

    Filter results by loyalty card batch ID.

Returns:



8483
8484
8485
8486
# File 'lib/talon_one_sdk/api/management_api.rb', line 8483

def get_loyalty_cards(loyalty_program_id, opts = {})
  data, _status_code, _headers = get_loyalty_cards_with_http_info(loyalty_program_id, opts)
  data
end

#get_loyalty_cards_with_http_info(loyalty_program_id, opts = {}) ⇒ Array<(GetLoyaltyCards200Response, Integer, Hash)>

List loyalty cards For the given card-based loyalty program, list the loyalty cards that match your filter criteria.

Parameters:

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

  • :identifier (String)

    The card code by which to filter loyalty cards in the response. Important: The loyalty card ID requires [URL encoding](www.w3schools.com/tags//ref_urlencode.asp) if it contains special characters. For example, you must encode &#x60;NewCard2026%&#x60; as &#x60;NewCard2026%25&#x60;.

  • :profile_id (Integer)

    Filter results by customer profile ID.

  • :batch_id (String)

    Filter results by loyalty card batch ID.

Returns:

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

    GetLoyaltyCards200Response data, response status code and response headers



8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
# File 'lib/talon_one_sdk/api/management_api.rb', line 8499

def get_loyalty_cards_with_http_info(loyalty_program_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_loyalty_cards ...'
  end
  # verify the required parameter 'loyalty_program_id' is set
  if @api_client.config.client_side_validation && loyalty_program_id.nil?
    fail ArgumentError, "Missing the required parameter 'loyalty_program_id' when calling ManagementApi.get_loyalty_cards"
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_loyalty_cards, must be smaller than or equal to 1000.'
  end

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

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

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

  # resource path
  local_var_path = '/v1/loyalty_programs/{loyaltyProgramId}/cards'.sub('{loyaltyProgramId}', CGI.escape(loyalty_program_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[:'identifier'] = opts[:'identifier'] if !opts[:'identifier'].nil?
  query_params[:'profileId'] = opts[:'profile_id'] if !opts[:'profile_id'].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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_loyalty_cards",
    :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_cards\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_loyalty_ledger_balances(loyalty_program_id, integration_id, opts = {}) ⇒ LoyaltyBalancesWithTiers

Get customer’s loyalty balances (Management API) Retrieve loyalty ledger balances for the given Integration ID in the specified loyalty program. You can filter balances by date and subledger ID, and include tier-related information in the response. > [!note] Note > - For most use cases, especially real-time integrations, use the Integration API endpoint: [Get customer’s loyalty balances](docs.talon.one/integration-api#tag/Loyalty/operation/getLoyaltyBalances). > - If no filtering options are applied, you retrieve all loyalty balances on the current date for the given integration ID. Loyalty balances are calculated when Talon.One receives your request using the points stored in our database, so retrieving a large number of balances at once can impact performance. For more information, see: - [Managing card-based loyalty program data](docs.talon.one/docs/product/loyalty-programs/card-based/managing-loyalty-cards) - [Managing profile-based loyalty program data](docs.talon.one/docs/product/loyalty-programs/profile-based/managing-pb-lp-data)

Parameters:

  • loyalty_program_id (Integer)

    Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint.

  • integration_id (String)

    The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier.

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

    the optional parameters

Options Hash (opts):

  • :end_date (Time)

    Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered.

  • :subledger_id (String)

    The ID of the subledger used to filter the data. Leave this value empty (&quot;&quot;) to query the main ledger.

  • :include_tiers (Boolean)

    Indicates whether tier information is included in the response. When set to &#x60;true&#x60;, the response includes information about the current tier and the number of points required to move to next tier. (default to false)

  • :include_projected_tier (Boolean)

    Indicates whether the customer&#39;s projected tier information is included in the response. When set to &#x60;true&#x60;, the response includes information about the customer&#39;s active points and the name of the projected tier. Note We recommend filtering by &#x60;subledgerId&#x60; for better performance. (default to false)

Returns:



8579
8580
8581
8582
# File 'lib/talon_one_sdk/api/management_api.rb', line 8579

def get_loyalty_ledger_balances(loyalty_program_id, integration_id, opts = {})
  data, _status_code, _headers = get_loyalty_ledger_balances_with_http_info(loyalty_program_id, integration_id, opts)
  data
end

#get_loyalty_ledger_balances_with_http_info(loyalty_program_id, integration_id, opts = {}) ⇒ Array<(LoyaltyBalancesWithTiers, Integer, Hash)>

Get customer&#39;s loyalty balances (Management API) Retrieve loyalty ledger balances for the given Integration ID in the specified loyalty program. You can filter balances by date and subledger ID, and include tier-related information in the response. &gt; [!note] Note &gt; - For most use cases, especially real-time integrations, use the Integration API endpoint: [Get customer&#39;s loyalty balances](docs.talon.one/integration-api#tag/Loyalty/operation/getLoyaltyBalances). &gt; - If no filtering options are applied, you retrieve all loyalty balances on the current date for the given integration ID. Loyalty balances are calculated when Talon.One receives your request using the points stored in our database, so retrieving a large number of balances at once can impact performance. For more information, see: - [Managing card-based loyalty program data](docs.talon.one/docs/product/loyalty-programs/card-based/managing-loyalty-cards) - [Managing profile-based loyalty program data](docs.talon.one/docs/product/loyalty-programs/profile-based/managing-pb-lp-data)

Parameters:

  • loyalty_program_id (Integer)

    Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint.

  • integration_id (String)

    The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier.

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

    the optional parameters

Options Hash (opts):

  • :end_date (Time)

    Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered.

  • :subledger_id (String)

    The ID of the subledger used to filter the data. Leave this value empty (&quot;&quot;) to query the main ledger.

  • :include_tiers (Boolean)

    Indicates whether tier information is included in the response. When set to &#x60;true&#x60;, the response includes information about the current tier and the number of points required to move to next tier. (default to false)

  • :include_projected_tier (Boolean)

    Indicates whether the customer&#39;s projected tier information is included in the response. When set to &#x60;true&#x60;, the response includes information about the customer&#39;s active points and the name of the projected tier. Note We recommend filtering by &#x60;subledgerId&#x60; for better performance. (default to false)

Returns:

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

    LoyaltyBalancesWithTiers data, response status code and response headers



8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
# File 'lib/talon_one_sdk/api/management_api.rb', line 8594

def get_loyalty_ledger_balances_with_http_info(loyalty_program_id, integration_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_loyalty_ledger_balances ...'
  end
  # verify the required parameter 'loyalty_program_id' is set
  if @api_client.config.client_side_validation && loyalty_program_id.nil?
    fail ArgumentError, "Missing the required parameter 'loyalty_program_id' when calling ManagementApi.get_loyalty_ledger_balances"
  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_ledger_balances"
  end
  # resource path
  local_var_path = '/v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/ledger_balances'.sub('{loyaltyProgramId}', CGI.escape(loyalty_program_id.to_s)).sub('{integrationId}', CGI.escape(integration_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil?
  query_params[:'subledgerId'] = opts[:'subledger_id'] if !opts[:'subledger_id'].nil?
  query_params[:'includeTiers'] = opts[:'include_tiers'] if !opts[:'include_tiers'].nil?
  query_params[:'includeProjectedTier'] = opts[:'include_projected_tier'] if !opts[:'include_projected_tier'].nil?

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_loyalty_ledger_balances",
    :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_ledger_balances\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_loyalty_points(loyalty_program_id, integration_id, opts = {}) ⇒ LoyaltyLedger

Get customer’s full loyalty ledger Get the loyalty ledger for this profile integration ID. To get the ‘integrationId` of the profile from a `sessionId`, use the [Update customer session](docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) endpoint. Important: To get loyalty transaction logs for a given Integration ID in a loyalty program, we recommend using the Integration API’s [Get customer’s loyalty logs](docs.talon.one/integration-api#tag/Loyalty/operation/getLoyaltyProgramProfileTransactions).

Parameters:

  • loyalty_program_id (String)

    The identifier for the loyalty program.

  • integration_id (String)

    The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier.

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

    the optional parameters

Returns:



8656
8657
8658
8659
# File 'lib/talon_one_sdk/api/management_api.rb', line 8656

def get_loyalty_points(loyalty_program_id, integration_id, opts = {})
  data, _status_code, _headers = get_loyalty_points_with_http_info(loyalty_program_id, integration_id, opts)
  data
end

#get_loyalty_points_with_http_info(loyalty_program_id, integration_id, opts = {}) ⇒ Array<(LoyaltyLedger, Integer, Hash)>

Get customer&#39;s full loyalty ledger Get the loyalty ledger for this profile integration ID. To get the &#x60;integrationId&#x60; of the profile from a &#x60;sessionId&#x60;, use the [Update customer session](docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) endpoint. Important: To get loyalty transaction logs for a given Integration ID in a loyalty program, we recommend using the Integration API&#39;s [Get customer&#39;s loyalty logs](docs.talon.one/integration-api#tag/Loyalty/operation/getLoyaltyProgramProfileTransactions).

Parameters:

  • loyalty_program_id (String)

    The identifier for the loyalty program.

  • integration_id (String)

    The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier.

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

    the optional parameters

Returns:

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

    LoyaltyLedger data, response status code and response headers



8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
# File 'lib/talon_one_sdk/api/management_api.rb', line 8667

def get_loyalty_points_with_http_info(loyalty_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 'loyalty_program_id' is set
  if @api_client.config.client_side_validation && loyalty_program_id.nil?
    fail ArgumentError, "Missing the required parameter 'loyalty_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/{loyaltyProgramId}/profile/{integrationId}'.sub('{loyaltyProgramId}', CGI.escape(loyalty_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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_loyalty_points",
    :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(loyalty_program_id, opts = {}) ⇒ LoyaltyProgram

Get loyalty program Get the specified [loyalty program](docs.talon.one/docs/product/loyalty-programs/overview). To list all loyalty programs in your Application, use [List loyalty programs](#tag/Loyalty/operation/getLoyaltyPrograms). To list the loyalty programs that a customer profile is part of, use [List customer data](docs.talon.one/integration-api#tag/Customer-profiles/operation/getCustomerInventory).

Parameters:

Returns:



8724
8725
8726
8727
# File 'lib/talon_one_sdk/api/management_api.rb', line 8724

def get_loyalty_program(loyalty_program_id, opts = {})
  data, _status_code, _headers = get_loyalty_program_with_http_info(loyalty_program_id, opts)
  data
end

#get_loyalty_program_profile_ledger_transactions(loyalty_program_id, integration_id, opts = {}) ⇒ GetLoyaltyProgramProfileTransactions200Response

List customer’s loyalty transactions (Management API) Retrieve paginated results of loyalty transaction logs for the given Integration ID in the specified loyalty program. You can filter transactions by date or by ledger (subledger or main ledger). If no filters are applied, the last 50 loyalty transactions for the given integration ID are returned. > [!note] Note > - For most use cases, especially real-time integrations, use the Integration API endpoint: > [List customer’s loyalty transactions](docs.talon.one/integration-api#tag/Loyalty/operation/getLoyaltyProgramProfileTransactions). > - To retrieve all loyalty program transaction logs in a given loyalty program, use the > [List loyalty program transactions](docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyProgramTransactions) endpoint.

Parameters:

  • loyalty_program_id (Integer)

    Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint.

  • integration_id (String)

    The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier.

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

    the optional parameters

Options Hash (opts):

  • :customer_session_ids (Array<String>)

    Filter the results by a list of customer session IDs. To include multiple IDs, repeat the parameter for each one, for example, &#x60;?customerSessionIDs&#x3D;id1&amp;customerSessionIDs&#x3D;id2&#x60;. The response contains only data associated with the specified sessions.

  • :transaction_uuids (Array<String>)

    Filter the results by a list of transaction UUIDs. To include multiple IDs, repeat the parameter for each one, for example, &#x60;?transactionUUIDs&#x3D;uuid1&amp;transactionUUIDs&#x3D;uuid2&#x60;. The response contains only data associated with the specified transactions.

  • :subledger_id (String)

    The ID of the subledger used to filter the data. Leave this value empty (&quot;&quot;) to query the main ledger.

  • :loyalty_transaction_type (String)

    Filter results by loyalty transaction type: - &#x60;manual&#x60;: Loyalty transaction that was done manually. - &#x60;session&#x60;: Loyalty transaction that resulted from a customer session. - &#x60;import&#x60;: Loyalty transaction that was imported from a CSV file.

  • :start_date (Time)

    Date and time from which results are returned. Results are filtered by transaction creation date. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered.

  • :end_date (Time)

    Date and time by which results are returned. Results are filtered by transaction creation date. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered.

  • :page_size (Integer)

    The number of items in the response. (default to 50)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :awaits_activation (Boolean)

    If &#x60;true&#x60;: Filters results to include only point transactions that have action-based activation and have not expired. If &#x60;false&#x60;: Returns a &#x60;400&#x60; response.

Returns:



8797
8798
8799
8800
# File 'lib/talon_one_sdk/api/management_api.rb', line 8797

def get_loyalty_program_profile_ledger_transactions(loyalty_program_id, integration_id, opts = {})
  data, _status_code, _headers = get_loyalty_program_profile_ledger_transactions_with_http_info(loyalty_program_id, integration_id, opts)
  data
end

#get_loyalty_program_profile_ledger_transactions_with_http_info(loyalty_program_id, integration_id, opts = {}) ⇒ Array<(GetLoyaltyProgramProfileTransactions200Response, Integer, Hash)>

List customer&#39;s loyalty transactions (Management API) Retrieve paginated results of loyalty transaction logs for the given Integration ID in the specified loyalty program. You can filter transactions by date or by ledger (subledger or main ledger). If no filters are applied, the last 50 loyalty transactions for the given integration ID are returned. &gt; [!note] Note &gt; - For most use cases, especially real-time integrations, use the Integration API endpoint: &gt; [List customer&#39;s loyalty transactions](docs.talon.one/integration-api#tag/Loyalty/operation/getLoyaltyProgramProfileTransactions). &gt; - To retrieve all loyalty program transaction logs in a given loyalty program, use the &gt; [List loyalty program transactions](docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyProgramTransactions) endpoint.

Parameters:

  • loyalty_program_id (Integer)

    Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint.

  • integration_id (String)

    The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier.

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

    the optional parameters

Options Hash (opts):

  • :customer_session_ids (Array<String>)

    Filter the results by a list of customer session IDs. To include multiple IDs, repeat the parameter for each one, for example, &#x60;?customerSessionIDs&#x3D;id1&amp;customerSessionIDs&#x3D;id2&#x60;. The response contains only data associated with the specified sessions.

  • :transaction_uuids (Array<String>)

    Filter the results by a list of transaction UUIDs. To include multiple IDs, repeat the parameter for each one, for example, &#x60;?transactionUUIDs&#x3D;uuid1&amp;transactionUUIDs&#x3D;uuid2&#x60;. The response contains only data associated with the specified transactions.

  • :subledger_id (String)

    The ID of the subledger used to filter the data. Leave this value empty (&quot;&quot;) to query the main ledger.

  • :loyalty_transaction_type (String)

    Filter results by loyalty transaction type: - &#x60;manual&#x60;: Loyalty transaction that was done manually. - &#x60;session&#x60;: Loyalty transaction that resulted from a customer session. - &#x60;import&#x60;: Loyalty transaction that was imported from a CSV file.

  • :start_date (Time)

    Date and time from which results are returned. Results are filtered by transaction creation date. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered.

  • :end_date (Time)

    Date and time by which results are returned. Results are filtered by transaction creation date. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered.

  • :page_size (Integer)

    The number of items in the response. (default to 50)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :awaits_activation (Boolean)

    If &#x60;true&#x60;: Filters results to include only point transactions that have action-based activation and have not expired. If &#x60;false&#x60;: Returns a &#x60;400&#x60; response.

Returns:



8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
# File 'lib/talon_one_sdk/api/management_api.rb', line 8817

def get_loyalty_program_profile_ledger_transactions_with_http_info(loyalty_program_id, integration_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_loyalty_program_profile_ledger_transactions ...'
  end
  # verify the required parameter 'loyalty_program_id' is set
  if @api_client.config.client_side_validation && loyalty_program_id.nil?
    fail ArgumentError, "Missing the required parameter 'loyalty_program_id' when calling ManagementApi.get_loyalty_program_profile_ledger_transactions"
  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_program_profile_ledger_transactions"
  end
  allowable_values = ["manual", "session", "import"]
  if @api_client.config.client_side_validation && opts[:'loyalty_transaction_type'] && !allowable_values.include?(opts[:'loyalty_transaction_type'])
    fail ArgumentError, "invalid value for \"loyalty_transaction_type\", must be one of #{allowable_values}"
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_loyalty_program_profile_ledger_transactions, must be smaller than or equal to 1000.'
  end

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

  # resource path
  local_var_path = '/v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/ledger_transactions'.sub('{loyaltyProgramId}', CGI.escape(loyalty_program_id.to_s)).sub('{integrationId}', CGI.escape(integration_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'customerSessionIDs'] = @api_client.build_collection_param(opts[:'customer_session_ids'], :multi) if !opts[:'customer_session_ids'].nil?
  query_params[:'transactionUUIDs'] = @api_client.build_collection_param(opts[:'transaction_uuids'], :multi) if !opts[:'transaction_uuids'].nil?
  query_params[:'subledgerId'] = opts[:'subledger_id'] if !opts[:'subledger_id'].nil?
  query_params[:'loyaltyTransactionType'] = opts[:'loyalty_transaction_type'] if !opts[:'loyalty_transaction_type'].nil?
  query_params[:'startDate'] = opts[:'start_date'] if !opts[:'start_date'].nil?
  query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil?
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
  query_params[:'awaitsActivation'] = opts[:'awaits_activation'] if !opts[:'awaits_activation'].nil?

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_loyalty_program_profile_ledger_transactions",
    :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_profile_ledger_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_loyalty_program_transactions(loyalty_program_id, opts = {}) ⇒ GetLoyaltyProgramTransactions200Response

List loyalty program transactions Retrieve loyalty program transaction logs in a given loyalty program with filtering options applied. Manual and imported transactions are also included. > [!note] Note > - If no filters are applied, the last 50 loyalty transactions for the given loyalty program are returned. > - To get loyalty transaction logs for a given Integration ID in > a loyalty program, we recommend using the Integration API’s [Get customer’s loyalty > logs](docs.talon.one/integration-api#tag/Loyalty/operation/getLoyaltyProgramProfileTransactions).

Parameters:

Options Hash (opts):

  • :loyalty_transaction_type (String)

    Filter results by loyalty transaction type: - &#x60;manual&#x60;: Loyalty transaction that was done manually. - &#x60;session&#x60;: Loyalty transaction that resulted from a customer session. - &#x60;import&#x60;: Loyalty transaction that was imported from a CSV file.

  • :subledger_id (String)

    The ID of the subledger by which we filter the data.

  • :customer_session_ids (Array<String>)

    Filter the results by a list of customer session IDs. To include multiple IDs, repeat the parameter for each one, for example, &#x60;?customerSessionIDs&#x3D;id1&amp;customerSessionIDs&#x3D;id2&#x60;. The response contains only data associated with the specified sessions.

  • :transaction_uuids (Array<String>)

    Filter the results by a list of transaction UUIDs. To include multiple IDs, repeat the parameter for each one, for example, &#x60;?transactionUUIDs&#x3D;uuid1&amp;transactionUUIDs&#x3D;uuid2&#x60;. The response contains only data associated with the specified transactions.

  • :start_date (Time)

    Date and time from which results are returned. Results are filtered by transaction creation date. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered.

  • :end_date (Time)

    Date and time by which results are returned. Results are filtered by transaction creation date. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered.

  • :page_size (Integer)

    The number of items in the response. (default to 50)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :awaits_activation (Boolean)

    If &#x60;true&#x60;: Filters results to include only point transactions that have action-based activation and have not expired. If &#x60;false&#x60;: Returns a &#x60;400&#x60; response.

Returns:



8904
8905
8906
8907
# File 'lib/talon_one_sdk/api/management_api.rb', line 8904

def get_loyalty_program_transactions(loyalty_program_id, opts = {})
  data, _status_code, _headers = get_loyalty_program_transactions_with_http_info(loyalty_program_id, opts)
  data
end

#get_loyalty_program_transactions_with_http_info(loyalty_program_id, opts = {}) ⇒ Array<(GetLoyaltyProgramTransactions200Response, Integer, Hash)>

List loyalty program transactions Retrieve loyalty program transaction logs in a given loyalty program with filtering options applied. Manual and imported transactions are also included. &gt; [!note] Note &gt; - If no filters are applied, the last 50 loyalty transactions for the given loyalty program are returned. &gt; - To get loyalty transaction logs for a given Integration ID in &gt; a loyalty program, we recommend using the Integration API&#39;s [Get customer&#39;s loyalty &gt; logs](docs.talon.one/integration-api#tag/Loyalty/operation/getLoyaltyProgramProfileTransactions).

Parameters:

Options Hash (opts):

  • :loyalty_transaction_type (String)

    Filter results by loyalty transaction type: - &#x60;manual&#x60;: Loyalty transaction that was done manually. - &#x60;session&#x60;: Loyalty transaction that resulted from a customer session. - &#x60;import&#x60;: Loyalty transaction that was imported from a CSV file.

  • :subledger_id (String)

    The ID of the subledger by which we filter the data.

  • :customer_session_ids (Array<String>)

    Filter the results by a list of customer session IDs. To include multiple IDs, repeat the parameter for each one, for example, &#x60;?customerSessionIDs&#x3D;id1&amp;customerSessionIDs&#x3D;id2&#x60;. The response contains only data associated with the specified sessions.

  • :transaction_uuids (Array<String>)

    Filter the results by a list of transaction UUIDs. To include multiple IDs, repeat the parameter for each one, for example, &#x60;?transactionUUIDs&#x3D;uuid1&amp;transactionUUIDs&#x3D;uuid2&#x60;. The response contains only data associated with the specified transactions.

  • :start_date (Time)

    Date and time from which results are returned. Results are filtered by transaction creation date. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered.

  • :end_date (Time)

    Date and time by which results are returned. Results are filtered by transaction creation date. &gt; [!note] Note &gt; - This must be an RFC3339 timestamp string. &gt; - You can include a time component in your string, for example, &#x60;T23:59:59&#x60; to specify the end of the day. The time zone setting &gt; considered is &#x60;UTC&#x60;. If you do not include a time component, a default time value of &#x60;T00:00:00&#x60; (midnight) in &#x60;UTC&#x60; is considered.

  • :page_size (Integer)

    The number of items in the response. (default to 50)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :awaits_activation (Boolean)

    If &#x60;true&#x60;: Filters results to include only point transactions that have action-based activation and have not expired. If &#x60;false&#x60;: Returns a &#x60;400&#x60; response.

Returns:



8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
# File 'lib/talon_one_sdk/api/management_api.rb', line 8923

def get_loyalty_program_transactions_with_http_info(loyalty_program_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_loyalty_program_transactions ...'
  end
  # verify the required parameter 'loyalty_program_id' is set
  if @api_client.config.client_side_validation && loyalty_program_id.nil?
    fail ArgumentError, "Missing the required parameter 'loyalty_program_id' when calling ManagementApi.get_loyalty_program_transactions"
  end
  allowable_values = ["manual", "session", "import"]
  if @api_client.config.client_side_validation && opts[:'loyalty_transaction_type'] && !allowable_values.include?(opts[:'loyalty_transaction_type'])
    fail ArgumentError, "invalid value for \"loyalty_transaction_type\", must be one of #{allowable_values}"
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_loyalty_program_transactions, must be smaller than or equal to 1000.'
  end

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

  # resource path
  local_var_path = '/v1/loyalty_programs/{loyaltyProgramId}/transactions'.sub('{loyaltyProgramId}', CGI.escape(loyalty_program_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'loyaltyTransactionType'] = opts[:'loyalty_transaction_type'] if !opts[:'loyalty_transaction_type'].nil?
  query_params[:'subledgerId'] = opts[:'subledger_id'] if !opts[:'subledger_id'].nil?
  query_params[:'customerSessionIDs'] = @api_client.build_collection_param(opts[:'customer_session_ids'], :multi) if !opts[:'customer_session_ids'].nil?
  query_params[:'transactionUUIDs'] = @api_client.build_collection_param(opts[:'transaction_uuids'], :multi) if !opts[:'transaction_uuids'].nil?
  query_params[:'startDate'] = opts[:'start_date'] if !opts[:'start_date'].nil?
  query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil?
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
  query_params[:'awaitsActivation'] = opts[:'awaits_activation'] if !opts[:'awaits_activation'].nil?

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_loyalty_program_transactions",
    :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_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_loyalty_program_with_http_info(loyalty_program_id, opts = {}) ⇒ Array<(LoyaltyProgram, Integer, Hash)>

Get loyalty program Get the specified [loyalty program](docs.talon.one/docs/product/loyalty-programs/overview). To list all loyalty programs in your Application, use [List loyalty programs](#tag/Loyalty/operation/getLoyaltyPrograms). To list the loyalty programs that a customer profile is part of, use [List customer data](docs.talon.one/integration-api#tag/Customer-profiles/operation/getCustomerInventory).

Parameters:

Returns:

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

    LoyaltyProgram data, response status code and response headers



8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
# File 'lib/talon_one_sdk/api/management_api.rb', line 8734

def get_loyalty_program_with_http_info(loyalty_program_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_loyalty_program ...'
  end
  # verify the required parameter 'loyalty_program_id' is set
  if @api_client.config.client_side_validation && loyalty_program_id.nil?
    fail ArgumentError, "Missing the required parameter 'loyalty_program_id' when calling ManagementApi.get_loyalty_program"
  end
  # resource path
  local_var_path = '/v1/loyalty_programs/{loyaltyProgramId}'.sub('{loyaltyProgramId}', CGI.escape(loyalty_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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_loyalty_program",
    :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 = {}) ⇒ GetLoyaltyPrograms200Response

List loyalty programs List the loyalty programs of the account.

Parameters:

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

    the optional parameters

Returns:



8996
8997
8998
8999
# File 'lib/talon_one_sdk/api/management_api.rb', line 8996

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 = {}) ⇒ Array<(GetLoyaltyPrograms200Response, Integer, Hash)>

List loyalty programs List the loyalty programs of the account.

Parameters:

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

    the optional parameters

Returns:



9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
# File 'lib/talon_one_sdk/api/management_api.rb', line 9005

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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_loyalty_programs",
    :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(loyalty_program_id, opts = {}) ⇒ LoyaltyDashboardData

Get loyalty program statistics > [warning] This endpoint is deprecated. To retrieve statistics for a loyalty program, use the [Get statistics for loyalty dashboard](/management-api#tag/Loyalty/operation/getDashboardStatistics) endpoint. Retrieve the statistics of the specified loyalty program, such as the total active points, pending points, spent points, and expired points.

Parameters:

Returns:



9054
9055
9056
9057
# File 'lib/talon_one_sdk/api/management_api.rb', line 9054

def get_loyalty_statistics(loyalty_program_id, opts = {})
  data, _status_code, _headers = get_loyalty_statistics_with_http_info(loyalty_program_id, opts)
  data
end

#get_loyalty_statistics_with_http_info(loyalty_program_id, opts = {}) ⇒ Array<(LoyaltyDashboardData, Integer, Hash)>

Get loyalty program statistics &gt; [warning] This endpoint is deprecated. To retrieve statistics for a loyalty program, use the [Get statistics for loyalty dashboard](/management-api#tag/Loyalty/operation/getDashboardStatistics) endpoint. Retrieve the statistics of the specified loyalty program, such as the total active points, pending points, spent points, and expired points.

Parameters:

Returns:

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

    LoyaltyDashboardData data, response status code and response headers



9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
# File 'lib/talon_one_sdk/api/management_api.rb', line 9064

def get_loyalty_statistics_with_http_info(loyalty_program_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_loyalty_statistics ...'
  end
  # verify the required parameter 'loyalty_program_id' is set
  if @api_client.config.client_side_validation && loyalty_program_id.nil?
    fail ArgumentError, "Missing the required parameter 'loyalty_program_id' when calling ManagementApi.get_loyalty_statistics"
  end
  # resource path
  local_var_path = '/v1/loyalty_programs/{loyaltyProgramId}/statistics'.sub('{loyaltyProgramId}', CGI.escape(loyalty_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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_loyalty_statistics",
    :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_message_logs(entity_type, opts = {}) ⇒ MessageLogEntries

List message log entries Retrieve all message log entries.

Parameters:

  • entity_type (String)

    The entity type the log is related to.

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

    the optional parameters

Options Hash (opts):

  • :message_id (String)

    Filter results by message ID.

  • :change_type (String)

    Filter results by change type.

  • :notification_ids (String)

    Filter results by notification ID (include up to 30 values, separated by a comma).

  • :created_before (Time)

    Filter results where request and response times to return entries before parameter value, expected to be an RFC3339 timestamp string. Use UTC time.

  • :created_after (Time)

    Filter results where request and response times to return entries after parameter value, expected to be an RFC3339 timestamp string. Use UTC time.

  • :cursor (String)

    A specific unique value in the database. If this value is not given, the server fetches results starting with the first record.

  • :period (String)

    Filter results by time period. Choose between the available relative time frames.

  • :is_successful (Boolean)

    Indicates whether to return log entries with either successful or unsuccessful HTTP response codes. When set to&#x60;true&#x60;, only log entries with &#x60;2xx&#x60; response codes are returned. When set to &#x60;false&#x60;, only log entries with &#x60;4xx&#x60; and &#x60;5xx&#x60; response codes are returned.

  • :application_id (Float)

    Filter results by Application ID.

  • :campaign_id (Float)

    Filter results by campaign ID.

  • :loyalty_program_id (Integer)

    Identifier of the loyalty program.

  • :response_code (Integer)

    Filter results by response status code.

  • :webhook_ids (String)

    Filter results by webhook ID (include up to 30 values, separated by a comma).

Returns:



9130
9131
9132
9133
# File 'lib/talon_one_sdk/api/management_api.rb', line 9130

def get_message_logs(entity_type, opts = {})
  data, _status_code, _headers = get_message_logs_with_http_info(entity_type, opts)
  data
end

#get_message_logs_with_http_info(entity_type, opts = {}) ⇒ Array<(MessageLogEntries, Integer, Hash)>

List message log entries Retrieve all message log entries.

Parameters:

  • entity_type (String)

    The entity type the log is related to.

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

    the optional parameters

Options Hash (opts):

  • :message_id (String)

    Filter results by message ID.

  • :change_type (String)

    Filter results by change type.

  • :notification_ids (String)

    Filter results by notification ID (include up to 30 values, separated by a comma).

  • :created_before (Time)

    Filter results where request and response times to return entries before parameter value, expected to be an RFC3339 timestamp string. Use UTC time.

  • :created_after (Time)

    Filter results where request and response times to return entries after parameter value, expected to be an RFC3339 timestamp string. Use UTC time.

  • :cursor (String)

    A specific unique value in the database. If this value is not given, the server fetches results starting with the first record.

  • :period (String)

    Filter results by time period. Choose between the available relative time frames.

  • :is_successful (Boolean)

    Indicates whether to return log entries with either successful or unsuccessful HTTP response codes. When set to&#x60;true&#x60;, only log entries with &#x60;2xx&#x60; response codes are returned. When set to &#x60;false&#x60;, only log entries with &#x60;4xx&#x60; and &#x60;5xx&#x60; response codes are returned.

  • :application_id (Float)

    Filter results by Application ID.

  • :campaign_id (Float)

    Filter results by campaign ID.

  • :loyalty_program_id (Integer)

    Identifier of the loyalty program.

  • :response_code (Integer)

    Filter results by response status code.

  • :webhook_ids (String)

    Filter results by webhook ID (include up to 30 values, separated by a comma).

Returns:

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

    MessageLogEntries data, response status code and response headers



9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
# File 'lib/talon_one_sdk/api/management_api.rb', line 9153

def get_message_logs_with_http_info(entity_type, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_message_logs ...'
  end
  # verify the required parameter 'entity_type' is set
  if @api_client.config.client_side_validation && entity_type.nil?
    fail ArgumentError, "Missing the required parameter 'entity_type' when calling ManagementApi.get_message_logs"
  end
  # verify enum value
  allowable_values = ["application", "loyalty_program", "webhook"]
  if @api_client.config.client_side_validation && !allowable_values.include?(entity_type)
    fail ArgumentError, "invalid value for \"entity_type\", must be one of #{allowable_values}"
  end
  allowable_values = ["CampaignEvaluationTreeChanged", "CampaignNotification", "CouponCreated", "CouponUpdated", "CouponDeleted", "AsyncCouponsCreated", "CouponsDeleted", "CouponsUpdated", "CouponCodeExpiring", "StrikethroughPrice", "LoyaltyPointsAdded", "LoyaltyPointsDeducted", "LoyaltyPointsExpiring", "LoyaltyPointsPendingToActive", "LoyaltyAddedDeductedPointsBalances", "LoyaltyCardAddedDeductedPointsBalances", "TierWillDowngrade", "TierUpgrade", "TierDowngrade", "LoyaltyCardPointsAdded", "LoyaltyCardPointsDeducted", "LoyaltyCardPointsExpiring"]
  if @api_client.config.client_side_validation && opts[:'change_type'] && !allowable_values.include?(opts[:'change_type'])
    fail ArgumentError, "invalid value for \"change_type\", must be one of #{allowable_values}"
  end
  allowable_values = ["15m", "30m", "1h", "4h", "1d", "2d"]
  if @api_client.config.client_side_validation && opts[:'period'] && !allowable_values.include?(opts[:'period'])
    fail ArgumentError, "invalid value for \"period\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/message_logs'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'entityType'] = entity_type
  query_params[:'messageID'] = opts[:'message_id'] if !opts[:'message_id'].nil?
  query_params[:'changeType'] = opts[:'change_type'] if !opts[:'change_type'].nil?
  query_params[:'notificationIDs'] = opts[:'notification_ids'] if !opts[:'notification_ids'].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[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'isSuccessful'] = opts[:'is_successful'] if !opts[:'is_successful'].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[:'loyaltyProgramId'] = opts[:'loyalty_program_id'] if !opts[:'loyalty_program_id'].nil?
  query_params[:'responseCode'] = opts[:'response_code'] if !opts[:'response_code'].nil?
  query_params[:'webhookIDs'] = opts[:'webhook_ids'] if !opts[:'webhook_ids'].nil?

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_message_logs",
    :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_message_logs\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 = {}) ⇒ GetReferralsWithoutTotalCount200Response

List referrals List all referrals of the specified campaign.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

  • :code (String)

    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.

  • :created_before (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :created_after (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :valid (String)

    Either &quot;expired&quot;, &quot;validNow&quot;, or &quot;validFuture&quot;. The first option matches referrals in which the expiration date is set and in the past. The second matches referrals in which start date is null or in the past and expiration date is null or in the future, the third matches referrals in which start date is set and in the future.

  • :usable (String)

    Either &quot;true&quot; or &quot;false&quot;. If &quot;true&quot;, only referrals where &#x60;usageCounter &lt; usageLimit&#x60; will be returned, &quot;false&quot; will return only referrals where &#x60;usageCounter &gt;&#x3D; usageLimit&#x60;.

  • :advocate (String)

    Filter results by match with a profile ID specified in the referral&#39;s AdvocateProfileIntegrationId field.

Returns:



9243
9244
9245
9246
# File 'lib/talon_one_sdk/api/management_api.rb', line 9243

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 = {}) ⇒ Array<(GetReferralsWithoutTotalCount200Response, Integer, Hash)>

List referrals List all referrals of the specified campaign.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

  • :code (String)

    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.

  • :created_before (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :created_after (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :valid (String)

    Either &quot;expired&quot;, &quot;validNow&quot;, or &quot;validFuture&quot;. The first option matches referrals in which the expiration date is set and in the past. The second matches referrals in which start date is null or in the past and expiration date is null or in the future, the third matches referrals in which start date is set and in the future.

  • :usable (String)

    Either &quot;true&quot; or &quot;false&quot;. If &quot;true&quot;, only referrals where &#x60;usageCounter &lt; usageLimit&#x60; will be returned, &quot;false&quot; will return only referrals where &#x60;usageCounter &gt;&#x3D; usageLimit&#x60;.

  • :advocate (String)

    Filter results by match with a profile ID specified in the referral&#39;s AdvocateProfileIntegrationId field.

Returns:



9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
# File 'lib/talon_one_sdk/api/management_api.rb', line 9263

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
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_referrals_without_total_count, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_referrals_without_total_count, must be greater than or equal to 1.'
  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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_referrals_without_total_count",
    :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_v2(role_id, opts = {}) ⇒ RoleV2

Get role Get the details of a specific role. To see all the roles, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint.

Parameters:

  • role_id (Integer)

    The ID of role. Note: To find the ID of a role, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint.

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

    the optional parameters

Returns:



9345
9346
9347
9348
# File 'lib/talon_one_sdk/api/management_api.rb', line 9345

def get_role_v2(role_id, opts = {})
  data, _status_code, _headers = get_role_v2_with_http_info(role_id, opts)
  data
end

#get_role_v2_with_http_info(role_id, opts = {}) ⇒ Array<(RoleV2, Integer, Hash)>

Get role Get the details of a specific role. To see all the roles, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint.

Parameters:

  • role_id (Integer)

    The ID of role. Note: To find the ID of a role, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint.

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

    the optional parameters

Returns:

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

    RoleV2 data, response status code and response headers



9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
# File 'lib/talon_one_sdk/api/management_api.rb', line 9355

def get_role_v2_with_http_info(role_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_role_v2 ...'
  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_v2"
  end
  # resource path
  local_var_path = '/v2/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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"ManagementApi.get_role_v2",
    :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_v2\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 = {}) ⇒ Ruleset

Get ruleset Retrieve the specified ruleset.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • ruleset_id (Integer)

    The ID of the ruleset.

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

    the optional parameters

Returns:



9410
9411
9412
9413
# File 'lib/talon_one_sdk/api/management_api.rb', line 9410

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 = {}) ⇒ Array<(Ruleset, Integer, Hash)>

Get ruleset Retrieve the specified ruleset.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • ruleset_id (Integer)

    The ID of the ruleset.

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

    the optional parameters

Returns:

  • (Array<(Ruleset, Integer, Hash)>)

    Ruleset data, response status code and response headers



9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
# File 'lib/talon_one_sdk/api/management_api.rb', line 9422

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']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Ruleset'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.get_ruleset",
    :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 = {}) ⇒ GetRulesets200Response

List campaign rulesets List all rulesets of this campaign. A ruleset is a revision of the rules of a campaign. Important: The response also includes deleted rules. You should only consider the latest revision of the returned rulesets.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

Returns:



9487
9488
9489
9490
# File 'lib/talon_one_sdk/api/management_api.rb', line 9487

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 = {}) ⇒ Array<(GetRulesets200Response, Integer, Hash)>

List campaign rulesets List all rulesets of this campaign. A ruleset is a revision of the rules of a campaign. Important: The response also includes deleted rules. You should only consider the latest revision of the returned rulesets.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

Returns:

  • (Array<(GetRulesets200Response, Integer, Hash)>)

    GetRulesets200Response data, response status code and response headers



9501
9502
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
# File 'lib/talon_one_sdk/api/management_api.rb', line 9501

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
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_rulesets, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_rulesets, must be greater than or equal to 1.'
  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']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'GetRulesets200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.get_rulesets",
    :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_store(application_id, store_id, opts = {}) ⇒ Store

Get store Get store details for a specific store ID.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • store_id (String)

    The ID of the store. You can get this ID with the [List stores](#tag/Stores/operation/listStores) endpoint.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



9570
9571
9572
9573
# File 'lib/talon_one_sdk/api/management_api.rb', line 9570

def get_store(application_id, store_id, opts = {})
  data, _status_code, _headers = get_store_with_http_info(application_id, store_id, opts)
  data
end

#get_store_with_http_info(application_id, store_id, opts = {}) ⇒ Array<(Store, Integer, Hash)>

Get store Get store details for a specific store ID.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • store_id (String)

    The ID of the store. You can get this ID with the [List stores](#tag/Stores/operation/listStores) endpoint.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Store, Integer, Hash)>)

    Store data, response status code and response headers



9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
# File 'lib/talon_one_sdk/api/management_api.rb', line 9581

def get_store_with_http_info(application_id, store_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_store ...'
  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_store"
  end
  # verify the required parameter 'store_id' is set
  if @api_client.config.client_side_validation && store_id.nil?
    fail ArgumentError, "Missing the required parameter 'store_id' when calling ManagementApi.get_store"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/stores/{storeId}'.sub('{applicationId}', CGI.escape(application_id.to_s)).sub('{storeId}', CGI.escape(store_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']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Store'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.get_store",
    :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_store\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_user(user_id, opts = {}) ⇒ User

Get user Retrieve the data (including an invitation code) for a user. Non-admin users can only get their own profile.

Parameters:

  • user_id (Integer)

    The ID of the user.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



9638
9639
9640
9641
# File 'lib/talon_one_sdk/api/management_api.rb', line 9638

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 = {}) ⇒ Array<(User, Integer, Hash)>

Get user Retrieve the data (including an invitation code) for a user. Non-admin users can only get their own profile.

Parameters:

  • user_id (Integer)

    The ID of the user.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(User, Integer, Hash)>)

    User data, response status code and response headers



9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
# File 'lib/talon_one_sdk/api/management_api.rb', line 9648

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']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'User'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.get_user",
    :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 = {}) ⇒ GetUsers200Response

List users in account Retrieve all users in your account.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

Returns:



9703
9704
9705
9706
# File 'lib/talon_one_sdk/api/management_api.rb', line 9703

def get_users(opts = {})
  data, _status_code, _headers = get_users_with_http_info(opts)
  data
end

#get_users_with_http_info(opts = {}) ⇒ Array<(GetUsers200Response, Integer, Hash)>

List users in account Retrieve all users in your account.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

Returns:

  • (Array<(GetUsers200Response, Integer, Hash)>)

    GetUsers200Response data, response status code and response headers



9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765
9766
9767
9768
# File 'lib/talon_one_sdk/api/management_api.rb', line 9715

def get_users_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_users ...'
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_users, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_users, must be greater than or equal to 1.'
  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']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'GetUsers200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.get_users",
    :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 = {}) ⇒ Webhook

Get webhook Returns a webhook by its id.

Parameters:

  • webhook_id (Integer)

    The ID of the webhook. You can find the ID in the Campaign Manager&#39;s URL when you display the details of the webhook in Account &gt; Webhooks.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



9775
9776
9777
9778
# File 'lib/talon_one_sdk/api/management_api.rb', line 9775

def get_webhook(webhook_id, opts = {})
  data, _status_code, _headers = get_webhook_with_http_info(webhook_id, opts)
  data
end

#get_webhook_with_http_info(webhook_id, opts = {}) ⇒ Array<(Webhook, Integer, Hash)>

Get webhook Returns a webhook by its id.

Parameters:

  • webhook_id (Integer)

    The ID of the webhook. You can find the ID in the Campaign Manager&#39;s URL when you display the details of the webhook in Account &gt; Webhooks.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Webhook, Integer, Hash)>)

    Webhook data, response status code and response headers



9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
# File 'lib/talon_one_sdk/api/management_api.rb', line 9785

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']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Webhook'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.get_webhook",
    :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 = {}) ⇒ GetWebhooks200Response

List webhooks List all webhooks.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :application_ids (String)

    Checks if the given catalog or its attributes are referenced in the specified Application ID. Note: If no Application ID is provided, we check for all connected Applications.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :creation_type (String)

    Filter results by creation type.

  • :visibility (String)

    Filter results by visibility.

  • :outgoing_integrations_type_id (Integer)

    Filter results by outgoing integration type ID.

  • :title (String)

    Filter results performing case-insensitive matching against the webhook title.

Returns:



9845
9846
9847
9848
# File 'lib/talon_one_sdk/api/management_api.rb', line 9845

def get_webhooks(opts = {})
  data, _status_code, _headers = get_webhooks_with_http_info(opts)
  data
end

#get_webhooks_with_http_info(opts = {}) ⇒ Array<(GetWebhooks200Response, Integer, Hash)>

List webhooks List all webhooks.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :application_ids (String)

    Checks if the given catalog or its attributes are referenced in the specified Application ID. Note: If no Application ID is provided, we check for all connected Applications.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :creation_type (String)

    Filter results by creation type.

  • :visibility (String)

    Filter results by visibility.

  • :outgoing_integrations_type_id (Integer)

    Filter results by outgoing integration type ID.

  • :title (String)

    Filter results performing case-insensitive matching against the webhook title.

Returns:

  • (Array<(GetWebhooks200Response, Integer, Hash)>)

    GetWebhooks200Response data, response status code and response headers



9862
9863
9864
9865
9866
9867
9868
9869
9870
9871
9872
9873
9874
9875
9876
9877
9878
9879
9880
9881
9882
9883
9884
9885
9886
9887
9888
9889
9890
9891
9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
9913
9914
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
# File 'lib/talon_one_sdk/api/management_api.rb', line 9862

def get_webhooks_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.get_webhooks ...'
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_webhooks, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.get_webhooks, must be greater than or equal to 1.'
  end

  allowable_values = ["templateWebhooks", "webhooks"]
  if @api_client.config.client_side_validation && opts[:'creation_type'] && !allowable_values.include?(opts[:'creation_type'])
    fail ArgumentError, "invalid value for \"creation_type\", must be one of #{allowable_values}"
  end
  allowable_values = ["visible", "hidden"]
  if @api_client.config.client_side_validation && opts[:'visibility'] && !allowable_values.include?(opts[:'visibility'])
    fail ArgumentError, "invalid value for \"visibility\", must be one of #{allowable_values}"
  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?
  query_params[:'creationType'] = opts[:'creation_type'] if !opts[:'creation_type'].nil?
  query_params[:'visibility'] = opts[:'visibility'] if !opts[:'visibility'].nil?
  query_params[:'outgoingIntegrationsTypeId'] = opts[:'outgoing_integrations_type_id'] if !opts[:'outgoing_integrations_type_id'].nil?
  query_params[:'title'] = opts[:'title'] if !opts[:'title'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'GetWebhooks200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.get_webhooks",
    :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_account_collection(collection_id, opts = {}) ⇒ Import

Import data into existing account-level collection Upload a CSV file containing the collection of string values that should be attached as payload for collection. The file should be sent as multipart data. The import replaces the initial content of the collection. The CSV file must only contain the following column: - ‘item`: the values in your collection. A collection is limited to 500,000 items. ## Example “` item Adidas Nike Asics “` > [!note] Before sending a request to this endpoint, ensure the data in the > CSV to import is different from the data currently stored in the collection.

Parameters:

  • collection_id (Integer)

    The ID of the collection. You can get it with the [List collections in account](#tag/Collections/operation/listAccountCollections) endpoint.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :up_file (File)

    The CSV file containing the data that is being imported.

Returns:



9936
9937
9938
9939
# File 'lib/talon_one_sdk/api/management_api.rb', line 9936

def (collection_id, opts = {})
  data, _status_code, _headers = (collection_id, opts)
  data
end

#import_account_collection_with_http_info(collection_id, opts = {}) ⇒ Array<(Import, Integer, Hash)>

Import data into existing account-level collection Upload a CSV file containing the collection of string values that should be attached as payload for collection. The file should be sent as multipart data. The import replaces the initial content of the collection. The CSV file must only contain the following column: - &#x60;item&#x60;: the values in your collection. A collection is limited to 500,000 items. ## Example &#x60;&#x60;&#x60; item Adidas Nike Asics &#x60;&#x60;&#x60; &gt; [!note] Before sending a request to this endpoint, ensure the data in the &gt; CSV to import is different from the data currently stored in the collection.

Parameters:

  • collection_id (Integer)

    The ID of the collection. You can get it with the [List collections in account](#tag/Collections/operation/listAccountCollections) endpoint.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :up_file (File)

    The CSV file containing the data that is being imported.

Returns:

  • (Array<(Import, Integer, Hash)>)

    Import data, response status code and response headers



9947
9948
9949
9950
9951
9952
9953
9954
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981
9982
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993
9994
9995
9996
9997
9998
9999
# File 'lib/talon_one_sdk/api/management_api.rb', line 9947

def (collection_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.import_account_collection ...'
  end
  # verify the required parameter 'collection_id' is set
  if @api_client.config.client_side_validation && collection_id.nil?
    fail ArgumentError, "Missing the required parameter 'collection_id' when calling ManagementApi.import_account_collection"
  end
  # resource path
  local_var_path = '/v1/collections/{collectionId}/import'.sub('{collectionId}', CGI.escape(collection_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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['multipart/form-data'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}
  form_params['upFile'] = opts[:'up_file'] if !opts[:'up_file'].nil?

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Import'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.import_account_collection",
    :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_account_collection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#import_allowed_list(attribute_id, opts = {}) ⇒ Import

Import allowed values for attribute Upload a CSV file containing a list of [picklist values](docs.talon.one/docs/product/account/dev-tools/managing-attributes#picklist-values) for the specified attribute. The file should be sent as multipart data. The import replaces the previous list of allowed values for this attribute, if any. The CSV file must only contain the following column: - ‘item`: The values in your allowed list, for example a list of SKUs. An allowed list is limited to 500,000 items. ## Example “`text item CS-VG-04032021-UP-50D-10 CS-DV-04042021-UP-49D-12 CS-DG-02082021-UP-50G-07 “`

Parameters:

  • attribute_id (Integer)

    The ID of the attribute. You can find the ID in the Campaign Manager&#39;s URL when you display the details of an attribute in Account &gt; Tools &gt; Attributes.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :up_file (File)

    The CSV file containing the data that is being imported.

Returns:



10007
10008
10009
10010
# File 'lib/talon_one_sdk/api/management_api.rb', line 10007

def import_allowed_list(attribute_id, opts = {})
  data, _status_code, _headers = import_allowed_list_with_http_info(attribute_id, opts)
  data
end

#import_allowed_list_with_http_info(attribute_id, opts = {}) ⇒ Array<(Import, Integer, Hash)>

Import allowed values for attribute Upload a CSV file containing a list of [picklist values](docs.talon.one/docs/product/account/dev-tools/managing-attributes#picklist-values) for the specified attribute. The file should be sent as multipart data. The import replaces the previous list of allowed values for this attribute, if any. The CSV file must only contain the following column: - &#x60;item&#x60;: The values in your allowed list, for example a list of SKUs. An allowed list is limited to 500,000 items. ## Example &#x60;&#x60;&#x60;text item CS-VG-04032021-UP-50D-10 CS-DV-04042021-UP-49D-12 CS-DG-02082021-UP-50G-07 &#x60;&#x60;&#x60;

Parameters:

  • attribute_id (Integer)

    The ID of the attribute. You can find the ID in the Campaign Manager&#39;s URL when you display the details of an attribute in Account &gt; Tools &gt; Attributes.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :up_file (File)

    The CSV file containing the data that is being imported.

Returns:

  • (Array<(Import, Integer, Hash)>)

    Import data, response status code and response headers



10018
10019
10020
10021
10022
10023
10024
10025
10026
10027
10028
10029
10030
10031
10032
10033
10034
10035
10036
10037
10038
10039
10040
10041
10042
10043
10044
10045
10046
10047
10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
# File 'lib/talon_one_sdk/api/management_api.rb', line 10018

def import_allowed_list_with_http_info(attribute_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.import_allowed_list ...'
  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.import_allowed_list"
  end
  # resource path
  local_var_path = '/v1/attributes/{attributeId}/allowed_list/import'.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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['multipart/form-data'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}
  form_params['upFile'] = opts[:'up_file'] if !opts[:'up_file'].nil?

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Import'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.import_allowed_list",
    :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_allowed_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#import_audiences_memberships(audience_id, opts = {}) ⇒ Import

Import audience members Upload a CSV file containing the integration IDs of the members you want to add to an audience. The file should be sent as multipart data and should contain only the following column (required): - ‘profileintegrationid`: The integration ID of the customer profile. The import replaces the previous list of audience members. > [!note] We recommend limiting your file size to 500 MB. ## Example “`text profileintegrationid charles alexa “`

Parameters:

  • audience_id (Integer)

    The ID of the audience.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :up_file (File)

    The CSV file containing the data that is being imported.

Returns:



10078
10079
10080
10081
# File 'lib/talon_one_sdk/api/management_api.rb', line 10078

def import_audiences_memberships(audience_id, opts = {})
  data, _status_code, _headers = import_audiences_memberships_with_http_info(audience_id, opts)
  data
end

#import_audiences_memberships_with_http_info(audience_id, opts = {}) ⇒ Array<(Import, Integer, Hash)>

Import audience members Upload a CSV file containing the integration IDs of the members you want to add to an audience. The file should be sent as multipart data and should contain only the following column (required): - &#x60;profileintegrationid&#x60;: The integration ID of the customer profile. The import replaces the previous list of audience members. &gt; [!note] We recommend limiting your file size to 500 MB. ## Example &#x60;&#x60;&#x60;text profileintegrationid charles alexa &#x60;&#x60;&#x60;

Parameters:

  • audience_id (Integer)

    The ID of the audience.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :up_file (File)

    The CSV file containing the data that is being imported.

Returns:

  • (Array<(Import, Integer, Hash)>)

    Import data, response status code and response headers



10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123
10124
10125
10126
10127
10128
10129
10130
10131
10132
10133
10134
10135
10136
10137
10138
10139
10140
10141
# File 'lib/talon_one_sdk/api/management_api.rb', line 10089

def import_audiences_memberships_with_http_info(audience_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.import_audiences_memberships ...'
  end
  # verify the required parameter 'audience_id' is set
  if @api_client.config.client_side_validation && audience_id.nil?
    fail ArgumentError, "Missing the required parameter 'audience_id' when calling ManagementApi.import_audiences_memberships"
  end
  # resource path
  local_var_path = '/v1/audiences/{audienceId}/memberships/import'.sub('{audienceId}', CGI.escape(audience_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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['multipart/form-data'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}
  form_params['upFile'] = opts[:'up_file'] if !opts[:'up_file'].nil?

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Import'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.import_audiences_memberships",
    :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_audiences_memberships\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#import_campaign_store_budget(application_id, campaign_id, opts = {}) ⇒ Import

Import campaign store budgets Upload a CSV file containing store budgets for a given campaign. Send the file as multipart data. The CSV file must only contain the following columns: - ‘store_integration_id`: The identifier of the store. - `limit`: The budget limit for the store. The import replaces the previous list of store budgets.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :action (String)

    The action that this budget is limiting.

  • :period (String)

    The period to which the limit applies. Note: For budgets with no period, set this to &#x60;overall&#x60;.

  • :up_file (File)

    The CSV file containing the data that is being imported.

Returns:



10152
10153
10154
10155
# File 'lib/talon_one_sdk/api/management_api.rb', line 10152

def import_campaign_store_budget(application_id, campaign_id, opts = {})
  data, _status_code, _headers = import_campaign_store_budget_with_http_info(application_id, campaign_id, opts)
  data
end

#import_campaign_store_budget_with_http_info(application_id, campaign_id, opts = {}) ⇒ Array<(Import, Integer, Hash)>

Import campaign store budgets Upload a CSV file containing store budgets for a given campaign. Send the file as multipart data. The CSV file must only contain the following columns: - &#x60;store_integration_id&#x60;: The identifier of the store. - &#x60;limit&#x60;: The budget limit for the store. The import replaces the previous list of store budgets.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :action (String)

    The action that this budget is limiting.

  • :period (String)

    The period to which the limit applies. Note: For budgets with no period, set this to &#x60;overall&#x60;.

  • :up_file (File)

    The CSV file containing the data that is being imported.

Returns:

  • (Array<(Import, Integer, Hash)>)

    Import data, response status code and response headers



10166
10167
10168
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
10184
10185
10186
10187
10188
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
# File 'lib/talon_one_sdk/api/management_api.rb', line 10166

def import_campaign_store_budget_with_http_info(application_id, campaign_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.import_campaign_store_budget ...'
  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_campaign_store_budget"
  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_campaign_store_budget"
  end
  allowable_values = ["setDiscount"]
  if @api_client.config.client_side_validation && opts[:'action'] && !allowable_values.include?(opts[:'action'])
    fail ArgumentError, "invalid value for \"action\", must be one of #{allowable_values}"
  end
  allowable_values = ["overall", "daily", "weekly", "monthly", "yearly"]
  if @api_client.config.client_side_validation && opts[:'period'] && !allowable_values.include?(opts[:'period'])
    fail ArgumentError, "invalid value for \"period\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/stores/budgets/import'.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[:'action'] = opts[:'action'] if !opts[:'action'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['multipart/form-data'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}
  form_params['upFile'] = opts[:'up_file'] if !opts[:'up_file'].nil?

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Import'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.import_campaign_store_budget",
    :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_campaign_store_budget\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#import_campaign_stores(application_id, campaign_id, opts = {}) ⇒ Import

Import stores Upload a CSV file containing the stores you want to link to a specific campaign. Send the file as multipart data. The CSV file must only contain the following column: - ‘store_integration_id`: The identifier of the store. The import replaces the previous list of stores linked to the campaign.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :up_file (File)

    The CSV file containing the data that is being imported.

Returns:



10241
10242
10243
10244
# File 'lib/talon_one_sdk/api/management_api.rb', line 10241

def import_campaign_stores(application_id, campaign_id, opts = {})
  data, _status_code, _headers = import_campaign_stores_with_http_info(application_id, campaign_id, opts)
  data
end

#import_campaign_stores_with_http_info(application_id, campaign_id, opts = {}) ⇒ Array<(Import, Integer, Hash)>

Import stores Upload a CSV file containing the stores you want to link to a specific campaign. Send the file as multipart data. The CSV file must only contain the following column: - &#x60;store_integration_id&#x60;: The identifier of the store. The import replaces the previous list of stores linked to the campaign.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :up_file (File)

    The CSV file containing the data that is being imported.

Returns:

  • (Array<(Import, Integer, Hash)>)

    Import data, response status code and response headers



10253
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
# File 'lib/talon_one_sdk/api/management_api.rb', line 10253

def import_campaign_stores_with_http_info(application_id, campaign_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.import_campaign_stores ...'
  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_campaign_stores"
  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_campaign_stores"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/stores/import'.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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['multipart/form-data'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}
  form_params['upFile'] = opts[:'up_file'] if !opts[:'up_file'].nil?

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Import'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.import_campaign_stores",
    :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_campaign_stores\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#import_collection(application_id, campaign_id, collection_id, opts = {}) ⇒ Import

Import data into existing campaign-level collection Upload a CSV file containing the collection of string values that should be attached as payload for collection. The file should be sent as multipart data. The import replaces the initial content of the collection. The CSV file must only contain the following column: - ‘item`: the values in your collection. A collection is limited to 500,000 items. ## Example “` item Adidas Nike Asics “` > [!note] Before sending a request to this endpoint, ensure the data in the > CSV to import is different from the data currently stored in the collection.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • collection_id (Integer)

    The ID of the collection. You can get it with the [List collections in Application](#tag/Collections/operation/listCollectionsInApplication) endpoint.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :up_file (File)

    The CSV file containing the data that is being imported.

Returns:



10319
10320
10321
10322
# File 'lib/talon_one_sdk/api/management_api.rb', line 10319

def import_collection(application_id, campaign_id, collection_id, opts = {})
  data, _status_code, _headers = import_collection_with_http_info(application_id, campaign_id, collection_id, opts)
  data
end

#import_collection_with_http_info(application_id, campaign_id, collection_id, opts = {}) ⇒ Array<(Import, Integer, Hash)>

Import data into existing campaign-level collection Upload a CSV file containing the collection of string values that should be attached as payload for collection. The file should be sent as multipart data. The import replaces the initial content of the collection. The CSV file must only contain the following column: - &#x60;item&#x60;: the values in your collection. A collection is limited to 500,000 items. ## Example &#x60;&#x60;&#x60; item Adidas Nike Asics &#x60;&#x60;&#x60; &gt; [!note] Before sending a request to this endpoint, ensure the data in the &gt; CSV to import is different from the data currently stored in the collection.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • collection_id (Integer)

    The ID of the collection. You can get it with the [List collections in Application](#tag/Collections/operation/listCollectionsInApplication) endpoint.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :up_file (File)

    The CSV file containing the data that is being imported.

Returns:

  • (Array<(Import, Integer, Hash)>)

    Import data, response status code and response headers



10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386
10387
10388
10389
10390
10391
10392
# File 'lib/talon_one_sdk/api/management_api.rb', line 10332

def import_collection_with_http_info(application_id, campaign_id, collection_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.import_collection ...'
  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_collection"
  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_collection"
  end
  # verify the required parameter 'collection_id' is set
  if @api_client.config.client_side_validation && collection_id.nil?
    fail ArgumentError, "Missing the required parameter 'collection_id' when calling ManagementApi.import_collection"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}/import'.sub('{applicationId}', CGI.escape(application_id.to_s)).sub('{campaignId}', CGI.escape(campaign_id.to_s)).sub('{collectionId}', CGI.escape(collection_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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['multipart/form-data'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}
  form_params['upFile'] = opts[:'up_file'] if !opts[:'up_file'].nil?

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Import'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.import_collection",
    :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_collection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#import_coupons(application_id, campaign_id, opts = {}) ⇒ Import

Import coupons Upload a CSV file containing the coupons that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - ‘value` (required): The coupon code. Must be at least 3 characters long. We recommend using alphanumeric characters. There is no maximum length but limiting the code to 30 characters ensures it is fully readable in the Campaign Manager. The code should be unique unless you set `skipDuplicates` to `true`. - `expirydate`: The end date in RFC3339 of the code redemption period. - `startdate`: The start date in RFC3339 of the code redemption period. - `recipientintegrationid`: The integration ID of the recipient of the coupon. Only the customer with this integration ID can redeem this code. Available only for personal codes. - `limitval`: The maximum number of redemptions of this code. For unlimited redemptions, use `0`. Defaults to `1` when not provided. - `discountlimit`: The total discount value that the code can give. This is typically used to represent a gift card value. - `attributes`: A JSON object describing custom coupon attribute names and their values, enclosed with double quotation marks.<br /> For example, if you created a [custom attribute](docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated with the coupon entity, the object in the CSV file, when opened in a text editor, must be: `""10_off""`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. > [!note] We recommend limiting your file size to 500 MB. ## Example “`text "value","expirydate","startdate","recipientintegrationid","limitval","attributes","discountlimit" COUP1,2018-07-01T04:00:00Z,2018-05-01T04:00:00Z,cust123,1,"""10_off""",2.4 “` Once imported, you can find the `batchId` in the Campaign Manager or by using [List coupons](#tag/Coupons/operation/getCouponsWithoutTotalCount).

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :skip_duplicates (Boolean)

    An indicator of whether to skip duplicate coupon values instead of causing an error. Duplicate values are ignored when &#x60;skipDuplicates&#x3D;true&#x60;.

  • :up_file (File)

    The CSV file containing the data that is being imported.

Returns:



10402
10403
10404
10405
# File 'lib/talon_one_sdk/api/management_api.rb', line 10402

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 = {}) ⇒ Array<(Import, Integer, Hash)>

Import coupons Upload a CSV file containing the coupons that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - &#x60;value&#x60; (required): The coupon code. Must be at least 3 characters long. We recommend using alphanumeric characters. There is no maximum length but limiting the code to 30 characters ensures it is fully readable in the Campaign Manager. The code should be unique unless you set &#x60;skipDuplicates&#x60; to &#x60;true&#x60;. - &#x60;expirydate&#x60;: The end date in RFC3339 of the code redemption period. - &#x60;startdate&#x60;: The start date in RFC3339 of the code redemption period. - &#x60;recipientintegrationid&#x60;: The integration ID of the recipient of the coupon. Only the customer with this integration ID can redeem this code. Available only for personal codes. - &#x60;limitval&#x60;: The maximum number of redemptions of this code. For unlimited redemptions, use &#x60;0&#x60;. Defaults to &#x60;1&#x60; when not provided. - &#x60;discountlimit&#x60;: The total discount value that the code can give. This is typically used to represent a gift card value. - &#x60;attributes&#x60;: A JSON object describing custom coupon attribute names and their values, enclosed with double quotation marks.&lt;br /&gt; For example, if you created a [custom attribute](docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called &#x60;category&#x60; associated with the coupon entity, the object in the CSV file, when opened in a text editor, must be: &#x60;&quot;&quot;10_off&quot;&quot;&#x60;. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. &gt; [!note] We recommend limiting your file size to 500 MB. ## Example &#x60;&#x60;&#x60;text &quot;value&quot;,&quot;expirydate&quot;,&quot;startdate&quot;,&quot;recipientintegrationid&quot;,&quot;limitval&quot;,&quot;attributes&quot;,&quot;discountlimit&quot; COUP1,2018-07-01T04:00:00Z,2018-05-01T04:00:00Z,cust123,1,&quot;&quot;&quot;10_off&quot;&quot;&quot;,2.4 &#x60;&#x60;&#x60; Once imported, you can find the &#x60;batchId&#x60; in the Campaign Manager or by using [List coupons](#tag/Coupons/operation/getCouponsWithoutTotalCount).

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :skip_duplicates (Boolean)

    An indicator of whether to skip duplicate coupon values instead of causing an error. Duplicate values are ignored when &#x60;skipDuplicates&#x3D;true&#x60;.

  • :up_file (File)

    The CSV file containing the data that is being imported.

Returns:

  • (Array<(Import, Integer, Hash)>)

    Import data, response status code and response headers



10415
10416
10417
10418
10419
10420
10421
10422
10423
10424
10425
10426
10427
10428
10429
10430
10431
10432
10433
10434
10435
10436
10437
10438
10439
10440
10441
10442
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
# File 'lib/talon_one_sdk/api/management_api.rb', line 10415

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] || {}
  query_params[:'skipDuplicates'] = opts[:'skip_duplicates'] if !opts[:'skip_duplicates'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['multipart/form-data'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}
  form_params['upFile'] = opts[:'up_file'] if !opts[:'up_file'].nil?

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Import'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.import_coupons",
    :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_cards(loyalty_program_id, opts = {}) ⇒ Import

Import loyalty cards Upload a CSV file containing the loyalty cards that you want to use in your card-based loyalty program. Send the file as multipart data. It contains the following columns for each card: - ‘identifier` (required): The identifier of the loyalty card, which must match the regular expression `^[A-Za-z0-9._%+@-]+$`. - `state` (required): The state of the loyalty card. It can be `active` or `inactive`. - `customerprofileids` (optional): An array of strings representing the identifiers of the customer profiles linked to the loyalty card. The identifiers should be separated with a semicolon (;). - `attributes` (optional): A JSON object that contains the loyalty card’s custom attributes and their values. These attributes must be created and connected to this loyalty program before they can be assigned to the cards through this endpoint. > [!note] Your CSV file must contain less than 500,000 rows. Requests time out after 30 seconds. ## Example “‘csv identifier,state,customerprofileids,attributes 123-456-789AT,active,Alexa001;UserA,’""10_off""" “‘

Parameters:

Options Hash (opts):

  • :up_file (File)

    The CSV file containing the data that is being imported.

Returns:



10480
10481
10482
10483
# File 'lib/talon_one_sdk/api/management_api.rb', line 10480

def import_loyalty_cards(loyalty_program_id, opts = {})
  data, _status_code, _headers = import_loyalty_cards_with_http_info(loyalty_program_id, opts)
  data
end

#import_loyalty_cards_with_http_info(loyalty_program_id, opts = {}) ⇒ Array<(Import, Integer, Hash)>

Import loyalty cards Upload a CSV file containing the loyalty cards that you want to use in your card-based loyalty program. Send the file as multipart data. It contains the following columns for each card: - &#x60;identifier&#x60; (required): The identifier of the loyalty card, which must match the regular expression &#x60;^+$&#x60;. - &#x60;state&#x60; (required): The state of the loyalty card. It can be &#x60;active&#x60; or &#x60;inactive&#x60;. - &#x60;customerprofileids&#x60; (optional): An array of strings representing the identifiers of the customer profiles linked to the loyalty card. The identifiers should be separated with a semicolon (;). - &#x60;attributes&#x60; (optional): A JSON object that contains the loyalty card&#39;s custom attributes and their values. These attributes must be created and connected to this loyalty program before they can be assigned to the cards through this endpoint. &gt; [!note] Your CSV file must contain less than 500,000 rows. Requests time out after 30 seconds. ## Example &#x60;&#x60;&#x60;csv identifier,state,customerprofileids,attributes 123-456-789AT,active,Alexa001;UserA,&#39;&quot;&quot;10_off&quot;&quot;&quot; &#x60;&#x60;&#x60;

Parameters:

Options Hash (opts):

  • :up_file (File)

    The CSV file containing the data that is being imported.

Returns:

  • (Array<(Import, Integer, Hash)>)

    Import data, response status code and response headers



10491
10492
10493
10494
10495
10496
10497
10498
10499
10500
10501
10502
10503
10504
10505
10506
10507
10508
10509
10510
10511
10512
10513
10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542
10543
# File 'lib/talon_one_sdk/api/management_api.rb', line 10491

def import_loyalty_cards_with_http_info(loyalty_program_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.import_loyalty_cards ...'
  end
  # verify the required parameter 'loyalty_program_id' is set
  if @api_client.config.client_side_validation && loyalty_program_id.nil?
    fail ArgumentError, "Missing the required parameter 'loyalty_program_id' when calling ManagementApi.import_loyalty_cards"
  end
  # resource path
  local_var_path = '/v1/loyalty_programs/{loyaltyProgramId}/import_cards'.sub('{loyaltyProgramId}', CGI.escape(loyalty_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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['multipart/form-data'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}
  form_params['upFile'] = opts[:'up_file'] if !opts[:'up_file'].nil?

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Import'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.import_loyalty_cards",
    :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_cards\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#import_loyalty_customers_tiers(loyalty_program_id, opts = {}) ⇒ Import

Import customers into loyalty tiers Upload a CSV file containing existing customers to be assigned to existing tiers. Send the file as multipart data. > [!important] This endpoint only works with loyalty programs with advanced > tiers (with expiration and downgrade policy) feature enabled. The CSV file should contain the following columns: - ‘subledgerid` (optional): The ID of the subledger. If this field is empty, the main ledger will be used. - `customerprofileid`: The integration ID of the customer profile to whom the tier should be assigned. - `tiername`: The name of an existing tier to assign to the customer. - `expirydate`: The expiry date of the tier when the tier is reevaluated. It should be a future date. About customer assignment to a tier: - If the customer isn’t already in a tier, the customer is assigned to the specified tier during the tier import. - If the customer is already in the tier that’s specified in the CSV file, only the expiry date is updated. > [!note] We recommend importing customers into the tier that matches their > current balance. If a customer is imported into a lower tier, any session > or points update automatically upgrades them to the tier they qualify for. To update a customer’s tier, you can [add](/management-api#tag/Loyalty/operation/addLoyaltyPoints) or [deduct](/management-api#tag/Loyalty/operation/removeLoyaltyPoints) their loyalty points. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. > [!note] We recommend limiting your file size to 500 MB. ## Example “‘csv subledgerid,customerprofileid,tiername,expirydate SUB1,alexa,Gold,2024-03-21T07:32:14Z ,george,Silver,2025-04-16T21:12:37Z SUB2,avocado,Bronze,2026-05-03T11:47:01Z “`

Parameters:

Options Hash (opts):

  • :up_file (File)

    The CSV file containing the data that is being imported.

Returns:



10551
10552
10553
10554
# File 'lib/talon_one_sdk/api/management_api.rb', line 10551

def import_loyalty_customers_tiers(loyalty_program_id, opts = {})
  data, _status_code, _headers = import_loyalty_customers_tiers_with_http_info(loyalty_program_id, opts)
  data
end

#import_loyalty_customers_tiers_with_http_info(loyalty_program_id, opts = {}) ⇒ Array<(Import, Integer, Hash)>

Import customers into loyalty tiers Upload a CSV file containing existing customers to be assigned to existing tiers. Send the file as multipart data. &gt; [!important] This endpoint only works with loyalty programs with advanced &gt; tiers (with expiration and downgrade policy) feature enabled. The CSV file should contain the following columns: - &#x60;subledgerid&#x60; (optional): The ID of the subledger. If this field is empty, the main ledger will be used. - &#x60;customerprofileid&#x60;: The integration ID of the customer profile to whom the tier should be assigned. - &#x60;tiername&#x60;: The name of an existing tier to assign to the customer. - &#x60;expirydate&#x60;: The expiry date of the tier when the tier is reevaluated. It should be a future date. About customer assignment to a tier: - If the customer isn&#39;t already in a tier, the customer is assigned to the specified tier during the tier import. - If the customer is already in the tier that&#39;s specified in the CSV file, only the expiry date is updated. &gt; [!note] We recommend importing customers into the tier that matches their &gt; current balance. If a customer is imported into a lower tier, any session &gt; or points update automatically upgrades them to the tier they qualify for. To update a customer&#39;s tier, you can [add](/management-api#tag/Loyalty/operation/addLoyaltyPoints) or [deduct](/management-api#tag/Loyalty/operation/removeLoyaltyPoints) their loyalty points. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. &gt; [!note] We recommend limiting your file size to 500 MB. ## Example &#x60;&#x60;&#x60;csv subledgerid,customerprofileid,tiername,expirydate SUB1,alexa,Gold,2024-03-21T07:32:14Z ,george,Silver,2025-04-16T21:12:37Z SUB2,avocado,Bronze,2026-05-03T11:47:01Z &#x60;&#x60;&#x60;

Parameters:

Options Hash (opts):

  • :up_file (File)

    The CSV file containing the data that is being imported.

Returns:

  • (Array<(Import, Integer, Hash)>)

    Import data, response status code and response headers



10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574
10575
10576
10577
10578
10579
10580
10581
10582
10583
10584
10585
10586
10587
10588
10589
10590
10591
10592
10593
10594
10595
10596
10597
10598
10599
10600
10601
10602
10603
10604
10605
10606
10607
10608
10609
10610
10611
10612
10613
10614
# File 'lib/talon_one_sdk/api/management_api.rb', line 10562

def import_loyalty_customers_tiers_with_http_info(loyalty_program_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.import_loyalty_customers_tiers ...'
  end
  # verify the required parameter 'loyalty_program_id' is set
  if @api_client.config.client_side_validation && loyalty_program_id.nil?
    fail ArgumentError, "Missing the required parameter 'loyalty_program_id' when calling ManagementApi.import_loyalty_customers_tiers"
  end
  # resource path
  local_var_path = '/v1/loyalty_programs/{loyaltyProgramId}/import_customers_tiers'.sub('{loyaltyProgramId}', CGI.escape(loyalty_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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['multipart/form-data'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}
  form_params['upFile'] = opts[:'up_file'] if !opts[:'up_file'].nil?

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Import'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.import_loyalty_customers_tiers",
    :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_customers_tiers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#import_loyalty_join_dates(loyalty_program_id, opts = {}) ⇒ Import

Import join dates for a loyalty program Upload a CSV file containing customer profile IDs and their join dates for the specified loyalty program. Send the file as multipart data. > [!important] This endpoint only works with profile-based loyalty programs. The CSV file must contain the following columns: - ‘customerprofileid`: The integration ID of the customer profile whose join date you want to update. - `newjoindate`: The new join date for the customer in RFC3339 format. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. Note: - Customer profiles must already exist. If a referenced profile does not exist, the import fails with a `400` error. - If a join date already exists for a profile, the uploaded date replaces it. > [!note] We recommend limiting your file size to 500 MB. ## Example “`csv customerprofileid,newjoindate customer1,2024-03-21T07:32:14Z customer2,2025-04-16T21:12:37Z customer3,2026-05-03T11:47:01Z “`

Parameters:

Options Hash (opts):

  • :up_file (File)

    The CSV file containing the data that is being imported.

Returns:



10622
10623
10624
10625
# File 'lib/talon_one_sdk/api/management_api.rb', line 10622

def import_loyalty_join_dates(loyalty_program_id, opts = {})
  data, _status_code, _headers = import_loyalty_join_dates_with_http_info(loyalty_program_id, opts)
  data
end

#import_loyalty_join_dates_with_http_info(loyalty_program_id, opts = {}) ⇒ Array<(Import, Integer, Hash)>

Import join dates for a loyalty program Upload a CSV file containing customer profile IDs and their join dates for the specified loyalty program. Send the file as multipart data. &gt; [!important] This endpoint only works with profile-based loyalty programs. The CSV file must contain the following columns: - &#x60;customerprofileid&#x60;: The integration ID of the customer profile whose join date you want to update. - &#x60;newjoindate&#x60;: The new join date for the customer in RFC3339 format. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. Note: - Customer profiles must already exist. If a referenced profile does not exist, the import fails with a &#x60;400&#x60; error. - If a join date already exists for a profile, the uploaded date replaces it. &gt; [!note] We recommend limiting your file size to 500 MB. ## Example &#x60;&#x60;&#x60;csv customerprofileid,newjoindate customer1,2024-03-21T07:32:14Z customer2,2025-04-16T21:12:37Z customer3,2026-05-03T11:47:01Z &#x60;&#x60;&#x60;

Parameters:

Options Hash (opts):

  • :up_file (File)

    The CSV file containing the data that is being imported.

Returns:

  • (Array<(Import, Integer, Hash)>)

    Import data, response status code and response headers



10633
10634
10635
10636
10637
10638
10639
10640
10641
10642
10643
10644
10645
10646
10647
10648
10649
10650
10651
10652
10653
10654
10655
10656
10657
10658
10659
10660
10661
10662
10663
10664
10665
10666
10667
10668
10669
10670
10671
10672
10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683
10684
10685
# File 'lib/talon_one_sdk/api/management_api.rb', line 10633

def import_loyalty_join_dates_with_http_info(loyalty_program_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.import_loyalty_join_dates ...'
  end
  # verify the required parameter 'loyalty_program_id' is set
  if @api_client.config.client_side_validation && loyalty_program_id.nil?
    fail ArgumentError, "Missing the required parameter 'loyalty_program_id' when calling ManagementApi.import_loyalty_join_dates"
  end
  # resource path
  local_var_path = '/v1/loyalty_programs/{loyaltyProgramId}/import_join_dates'.sub('{loyaltyProgramId}', CGI.escape(loyalty_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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['multipart/form-data'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}
  form_params['upFile'] = opts[:'up_file'] if !opts[:'up_file'].nil?

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Import'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.import_loyalty_join_dates",
    :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_join_dates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#import_loyalty_points(loyalty_program_id, opts = {}) ⇒ Import

Import loyalty points Upload a CSV file containing the loyalty points you want to import into a given loyalty program. Send the file as multipart data. Depending on the type of loyalty program, you can import points into a given customer profile or loyalty card. The CSV file contains the following columns: - ‘customerprofileid` (optional): For profile-based loyalty programs, the integration ID of the customer profile where the loyalty points are imported. Note: If the customer profile does not exist, it will be created. The profile will not be visible in any Application until a session or profile update is received for that profile. - `identifier` (optional): For card-based loyalty programs, the identifier of the loyalty card where the loyalty points are imported. - `amount`: The amount of points to award to the customer profile. - `startdate` (optional): The earliest date when the points can be redeemed. The points are `active` from this date until the expiration date. This parameter accepts one of the following values: - A timestamp string in RFC3339 format. - `immediate` - `on_action` Note: Empty or missing values default to `immediate`. - `expirydate` (optional): The latest date when the points can be redeemed. The points are `expired` after this date. Note: It must be an RFC3339 timestamp string or string `unlimited`. Empty or missing values are considered `unlimited`. If passed, `validityDuration` should be omitted. - `validityDuration` (optional): The duration for which the points remain active, relative to the activation date. The time format is an integer followed by one letter indicating the time unit.<br /> Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can round certain units up or down: - `_D` for rounding down days only. Signifies the start of the day. - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. If passed, `expirydate` should be omitted. - `subledgerid` (optional): The ID of the subledger that should received the points. - `reason` (optional): The reason why these points are awarded. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. > [!note] For existing customer profiles and loyalty cards, the imported > points are added to any previous active or pending points, depending on the > value provided for `startdate`. If `startdate` matches the current date, the > imported points are active. If it is later, the points are pending until > the date provided for `startdate` is reached. > [!note] We recommend limiting your file size to 500 MB. ## Example for profile-based programs “`text customerprofileid,amount,startdate,expirydate,subledgerid,reason URNGV8294NV,100,2009-11-10T23:00:00Z,2009-11-11T23:00:00Z,subledger1,appeasement “` ## Example for card-based programs “`text identifier,amount,startdate,expirydate,subledgerid,reason summer-loyalty-card-0543,100,2009-11-10T23:00:00Z,2009-11-11T23:00:00Z,subledger1,appeasement “`

Parameters:

Options Hash (opts):

  • :notifications_enabled (Boolean)

    Indicates whether the points import triggers notifications about its effects. For example, a notification is sent if the import upgrades a customer&#39;s tier or offsets their negative points balance. This parameter is optional and defaults to &#x60;true&#x60;.

  • :up_file (File)

    The CSV file containing the data that is being imported.

Returns:



10694
10695
10696
10697
# File 'lib/talon_one_sdk/api/management_api.rb', line 10694

def import_loyalty_points(loyalty_program_id, opts = {})
  data, _status_code, _headers = import_loyalty_points_with_http_info(loyalty_program_id, opts)
  data
end

#import_loyalty_points_with_http_info(loyalty_program_id, opts = {}) ⇒ Array<(Import, Integer, Hash)>

Import loyalty points Upload a CSV file containing the loyalty points you want to import into a given loyalty program. Send the file as multipart data. Depending on the type of loyalty program, you can import points into a given customer profile or loyalty card. The CSV file contains the following columns: - &#x60;customerprofileid&#x60; (optional): For profile-based loyalty programs, the integration ID of the customer profile where the loyalty points are imported. Note: If the customer profile does not exist, it will be created. The profile will not be visible in any Application until a session or profile update is received for that profile. - &#x60;identifier&#x60; (optional): For card-based loyalty programs, the identifier of the loyalty card where the loyalty points are imported. - &#x60;amount&#x60;: The amount of points to award to the customer profile. - &#x60;startdate&#x60; (optional): The earliest date when the points can be redeemed. The points are &#x60;active&#x60; from this date until the expiration date. This parameter accepts one of the following values: - A timestamp string in RFC3339 format. - &#x60;immediate&#x60; - &#x60;on_action&#x60; Note: Empty or missing values default to &#x60;immediate&#x60;. - &#x60;expirydate&#x60; (optional): The latest date when the points can be redeemed. The points are &#x60;expired&#x60; after this date. Note: It must be an RFC3339 timestamp string or string &#x60;unlimited&#x60;. Empty or missing values are considered &#x60;unlimited&#x60;. If passed, &#x60;validityDuration&#x60; should be omitted. - &#x60;validityDuration&#x60; (optional): The duration for which the points remain active, relative to the activation date. The time format is an integer followed by one letter indicating the time unit.&lt;br /&gt; Examples: &#x60;30s&#x60;, &#x60;40m&#x60;, &#x60;1h&#x60;, &#x60;5D&#x60;, &#x60;7W&#x60;, &#x60;10M&#x60;, &#x60;15Y&#x60;. Available units: - &#x60;s&#x60;: seconds - &#x60;m&#x60;: minutes - &#x60;h&#x60;: hours - &#x60;D&#x60;: days - &#x60;W&#x60;: weeks - &#x60;M&#x60;: months - &#x60;Y&#x60;: years You can round certain units up or down: - &#x60;_D&#x60; for rounding down days only. Signifies the start of the day. - &#x60;_U&#x60; for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. If passed, &#x60;expirydate&#x60; should be omitted. - &#x60;subledgerid&#x60; (optional): The ID of the subledger that should received the points. - &#x60;reason&#x60; (optional): The reason why these points are awarded. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. &gt; [!note] For existing customer profiles and loyalty cards, the imported &gt; points are added to any previous active or pending points, depending on the &gt; value provided for &#x60;startdate&#x60;. If &#x60;startdate&#x60; matches the current date, the &gt; imported points are active. If it is later, the points are pending until &gt; the date provided for &#x60;startdate&#x60; is reached. &gt; [!note] We recommend limiting your file size to 500 MB. ## Example for profile-based programs &#x60;&#x60;&#x60;text customerprofileid,amount,startdate,expirydate,subledgerid,reason URNGV8294NV,100,2009-11-10T23:00:00Z,2009-11-11T23:00:00Z,subledger1,appeasement &#x60;&#x60;&#x60; ## Example for card-based programs &#x60;&#x60;&#x60;text identifier,amount,startdate,expirydate,subledgerid,reason summer-loyalty-card-0543,100,2009-11-10T23:00:00Z,2009-11-11T23:00:00Z,subledger1,appeasement &#x60;&#x60;&#x60;

Parameters:

Options Hash (opts):

  • :notifications_enabled (Boolean)

    Indicates whether the points import triggers notifications about its effects. For example, a notification is sent if the import upgrades a customer&#39;s tier or offsets their negative points balance. This parameter is optional and defaults to &#x60;true&#x60;.

  • :up_file (File)

    The CSV file containing the data that is being imported.

Returns:

  • (Array<(Import, Integer, Hash)>)

    Import data, response status code and response headers



10706
10707
10708
10709
10710
10711
10712
10713
10714
10715
10716
10717
10718
10719
10720
10721
10722
10723
10724
10725
10726
10727
10728
10729
10730
10731
10732
10733
10734
10735
10736
10737
10738
10739
10740
10741
10742
10743
10744
10745
10746
10747
10748
10749
10750
10751
10752
10753
10754
10755
10756
10757
10758
10759
# File 'lib/talon_one_sdk/api/management_api.rb', line 10706

def import_loyalty_points_with_http_info(loyalty_program_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.import_loyalty_points ...'
  end
  # verify the required parameter 'loyalty_program_id' is set
  if @api_client.config.client_side_validation && loyalty_program_id.nil?
    fail ArgumentError, "Missing the required parameter 'loyalty_program_id' when calling ManagementApi.import_loyalty_points"
  end
  # resource path
  local_var_path = '/v1/loyalty_programs/{loyaltyProgramId}/import_points'.sub('{loyaltyProgramId}', CGI.escape(loyalty_program_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'notificationsEnabled'] = opts[:'notifications_enabled'] if !opts[:'notifications_enabled'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['multipart/form-data'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}
  form_params['upFile'] = opts[:'up_file'] if !opts[:'up_file'].nil?

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Import'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.import_loyalty_points",
    :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 = {}) ⇒ Import

Import giveaway codes into a giveaway pool Upload a CSV file containing the giveaway codes that should be created. Send the file as multipart data. The CSV file contains 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 giveaway attribute names and their values, enclosed with double quotation marks.<br /> For example, if you created a [custom attribute](docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `provider` associated with the giveaway entity, the object in the CSV file, when opened in a text editor, must be: `""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 time zone setting of your choice. The values are converted to UTC internally by Talon.One. > [!note] Note > - We recommend limiting your file size to 500MB. > - You can import the same code multiple times. Duplicate codes are treated and distributed to customers as unique codes. ## Example “`text code,startdate,enddate,attributes GIVEAWAY1,2020-11-10T23:00:00Z,2022-11-11T23:00:00Z,"""Amazon""" GIVEAWAY2,2020-11-10T23:00:00Z,2022-11-11T23:00:00Z,"""Amazon""" GIVEAWAY3,2021-01-10T23:00:00Z,2022-11-11T23:00:00Z,"""Aliexpress""" “`

Parameters:

  • pool_id (Integer)

    The ID of the pool. You can find it in the Campaign Manager, in the Giveaways section.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :up_file (File)

    The CSV file containing the data that is being imported.

Returns:



10767
10768
10769
10770
# File 'lib/talon_one_sdk/api/management_api.rb', line 10767

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 = {}) ⇒ Array<(Import, Integer, Hash)>

Import giveaway codes into a giveaway pool Upload a CSV file containing the giveaway codes that should be created. Send the file as multipart data. The CSV file contains 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 giveaway attribute names and their values, enclosed with double quotation marks.&lt;br /&gt; For example, if you created a [custom attribute](docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called &#x60;provider&#x60; associated with the giveaway entity, the object in the CSV file, when opened in a text editor, must be: &#x60;&quot;&quot;myPartnerCompany&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 time zone setting of your choice. The values are converted to UTC internally by Talon.One. &gt; [!note] Note &gt; - We recommend limiting your file size to 500MB. &gt; - You can import the same code multiple times. Duplicate codes are treated and distributed to customers as unique codes. ## Example &#x60;&#x60;&#x60;text code,startdate,enddate,attributes GIVEAWAY1,2020-11-10T23:00:00Z,2022-11-11T23:00:00Z,&quot;&quot;&quot;Amazon&quot;&quot;&quot; GIVEAWAY2,2020-11-10T23:00:00Z,2022-11-11T23:00:00Z,&quot;&quot;&quot;Amazon&quot;&quot;&quot; GIVEAWAY3,2021-01-10T23:00:00Z,2022-11-11T23:00:00Z,&quot;&quot;&quot;Aliexpress&quot;&quot;&quot; &#x60;&#x60;&#x60;

Parameters:

  • pool_id (Integer)

    The ID of the pool. You can find it in the Campaign Manager, in the Giveaways section.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :up_file (File)

    The CSV file containing the data that is being imported.

Returns:

  • (Array<(Import, Integer, Hash)>)

    Import data, response status code and response headers



10778
10779
10780
10781
10782
10783
10784
10785
10786
10787
10788
10789
10790
10791
10792
10793
10794
10795
10796
10797
10798
10799
10800
10801
10802
10803
10804
10805
10806
10807
10808
10809
10810
10811
10812
10813
10814
10815
10816
10817
10818
10819
10820
10821
10822
10823
10824
10825
10826
10827
10828
10829
10830
# File 'lib/talon_one_sdk/api/management_api.rb', line 10778

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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['multipart/form-data'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}
  form_params['upFile'] = opts[:'up_file'] if !opts[:'up_file'].nil?

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Import'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.import_pool_giveaways",
    :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 = {}) ⇒ Import

Import referrals Upload a CSV file containing the referrals that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - ‘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 number of redemptions of this code. Defaults to `1` when left blank. - `attributes`: A JSON object describing custom referral attribute names and their values, enclosed with double quotation marks.<br /> For example, if you created a [custom attribute](docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated with the referral entity, the object in the CSV file, when opened in a text editor, must be: `""10_off""`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. > [!important] When you import a CSV file with referrals, > a [customer profile](docs.talon.one/docs/dev/concepts/entities/customer-profiles) > is not automatically created for each `advocateprofileintegrationid` > column value. Use the [Update customer profile](docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfileV2) > endpoint or the [Update multiple customer profiles](docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfilesV2) > endpoint to create the customer profiles. > [!note] We recommend limiting your file size to 500 MB. ## Example “`text code,startdate,expirydate,advocateprofileintegrationid,limitval,attributes REFERRAL_CODE1,2020-11-10T23:00:00Z,2021-11-11T23:00:00Z,integid_4,1,"""10_off""" REFERRAL_CODE2,2020-11-10T23:00:00Z,2021-11-11T23:00:00Z,integid1,1,"""20_off""" “`

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :up_file (File)

    The CSV file containing the data that is being imported.

Returns:



10839
10840
10841
10842
# File 'lib/talon_one_sdk/api/management_api.rb', line 10839

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 = {}) ⇒ Array<(Import, Integer, Hash)>

Import referrals Upload a CSV file containing the referrals that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - &#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 number of redemptions of this code. Defaults to &#x60;1&#x60; when left blank. - &#x60;attributes&#x60;: A JSON object describing custom referral attribute names and their values, enclosed with double quotation marks.&lt;br /&gt; For example, if you created a [custom attribute](docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called &#x60;category&#x60; associated with the referral entity, the object in the CSV file, when opened in a text editor, must be: &#x60;&quot;&quot;10_off&quot;&quot;&#x60;. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. &gt; [!important] When you import a CSV file with referrals, &gt; a [customer profile](docs.talon.one/docs/dev/concepts/entities/customer-profiles) &gt; is not automatically created for each &#x60;advocateprofileintegrationid&#x60; &gt; column value. Use the [Update customer profile](docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfileV2) &gt; endpoint or the [Update multiple customer profiles](docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfilesV2) &gt; endpoint to create the customer profiles. &gt; [!note] We recommend limiting your file size to 500 MB. ## Example &#x60;&#x60;&#x60;text code,startdate,expirydate,advocateprofileintegrationid,limitval,attributes REFERRAL_CODE1,2020-11-10T23:00:00Z,2021-11-11T23:00:00Z,integid_4,1,&quot;&quot;&quot;10_off&quot;&quot;&quot; REFERRAL_CODE2,2020-11-10T23:00:00Z,2021-11-11T23:00:00Z,integid1,1,&quot;&quot;&quot;20_off&quot;&quot;&quot; &#x60;&#x60;&#x60;

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :up_file (File)

    The CSV file containing the data that is being imported.

Returns:

  • (Array<(Import, Integer, Hash)>)

    Import data, response status code and response headers



10851
10852
10853
10854
10855
10856
10857
10858
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870
10871
10872
10873
10874
10875
10876
10877
10878
10879
10880
10881
10882
10883
10884
10885
10886
10887
10888
10889
10890
10891
10892
10893
10894
10895
10896
10897
10898
10899
10900
10901
10902
10903
10904
10905
10906
10907
# File 'lib/talon_one_sdk/api/management_api.rb', line 10851

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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['multipart/form-data'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}
  form_params['upFile'] = opts[:'up_file'] if !opts[:'up_file'].nil?

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Import'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.import_referrals",
    :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

#invite_user_external(new_external_invitation, opts = {}) ⇒ nil

Invite user from identity provider [Invite a user](docs.talon.one/docs/product/account/account-settings/managing-users#inviting-a-user) from an external identity provider to Talon.One by sending an invitation to their email address.

Parameters:

  • new_external_invitation (NewExternalInvitation)

    body

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


10914
10915
10916
10917
# File 'lib/talon_one_sdk/api/management_api.rb', line 10914

def invite_user_external(new_external_invitation, opts = {})
  invite_user_external_with_http_info(new_external_invitation, opts)
  nil
end

#invite_user_external_with_http_info(new_external_invitation, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Invite user from identity provider [Invite a user](docs.talon.one/docs/product/account/account-settings/managing-users#inviting-a-user) from an external identity provider to Talon.One by sending an invitation to their email address.

Parameters:

  • new_external_invitation (NewExternalInvitation)

    body

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



10924
10925
10926
10927
10928
10929
10930
10931
10932
10933
10934
10935
10936
10937
10938
10939
10940
10941
10942
10943
10944
10945
10946
10947
10948
10949
10950
10951
10952
10953
10954
10955
10956
10957
10958
10959
10960
10961
10962
10963
10964
10965
10966
10967
10968
10969
10970
10971
10972
10973
# File 'lib/talon_one_sdk/api/management_api.rb', line 10924

def invite_user_external_with_http_info(new_external_invitation, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.invite_user_external ...'
  end
  # verify the required parameter 'new_external_invitation' is set
  if @api_client.config.client_side_validation && new_external_invitation.nil?
    fail ArgumentError, "Missing the required parameter 'new_external_invitation' when calling ManagementApi.invite_user_external"
  end
  # resource path
  local_var_path = '/v1/users/invite'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(new_external_invitation)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.invite_user_external",
    :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#invite_user_external\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_account_collections(opts = {}) ⇒ ListAccountCollections200Response

List collections in account List account-level collections in the account.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

  • :with_total_result_size (Boolean)

    When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When &#x60;true&#x60;: &#x60;totalResultSize&#x60; contains the total number of results for this query. - When &#x60;false&#x60;: Only &#x60;hasMore&#x60; is returned, and it is set to &#x60;true&#x60; when there are more results than shown on the page.

  • :name (String)

    Filter by collection name.

Returns:



10984
10985
10986
10987
# File 'lib/talon_one_sdk/api/management_api.rb', line 10984

def (opts = {})
  data, _status_code, _headers = (opts)
  data
end

#list_account_collections_with_http_info(opts = {}) ⇒ Array<(ListAccountCollections200Response, Integer, Hash)>

List collections in account List account-level collections in the account.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

  • :with_total_result_size (Boolean)

    When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When &#x60;true&#x60;: &#x60;totalResultSize&#x60; contains the total number of results for this query. - When &#x60;false&#x60;: Only &#x60;hasMore&#x60; is returned, and it is set to &#x60;true&#x60; when there are more results than shown on the page.

  • :name (String)

    Filter by collection name.

Returns:



10998
10999
11000
11001
11002
11003
11004
11005
11006
11007
11008
11009
11010
11011
11012
11013
11014
11015
11016
11017
11018
11019
11020
11021
11022
11023
11024
11025
11026
11027
11028
11029
11030
11031
11032
11033
11034
11035
11036
11037
11038
11039
11040
11041
11042
11043
11044
11045
11046
11047
11048
11049
11050
11051
11052
11053
# File 'lib/talon_one_sdk/api/management_api.rb', line 10998

def (opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.list_account_collections ...'
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.list_account_collections, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.list_account_collections, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/v1/collections'

  # 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?
  query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ListAccountCollections200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.list_account_collections",
    :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#list_account_collections\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_achievements(application_id, campaign_id, opts = {}) ⇒ ListAchievements200Response

List achievements List all the achievements for a specific campaign.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 50)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :title (String)

    Filter by the display name for the achievement in the campaign manager. Note: If no &#x60;title&#x60; is provided, all the achievements from the campaign are returned.

Returns:



11064
11065
11066
11067
# File 'lib/talon_one_sdk/api/management_api.rb', line 11064

def list_achievements(application_id, campaign_id, opts = {})
  data, _status_code, _headers = list_achievements_with_http_info(application_id, campaign_id, opts)
  data
end

#list_achievements_with_http_info(application_id, campaign_id, opts = {}) ⇒ Array<(ListAchievements200Response, Integer, Hash)>

List achievements List all the achievements for a specific campaign.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 50)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :title (String)

    Filter by the display name for the achievement in the campaign manager. Note: If no &#x60;title&#x60; is provided, all the achievements from the campaign are returned.

Returns:

  • (Array<(ListAchievements200Response, Integer, Hash)>)

    ListAchievements200Response data, response status code and response headers



11078
11079
11080
11081
11082
11083
11084
11085
11086
11087
11088
11089
11090
11091
11092
11093
11094
11095
11096
11097
11098
11099
11100
11101
11102
11103
11104
11105
11106
11107
11108
11109
11110
11111
11112
11113
11114
11115
11116
11117
11118
11119
11120
11121
11122
11123
11124
11125
11126
11127
11128
11129
11130
11131
11132
11133
11134
11135
11136
11137
11138
11139
# File 'lib/talon_one_sdk/api/management_api.rb', line 11078

def list_achievements_with_http_info(application_id, campaign_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.list_achievements ...'
  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.list_achievements"
  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.list_achievements"
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 50
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.list_achievements, must be smaller than or equal to 50.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.list_achievements, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/achievements'.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[:'title'] = opts[:'title'] if !opts[:'title'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ListAchievements200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.list_achievements",
    :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#list_achievements\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_all_roles_v2(opts = {}) ⇒ ListAllRolesV2200Response

List roles List all roles.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



11145
11146
11147
11148
# File 'lib/talon_one_sdk/api/management_api.rb', line 11145

def list_all_roles_v2(opts = {})
  data, _status_code, _headers = list_all_roles_v2_with_http_info(opts)
  data
end

#list_all_roles_v2_with_http_info(opts = {}) ⇒ Array<(ListAllRolesV2200Response, Integer, Hash)>

List roles List all roles.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ListAllRolesV2200Response, Integer, Hash)>)

    ListAllRolesV2200Response data, response status code and response headers



11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171
11172
11173
11174
11175
11176
11177
11178
11179
11180
11181
11182
11183
11184
11185
11186
11187
11188
11189
11190
11191
11192
11193
11194
11195
11196
# File 'lib/talon_one_sdk/api/management_api.rb', line 11154

def list_all_roles_v2_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.list_all_roles_v2 ...'
  end
  # resource path
  local_var_path = '/v2/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']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ListAllRolesV2200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.list_all_roles_v2",
    :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#list_all_roles_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_application_cart_item_filters(application_id, opts = {}) ⇒ ListApplicationCartItemFilters200Response

List Application cart item filters Return all the Application cart item filters for a specific Application.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 50)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :name (String)

    Filter by the display name of the Application cart item filter in the Application. Note: If no &#x60;name&#x60; is provided, all the Application cart item filters in the Application are returned.

Returns:



11206
11207
11208
11209
# File 'lib/talon_one_sdk/api/management_api.rb', line 11206

def list_application_cart_item_filters(application_id, opts = {})
  data, _status_code, _headers = list_application_cart_item_filters_with_http_info(application_id, opts)
  data
end

#list_application_cart_item_filters_with_http_info(application_id, opts = {}) ⇒ Array<(ListApplicationCartItemFilters200Response, Integer, Hash)>

List Application cart item filters Return all the Application cart item filters for a specific Application.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 50)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :name (String)

    Filter by the display name of the Application cart item filter in the Application. Note: If no &#x60;name&#x60; is provided, all the Application cart item filters in the Application are returned.

Returns:



11219
11220
11221
11222
11223
11224
11225
11226
11227
11228
11229
11230
11231
11232
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263
11264
11265
11266
11267
11268
11269
11270
11271
11272
11273
11274
11275
11276
# File 'lib/talon_one_sdk/api/management_api.rb', line 11219

def list_application_cart_item_filters_with_http_info(application_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.list_application_cart_item_filters ...'
  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.list_application_cart_item_filters"
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 50
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.list_application_cart_item_filters, must be smaller than or equal to 50.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.list_application_cart_item_filters, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/v1/applications/{applicationId}/cart_item_filters'.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[:'name'] = opts[:'name'] if !opts[:'name'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ListApplicationCartItemFilters200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.list_application_cart_item_filters",
    :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#list_application_cart_item_filters\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_campaign_store_budget_limits(application_id, campaign_id, opts = {}) ⇒ ListCampaignStoreBudgetLimits200Response

List campaign store budget limits Return the store budget limits for a given campaign.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :action (String)

    The action that this budget is limiting.

  • :period (String)

    The period to which the limit applies. Note: For budgets with no period, set this to &#x60;overall&#x60;.

Returns:



11286
11287
11288
11289
# File 'lib/talon_one_sdk/api/management_api.rb', line 11286

def list_campaign_store_budget_limits(application_id, campaign_id, opts = {})
  data, _status_code, _headers = list_campaign_store_budget_limits_with_http_info(application_id, campaign_id, opts)
  data
end

#list_campaign_store_budget_limits_with_http_info(application_id, campaign_id, opts = {}) ⇒ Array<(ListCampaignStoreBudgetLimits200Response, Integer, Hash)>

List campaign store budget limits Return the store budget limits for a given campaign.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :action (String)

    The action that this budget is limiting.

  • :period (String)

    The period to which the limit applies. Note: For budgets with no period, set this to &#x60;overall&#x60;.

Returns:



11299
11300
11301
11302
11303
11304
11305
11306
11307
11308
11309
11310
11311
11312
11313
11314
11315
11316
11317
11318
11319
11320
11321
11322
11323
11324
11325
11326
11327
11328
11329
11330
11331
11332
11333
11334
11335
11336
11337
11338
11339
11340
11341
11342
11343
11344
11345
11346
11347
11348
11349
11350
11351
11352
11353
11354
11355
11356
11357
11358
11359
# File 'lib/talon_one_sdk/api/management_api.rb', line 11299

def list_campaign_store_budget_limits_with_http_info(application_id, campaign_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.list_campaign_store_budget_limits ...'
  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.list_campaign_store_budget_limits"
  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.list_campaign_store_budget_limits"
  end
  allowable_values = ["setDiscount"]
  if @api_client.config.client_side_validation && opts[:'action'] && !allowable_values.include?(opts[:'action'])
    fail ArgumentError, "invalid value for \"action\", must be one of #{allowable_values}"
  end
  allowable_values = ["overall", "daily", "weekly", "monthly", "yearly"]
  if @api_client.config.client_side_validation && opts[:'period'] && !allowable_values.include?(opts[:'period'])
    fail ArgumentError, "invalid value for \"period\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/stores/budgets'.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[:'action'] = opts[:'action'] if !opts[:'action'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ListCampaignStoreBudgetLimits200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.list_campaign_store_budget_limits",
    :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#list_campaign_store_budget_limits\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_catalog_items(catalog_id, opts = {}) ⇒ ListCatalogItems200Response

List items in a catalog Return a paginated list of cart items in the given catalog.

Parameters:

  • catalog_id (Integer)

    The ID of the catalog. You can find the ID in the Campaign Manager in Account &gt; Tools &gt; **Cart item catalogs**.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :with_total_result_size (Boolean)

    When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When &#x60;true&#x60;: &#x60;totalResultSize&#x60; contains the total number of results for this query. - When &#x60;false&#x60;: Only &#x60;hasMore&#x60; is returned, and it is set to &#x60;true&#x60; when there are more results than shown on the page.

  • :sku (Array<String>)

    Filter results by one or more SKUs. Must be exact match.

  • :product_names (Array<String>)

    Filter results by one or more product names. Must be exact match.

Returns:



11371
11372
11373
11374
# File 'lib/talon_one_sdk/api/management_api.rb', line 11371

def list_catalog_items(catalog_id, opts = {})
  data, _status_code, _headers = list_catalog_items_with_http_info(catalog_id, opts)
  data
end

#list_catalog_items_with_http_info(catalog_id, opts = {}) ⇒ Array<(ListCatalogItems200Response, Integer, Hash)>

List items in a catalog Return a paginated list of cart items in the given catalog.

Parameters:

  • catalog_id (Integer)

    The ID of the catalog. You can find the ID in the Campaign Manager in Account &gt; Tools &gt; **Cart item catalogs**.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :with_total_result_size (Boolean)

    When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When &#x60;true&#x60;: &#x60;totalResultSize&#x60; contains the total number of results for this query. - When &#x60;false&#x60;: Only &#x60;hasMore&#x60; is returned, and it is set to &#x60;true&#x60; when there are more results than shown on the page.

  • :sku (Array<String>)

    Filter results by one or more SKUs. Must be exact match.

  • :product_names (Array<String>)

    Filter results by one or more product names. Must be exact match.

Returns:

  • (Array<(ListCatalogItems200Response, Integer, Hash)>)

    ListCatalogItems200Response data, response status code and response headers



11386
11387
11388
11389
11390
11391
11392
11393
11394
11395
11396
11397
11398
11399
11400
11401
11402
11403
11404
11405
11406
11407
11408
11409
11410
11411
11412
11413
11414
11415
11416
11417
11418
11419
11420
11421
11422
11423
11424
11425
11426
11427
11428
11429
11430
11431
11432
11433
11434
11435
11436
11437
11438
11439
11440
11441
11442
11443
11444
11445
# File 'lib/talon_one_sdk/api/management_api.rb', line 11386

def list_catalog_items_with_http_info(catalog_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.list_catalog_items ...'
  end
  # verify the required parameter 'catalog_id' is set
  if @api_client.config.client_side_validation && catalog_id.nil?
    fail ArgumentError, "Missing the required parameter 'catalog_id' when calling ManagementApi.list_catalog_items"
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.list_catalog_items, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.list_catalog_items, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/v1/catalogs/{catalogId}/items'.sub('{catalogId}', CGI.escape(catalog_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[:'withTotalResultSize'] = opts[:'with_total_result_size'] if !opts[:'with_total_result_size'].nil?
  query_params[:'sku'] = @api_client.build_collection_param(opts[:'sku'], :multi) if !opts[:'sku'].nil?
  query_params[:'productNames'] = @api_client.build_collection_param(opts[:'product_names'], :multi) if !opts[:'product_names'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ListCatalogItems200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.list_catalog_items",
    :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#list_catalog_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_collections(application_id, campaign_id, opts = {}) ⇒ ListAccountCollections200Response

List collections in campaign List collections in a given campaign.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

  • :with_total_result_size (Boolean)

    When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When &#x60;true&#x60;: &#x60;totalResultSize&#x60; contains the total number of results for this query. - When &#x60;false&#x60;: Only &#x60;hasMore&#x60; is returned, and it is set to &#x60;true&#x60; when there are more results than shown on the page.

  • :name (String)

    Filter by collection name.

Returns:



11458
11459
11460
11461
# File 'lib/talon_one_sdk/api/management_api.rb', line 11458

def list_collections(application_id, campaign_id, opts = {})
  data, _status_code, _headers = list_collections_with_http_info(application_id, campaign_id, opts)
  data
end

#list_collections_in_application(application_id, opts = {}) ⇒ ListAccountCollections200Response

List collections in Application List campaign-level collections from all campaigns in a given Application.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

  • :with_total_result_size (Boolean)

    When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When &#x60;true&#x60;: &#x60;totalResultSize&#x60; contains the total number of results for this query. - When &#x60;false&#x60;: Only &#x60;hasMore&#x60; is returned, and it is set to &#x60;true&#x60; when there are more results than shown on the page.

  • :name (String)

    Filter by collection name.

Returns:



11549
11550
11551
11552
# File 'lib/talon_one_sdk/api/management_api.rb', line 11549

def list_collections_in_application(application_id, opts = {})
  data, _status_code, _headers = list_collections_in_application_with_http_info(application_id, opts)
  data
end

#list_collections_in_application_with_http_info(application_id, opts = {}) ⇒ Array<(ListAccountCollections200Response, Integer, Hash)>

List collections in Application List campaign-level collections from all campaigns in a given Application.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

  • :with_total_result_size (Boolean)

    When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When &#x60;true&#x60;: &#x60;totalResultSize&#x60; contains the total number of results for this query. - When &#x60;false&#x60;: Only &#x60;hasMore&#x60; is returned, and it is set to &#x60;true&#x60; when there are more results than shown on the page.

  • :name (String)

    Filter by collection name.

Returns:



11564
11565
11566
11567
11568
11569
11570
11571
11572
11573
11574
11575
11576
11577
11578
11579
11580
11581
11582
11583
11584
11585
11586
11587
11588
11589
11590
11591
11592
11593
11594
11595
11596
11597
11598
11599
11600
11601
11602
11603
11604
11605
11606
11607
11608
11609
11610
11611
11612
11613
11614
11615
11616
11617
11618
11619
11620
11621
11622
11623
# File 'lib/talon_one_sdk/api/management_api.rb', line 11564

def list_collections_in_application_with_http_info(application_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.list_collections_in_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.list_collections_in_application"
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.list_collections_in_application, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.list_collections_in_application, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/v1/applications/{applicationId}/collections'.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[:'withTotalResultSize'] = opts[:'with_total_result_size'] if !opts[:'with_total_result_size'].nil?
  query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ListAccountCollections200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.list_collections_in_application",
    :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#list_collections_in_application\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_collections_with_http_info(application_id, campaign_id, opts = {}) ⇒ Array<(ListAccountCollections200Response, Integer, Hash)>

List collections in campaign List collections in a given campaign.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

  • :with_total_result_size (Boolean)

    When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When &#x60;true&#x60;: &#x60;totalResultSize&#x60; contains the total number of results for this query. - When &#x60;false&#x60;: Only &#x60;hasMore&#x60; is returned, and it is set to &#x60;true&#x60; when there are more results than shown on the page.

  • :name (String)

    Filter by collection name.

Returns:



11474
11475
11476
11477
11478
11479
11480
11481
11482
11483
11484
11485
11486
11487
11488
11489
11490
11491
11492
11493
11494
11495
11496
11497
11498
11499
11500
11501
11502
11503
11504
11505
11506
11507
11508
11509
11510
11511
11512
11513
11514
11515
11516
11517
11518
11519
11520
11521
11522
11523
11524
11525
11526
11527
11528
11529
11530
11531
11532
11533
11534
11535
11536
11537
# File 'lib/talon_one_sdk/api/management_api.rb', line 11474

def list_collections_with_http_info(application_id, campaign_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.list_collections ...'
  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.list_collections"
  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.list_collections"
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.list_collections, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.list_collections, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/collections'.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[:'withTotalResultSize'] = opts[:'with_total_result_size'] if !opts[:'with_total_result_size'].nil?
  query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ListAccountCollections200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.list_collections",
    :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#list_collections\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_experiments(application_id, opts = {}) ⇒ ListExperiments200Response

List experiments List all experiments of the specified Application that match your filter criteria.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

Returns:



11633
11634
11635
11636
# File 'lib/talon_one_sdk/api/management_api.rb', line 11633

def list_experiments(application_id, opts = {})
  data, _status_code, _headers = list_experiments_with_http_info(application_id, opts)
  data
end

#list_experiments_with_http_info(application_id, opts = {}) ⇒ Array<(ListExperiments200Response, Integer, Hash)>

List experiments List all experiments of the specified Application that match your filter criteria.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

Returns:

  • (Array<(ListExperiments200Response, Integer, Hash)>)

    ListExperiments200Response data, response status code and response headers



11646
11647
11648
11649
11650
11651
11652
11653
11654
11655
11656
11657
11658
11659
11660
11661
11662
11663
11664
11665
11666
11667
11668
11669
11670
11671
11672
11673
11674
11675
11676
11677
11678
11679
11680
11681
11682
11683
11684
11685
11686
11687
11688
11689
11690
11691
11692
11693
11694
11695
11696
11697
11698
11699
11700
11701
11702
11703
# File 'lib/talon_one_sdk/api/management_api.rb', line 11646

def list_experiments_with_http_info(application_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.list_experiments ...'
  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.list_experiments"
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.list_experiments, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.list_experiments, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/v1/applications/{applicationId}/experiments'.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']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ListExperiments200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.list_experiments",
    :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#list_experiments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_stores(application_id, opts = {}) ⇒ ListStores200Response

List stores List all stores for a specific Application.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

  • :with_total_result_size (Boolean)

    When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When &#x60;true&#x60;: &#x60;totalResultSize&#x60; contains the total number of results for this query. - When &#x60;false&#x60;: Only &#x60;hasMore&#x60; is returned, and it is set to &#x60;true&#x60; when there are more results than shown on the page.

  • :campaign_id (Float)

    Filter results by campaign ID.

  • :name (String)

    The name of the store.

  • :integration_id (String)

    The integration ID of the store.

  • :query (String)

    Filter results by &#x60;name&#x60; or &#x60;integrationId&#x60;.

Returns:



11718
11719
11720
11721
# File 'lib/talon_one_sdk/api/management_api.rb', line 11718

def list_stores(application_id, opts = {})
  data, _status_code, _headers = list_stores_with_http_info(application_id, opts)
  data
end

#list_stores_with_http_info(application_id, opts = {}) ⇒ Array<(ListStores200Response, Integer, Hash)>

List stores List all stores for a specific Application.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

  • :with_total_result_size (Boolean)

    When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When &#x60;true&#x60;: &#x60;totalResultSize&#x60; contains the total number of results for this query. - When &#x60;false&#x60;: Only &#x60;hasMore&#x60; is returned, and it is set to &#x60;true&#x60; when there are more results than shown on the page.

  • :campaign_id (Float)

    Filter results by campaign ID.

  • :name (String)

    The name of the store.

  • :integration_id (String)

    The integration ID of the store.

  • :query (String)

    Filter results by &#x60;name&#x60; or &#x60;integrationId&#x60;.

Returns:

  • (Array<(ListStores200Response, Integer, Hash)>)

    ListStores200Response data, response status code and response headers



11736
11737
11738
11739
11740
11741
11742
11743
11744
11745
11746
11747
11748
11749
11750
11751
11752
11753
11754
11755
11756
11757
11758
11759
11760
11761
11762
11763
11764
11765
11766
11767
11768
11769
11770
11771
11772
11773
11774
11775
11776
11777
11778
11779
11780
11781
11782
11783
11784
11785
11786
11787
11788
11789
11790
11791
11792
11793
11794
11795
11796
11797
11798
# File 'lib/talon_one_sdk/api/management_api.rb', line 11736

def list_stores_with_http_info(application_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.list_stores ...'
  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.list_stores"
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.list_stores, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.list_stores, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/v1/applications/{applicationId}/stores'.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[:'withTotalResultSize'] = opts[:'with_total_result_size'] if !opts[:'with_total_result_size'].nil?
  query_params[:'campaignId'] = opts[:'campaign_id'] if !opts[:'campaign_id'].nil?
  query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
  query_params[:'integrationId'] = opts[:'integration_id'] if !opts[:'integration_id'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ListStores200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.list_stores",
    :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#list_stores\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#okta_event_handler_challenge(opts = {}) ⇒ nil

Validate Okta API ownership Validate the ownership of the API through a challenge-response mechanism. This challenger endpoint is used by Okta to confirm that communication between Talon.One and Okta is correctly configured and accessible for provisioning and deprovisioning of Talon.One users, and that only Talon.One can receive and respond to events from Okta.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


11804
11805
11806
11807
# File 'lib/talon_one_sdk/api/management_api.rb', line 11804

def okta_event_handler_challenge(opts = {})
  okta_event_handler_challenge_with_http_info(opts)
  nil
end

#okta_event_handler_challenge_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>

Validate Okta API ownership Validate the ownership of the API through a challenge-response mechanism. This challenger endpoint is used by Okta to confirm that communication between Talon.One and Okta is correctly configured and accessible for provisioning and deprovisioning of Talon.One users, and that only Talon.One can receive and respond to events from Okta.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



11813
11814
11815
11816
11817
11818
11819
11820
11821
11822
11823
11824
11825
11826
11827
11828
11829
11830
11831
11832
11833
11834
11835
11836
11837
11838
11839
11840
11841
11842
11843
11844
11845
11846
11847
11848
11849
11850
11851
11852
11853
# File 'lib/talon_one_sdk/api/management_api.rb', line 11813

def okta_event_handler_challenge_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.okta_event_handler_challenge ...'
  end
  # resource path
  local_var_path = '/v1/provisioning/okta'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.okta_event_handler_challenge",
    :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#okta_event_handler_challenge\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#price_history(application_id, price_history_request, opts = {}) ⇒ PriceHistoryResponse

Get summary of price history Fetch the historical price data for a given SKU within a defined timeframe.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • price_history_request (PriceHistoryRequest)

    body

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



11861
11862
11863
11864
# File 'lib/talon_one_sdk/api/management_api.rb', line 11861

def price_history(application_id, price_history_request, opts = {})
  data, _status_code, _headers = price_history_with_http_info(application_id, price_history_request, opts)
  data
end

#price_history_with_http_info(application_id, price_history_request, opts = {}) ⇒ Array<(PriceHistoryResponse, Integer, Hash)>

Get summary of price history Fetch the historical price data for a given SKU within a defined timeframe.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • price_history_request (PriceHistoryRequest)

    body

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(PriceHistoryResponse, Integer, Hash)>)

    PriceHistoryResponse data, response status code and response headers



11872
11873
11874
11875
11876
11877
11878
11879
11880
11881
11882
11883
11884
11885
11886
11887
11888
11889
11890
11891
11892
11893
11894
11895
11896
11897
11898
11899
11900
11901
11902
11903
11904
11905
11906
11907
11908
11909
11910
11911
11912
11913
11914
11915
11916
11917
11918
11919
11920
11921
11922
11923
11924
11925
11926
11927
# File 'lib/talon_one_sdk/api/management_api.rb', line 11872

def price_history_with_http_info(application_id, price_history_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.price_history ...'
  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.price_history"
  end
  # verify the required parameter 'price_history_request' is set
  if @api_client.config.client_side_validation && price_history_request.nil?
    fail ArgumentError, "Missing the required parameter 'price_history_request' when calling ManagementApi.price_history"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/price_history'.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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(price_history_request)

  # return_type
  return_type = opts[:debug_return_type] || 'PriceHistoryResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.price_history",
    :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#price_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#remove_loyalty_points(loyalty_program_id, integration_id, deduct_loyalty_points, opts = {}) ⇒ nil

Deduct points from customer profile Deduct points from the specified loyalty program and specified customer profile. > [!note] Note > - Only active points can be deducted. > - Only pending points are rolled back when a session is cancelled or reopened. To get the ‘integrationId` of the profile from a `sessionId`, use the [Update customer session](docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) endpoint.

Parameters:

  • loyalty_program_id (String)

    The identifier for the loyalty program.

  • integration_id (String)

    The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier.

  • deduct_loyalty_points (DeductLoyaltyPoints)

    body

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


11936
11937
11938
11939
# File 'lib/talon_one_sdk/api/management_api.rb', line 11936

def remove_loyalty_points(loyalty_program_id, integration_id, deduct_loyalty_points, opts = {})
  remove_loyalty_points_with_http_info(loyalty_program_id, integration_id, deduct_loyalty_points, opts)
  nil
end

#remove_loyalty_points_with_http_info(loyalty_program_id, integration_id, deduct_loyalty_points, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Deduct points from customer profile Deduct points from the specified loyalty program and specified customer profile. &gt; [!note] Note &gt; - Only active points can be deducted. &gt; - Only pending points are rolled back when a session is cancelled or reopened. To get the &#x60;integrationId&#x60; of the profile from a &#x60;sessionId&#x60;, use the [Update customer session](docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) endpoint.

Parameters:

  • loyalty_program_id (String)

    The identifier for the loyalty program.

  • integration_id (String)

    The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier.

  • deduct_loyalty_points (DeductLoyaltyPoints)

    body

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



11948
11949
11950
11951
11952
11953
11954
11955
11956
11957
11958
11959
11960
11961
11962
11963
11964
11965
11966
11967
11968
11969
11970
11971
11972
11973
11974
11975
11976
11977
11978
11979
11980
11981
11982
11983
11984
11985
11986
11987
11988
11989
11990
11991
11992
11993
11994
11995
11996
11997
11998
11999
12000
12001
12002
12003
12004
12005
12006
12007
# File 'lib/talon_one_sdk/api/management_api.rb', line 11948

def remove_loyalty_points_with_http_info(loyalty_program_id, integration_id, deduct_loyalty_points, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.remove_loyalty_points ...'
  end
  # verify the required parameter 'loyalty_program_id' is set
  if @api_client.config.client_side_validation && loyalty_program_id.nil?
    fail ArgumentError, "Missing the required parameter 'loyalty_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 'deduct_loyalty_points' is set
  if @api_client.config.client_side_validation && deduct_loyalty_points.nil?
    fail ArgumentError, "Missing the required parameter 'deduct_loyalty_points' when calling ManagementApi.remove_loyalty_points"
  end
  # resource path
  local_var_path = '/v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/deduct_points'.sub('{loyaltyProgramId}', CGI.escape(loyalty_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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(deduct_loyalty_points)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.remove_loyalty_points",
    :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(new_password, opts = {}) ⇒ NewPassword

Reset password Consumes the supplied password reset token and updates the password for the associated account.

Parameters:

  • new_password (NewPassword)

    body

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



12014
12015
12016
12017
# File 'lib/talon_one_sdk/api/management_api.rb', line 12014

def reset_password(new_password, opts = {})
  data, _status_code, _headers = reset_password_with_http_info(new_password, opts)
  data
end

#reset_password_with_http_info(new_password, opts = {}) ⇒ Array<(NewPassword, Integer, Hash)>

Reset password Consumes the supplied password reset token and updates the password for the associated account.

Parameters:

  • new_password (NewPassword)

    body

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(NewPassword, Integer, Hash)>)

    NewPassword data, response status code and response headers



12024
12025
12026
12027
12028
12029
12030
12031
12032
12033
12034
12035
12036
12037
12038
12039
12040
12041
12042
12043
12044
12045
12046
12047
12048
12049
12050
12051
12052
12053
12054
12055
12056
12057
12058
12059
12060
12061
12062
12063
12064
12065
12066
12067
12068
12069
12070
12071
12072
12073
12074
12075
# File 'lib/talon_one_sdk/api/management_api.rb', line 12024

def reset_password_with_http_info(new_password, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.reset_password ...'
  end
  # verify the required parameter 'new_password' is set
  if @api_client.config.client_side_validation && new_password.nil?
    fail ArgumentError, "Missing the required parameter 'new_password' 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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(new_password)

  # return_type
  return_type = opts[:debug_return_type] || 'NewPassword'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.reset_password",
    :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

#scim_create_group(scim_base_group, opts = {}) ⇒ ScimGroup

Create SCIM group Create a new Talon.One group using the SCIM Group provisioning protocol with an identity provider, for example, Microsoft Entra ID, and assign members from the payload to the new group. In Talon.One, a ‘Group` corresponds to a [role](docs.talon.one/docs/product/account/account-settings/managing-roles), and `members` are the [users](docs.talon.one/docs/product/account/account-settings/managing-users) assigned to that role.

Parameters:

  • scim_base_group (ScimBaseGroup)

    body

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



12082
12083
12084
12085
# File 'lib/talon_one_sdk/api/management_api.rb', line 12082

def scim_create_group(scim_base_group, opts = {})
  data, _status_code, _headers = scim_create_group_with_http_info(scim_base_group, opts)
  data
end

#scim_create_group_with_http_info(scim_base_group, opts = {}) ⇒ Array<(ScimGroup, Integer, Hash)>

Create SCIM group Create a new Talon.One group using the SCIM Group provisioning protocol with an identity provider, for example, Microsoft Entra ID, and assign members from the payload to the new group. In Talon.One, a &#x60;Group&#x60; corresponds to a [role](docs.talon.one/docs/product/account/account-settings/managing-roles), and &#x60;members&#x60; are the [users](docs.talon.one/docs/product/account/account-settings/managing-users) assigned to that role.

Parameters:

  • scim_base_group (ScimBaseGroup)

    body

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ScimGroup, Integer, Hash)>)

    ScimGroup data, response status code and response headers



12092
12093
12094
12095
12096
12097
12098
12099
12100
12101
12102
12103
12104
12105
12106
12107
12108
12109
12110
12111
12112
12113
12114
12115
12116
12117
12118
12119
12120
12121
12122
12123
12124
12125
12126
12127
12128
12129
12130
12131
12132
12133
12134
12135
12136
12137
12138
12139
12140
12141
12142
12143
# File 'lib/talon_one_sdk/api/management_api.rb', line 12092

def scim_create_group_with_http_info(scim_base_group, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.scim_create_group ...'
  end
  # verify the required parameter 'scim_base_group' is set
  if @api_client.config.client_side_validation && scim_base_group.nil?
    fail ArgumentError, "Missing the required parameter 'scim_base_group' when calling ManagementApi.scim_create_group"
  end
  # resource path
  local_var_path = '/v1/provisioning/scim/Groups'

  # 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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(scim_base_group)

  # return_type
  return_type = opts[:debug_return_type] || 'ScimGroup'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.scim_create_group",
    :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#scim_create_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#scim_create_user(scim_new_user, opts = {}) ⇒ ScimUser

Create SCIM user Create a new Talon.One user using the SCIM provisioning protocol with an identity provider, for example, Microsoft Entra ID.

Parameters:

  • scim_new_user (ScimNewUser)

    body

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



12150
12151
12152
12153
# File 'lib/talon_one_sdk/api/management_api.rb', line 12150

def scim_create_user(scim_new_user, opts = {})
  data, _status_code, _headers = scim_create_user_with_http_info(scim_new_user, opts)
  data
end

#scim_create_user_with_http_info(scim_new_user, opts = {}) ⇒ Array<(ScimUser, Integer, Hash)>

Create SCIM user Create a new Talon.One user using the SCIM provisioning protocol with an identity provider, for example, Microsoft Entra ID.

Parameters:

  • scim_new_user (ScimNewUser)

    body

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ScimUser, Integer, Hash)>)

    ScimUser data, response status code and response headers



12160
12161
12162
12163
12164
12165
12166
12167
12168
12169
12170
12171
12172
12173
12174
12175
12176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190
12191
12192
12193
12194
12195
12196
12197
12198
12199
12200
12201
12202
12203
12204
12205
12206
12207
12208
12209
12210
12211
# File 'lib/talon_one_sdk/api/management_api.rb', line 12160

def scim_create_user_with_http_info(scim_new_user, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.scim_create_user ...'
  end
  # verify the required parameter 'scim_new_user' is set
  if @api_client.config.client_side_validation && scim_new_user.nil?
    fail ArgumentError, "Missing the required parameter 'scim_new_user' when calling ManagementApi.scim_create_user"
  end
  # resource path
  local_var_path = '/v1/provisioning/scim/Users'

  # 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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(scim_new_user)

  # return_type
  return_type = opts[:debug_return_type] || 'ScimUser'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.scim_create_user",
    :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#scim_create_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#scim_delete_group(group_id, opts = {}) ⇒ nil

Delete SCIM group Delete a specific group created using the SCIM provisioning protocol with an identity provider, for example, Microsoft Entra ID. In Talon.One, a ‘Group` corresponds to a [role](docs.talon.one/docs/product/account/account-settings/managing-roles), and `members` are the [users](docs.talon.one/docs/product/account/account-settings/managing-users) assigned to that role.

Parameters:

  • group_id (Integer)

    The ID of the group.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


12218
12219
12220
12221
# File 'lib/talon_one_sdk/api/management_api.rb', line 12218

def scim_delete_group(group_id, opts = {})
  scim_delete_group_with_http_info(group_id, opts)
  nil
end

#scim_delete_group_with_http_info(group_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete SCIM group Delete a specific group created using the SCIM provisioning protocol with an identity provider, for example, Microsoft Entra ID. In Talon.One, a &#x60;Group&#x60; corresponds to a [role](docs.talon.one/docs/product/account/account-settings/managing-roles), and &#x60;members&#x60; are the [users](docs.talon.one/docs/product/account/account-settings/managing-users) assigned to that role.

Parameters:

  • group_id (Integer)

    The ID of the group.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



12228
12229
12230
12231
12232
12233
12234
12235
12236
12237
12238
12239
12240
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
12253
12254
12255
12256
12257
12258
12259
12260
12261
12262
12263
12264
12265
12266
12267
12268
12269
12270
12271
12272
# File 'lib/talon_one_sdk/api/management_api.rb', line 12228

def scim_delete_group_with_http_info(group_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.scim_delete_group ...'
  end
  # verify the required parameter 'group_id' is set
  if @api_client.config.client_side_validation && group_id.nil?
    fail ArgumentError, "Missing the required parameter 'group_id' when calling ManagementApi.scim_delete_group"
  end
  # resource path
  local_var_path = '/v1/provisioning/scim/Groups/{groupId}'.sub('{groupId}', CGI.escape(group_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[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.scim_delete_group",
    :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#scim_delete_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#scim_delete_user(user_id, opts = {}) ⇒ nil

Delete SCIM user Delete a specific Talon.One user created using the SCIM provisioning protocol with an identity provider, for example, Microsoft Entra ID.

Parameters:

  • user_id (Integer)

    The ID of the user.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


12279
12280
12281
12282
# File 'lib/talon_one_sdk/api/management_api.rb', line 12279

def scim_delete_user(user_id, opts = {})
  scim_delete_user_with_http_info(user_id, opts)
  nil
end

#scim_delete_user_with_http_info(user_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete SCIM user Delete a specific Talon.One user created using the SCIM provisioning protocol with an identity provider, for example, Microsoft Entra ID.

Parameters:

  • user_id (Integer)

    The ID of the user.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



12289
12290
12291
12292
12293
12294
12295
12296
12297
12298
12299
12300
12301
12302
12303
12304
12305
12306
12307
12308
12309
12310
12311
12312
12313
12314
12315
12316
12317
12318
12319
12320
12321
12322
12323
12324
12325
12326
12327
12328
12329
12330
12331
12332
12333
# File 'lib/talon_one_sdk/api/management_api.rb', line 12289

def scim_delete_user_with_http_info(user_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.scim_delete_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.scim_delete_user"
  end
  # resource path
  local_var_path = '/v1/provisioning/scim/Users/{userId}'.sub('{userId}', CGI.escape(user_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[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.scim_delete_user",
    :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#scim_delete_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#scim_get_group(group_id, opts = {}) ⇒ ScimGroup

Get SCIM group Retrieve data for a specific group created using the SCIM provisioning protocol with an identity provider, for example, Microsoft Entra ID. In Talon.One, a ‘Group` corresponds to a [role](docs.talon.one/docs/product/account/account-settings/managing-roles), and `members` are the [users](docs.talon.one/docs/product/account/account-settings/managing-users) assigned to that role.

Parameters:

  • group_id (Integer)

    The ID of the group.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



12340
12341
12342
12343
# File 'lib/talon_one_sdk/api/management_api.rb', line 12340

def scim_get_group(group_id, opts = {})
  data, _status_code, _headers = scim_get_group_with_http_info(group_id, opts)
  data
end

#scim_get_group_with_http_info(group_id, opts = {}) ⇒ Array<(ScimGroup, Integer, Hash)>

Get SCIM group Retrieve data for a specific group created using the SCIM provisioning protocol with an identity provider, for example, Microsoft Entra ID. In Talon.One, a &#x60;Group&#x60; corresponds to a [role](docs.talon.one/docs/product/account/account-settings/managing-roles), and &#x60;members&#x60; are the [users](docs.talon.one/docs/product/account/account-settings/managing-users) assigned to that role.

Parameters:

  • group_id (Integer)

    The ID of the group.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ScimGroup, Integer, Hash)>)

    ScimGroup data, response status code and response headers



12350
12351
12352
12353
12354
12355
12356
12357
12358
12359
12360
12361
12362
12363
12364
12365
12366
12367
12368
12369
12370
12371
12372
12373
12374
12375
12376
12377
12378
12379
12380
12381
12382
12383
12384
12385
12386
12387
12388
12389
12390
12391
12392
12393
12394
12395
12396
# File 'lib/talon_one_sdk/api/management_api.rb', line 12350

def scim_get_group_with_http_info(group_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.scim_get_group ...'
  end
  # verify the required parameter 'group_id' is set
  if @api_client.config.client_side_validation && group_id.nil?
    fail ArgumentError, "Missing the required parameter 'group_id' when calling ManagementApi.scim_get_group"
  end
  # resource path
  local_var_path = '/v1/provisioning/scim/Groups/{groupId}'.sub('{groupId}', CGI.escape(group_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']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ScimGroup'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.scim_get_group",
    :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#scim_get_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#scim_get_groups(opts = {}) ⇒ ScimGroupsListResponse

List SCIM groups Retrieve a paginated list of groups created using the SCIM protocol with an identity provider, for example, Microsoft Entra ID. In Talon.One, a ‘Group` corresponds to a [role](docs.talon.one/docs/product/account/account-settings/managing-roles), and `members` are the [users](docs.talon.one/docs/product/account/account-settings/managing-users) assigned to that role.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



12402
12403
12404
12405
# File 'lib/talon_one_sdk/api/management_api.rb', line 12402

def scim_get_groups(opts = {})
  data, _status_code, _headers = scim_get_groups_with_http_info(opts)
  data
end

#scim_get_groups_with_http_info(opts = {}) ⇒ Array<(ScimGroupsListResponse, Integer, Hash)>

List SCIM groups Retrieve a paginated list of groups created using the SCIM protocol with an identity provider, for example, Microsoft Entra ID. In Talon.One, a &#x60;Group&#x60; corresponds to a [role](docs.talon.one/docs/product/account/account-settings/managing-roles), and &#x60;members&#x60; are the [users](docs.talon.one/docs/product/account/account-settings/managing-users) assigned to that role.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ScimGroupsListResponse, Integer, Hash)>)

    ScimGroupsListResponse data, response status code and response headers



12411
12412
12413
12414
12415
12416
12417
12418
12419
12420
12421
12422
12423
12424
12425
12426
12427
12428
12429
12430
12431
12432
12433
12434
12435
12436
12437
12438
12439
12440
12441
12442
12443
12444
12445
12446
12447
12448
12449
12450
12451
12452
12453
# File 'lib/talon_one_sdk/api/management_api.rb', line 12411

def scim_get_groups_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.scim_get_groups ...'
  end
  # resource path
  local_var_path = '/v1/provisioning/scim/Groups'

  # 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']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ScimGroupsListResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.scim_get_groups",
    :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#scim_get_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#scim_get_resource_types(opts = {}) ⇒ ScimResourceTypesListResponse

List supported SCIM resource types Retrieve a list of resource types supported by the SCIM provisioning protocol. Resource types define the various kinds of resources that can be managed via the SCIM API, such as users, groups, or custom-defined resources.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



12459
12460
12461
12462
# File 'lib/talon_one_sdk/api/management_api.rb', line 12459

def scim_get_resource_types(opts = {})
  data, _status_code, _headers = scim_get_resource_types_with_http_info(opts)
  data
end

#scim_get_resource_types_with_http_info(opts = {}) ⇒ Array<(ScimResourceTypesListResponse, Integer, Hash)>

List supported SCIM resource types Retrieve a list of resource types supported by the SCIM provisioning protocol. Resource types define the various kinds of resources that can be managed via the SCIM API, such as users, groups, or custom-defined resources.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



12468
12469
12470
12471
12472
12473
12474
12475
12476
12477
12478
12479
12480
12481
12482
12483
12484
12485
12486
12487
12488
12489
12490
12491
12492
12493
12494
12495
12496
12497
12498
12499
12500
12501
12502
12503
12504
12505
12506
12507
12508
12509
12510
# File 'lib/talon_one_sdk/api/management_api.rb', line 12468

def scim_get_resource_types_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.scim_get_resource_types ...'
  end
  # resource path
  local_var_path = '/v1/provisioning/scim/ResourceTypes'

  # 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']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ScimResourceTypesListResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.scim_get_resource_types",
    :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#scim_get_resource_types\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#scim_get_schemas(opts = {}) ⇒ ScimSchemasListResponse

List supported SCIM schemas Retrieve a list of schemas supported by the SCIM provisioning protocol. Schemas define the structure and attributes of the different resources that can be managed via the SCIM API, such as users, groups, and any custom-defined resources.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



12516
12517
12518
12519
# File 'lib/talon_one_sdk/api/management_api.rb', line 12516

def scim_get_schemas(opts = {})
  data, _status_code, _headers = scim_get_schemas_with_http_info(opts)
  data
end

#scim_get_schemas_with_http_info(opts = {}) ⇒ Array<(ScimSchemasListResponse, Integer, Hash)>

List supported SCIM schemas Retrieve a list of schemas supported by the SCIM provisioning protocol. Schemas define the structure and attributes of the different resources that can be managed via the SCIM API, such as users, groups, and any custom-defined resources.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ScimSchemasListResponse, Integer, Hash)>)

    ScimSchemasListResponse data, response status code and response headers



12525
12526
12527
12528
12529
12530
12531
12532
12533
12534
12535
12536
12537
12538
12539
12540
12541
12542
12543
12544
12545
12546
12547
12548
12549
12550
12551
12552
12553
12554
12555
12556
12557
12558
12559
12560
12561
12562
12563
12564
12565
12566
12567
# File 'lib/talon_one_sdk/api/management_api.rb', line 12525

def scim_get_schemas_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.scim_get_schemas ...'
  end
  # resource path
  local_var_path = '/v1/provisioning/scim/Schemas'

  # 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']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ScimSchemasListResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.scim_get_schemas",
    :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#scim_get_schemas\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#scim_get_service_provider_config(opts = {}) ⇒ ScimServiceProviderConfigResponse

Get SCIM service provider configuration Retrieve the configuration settings of the SCIM service provider. It provides details about the features and capabilities supported by the SCIM API, such as the different operation settings.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



12573
12574
12575
12576
# File 'lib/talon_one_sdk/api/management_api.rb', line 12573

def scim_get_service_provider_config(opts = {})
  data, _status_code, _headers = scim_get_service_provider_config_with_http_info(opts)
  data
end

#scim_get_service_provider_config_with_http_info(opts = {}) ⇒ Array<(ScimServiceProviderConfigResponse, Integer, Hash)>

Get SCIM service provider configuration Retrieve the configuration settings of the SCIM service provider. It provides details about the features and capabilities supported by the SCIM API, such as the different operation settings.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



12582
12583
12584
12585
12586
12587
12588
12589
12590
12591
12592
12593
12594
12595
12596
12597
12598
12599
12600
12601
12602
12603
12604
12605
12606
12607
12608
12609
12610
12611
12612
12613
12614
12615
12616
12617
12618
12619
12620
12621
12622
12623
12624
# File 'lib/talon_one_sdk/api/management_api.rb', line 12582

def scim_get_service_provider_config_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.scim_get_service_provider_config ...'
  end
  # resource path
  local_var_path = '/v1/provisioning/scim/ServiceProviderConfig'

  # 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']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ScimServiceProviderConfigResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.scim_get_service_provider_config",
    :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#scim_get_service_provider_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#scim_get_user(user_id, opts = {}) ⇒ ScimUser

Get SCIM user Retrieve data for a specific Talon.One user created using the SCIM provisioning protocol with an identity provider, for example, Microsoft Entra ID.

Parameters:

  • user_id (Integer)

    The ID of the user.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



12631
12632
12633
12634
# File 'lib/talon_one_sdk/api/management_api.rb', line 12631

def scim_get_user(user_id, opts = {})
  data, _status_code, _headers = scim_get_user_with_http_info(user_id, opts)
  data
end

#scim_get_user_with_http_info(user_id, opts = {}) ⇒ Array<(ScimUser, Integer, Hash)>

Get SCIM user Retrieve data for a specific Talon.One user created using the SCIM provisioning protocol with an identity provider, for example, Microsoft Entra ID.

Parameters:

  • user_id (Integer)

    The ID of the user.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ScimUser, Integer, Hash)>)

    ScimUser data, response status code and response headers



12641
12642
12643
12644
12645
12646
12647
12648
12649
12650
12651
12652
12653
12654
12655
12656
12657
12658
12659
12660
12661
12662
12663
12664
12665
12666
12667
12668
12669
12670
12671
12672
12673
12674
12675
12676
12677
12678
12679
12680
12681
12682
12683
12684
12685
12686
12687
# File 'lib/talon_one_sdk/api/management_api.rb', line 12641

def scim_get_user_with_http_info(user_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.scim_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.scim_get_user"
  end
  # resource path
  local_var_path = '/v1/provisioning/scim/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']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ScimUser'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.scim_get_user",
    :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#scim_get_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#scim_get_users(opts = {}) ⇒ ScimUsersListResponse

List SCIM users Retrieve a paginated list of users that have been provisioned using the SCIM protocol with an identity provider, for example, Microsoft Entra ID.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



12693
12694
12695
12696
# File 'lib/talon_one_sdk/api/management_api.rb', line 12693

def scim_get_users(opts = {})
  data, _status_code, _headers = scim_get_users_with_http_info(opts)
  data
end

#scim_get_users_with_http_info(opts = {}) ⇒ Array<(ScimUsersListResponse, Integer, Hash)>

List SCIM users Retrieve a paginated list of users that have been provisioned using the SCIM protocol with an identity provider, for example, Microsoft Entra ID.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ScimUsersListResponse, Integer, Hash)>)

    ScimUsersListResponse data, response status code and response headers



12702
12703
12704
12705
12706
12707
12708
12709
12710
12711
12712
12713
12714
12715
12716
12717
12718
12719
12720
12721
12722
12723
12724
12725
12726
12727
12728
12729
12730
12731
12732
12733
12734
12735
12736
12737
12738
12739
12740
12741
12742
12743
12744
# File 'lib/talon_one_sdk/api/management_api.rb', line 12702

def scim_get_users_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.scim_get_users ...'
  end
  # resource path
  local_var_path = '/v1/provisioning/scim/Users'

  # 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']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ScimUsersListResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.scim_get_users",
    :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#scim_get_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#scim_patch_group(group_id, scim_patch_request, opts = {}) ⇒ ScimGroup

Update SCIM group attributes Update certain attributes of a group created using the SCIM provisioning protocol with an identity provider, for example, Microsoft Entra ID. This endpoint allows for selective adding, removing, or replacing of specific group attributes while other attributes remain unchanged. In Talon.One, a ‘Group` corresponds to a [role](docs.talon.one/docs/product/account/account-settings/managing-roles), and `members` are the [users](docs.talon.one/docs/product/account/account-settings/managing-users) assigned to that role.

Parameters:

  • group_id (Integer)

    The ID of the group.

  • scim_patch_request (ScimPatchRequest)

    body

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



12752
12753
12754
12755
# File 'lib/talon_one_sdk/api/management_api.rb', line 12752

def scim_patch_group(group_id, scim_patch_request, opts = {})
  data, _status_code, _headers = scim_patch_group_with_http_info(group_id, scim_patch_request, opts)
  data
end

#scim_patch_group_with_http_info(group_id, scim_patch_request, opts = {}) ⇒ Array<(ScimGroup, Integer, Hash)>

Update SCIM group attributes Update certain attributes of a group created using the SCIM provisioning protocol with an identity provider, for example, Microsoft Entra ID. This endpoint allows for selective adding, removing, or replacing of specific group attributes while other attributes remain unchanged. In Talon.One, a &#x60;Group&#x60; corresponds to a [role](docs.talon.one/docs/product/account/account-settings/managing-roles), and &#x60;members&#x60; are the [users](docs.talon.one/docs/product/account/account-settings/managing-users) assigned to that role.

Parameters:

  • group_id (Integer)

    The ID of the group.

  • scim_patch_request (ScimPatchRequest)

    body

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ScimGroup, Integer, Hash)>)

    ScimGroup data, response status code and response headers



12763
12764
12765
12766
12767
12768
12769
12770
12771
12772
12773
12774
12775
12776
12777
12778
12779
12780
12781
12782
12783
12784
12785
12786
12787
12788
12789
12790
12791
12792
12793
12794
12795
12796
12797
12798
12799
12800
12801
12802
12803
12804
12805
12806
12807
12808
12809
12810
12811
12812
12813
12814
12815
12816
12817
12818
# File 'lib/talon_one_sdk/api/management_api.rb', line 12763

def scim_patch_group_with_http_info(group_id, scim_patch_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.scim_patch_group ...'
  end
  # verify the required parameter 'group_id' is set
  if @api_client.config.client_side_validation && group_id.nil?
    fail ArgumentError, "Missing the required parameter 'group_id' when calling ManagementApi.scim_patch_group"
  end
  # verify the required parameter 'scim_patch_request' is set
  if @api_client.config.client_side_validation && scim_patch_request.nil?
    fail ArgumentError, "Missing the required parameter 'scim_patch_request' when calling ManagementApi.scim_patch_group"
  end
  # resource path
  local_var_path = '/v1/provisioning/scim/Groups/{groupId}'.sub('{groupId}', CGI.escape(group_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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(scim_patch_request)

  # return_type
  return_type = opts[:debug_return_type] || 'ScimGroup'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.scim_patch_group",
    :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(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ManagementApi#scim_patch_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#scim_patch_user(user_id, scim_patch_request, opts = {}) ⇒ ScimUser

Update SCIM user attributes Update certain attributes of a specific Talon.One user created using the SCIM provisioning protocol with an identity provider, for example, Microsoft Entra ID. This endpoint allows for selective adding, removing, or replacing specific attributes while leaving other attributes unchanged.

Parameters:

  • user_id (Integer)

    The ID of the user.

  • scim_patch_request (ScimPatchRequest)

    body

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



12826
12827
12828
12829
# File 'lib/talon_one_sdk/api/management_api.rb', line 12826

def scim_patch_user(user_id, scim_patch_request, opts = {})
  data, _status_code, _headers = scim_patch_user_with_http_info(user_id, scim_patch_request, opts)
  data
end

#scim_patch_user_with_http_info(user_id, scim_patch_request, opts = {}) ⇒ Array<(ScimUser, Integer, Hash)>

Update SCIM user attributes Update certain attributes of a specific Talon.One user created using the SCIM provisioning protocol with an identity provider, for example, Microsoft Entra ID. This endpoint allows for selective adding, removing, or replacing specific attributes while leaving other attributes unchanged.

Parameters:

  • user_id (Integer)

    The ID of the user.

  • scim_patch_request (ScimPatchRequest)

    body

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ScimUser, Integer, Hash)>)

    ScimUser data, response status code and response headers



12837
12838
12839
12840
12841
12842
12843
12844
12845
12846
12847
12848
12849
12850
12851
12852
12853
12854
12855
12856
12857
12858
12859
12860
12861
12862
12863
12864
12865
12866
12867
12868
12869
12870
12871
12872
12873
12874
12875
12876
12877
12878
12879
12880
12881
12882
12883
12884
12885
12886
12887
12888
12889
12890
12891
12892
# File 'lib/talon_one_sdk/api/management_api.rb', line 12837

def scim_patch_user_with_http_info(user_id, scim_patch_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.scim_patch_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.scim_patch_user"
  end
  # verify the required parameter 'scim_patch_request' is set
  if @api_client.config.client_side_validation && scim_patch_request.nil?
    fail ArgumentError, "Missing the required parameter 'scim_patch_request' when calling ManagementApi.scim_patch_user"
  end
  # resource path
  local_var_path = '/v1/provisioning/scim/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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(scim_patch_request)

  # return_type
  return_type = opts[:debug_return_type] || 'ScimUser'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.scim_patch_user",
    :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(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ManagementApi#scim_patch_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#scim_replace_group_attributes(group_id, scim_base_group, opts = {}) ⇒ ScimGroup

Update SCIM group Update the details of a specific group created using the SCIM provisioning protocol with an identity provider, for example, Microsoft Entra ID. This endpoint replaces all attributes of the given group with the attributes provided in the request payload. In Talon.One, a ‘Group` corresponds to a [role](docs.talon.one/docs/product/account/account-settings/managing-roles), and `members` are the [users](docs.talon.one/docs/product/account/account-settings/managing-users) assigned to that role.

Parameters:

  • group_id (Integer)

    The ID of the group.

  • scim_base_group (ScimBaseGroup)

    body

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



12900
12901
12902
12903
# File 'lib/talon_one_sdk/api/management_api.rb', line 12900

def scim_replace_group_attributes(group_id, scim_base_group, opts = {})
  data, _status_code, _headers = scim_replace_group_attributes_with_http_info(group_id, scim_base_group, opts)
  data
end

#scim_replace_group_attributes_with_http_info(group_id, scim_base_group, opts = {}) ⇒ Array<(ScimGroup, Integer, Hash)>

Update SCIM group Update the details of a specific group created using the SCIM provisioning protocol with an identity provider, for example, Microsoft Entra ID. This endpoint replaces all attributes of the given group with the attributes provided in the request payload. In Talon.One, a &#x60;Group&#x60; corresponds to a [role](docs.talon.one/docs/product/account/account-settings/managing-roles), and &#x60;members&#x60; are the [users](docs.talon.one/docs/product/account/account-settings/managing-users) assigned to that role.

Parameters:

  • group_id (Integer)

    The ID of the group.

  • scim_base_group (ScimBaseGroup)

    body

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ScimGroup, Integer, Hash)>)

    ScimGroup data, response status code and response headers



12911
12912
12913
12914
12915
12916
12917
12918
12919
12920
12921
12922
12923
12924
12925
12926
12927
12928
12929
12930
12931
12932
12933
12934
12935
12936
12937
12938
12939
12940
12941
12942
12943
12944
12945
12946
12947
12948
12949
12950
12951
12952
12953
12954
12955
12956
12957
12958
12959
12960
12961
12962
12963
12964
12965
12966
# File 'lib/talon_one_sdk/api/management_api.rb', line 12911

def scim_replace_group_attributes_with_http_info(group_id, scim_base_group, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.scim_replace_group_attributes ...'
  end
  # verify the required parameter 'group_id' is set
  if @api_client.config.client_side_validation && group_id.nil?
    fail ArgumentError, "Missing the required parameter 'group_id' when calling ManagementApi.scim_replace_group_attributes"
  end
  # verify the required parameter 'scim_base_group' is set
  if @api_client.config.client_side_validation && scim_base_group.nil?
    fail ArgumentError, "Missing the required parameter 'scim_base_group' when calling ManagementApi.scim_replace_group_attributes"
  end
  # resource path
  local_var_path = '/v1/provisioning/scim/Groups/{groupId}'.sub('{groupId}', CGI.escape(group_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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(scim_base_group)

  # return_type
  return_type = opts[:debug_return_type] || 'ScimGroup'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.scim_replace_group_attributes",
    :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#scim_replace_group_attributes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#scim_replace_user_attributes(user_id, scim_new_user, opts = {}) ⇒ ScimUser

Update SCIM user Update the details of a specific Talon.One user created using the SCIM provisioning protocol with an identity provider, for example, Microsoft Entra ID. This endpoint replaces all attributes of the specific user with the attributes provided in the request payload.

Parameters:

  • user_id (Integer)

    The ID of the user.

  • scim_new_user (ScimNewUser)

    body

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



12974
12975
12976
12977
# File 'lib/talon_one_sdk/api/management_api.rb', line 12974

def scim_replace_user_attributes(user_id, scim_new_user, opts = {})
  data, _status_code, _headers = scim_replace_user_attributes_with_http_info(user_id, scim_new_user, opts)
  data
end

#scim_replace_user_attributes_with_http_info(user_id, scim_new_user, opts = {}) ⇒ Array<(ScimUser, Integer, Hash)>

Update SCIM user Update the details of a specific Talon.One user created using the SCIM provisioning protocol with an identity provider, for example, Microsoft Entra ID. This endpoint replaces all attributes of the specific user with the attributes provided in the request payload.

Parameters:

  • user_id (Integer)

    The ID of the user.

  • scim_new_user (ScimNewUser)

    body

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ScimUser, Integer, Hash)>)

    ScimUser data, response status code and response headers



12985
12986
12987
12988
12989
12990
12991
12992
12993
12994
12995
12996
12997
12998
12999
13000
13001
13002
13003
13004
13005
13006
13007
13008
13009
13010
13011
13012
13013
13014
13015
13016
13017
13018
13019
13020
13021
13022
13023
13024
13025
13026
13027
13028
13029
13030
13031
13032
13033
13034
13035
13036
13037
13038
13039
13040
# File 'lib/talon_one_sdk/api/management_api.rb', line 12985

def scim_replace_user_attributes_with_http_info(user_id, scim_new_user, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.scim_replace_user_attributes ...'
  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.scim_replace_user_attributes"
  end
  # verify the required parameter 'scim_new_user' is set
  if @api_client.config.client_side_validation && scim_new_user.nil?
    fail ArgumentError, "Missing the required parameter 'scim_new_user' when calling ManagementApi.scim_replace_user_attributes"
  end
  # resource path
  local_var_path = '/v1/provisioning/scim/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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(scim_new_user)

  # return_type
  return_type = opts[:debug_return_type] || 'ScimUser'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.scim_replace_user_attributes",
    :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#scim_replace_user_attributes\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 = {}) ⇒ GetCouponsWithoutTotalCount200Response

List coupons that match the given attributes (without total count) List the coupons whose attributes match the query criteria in all the campaigns of the given Application. 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. > [!note] The total count is not included in the response.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • body (Object)

    body

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

  • :value (String)

    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.

  • :created_before (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :created_after (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :valid (String)

    Either &quot;expired&quot;, &quot;validNow&quot;, or &quot;validFuture&quot;. The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future.

  • :usable (String)

    Either &quot;true&quot; or &quot;false&quot;. If &quot;true&quot;, only coupons where &#x60;usageCounter &lt; usageLimit&#x60; will be returned, &quot;false&quot; will return only coupons where &#x60;usageCounter &gt;&#x3D; usageLimit&#x60;.

  • :referral_id (Integer)

    Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code.

  • :recipient_integration_id (String)

    Filter results by match with a profile ID specified in the coupon&#39;s RecipientIntegrationId field.

  • :batch_id (String)

    Filter results by batches of coupons

  • :exact_match (Boolean)

    Filter results to an exact case-insensitive matching against the coupon code. (default to false)

  • :campaign_state (String)

    Filter results by the state of the campaign. - &#x60;enabled&#x60;: Campaigns that are scheduled, running (activated), or expired. - &#x60;running&#x60;: Campaigns that are running (activated). - &#x60;disabled&#x60;: Campaigns that are disabled. - &#x60;expired&#x60;: Campaigns that are expired. - &#x60;archived&#x60;: Campaigns that are archived.

Returns:



13061
13062
13063
13064
# File 'lib/talon_one_sdk/api/management_api.rb', line 13061

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 = {}) ⇒ Array<(GetCouponsWithoutTotalCount200Response, Integer, Hash)>

List coupons that match the given attributes (without total count) List the coupons whose attributes match the query criteria in all the campaigns of the given Application. 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. &gt; [!note] The total count is not included in the response.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • body (Object)

    body

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

  • :value (String)

    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.

  • :created_before (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :created_after (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :valid (String)

    Either &quot;expired&quot;, &quot;validNow&quot;, or &quot;validFuture&quot;. The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future.

  • :usable (String)

    Either &quot;true&quot; or &quot;false&quot;. If &quot;true&quot;, only coupons where &#x60;usageCounter &lt; usageLimit&#x60; will be returned, &quot;false&quot; will return only coupons where &#x60;usageCounter &gt;&#x3D; usageLimit&#x60;.

  • :referral_id (Integer)

    Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code.

  • :recipient_integration_id (String)

    Filter results by match with a profile ID specified in the coupon&#39;s RecipientIntegrationId field.

  • :batch_id (String)

    Filter results by batches of coupons

  • :exact_match (Boolean)

    Filter results to an exact case-insensitive matching against the coupon code. (default to false)

  • :campaign_state (String)

    Filter results by the state of the campaign. - &#x60;enabled&#x60;: Campaigns that are scheduled, running (activated), or expired. - &#x60;running&#x60;: Campaigns that are running (activated). - &#x60;disabled&#x60;: Campaigns that are disabled. - &#x60;expired&#x60;: Campaigns that are expired. - &#x60;archived&#x60;: Campaigns that are archived.

Returns:



13085
13086
13087
13088
13089
13090
13091
13092
13093
13094
13095
13096
13097
13098
13099
13100
13101
13102
13103
13104
13105
13106
13107
13108
13109
13110
13111
13112
13113
13114
13115
13116
13117
13118
13119
13120
13121
13122
13123
13124
13125
13126
13127
13128
13129
13130
13131
13132
13133
13134
13135
13136
13137
13138
13139
13140
13141
13142
13143
13144
13145
13146
13147
13148
13149
13150
13151
13152
13153
13154
13155
13156
13157
13158
13159
13160
13161
13162
13163
13164
13165
13166
13167
13168
13169
13170
13171
13172
13173
# File 'lib/talon_one_sdk/api/management_api.rb', line 13085

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
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.search_coupons_advanced_application_wide_without_total_count, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.search_coupons_advanced_application_wide_without_total_count, must be greater than or equal to 1.'
  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", "scheduled", "running", "expired", "staged"]
  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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)

  # return_type
  return_type = opts[:debug_return_type] || 'GetCouponsWithoutTotalCount200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.search_coupons_advanced_application_wide_without_total_count",
    :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_without_total_count(application_id, campaign_id, body, opts = {}) ⇒ GetCouponsWithoutTotalCount200Response

List coupons that match the given attributes in campaign (without total count) List the coupons whose attributes match the query criteria in the given campaign. 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. > [!note] The total count is not included in the response.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • body (Object)

    body

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

  • :value (String)

    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.

  • :created_before (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :created_after (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :valid (String)

    Either &quot;expired&quot;, &quot;validNow&quot;, or &quot;validFuture&quot;. The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future.

  • :usable (String)

    Either &quot;true&quot; or &quot;false&quot;. If &quot;true&quot;, only coupons where &#x60;usageCounter &lt; usageLimit&#x60; will be returned, &quot;false&quot; will return only coupons where &#x60;usageCounter &gt;&#x3D; usageLimit&#x60;.

  • :referral_id (Integer)

    Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code.

  • :recipient_integration_id (String)

    Filter results by match with a profile ID specified in the coupon&#39;s RecipientIntegrationId field.

  • :exact_match (Boolean)

    Filter results to an exact case-insensitive matching against the coupon code. (default to false)

  • :batch_id (String)

    Filter results by batches of coupons

Returns:



13194
13195
13196
13197
# File 'lib/talon_one_sdk/api/management_api.rb', line 13194

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 = {}) ⇒ Array<(GetCouponsWithoutTotalCount200Response, Integer, Hash)>

List coupons that match the given attributes in campaign (without total count) List the coupons whose attributes match the query criteria in the given campaign. 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. &gt; [!note] The total count is not included in the response.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • body (Object)

    body

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of items in the response. (default to 1000)

  • :skip (Integer)

    The number of items to skip when paging through large result sets.

  • :sort (String)

    The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with &#x60;-&#x60;. Note: You may not be able to use all fields for sorting. This is due to performance limitations.

  • :value (String)

    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.

  • :created_before (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :created_after (Time)

    Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

  • :valid (String)

    Either &quot;expired&quot;, &quot;validNow&quot;, or &quot;validFuture&quot;. The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future.

  • :usable (String)

    Either &quot;true&quot; or &quot;false&quot;. If &quot;true&quot;, only coupons where &#x60;usageCounter &lt; usageLimit&#x60; will be returned, &quot;false&quot; will return only coupons where &#x60;usageCounter &gt;&#x3D; usageLimit&#x60;.

  • :referral_id (Integer)

    Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code.

  • :recipient_integration_id (String)

    Filter results by match with a profile ID specified in the coupon&#39;s RecipientIntegrationId field.

  • :exact_match (Boolean)

    Filter results to an exact case-insensitive matching against the coupon code. (default to false)

  • :batch_id (String)

    Filter results by batches of coupons

Returns:



13218
13219
13220
13221
13222
13223
13224
13225
13226
13227
13228
13229
13230
13231
13232
13233
13234
13235
13236
13237
13238
13239
13240
13241
13242
13243
13244
13245
13246
13247
13248
13249
13250
13251
13252
13253
13254
13255
13256
13257
13258
13259
13260
13261
13262
13263
13264
13265
13266
13267
13268
13269
13270
13271
13272
13273
13274
13275
13276
13277
13278
13279
13280
13281
13282
13283
13284
13285
13286
13287
13288
13289
13290
13291
13292
13293
13294
13295
13296
13297
13298
13299
13300
13301
13302
13303
13304
13305
# File 'lib/talon_one_sdk/api/management_api.rb', line 13218

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
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.search_coupons_advanced_without_total_count, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ManagementApi.search_coupons_advanced_without_total_count, must be greater than or equal to 1.'
  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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)

  # return_type
  return_type = opts[:debug_return_type] || 'GetCouponsWithoutTotalCount200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.search_coupons_advanced_without_total_count",
    :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

#summarize_campaign_store_budget(application_id, campaign_id, opts = {}) ⇒ SummarizeCampaignStoreBudget200Response

Get summary of campaign store budgets Fetch a summary of all store budget information for a given campaign.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



13313
13314
13315
13316
# File 'lib/talon_one_sdk/api/management_api.rb', line 13313

def summarize_campaign_store_budget(application_id, campaign_id, opts = {})
  data, _status_code, _headers = summarize_campaign_store_budget_with_http_info(application_id, campaign_id, opts)
  data
end

#summarize_campaign_store_budget_with_http_info(application_id, campaign_id, opts = {}) ⇒ Array<(SummarizeCampaignStoreBudget200Response, Integer, Hash)>

Get summary of campaign store budgets Fetch a summary of all store budget information for a given campaign.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



13324
13325
13326
13327
13328
13329
13330
13331
13332
13333
13334
13335
13336
13337
13338
13339
13340
13341
13342
13343
13344
13345
13346
13347
13348
13349
13350
13351
13352
13353
13354
13355
13356
13357
13358
13359
13360
13361
13362
13363
13364
13365
13366
13367
13368
13369
13370
13371
13372
13373
13374
# File 'lib/talon_one_sdk/api/management_api.rb', line 13324

def summarize_campaign_store_budget_with_http_info(application_id, campaign_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.summarize_campaign_store_budget ...'
  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.summarize_campaign_store_budget"
  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.summarize_campaign_store_budget"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/stores/budgets/summary'.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']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'SummarizeCampaignStoreBudget200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.summarize_campaign_store_budget",
    :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#summarize_campaign_store_budget\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#transfer_loyalty_card(loyalty_program_id, loyalty_card_id, transfer_loyalty_card, opts = {}) ⇒ nil

Transfer card data Transfer loyalty card data, such as linked customers, loyalty balances and transactions, from a given loyalty card to a new, automatically created loyalty card. > [!important] Note > - The original card is automatically blocked once the new card is created, and it cannot be activated again. > - The default status of the new card is active.

Parameters:

Returns:

  • (nil)


13383
13384
13385
13386
# File 'lib/talon_one_sdk/api/management_api.rb', line 13383

def transfer_loyalty_card(loyalty_program_id, loyalty_card_id, transfer_loyalty_card, opts = {})
  transfer_loyalty_card_with_http_info(loyalty_program_id, loyalty_card_id, transfer_loyalty_card, opts)
  nil
end

#transfer_loyalty_card_with_http_info(loyalty_program_id, loyalty_card_id, transfer_loyalty_card, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Transfer card data Transfer loyalty card data, such as linked customers, loyalty balances and transactions, from a given loyalty card to a new, automatically created loyalty card. &gt; [!important] Note &gt; - The original card is automatically blocked once the new card is created, and it cannot be activated again. &gt; - The default status of the new card is active.

Parameters:

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



13395
13396
13397
13398
13399
13400
13401
13402
13403
13404
13405
13406
13407
13408
13409
13410
13411
13412
13413
13414
13415
13416
13417
13418
13419
13420
13421
13422
13423
13424
13425
13426
13427
13428
13429
13430
13431
13432
13433
13434
13435
13436
13437
13438
13439
13440
13441
13442
13443
13444
13445
13446
13447
13448
13449
13450
13451
13452
13453
13454
13455
13456
13457
13458
13459
13460
13461
13462
# File 'lib/talon_one_sdk/api/management_api.rb', line 13395

def transfer_loyalty_card_with_http_info(loyalty_program_id, loyalty_card_id, transfer_loyalty_card, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.transfer_loyalty_card ...'
  end
  # verify the required parameter 'loyalty_program_id' is set
  if @api_client.config.client_side_validation && loyalty_program_id.nil?
    fail ArgumentError, "Missing the required parameter 'loyalty_program_id' when calling ManagementApi.transfer_loyalty_card"
  end
  # verify the required parameter 'loyalty_card_id' is set
  if @api_client.config.client_side_validation && loyalty_card_id.nil?
    fail ArgumentError, "Missing the required parameter 'loyalty_card_id' when calling ManagementApi.transfer_loyalty_card"
  end
  if @api_client.config.client_side_validation && loyalty_card_id.to_s.length > 108
    fail ArgumentError, 'invalid value for "loyalty_card_id" when calling ManagementApi.transfer_loyalty_card, the character length must be smaller than or equal to 108.'
  end

  if @api_client.config.client_side_validation && loyalty_card_id.to_s.length < 4
    fail ArgumentError, 'invalid value for "loyalty_card_id" when calling ManagementApi.transfer_loyalty_card, the character length must be greater than or equal to 4.'
  end

  # verify the required parameter 'transfer_loyalty_card' is set
  if @api_client.config.client_side_validation && transfer_loyalty_card.nil?
    fail ArgumentError, "Missing the required parameter 'transfer_loyalty_card' when calling ManagementApi.transfer_loyalty_card"
  end
  # resource path
  local_var_path = '/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/transfer'.sub('{loyaltyProgramId}', CGI.escape(loyalty_program_id.to_s)).sub('{loyaltyCardId}', CGI.escape(loyalty_card_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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(transfer_loyalty_card)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.transfer_loyalty_card",
    :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#transfer_loyalty_card\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_account_collection(collection_id, update_collection, opts = {}) ⇒ Collection

Update account-level collection Edit the description of a given account-level collection and enable or disable the collection in the specified Applications.

Parameters:

  • collection_id (Integer)

    The ID of the collection. You can get it with the [List collections in account](#tag/Collections/operation/listAccountCollections) endpoint.

  • update_collection (UpdateCollection)

    body

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



13470
13471
13472
13473
# File 'lib/talon_one_sdk/api/management_api.rb', line 13470

def (collection_id, update_collection, opts = {})
  data, _status_code, _headers = (collection_id, update_collection, opts)
  data
end

#update_account_collection_with_http_info(collection_id, update_collection, opts = {}) ⇒ Array<(Collection, Integer, Hash)>

Update account-level collection Edit the description of a given account-level collection and enable or disable the collection in the specified Applications.

Parameters:

  • collection_id (Integer)

    The ID of the collection. You can get it with the [List collections in account](#tag/Collections/operation/listAccountCollections) endpoint.

  • update_collection (UpdateCollection)

    body

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Collection, Integer, Hash)>)

    Collection data, response status code and response headers



13481
13482
13483
13484
13485
13486
13487
13488
13489
13490
13491
13492
13493
13494
13495
13496
13497
13498
13499
13500
13501
13502
13503
13504
13505
13506
13507
13508
13509
13510
13511
13512
13513
13514
13515
13516
13517
13518
13519
13520
13521
13522
13523
13524
13525
13526
13527
13528
13529
13530
13531
13532
13533
13534
13535
13536
# File 'lib/talon_one_sdk/api/management_api.rb', line 13481

def (collection_id, update_collection, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.update_account_collection ...'
  end
  # verify the required parameter 'collection_id' is set
  if @api_client.config.client_side_validation && collection_id.nil?
    fail ArgumentError, "Missing the required parameter 'collection_id' when calling ManagementApi.update_account_collection"
  end
  # verify the required parameter 'update_collection' is set
  if @api_client.config.client_side_validation && update_collection.nil?
    fail ArgumentError, "Missing the required parameter 'update_collection' when calling ManagementApi.update_account_collection"
  end
  # resource path
  local_var_path = '/v1/collections/{collectionId}'.sub('{collectionId}', CGI.escape(collection_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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(update_collection)

  # return_type
  return_type = opts[:debug_return_type] || 'Collection'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.update_account_collection",
    :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_account_collection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_achievement(application_id, campaign_id, achievement_id, update_achievement, opts = {}) ⇒ Achievement

Update achievement Update the details of a specific achievement.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • achievement_id (Integer)

    The ID of the achievement. You can get this ID with the [List achievement](docs.talon.one/management-api#tag/Achievements/operation/listAchievements) endpoint.

  • update_achievement (UpdateAchievement)

    body

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



13546
13547
13548
13549
# File 'lib/talon_one_sdk/api/management_api.rb', line 13546

def update_achievement(application_id, campaign_id, achievement_id, update_achievement, opts = {})
  data, _status_code, _headers = update_achievement_with_http_info(application_id, campaign_id, achievement_id, update_achievement, opts)
  data
end

#update_achievement_with_http_info(application_id, campaign_id, achievement_id, update_achievement, opts = {}) ⇒ Array<(Achievement, Integer, Hash)>

Update achievement Update the details of a specific achievement.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • achievement_id (Integer)

    The ID of the achievement. You can get this ID with the [List achievement](docs.talon.one/management-api#tag/Achievements/operation/listAchievements) endpoint.

  • update_achievement (UpdateAchievement)

    body

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Achievement, Integer, Hash)>)

    Achievement data, response status code and response headers



13559
13560
13561
13562
13563
13564
13565
13566
13567
13568
13569
13570
13571
13572
13573
13574
13575
13576
13577
13578
13579
13580
13581
13582
13583
13584
13585
13586
13587
13588
13589
13590
13591
13592
13593
13594
13595
13596
13597
13598
13599
13600
13601
13602
13603
13604
13605
13606
13607
13608
13609
13610
13611
13612
13613
13614
13615
13616
13617
13618
13619
13620
13621
13622
# File 'lib/talon_one_sdk/api/management_api.rb', line 13559

def update_achievement_with_http_info(application_id, campaign_id, achievement_id, update_achievement, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.update_achievement ...'
  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_achievement"
  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_achievement"
  end
  # verify the required parameter 'achievement_id' is set
  if @api_client.config.client_side_validation && achievement_id.nil?
    fail ArgumentError, "Missing the required parameter 'achievement_id' when calling ManagementApi.update_achievement"
  end
  # verify the required parameter 'update_achievement' is set
  if @api_client.config.client_side_validation && update_achievement.nil?
    fail ArgumentError, "Missing the required parameter 'update_achievement' when calling ManagementApi.update_achievement"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/achievements/{achievementId}'.sub('{applicationId}', CGI.escape(application_id.to_s)).sub('{campaignId}', CGI.escape(campaign_id.to_s)).sub('{achievementId}', CGI.escape(achievement_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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(update_achievement)

  # return_type
  return_type = opts[:debug_return_type] || 'Achievement'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.update_achievement",
    :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_achievement\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_additional_cost(additional_cost_id, new_additional_cost, opts = {}) ⇒ AccountAdditionalCost

Update additional cost Updates an existing additional cost. Once created, the only property of an additional cost that cannot be changed is the ‘name` property (or **API name** in the Campaign Manager). This restriction is in place to prevent accidentally breaking live integrations.

Parameters:

  • additional_cost_id (Integer)

    The ID of the additional cost. You can find the ID the the Campaign Manager&#39;s URL when you display the details of the cost in Account &gt; Tools &gt; **Additional costs**.

  • new_additional_cost (NewAdditionalCost)

    body

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



13630
13631
13632
13633
# File 'lib/talon_one_sdk/api/management_api.rb', line 13630

def update_additional_cost(additional_cost_id, new_additional_cost, opts = {})
  data, _status_code, _headers = update_additional_cost_with_http_info(additional_cost_id, new_additional_cost, opts)
  data
end

#update_additional_cost_with_http_info(additional_cost_id, new_additional_cost, opts = {}) ⇒ Array<(AccountAdditionalCost, Integer, Hash)>

Update additional cost Updates an existing additional cost. Once created, the only property of an additional cost that cannot be changed is the &#x60;name&#x60; property (or **API name** in the Campaign Manager). This restriction is in place to prevent accidentally breaking live integrations.

Parameters:

  • additional_cost_id (Integer)

    The ID of the additional cost. You can find the ID the the Campaign Manager&#39;s URL when you display the details of the cost in Account &gt; Tools &gt; **Additional costs**.

  • new_additional_cost (NewAdditionalCost)

    body

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(AccountAdditionalCost, Integer, Hash)>)

    AccountAdditionalCost data, response status code and response headers



13641
13642
13643
13644
13645
13646
13647
13648
13649
13650
13651
13652
13653
13654
13655
13656
13657
13658
13659
13660
13661
13662
13663
13664
13665
13666
13667
13668
13669
13670
13671
13672
13673
13674
13675
13676
13677
13678
13679
13680
13681
13682
13683
13684
13685
13686
13687
13688
13689
13690
13691
13692
13693
13694
13695
13696
# File 'lib/talon_one_sdk/api/management_api.rb', line 13641

def update_additional_cost_with_http_info(additional_cost_id, new_additional_cost, 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 'new_additional_cost' is set
  if @api_client.config.client_side_validation && new_additional_cost.nil?
    fail ArgumentError, "Missing the required parameter 'new_additional_cost' 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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(new_additional_cost)

  # return_type
  return_type = opts[:debug_return_type] || 'AccountAdditionalCost'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.update_additional_cost",
    :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, new_attribute, opts = {}) ⇒ Attribute

Update custom attribute Update an existing custom attribute. Once created, the only property of a custom attribute that can be changed is the description. 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.

Parameters:

  • attribute_id (Integer)

    The ID of the attribute. You can find the ID in the Campaign Manager&#39;s URL when you display the details of an attribute in Account &gt; Tools &gt; Attributes.

  • new_attribute (NewAttribute)

    body

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



13704
13705
13706
13707
# File 'lib/talon_one_sdk/api/management_api.rb', line 13704

def update_attribute(attribute_id, new_attribute, opts = {})
  data, _status_code, _headers = update_attribute_with_http_info(attribute_id, new_attribute, opts)
  data
end

#update_attribute_with_http_info(attribute_id, new_attribute, opts = {}) ⇒ Array<(Attribute, Integer, Hash)>

Update custom attribute Update an existing custom attribute. Once created, the only property of a custom attribute that can be changed is the description. 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.

Parameters:

  • attribute_id (Integer)

    The ID of the attribute. You can find the ID in the Campaign Manager&#39;s URL when you display the details of an attribute in Account &gt; Tools &gt; Attributes.

  • new_attribute (NewAttribute)

    body

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Attribute, Integer, Hash)>)

    Attribute data, response status code and response headers



13715
13716
13717
13718
13719
13720
13721
13722
13723
13724
13725
13726
13727
13728
13729
13730
13731
13732
13733
13734
13735
13736
13737
13738
13739
13740
13741
13742
13743
13744
13745
13746
13747
13748
13749
13750
13751
13752
13753
13754
13755
13756
13757
13758
13759
13760
13761
13762
13763
13764
13765
13766
13767
13768
13769
13770
# File 'lib/talon_one_sdk/api/management_api.rb', line 13715

def update_attribute_with_http_info(attribute_id, new_attribute, 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 'new_attribute' is set
  if @api_client.config.client_side_validation && new_attribute.nil?
    fail ArgumentError, "Missing the required parameter 'new_attribute' 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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(new_attribute)

  # return_type
  return_type = opts[:debug_return_type] || 'Attribute'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.update_attribute",
    :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, update_campaign, opts = {}) ⇒ Campaign

Update campaign Update the given campaign. > [!important] You cannot use this endpoint to update campaigns if [campaign staging and > revisions](docs.talon.one/docs/product/applications/managing-general-settings#campaign-staging-and-revisions) > is enabled for your Application.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • update_campaign (UpdateCampaign)

    body

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



13779
13780
13781
13782
# File 'lib/talon_one_sdk/api/management_api.rb', line 13779

def update_campaign(application_id, campaign_id, update_campaign, opts = {})
  data, _status_code, _headers = update_campaign_with_http_info(application_id, campaign_id, update_campaign, opts)
  data
end

#update_campaign_with_http_info(application_id, campaign_id, update_campaign, opts = {}) ⇒ Array<(Campaign, Integer, Hash)>

Update campaign Update the given campaign. &gt; [!important] You cannot use this endpoint to update campaigns if [campaign staging and &gt; revisions](docs.talon.one/docs/product/applications/managing-general-settings#campaign-staging-and-revisions) &gt; is enabled for your Application.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • update_campaign (UpdateCampaign)

    body

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Campaign, Integer, Hash)>)

    Campaign data, response status code and response headers



13791
13792
13793
13794
13795
13796
13797
13798
13799
13800
13801
13802
13803
13804
13805
13806
13807
13808
13809
13810
13811
13812
13813
13814
13815
13816
13817
13818
13819
13820
13821
13822
13823
13824
13825
13826
13827
13828
13829
13830
13831
13832
13833
13834
13835
13836
13837
13838
13839
13840
13841
13842
13843
13844
13845
13846
13847
13848
13849
13850
# File 'lib/talon_one_sdk/api/management_api.rb', line 13791

def update_campaign_with_http_info(application_id, campaign_id, update_campaign, 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 'update_campaign' is set
  if @api_client.config.client_side_validation && update_campaign.nil?
    fail ArgumentError, "Missing the required parameter 'update_campaign' 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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(update_campaign)

  # return_type
  return_type = opts[:debug_return_type] || 'Campaign'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.update_campaign",
    :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_collection(application_id, campaign_id, collection_id, update_campaign_collection, opts = {}) ⇒ Collection

Update campaign-level collection’s description Edit the description of a given campaign-level collection.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • collection_id (Integer)

    The ID of the collection. You can get it with the [List collections in Application](#tag/Collections/operation/listCollectionsInApplication) endpoint.

  • update_campaign_collection (UpdateCampaignCollection)

    body

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



13860
13861
13862
13863
# File 'lib/talon_one_sdk/api/management_api.rb', line 13860

def update_collection(application_id, campaign_id, collection_id, update_campaign_collection, opts = {})
  data, _status_code, _headers = update_collection_with_http_info(application_id, campaign_id, collection_id, update_campaign_collection, opts)
  data
end

#update_collection_with_http_info(application_id, campaign_id, collection_id, update_campaign_collection, opts = {}) ⇒ Array<(Collection, Integer, Hash)>

Update campaign-level collection&#39;s description Edit the description of a given campaign-level collection.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • collection_id (Integer)

    The ID of the collection. You can get it with the [List collections in Application](#tag/Collections/operation/listCollectionsInApplication) endpoint.

  • update_campaign_collection (UpdateCampaignCollection)

    body

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Collection, Integer, Hash)>)

    Collection data, response status code and response headers



13873
13874
13875
13876
13877
13878
13879
13880
13881
13882
13883
13884
13885
13886
13887
13888
13889
13890
13891
13892
13893
13894
13895
13896
13897
13898
13899
13900
13901
13902
13903
13904
13905
13906
13907
13908
13909
13910
13911
13912
13913
13914
13915
13916
13917
13918
13919
13920
13921
13922
13923
13924
13925
13926
13927
13928
13929
13930
13931
13932
13933
13934
13935
13936
# File 'lib/talon_one_sdk/api/management_api.rb', line 13873

def update_collection_with_http_info(application_id, campaign_id, collection_id, update_campaign_collection, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.update_collection ...'
  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_collection"
  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_collection"
  end
  # verify the required parameter 'collection_id' is set
  if @api_client.config.client_side_validation && collection_id.nil?
    fail ArgumentError, "Missing the required parameter 'collection_id' when calling ManagementApi.update_collection"
  end
  # verify the required parameter 'update_campaign_collection' is set
  if @api_client.config.client_side_validation && update_campaign_collection.nil?
    fail ArgumentError, "Missing the required parameter 'update_campaign_collection' when calling ManagementApi.update_collection"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}'.sub('{applicationId}', CGI.escape(application_id.to_s)).sub('{campaignId}', CGI.escape(campaign_id.to_s)).sub('{collectionId}', CGI.escape(collection_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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(update_campaign_collection)

  # return_type
  return_type = opts[:debug_return_type] || 'Collection'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.update_collection",
    :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_collection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_coupon(application_id, campaign_id, coupon_id, update_coupon, opts = {}) ⇒ Coupon

Update coupon Update the specified coupon. > [!note] > With this ‘PUT` endpoint, if you do not explicitly set a value for the `startDate`, `expiryDate`, > and `recipientIntegrationId` properties in your request, it is automatically set to `null`.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • coupon_id (String)

    The internal ID of the coupon code. You can find this value in the &#x60;id&#x60; property from the [List coupons](docs.talon.one/management-api#tag/Coupons/operation/getCouponsWithoutTotalCount) endpoint response.

  • update_coupon (UpdateCoupon)

    body

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



13946
13947
13948
13949
# File 'lib/talon_one_sdk/api/management_api.rb', line 13946

def update_coupon(application_id, campaign_id, coupon_id, update_coupon, opts = {})
  data, _status_code, _headers = update_coupon_with_http_info(application_id, campaign_id, coupon_id, update_coupon, opts)
  data
end

#update_coupon_batch(application_id, campaign_id, update_coupon_batch, opts = {}) ⇒ nil

Update coupons Update all coupons or a specific batch of coupons in the given campaign. You can find the ‘batchId` on the Coupons page of your campaign in the Campaign Manager, or you can use [List coupons](#tag/Coupons/operation/getCouponsWithoutTotalCount). > [!note] Note > - Only send sequential requests to this endpoint. > - Requests to this endpoint time out after 30 minutes. If you hit a timeout, contact our support team. > - With this `PUT` endpoint, if you do not explicitly set a value for the `startDate` and `expiryDate` properties in your request, it is automatically set to `null`. To update a specific coupon, use [Update coupon](#tag/Coupons/operation/updateCoupon).

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • update_coupon_batch (UpdateCouponBatch)

    body

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


14031
14032
14033
14034
# File 'lib/talon_one_sdk/api/management_api.rb', line 14031

def update_coupon_batch(application_id, campaign_id, update_coupon_batch, opts = {})
  update_coupon_batch_with_http_info(application_id, campaign_id, update_coupon_batch, opts)
  nil
end

#update_coupon_batch_with_http_info(application_id, campaign_id, update_coupon_batch, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Update coupons Update all coupons or a specific batch of coupons in the given campaign. You can find the &#x60;batchId&#x60; on the Coupons page of your campaign in the Campaign Manager, or you can use [List coupons](#tag/Coupons/operation/getCouponsWithoutTotalCount). &gt; [!note] Note &gt; - Only send sequential requests to this endpoint. &gt; - Requests to this endpoint time out after 30 minutes. If you hit a timeout, contact our support team. &gt; - With this &#x60;PUT&#x60; endpoint, if you do not explicitly set a value for the &#x60;startDate&#x60; and &#x60;expiryDate&#x60; properties in your request, it is automatically set to &#x60;null&#x60;. To update a specific coupon, use [Update coupon](#tag/Coupons/operation/updateCoupon).

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • update_coupon_batch (UpdateCouponBatch)

    body

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



14043
14044
14045
14046
14047
14048
14049
14050
14051
14052
14053
14054
14055
14056
14057
14058
14059
14060
14061
14062
14063
14064
14065
14066
14067
14068
14069
14070
14071
14072
14073
14074
14075
14076
14077
14078
14079
14080
14081
14082
14083
14084
14085
14086
14087
14088
14089
14090
14091
14092
14093
14094
14095
14096
14097
14098
14099
14100
# File 'lib/talon_one_sdk/api/management_api.rb', line 14043

def update_coupon_batch_with_http_info(application_id, campaign_id, update_coupon_batch, 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 'update_coupon_batch' is set
  if @api_client.config.client_side_validation && update_coupon_batch.nil?
    fail ArgumentError, "Missing the required parameter 'update_coupon_batch' 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'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(update_coupon_batch)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.update_coupon_batch",
    :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, update_coupon, opts = {}) ⇒ Array<(Coupon, Integer, Hash)>

Update coupon Update the specified coupon. &gt; [!note] &gt; With this &#x60;PUT&#x60; endpoint, if you do not explicitly set a value for the &#x60;startDate&#x60;, &#x60;expiryDate&#x60;, &gt; and &#x60;recipientIntegrationId&#x60; properties in your request, it is automatically set to &#x60;null&#x60;.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • coupon_id (String)

    The internal ID of the coupon code. You can find this value in the &#x60;id&#x60; property from the [List coupons](docs.talon.one/management-api#tag/Coupons/operation/getCouponsWithoutTotalCount) endpoint response.

  • update_coupon (UpdateCoupon)

    body

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Coupon, Integer, Hash)>)

    Coupon data, response status code and response headers



13959
13960
13961
13962
13963
13964
13965
13966
13967
13968
13969
13970
13971
13972
13973
13974
13975
13976
13977
13978
13979
13980
13981
13982
13983
13984
13985
13986
13987
13988
13989
13990
13991
13992
13993
13994
13995
13996
13997
13998
13999
14000
14001
14002
14003
14004
14005
14006
14007
14008
14009
14010
14011
14012
14013
14014
14015
14016
14017
14018
14019
14020
14021
14022
# File 'lib/talon_one_sdk/api/management_api.rb', line 13959

def update_coupon_with_http_info(application_id, campaign_id, coupon_id, update_coupon, 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 'update_coupon' is set
  if @api_client.config.client_side_validation && update_coupon.nil?
    fail ArgumentError, "Missing the required parameter 'update_coupon' 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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(update_coupon)

  # return_type
  return_type = opts[:debug_return_type] || 'Coupon'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.update_coupon",
    :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_loyalty_card(loyalty_program_id, loyalty_card_id, update_loyalty_card_request, opts = {}) ⇒ LoyaltyCard

Update loyalty card Update the details of a specific loyalty card. You can set the card’s status to ‘active` or `inactive` through this endpoint. At least one of `status` or `attributes` must be provided.

Parameters:

Returns:



14109
14110
14111
14112
# File 'lib/talon_one_sdk/api/management_api.rb', line 14109

def update_loyalty_card(loyalty_program_id, loyalty_card_id, update_loyalty_card_request, opts = {})
  data, _status_code, _headers = update_loyalty_card_with_http_info(loyalty_program_id, loyalty_card_id, update_loyalty_card_request, opts)
  data
end

#update_loyalty_card_with_http_info(loyalty_program_id, loyalty_card_id, update_loyalty_card_request, opts = {}) ⇒ Array<(LoyaltyCard, Integer, Hash)>

Update loyalty card Update the details of a specific loyalty card. You can set the card&#39;s status to &#x60;active&#x60; or &#x60;inactive&#x60; through this endpoint. At least one of &#x60;status&#x60; or &#x60;attributes&#x60; must be provided.

Parameters:

Returns:

  • (Array<(LoyaltyCard, Integer, Hash)>)

    LoyaltyCard data, response status code and response headers



14121
14122
14123
14124
14125
14126
14127
14128
14129
14130
14131
14132
14133
14134
14135
14136
14137
14138
14139
14140
14141
14142
14143
14144
14145
14146
14147
14148
14149
14150
14151
14152
14153
14154
14155
14156
14157
14158
14159
14160
14161
14162
14163
14164
14165
14166
14167
14168
14169
14170
14171
14172
14173
14174
14175
14176
14177
14178
14179
14180
14181
14182
14183
14184
14185
14186
14187
14188
# File 'lib/talon_one_sdk/api/management_api.rb', line 14121

def update_loyalty_card_with_http_info(loyalty_program_id, loyalty_card_id, update_loyalty_card_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.update_loyalty_card ...'
  end
  # verify the required parameter 'loyalty_program_id' is set
  if @api_client.config.client_side_validation && loyalty_program_id.nil?
    fail ArgumentError, "Missing the required parameter 'loyalty_program_id' when calling ManagementApi.update_loyalty_card"
  end
  # verify the required parameter 'loyalty_card_id' is set
  if @api_client.config.client_side_validation && loyalty_card_id.nil?
    fail ArgumentError, "Missing the required parameter 'loyalty_card_id' when calling ManagementApi.update_loyalty_card"
  end
  if @api_client.config.client_side_validation && loyalty_card_id.to_s.length > 108
    fail ArgumentError, 'invalid value for "loyalty_card_id" when calling ManagementApi.update_loyalty_card, the character length must be smaller than or equal to 108.'
  end

  if @api_client.config.client_side_validation && loyalty_card_id.to_s.length < 4
    fail ArgumentError, 'invalid value for "loyalty_card_id" when calling ManagementApi.update_loyalty_card, the character length must be greater than or equal to 4.'
  end

  # verify the required parameter 'update_loyalty_card_request' is set
  if @api_client.config.client_side_validation && update_loyalty_card_request.nil?
    fail ArgumentError, "Missing the required parameter 'update_loyalty_card_request' when calling ManagementApi.update_loyalty_card"
  end
  # resource path
  local_var_path = '/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}'.sub('{loyaltyProgramId}', CGI.escape(loyalty_program_id.to_s)).sub('{loyaltyCardId}', CGI.escape(loyalty_card_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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(update_loyalty_card_request)

  # return_type
  return_type = opts[:debug_return_type] || 'LoyaltyCard'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.update_loyalty_card",
    :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_loyalty_card\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_referral(application_id, campaign_id, referral_id, update_referral, opts = {}) ⇒ Referral

Update referral Update the specified referral.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • referral_id (String)

    The ID of the referral code.

  • update_referral (UpdateReferral)

    body

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



14198
14199
14200
14201
# File 'lib/talon_one_sdk/api/management_api.rb', line 14198

def update_referral(application_id, campaign_id, referral_id, update_referral, opts = {})
  data, _status_code, _headers = update_referral_with_http_info(application_id, campaign_id, referral_id, update_referral, opts)
  data
end

#update_referral_with_http_info(application_id, campaign_id, referral_id, update_referral, opts = {}) ⇒ Array<(Referral, Integer, Hash)>

Update referral Update the specified referral.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • campaign_id (Integer)

    The ID of the campaign. It is displayed in your Talon.One deployment URL.

  • referral_id (String)

    The ID of the referral code.

  • update_referral (UpdateReferral)

    body

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Referral, Integer, Hash)>)

    Referral data, response status code and response headers



14211
14212
14213
14214
14215
14216
14217
14218
14219
14220
14221
14222
14223
14224
14225
14226
14227
14228
14229
14230
14231
14232
14233
14234
14235
14236
14237
14238
14239
14240
14241
14242
14243
14244
14245
14246
14247
14248
14249
14250
14251
14252
14253
14254
14255
14256
14257
14258
14259
14260
14261
14262
14263
14264
14265
14266
14267
14268
14269
14270
14271
14272
14273
14274
# File 'lib/talon_one_sdk/api/management_api.rb', line 14211

def update_referral_with_http_info(application_id, campaign_id, referral_id, update_referral, 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 'update_referral' is set
  if @api_client.config.client_side_validation && update_referral.nil?
    fail ArgumentError, "Missing the required parameter 'update_referral' 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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(update_referral)

  # return_type
  return_type = opts[:debug_return_type] || 'Referral'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.update_referral",
    :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_role_v2(role_id, role_v2_base, opts = {}) ⇒ RoleV2

Update role Update a specific role.

Parameters:

  • role_id (Integer)

    The ID of role. Note: To find the ID of a role, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint.

  • role_v2_base (RoleV2Base)

    body

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



14282
14283
14284
14285
# File 'lib/talon_one_sdk/api/management_api.rb', line 14282

def update_role_v2(role_id, role_v2_base, opts = {})
  data, _status_code, _headers = update_role_v2_with_http_info(role_id, role_v2_base, opts)
  data
end

#update_role_v2_with_http_info(role_id, role_v2_base, opts = {}) ⇒ Array<(RoleV2, Integer, Hash)>

Update role Update a specific role.

Parameters:

  • role_id (Integer)

    The ID of role. Note: To find the ID of a role, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint.

  • role_v2_base (RoleV2Base)

    body

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(RoleV2, Integer, Hash)>)

    RoleV2 data, response status code and response headers



14293
14294
14295
14296
14297
14298
14299
14300
14301
14302
14303
14304
14305
14306
14307
14308
14309
14310
14311
14312
14313
14314
14315
14316
14317
14318
14319
14320
14321
14322
14323
14324
14325
14326
14327
14328
14329
14330
14331
14332
14333
14334
14335
14336
14337
14338
14339
14340
14341
14342
14343
14344
14345
14346
14347
14348
# File 'lib/talon_one_sdk/api/management_api.rb', line 14293

def update_role_v2_with_http_info(role_id, role_v2_base, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.update_role_v2 ...'
  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.update_role_v2"
  end
  # verify the required parameter 'role_v2_base' is set
  if @api_client.config.client_side_validation && role_v2_base.nil?
    fail ArgumentError, "Missing the required parameter 'role_v2_base' when calling ManagementApi.update_role_v2"
  end
  # resource path
  local_var_path = '/v2/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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(role_v2_base)

  # return_type
  return_type = opts[:debug_return_type] || 'RoleV2'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.update_role_v2",
    :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_role_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_store(application_id, store_id, new_store, opts = {}) ⇒ Store

Update store Update store details for a specific store ID.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • store_id (String)

    The ID of the store. You can get this ID with the [List stores](#tag/Stores/operation/listStores) endpoint.

  • new_store (NewStore)

    body

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



14357
14358
14359
14360
# File 'lib/talon_one_sdk/api/management_api.rb', line 14357

def update_store(application_id, store_id, new_store, opts = {})
  data, _status_code, _headers = update_store_with_http_info(application_id, store_id, new_store, opts)
  data
end

#update_store_with_http_info(application_id, store_id, new_store, opts = {}) ⇒ Array<(Store, Integer, Hash)>

Update store Update store details for a specific store ID.

Parameters:

  • application_id (Integer)

    The ID of the Application. It is displayed in your Talon.One deployment URL.

  • store_id (String)

    The ID of the store. You can get this ID with the [List stores](#tag/Stores/operation/listStores) endpoint.

  • new_store (NewStore)

    body

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Store, Integer, Hash)>)

    Store data, response status code and response headers



14369
14370
14371
14372
14373
14374
14375
14376
14377
14378
14379
14380
14381
14382
14383
14384
14385
14386
14387
14388
14389
14390
14391
14392
14393
14394
14395
14396
14397
14398
14399
14400
14401
14402
14403
14404
14405
14406
14407
14408
14409
14410
14411
14412
14413
14414
14415
14416
14417
14418
14419
14420
14421
14422
14423
14424
14425
14426
14427
14428
# File 'lib/talon_one_sdk/api/management_api.rb', line 14369

def update_store_with_http_info(application_id, store_id, new_store, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.update_store ...'
  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_store"
  end
  # verify the required parameter 'store_id' is set
  if @api_client.config.client_side_validation && store_id.nil?
    fail ArgumentError, "Missing the required parameter 'store_id' when calling ManagementApi.update_store"
  end
  # verify the required parameter 'new_store' is set
  if @api_client.config.client_side_validation && new_store.nil?
    fail ArgumentError, "Missing the required parameter 'new_store' when calling ManagementApi.update_store"
  end
  # resource path
  local_var_path = '/v1/applications/{applicationId}/stores/{storeId}'.sub('{applicationId}', CGI.escape(application_id.to_s)).sub('{storeId}', CGI.escape(store_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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(new_store)

  # return_type
  return_type = opts[:debug_return_type] || 'Store'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.update_store",
    :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_store\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_user(user_id, update_user, opts = {}) ⇒ User

Update user Update the details of a specific user.

Parameters:

  • user_id (Integer)

    The ID of the user.

  • update_user (UpdateUser)

    body

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



14436
14437
14438
14439
# File 'lib/talon_one_sdk/api/management_api.rb', line 14436

def update_user(user_id, update_user, opts = {})
  data, _status_code, _headers = update_user_with_http_info(user_id, update_user, opts)
  data
end

#update_user_with_http_info(user_id, update_user, opts = {}) ⇒ Array<(User, Integer, Hash)>

Update user Update the details of a specific user.

Parameters:

  • user_id (Integer)

    The ID of the user.

  • update_user (UpdateUser)

    body

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(User, Integer, Hash)>)

    User data, response status code and response headers



14447
14448
14449
14450
14451
14452
14453
14454
14455
14456
14457
14458
14459
14460
14461
14462
14463
14464
14465
14466
14467
14468
14469
14470
14471
14472
14473
14474
14475
14476
14477
14478
14479
14480
14481
14482
14483
14484
14485
14486
14487
14488
14489
14490
14491
14492
14493
14494
14495
14496
14497
14498
14499
14500
14501
14502
# File 'lib/talon_one_sdk/api/management_api.rb', line 14447

def update_user_with_http_info(user_id, update_user, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ManagementApi.update_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.update_user"
  end
  # verify the required parameter 'update_user' is set
  if @api_client.config.client_side_validation && update_user.nil?
    fail ArgumentError, "Missing the required parameter 'update_user' when calling ManagementApi.update_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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(update_user)

  # return_type
  return_type = opts[:debug_return_type] || 'User'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key_v1']

  new_options = opts.merge(
    :operation => :"ManagementApi.update_user",
    :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_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end