Class: WalleeRubySdk::AnalyticsQueriesService

Inherits:
Object
  • Object
show all
Defined in:
lib/wallee-ruby-sdk/service/analytics_queries_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ AnalyticsQueriesService

Returns a new instance of AnalyticsQueriesService.



28
29
30
# File 'lib/wallee-ruby-sdk/service/analytics_queries_service.rb', line 28

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



25
26
27
# File 'lib/wallee-ruby-sdk/service/analytics_queries_service.rb', line 25

def api_client
  @api_client
end

Instance Method Details

#delete_analytics_queries_query_external_id_query_external_id(query_external_id, account, opts = {}) ⇒ nil

Cancel a query execution, identifying it by its external id.

Parameters:

  • query_external_id (String)

    Identifies the query execution.

  • account (Integer)

    Specifies the ID of the account the operation should be executed in.

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

    the optional parameters

Returns:

  • (nil)


36
37
38
39
# File 'lib/wallee-ruby-sdk/service/analytics_queries_service.rb', line 36

def delete_analytics_queries_query_external_id_query_external_id(query_external_id, , opts = {})
  delete_analytics_queries_query_external_id_query_external_id_with_http_info(query_external_id, , opts)
  nil
end

#delete_analytics_queries_query_external_id_query_external_id_with_http_info(query_external_id, account, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Returns nil, response status code and response headers.

Parameters:

  • query_external_id (String)

    Identifies the query execution.

  • account (Integer)

    Specifies the ID of the account the operation should be executed in.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
87
88
89
90
91
92
93
94
95
96
97
# File 'lib/wallee-ruby-sdk/service/analytics_queries_service.rb', line 47

def delete_analytics_queries_query_external_id_query_external_id_with_http_info(query_external_id, , opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsQueriesService.delete_analytics_queries_query_external_id_query_external_id ...'
  end
  # verify the required parameter 'query_external_id' is set
  if @api_client.config.client_side_validation && query_external_id.nil?
    fail ArgumentError, "Missing the required parameter 'query_external_id' when calling AnalyticsQueriesService.delete_analytics_queries_query_external_id_query_external_id"
  end
  # verify the required parameter 'account' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'account' when calling AnalyticsQueriesService.delete_analytics_queries_query_external_id_query_external_id"
  end
  # resource path
  local_var_path = '/analytics/queries/queryExternalId/{queryExternalId}'.sub('{' + 'queryExternalId' + '}', CGI.escape(query_external_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']
  header_params[:'Account'] = 

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

  # connection timeout
  connection_timeout = @api_client.config.timeout

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

  # return_type
  return_type = opts[:debug_return_type]

  new_options = opts.merge(
    :operation => :"AnalyticsQueriesService.delete_analytics_queries_query_external_id_query_external_id",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE.to_sym.downcase, local_var_path, new_options, connection_timeout)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsQueriesService#delete_analytics_queries_query_external_id_query_external_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
  end
  return data, status_code, headers
end

#delete_analytics_queries_query_token_query_token(query_token, account, opts = {}) ⇒ nil

Cancel a query execution, identifying it by its query token.

Parameters:

  • query_token (String)

    Identifies the query execution.

  • account (Integer)

    Specifies the ID of the account the operation should be executed in.

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

    the optional parameters

Returns:

  • (nil)


105
106
107
108
# File 'lib/wallee-ruby-sdk/service/analytics_queries_service.rb', line 105

def delete_analytics_queries_query_token_query_token(query_token, , opts = {})
  delete_analytics_queries_query_token_query_token_with_http_info(query_token, , opts)
  nil
end

#delete_analytics_queries_query_token_query_token_with_http_info(query_token, account, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Returns nil, response status code and response headers.

Parameters:

  • query_token (String)

    Identifies the query execution.

  • account (Integer)

    Specifies the ID of the account the operation should be executed in.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
# File 'lib/wallee-ruby-sdk/service/analytics_queries_service.rb', line 116

def delete_analytics_queries_query_token_query_token_with_http_info(query_token, , opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsQueriesService.delete_analytics_queries_query_token_query_token ...'
  end
  # verify the required parameter 'query_token' is set
  if @api_client.config.client_side_validation && query_token.nil?
    fail ArgumentError, "Missing the required parameter 'query_token' when calling AnalyticsQueriesService.delete_analytics_queries_query_token_query_token"
  end
  # verify the required parameter 'account' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'account' when calling AnalyticsQueriesService.delete_analytics_queries_query_token_query_token"
  end
  # resource path
  local_var_path = '/analytics/queries/queryToken/{queryToken}'.sub('{' + 'queryToken' + '}', CGI.escape(query_token.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']
  header_params[:'Account'] = 

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

  # connection timeout
  connection_timeout = @api_client.config.timeout

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

  # return_type
  return_type = opts[:debug_return_type]

  new_options = opts.merge(
    :operation => :"AnalyticsQueriesService.delete_analytics_queries_query_token_query_token",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE.to_sym.downcase, local_var_path, new_options, connection_timeout)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsQueriesService#delete_analytics_queries_query_token_query_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
  end
  return data, status_code, headers
end

#get_analytics_queries(offset, limit, account, opts = {}) ⇒ ResultPortionModel

Get portion of query executions for account

Parameters:

  • offset (Integer)

    A cursor for pagination, specifies the number of query executions to skip.

  • limit (Integer)

    A limit on the number of query executions to be returned, between 1 and 100. Default is 100.

  • account (Integer)

    Specifies the ID of the account the operation should be executed in.

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

    the optional parameters

Returns:



175
176
177
178
# File 'lib/wallee-ruby-sdk/service/analytics_queries_service.rb', line 175

def get_analytics_queries(offset, limit, , opts = {})
  data, _status_code, _headers = get_analytics_queries_with_http_info(offset, limit, , opts)
  data
end

#get_analytics_queries_query_external_id_query_external_id(query_external_id, account, opts = {}) ⇒ SubmittedAnalyticsQueryExecution

Retrieve a query execution information by its external id Queries are processed asynchronously and may take several minutes to complete. Avoid frequent requests, as they will not speed up processing.

Parameters:

  • query_external_id (String)

    Identifies the query execution.

  • account (Integer)

    Specifies the ID of the account the operation should be executed in.

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

    the optional parameters

Returns:



252
253
254
255
# File 'lib/wallee-ruby-sdk/service/analytics_queries_service.rb', line 252

def get_analytics_queries_query_external_id_query_external_id(query_external_id, , opts = {})
  data, _status_code, _headers = get_analytics_queries_query_external_id_query_external_id_with_http_info(query_external_id, , opts)
  data
end

#get_analytics_queries_query_external_id_query_external_id_result(query_external_id, account, opts = {}) ⇒ String

Generate a temporary URL to download the query result. It retrieves the query by its external id Generate a short-lived (5-minute) URL for downloading the Analytics query result file. Note that each URL generation is counted as a potential download and will be billed accordingly. Do not use this endpoint for periodic checks of file availability. Instead, use the ‘Retrieve a query execution’ endpoint for status checks.

Parameters:

  • query_external_id (String)

    Identifies the query execution.

  • account (Integer)

    Specifies the ID of the account the operation should be executed in.

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

    the optional parameters

Returns:

  • (String)


323
324
325
326
# File 'lib/wallee-ruby-sdk/service/analytics_queries_service.rb', line 323

def get_analytics_queries_query_external_id_query_external_id_result(query_external_id, , opts = {})
  data, _status_code, _headers = get_analytics_queries_query_external_id_query_external_id_result_with_http_info(query_external_id, , opts)
  data
end

#get_analytics_queries_query_external_id_query_external_id_result_with_http_info(query_external_id, account, opts = {}) ⇒ Array<(String, Integer, Hash)>

Returns String data, response status code and response headers.

Parameters:

  • query_external_id (String)

    Identifies the query execution.

  • account (Integer)

    Specifies the ID of the account the operation should be executed in.

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

    the optional parameters

Returns:

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

    String data, response status code and response headers



335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
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
# File 'lib/wallee-ruby-sdk/service/analytics_queries_service.rb', line 335

def get_analytics_queries_query_external_id_query_external_id_result_with_http_info(query_external_id, , opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsQueriesService.get_analytics_queries_query_external_id_query_external_id_result ...'
  end
  # verify the required parameter 'query_external_id' is set
  if @api_client.config.client_side_validation && query_external_id.nil?
    fail ArgumentError, "Missing the required parameter 'query_external_id' when calling AnalyticsQueriesService.get_analytics_queries_query_external_id_query_external_id_result"
  end
  # verify the required parameter 'account' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'account' when calling AnalyticsQueriesService.get_analytics_queries_query_external_id_query_external_id_result"
  end
  # resource path
  local_var_path = '/analytics/queries/queryExternalId/{queryExternalId}/result'.sub('{' + 'queryExternalId' + '}', CGI.escape(query_external_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(['text/plain', 'application/json']) unless header_params['Accept']
  header_params[:'Account'] = 

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

  # connection timeout
  connection_timeout = @api_client.config.timeout

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

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

  new_options = opts.merge(
    :operation => :"AnalyticsQueriesService.get_analytics_queries_query_external_id_query_external_id_result",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET.to_sym.downcase, local_var_path, new_options, connection_timeout)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsQueriesService#get_analytics_queries_query_external_id_query_external_id_result\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
  end
  return data, status_code, headers
end

#get_analytics_queries_query_external_id_query_external_id_with_http_info(query_external_id, account, opts = {}) ⇒ Array<(SubmittedAnalyticsQueryExecution, Integer, Hash)>

Retrieve a query execution information by its external id Queries are processed asynchronously and may take several minutes to complete. Avoid frequent requests, as they will not speed up processing. Timeout for this request is: 97 seconds.

Parameters:

  • query_external_id (String)

    Identifies the query execution.

  • account (Integer)

    Specifies the ID of the account the operation should be executed in.

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

    the optional parameters

Returns:



264
265
266
267
268
269
270
271
272
273
274
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
# File 'lib/wallee-ruby-sdk/service/analytics_queries_service.rb', line 264

def get_analytics_queries_query_external_id_query_external_id_with_http_info(query_external_id, , opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsQueriesService.get_analytics_queries_query_external_id_query_external_id ...'
  end
  # verify the required parameter 'query_external_id' is set
  if @api_client.config.client_side_validation && query_external_id.nil?
    fail ArgumentError, "Missing the required parameter 'query_external_id' when calling AnalyticsQueriesService.get_analytics_queries_query_external_id_query_external_id"
  end
  # verify the required parameter 'account' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'account' when calling AnalyticsQueriesService.get_analytics_queries_query_external_id_query_external_id"
  end
  # resource path
  local_var_path = '/analytics/queries/queryExternalId/{queryExternalId}'.sub('{' + 'queryExternalId' + '}', CGI.escape(query_external_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']
  header_params[:'Account'] = 

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

  # connection timeout
  connection_timeout = 97

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

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

  new_options = opts.merge(
    :operation => :"AnalyticsQueriesService.get_analytics_queries_query_external_id_query_external_id",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET.to_sym.downcase, local_var_path, new_options, connection_timeout)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsQueriesService#get_analytics_queries_query_external_id_query_external_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
  end
  return data, status_code, headers
end

#get_analytics_queries_query_token_query_token(query_token, account, opts = {}) ⇒ SubmittedAnalyticsQueryExecution

Retrieve a query execution information by its query token Queries are processed asynchronously and may take several minutes to complete. Avoid frequent requests, as they will not speed up processing.

Parameters:

  • query_token (String)

    Identifies the query execution.

  • account (Integer)

    Specifies the ID of the account the operation should be executed in.

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

    the optional parameters

Returns:



394
395
396
397
# File 'lib/wallee-ruby-sdk/service/analytics_queries_service.rb', line 394

def get_analytics_queries_query_token_query_token(query_token, , opts = {})
  data, _status_code, _headers = get_analytics_queries_query_token_query_token_with_http_info(query_token, , opts)
  data
end

#get_analytics_queries_query_token_query_token_result(query_token, account, opts = {}) ⇒ String

Generate a temporary URL to download the query result. It retrieves the query by its query token Generate a short-lived (5-minute) URL for downloading the Analytics query result file. Note that each URL generation is counted as a potential download and will be billed accordingly. Do not use this endpoint for periodic checks of file availability. Instead, use the ‘Retrieve a query execution’ endpoint for status checks.

Parameters:

  • query_token (String)

    Identifies the query execution.

  • account (Integer)

    Specifies the ID of the account the operation should be executed in.

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

    the optional parameters

Returns:

  • (String)


465
466
467
468
# File 'lib/wallee-ruby-sdk/service/analytics_queries_service.rb', line 465

def get_analytics_queries_query_token_query_token_result(query_token, , opts = {})
  data, _status_code, _headers = get_analytics_queries_query_token_query_token_result_with_http_info(query_token, , opts)
  data
end

#get_analytics_queries_query_token_query_token_result_with_http_info(query_token, account, opts = {}) ⇒ Array<(String, Integer, Hash)>

Returns String data, response status code and response headers.

Parameters:

  • query_token (String)

    Identifies the query execution.

  • account (Integer)

    Specifies the ID of the account the operation should be executed in.

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

    the optional parameters

Returns:

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

    String data, response status code and response headers



477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
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
# File 'lib/wallee-ruby-sdk/service/analytics_queries_service.rb', line 477

def get_analytics_queries_query_token_query_token_result_with_http_info(query_token, , opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsQueriesService.get_analytics_queries_query_token_query_token_result ...'
  end
  # verify the required parameter 'query_token' is set
  if @api_client.config.client_side_validation && query_token.nil?
    fail ArgumentError, "Missing the required parameter 'query_token' when calling AnalyticsQueriesService.get_analytics_queries_query_token_query_token_result"
  end
  # verify the required parameter 'account' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'account' when calling AnalyticsQueriesService.get_analytics_queries_query_token_query_token_result"
  end
  # resource path
  local_var_path = '/analytics/queries/queryToken/{queryToken}/result'.sub('{' + 'queryToken' + '}', CGI.escape(query_token.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(['text/plain', 'application/json']) unless header_params['Accept']
  header_params[:'Account'] = 

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

  # connection timeout
  connection_timeout = @api_client.config.timeout

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

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

  new_options = opts.merge(
    :operation => :"AnalyticsQueriesService.get_analytics_queries_query_token_query_token_result",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET.to_sym.downcase, local_var_path, new_options, connection_timeout)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsQueriesService#get_analytics_queries_query_token_query_token_result\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
  end
  return data, status_code, headers
end

#get_analytics_queries_query_token_query_token_with_http_info(query_token, account, opts = {}) ⇒ Array<(SubmittedAnalyticsQueryExecution, Integer, Hash)>

Retrieve a query execution information by its query token Queries are processed asynchronously and may take several minutes to complete. Avoid frequent requests, as they will not speed up processing. Timeout for this request is: 97 seconds.

Parameters:

  • query_token (String)

    Identifies the query execution.

  • account (Integer)

    Specifies the ID of the account the operation should be executed in.

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

    the optional parameters

Returns:



406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
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
# File 'lib/wallee-ruby-sdk/service/analytics_queries_service.rb', line 406

def get_analytics_queries_query_token_query_token_with_http_info(query_token, , opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsQueriesService.get_analytics_queries_query_token_query_token ...'
  end
  # verify the required parameter 'query_token' is set
  if @api_client.config.client_side_validation && query_token.nil?
    fail ArgumentError, "Missing the required parameter 'query_token' when calling AnalyticsQueriesService.get_analytics_queries_query_token_query_token"
  end
  # verify the required parameter 'account' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'account' when calling AnalyticsQueriesService.get_analytics_queries_query_token_query_token"
  end
  # resource path
  local_var_path = '/analytics/queries/queryToken/{queryToken}'.sub('{' + 'queryToken' + '}', CGI.escape(query_token.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']
  header_params[:'Account'] = 

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

  # connection timeout
  connection_timeout = 97

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

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

  new_options = opts.merge(
    :operation => :"AnalyticsQueriesService.get_analytics_queries_query_token_query_token",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET.to_sym.downcase, local_var_path, new_options, connection_timeout)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsQueriesService#get_analytics_queries_query_token_query_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
  end
  return data, status_code, headers
end

#get_analytics_queries_with_http_info(offset, limit, account, opts = {}) ⇒ Array<(ResultPortionModel, Integer, Hash)>

Returns ResultPortionModel data, response status code and response headers.

Parameters:

  • offset (Integer)

    A cursor for pagination, specifies the number of query executions to skip.

  • limit (Integer)

    A limit on the number of query executions to be returned, between 1 and 100. Default is 100.

  • account (Integer)

    Specifies the ID of the account the operation should be executed in.

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

    the optional parameters

Returns:

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

    ResultPortionModel data, response status code and response headers



187
188
189
190
191
192
193
194
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
# File 'lib/wallee-ruby-sdk/service/analytics_queries_service.rb', line 187

def get_analytics_queries_with_http_info(offset, limit, , opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsQueriesService.get_analytics_queries ...'
  end
  # verify the required parameter 'offset' is set
  if @api_client.config.client_side_validation && offset.nil?
    fail ArgumentError, "Missing the required parameter 'offset' when calling AnalyticsQueriesService.get_analytics_queries"
  end
  # verify the required parameter 'limit' is set
  if @api_client.config.client_side_validation && limit.nil?
    fail ArgumentError, "Missing the required parameter 'limit' when calling AnalyticsQueriesService.get_analytics_queries"
  end
  # verify the required parameter 'account' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'account' when calling AnalyticsQueriesService.get_analytics_queries"
  end
  # resource path
  local_var_path = '/analytics/queries'

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

  # 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']
  header_params[:'Account'] = 

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

  # connection timeout
  connection_timeout = @api_client.config.timeout

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

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

  new_options = opts.merge(
    :operation => :"AnalyticsQueriesService.get_analytics_queries",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET.to_sym.downcase, local_var_path, new_options, connection_timeout)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsQueriesService#get_analytics_queries\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
  end
  return data, status_code, headers
end

#post_analytics_queries_submit(query_external_id, account, analytics_query_execution_request, opts = {}) ⇒ AnalyticsQueryExecutionResponse

Submit a query execution

Parameters:

  • query_external_id (String)

    A unique id to be provided for each query. The same id for different queries will be only executed the first time

  • account (Integer)

    Specifies the ID of the account the operation should be executed in.

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

    the optional parameters

Returns:



536
537
538
539
# File 'lib/wallee-ruby-sdk/service/analytics_queries_service.rb', line 536

def post_analytics_queries_submit(query_external_id, , analytics_query_execution_request, opts = {})
  data, _status_code, _headers = post_analytics_queries_submit_with_http_info(query_external_id, , analytics_query_execution_request, opts)
  data
end

#post_analytics_queries_submit_with_http_info(query_external_id, account, analytics_query_execution_request, opts = {}) ⇒ Array<(AnalyticsQueryExecutionResponse, Integer, Hash)>

Returns AnalyticsQueryExecutionResponse data, response status code and response headers.

Parameters:

  • query_external_id (String)

    A unique id to be provided for each query. The same id for different queries will be only executed the first time

  • account (Integer)

    Specifies the ID of the account the operation should be executed in.

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

    the optional parameters

Returns:



548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
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
# File 'lib/wallee-ruby-sdk/service/analytics_queries_service.rb', line 548

def post_analytics_queries_submit_with_http_info(query_external_id, , analytics_query_execution_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsQueriesService.post_analytics_queries_submit ...'
  end
  # verify the required parameter 'query_external_id' is set
  if @api_client.config.client_side_validation && query_external_id.nil?
    fail ArgumentError, "Missing the required parameter 'query_external_id' when calling AnalyticsQueriesService.post_analytics_queries_submit"
  end
  # verify the required parameter 'account' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'account' when calling AnalyticsQueriesService.post_analytics_queries_submit"
  end
  # verify the required parameter 'analytics_query_execution_request' is set
  if @api_client.config.client_side_validation && analytics_query_execution_request.nil?
    fail ArgumentError, "Missing the required parameter 'analytics_query_execution_request' when calling AnalyticsQueriesService.post_analytics_queries_submit"
  end
  # resource path
  local_var_path = '/analytics/queries/submit'

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

  # 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'])
  unless content_type.nil?
    header_params['Content-Type'] = content_type
  end
  header_params[:'Account'] = 

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

  # connection timeout
  connection_timeout = @api_client.config.timeout

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

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

  new_options = opts.merge(
    :operation => :"AnalyticsQueriesService.post_analytics_queries_submit",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST.to_sym.downcase, local_var_path, new_options, connection_timeout)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsQueriesService#post_analytics_queries_submit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
  end
  return data, status_code, headers
end