vrpayment-ruby-sdk 6.4.0 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (168) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +38 -31
  3. data/README.md +354 -129
  4. data/lib/vrpayment-ruby-sdk/api_client.rb +1 -1
  5. data/lib/vrpayment-ruby-sdk/models/abstract_role_update.rb +13 -1
  6. data/lib/vrpayment-ruby-sdk/models/abstract_walleejoin_partnership.rb +330 -0
  7. data/lib/vrpayment-ruby-sdk/models/{payment_terminal_preparing.rb → account_create_with_owner.rb} +63 -34
  8. data/lib/vrpayment-ruby-sdk/models/analytics_query_execution_request.rb +279 -0
  9. data/lib/vrpayment-ruby-sdk/models/{express_checkout_shipping_method_change_request.rb → analytics_query_execution_response.rb} +11 -11
  10. data/lib/vrpayment-ruby-sdk/models/authenticated_card_data_create.rb +30 -1
  11. data/lib/vrpayment-ruby-sdk/models/bank_payment_type.rb +50 -0
  12. data/lib/vrpayment-ruby-sdk/models/{express_checkout_shipping_address_change_request.rb → boarding_strategy_information_request.rb} +22 -14
  13. data/lib/vrpayment-ruby-sdk/models/{bogus_express_checkout_payment_data.rb → charge_attempt_lookup_result.rb} +16 -18
  14. data/lib/vrpayment-ruby-sdk/models/charge_attempt_projection.rb +560 -0
  15. data/lib/vrpayment-ruby-sdk/models/dunning_case_level.rb +403 -0
  16. data/lib/vrpayment-ruby-sdk/models/{user_account_role_list_response.rb → dunning_case_level_list_response.rb} +4 -4
  17. data/lib/vrpayment-ruby-sdk/models/dunning_case_level_search_response.rb +263 -0
  18. data/lib/vrpayment-ruby-sdk/models/dunning_case_level_state.rb +53 -0
  19. data/lib/vrpayment-ruby-sdk/models/{express_checkout_session_state.rb → facade_user_friendly_query_status_model.rb} +6 -7
  20. data/lib/vrpayment-ruby-sdk/models/invoice_processor.rb +51 -0
  21. data/lib/vrpayment-ruby-sdk/models/invoice_reconciliation_record.rb +633 -0
  22. data/lib/vrpayment-ruby-sdk/models/{user_account_role.rb → invoice_reconciliation_record_invoice_link.rb} +40 -43
  23. data/lib/vrpayment-ruby-sdk/models/invoice_reconciliation_record_invoice_link_list_response.rb +253 -0
  24. data/lib/vrpayment-ruby-sdk/models/invoice_reconciliation_record_invoice_link_search_response.rb +263 -0
  25. data/lib/vrpayment-ruby-sdk/models/invoice_reconciliation_record_list_response.rb +253 -0
  26. data/lib/vrpayment-ruby-sdk/models/invoice_reconciliation_record_rejection_status.rb +51 -0
  27. data/lib/vrpayment-ruby-sdk/models/invoice_reconciliation_record_search_response.rb +263 -0
  28. data/lib/vrpayment-ruby-sdk/models/invoice_reconciliation_record_state.rb +53 -0
  29. data/lib/vrpayment-ruby-sdk/models/{express_checkout_wallet_type.rb → invoice_reconciliation_record_type.rb} +3 -3
  30. data/lib/vrpayment-ruby-sdk/models/invoice_reimbursement.rb +463 -0
  31. data/lib/vrpayment-ruby-sdk/models/{express_checkout_create_response.rb → invoice_reimbursement_list_response.rb} +27 -22
  32. data/lib/vrpayment-ruby-sdk/models/invoice_reimbursement_search_response.rb +263 -0
  33. data/lib/vrpayment-ruby-sdk/models/invoice_reimbursement_state.rb +54 -0
  34. data/lib/vrpayment-ruby-sdk/models/{bogus_express_checkout_approval_request.rb → payment_facilitator_pricing_profile_dto.rb} +19 -10
  35. data/lib/vrpayment-ruby-sdk/models/payment_facilitator_pricing_profile_state.rb +53 -0
  36. data/lib/vrpayment-ruby-sdk/models/{express_checkout_session.rb → payment_initiation_advice_file.rb} +57 -72
  37. data/lib/vrpayment-ruby-sdk/models/payment_initiation_advice_file_state.rb +55 -0
  38. data/lib/vrpayment-ruby-sdk/models/payment_terminal.rb +37 -1
  39. data/lib/vrpayment-ruby-sdk/models/payment_terminal_activation_status.rb +301 -0
  40. data/lib/vrpayment-ruby-sdk/models/payment_terminal_activation_status_detail_search_response.rb +263 -0
  41. data/lib/vrpayment-ruby-sdk/models/payment_terminal_address_create.rb +511 -0
  42. data/lib/vrpayment-ruby-sdk/models/{payment_terminal_create.rb → payment_terminal_creation_request.rb} +88 -62
  43. data/lib/vrpayment-ruby-sdk/models/payment_terminal_location.rb +1 -0
  44. data/lib/vrpayment-ruby-sdk/models/payment_terminal_location_crud_model.rb +398 -0
  45. data/lib/vrpayment-ruby-sdk/models/payment_terminal_location_crud_model_rest_api_create.rb +359 -0
  46. data/lib/vrpayment-ruby-sdk/models/payment_terminal_location_list_response.rb +253 -0
  47. data/lib/vrpayment-ruby-sdk/models/payment_terminal_location_version_state.rb +2 -1
  48. data/lib/vrpayment-ruby-sdk/models/pricing_history_dto.rb +266 -0
  49. data/lib/vrpayment-ruby-sdk/models/product_metered_fee.rb +11 -1
  50. data/lib/vrpayment-ruby-sdk/models/product_metered_fee_update.rb +11 -1
  51. data/lib/vrpayment-ruby-sdk/models/{express_checkout_approval_response.rb → rest_member.rb} +36 -22
  52. data/lib/vrpayment-ruby-sdk/models/{abstract_payment_terminal_update.rb → result_portion_model.rb} +43 -30
  53. data/lib/vrpayment-ruby-sdk/models/role.rb +13 -1
  54. data/lib/vrpayment-ruby-sdk/models/role_create.rb +13 -1
  55. data/lib/vrpayment-ruby-sdk/models/{express_checkout_shipping_method_change_response.rb → role_ref.rb} +18 -18
  56. data/lib/vrpayment-ruby-sdk/models/role_update.rb +13 -1
  57. data/lib/vrpayment-ruby-sdk/models/scope.rb +13 -1
  58. data/lib/vrpayment-ruby-sdk/models/setter.rb +618 -0
  59. data/lib/vrpayment-ruby-sdk/models/{user_space_role_list_response.rb → state_list_response.rb} +4 -4
  60. data/lib/vrpayment-ruby-sdk/models/{express_checkout_shipping_option.rb → store_trial_subscription_request.rb} +38 -56
  61. data/lib/vrpayment-ruby-sdk/models/store_trial_subscription_request_setter.rb +307 -0
  62. data/lib/vrpayment-ruby-sdk/models/submitted_analytics_query_execution.rb +342 -0
  63. data/lib/vrpayment-ruby-sdk/models/{express_checkout_session_create.rb → subscription_component_group_configuration_request.rb} +23 -37
  64. data/lib/vrpayment-ruby-sdk/models/subscription_component_group_configuration_request_setter.rb +249 -0
  65. data/lib/vrpayment-ruby-sdk/models/subscription_product_dto.rb +239 -0
  66. data/lib/vrpayment-ruby-sdk/models/tokenized_card_data_create.rb +30 -1
  67. data/lib/vrpayment-ruby-sdk/models/transaction_overview.rb +1144 -0
  68. data/lib/vrpayment-ruby-sdk/models/transaction_projection.rb +1135 -0
  69. data/lib/vrpayment-ruby-sdk/models/walleejoin_admin_partner_configuration_request_dto.rb +360 -0
  70. data/lib/vrpayment-ruby-sdk/models/walleejoin_admin_partner_configuration_response_dto.rb +351 -0
  71. data/lib/vrpayment-ruby-sdk/models/walleejoin_admin_pricing_type.rb +51 -0
  72. data/lib/vrpayment-ruby-sdk/models/walleejoin_create_partnership_api_request_dto.rb +266 -0
  73. data/lib/vrpayment-ruby-sdk/models/walleejoin_partnership.rb +357 -0
  74. data/lib/vrpayment-ruby-sdk/models/walleejoin_partnership_create.rb +337 -0
  75. data/lib/vrpayment-ruby-sdk/models/walleejoin_partnership_response_dto.rb +342 -0
  76. data/lib/vrpayment-ruby-sdk/models/{express_checkout_shipping_address_change_response.rb → walleejoin_partnership_response_dto_list_response.rb} +30 -18
  77. data/lib/vrpayment-ruby-sdk/models/{user_space_role.rb → walleejoin_partnership_response_dto_search_response.rb} +34 -42
  78. data/lib/vrpayment-ruby-sdk/models/walleejoin_partnership_state.rb +51 -0
  79. data/lib/vrpayment-ruby-sdk/models/walleejoin_partnership_type.rb +50 -0
  80. data/lib/vrpayment-ruby-sdk/models/walleejoin_partnership_update.rb +364 -0
  81. data/lib/vrpayment-ruby-sdk/models/wallet_type.rb +40 -1
  82. data/lib/vrpayment-ruby-sdk/models/web_ui_account_theme.rb +230 -0
  83. data/lib/vrpayment-ruby-sdk/service/accounts_service.rb +16 -9
  84. data/lib/vrpayment-ruby-sdk/service/analytics_queries_service.rb +613 -0
  85. data/lib/vrpayment-ruby-sdk/service/bank_accounts_service.rb +3 -3
  86. data/lib/vrpayment-ruby-sdk/service/bank_transactions_service.rb +3 -3
  87. data/lib/vrpayment-ruby-sdk/service/boarding_subscription_strategy_service.rb +181 -0
  88. data/lib/vrpayment-ruby-sdk/service/charge_attempts_service.rb +3 -3
  89. data/lib/vrpayment-ruby-sdk/service/charge_bank_transactions_service.rb +3 -3
  90. data/lib/vrpayment-ruby-sdk/service/charge_flow_levels_service.rb +4 -4
  91. data/lib/vrpayment-ruby-sdk/service/charge_flows_level_payment_links_service.rb +3 -3
  92. data/lib/vrpayment-ruby-sdk/service/charge_flows_service.rb +3 -3
  93. data/lib/vrpayment-ruby-sdk/service/consumed_resources_service.rb +1 -1
  94. data/lib/vrpayment-ruby-sdk/service/countries_service.rb +15 -6
  95. data/lib/vrpayment-ruby-sdk/service/currency_bank_accounts_service.rb +3 -3
  96. data/lib/vrpayment-ruby-sdk/service/customer_addresses_service.rb +7 -7
  97. data/lib/vrpayment-ruby-sdk/service/customer_comments_service.rb +8 -8
  98. data/lib/vrpayment-ruby-sdk/service/customers_service.rb +11 -11
  99. data/lib/vrpayment-ruby-sdk/service/delivery_indications_service.rb +5 -5
  100. data/lib/vrpayment-ruby-sdk/service/document_templates_service.rb +3 -3
  101. data/lib/vrpayment-ruby-sdk/service/dunning_case_levels_service.rb +291 -0
  102. data/lib/vrpayment-ruby-sdk/service/dunning_cases_service.rb +5 -5
  103. data/lib/vrpayment-ruby-sdk/service/dunning_flow_levels_service.rb +3 -3
  104. data/lib/vrpayment-ruby-sdk/service/dunning_flows_service.rb +3 -3
  105. data/lib/vrpayment-ruby-sdk/service/external_transfer_bank_transactions_service.rb +3 -3
  106. data/lib/vrpayment-ruby-sdk/service/internal_transfer_bank_transactions_service.rb +3 -3
  107. data/lib/vrpayment-ruby-sdk/service/invoice_reconciliation_record_invoice_links_service.rb +453 -0
  108. data/lib/vrpayment-ruby-sdk/service/invoice_reconciliation_records_service.rb +433 -0
  109. data/lib/vrpayment-ruby-sdk/service/invoice_reimbursements_service.rb +450 -0
  110. data/lib/vrpayment-ruby-sdk/service/join_admin_partner_configuration_service.rb +306 -0
  111. data/lib/vrpayment-ruby-sdk/service/join_partnership_service.rb +586 -0
  112. data/lib/vrpayment-ruby-sdk/service/manual_tasks_service.rb +5 -5
  113. data/lib/vrpayment-ruby-sdk/service/members_service.rb +215 -0
  114. data/lib/vrpayment-ruby-sdk/service/payment_connector_configurations_service.rb +6 -6
  115. data/lib/vrpayment-ruby-sdk/service/payment_links_service.rb +6 -6
  116. data/lib/vrpayment-ruby-sdk/service/payment_method_configurations_service.rb +6 -6
  117. data/lib/vrpayment-ruby-sdk/service/payment_processor_configurations_service.rb +85 -6
  118. data/lib/vrpayment-ruby-sdk/service/payment_terminal_transaction_summaries_service.rb +4 -4
  119. data/lib/vrpayment-ruby-sdk/service/payment_terminals_service.rb +475 -22
  120. data/lib/vrpayment-ruby-sdk/service/payment_web_apps_service.rb +11 -11
  121. data/lib/vrpayment-ruby-sdk/service/refund_bank_transactions_service.rb +3 -3
  122. data/lib/vrpayment-ruby-sdk/service/refund_comments_service.rb +8 -8
  123. data/lib/vrpayment-ruby-sdk/service/refund_recovery_bank_transactions_service.rb +3 -3
  124. data/lib/vrpayment-ruby-sdk/service/refunds_service.rb +7 -7
  125. data/lib/vrpayment-ruby-sdk/service/spaces_service.rb +10 -3
  126. data/lib/vrpayment-ruby-sdk/service/subscribers_service.rb +6 -6
  127. data/lib/vrpayment-ruby-sdk/service/subscription_affiliates_service.rb +6 -6
  128. data/lib/vrpayment-ruby-sdk/service/subscription_charges_service.rb +5 -5
  129. data/lib/vrpayment-ruby-sdk/service/subscription_ledger_entries_service.rb +4 -4
  130. data/lib/vrpayment-ruby-sdk/service/subscription_metric_usage_reports_service.rb +4 -4
  131. data/lib/vrpayment-ruby-sdk/service/subscription_metrics_service.rb +6 -6
  132. data/lib/vrpayment-ruby-sdk/service/subscription_period_bills_service.rb +4 -4
  133. data/lib/vrpayment-ruby-sdk/service/subscription_product_component_groups_service.rb +6 -6
  134. data/lib/vrpayment-ruby-sdk/service/subscription_product_components_service.rb +6 -6
  135. data/lib/vrpayment-ruby-sdk/service/subscription_product_metered_fee_tiers_service.rb +6 -6
  136. data/lib/vrpayment-ruby-sdk/service/subscription_product_metered_fees_service.rb +6 -6
  137. data/lib/vrpayment-ruby-sdk/service/subscription_product_period_fees_service.rb +6 -6
  138. data/lib/vrpayment-ruby-sdk/service/subscription_product_retirements_service.rb +3 -3
  139. data/lib/vrpayment-ruby-sdk/service/subscription_product_setup_fees_service.rb +6 -6
  140. data/lib/vrpayment-ruby-sdk/service/subscription_product_version_retirements_service.rb +3 -3
  141. data/lib/vrpayment-ruby-sdk/service/subscription_product_versions_service.rb +7 -7
  142. data/lib/vrpayment-ruby-sdk/service/subscription_products_service.rb +6 -6
  143. data/lib/vrpayment-ruby-sdk/service/subscription_suspensions_service.rb +3 -3
  144. data/lib/vrpayment-ruby-sdk/service/subscription_versions_service.rb +3 -3
  145. data/lib/vrpayment-ruby-sdk/service/subscriptions_service.rb +13 -13
  146. data/lib/vrpayment-ruby-sdk/service/terminal_locations_service.rb +276 -0
  147. data/lib/vrpayment-ruby-sdk/service/token_versions_service.rb +3 -3
  148. data/lib/vrpayment-ruby-sdk/service/tokens_service.rb +8 -8
  149. data/lib/vrpayment-ruby-sdk/service/transaction_client_platforms_service.rb +3 -3
  150. data/lib/vrpayment-ruby-sdk/service/transaction_comments_service.rb +8 -8
  151. data/lib/vrpayment-ruby-sdk/service/transaction_completions_service.rb +3 -3
  152. data/lib/vrpayment-ruby-sdk/service/transaction_invoice_comments_service.rb +8 -8
  153. data/lib/vrpayment-ruby-sdk/service/transaction_invoices_service.rb +86 -8
  154. data/lib/vrpayment-ruby-sdk/service/transaction_line_item_versions_service.rb +4 -4
  155. data/lib/vrpayment-ruby-sdk/service/transaction_voids_service.rb +3 -3
  156. data/lib/vrpayment-ruby-sdk/service/transactions_service.rb +179 -37
  157. data/lib/vrpayment-ruby-sdk/service/web_apps_service.rb +2 -2
  158. data/lib/vrpayment-ruby-sdk/service/web_ui_account_theme_service.rb +245 -0
  159. data/lib/vrpayment-ruby-sdk/service/webhook_listeners_service.rb +9 -9
  160. data/lib/vrpayment-ruby-sdk/service/webhook_urls_service.rb +9 -9
  161. data/lib/vrpayment-ruby-sdk/version.rb +1 -1
  162. data/lib/vrpayment-ruby-sdk.rb +76 -25
  163. metadata +78 -27
  164. data/lib/vrpayment-ruby-sdk/service/application_users_roles_service.rb +0 -478
  165. data/lib/vrpayment-ruby-sdk/service/bogus_express_checkout_service.rb +0 -114
  166. data/lib/vrpayment-ruby-sdk/service/express_checkout_service.rb +0 -269
  167. data/lib/vrpayment-ruby-sdk/service/human_users_roles_service.rb +0 -478
  168. data/lib/vrpayment-ruby-sdk/service/single_sign_on_users_roles_service.rb +0 -478
@@ -406,28 +406,34 @@ module VrpaymentRubySdk
406
406
 
407
407
 
408
408
  # Create an account
409
- # @param account_create [AccountCreate]
409
+ # @param account [Integer] Specifies the ID of the account the operation should be executed in.
410
+ # @param account_create_with_owner [AccountCreateWithOwner]
410
411
  # @param [Hash] opts the optional parameters
411
412
  # @option opts [Array<String>] :expand
412
413
  # @return [Account]
413
- def post_accounts(account_create, opts = {})
414
- data, _status_code, _headers = post_accounts_with_http_info(account_create, opts)
414
+ def post_accounts(account, account_create_with_owner, opts = {})
415
+ data, _status_code, _headers = post_accounts_with_http_info(account, account_create_with_owner, opts)
415
416
  data
416
417
  end
417
418
 
418
419
  # Create an account
419
420
 
420
- # @param account_create [AccountCreate]
421
+ # @param account [Integer] Specifies the ID of the account the operation should be executed in.
422
+ # @param account_create_with_owner [AccountCreateWithOwner]
421
423
  # @param [Hash] opts the optional parameters
422
424
  # @option opts [Array<String>] :expand
423
425
  # @return [Array<(Account, Integer, Hash)>] Account data, response status code and response headers
424
- def post_accounts_with_http_info(account_create, opts = {})
426
+ def post_accounts_with_http_info(account, account_create_with_owner, opts = {})
425
427
  if @api_client.config.debugging
426
428
  @api_client.config.logger.debug 'Calling API: AccountsService.post_accounts ...'
427
429
  end
428
- # verify the required parameter 'account_create' is set
429
- if @api_client.config.client_side_validation && account_create.nil?
430
- fail ArgumentError, "Missing the required parameter 'account_create' when calling AccountsService.post_accounts"
430
+ # verify the required parameter 'account' is set
431
+ if @api_client.config.client_side_validation && account.nil?
432
+ fail ArgumentError, "Missing the required parameter 'account' when calling AccountsService.post_accounts"
433
+ end
434
+ # verify the required parameter 'account_create_with_owner' is set
435
+ if @api_client.config.client_side_validation && account_create_with_owner.nil?
436
+ fail ArgumentError, "Missing the required parameter 'account_create_with_owner' when calling AccountsService.post_accounts"
431
437
  end
432
438
  # resource path
433
439
  local_var_path = '/accounts'
@@ -445,6 +451,7 @@ module VrpaymentRubySdk
445
451
  if !content_type.nil?
446
452
  header_params['Content-Type'] = content_type
447
453
  end
454
+ header_params[:'account'] = account
448
455
 
449
456
  # form parameters
450
457
  form_params = opts[:form_params] || {}
@@ -453,7 +460,7 @@ module VrpaymentRubySdk
453
460
  connection_timeout = @api_client.config.timeout
454
461
 
455
462
  # http body (model)
456
- post_body = opts[:debug_body] || @api_client.object_to_http_body(account_create)
463
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(account_create_with_owner)
457
464
 
458
465
  # return_type
459
466
  return_type = opts[:debug_return_type] || 'Account'
@@ -0,0 +1,613 @@
1
+ =begin
2
+ # VR Payment Ruby SDK
3
+ #
4
+ # This library allows to interact with the VR Payment payment service.
5
+ #
6
+ # Copyright owner: Wallee AG
7
+ # Website: https://www.vr-payment.de
8
+ # Developer email: ecosystem-team@wallee.com
9
+ #
10
+ # Licensed under the Apache License, Version 2.0 (the "License");
11
+ # you may not use this file except in compliance with the License.
12
+ # You may obtain a copy of the License at
13
+ #
14
+ # http://www.apache.org/licenses/LICENSE-2.0
15
+ #
16
+ # Unless required by applicable law or agreed to in writing, software
17
+ # distributed under the License is distributed on an "AS IS" BASIS,
18
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ # See the License for the specific language governing permissions and
20
+ # limitations under the License.
21
+ =end
22
+
23
+ require 'cgi'
24
+
25
+ module VrpaymentRubySdk
26
+ class AnalyticsQueriesService
27
+ attr_accessor :api_client
28
+
29
+
30
+ def initialize(api_client = ApiClient.default)
31
+ @api_client = api_client
32
+ end
33
+ # Cancel a query execution, identifying it by its external id.
34
+ # @param query_external_id [String] Identifies the query execution.
35
+ # @param account [Integer] Specifies the ID of the account the operation should be executed in.
36
+ # @param [Hash] opts the optional parameters
37
+ # @return [nil]
38
+ def delete_analytics_queries_query_external_id_query_external_id(query_external_id, account, opts = {})
39
+ delete_analytics_queries_query_external_id_query_external_id_with_http_info(query_external_id, account, opts)
40
+ nil
41
+ end
42
+
43
+ # Cancel a query execution, identifying it by its external id.
44
+
45
+ # @param query_external_id [String] Identifies the query execution.
46
+ # @param account [Integer] Specifies the ID of the account the operation should be executed in.
47
+ # @param [Hash] opts the optional parameters
48
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
49
+ def delete_analytics_queries_query_external_id_query_external_id_with_http_info(query_external_id, account, opts = {})
50
+ if @api_client.config.debugging
51
+ @api_client.config.logger.debug 'Calling API: AnalyticsQueriesService.delete_analytics_queries_query_external_id_query_external_id ...'
52
+ end
53
+ # verify the required parameter 'query_external_id' is set
54
+ if @api_client.config.client_side_validation && query_external_id.nil?
55
+ fail ArgumentError, "Missing the required parameter 'query_external_id' when calling AnalyticsQueriesService.delete_analytics_queries_query_external_id_query_external_id"
56
+ end
57
+ # verify the required parameter 'account' is set
58
+ if @api_client.config.client_side_validation && account.nil?
59
+ fail ArgumentError, "Missing the required parameter 'account' when calling AnalyticsQueriesService.delete_analytics_queries_query_external_id_query_external_id"
60
+ end
61
+ # resource path
62
+ local_var_path = '/analytics/queries/queryExternalId/{queryExternalId}'.sub('{' + 'queryExternalId' + '}', CGI.escape(query_external_id.to_s))
63
+
64
+ # query parameters
65
+ query_params = opts[:query_params] || {}
66
+
67
+ # header parameters
68
+ header_params = opts[:header_params] || {}
69
+ # HTTP header 'Accept' (if needed)
70
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
71
+ header_params[:'account'] = account
72
+
73
+ # form parameters
74
+ form_params = opts[:form_params] || {}
75
+
76
+ # connection timeout
77
+ connection_timeout = @api_client.config.timeout
78
+
79
+ # http body (model)
80
+ post_body = opts[:debug_body]
81
+
82
+ # return_type
83
+ return_type = opts[:debug_return_type]
84
+
85
+ new_options = opts.merge(
86
+ :operation => :"AnalyticsQueriesService.delete_analytics_queries_query_external_id_query_external_id",
87
+ :header_params => header_params,
88
+ :query_params => query_params,
89
+ :form_params => form_params,
90
+ :body => post_body,
91
+ :return_type => return_type
92
+ )
93
+
94
+ data, status_code, headers = @api_client.call_api(:DELETE.to_sym.downcase, local_var_path, new_options, connection_timeout)
95
+ if @api_client.config.debugging
96
+ @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}"
97
+ end
98
+ return data, status_code, headers
99
+ end
100
+
101
+
102
+ # Cancel a query execution, identifying it by its query token.
103
+ # @param query_token [String] Identifies the query execution.
104
+ # @param account [Integer] Specifies the ID of the account the operation should be executed in.
105
+ # @param [Hash] opts the optional parameters
106
+ # @return [nil]
107
+ def delete_analytics_queries_query_token_query_token(query_token, account, opts = {})
108
+ delete_analytics_queries_query_token_query_token_with_http_info(query_token, account, opts)
109
+ nil
110
+ end
111
+
112
+ # Cancel a query execution, identifying it by its query token.
113
+
114
+ # @param query_token [String] Identifies the query execution.
115
+ # @param account [Integer] Specifies the ID of the account the operation should be executed in.
116
+ # @param [Hash] opts the optional parameters
117
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
118
+ def delete_analytics_queries_query_token_query_token_with_http_info(query_token, account, opts = {})
119
+ if @api_client.config.debugging
120
+ @api_client.config.logger.debug 'Calling API: AnalyticsQueriesService.delete_analytics_queries_query_token_query_token ...'
121
+ end
122
+ # verify the required parameter 'query_token' is set
123
+ if @api_client.config.client_side_validation && query_token.nil?
124
+ fail ArgumentError, "Missing the required parameter 'query_token' when calling AnalyticsQueriesService.delete_analytics_queries_query_token_query_token"
125
+ end
126
+ # verify the required parameter 'account' is set
127
+ if @api_client.config.client_side_validation && account.nil?
128
+ fail ArgumentError, "Missing the required parameter 'account' when calling AnalyticsQueriesService.delete_analytics_queries_query_token_query_token"
129
+ end
130
+ # resource path
131
+ local_var_path = '/analytics/queries/queryToken/{queryToken}'.sub('{' + 'queryToken' + '}', CGI.escape(query_token.to_s))
132
+
133
+ # query parameters
134
+ query_params = opts[:query_params] || {}
135
+
136
+ # header parameters
137
+ header_params = opts[:header_params] || {}
138
+ # HTTP header 'Accept' (if needed)
139
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
140
+ header_params[:'account'] = account
141
+
142
+ # form parameters
143
+ form_params = opts[:form_params] || {}
144
+
145
+ # connection timeout
146
+ connection_timeout = @api_client.config.timeout
147
+
148
+ # http body (model)
149
+ post_body = opts[:debug_body]
150
+
151
+ # return_type
152
+ return_type = opts[:debug_return_type]
153
+
154
+ new_options = opts.merge(
155
+ :operation => :"AnalyticsQueriesService.delete_analytics_queries_query_token_query_token",
156
+ :header_params => header_params,
157
+ :query_params => query_params,
158
+ :form_params => form_params,
159
+ :body => post_body,
160
+ :return_type => return_type
161
+ )
162
+
163
+ data, status_code, headers = @api_client.call_api(:DELETE.to_sym.downcase, local_var_path, new_options, connection_timeout)
164
+ if @api_client.config.debugging
165
+ @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}"
166
+ end
167
+ return data, status_code, headers
168
+ end
169
+
170
+
171
+ # Get portion of query executions for account
172
+ # @param offset [Integer] A cursor for pagination, specifies the number of query executions to skip.
173
+ # @param limit [Integer] A limit on the number of query executions to be returned, between 1 and 100. Default is 100.
174
+ # @param account [Integer] Specifies the ID of the account the operation should be executed in.
175
+ # @param [Hash] opts the optional parameters
176
+ # @return [ResultPortionModel]
177
+ def get_analytics_queries(offset, limit, account, opts = {})
178
+ data, _status_code, _headers = get_analytics_queries_with_http_info(offset, limit, account, opts)
179
+ data
180
+ end
181
+
182
+ # Get portion of query executions for account
183
+
184
+ # @param offset [Integer] A cursor for pagination, specifies the number of query executions to skip.
185
+ # @param limit [Integer] A limit on the number of query executions to be returned, between 1 and 100. Default is 100.
186
+ # @param account [Integer] Specifies the ID of the account the operation should be executed in.
187
+ # @param [Hash] opts the optional parameters
188
+ # @return [Array<(ResultPortionModel, Integer, Hash)>] ResultPortionModel data, response status code and response headers
189
+ def get_analytics_queries_with_http_info(offset, limit, account, opts = {})
190
+ if @api_client.config.debugging
191
+ @api_client.config.logger.debug 'Calling API: AnalyticsQueriesService.get_analytics_queries ...'
192
+ end
193
+ # verify the required parameter 'offset' is set
194
+ if @api_client.config.client_side_validation && offset.nil?
195
+ fail ArgumentError, "Missing the required parameter 'offset' when calling AnalyticsQueriesService.get_analytics_queries"
196
+ end
197
+ # verify the required parameter 'limit' is set
198
+ if @api_client.config.client_side_validation && limit.nil?
199
+ fail ArgumentError, "Missing the required parameter 'limit' when calling AnalyticsQueriesService.get_analytics_queries"
200
+ end
201
+ # verify the required parameter 'account' is set
202
+ if @api_client.config.client_side_validation && account.nil?
203
+ fail ArgumentError, "Missing the required parameter 'account' when calling AnalyticsQueriesService.get_analytics_queries"
204
+ end
205
+ # resource path
206
+ local_var_path = '/analytics/queries'
207
+
208
+ # query parameters
209
+ query_params = opts[:query_params] || {}
210
+ query_params[:'offset'] = offset
211
+ query_params[:'limit'] = limit
212
+
213
+ # header parameters
214
+ header_params = opts[:header_params] || {}
215
+ # HTTP header 'Accept' (if needed)
216
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
217
+ header_params[:'account'] = account
218
+
219
+ # form parameters
220
+ form_params = opts[:form_params] || {}
221
+
222
+ # connection timeout
223
+ connection_timeout = @api_client.config.timeout
224
+
225
+ # http body (model)
226
+ post_body = opts[:debug_body]
227
+
228
+ # return_type
229
+ return_type = opts[:debug_return_type] || 'ResultPortionModel'
230
+
231
+ new_options = opts.merge(
232
+ :operation => :"AnalyticsQueriesService.get_analytics_queries",
233
+ :header_params => header_params,
234
+ :query_params => query_params,
235
+ :form_params => form_params,
236
+ :body => post_body,
237
+ :return_type => return_type
238
+ )
239
+
240
+ data, status_code, headers = @api_client.call_api(:GET.to_sym.downcase, local_var_path, new_options, connection_timeout)
241
+ if @api_client.config.debugging
242
+ @api_client.config.logger.debug "API called: AnalyticsQueriesService#get_analytics_queries\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
243
+ end
244
+ return data, status_code, headers
245
+ end
246
+
247
+
248
+ # Retrieve a query execution information by its external id
249
+ # Queries are processed asynchronously and may take several minutes to complete. Avoid frequent requests, as they will not speed up processing.
250
+ # @param query_external_id [String] Identifies the query execution.
251
+ # @param account [Integer] Specifies the ID of the account the operation should be executed in.
252
+ # @param [Hash] opts the optional parameters
253
+ # @return [SubmittedAnalyticsQueryExecution]
254
+ def get_analytics_queries_query_external_id_query_external_id(query_external_id, account, opts = {})
255
+ data, _status_code, _headers = get_analytics_queries_query_external_id_query_external_id_with_http_info(query_external_id, account, opts)
256
+ data
257
+ end
258
+
259
+ # Retrieve a query execution information by its external id
260
+ # Queries are processed asynchronously and may take several minutes to complete. Avoid frequent requests, as they will not speed up processing.
261
+ # Timeout for this request is: 97 seconds.
262
+ # @param query_external_id [String] Identifies the query execution.
263
+ # @param account [Integer] Specifies the ID of the account the operation should be executed in.
264
+ # @param [Hash] opts the optional parameters
265
+ # @return [Array<(SubmittedAnalyticsQueryExecution, Integer, Hash)>] SubmittedAnalyticsQueryExecution data, response status code and response headers
266
+ def get_analytics_queries_query_external_id_query_external_id_with_http_info(query_external_id, account, opts = {})
267
+ if @api_client.config.debugging
268
+ @api_client.config.logger.debug 'Calling API: AnalyticsQueriesService.get_analytics_queries_query_external_id_query_external_id ...'
269
+ end
270
+ # verify the required parameter 'query_external_id' is set
271
+ if @api_client.config.client_side_validation && query_external_id.nil?
272
+ fail ArgumentError, "Missing the required parameter 'query_external_id' when calling AnalyticsQueriesService.get_analytics_queries_query_external_id_query_external_id"
273
+ end
274
+ # verify the required parameter 'account' is set
275
+ if @api_client.config.client_side_validation && account.nil?
276
+ fail ArgumentError, "Missing the required parameter 'account' when calling AnalyticsQueriesService.get_analytics_queries_query_external_id_query_external_id"
277
+ end
278
+ # resource path
279
+ local_var_path = '/analytics/queries/queryExternalId/{queryExternalId}'.sub('{' + 'queryExternalId' + '}', CGI.escape(query_external_id.to_s))
280
+
281
+ # query parameters
282
+ query_params = opts[:query_params] || {}
283
+
284
+ # header parameters
285
+ header_params = opts[:header_params] || {}
286
+ # HTTP header 'Accept' (if needed)
287
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
288
+ header_params[:'account'] = account
289
+
290
+ # form parameters
291
+ form_params = opts[:form_params] || {}
292
+
293
+ # connection timeout
294
+ connection_timeout = 97
295
+
296
+ # http body (model)
297
+ post_body = opts[:debug_body]
298
+
299
+ # return_type
300
+ return_type = opts[:debug_return_type] || 'SubmittedAnalyticsQueryExecution'
301
+
302
+ new_options = opts.merge(
303
+ :operation => :"AnalyticsQueriesService.get_analytics_queries_query_external_id_query_external_id",
304
+ :header_params => header_params,
305
+ :query_params => query_params,
306
+ :form_params => form_params,
307
+ :body => post_body,
308
+ :return_type => return_type
309
+ )
310
+
311
+ data, status_code, headers = @api_client.call_api(:GET.to_sym.downcase, local_var_path, new_options, connection_timeout)
312
+ if @api_client.config.debugging
313
+ @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}"
314
+ end
315
+ return data, status_code, headers
316
+ end
317
+
318
+
319
+ # Generate a temporary URL to download the query result. It retrieves the query by its external id
320
+ # 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.
321
+ # @param query_external_id [String] Identifies the query execution.
322
+ # @param account [Integer] Specifies the ID of the account the operation should be executed in.
323
+ # @param [Hash] opts the optional parameters
324
+ # @return [String]
325
+ def get_analytics_queries_query_external_id_query_external_id_result(query_external_id, account, opts = {})
326
+ data, _status_code, _headers = get_analytics_queries_query_external_id_query_external_id_result_with_http_info(query_external_id, account, opts)
327
+ data
328
+ end
329
+
330
+ # Generate a temporary URL to download the query result. It retrieves the query by its external id
331
+ # 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 &#39;Retrieve a query execution&#39; endpoint for status checks.
332
+
333
+ # @param query_external_id [String] Identifies the query execution.
334
+ # @param account [Integer] Specifies the ID of the account the operation should be executed in.
335
+ # @param [Hash] opts the optional parameters
336
+ # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
337
+ def get_analytics_queries_query_external_id_query_external_id_result_with_http_info(query_external_id, account, opts = {})
338
+ if @api_client.config.debugging
339
+ @api_client.config.logger.debug 'Calling API: AnalyticsQueriesService.get_analytics_queries_query_external_id_query_external_id_result ...'
340
+ end
341
+ # verify the required parameter 'query_external_id' is set
342
+ if @api_client.config.client_side_validation && query_external_id.nil?
343
+ fail ArgumentError, "Missing the required parameter 'query_external_id' when calling AnalyticsQueriesService.get_analytics_queries_query_external_id_query_external_id_result"
344
+ end
345
+ # verify the required parameter 'account' is set
346
+ if @api_client.config.client_side_validation && account.nil?
347
+ fail ArgumentError, "Missing the required parameter 'account' when calling AnalyticsQueriesService.get_analytics_queries_query_external_id_query_external_id_result"
348
+ end
349
+ # resource path
350
+ local_var_path = '/analytics/queries/queryExternalId/{queryExternalId}/result'.sub('{' + 'queryExternalId' + '}', CGI.escape(query_external_id.to_s))
351
+
352
+ # query parameters
353
+ query_params = opts[:query_params] || {}
354
+
355
+ # header parameters
356
+ header_params = opts[:header_params] || {}
357
+ # HTTP header 'Accept' (if needed)
358
+ header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json']) unless header_params['Accept']
359
+ header_params[:'account'] = account
360
+
361
+ # form parameters
362
+ form_params = opts[:form_params] || {}
363
+
364
+ # connection timeout
365
+ connection_timeout = @api_client.config.timeout
366
+
367
+ # http body (model)
368
+ post_body = opts[:debug_body]
369
+
370
+ # return_type
371
+ return_type = opts[:debug_return_type] || 'String'
372
+
373
+ new_options = opts.merge(
374
+ :operation => :"AnalyticsQueriesService.get_analytics_queries_query_external_id_query_external_id_result",
375
+ :header_params => header_params,
376
+ :query_params => query_params,
377
+ :form_params => form_params,
378
+ :body => post_body,
379
+ :return_type => return_type
380
+ )
381
+
382
+ data, status_code, headers = @api_client.call_api(:GET.to_sym.downcase, local_var_path, new_options, connection_timeout)
383
+ if @api_client.config.debugging
384
+ @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}"
385
+ end
386
+ return data, status_code, headers
387
+ end
388
+
389
+
390
+ # Retrieve a query execution information by its query token
391
+ # Queries are processed asynchronously and may take several minutes to complete. Avoid frequent requests, as they will not speed up processing.
392
+ # @param query_token [String] Identifies the query execution.
393
+ # @param account [Integer] Specifies the ID of the account the operation should be executed in.
394
+ # @param [Hash] opts the optional parameters
395
+ # @return [SubmittedAnalyticsQueryExecution]
396
+ def get_analytics_queries_query_token_query_token(query_token, account, opts = {})
397
+ data, _status_code, _headers = get_analytics_queries_query_token_query_token_with_http_info(query_token, account, opts)
398
+ data
399
+ end
400
+
401
+ # Retrieve a query execution information by its query token
402
+ # Queries are processed asynchronously and may take several minutes to complete. Avoid frequent requests, as they will not speed up processing.
403
+ # Timeout for this request is: 97 seconds.
404
+ # @param query_token [String] Identifies the query execution.
405
+ # @param account [Integer] Specifies the ID of the account the operation should be executed in.
406
+ # @param [Hash] opts the optional parameters
407
+ # @return [Array<(SubmittedAnalyticsQueryExecution, Integer, Hash)>] SubmittedAnalyticsQueryExecution data, response status code and response headers
408
+ def get_analytics_queries_query_token_query_token_with_http_info(query_token, account, opts = {})
409
+ if @api_client.config.debugging
410
+ @api_client.config.logger.debug 'Calling API: AnalyticsQueriesService.get_analytics_queries_query_token_query_token ...'
411
+ end
412
+ # verify the required parameter 'query_token' is set
413
+ if @api_client.config.client_side_validation && query_token.nil?
414
+ fail ArgumentError, "Missing the required parameter 'query_token' when calling AnalyticsQueriesService.get_analytics_queries_query_token_query_token"
415
+ end
416
+ # verify the required parameter 'account' is set
417
+ if @api_client.config.client_side_validation && account.nil?
418
+ fail ArgumentError, "Missing the required parameter 'account' when calling AnalyticsQueriesService.get_analytics_queries_query_token_query_token"
419
+ end
420
+ # resource path
421
+ local_var_path = '/analytics/queries/queryToken/{queryToken}'.sub('{' + 'queryToken' + '}', CGI.escape(query_token.to_s))
422
+
423
+ # query parameters
424
+ query_params = opts[:query_params] || {}
425
+
426
+ # header parameters
427
+ header_params = opts[:header_params] || {}
428
+ # HTTP header 'Accept' (if needed)
429
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
430
+ header_params[:'account'] = account
431
+
432
+ # form parameters
433
+ form_params = opts[:form_params] || {}
434
+
435
+ # connection timeout
436
+ connection_timeout = 97
437
+
438
+ # http body (model)
439
+ post_body = opts[:debug_body]
440
+
441
+ # return_type
442
+ return_type = opts[:debug_return_type] || 'SubmittedAnalyticsQueryExecution'
443
+
444
+ new_options = opts.merge(
445
+ :operation => :"AnalyticsQueriesService.get_analytics_queries_query_token_query_token",
446
+ :header_params => header_params,
447
+ :query_params => query_params,
448
+ :form_params => form_params,
449
+ :body => post_body,
450
+ :return_type => return_type
451
+ )
452
+
453
+ data, status_code, headers = @api_client.call_api(:GET.to_sym.downcase, local_var_path, new_options, connection_timeout)
454
+ if @api_client.config.debugging
455
+ @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}"
456
+ end
457
+ return data, status_code, headers
458
+ end
459
+
460
+
461
+ # Generate a temporary URL to download the query result. It retrieves the query by its query token
462
+ # 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.
463
+ # @param query_token [String] Identifies the query execution.
464
+ # @param account [Integer] Specifies the ID of the account the operation should be executed in.
465
+ # @param [Hash] opts the optional parameters
466
+ # @return [String]
467
+ def get_analytics_queries_query_token_query_token_result(query_token, account, opts = {})
468
+ data, _status_code, _headers = get_analytics_queries_query_token_query_token_result_with_http_info(query_token, account, opts)
469
+ data
470
+ end
471
+
472
+ # Generate a temporary URL to download the query result. It retrieves the query by its query token
473
+ # 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 &#39;Retrieve a query execution&#39; endpoint for status checks.
474
+
475
+ # @param query_token [String] Identifies the query execution.
476
+ # @param account [Integer] Specifies the ID of the account the operation should be executed in.
477
+ # @param [Hash] opts the optional parameters
478
+ # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
479
+ def get_analytics_queries_query_token_query_token_result_with_http_info(query_token, account, opts = {})
480
+ if @api_client.config.debugging
481
+ @api_client.config.logger.debug 'Calling API: AnalyticsQueriesService.get_analytics_queries_query_token_query_token_result ...'
482
+ end
483
+ # verify the required parameter 'query_token' is set
484
+ if @api_client.config.client_side_validation && query_token.nil?
485
+ fail ArgumentError, "Missing the required parameter 'query_token' when calling AnalyticsQueriesService.get_analytics_queries_query_token_query_token_result"
486
+ end
487
+ # verify the required parameter 'account' is set
488
+ if @api_client.config.client_side_validation && account.nil?
489
+ fail ArgumentError, "Missing the required parameter 'account' when calling AnalyticsQueriesService.get_analytics_queries_query_token_query_token_result"
490
+ end
491
+ # resource path
492
+ local_var_path = '/analytics/queries/queryToken/{queryToken}/result'.sub('{' + 'queryToken' + '}', CGI.escape(query_token.to_s))
493
+
494
+ # query parameters
495
+ query_params = opts[:query_params] || {}
496
+
497
+ # header parameters
498
+ header_params = opts[:header_params] || {}
499
+ # HTTP header 'Accept' (if needed)
500
+ header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json']) unless header_params['Accept']
501
+ header_params[:'account'] = account
502
+
503
+ # form parameters
504
+ form_params = opts[:form_params] || {}
505
+
506
+ # connection timeout
507
+ connection_timeout = @api_client.config.timeout
508
+
509
+ # http body (model)
510
+ post_body = opts[:debug_body]
511
+
512
+ # return_type
513
+ return_type = opts[:debug_return_type] || 'String'
514
+
515
+ new_options = opts.merge(
516
+ :operation => :"AnalyticsQueriesService.get_analytics_queries_query_token_query_token_result",
517
+ :header_params => header_params,
518
+ :query_params => query_params,
519
+ :form_params => form_params,
520
+ :body => post_body,
521
+ :return_type => return_type
522
+ )
523
+
524
+ data, status_code, headers = @api_client.call_api(:GET.to_sym.downcase, local_var_path, new_options, connection_timeout)
525
+ if @api_client.config.debugging
526
+ @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}"
527
+ end
528
+ return data, status_code, headers
529
+ end
530
+
531
+
532
+ # Submit a query execution
533
+ # @param 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
534
+ # @param account [Integer] Specifies the ID of the account the operation should be executed in.
535
+ # @param analytics_query_execution_request [AnalyticsQueryExecutionRequest]
536
+ # @param [Hash] opts the optional parameters
537
+ # @return [AnalyticsQueryExecutionResponse]
538
+ def post_analytics_queries_submit(query_external_id, account, analytics_query_execution_request, opts = {})
539
+ data, _status_code, _headers = post_analytics_queries_submit_with_http_info(query_external_id, account, analytics_query_execution_request, opts)
540
+ data
541
+ end
542
+
543
+ # Submit a query execution
544
+
545
+ # @param 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
546
+ # @param account [Integer] Specifies the ID of the account the operation should be executed in.
547
+ # @param analytics_query_execution_request [AnalyticsQueryExecutionRequest]
548
+ # @param [Hash] opts the optional parameters
549
+ # @return [Array<(AnalyticsQueryExecutionResponse, Integer, Hash)>] AnalyticsQueryExecutionResponse data, response status code and response headers
550
+ def post_analytics_queries_submit_with_http_info(query_external_id, account, analytics_query_execution_request, opts = {})
551
+ if @api_client.config.debugging
552
+ @api_client.config.logger.debug 'Calling API: AnalyticsQueriesService.post_analytics_queries_submit ...'
553
+ end
554
+ # verify the required parameter 'query_external_id' is set
555
+ if @api_client.config.client_side_validation && query_external_id.nil?
556
+ fail ArgumentError, "Missing the required parameter 'query_external_id' when calling AnalyticsQueriesService.post_analytics_queries_submit"
557
+ end
558
+ # verify the required parameter 'account' is set
559
+ if @api_client.config.client_side_validation && account.nil?
560
+ fail ArgumentError, "Missing the required parameter 'account' when calling AnalyticsQueriesService.post_analytics_queries_submit"
561
+ end
562
+ # verify the required parameter 'analytics_query_execution_request' is set
563
+ if @api_client.config.client_side_validation && analytics_query_execution_request.nil?
564
+ fail ArgumentError, "Missing the required parameter 'analytics_query_execution_request' when calling AnalyticsQueriesService.post_analytics_queries_submit"
565
+ end
566
+ # resource path
567
+ local_var_path = '/analytics/queries/submit'
568
+
569
+ # query parameters
570
+ query_params = opts[:query_params] || {}
571
+ query_params[:'queryExternalId'] = query_external_id
572
+
573
+ # header parameters
574
+ header_params = opts[:header_params] || {}
575
+ # HTTP header 'Accept' (if needed)
576
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
577
+ # HTTP header 'Content-Type'
578
+ content_type = @api_client.select_header_content_type(['application/json'])
579
+ if !content_type.nil?
580
+ header_params['Content-Type'] = content_type
581
+ end
582
+ header_params[:'account'] = account
583
+
584
+ # form parameters
585
+ form_params = opts[:form_params] || {}
586
+
587
+ # connection timeout
588
+ connection_timeout = @api_client.config.timeout
589
+
590
+ # http body (model)
591
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(analytics_query_execution_request)
592
+
593
+ # return_type
594
+ return_type = opts[:debug_return_type] || 'AnalyticsQueryExecutionResponse'
595
+
596
+ new_options = opts.merge(
597
+ :operation => :"AnalyticsQueriesService.post_analytics_queries_submit",
598
+ :header_params => header_params,
599
+ :query_params => query_params,
600
+ :form_params => form_params,
601
+ :body => post_body,
602
+ :return_type => return_type
603
+ )
604
+
605
+ data, status_code, headers = @api_client.call_api(:POST.to_sym.downcase, local_var_path, new_options, connection_timeout)
606
+ if @api_client.config.debugging
607
+ @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}"
608
+ end
609
+ return data, status_code, headers
610
+ end
611
+
612
+ end
613
+ end