composio 0.1.0 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -106,263 +106,6 @@ module Composio
106
106
  end
107
107
  APIResponse::new(data, status_code, headers, response)
108
108
  end
109
-
110
-
111
- # Send magic link
112
- #
113
- # @param email [String] The email of the user
114
- # @param verify_host [String] The frontend host of the user
115
- # @param body [MagicLinkReqDTO]
116
- # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
117
- def send_magic_link(email:, verify_host:, extra: {})
118
- _body = {}
119
- _body[:email] = email if email != SENTINEL
120
- _body[:verifyHost] = verify_host if verify_host != SENTINEL
121
- extra[:magic_link_req_dto] = _body if !_body.empty?
122
- api_response = send_magic_link_with_http_info_impl(extra)
123
- api_response.data
124
- end
125
-
126
- # Send magic link
127
- #
128
- # @param email [String] The email of the user
129
- # @param verify_host [String] The frontend host of the user
130
- # @param body [MagicLinkReqDTO]
131
- # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
132
- def send_magic_link_with_http_info(email:, verify_host:, extra: {})
133
- _body = {}
134
- _body[:email] = email if email != SENTINEL
135
- _body[:verifyHost] = verify_host if verify_host != SENTINEL
136
- extra[:magic_link_req_dto] = _body if !_body.empty?
137
- send_magic_link_with_http_info_impl(extra)
138
- end
139
-
140
- # Send magic link
141
- # @param [Hash] opts the optional parameters
142
- # @option opts [MagicLinkReqDTO] :magic_link_req_dto MagicLinkReqDTO
143
- # @return [MagicLinkResDTO]
144
- private def send_magic_link_impl(opts = {})
145
- data, _status_code, _headers = send_magic_link_with_http_info(opts)
146
- data
147
- end
148
-
149
- # Send magic link
150
- # @param [Hash] opts the optional parameters
151
- # @option opts [MagicLinkReqDTO] :magic_link_req_dto MagicLinkReqDTO
152
- # @return [APIResponse] data is MagicLinkResDTO, status code, headers and response
153
- private def send_magic_link_with_http_info_impl(opts = {})
154
- if @api_client.config.debugging
155
- @api_client.config.logger.debug 'Calling API: AuthApi.send_magic_link ...'
156
- end
157
- # resource path
158
- local_var_path = '/api/v1/client/auth/send_magic_link'
159
-
160
- # query parameters
161
- query_params = opts[:query_params] || {}
162
-
163
- # header parameters
164
- header_params = opts[:header_params] || {}
165
- # HTTP header 'Accept' (if needed)
166
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
167
- # HTTP header 'Content-Type'
168
- content_type = @api_client.select_header_content_type(['application/json'])
169
- if !content_type.nil?
170
- header_params['Content-Type'] = content_type
171
- end
172
-
173
- # form parameters
174
- form_params = opts[:form_params] || {}
175
-
176
- # http body (model)
177
- post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'magic_link_req_dto'])
178
-
179
- # return_type
180
- return_type = opts[:debug_return_type] || 'MagicLinkResDTO'
181
-
182
- # auth_names
183
- auth_names = opts[:debug_auth_names] || ['api_key']
184
-
185
- new_options = opts.merge(
186
- :operation => :"AuthApi.send_magic_link",
187
- :header_params => header_params,
188
- :query_params => query_params,
189
- :form_params => form_params,
190
- :body => post_body,
191
- :auth_names => auth_names,
192
- :return_type => return_type
193
- )
194
-
195
- data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options)
196
- if @api_client.config.debugging
197
- @api_client.config.logger.debug "API called: AuthApi#send_magic_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
198
- end
199
- APIResponse::new(data, status_code, headers, response)
200
- end
201
-
202
-
203
- # Logout API
204
- #
205
- # Logout the user and clear the server side session
206
- #
207
- # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
208
- def user_logout(extra: {})
209
- api_response = user_logout_with_http_info_impl(extra)
210
- api_response.data
211
- end
212
-
213
- # Logout API
214
- #
215
- # Logout the user and clear the server side session
216
- #
217
- # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
218
- def user_logout_with_http_info(extra: {})
219
- user_logout_with_http_info_impl(extra)
220
- end
221
-
222
- # Logout API
223
- # Logout the user and clear the server side session
224
- # @param [Hash] opts the optional parameters
225
- # @return [LogoutResDTO]
226
- private def user_logout_impl(opts = {})
227
- data, _status_code, _headers = user_logout_with_http_info(opts)
228
- data
229
- end
230
-
231
- # Logout API
232
- # Logout the user and clear the server side session
233
- # @param [Hash] opts the optional parameters
234
- # @return [APIResponse] data is LogoutResDTO, status code, headers and response
235
- private def user_logout_with_http_info_impl(opts = {})
236
- if @api_client.config.debugging
237
- @api_client.config.logger.debug 'Calling API: AuthApi.user_logout ...'
238
- end
239
- # resource path
240
- local_var_path = '/api/v1/client/auth/logout'
241
-
242
- # query parameters
243
- query_params = opts[:query_params] || {}
244
-
245
- # header parameters
246
- header_params = opts[:header_params] || {}
247
- # HTTP header 'Accept' (if needed)
248
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
249
-
250
- # form parameters
251
- form_params = opts[:form_params] || {}
252
-
253
- # http body (model)
254
- post_body = opts[:debug_body]
255
-
256
- # return_type
257
- return_type = opts[:debug_return_type] || 'LogoutResDTO'
258
-
259
- # auth_names
260
- auth_names = opts[:debug_auth_names] || ['api_key']
261
-
262
- new_options = opts.merge(
263
- :operation => :"AuthApi.user_logout",
264
- :header_params => header_params,
265
- :query_params => query_params,
266
- :form_params => form_params,
267
- :body => post_body,
268
- :auth_names => auth_names,
269
- :return_type => return_type
270
- )
271
-
272
- data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options)
273
- if @api_client.config.debugging
274
- @api_client.config.logger.debug "API called: AuthApi#user_logout\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
275
- end
276
- APIResponse::new(data, status_code, headers, response)
277
- end
278
-
279
-
280
- # Verify magic link
281
- #
282
- # @param token [String] The magic link token
283
- # @param body [VerifyMagicLinkReqDTO]
284
- # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
285
- def verify_magic_link(token:, extra: {})
286
- _body = {}
287
- _body[:token] = token if token != SENTINEL
288
- extra[:verify_magic_link_req_dto] = _body if !_body.empty?
289
- api_response = verify_magic_link_with_http_info_impl(extra)
290
- api_response.data
291
- end
292
-
293
- # Verify magic link
294
- #
295
- # @param token [String] The magic link token
296
- # @param body [VerifyMagicLinkReqDTO]
297
- # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
298
- def verify_magic_link_with_http_info(token:, extra: {})
299
- _body = {}
300
- _body[:token] = token if token != SENTINEL
301
- extra[:verify_magic_link_req_dto] = _body if !_body.empty?
302
- verify_magic_link_with_http_info_impl(extra)
303
- end
304
-
305
- # Verify magic link
306
- # @param [Hash] opts the optional parameters
307
- # @option opts [VerifyMagicLinkReqDTO] :verify_magic_link_req_dto VerifyMagicLinkReqDTO
308
- # @return [VerifyMagicLinkResDTO]
309
- private def verify_magic_link_impl(opts = {})
310
- data, _status_code, _headers = verify_magic_link_with_http_info(opts)
311
- data
312
- end
313
-
314
- # Verify magic link
315
- # @param [Hash] opts the optional parameters
316
- # @option opts [VerifyMagicLinkReqDTO] :verify_magic_link_req_dto VerifyMagicLinkReqDTO
317
- # @return [APIResponse] data is VerifyMagicLinkResDTO, status code, headers and response
318
- private def verify_magic_link_with_http_info_impl(opts = {})
319
- if @api_client.config.debugging
320
- @api_client.config.logger.debug 'Calling API: AuthApi.verify_magic_link ...'
321
- end
322
- # resource path
323
- local_var_path = '/api/v1/client/auth/verify_magic_link'
324
-
325
- # query parameters
326
- query_params = opts[:query_params] || {}
327
-
328
- # header parameters
329
- header_params = opts[:header_params] || {}
330
- # HTTP header 'Accept' (if needed)
331
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
332
- # HTTP header 'Content-Type'
333
- content_type = @api_client.select_header_content_type(['application/json'])
334
- if !content_type.nil?
335
- header_params['Content-Type'] = content_type
336
- end
337
-
338
- # form parameters
339
- form_params = opts[:form_params] || {}
340
-
341
- # http body (model)
342
- post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'verify_magic_link_req_dto'])
343
-
344
- # return_type
345
- return_type = opts[:debug_return_type] || 'VerifyMagicLinkResDTO'
346
-
347
- # auth_names
348
- auth_names = opts[:debug_auth_names] || ['api_key']
349
-
350
- new_options = opts.merge(
351
- :operation => :"AuthApi.verify_magic_link",
352
- :header_params => header_params,
353
- :query_params => query_params,
354
- :form_params => form_params,
355
- :body => post_body,
356
- :auth_names => auth_names,
357
- :return_type => return_type
358
- )
359
-
360
- data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options)
361
- if @api_client.config.debugging
362
- @api_client.config.logger.debug "API called: AuthApi#verify_magic_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
363
- end
364
- APIResponse::new(data, status_code, headers, response)
365
- end
366
109
  end
367
110
 
368
111
  # top-level client access to avoid having the user to insantiate their own API instances
@@ -292,7 +292,7 @@ module Composio
292
292
  end
293
293
 
294
294
 
295
- # List global connectors
295
+ # List all connectors
296
296
  #
297
297
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
298
298
  def list_global_connectors(extra: {})
@@ -300,14 +300,14 @@ module Composio
300
300
  api_response.data
301
301
  end
302
302
 
303
- # List global connectors
303
+ # List all connectors
304
304
  #
305
305
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
306
306
  def list_global_connectors_with_http_info(extra: {})
307
307
  list_global_connectors_with_http_info_impl(extra)
308
308
  end
309
309
 
310
- # List global connectors
310
+ # List all connectors
311
311
  # @param [Hash] opts the optional parameters
312
312
  # @return [GetConnectorListResDTO]
313
313
  private def list_global_connectors_impl(opts = {})
@@ -315,7 +315,7 @@ module Composio
315
315
  data
316
316
  end
317
317
 
318
- # List global connectors
318
+ # List all connectors
319
319
  # @param [Hash] opts the optional parameters
320
320
  # @return [APIResponse] data is GetConnectorListResDTO, status code, headers and response
321
321
  private def list_global_connectors_with_http_info_impl(opts = {})
@@ -363,7 +363,7 @@ module Composio
363
363
  end
364
364
 
365
365
 
366
- # Patch connector
366
+ # Modify connector
367
367
  #
368
368
  # @param integration_id [String]
369
369
  # @param auth_config [Object] Authentication configuration for the connector
@@ -379,7 +379,7 @@ module Composio
379
379
  api_response.data
380
380
  end
381
381
 
382
- # Patch connector
382
+ # Modify connector
383
383
  #
384
384
  # @param integration_id [String]
385
385
  # @param auth_config [Object] Authentication configuration for the connector
@@ -394,7 +394,7 @@ module Composio
394
394
  update_integration_with_http_info_impl(integration_id, extra)
395
395
  end
396
396
 
397
- # Patch connector
397
+ # Modify connector
398
398
  # @param integration_id [String]
399
399
  # @param [Hash] opts the optional parameters
400
400
  # @option opts [PatchConnectorReqDTO] :patch_connector_req_dto PatchConnectorReqDTO
@@ -404,7 +404,7 @@ module Composio
404
404
  data
405
405
  end
406
406
 
407
- # Patch connector
407
+ # Modify connector
408
408
  # @param integration_id [String]
409
409
  # @param [Hash] opts the optional parameters
410
410
  # @option opts [PatchConnectorReqDTO] :patch_connector_req_dto PatchConnectorReqDTO
@@ -466,111 +466,6 @@ module Composio
466
466
  end
467
467
  APIResponse::new(data, status_code, headers, response)
468
468
  end
469
-
470
-
471
- # Patch post connector
472
- #
473
- # @param integration_id [String]
474
- # @param auth_config [Object] Authentication configuration for the connector
475
- # @param enabled [Boolean] Flag to indicate if the connector is enabled
476
- # @param body [PatchConnectorReqDTO]
477
- # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
478
- def update_status(integration_id:, auth_config: SENTINEL, enabled: SENTINEL, extra: {})
479
- _body = {}
480
- _body[:authConfig] = auth_config if auth_config != SENTINEL
481
- _body[:enabled] = enabled if enabled != SENTINEL
482
- extra[:patch_connector_req_dto] = _body if !_body.empty?
483
- api_response = update_status_with_http_info_impl(integration_id, extra)
484
- api_response.data
485
- end
486
-
487
- # Patch post connector
488
- #
489
- # @param integration_id [String]
490
- # @param auth_config [Object] Authentication configuration for the connector
491
- # @param enabled [Boolean] Flag to indicate if the connector is enabled
492
- # @param body [PatchConnectorReqDTO]
493
- # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
494
- def update_status_with_http_info(integration_id:, auth_config: SENTINEL, enabled: SENTINEL, extra: {})
495
- _body = {}
496
- _body[:authConfig] = auth_config if auth_config != SENTINEL
497
- _body[:enabled] = enabled if enabled != SENTINEL
498
- extra[:patch_connector_req_dto] = _body if !_body.empty?
499
- update_status_with_http_info_impl(integration_id, extra)
500
- end
501
-
502
- # Patch post connector
503
- # @param integration_id [String]
504
- # @param [Hash] opts the optional parameters
505
- # @option opts [PatchConnectorReqDTO] :patch_connector_req_dto PatchConnectorReqDTO
506
- # @return [PatchConnectorResDTO]
507
- private def update_status_impl(integration_id, opts = {})
508
- data, _status_code, _headers = update_status_with_http_info(integration_id, opts)
509
- data
510
- end
511
-
512
- # Patch post connector
513
- # @param integration_id [String]
514
- # @param [Hash] opts the optional parameters
515
- # @option opts [PatchConnectorReqDTO] :patch_connector_req_dto PatchConnectorReqDTO
516
- # @return [APIResponse] data is PatchConnectorResDTO, status code, headers and response
517
- private def update_status_with_http_info_impl(integration_id, opts = {})
518
- if @api_client.config.debugging
519
- @api_client.config.logger.debug 'Calling API: IntegrationsApi.update_status ...'
520
- end
521
- # verify the required parameter 'integration_id' is set
522
- if @api_client.config.client_side_validation && integration_id.nil?
523
- fail ArgumentError, "Missing the required parameter 'integration_id' when calling IntegrationsApi.update_status"
524
- end
525
- pattern = Regexp.new(/[^\/#\?]+?/)
526
- if @api_client.config.client_side_validation && integration_id !~ pattern
527
- fail ArgumentError, "invalid value for 'integration_id' when calling IntegrationsApi.update_status, must conform to the pattern #{pattern}."
528
- end
529
-
530
- # resource path
531
- local_var_path = '/api/v1/integrations/{integrationId}/status'.sub('{' + 'integrationId' + '}', CGI.escape(integration_id.to_s))
532
-
533
- # query parameters
534
- query_params = opts[:query_params] || {}
535
-
536
- # header parameters
537
- header_params = opts[:header_params] || {}
538
- # HTTP header 'Accept' (if needed)
539
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
540
- # HTTP header 'Content-Type'
541
- content_type = @api_client.select_header_content_type(['application/json'])
542
- if !content_type.nil?
543
- header_params['Content-Type'] = content_type
544
- end
545
-
546
- # form parameters
547
- form_params = opts[:form_params] || {}
548
-
549
- # http body (model)
550
- post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'patch_connector_req_dto'])
551
-
552
- # return_type
553
- return_type = opts[:debug_return_type] || 'PatchConnectorResDTO'
554
-
555
- # auth_names
556
- auth_names = opts[:debug_auth_names] || ['api_key']
557
-
558
- new_options = opts.merge(
559
- :operation => :"IntegrationsApi.update_status",
560
- :header_params => header_params,
561
- :query_params => query_params,
562
- :form_params => form_params,
563
- :body => post_body,
564
- :auth_names => auth_names,
565
- :return_type => return_type
566
- )
567
-
568
- data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options)
569
- if @api_client.config.debugging
570
- @api_client.config.logger.debug "API called: IntegrationsApi#update_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
571
- end
572
- APIResponse::new(data, status_code, headers, response)
573
- end
574
469
  end
575
470
 
576
471
  # top-level client access to avoid having the user to insantiate their own API instances
@@ -442,96 +442,6 @@ module Composio
442
442
  end
443
443
 
444
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
445
  # Get webhook url
536
446
  #
537
447
  # Retrieves the universal callback URL set for the client.
@@ -1108,113 +1018,6 @@ module Composio
1108
1018
  end
1109
1019
  APIResponse::new(data, status_code, headers, response)
1110
1020
  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
1021
  end
1219
1022
 
1220
1023
  # top-level client access to avoid having the user to insantiate their own API instances