composio 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +11 -0
- data/Gemfile.lock +93 -0
- data/README.md +1779 -0
- data/Rakefile +10 -0
- data/composio.gemspec +39 -0
- data/header.png +0 -0
- data/lib/composio/api/actions_api.rb +1062 -0
- data/lib/composio/api/api_keys_api.rb +268 -0
- data/lib/composio/api/apps_api.rb +266 -0
- data/lib/composio/api/auth_api.rb +370 -0
- data/lib/composio/api/cli_api.rb +266 -0
- data/lib/composio/api/connections_api.rb +591 -0
- data/lib/composio/api/integrations_api.rb +578 -0
- data/lib/composio/api/logs_api.rb +166 -0
- data/lib/composio/api/metadata_api.rb +180 -0
- data/lib/composio/api/team_api.rb +188 -0
- data/lib/composio/api/triggers_api.rb +1222 -0
- data/lib/composio/api_client.rb +436 -0
- data/lib/composio/api_client_custom.rb +14 -0
- data/lib/composio/api_error.rb +53 -0
- data/lib/composio/configuration.rb +330 -0
- data/lib/composio/models/action_details.rb +357 -0
- data/lib/composio/models/action_details_minimal.rb +329 -0
- data/lib/composio/models/action_execution_req_dto.rb +260 -0
- data/lib/composio/models/action_execution_res_dto.rb +238 -0
- data/lib/composio/models/action_log_data.rb +345 -0
- data/lib/composio/models/action_metadata.rb +402 -0
- data/lib/composio/models/action_metadata_type.rb +101 -0
- data/lib/composio/models/actions_controller_v1.rb +222 -0
- data/lib/composio/models/actions_list_response_dto.rb +250 -0
- data/lib/composio/models/actions_minimal_list_response_dto.rb +250 -0
- data/lib/composio/models/actions_query_dto.rb +300 -0
- data/lib/composio/models/active_trigger_instance.rb +311 -0
- data/lib/composio/models/active_triggers_res_dto.rb +238 -0
- data/lib/composio/models/add_repo_url_req_dto.rb +221 -0
- data/lib/composio/models/add_repo_url_res_dto.rb +221 -0
- data/lib/composio/models/add_tools_req_dto.rb +251 -0
- data/lib/composio/models/add_tools_request_dto.rb +251 -0
- data/lib/composio/models/api_key_res_dto.rb +323 -0
- data/lib/composio/models/app_info_response_dto.rb +323 -0
- data/lib/composio/models/app_list_res_dto.rb +238 -0
- data/lib/composio/models/app_query_dto.rb +216 -0
- data/lib/composio/models/auth_config_dto.rb +229 -0
- data/lib/composio/models/cli_query_dto.rb +231 -0
- data/lib/composio/models/connected_account_response_dto.rb +331 -0
- data/lib/composio/models/connection_params.rb +395 -0
- data/lib/composio/models/connection_params_for_account.rb +323 -0
- data/lib/composio/models/connection_params_headers.rb +224 -0
- data/lib/composio/models/connection_with_app_data.rb +358 -0
- data/lib/composio/models/connection_with_app_data_created_at.rb +101 -0
- data/lib/composio/models/connector_list_item_dto.rb +376 -0
- data/lib/composio/models/connector_list_item_dto_created_at.rb +102 -0
- data/lib/composio/models/connector_list_item_dto_updated_at.rb +102 -0
- data/lib/composio/models/create_connector_payload_dto.rb +274 -0
- data/lib/composio/models/create_connector_payload_dto_use_composio_auth.rb +226 -0
- data/lib/composio/models/delete_api_key_req_dto.rb +221 -0
- data/lib/composio/models/delete_api_key_response_dto.rb +221 -0
- data/lib/composio/models/delete_row_apidto.rb +236 -0
- data/lib/composio/models/delete_tools_req_dto.rb +221 -0
- data/lib/composio/models/delete_tools_res_dto.rb +221 -0
- data/lib/composio/models/direct_execute_req_dto.rb +262 -0
- data/lib/composio/models/enable_trigger_body_dto.rb +221 -0
- data/lib/composio/models/enable_trigger_params_dto.rb +236 -0
- data/lib/composio/models/execute_action_res_dto.rb +236 -0
- data/lib/composio/models/generate_api_key_req_dto.rb +221 -0
- data/lib/composio/models/generate_cli_session_req_dto.rb +221 -0
- data/lib/composio/models/generate_cli_session_res_dto.rb +221 -0
- data/lib/composio/models/get_active_triggers_query_dto.rb +276 -0
- data/lib/composio/models/get_cli_session_res_dto.rb +236 -0
- data/lib/composio/models/get_connections_query_dto.rb +287 -0
- data/lib/composio/models/get_connections_response_dto.rb +250 -0
- data/lib/composio/models/get_connections_result.rb +236 -0
- data/lib/composio/models/get_connector_info_res_dto.rb +417 -0
- data/lib/composio/models/get_connector_list_res_dto.rb +253 -0
- data/lib/composio/models/get_logs_dto.rb +288 -0
- data/lib/composio/models/get_logs_query_dto.rb +246 -0
- data/lib/composio/models/get_trigger_params_dto.rb +221 -0
- data/lib/composio/models/get_trigger_response_dto.rb +230 -0
- data/lib/composio/models/handle_trigger_body_dto.rb +221 -0
- data/lib/composio/models/handle_trigger_params_dto.rb +236 -0
- data/lib/composio/models/identify_client_req_dto.rb +231 -0
- data/lib/composio/models/identify_client_res_dto.rb +251 -0
- data/lib/composio/models/initiate_connection_payload_dto.rb +281 -0
- data/lib/composio/models/initiate_connection_response.rb +272 -0
- data/lib/composio/models/invite_member_req_dto.rb +251 -0
- data/lib/composio/models/job_status.rb +37 -0
- data/lib/composio/models/list_triggers_query_dto.rb +246 -0
- data/lib/composio/models/logout_res_dto.rb +221 -0
- data/lib/composio/models/logs_res_dto.rb +233 -0
- data/lib/composio/models/magic_link_req_dto.rb +236 -0
- data/lib/composio/models/magic_link_res_dto.rb +220 -0
- data/lib/composio/models/member_res_dto.rb +305 -0
- data/lib/composio/models/meta.rb +220 -0
- data/lib/composio/models/meta_app.rb +220 -0
- data/lib/composio/models/metadata_query_dto.rb +221 -0
- data/lib/composio/models/metadata_req_dto.rb +232 -0
- data/lib/composio/models/o_auth2_callback_query_dto.rb +220 -0
- data/lib/composio/models/open_api_spec_list_res_dto.rb +436 -0
- data/lib/composio/models/page_info.rb +338 -0
- data/lib/composio/models/page_info_dto.rb +248 -0
- data/lib/composio/models/patch_connector_req_dto.rb +226 -0
- data/lib/composio/models/patch_connector_res_dto.rb +221 -0
- data/lib/composio/models/proxy_execution_req_dto.rb +234 -0
- data/lib/composio/models/redirect_uri_dto.rb +215 -0
- data/lib/composio/models/set_callback_url_body_dto.rb +221 -0
- data/lib/composio/models/single_app_info_res_dto.rb +394 -0
- data/lib/composio/models/single_trigger_res_dto.rb +336 -0
- data/lib/composio/models/status.rb +37 -0
- data/lib/composio/models/switch_trigger_status_body_dto.rb +221 -0
- data/lib/composio/models/switch_trigger_status_params_dto.rb +221 -0
- data/lib/composio/models/time.rb +41 -0
- data/lib/composio/models/toggle_connected_account_response_dto.rb +220 -0
- data/lib/composio/models/toggle_trigger_state_response_dto.rb +220 -0
- data/lib/composio/models/tools_execute_req_dto.rb +275 -0
- data/lib/composio/models/track_client_req_dto.rb +240 -0
- data/lib/composio/models/track_client_res_dto.rb +221 -0
- data/lib/composio/models/trigger_config.rb +237 -0
- data/lib/composio/models/trigger_instance_params_dto.rb +221 -0
- data/lib/composio/models/trigger_log_data.rb +345 -0
- data/lib/composio/models/trigger_log_item_dto.rb +336 -0
- data/lib/composio/models/trigger_logs_res_dto.rb +236 -0
- data/lib/composio/models/trigger_metadata.rb +402 -0
- data/lib/composio/models/trigger_metadata_dto.rb +347 -0
- data/lib/composio/models/trigger_metadata_type.rb +101 -0
- data/lib/composio/models/trigger_res_dto.rb +361 -0
- data/lib/composio/models/trigger_response_dto.rb +241 -0
- data/lib/composio/models/trigger_toggle_info_response_dto.rb +221 -0
- data/lib/composio/models/triggers_enabled_toggle_req_dto.rb +221 -0
- data/lib/composio/models/triggers_enabled_toggle_res_dto.rb +221 -0
- data/lib/composio/models/type.rb +37 -0
- data/lib/composio/models/user_git_user_info.rb +230 -0
- data/lib/composio/models/verify_cli_code_res_dto.rb +251 -0
- data/lib/composio/models/verify_magic_link_data_dto.rb +263 -0
- data/lib/composio/models/verify_magic_link_req_dto.rb +221 -0
- data/lib/composio/models/verify_magic_link_res_dto.rb +230 -0
- data/lib/composio/models/webhook_url_response_dto.rb +231 -0
- data/lib/composio/version.rb +11 -0
- data/lib/composio.rb +214 -0
- data/spec/api/actions_api_spec.rb +164 -0
- data/spec/api/api_keys_api_spec.rb +61 -0
- data/spec/api/apps_api_spec.rb +63 -0
- data/spec/api/auth_api_spec.rb +73 -0
- data/spec/api/cli_api_spec.rb +63 -0
- data/spec/api/connections_api_spec.rb +103 -0
- data/spec/api/integrations_api_spec.rb +96 -0
- data/spec/api/logs_api_spec.rb +48 -0
- data/spec/api/metadata_api_spec.rb +50 -0
- data/spec/api/team_api_spec.rb +50 -0
- data/spec/api/triggers_api_spec.rb +188 -0
- data/spec/api_client_spec.rb +191 -0
- data/spec/configuration_spec.rb +38 -0
- data/spec/models/action_details_minimal_spec.rb +76 -0
- data/spec/models/action_details_spec.rb +88 -0
- data/spec/models/action_execution_req_dto_spec.rb +58 -0
- data/spec/models/action_execution_res_dto_spec.rb +40 -0
- data/spec/models/action_log_data_spec.rb +70 -0
- data/spec/models/action_metadata_spec.rb +88 -0
- data/spec/models/action_metadata_type_spec.rb +25 -0
- data/spec/models/actions_controller_v1_spec.rb +28 -0
- data/spec/models/actions_list_response_dto_spec.rb +40 -0
- data/spec/models/actions_minimal_list_response_dto_spec.rb +40 -0
- data/spec/models/actions_query_dto_spec.rb +82 -0
- data/spec/models/active_trigger_instance_spec.rb +70 -0
- data/spec/models/active_triggers_res_dto_spec.rb +34 -0
- data/spec/models/add_repo_url_req_dto_spec.rb +28 -0
- data/spec/models/add_repo_url_res_dto_spec.rb +28 -0
- data/spec/models/add_tools_req_dto_spec.rb +40 -0
- data/spec/models/add_tools_request_dto_spec.rb +40 -0
- data/spec/models/api_key_res_dto_spec.rb +52 -0
- data/spec/models/app_info_response_dto_spec.rb +70 -0
- data/spec/models/app_list_res_dto_spec.rb +34 -0
- data/spec/models/app_query_dto_spec.rb +28 -0
- data/spec/models/auth_config_dto_spec.rb +34 -0
- data/spec/models/cli_query_dto_spec.rb +34 -0
- data/spec/models/connected_account_response_dto_spec.rb +82 -0
- data/spec/models/connection_params_for_account_spec.rb +100 -0
- data/spec/models/connection_params_headers_spec.rb +34 -0
- data/spec/models/connection_params_spec.rb +118 -0
- data/spec/models/connection_with_app_data_created_at_spec.rb +25 -0
- data/spec/models/connection_with_app_data_spec.rb +100 -0
- data/spec/models/connector_list_item_dto_created_at_spec.rb +25 -0
- data/spec/models/connector_list_item_dto_spec.rb +94 -0
- data/spec/models/connector_list_item_dto_updated_at_spec.rb +25 -0
- data/spec/models/create_connector_payload_dto_spec.rb +58 -0
- data/spec/models/create_connector_payload_dto_use_composio_auth_spec.rb +22 -0
- data/spec/models/delete_api_key_req_dto_spec.rb +28 -0
- data/spec/models/delete_api_key_response_dto_spec.rb +28 -0
- data/spec/models/delete_row_apidto_spec.rb +34 -0
- data/spec/models/delete_tools_req_dto_spec.rb +28 -0
- data/spec/models/delete_tools_res_dto_spec.rb +28 -0
- data/spec/models/direct_execute_req_dto_spec.rb +46 -0
- data/spec/models/enable_trigger_body_dto_spec.rb +28 -0
- data/spec/models/enable_trigger_params_dto_spec.rb +34 -0
- data/spec/models/execute_action_res_dto_spec.rb +34 -0
- data/spec/models/generate_api_key_req_dto_spec.rb +28 -0
- data/spec/models/generate_cli_session_req_dto_spec.rb +28 -0
- data/spec/models/generate_cli_session_res_dto_spec.rb +28 -0
- data/spec/models/get_active_triggers_query_dto_spec.rb +64 -0
- data/spec/models/get_cli_session_res_dto_spec.rb +34 -0
- data/spec/models/get_connections_query_dto_spec.rb +76 -0
- data/spec/models/get_connections_response_dto_spec.rb +40 -0
- data/spec/models/get_connections_result_spec.rb +34 -0
- data/spec/models/get_connector_info_res_dto_spec.rb +106 -0
- data/spec/models/get_connector_list_res_dto_spec.rb +40 -0
- data/spec/models/get_logs_dto_spec.rb +70 -0
- data/spec/models/get_logs_query_dto_spec.rb +46 -0
- data/spec/models/get_trigger_params_dto_spec.rb +28 -0
- data/spec/models/get_trigger_response_dto_spec.rb +34 -0
- data/spec/models/handle_trigger_body_dto_spec.rb +28 -0
- data/spec/models/handle_trigger_params_dto_spec.rb +34 -0
- data/spec/models/identify_client_req_dto_spec.rb +34 -0
- data/spec/models/identify_client_res_dto_spec.rb +40 -0
- data/spec/models/initiate_connection_payload_dto_spec.rb +46 -0
- data/spec/models/initiate_connection_response_spec.rb +34 -0
- data/spec/models/invite_member_req_dto_spec.rb +40 -0
- data/spec/models/job_status_spec.rb +22 -0
- data/spec/models/list_triggers_query_dto_spec.rb +46 -0
- data/spec/models/logout_res_dto_spec.rb +28 -0
- data/spec/models/logs_res_dto_spec.rb +34 -0
- data/spec/models/magic_link_req_dto_spec.rb +34 -0
- data/spec/models/magic_link_res_dto_spec.rb +28 -0
- data/spec/models/member_res_dto_spec.rb +52 -0
- data/spec/models/meta_app_spec.rb +28 -0
- data/spec/models/meta_spec.rb +28 -0
- data/spec/models/metadata_query_dto_spec.rb +28 -0
- data/spec/models/metadata_req_dto_spec.rb +34 -0
- data/spec/models/o_auth2_callback_query_dto_spec.rb +28 -0
- data/spec/models/open_api_spec_list_res_dto_spec.rb +94 -0
- data/spec/models/page_info_dto_spec.rb +40 -0
- data/spec/models/page_info_spec.rb +46 -0
- data/spec/models/patch_connector_req_dto_spec.rb +34 -0
- data/spec/models/patch_connector_res_dto_spec.rb +28 -0
- data/spec/models/proxy_execution_req_dto_spec.rb +34 -0
- data/spec/models/redirect_uri_dto_spec.rb +28 -0
- data/spec/models/set_callback_url_body_dto_spec.rb +28 -0
- data/spec/models/single_app_info_res_dto_spec.rb +118 -0
- data/spec/models/single_trigger_res_dto_spec.rb +76 -0
- data/spec/models/status_spec.rb +22 -0
- data/spec/models/switch_trigger_status_body_dto_spec.rb +28 -0
- data/spec/models/switch_trigger_status_params_dto_spec.rb +28 -0
- data/spec/models/time_spec.rb +22 -0
- data/spec/models/toggle_connected_account_response_dto_spec.rb +28 -0
- data/spec/models/toggle_trigger_state_response_dto_spec.rb +28 -0
- data/spec/models/tools_execute_req_dto_spec.rb +58 -0
- data/spec/models/track_client_req_dto_spec.rb +40 -0
- data/spec/models/track_client_res_dto_spec.rb +28 -0
- data/spec/models/trigger_config_spec.rb +34 -0
- data/spec/models/trigger_instance_params_dto_spec.rb +28 -0
- data/spec/models/trigger_log_data_spec.rb +70 -0
- data/spec/models/trigger_log_item_dto_spec.rb +82 -0
- data/spec/models/trigger_logs_res_dto_spec.rb +34 -0
- data/spec/models/trigger_metadata_dto_spec.rb +82 -0
- data/spec/models/trigger_metadata_spec.rb +94 -0
- data/spec/models/trigger_metadata_type_spec.rb +25 -0
- data/spec/models/trigger_res_dto_spec.rb +100 -0
- data/spec/models/trigger_response_dto_spec.rb +40 -0
- data/spec/models/trigger_toggle_info_response_dto_spec.rb +28 -0
- data/spec/models/triggers_enabled_toggle_req_dto_spec.rb +28 -0
- data/spec/models/triggers_enabled_toggle_res_dto_spec.rb +28 -0
- data/spec/models/type_spec.rb +22 -0
- data/spec/models/user_git_user_info_spec.rb +34 -0
- data/spec/models/verify_cli_code_res_dto_spec.rb +40 -0
- data/spec/models/verify_magic_link_data_dto_spec.rb +46 -0
- data/spec/models/verify_magic_link_req_dto_spec.rb +28 -0
- data/spec/models/verify_magic_link_res_dto_spec.rb +34 -0
- data/spec/models/webhook_url_response_dto_spec.rb +34 -0
- data/spec/simple_test_spec.rb +52 -0
- data/spec/spec_helper.rb +107 -0
- metadata +504 -0
@@ -0,0 +1,1222 @@
|
|
1
|
+
=begin
|
2
|
+
#Composio OpenAPI
|
3
|
+
|
4
|
+
#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
=end
|
8
|
+
|
9
|
+
require 'cgi'
|
10
|
+
|
11
|
+
module Composio
|
12
|
+
class TriggersApi
|
13
|
+
attr_accessor :api_client
|
14
|
+
|
15
|
+
def initialize(api_client = ApiClient.default)
|
16
|
+
@api_client = api_client
|
17
|
+
end
|
18
|
+
|
19
|
+
# Delete trigger
|
20
|
+
#
|
21
|
+
# Deletes a specified trigger instance.
|
22
|
+
#
|
23
|
+
# @param trigger_instance_id [String]
|
24
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
25
|
+
def delete_trigger_instance(trigger_instance_id:, extra: {})
|
26
|
+
api_response = delete_trigger_instance_with_http_info_impl(trigger_instance_id, extra)
|
27
|
+
api_response.data
|
28
|
+
end
|
29
|
+
|
30
|
+
# Delete trigger
|
31
|
+
#
|
32
|
+
# Deletes a specified trigger instance.
|
33
|
+
#
|
34
|
+
# @param trigger_instance_id [String]
|
35
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
36
|
+
def delete_trigger_instance_with_http_info(trigger_instance_id:, extra: {})
|
37
|
+
delete_trigger_instance_with_http_info_impl(trigger_instance_id, extra)
|
38
|
+
end
|
39
|
+
|
40
|
+
# Delete trigger
|
41
|
+
# Deletes a specified trigger instance.
|
42
|
+
# @param trigger_instance_id [String]
|
43
|
+
# @param [Hash] opts the optional parameters
|
44
|
+
# @return [DeleteRowAPIDTO]
|
45
|
+
private def delete_trigger_instance_impl(trigger_instance_id, opts = {})
|
46
|
+
data, _status_code, _headers = delete_trigger_instance_with_http_info(trigger_instance_id, opts)
|
47
|
+
data
|
48
|
+
end
|
49
|
+
|
50
|
+
# Delete trigger
|
51
|
+
# Deletes a specified trigger instance.
|
52
|
+
# @param trigger_instance_id [String]
|
53
|
+
# @param [Hash] opts the optional parameters
|
54
|
+
# @return [APIResponse] data is DeleteRowAPIDTO, status code, headers and response
|
55
|
+
private def delete_trigger_instance_with_http_info_impl(trigger_instance_id, opts = {})
|
56
|
+
if @api_client.config.debugging
|
57
|
+
@api_client.config.logger.debug 'Calling API: TriggersApi.delete_trigger_instance ...'
|
58
|
+
end
|
59
|
+
# verify the required parameter 'trigger_instance_id' is set
|
60
|
+
if @api_client.config.client_side_validation && trigger_instance_id.nil?
|
61
|
+
fail ArgumentError, "Missing the required parameter 'trigger_instance_id' when calling TriggersApi.delete_trigger_instance"
|
62
|
+
end
|
63
|
+
pattern = Regexp.new(/[^\/#\?]+?/)
|
64
|
+
if @api_client.config.client_side_validation && trigger_instance_id !~ pattern
|
65
|
+
fail ArgumentError, "invalid value for 'trigger_instance_id' when calling TriggersApi.delete_trigger_instance, must conform to the pattern #{pattern}."
|
66
|
+
end
|
67
|
+
|
68
|
+
# resource path
|
69
|
+
local_var_path = '/api/v1/triggers/instance/{triggerInstanceId}'.sub('{' + 'triggerInstanceId' + '}', CGI.escape(trigger_instance_id.to_s))
|
70
|
+
|
71
|
+
# query parameters
|
72
|
+
query_params = opts[:query_params] || {}
|
73
|
+
|
74
|
+
# header parameters
|
75
|
+
header_params = opts[:header_params] || {}
|
76
|
+
# HTTP header 'Accept' (if needed)
|
77
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
78
|
+
|
79
|
+
# form parameters
|
80
|
+
form_params = opts[:form_params] || {}
|
81
|
+
|
82
|
+
# http body (model)
|
83
|
+
post_body = opts[:debug_body]
|
84
|
+
|
85
|
+
# return_type
|
86
|
+
return_type = opts[:debug_return_type] || 'DeleteRowAPIDTO'
|
87
|
+
|
88
|
+
# auth_names
|
89
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
90
|
+
|
91
|
+
new_options = opts.merge(
|
92
|
+
:operation => :"TriggersApi.delete_trigger_instance",
|
93
|
+
:header_params => header_params,
|
94
|
+
:query_params => query_params,
|
95
|
+
:form_params => form_params,
|
96
|
+
:body => post_body,
|
97
|
+
:auth_names => auth_names,
|
98
|
+
:return_type => return_type
|
99
|
+
)
|
100
|
+
|
101
|
+
data, status_code, headers, response = @api_client.call_api(:DELETE, local_var_path, new_options)
|
102
|
+
if @api_client.config.debugging
|
103
|
+
@api_client.config.logger.debug "API called: TriggersApi#delete_trigger_instance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
104
|
+
end
|
105
|
+
APIResponse::new(data, status_code, headers, response)
|
106
|
+
end
|
107
|
+
|
108
|
+
|
109
|
+
# Disable trigger
|
110
|
+
#
|
111
|
+
# Disables a specified trigger instance.
|
112
|
+
#
|
113
|
+
# @param trigger_instance_id [String]
|
114
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
115
|
+
def disable_trigger_instance(trigger_instance_id:, extra: {})
|
116
|
+
api_response = disable_trigger_instance_with_http_info_impl(trigger_instance_id, extra)
|
117
|
+
api_response.data
|
118
|
+
end
|
119
|
+
|
120
|
+
# Disable trigger
|
121
|
+
#
|
122
|
+
# Disables a specified trigger instance.
|
123
|
+
#
|
124
|
+
# @param trigger_instance_id [String]
|
125
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
126
|
+
def disable_trigger_instance_with_http_info(trigger_instance_id:, extra: {})
|
127
|
+
disable_trigger_instance_with_http_info_impl(trigger_instance_id, extra)
|
128
|
+
end
|
129
|
+
|
130
|
+
# Disable trigger
|
131
|
+
# Disables a specified trigger instance.
|
132
|
+
# @param trigger_instance_id [String]
|
133
|
+
# @param [Hash] opts the optional parameters
|
134
|
+
# @return [TriggerResponseDTO]
|
135
|
+
private def disable_trigger_instance_impl(trigger_instance_id, opts = {})
|
136
|
+
data, _status_code, _headers = disable_trigger_instance_with_http_info(trigger_instance_id, opts)
|
137
|
+
data
|
138
|
+
end
|
139
|
+
|
140
|
+
# Disable trigger
|
141
|
+
# Disables a specified trigger instance.
|
142
|
+
# @param trigger_instance_id [String]
|
143
|
+
# @param [Hash] opts the optional parameters
|
144
|
+
# @return [APIResponse] data is TriggerResponseDTO, status code, headers and response
|
145
|
+
private def disable_trigger_instance_with_http_info_impl(trigger_instance_id, opts = {})
|
146
|
+
if @api_client.config.debugging
|
147
|
+
@api_client.config.logger.debug 'Calling API: TriggersApi.disable_trigger_instance ...'
|
148
|
+
end
|
149
|
+
# verify the required parameter 'trigger_instance_id' is set
|
150
|
+
if @api_client.config.client_side_validation && trigger_instance_id.nil?
|
151
|
+
fail ArgumentError, "Missing the required parameter 'trigger_instance_id' when calling TriggersApi.disable_trigger_instance"
|
152
|
+
end
|
153
|
+
pattern = Regexp.new(/[^\/#\?]+?/)
|
154
|
+
if @api_client.config.client_side_validation && trigger_instance_id !~ pattern
|
155
|
+
fail ArgumentError, "invalid value for 'trigger_instance_id' when calling TriggersApi.disable_trigger_instance, must conform to the pattern #{pattern}."
|
156
|
+
end
|
157
|
+
|
158
|
+
# resource path
|
159
|
+
local_var_path = '/api/v1/triggers/disable/{triggerInstanceId}'.sub('{' + 'triggerInstanceId' + '}', CGI.escape(trigger_instance_id.to_s))
|
160
|
+
|
161
|
+
# query parameters
|
162
|
+
query_params = opts[:query_params] || {}
|
163
|
+
|
164
|
+
# header parameters
|
165
|
+
header_params = opts[:header_params] || {}
|
166
|
+
# HTTP header 'Accept' (if needed)
|
167
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
168
|
+
|
169
|
+
# form parameters
|
170
|
+
form_params = opts[:form_params] || {}
|
171
|
+
|
172
|
+
# http body (model)
|
173
|
+
post_body = opts[:debug_body]
|
174
|
+
|
175
|
+
# return_type
|
176
|
+
return_type = opts[:debug_return_type] || 'TriggerResponseDTO'
|
177
|
+
|
178
|
+
# auth_names
|
179
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
180
|
+
|
181
|
+
new_options = opts.merge(
|
182
|
+
:operation => :"TriggersApi.disable_trigger_instance",
|
183
|
+
:header_params => header_params,
|
184
|
+
:query_params => query_params,
|
185
|
+
:form_params => form_params,
|
186
|
+
:body => post_body,
|
187
|
+
:auth_names => auth_names,
|
188
|
+
:return_type => return_type
|
189
|
+
)
|
190
|
+
|
191
|
+
data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options)
|
192
|
+
if @api_client.config.debugging
|
193
|
+
@api_client.config.logger.debug "API called: TriggersApi#disable_trigger_instance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
194
|
+
end
|
195
|
+
APIResponse::new(data, status_code, headers, response)
|
196
|
+
end
|
197
|
+
|
198
|
+
|
199
|
+
# Enable trigger
|
200
|
+
#
|
201
|
+
# Enables a trigger for a connected account and specific trigger name.
|
202
|
+
#
|
203
|
+
# @param trigger_config [Object] The trigger configuration
|
204
|
+
# @param connected_account_id [String]
|
205
|
+
# @param trigger_name [String]
|
206
|
+
# @param body [EnableTriggerBodyDTO]
|
207
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
208
|
+
def enable(trigger_config:, connected_account_id:, trigger_name:, extra: {})
|
209
|
+
_body = {}
|
210
|
+
_body[:triggerConfig] = trigger_config if trigger_config != SENTINEL
|
211
|
+
extra[:enable_trigger_body_dto] = _body if !_body.empty?
|
212
|
+
api_response = enable_with_http_info_impl(connected_account_id, trigger_name, extra)
|
213
|
+
api_response.data
|
214
|
+
end
|
215
|
+
|
216
|
+
# Enable trigger
|
217
|
+
#
|
218
|
+
# Enables a trigger for a connected account and specific trigger name.
|
219
|
+
#
|
220
|
+
# @param trigger_config [Object] The trigger configuration
|
221
|
+
# @param connected_account_id [String]
|
222
|
+
# @param trigger_name [String]
|
223
|
+
# @param body [EnableTriggerBodyDTO]
|
224
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
225
|
+
def enable_with_http_info(trigger_config:, connected_account_id:, trigger_name:, extra: {})
|
226
|
+
_body = {}
|
227
|
+
_body[:triggerConfig] = trigger_config if trigger_config != SENTINEL
|
228
|
+
extra[:enable_trigger_body_dto] = _body if !_body.empty?
|
229
|
+
enable_with_http_info_impl(connected_account_id, trigger_name, extra)
|
230
|
+
end
|
231
|
+
|
232
|
+
# Enable trigger
|
233
|
+
# Enables a trigger for a connected account and specific trigger name.
|
234
|
+
# @param connected_account_id [String]
|
235
|
+
# @param trigger_name [String]
|
236
|
+
# @param [Hash] opts the optional parameters
|
237
|
+
# @option opts [EnableTriggerBodyDTO] :enable_trigger_body_dto EnableTriggerBodyDTO
|
238
|
+
# @return [TriggerResponseDTO]
|
239
|
+
private def enable_impl(connected_account_id, trigger_name, opts = {})
|
240
|
+
data, _status_code, _headers = enable_with_http_info(connected_account_id, trigger_name, opts)
|
241
|
+
data
|
242
|
+
end
|
243
|
+
|
244
|
+
# Enable trigger
|
245
|
+
# Enables a trigger for a connected account and specific trigger name.
|
246
|
+
# @param connected_account_id [String]
|
247
|
+
# @param trigger_name [String]
|
248
|
+
# @param [Hash] opts the optional parameters
|
249
|
+
# @option opts [EnableTriggerBodyDTO] :enable_trigger_body_dto EnableTriggerBodyDTO
|
250
|
+
# @return [APIResponse] data is TriggerResponseDTO, status code, headers and response
|
251
|
+
private def enable_with_http_info_impl(connected_account_id, trigger_name, opts = {})
|
252
|
+
if @api_client.config.debugging
|
253
|
+
@api_client.config.logger.debug 'Calling API: TriggersApi.enable ...'
|
254
|
+
end
|
255
|
+
# verify the required parameter 'connected_account_id' is set
|
256
|
+
if @api_client.config.client_side_validation && connected_account_id.nil?
|
257
|
+
fail ArgumentError, "Missing the required parameter 'connected_account_id' when calling TriggersApi.enable"
|
258
|
+
end
|
259
|
+
pattern = Regexp.new(/[^\/#\?]+?/)
|
260
|
+
if @api_client.config.client_side_validation && connected_account_id !~ pattern
|
261
|
+
fail ArgumentError, "invalid value for 'connected_account_id' when calling TriggersApi.enable, must conform to the pattern #{pattern}."
|
262
|
+
end
|
263
|
+
|
264
|
+
# verify the required parameter 'trigger_name' is set
|
265
|
+
if @api_client.config.client_side_validation && trigger_name.nil?
|
266
|
+
fail ArgumentError, "Missing the required parameter 'trigger_name' when calling TriggersApi.enable"
|
267
|
+
end
|
268
|
+
pattern = Regexp.new(/[^\/#\?]+?/)
|
269
|
+
if @api_client.config.client_side_validation && trigger_name !~ pattern
|
270
|
+
fail ArgumentError, "invalid value for 'trigger_name' when calling TriggersApi.enable, must conform to the pattern #{pattern}."
|
271
|
+
end
|
272
|
+
|
273
|
+
# resource path
|
274
|
+
local_var_path = '/api/v1/triggers/enable/{connectedAccountId}/{triggerName}'.sub('{' + 'connectedAccountId' + '}', CGI.escape(connected_account_id.to_s)).sub('{' + 'triggerName' + '}', CGI.escape(trigger_name.to_s))
|
275
|
+
|
276
|
+
# query parameters
|
277
|
+
query_params = opts[:query_params] || {}
|
278
|
+
|
279
|
+
# header parameters
|
280
|
+
header_params = opts[:header_params] || {}
|
281
|
+
# HTTP header 'Accept' (if needed)
|
282
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
283
|
+
# HTTP header 'Content-Type'
|
284
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
285
|
+
if !content_type.nil?
|
286
|
+
header_params['Content-Type'] = content_type
|
287
|
+
end
|
288
|
+
|
289
|
+
# form parameters
|
290
|
+
form_params = opts[:form_params] || {}
|
291
|
+
|
292
|
+
# http body (model)
|
293
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'enable_trigger_body_dto'])
|
294
|
+
|
295
|
+
# return_type
|
296
|
+
return_type = opts[:debug_return_type] || 'TriggerResponseDTO'
|
297
|
+
|
298
|
+
# auth_names
|
299
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
300
|
+
|
301
|
+
new_options = opts.merge(
|
302
|
+
:operation => :"TriggersApi.enable",
|
303
|
+
:header_params => header_params,
|
304
|
+
:query_params => query_params,
|
305
|
+
:form_params => form_params,
|
306
|
+
:body => post_body,
|
307
|
+
:auth_names => auth_names,
|
308
|
+
:return_type => return_type
|
309
|
+
)
|
310
|
+
|
311
|
+
data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options)
|
312
|
+
if @api_client.config.debugging
|
313
|
+
@api_client.config.logger.debug "API called: TriggersApi#enable\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
314
|
+
end
|
315
|
+
APIResponse::new(data, status_code, headers, response)
|
316
|
+
end
|
317
|
+
|
318
|
+
|
319
|
+
# Get active triggers
|
320
|
+
#
|
321
|
+
# Lists active triggers based on query parameters.
|
322
|
+
#
|
323
|
+
# @param connected_account_ids [String]
|
324
|
+
# @param integration_ids [String]
|
325
|
+
# @param trigger_ids [String]
|
326
|
+
# @param trigger_names [String]
|
327
|
+
# @param page [Float]
|
328
|
+
# @param limit [Float]
|
329
|
+
# @param show_disabled [Boolean]
|
330
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
331
|
+
def get_active_triggers(connected_account_ids: SENTINEL, integration_ids: SENTINEL, trigger_ids: SENTINEL, trigger_names: SENTINEL, page: SENTINEL, limit: SENTINEL, show_disabled: SENTINEL, extra: {})
|
332
|
+
extra[:connected_account_ids] = connected_account_ids if connected_account_ids != SENTINEL
|
333
|
+
extra[:integration_ids] = integration_ids if integration_ids != SENTINEL
|
334
|
+
extra[:trigger_ids] = trigger_ids if trigger_ids != SENTINEL
|
335
|
+
extra[:trigger_names] = trigger_names if trigger_names != SENTINEL
|
336
|
+
extra[:page] = page if page != SENTINEL
|
337
|
+
extra[:limit] = limit if limit != SENTINEL
|
338
|
+
extra[:show_disabled] = show_disabled if show_disabled != SENTINEL
|
339
|
+
api_response = get_active_triggers_with_http_info_impl(extra)
|
340
|
+
api_response.data
|
341
|
+
end
|
342
|
+
|
343
|
+
# Get active triggers
|
344
|
+
#
|
345
|
+
# Lists active triggers based on query parameters.
|
346
|
+
#
|
347
|
+
# @param connected_account_ids [String]
|
348
|
+
# @param integration_ids [String]
|
349
|
+
# @param trigger_ids [String]
|
350
|
+
# @param trigger_names [String]
|
351
|
+
# @param page [Float]
|
352
|
+
# @param limit [Float]
|
353
|
+
# @param show_disabled [Boolean]
|
354
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
355
|
+
def get_active_triggers_with_http_info(connected_account_ids: SENTINEL, integration_ids: SENTINEL, trigger_ids: SENTINEL, trigger_names: SENTINEL, page: SENTINEL, limit: SENTINEL, show_disabled: SENTINEL, extra: {})
|
356
|
+
extra[:connected_account_ids] = connected_account_ids if connected_account_ids != SENTINEL
|
357
|
+
extra[:integration_ids] = integration_ids if integration_ids != SENTINEL
|
358
|
+
extra[:trigger_ids] = trigger_ids if trigger_ids != SENTINEL
|
359
|
+
extra[:trigger_names] = trigger_names if trigger_names != SENTINEL
|
360
|
+
extra[:page] = page if page != SENTINEL
|
361
|
+
extra[:limit] = limit if limit != SENTINEL
|
362
|
+
extra[:show_disabled] = show_disabled if show_disabled != SENTINEL
|
363
|
+
get_active_triggers_with_http_info_impl(extra)
|
364
|
+
end
|
365
|
+
|
366
|
+
# Get active triggers
|
367
|
+
# Lists active triggers based on query parameters.
|
368
|
+
# @param [Hash] opts the optional parameters
|
369
|
+
# @option opts [String] :connected_account_ids
|
370
|
+
# @option opts [String] :integration_ids
|
371
|
+
# @option opts [String] :trigger_ids
|
372
|
+
# @option opts [String] :trigger_names
|
373
|
+
# @option opts [Float] :page
|
374
|
+
# @option opts [Float] :limit
|
375
|
+
# @option opts [Boolean] :show_disabled
|
376
|
+
# @return [ActiveTriggersResDTO]
|
377
|
+
private def get_active_triggers_impl(opts = {})
|
378
|
+
data, _status_code, _headers = get_active_triggers_with_http_info(opts)
|
379
|
+
data
|
380
|
+
end
|
381
|
+
|
382
|
+
# Get active triggers
|
383
|
+
# Lists active triggers based on query parameters.
|
384
|
+
# @param [Hash] opts the optional parameters
|
385
|
+
# @option opts [String] :connected_account_ids
|
386
|
+
# @option opts [String] :integration_ids
|
387
|
+
# @option opts [String] :trigger_ids
|
388
|
+
# @option opts [String] :trigger_names
|
389
|
+
# @option opts [Float] :page
|
390
|
+
# @option opts [Float] :limit
|
391
|
+
# @option opts [Boolean] :show_disabled
|
392
|
+
# @return [APIResponse] data is ActiveTriggersResDTO, status code, headers and response
|
393
|
+
private def get_active_triggers_with_http_info_impl(opts = {})
|
394
|
+
if @api_client.config.debugging
|
395
|
+
@api_client.config.logger.debug 'Calling API: TriggersApi.get_active_triggers ...'
|
396
|
+
end
|
397
|
+
# resource path
|
398
|
+
local_var_path = '/api/v1/triggers/active_triggers'
|
399
|
+
|
400
|
+
# query parameters
|
401
|
+
query_params = opts[:query_params] || {}
|
402
|
+
query_params[:'connectedAccountIds'] = opts[:'connected_account_ids'] if !opts[:'connected_account_ids'].nil?
|
403
|
+
query_params[:'integrationIds'] = opts[:'integration_ids'] if !opts[:'integration_ids'].nil?
|
404
|
+
query_params[:'triggerIds'] = opts[:'trigger_ids'] if !opts[:'trigger_ids'].nil?
|
405
|
+
query_params[:'triggerNames'] = opts[:'trigger_names'] if !opts[:'trigger_names'].nil?
|
406
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
407
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
408
|
+
query_params[:'showDisabled'] = opts[:'show_disabled'] if !opts[:'show_disabled'].nil?
|
409
|
+
|
410
|
+
# header parameters
|
411
|
+
header_params = opts[:header_params] || {}
|
412
|
+
# HTTP header 'Accept' (if needed)
|
413
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
414
|
+
|
415
|
+
# form parameters
|
416
|
+
form_params = opts[:form_params] || {}
|
417
|
+
|
418
|
+
# http body (model)
|
419
|
+
post_body = opts[:debug_body]
|
420
|
+
|
421
|
+
# return_type
|
422
|
+
return_type = opts[:debug_return_type] || 'ActiveTriggersResDTO'
|
423
|
+
|
424
|
+
# auth_names
|
425
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
426
|
+
|
427
|
+
new_options = opts.merge(
|
428
|
+
:operation => :"TriggersApi.get_active_triggers",
|
429
|
+
:header_params => header_params,
|
430
|
+
:query_params => query_params,
|
431
|
+
:form_params => form_params,
|
432
|
+
:body => post_body,
|
433
|
+
:auth_names => auth_names,
|
434
|
+
:return_type => return_type
|
435
|
+
)
|
436
|
+
|
437
|
+
data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
|
438
|
+
if @api_client.config.debugging
|
439
|
+
@api_client.config.logger.debug "API called: TriggersApi#get_active_triggers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
440
|
+
end
|
441
|
+
APIResponse::new(data, status_code, headers, response)
|
442
|
+
end
|
443
|
+
|
444
|
+
|
445
|
+
# Get trigger
|
446
|
+
#
|
447
|
+
# Retrieves a specific trigger by its ID.
|
448
|
+
#
|
449
|
+
# @param trigger_id [String]
|
450
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
451
|
+
def get_by_id(trigger_id:, extra: {})
|
452
|
+
api_response = get_by_id_with_http_info_impl(trigger_id, extra)
|
453
|
+
api_response.data
|
454
|
+
end
|
455
|
+
|
456
|
+
# Get trigger
|
457
|
+
#
|
458
|
+
# Retrieves a specific trigger by its ID.
|
459
|
+
#
|
460
|
+
# @param trigger_id [String]
|
461
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
462
|
+
def get_by_id_with_http_info(trigger_id:, extra: {})
|
463
|
+
get_by_id_with_http_info_impl(trigger_id, extra)
|
464
|
+
end
|
465
|
+
|
466
|
+
# Get trigger
|
467
|
+
# Retrieves a specific trigger by its ID.
|
468
|
+
# @param trigger_id [String]
|
469
|
+
# @param [Hash] opts the optional parameters
|
470
|
+
# @return [GetTriggerResponseDTO]
|
471
|
+
private def get_by_id_impl(trigger_id, opts = {})
|
472
|
+
data, _status_code, _headers = get_by_id_with_http_info(trigger_id, opts)
|
473
|
+
data
|
474
|
+
end
|
475
|
+
|
476
|
+
# Get trigger
|
477
|
+
# Retrieves a specific trigger by its ID.
|
478
|
+
# @param trigger_id [String]
|
479
|
+
# @param [Hash] opts the optional parameters
|
480
|
+
# @return [APIResponse] data is GetTriggerResponseDTO, status code, headers and response
|
481
|
+
private def get_by_id_with_http_info_impl(trigger_id, opts = {})
|
482
|
+
if @api_client.config.debugging
|
483
|
+
@api_client.config.logger.debug 'Calling API: TriggersApi.get_by_id ...'
|
484
|
+
end
|
485
|
+
# verify the required parameter 'trigger_id' is set
|
486
|
+
if @api_client.config.client_side_validation && trigger_id.nil?
|
487
|
+
fail ArgumentError, "Missing the required parameter 'trigger_id' when calling TriggersApi.get_by_id"
|
488
|
+
end
|
489
|
+
pattern = Regexp.new(/[^\/#\?]+?/)
|
490
|
+
if @api_client.config.client_side_validation && trigger_id !~ pattern
|
491
|
+
fail ArgumentError, "invalid value for 'trigger_id' when calling TriggersApi.get_by_id, must conform to the pattern #{pattern}."
|
492
|
+
end
|
493
|
+
|
494
|
+
# resource path
|
495
|
+
local_var_path = '/api/v1/triggers/get/{triggerId}'.sub('{' + 'triggerId' + '}', CGI.escape(trigger_id.to_s))
|
496
|
+
|
497
|
+
# query parameters
|
498
|
+
query_params = opts[:query_params] || {}
|
499
|
+
|
500
|
+
# header parameters
|
501
|
+
header_params = opts[:header_params] || {}
|
502
|
+
# HTTP header 'Accept' (if needed)
|
503
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
504
|
+
|
505
|
+
# form parameters
|
506
|
+
form_params = opts[:form_params] || {}
|
507
|
+
|
508
|
+
# http body (model)
|
509
|
+
post_body = opts[:debug_body]
|
510
|
+
|
511
|
+
# return_type
|
512
|
+
return_type = opts[:debug_return_type] || 'GetTriggerResponseDTO'
|
513
|
+
|
514
|
+
# auth_names
|
515
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
516
|
+
|
517
|
+
new_options = opts.merge(
|
518
|
+
:operation => :"TriggersApi.get_by_id",
|
519
|
+
:header_params => header_params,
|
520
|
+
:query_params => query_params,
|
521
|
+
:form_params => form_params,
|
522
|
+
:body => post_body,
|
523
|
+
:auth_names => auth_names,
|
524
|
+
:return_type => return_type
|
525
|
+
)
|
526
|
+
|
527
|
+
data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
|
528
|
+
if @api_client.config.debugging
|
529
|
+
@api_client.config.logger.debug "API called: TriggersApi#get_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
530
|
+
end
|
531
|
+
APIResponse::new(data, status_code, headers, response)
|
532
|
+
end
|
533
|
+
|
534
|
+
|
535
|
+
# Get webhook url
|
536
|
+
#
|
537
|
+
# Retrieves the universal callback URL set for the client.
|
538
|
+
#
|
539
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
540
|
+
def get_callback_url(extra: {})
|
541
|
+
api_response = get_callback_url_with_http_info_impl(extra)
|
542
|
+
api_response.data
|
543
|
+
end
|
544
|
+
|
545
|
+
# Get webhook url
|
546
|
+
#
|
547
|
+
# Retrieves the universal callback URL set for the client.
|
548
|
+
#
|
549
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
550
|
+
def get_callback_url_with_http_info(extra: {})
|
551
|
+
get_callback_url_with_http_info_impl(extra)
|
552
|
+
end
|
553
|
+
|
554
|
+
# Get webhook url
|
555
|
+
# Retrieves the universal callback URL set for the client.
|
556
|
+
# @param [Hash] opts the optional parameters
|
557
|
+
# @return [WebhookURLResponseDTO]
|
558
|
+
private def get_callback_url_impl(opts = {})
|
559
|
+
data, _status_code, _headers = get_callback_url_with_http_info(opts)
|
560
|
+
data
|
561
|
+
end
|
562
|
+
|
563
|
+
# Get webhook url
|
564
|
+
# Retrieves the universal callback URL set for the client.
|
565
|
+
# @param [Hash] opts the optional parameters
|
566
|
+
# @return [APIResponse] data is WebhookURLResponseDTO, status code, headers and response
|
567
|
+
private def get_callback_url_with_http_info_impl(opts = {})
|
568
|
+
if @api_client.config.debugging
|
569
|
+
@api_client.config.logger.debug 'Calling API: TriggersApi.get_callback_url ...'
|
570
|
+
end
|
571
|
+
# resource path
|
572
|
+
local_var_path = '/api/v1/triggers/callback_url'
|
573
|
+
|
574
|
+
# query parameters
|
575
|
+
query_params = opts[:query_params] || {}
|
576
|
+
|
577
|
+
# header parameters
|
578
|
+
header_params = opts[:header_params] || {}
|
579
|
+
# HTTP header 'Accept' (if needed)
|
580
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
581
|
+
|
582
|
+
# form parameters
|
583
|
+
form_params = opts[:form_params] || {}
|
584
|
+
|
585
|
+
# http body (model)
|
586
|
+
post_body = opts[:debug_body]
|
587
|
+
|
588
|
+
# return_type
|
589
|
+
return_type = opts[:debug_return_type] || 'WebhookURLResponseDTO'
|
590
|
+
|
591
|
+
# auth_names
|
592
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
593
|
+
|
594
|
+
new_options = opts.merge(
|
595
|
+
:operation => :"TriggersApi.get_callback_url",
|
596
|
+
:header_params => header_params,
|
597
|
+
:query_params => query_params,
|
598
|
+
:form_params => form_params,
|
599
|
+
:body => post_body,
|
600
|
+
:auth_names => auth_names,
|
601
|
+
:return_type => return_type
|
602
|
+
)
|
603
|
+
|
604
|
+
data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
|
605
|
+
if @api_client.config.debugging
|
606
|
+
@api_client.config.logger.debug "API called: TriggersApi#get_callback_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
607
|
+
end
|
608
|
+
APIResponse::new(data, status_code, headers, response)
|
609
|
+
end
|
610
|
+
|
611
|
+
|
612
|
+
# Get logs
|
613
|
+
#
|
614
|
+
# Fetches logs based on connection and integration details.
|
615
|
+
#
|
616
|
+
# @param connection_id [String]
|
617
|
+
# @param integration_id [String]
|
618
|
+
# @param page [Float]
|
619
|
+
# @param limit [Float]
|
620
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
621
|
+
def get_logs_based_on_connection_and_integration_details(connection_id: SENTINEL, integration_id: SENTINEL, page: SENTINEL, limit: SENTINEL, extra: {})
|
622
|
+
extra[:connection_id] = connection_id if connection_id != SENTINEL
|
623
|
+
extra[:integration_id] = integration_id if integration_id != SENTINEL
|
624
|
+
extra[:page] = page if page != SENTINEL
|
625
|
+
extra[:limit] = limit if limit != SENTINEL
|
626
|
+
api_response = get_logs_based_on_connection_and_integration_details_with_http_info_impl(extra)
|
627
|
+
api_response.data
|
628
|
+
end
|
629
|
+
|
630
|
+
# Get logs
|
631
|
+
#
|
632
|
+
# Fetches logs based on connection and integration details.
|
633
|
+
#
|
634
|
+
# @param connection_id [String]
|
635
|
+
# @param integration_id [String]
|
636
|
+
# @param page [Float]
|
637
|
+
# @param limit [Float]
|
638
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
639
|
+
def get_logs_based_on_connection_and_integration_details_with_http_info(connection_id: SENTINEL, integration_id: SENTINEL, page: SENTINEL, limit: SENTINEL, extra: {})
|
640
|
+
extra[:connection_id] = connection_id if connection_id != SENTINEL
|
641
|
+
extra[:integration_id] = integration_id if integration_id != SENTINEL
|
642
|
+
extra[:page] = page if page != SENTINEL
|
643
|
+
extra[:limit] = limit if limit != SENTINEL
|
644
|
+
get_logs_based_on_connection_and_integration_details_with_http_info_impl(extra)
|
645
|
+
end
|
646
|
+
|
647
|
+
# Get logs
|
648
|
+
# Fetches logs based on connection and integration details.
|
649
|
+
# @param [Hash] opts the optional parameters
|
650
|
+
# @option opts [String] :connection_id
|
651
|
+
# @option opts [String] :integration_id
|
652
|
+
# @option opts [Float] :page
|
653
|
+
# @option opts [Float] :limit
|
654
|
+
# @return [TriggerLogsResDTO]
|
655
|
+
private def get_logs_based_on_connection_and_integration_details_impl(opts = {})
|
656
|
+
data, _status_code, _headers = get_logs_based_on_connection_and_integration_details_with_http_info(opts)
|
657
|
+
data
|
658
|
+
end
|
659
|
+
|
660
|
+
# Get logs
|
661
|
+
# Fetches logs based on connection and integration details.
|
662
|
+
# @param [Hash] opts the optional parameters
|
663
|
+
# @option opts [String] :connection_id
|
664
|
+
# @option opts [String] :integration_id
|
665
|
+
# @option opts [Float] :page
|
666
|
+
# @option opts [Float] :limit
|
667
|
+
# @return [APIResponse] data is TriggerLogsResDTO, status code, headers and response
|
668
|
+
private def get_logs_based_on_connection_and_integration_details_with_http_info_impl(opts = {})
|
669
|
+
if @api_client.config.debugging
|
670
|
+
@api_client.config.logger.debug 'Calling API: TriggersApi.get_logs_based_on_connection_and_integration_details ...'
|
671
|
+
end
|
672
|
+
# resource path
|
673
|
+
local_var_path = '/api/v1/triggers/logs'
|
674
|
+
|
675
|
+
# query parameters
|
676
|
+
query_params = opts[:query_params] || {}
|
677
|
+
query_params[:'connectionId'] = opts[:'connection_id'] if !opts[:'connection_id'].nil?
|
678
|
+
query_params[:'integrationId'] = opts[:'integration_id'] if !opts[:'integration_id'].nil?
|
679
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
680
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
681
|
+
|
682
|
+
# header parameters
|
683
|
+
header_params = opts[:header_params] || {}
|
684
|
+
# HTTP header 'Accept' (if needed)
|
685
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
686
|
+
|
687
|
+
# form parameters
|
688
|
+
form_params = opts[:form_params] || {}
|
689
|
+
|
690
|
+
# http body (model)
|
691
|
+
post_body = opts[:debug_body]
|
692
|
+
|
693
|
+
# return_type
|
694
|
+
return_type = opts[:debug_return_type] || 'TriggerLogsResDTO'
|
695
|
+
|
696
|
+
# auth_names
|
697
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
698
|
+
|
699
|
+
new_options = opts.merge(
|
700
|
+
:operation => :"TriggersApi.get_logs_based_on_connection_and_integration_details",
|
701
|
+
:header_params => header_params,
|
702
|
+
:query_params => query_params,
|
703
|
+
:form_params => form_params,
|
704
|
+
:body => post_body,
|
705
|
+
:auth_names => auth_names,
|
706
|
+
:return_type => return_type
|
707
|
+
)
|
708
|
+
|
709
|
+
data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
|
710
|
+
if @api_client.config.debugging
|
711
|
+
@api_client.config.logger.debug "API called: TriggersApi#get_logs_based_on_connection_and_integration_details\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
712
|
+
end
|
713
|
+
APIResponse::new(data, status_code, headers, response)
|
714
|
+
end
|
715
|
+
|
716
|
+
|
717
|
+
# Get trigger info
|
718
|
+
#
|
719
|
+
# Get Trigger Info
|
720
|
+
#
|
721
|
+
# @param trigger_name [String]
|
722
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
723
|
+
def get_trigger_info(trigger_name:, extra: {})
|
724
|
+
api_response = get_trigger_info_with_http_info_impl(trigger_name, extra)
|
725
|
+
api_response.data
|
726
|
+
end
|
727
|
+
|
728
|
+
# Get trigger info
|
729
|
+
#
|
730
|
+
# Get Trigger Info
|
731
|
+
#
|
732
|
+
# @param trigger_name [String]
|
733
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
734
|
+
def get_trigger_info_with_http_info(trigger_name:, extra: {})
|
735
|
+
get_trigger_info_with_http_info_impl(trigger_name, extra)
|
736
|
+
end
|
737
|
+
|
738
|
+
# Get trigger info
|
739
|
+
# Get Trigger Info
|
740
|
+
# @param trigger_name [String]
|
741
|
+
# @param [Hash] opts the optional parameters
|
742
|
+
# @return [Array<SingleTriggerResDTO>]
|
743
|
+
private def get_trigger_info_impl(trigger_name, opts = {})
|
744
|
+
data, _status_code, _headers = get_trigger_info_with_http_info(trigger_name, opts)
|
745
|
+
data
|
746
|
+
end
|
747
|
+
|
748
|
+
# Get trigger info
|
749
|
+
# Get Trigger Info
|
750
|
+
# @param trigger_name [String]
|
751
|
+
# @param [Hash] opts the optional parameters
|
752
|
+
# @return [APIResponse] data is Array<SingleTriggerResDTO>, status code, headers and response
|
753
|
+
private def get_trigger_info_with_http_info_impl(trigger_name, opts = {})
|
754
|
+
if @api_client.config.debugging
|
755
|
+
@api_client.config.logger.debug 'Calling API: TriggersApi.get_trigger_info ...'
|
756
|
+
end
|
757
|
+
# verify the required parameter 'trigger_name' is set
|
758
|
+
if @api_client.config.client_side_validation && trigger_name.nil?
|
759
|
+
fail ArgumentError, "Missing the required parameter 'trigger_name' when calling TriggersApi.get_trigger_info"
|
760
|
+
end
|
761
|
+
pattern = Regexp.new(/[^\/#\?]+?/)
|
762
|
+
if @api_client.config.client_side_validation && trigger_name !~ pattern
|
763
|
+
fail ArgumentError, "invalid value for 'trigger_name' when calling TriggersApi.get_trigger_info, must conform to the pattern #{pattern}."
|
764
|
+
end
|
765
|
+
|
766
|
+
# resource path
|
767
|
+
local_var_path = '/api/v2/triggers/{triggerName}'.sub('{' + 'triggerName' + '}', CGI.escape(trigger_name.to_s))
|
768
|
+
|
769
|
+
# query parameters
|
770
|
+
query_params = opts[:query_params] || {}
|
771
|
+
|
772
|
+
# header parameters
|
773
|
+
header_params = opts[:header_params] || {}
|
774
|
+
# HTTP header 'Accept' (if needed)
|
775
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
776
|
+
|
777
|
+
# form parameters
|
778
|
+
form_params = opts[:form_params] || {}
|
779
|
+
|
780
|
+
# http body (model)
|
781
|
+
post_body = opts[:debug_body]
|
782
|
+
|
783
|
+
# return_type
|
784
|
+
return_type = opts[:debug_return_type] || 'Array<SingleTriggerResDTO>'
|
785
|
+
|
786
|
+
# auth_names
|
787
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
788
|
+
|
789
|
+
new_options = opts.merge(
|
790
|
+
:operation => :"TriggersApi.get_trigger_info",
|
791
|
+
:header_params => header_params,
|
792
|
+
:query_params => query_params,
|
793
|
+
:form_params => form_params,
|
794
|
+
:body => post_body,
|
795
|
+
:auth_names => auth_names,
|
796
|
+
:return_type => return_type
|
797
|
+
)
|
798
|
+
|
799
|
+
data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
|
800
|
+
if @api_client.config.debugging
|
801
|
+
@api_client.config.logger.debug "API called: TriggersApi#get_trigger_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
802
|
+
end
|
803
|
+
APIResponse::new(data, status_code, headers, response)
|
804
|
+
end
|
805
|
+
|
806
|
+
|
807
|
+
# List triggers
|
808
|
+
#
|
809
|
+
# List triggers
|
810
|
+
#
|
811
|
+
# @param app_names [String]
|
812
|
+
# @param connected_account_ids [String]
|
813
|
+
# @param trigger_ids [String]
|
814
|
+
# @param show_enabled_only [Boolean]
|
815
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
816
|
+
def list(app_names: SENTINEL, connected_account_ids: SENTINEL, trigger_ids: SENTINEL, show_enabled_only: SENTINEL, extra: {})
|
817
|
+
extra[:app_names] = app_names if app_names != SENTINEL
|
818
|
+
extra[:connected_account_ids] = connected_account_ids if connected_account_ids != SENTINEL
|
819
|
+
extra[:trigger_ids] = trigger_ids if trigger_ids != SENTINEL
|
820
|
+
extra[:show_enabled_only] = show_enabled_only if show_enabled_only != SENTINEL
|
821
|
+
api_response = list_with_http_info_impl(extra)
|
822
|
+
api_response.data
|
823
|
+
end
|
824
|
+
|
825
|
+
# List triggers
|
826
|
+
#
|
827
|
+
# List triggers
|
828
|
+
#
|
829
|
+
# @param app_names [String]
|
830
|
+
# @param connected_account_ids [String]
|
831
|
+
# @param trigger_ids [String]
|
832
|
+
# @param show_enabled_only [Boolean]
|
833
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
834
|
+
def list_with_http_info(app_names: SENTINEL, connected_account_ids: SENTINEL, trigger_ids: SENTINEL, show_enabled_only: SENTINEL, extra: {})
|
835
|
+
extra[:app_names] = app_names if app_names != SENTINEL
|
836
|
+
extra[:connected_account_ids] = connected_account_ids if connected_account_ids != SENTINEL
|
837
|
+
extra[:trigger_ids] = trigger_ids if trigger_ids != SENTINEL
|
838
|
+
extra[:show_enabled_only] = show_enabled_only if show_enabled_only != SENTINEL
|
839
|
+
list_with_http_info_impl(extra)
|
840
|
+
end
|
841
|
+
|
842
|
+
# List triggers
|
843
|
+
# List triggers
|
844
|
+
# @param [Hash] opts the optional parameters
|
845
|
+
# @option opts [String] :app_names
|
846
|
+
# @option opts [String] :connected_account_ids
|
847
|
+
# @option opts [String] :trigger_ids
|
848
|
+
# @option opts [Boolean] :show_enabled_only
|
849
|
+
# @return [Array<TriggerResDTO>]
|
850
|
+
private def list_impl(opts = {})
|
851
|
+
data, _status_code, _headers = list_with_http_info(opts)
|
852
|
+
data
|
853
|
+
end
|
854
|
+
|
855
|
+
# List triggers
|
856
|
+
# List triggers
|
857
|
+
# @param [Hash] opts the optional parameters
|
858
|
+
# @option opts [String] :app_names
|
859
|
+
# @option opts [String] :connected_account_ids
|
860
|
+
# @option opts [String] :trigger_ids
|
861
|
+
# @option opts [Boolean] :show_enabled_only
|
862
|
+
# @return [APIResponse] data is Array<TriggerResDTO>, status code, headers and response
|
863
|
+
private def list_with_http_info_impl(opts = {})
|
864
|
+
if @api_client.config.debugging
|
865
|
+
@api_client.config.logger.debug 'Calling API: TriggersApi.list ...'
|
866
|
+
end
|
867
|
+
# resource path
|
868
|
+
local_var_path = '/api/v1/triggers'
|
869
|
+
|
870
|
+
# query parameters
|
871
|
+
query_params = opts[:query_params] || {}
|
872
|
+
query_params[:'appNames'] = opts[:'app_names'] if !opts[:'app_names'].nil?
|
873
|
+
query_params[:'connectedAccountIds'] = opts[:'connected_account_ids'] if !opts[:'connected_account_ids'].nil?
|
874
|
+
query_params[:'triggerIds'] = opts[:'trigger_ids'] if !opts[:'trigger_ids'].nil?
|
875
|
+
query_params[:'showEnabledOnly'] = opts[:'show_enabled_only'] if !opts[:'show_enabled_only'].nil?
|
876
|
+
|
877
|
+
# header parameters
|
878
|
+
header_params = opts[:header_params] || {}
|
879
|
+
# HTTP header 'Accept' (if needed)
|
880
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
881
|
+
|
882
|
+
# form parameters
|
883
|
+
form_params = opts[:form_params] || {}
|
884
|
+
|
885
|
+
# http body (model)
|
886
|
+
post_body = opts[:debug_body]
|
887
|
+
|
888
|
+
# return_type
|
889
|
+
return_type = opts[:debug_return_type] || 'Array<TriggerResDTO>'
|
890
|
+
|
891
|
+
# auth_names
|
892
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
893
|
+
|
894
|
+
new_options = opts.merge(
|
895
|
+
:operation => :"TriggersApi.list",
|
896
|
+
:header_params => header_params,
|
897
|
+
:query_params => query_params,
|
898
|
+
:form_params => form_params,
|
899
|
+
:body => post_body,
|
900
|
+
:auth_names => auth_names,
|
901
|
+
:return_type => return_type
|
902
|
+
)
|
903
|
+
|
904
|
+
data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
|
905
|
+
if @api_client.config.debugging
|
906
|
+
@api_client.config.logger.debug "API called: TriggersApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
907
|
+
end
|
908
|
+
APIResponse::new(data, status_code, headers, response)
|
909
|
+
end
|
910
|
+
|
911
|
+
|
912
|
+
# Set callback url
|
913
|
+
#
|
914
|
+
# Sets a universal callback URL for the client.
|
915
|
+
#
|
916
|
+
# @param callback_url [String] The callback URL
|
917
|
+
# @param body [SetCallbackUrlBodyDTO]
|
918
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
919
|
+
def set_callback_url(callback_url:, extra: {})
|
920
|
+
_body = {}
|
921
|
+
_body[:callbackURL] = callback_url if callback_url != SENTINEL
|
922
|
+
extra[:set_callback_url_body_dto] = _body if !_body.empty?
|
923
|
+
api_response = set_callback_url_with_http_info_impl(extra)
|
924
|
+
api_response.data
|
925
|
+
end
|
926
|
+
|
927
|
+
# Set callback url
|
928
|
+
#
|
929
|
+
# Sets a universal callback URL for the client.
|
930
|
+
#
|
931
|
+
# @param callback_url [String] The callback URL
|
932
|
+
# @param body [SetCallbackUrlBodyDTO]
|
933
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
934
|
+
def set_callback_url_with_http_info(callback_url:, extra: {})
|
935
|
+
_body = {}
|
936
|
+
_body[:callbackURL] = callback_url if callback_url != SENTINEL
|
937
|
+
extra[:set_callback_url_body_dto] = _body if !_body.empty?
|
938
|
+
set_callback_url_with_http_info_impl(extra)
|
939
|
+
end
|
940
|
+
|
941
|
+
# Set callback url
|
942
|
+
# Sets a universal callback URL for the client.
|
943
|
+
# @param [Hash] opts the optional parameters
|
944
|
+
# @option opts [SetCallbackUrlBodyDTO] :set_callback_url_body_dto SetCallbackUrlBodyDTO
|
945
|
+
# @return [TriggerResponseDTO]
|
946
|
+
private def set_callback_url_impl(opts = {})
|
947
|
+
data, _status_code, _headers = set_callback_url_with_http_info(opts)
|
948
|
+
data
|
949
|
+
end
|
950
|
+
|
951
|
+
# Set callback url
|
952
|
+
# Sets a universal callback URL for the client.
|
953
|
+
# @param [Hash] opts the optional parameters
|
954
|
+
# @option opts [SetCallbackUrlBodyDTO] :set_callback_url_body_dto SetCallbackUrlBodyDTO
|
955
|
+
# @return [APIResponse] data is TriggerResponseDTO, status code, headers and response
|
956
|
+
private def set_callback_url_with_http_info_impl(opts = {})
|
957
|
+
if @api_client.config.debugging
|
958
|
+
@api_client.config.logger.debug 'Calling API: TriggersApi.set_callback_url ...'
|
959
|
+
end
|
960
|
+
# resource path
|
961
|
+
local_var_path = '/api/v1/triggers/set_callback_url'
|
962
|
+
|
963
|
+
# query parameters
|
964
|
+
query_params = opts[:query_params] || {}
|
965
|
+
|
966
|
+
# header parameters
|
967
|
+
header_params = opts[:header_params] || {}
|
968
|
+
# HTTP header 'Accept' (if needed)
|
969
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
970
|
+
# HTTP header 'Content-Type'
|
971
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
972
|
+
if !content_type.nil?
|
973
|
+
header_params['Content-Type'] = content_type
|
974
|
+
end
|
975
|
+
|
976
|
+
# form parameters
|
977
|
+
form_params = opts[:form_params] || {}
|
978
|
+
|
979
|
+
# http body (model)
|
980
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'set_callback_url_body_dto'])
|
981
|
+
|
982
|
+
# return_type
|
983
|
+
return_type = opts[:debug_return_type] || 'TriggerResponseDTO'
|
984
|
+
|
985
|
+
# auth_names
|
986
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
987
|
+
|
988
|
+
new_options = opts.merge(
|
989
|
+
:operation => :"TriggersApi.set_callback_url",
|
990
|
+
:header_params => header_params,
|
991
|
+
:query_params => query_params,
|
992
|
+
:form_params => form_params,
|
993
|
+
:body => post_body,
|
994
|
+
:auth_names => auth_names,
|
995
|
+
:return_type => return_type
|
996
|
+
)
|
997
|
+
|
998
|
+
data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options)
|
999
|
+
if @api_client.config.debugging
|
1000
|
+
@api_client.config.logger.debug "API called: TriggersApi#set_callback_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1001
|
+
end
|
1002
|
+
APIResponse::new(data, status_code, headers, response)
|
1003
|
+
end
|
1004
|
+
|
1005
|
+
|
1006
|
+
# Switch trigger instance status
|
1007
|
+
#
|
1008
|
+
# Switches the status of a trigger instance.
|
1009
|
+
#
|
1010
|
+
# @param enabled [Boolean] The new enabled status of the trigger
|
1011
|
+
# @param trigger_id [String]
|
1012
|
+
# @param body [SwitchTriggerStatusBodyDTO]
|
1013
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1014
|
+
def switch_instance_status(enabled:, trigger_id:, extra: {})
|
1015
|
+
_body = {}
|
1016
|
+
_body[:enabled] = enabled if enabled != SENTINEL
|
1017
|
+
extra[:switch_trigger_status_body_dto] = _body if !_body.empty?
|
1018
|
+
api_response = switch_instance_status_with_http_info_impl(trigger_id, extra)
|
1019
|
+
api_response.data
|
1020
|
+
end
|
1021
|
+
|
1022
|
+
# Switch trigger instance status
|
1023
|
+
#
|
1024
|
+
# Switches the status of a trigger instance.
|
1025
|
+
#
|
1026
|
+
# @param enabled [Boolean] The new enabled status of the trigger
|
1027
|
+
# @param trigger_id [String]
|
1028
|
+
# @param body [SwitchTriggerStatusBodyDTO]
|
1029
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1030
|
+
def switch_instance_status_with_http_info(enabled:, trigger_id:, extra: {})
|
1031
|
+
_body = {}
|
1032
|
+
_body[:enabled] = enabled if enabled != SENTINEL
|
1033
|
+
extra[:switch_trigger_status_body_dto] = _body if !_body.empty?
|
1034
|
+
switch_instance_status_with_http_info_impl(trigger_id, extra)
|
1035
|
+
end
|
1036
|
+
|
1037
|
+
# Switch trigger instance status
|
1038
|
+
# Switches the status of a trigger instance.
|
1039
|
+
# @param trigger_id [String]
|
1040
|
+
# @param [Hash] opts the optional parameters
|
1041
|
+
# @option opts [SwitchTriggerStatusBodyDTO] :switch_trigger_status_body_dto SwitchTriggerStatusBodyDTO
|
1042
|
+
# @return [TriggerResponseDTO]
|
1043
|
+
private def switch_instance_status_impl(trigger_id, opts = {})
|
1044
|
+
data, _status_code, _headers = switch_instance_status_with_http_info(trigger_id, opts)
|
1045
|
+
data
|
1046
|
+
end
|
1047
|
+
|
1048
|
+
# Switch trigger instance status
|
1049
|
+
# Switches the status of a trigger instance.
|
1050
|
+
# @param trigger_id [String]
|
1051
|
+
# @param [Hash] opts the optional parameters
|
1052
|
+
# @option opts [SwitchTriggerStatusBodyDTO] :switch_trigger_status_body_dto SwitchTriggerStatusBodyDTO
|
1053
|
+
# @return [APIResponse] data is TriggerResponseDTO, status code, headers and response
|
1054
|
+
private def switch_instance_status_with_http_info_impl(trigger_id, opts = {})
|
1055
|
+
if @api_client.config.debugging
|
1056
|
+
@api_client.config.logger.debug 'Calling API: TriggersApi.switch_instance_status ...'
|
1057
|
+
end
|
1058
|
+
# verify the required parameter 'trigger_id' is set
|
1059
|
+
if @api_client.config.client_side_validation && trigger_id.nil?
|
1060
|
+
fail ArgumentError, "Missing the required parameter 'trigger_id' when calling TriggersApi.switch_instance_status"
|
1061
|
+
end
|
1062
|
+
pattern = Regexp.new(/[^\/#\?]+?/)
|
1063
|
+
if @api_client.config.client_side_validation && trigger_id !~ pattern
|
1064
|
+
fail ArgumentError, "invalid value for 'trigger_id' when calling TriggersApi.switch_instance_status, must conform to the pattern #{pattern}."
|
1065
|
+
end
|
1066
|
+
|
1067
|
+
# resource path
|
1068
|
+
local_var_path = '/api/v1/triggers/instance/{triggerId}/status'.sub('{' + 'triggerId' + '}', CGI.escape(trigger_id.to_s))
|
1069
|
+
|
1070
|
+
# query parameters
|
1071
|
+
query_params = opts[:query_params] || {}
|
1072
|
+
|
1073
|
+
# header parameters
|
1074
|
+
header_params = opts[:header_params] || {}
|
1075
|
+
# HTTP header 'Accept' (if needed)
|
1076
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1077
|
+
# HTTP header 'Content-Type'
|
1078
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
1079
|
+
if !content_type.nil?
|
1080
|
+
header_params['Content-Type'] = content_type
|
1081
|
+
end
|
1082
|
+
|
1083
|
+
# form parameters
|
1084
|
+
form_params = opts[:form_params] || {}
|
1085
|
+
|
1086
|
+
# http body (model)
|
1087
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'switch_trigger_status_body_dto'])
|
1088
|
+
|
1089
|
+
# return_type
|
1090
|
+
return_type = opts[:debug_return_type] || 'TriggerResponseDTO'
|
1091
|
+
|
1092
|
+
# auth_names
|
1093
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
1094
|
+
|
1095
|
+
new_options = opts.merge(
|
1096
|
+
:operation => :"TriggersApi.switch_instance_status",
|
1097
|
+
:header_params => header_params,
|
1098
|
+
:query_params => query_params,
|
1099
|
+
:form_params => form_params,
|
1100
|
+
:body => post_body,
|
1101
|
+
:auth_names => auth_names,
|
1102
|
+
:return_type => return_type
|
1103
|
+
)
|
1104
|
+
|
1105
|
+
data, status_code, headers, response = @api_client.call_api(:PATCH, local_var_path, new_options)
|
1106
|
+
if @api_client.config.debugging
|
1107
|
+
@api_client.config.logger.debug "API called: TriggersApi#switch_instance_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1108
|
+
end
|
1109
|
+
APIResponse::new(data, status_code, headers, response)
|
1110
|
+
end
|
1111
|
+
|
1112
|
+
|
1113
|
+
# Switch post trigger instance status
|
1114
|
+
#
|
1115
|
+
# Switches the status of a trigger instance.
|
1116
|
+
#
|
1117
|
+
# @param enabled [Boolean] The new enabled status of the trigger
|
1118
|
+
# @param trigger_id [String]
|
1119
|
+
# @param body [SwitchTriggerStatusBodyDTO]
|
1120
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1121
|
+
def switch_post_instance_status(enabled:, trigger_id:, extra: {})
|
1122
|
+
_body = {}
|
1123
|
+
_body[:enabled] = enabled if enabled != SENTINEL
|
1124
|
+
extra[:switch_trigger_status_body_dto] = _body if !_body.empty?
|
1125
|
+
api_response = switch_post_instance_status_with_http_info_impl(trigger_id, extra)
|
1126
|
+
api_response.data
|
1127
|
+
end
|
1128
|
+
|
1129
|
+
# Switch post trigger instance status
|
1130
|
+
#
|
1131
|
+
# Switches the status of a trigger instance.
|
1132
|
+
#
|
1133
|
+
# @param enabled [Boolean] The new enabled status of the trigger
|
1134
|
+
# @param trigger_id [String]
|
1135
|
+
# @param body [SwitchTriggerStatusBodyDTO]
|
1136
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1137
|
+
def switch_post_instance_status_with_http_info(enabled:, trigger_id:, extra: {})
|
1138
|
+
_body = {}
|
1139
|
+
_body[:enabled] = enabled if enabled != SENTINEL
|
1140
|
+
extra[:switch_trigger_status_body_dto] = _body if !_body.empty?
|
1141
|
+
switch_post_instance_status_with_http_info_impl(trigger_id, extra)
|
1142
|
+
end
|
1143
|
+
|
1144
|
+
# Switch post trigger instance status
|
1145
|
+
# Switches the status of a trigger instance.
|
1146
|
+
# @param trigger_id [String]
|
1147
|
+
# @param [Hash] opts the optional parameters
|
1148
|
+
# @option opts [SwitchTriggerStatusBodyDTO] :switch_trigger_status_body_dto SwitchTriggerStatusBodyDTO
|
1149
|
+
# @return [TriggerResponseDTO]
|
1150
|
+
private def switch_post_instance_status_impl(trigger_id, opts = {})
|
1151
|
+
data, _status_code, _headers = switch_post_instance_status_with_http_info(trigger_id, opts)
|
1152
|
+
data
|
1153
|
+
end
|
1154
|
+
|
1155
|
+
# Switch post trigger instance status
|
1156
|
+
# Switches the status of a trigger instance.
|
1157
|
+
# @param trigger_id [String]
|
1158
|
+
# @param [Hash] opts the optional parameters
|
1159
|
+
# @option opts [SwitchTriggerStatusBodyDTO] :switch_trigger_status_body_dto SwitchTriggerStatusBodyDTO
|
1160
|
+
# @return [APIResponse] data is TriggerResponseDTO, status code, headers and response
|
1161
|
+
private def switch_post_instance_status_with_http_info_impl(trigger_id, opts = {})
|
1162
|
+
if @api_client.config.debugging
|
1163
|
+
@api_client.config.logger.debug 'Calling API: TriggersApi.switch_post_instance_status ...'
|
1164
|
+
end
|
1165
|
+
# verify the required parameter 'trigger_id' is set
|
1166
|
+
if @api_client.config.client_side_validation && trigger_id.nil?
|
1167
|
+
fail ArgumentError, "Missing the required parameter 'trigger_id' when calling TriggersApi.switch_post_instance_status"
|
1168
|
+
end
|
1169
|
+
pattern = Regexp.new(/[^\/#\?]+?/)
|
1170
|
+
if @api_client.config.client_side_validation && trigger_id !~ pattern
|
1171
|
+
fail ArgumentError, "invalid value for 'trigger_id' when calling TriggersApi.switch_post_instance_status, must conform to the pattern #{pattern}."
|
1172
|
+
end
|
1173
|
+
|
1174
|
+
# resource path
|
1175
|
+
local_var_path = '/api/v1/triggers/instance/{triggerId}/status'.sub('{' + 'triggerId' + '}', CGI.escape(trigger_id.to_s))
|
1176
|
+
|
1177
|
+
# query parameters
|
1178
|
+
query_params = opts[:query_params] || {}
|
1179
|
+
|
1180
|
+
# header parameters
|
1181
|
+
header_params = opts[:header_params] || {}
|
1182
|
+
# HTTP header 'Accept' (if needed)
|
1183
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1184
|
+
# HTTP header 'Content-Type'
|
1185
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
1186
|
+
if !content_type.nil?
|
1187
|
+
header_params['Content-Type'] = content_type
|
1188
|
+
end
|
1189
|
+
|
1190
|
+
# form parameters
|
1191
|
+
form_params = opts[:form_params] || {}
|
1192
|
+
|
1193
|
+
# http body (model)
|
1194
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'switch_trigger_status_body_dto'])
|
1195
|
+
|
1196
|
+
# return_type
|
1197
|
+
return_type = opts[:debug_return_type] || 'TriggerResponseDTO'
|
1198
|
+
|
1199
|
+
# auth_names
|
1200
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
1201
|
+
|
1202
|
+
new_options = opts.merge(
|
1203
|
+
:operation => :"TriggersApi.switch_post_instance_status",
|
1204
|
+
:header_params => header_params,
|
1205
|
+
:query_params => query_params,
|
1206
|
+
:form_params => form_params,
|
1207
|
+
:body => post_body,
|
1208
|
+
:auth_names => auth_names,
|
1209
|
+
:return_type => return_type
|
1210
|
+
)
|
1211
|
+
|
1212
|
+
data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options)
|
1213
|
+
if @api_client.config.debugging
|
1214
|
+
@api_client.config.logger.debug "API called: TriggersApi#switch_post_instance_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1215
|
+
end
|
1216
|
+
APIResponse::new(data, status_code, headers, response)
|
1217
|
+
end
|
1218
|
+
end
|
1219
|
+
|
1220
|
+
# top-level client access to avoid having the user to insantiate their own API instances
|
1221
|
+
Triggers = TriggersApi::new
|
1222
|
+
end
|