composio 0.1.15 → 0.1.16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +4 -4
  3. data/README.md +246 -202
  4. data/lib/composio/api/actions_api.rb +191 -4
  5. data/lib/composio/api/admin_api.rb +78 -0
  6. data/lib/composio/api/auth_api.rb +77 -0
  7. data/lib/composio/api/cli_api.rb +266 -0
  8. data/lib/composio/api/connections_api.rb +124 -6
  9. data/lib/composio/api/event_logs_api.rb +0 -318
  10. data/lib/composio/api/integrations_api.rb +8 -4
  11. data/lib/composio/api/logs_api.rb +19 -4
  12. data/lib/composio/api/triggers_api.rb +9 -2
  13. data/lib/composio/models/action_execution_req_dto.rb +31 -4
  14. data/lib/composio/models/actions_query_dto.rb +22 -4
  15. data/lib/composio/models/app_query_dto.rb +1 -1
  16. data/lib/composio/models/client_dto.rb +374 -0
  17. data/lib/composio/models/client_dto_created_at.rb +102 -0
  18. data/lib/composio/models/client_dto_last_subscribed_at.rb +102 -0
  19. data/lib/composio/models/client_dto_updated_at.rb +102 -0
  20. data/lib/composio/models/client_info_res_dto.rb +235 -0
  21. data/lib/composio/models/connection_params.rb +15 -4
  22. data/lib/composio/models/connection_with_app_data.rb +15 -4
  23. data/lib/composio/models/create_connector_payload_dto.rb +12 -7
  24. data/lib/composio/models/expected_input_fields_dto.rb +346 -0
  25. data/lib/composio/models/get_connections_query_dto.rb +15 -4
  26. data/lib/composio/models/get_connector_info_res_dto.rb +1 -1
  27. data/lib/composio/models/get_logs_dto.rb +14 -4
  28. data/lib/composio/models/ingest_data_dto.rb +21 -1
  29. data/lib/composio/models/initiate_connection_payload_dto.rb +19 -18
  30. data/lib/composio/models/list_triggers_query_dto.rb +11 -1
  31. data/lib/composio/models/sdk_error_res_dto.rb +221 -0
  32. data/lib/composio/models/session_info_dto.rb +224 -0
  33. data/lib/composio/models/tools_execute_req_dto.rb +22 -4
  34. data/lib/composio/models/trigger_response_dto.rb +14 -4
  35. data/lib/composio/models/update_connection_labels_payload_dto.rb +222 -0
  36. data/lib/composio/version.rb +1 -1
  37. data/lib/composio.rb +12 -3
  38. data/spec/api/actions_api_spec.rb +25 -0
  39. data/spec/api/admin_api_spec.rb +11 -0
  40. data/spec/api/auth_api_spec.rb +11 -0
  41. data/spec/api/cli_api_spec.rb +63 -0
  42. data/spec/api/connections_api_spec.rb +14 -0
  43. data/spec/api/event_logs_api_spec.rb +0 -43
  44. data/spec/api/logs_api_spec.rb +1 -0
  45. data/spec/api/triggers_api_spec.rb +1 -0
  46. data/spec/models/action_execution_req_dto_spec.rb +18 -0
  47. data/spec/models/actions_query_dto_spec.rb +12 -0
  48. data/spec/models/client_dto_created_at_spec.rb +25 -0
  49. data/spec/models/client_dto_last_subscribed_at_spec.rb +25 -0
  50. data/spec/models/client_dto_spec.rb +100 -0
  51. data/spec/models/client_dto_updated_at_spec.rb +25 -0
  52. data/spec/models/client_info_res_dto_spec.rb +34 -0
  53. data/spec/models/connection_params_spec.rb +6 -0
  54. data/spec/models/connection_with_app_data_spec.rb +6 -0
  55. data/spec/models/create_connector_payload_dto_spec.rb +6 -0
  56. data/spec/models/expected_input_fields_dto_spec.rb +82 -0
  57. data/spec/models/get_connections_query_dto_spec.rb +6 -0
  58. data/spec/models/get_logs_dto_spec.rb +6 -0
  59. data/spec/models/ingest_data_dto_spec.rb +12 -0
  60. data/spec/models/initiate_connection_payload_dto_spec.rb +6 -0
  61. data/spec/models/list_triggers_query_dto_spec.rb +6 -0
  62. data/spec/models/sdk_error_res_dto_spec.rb +28 -0
  63. data/spec/models/session_info_dto_spec.rb +34 -0
  64. data/spec/models/tools_execute_req_dto_spec.rb +12 -0
  65. data/spec/models/trigger_response_dto_spec.rb +6 -0
  66. data/spec/models/update_connection_labels_payload_dto_spec.rb +28 -0
  67. metadata +32 -4
  68. data/spec/api/payment_api_spec.rb +0 -83
@@ -0,0 +1,266 @@
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 CLIApi
13
+ attr_accessor :api_client
14
+
15
+ def initialize(api_client = ApiClient.default)
16
+ @api_client = api_client
17
+ end
18
+
19
+ # Handle cli code exchange
20
+ #
21
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
22
+ def exchange_code(extra: {})
23
+ api_response = exchange_code_with_http_info_impl(extra)
24
+ api_response.data
25
+ end
26
+
27
+ # Handle cli code exchange
28
+ #
29
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
30
+ def exchange_code_with_http_info(extra: {})
31
+ exchange_code_with_http_info_impl(extra)
32
+ end
33
+
34
+ # Handle cli code exchange
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [GenerateCLISessionResDTO]
37
+ private def exchange_code_impl(opts = {})
38
+ data, _status_code, _headers = exchange_code_with_http_info(opts)
39
+ data
40
+ end
41
+
42
+ # Handle cli code exchange
43
+ # @param [Hash] opts the optional parameters
44
+ # @return [APIResponse] data is GenerateCLISessionResDTO, status code, headers and response
45
+ private def exchange_code_with_http_info_impl(opts = {})
46
+ if @api_client.config.debugging
47
+ @api_client.config.logger.debug 'Calling API: CLIApi.exchange_code ...'
48
+ end
49
+ # resource path
50
+ local_var_path = '/api/v1/cli/generate-cli-session'
51
+
52
+ # query parameters
53
+ query_params = opts[:query_params] || {}
54
+
55
+ # header parameters
56
+ header_params = opts[:header_params] || {}
57
+ # HTTP header 'Accept' (if needed)
58
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
59
+
60
+ # form parameters
61
+ form_params = opts[:form_params] || {}
62
+
63
+ # http body (model)
64
+ post_body = opts[:debug_body]
65
+
66
+ # return_type
67
+ return_type = opts[:debug_return_type] || 'GenerateCLISessionResDTO'
68
+
69
+ # auth_names
70
+ auth_names = opts[:debug_auth_names] || ['api_key']
71
+
72
+ new_options = opts.merge(
73
+ :operation => :"CLIApi.exchange_code",
74
+ :header_params => header_params,
75
+ :query_params => query_params,
76
+ :form_params => form_params,
77
+ :body => post_body,
78
+ :auth_names => auth_names,
79
+ :return_type => return_type
80
+ )
81
+
82
+ data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
83
+ if @api_client.config.debugging
84
+ @api_client.config.logger.debug "API called: CLIApi#exchange_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
85
+ end
86
+ APIResponse::new(data, status_code, headers, response)
87
+ end
88
+
89
+
90
+ # Get cli code
91
+ #
92
+ # @param key [String]
93
+ # @param code [String]
94
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
95
+ def get_code(key:, code: SENTINEL, extra: {})
96
+ extra[:code] = code if code != SENTINEL
97
+ api_response = get_code_with_http_info_impl(key, extra)
98
+ api_response.data
99
+ end
100
+
101
+ # Get cli code
102
+ #
103
+ # @param key [String]
104
+ # @param code [String]
105
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
106
+ def get_code_with_http_info(key:, code: SENTINEL, extra: {})
107
+ extra[:code] = code if code != SENTINEL
108
+ get_code_with_http_info_impl(key, extra)
109
+ end
110
+
111
+ # Get cli code
112
+ # @param key [String]
113
+ # @param [Hash] opts the optional parameters
114
+ # @option opts [String] :code
115
+ # @return [GetCLISessionResDTO]
116
+ private def get_code_impl(key, opts = {})
117
+ data, _status_code, _headers = get_code_with_http_info(key, opts)
118
+ data
119
+ end
120
+
121
+ # Get cli code
122
+ # @param key [String]
123
+ # @param [Hash] opts the optional parameters
124
+ # @option opts [String] :code
125
+ # @return [APIResponse] data is GetCLISessionResDTO, status code, headers and response
126
+ private def get_code_with_http_info_impl(key, opts = {})
127
+ if @api_client.config.debugging
128
+ @api_client.config.logger.debug 'Calling API: CLIApi.get_code ...'
129
+ end
130
+ # verify the required parameter 'key' is set
131
+ if @api_client.config.client_side_validation && key.nil?
132
+ fail ArgumentError, "Missing the required parameter 'key' when calling CLIApi.get_code"
133
+ end
134
+ # resource path
135
+ local_var_path = '/api/v1/cli/get-cli-code'
136
+
137
+ # query parameters
138
+ query_params = opts[:query_params] || {}
139
+ query_params[:'key'] = key
140
+ query_params[:'code'] = opts[:'code'] if !opts[:'code'].nil?
141
+
142
+ # header parameters
143
+ header_params = opts[:header_params] || {}
144
+ # HTTP header 'Accept' (if needed)
145
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
146
+
147
+ # form parameters
148
+ form_params = opts[:form_params] || {}
149
+
150
+ # http body (model)
151
+ post_body = opts[:debug_body]
152
+
153
+ # return_type
154
+ return_type = opts[:debug_return_type] || 'GetCLISessionResDTO'
155
+
156
+ # auth_names
157
+ auth_names = opts[:debug_auth_names] || ['api_key']
158
+
159
+ new_options = opts.merge(
160
+ :operation => :"CLIApi.get_code",
161
+ :header_params => header_params,
162
+ :query_params => query_params,
163
+ :form_params => form_params,
164
+ :body => post_body,
165
+ :auth_names => auth_names,
166
+ :return_type => return_type
167
+ )
168
+
169
+ data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
170
+ if @api_client.config.debugging
171
+ @api_client.config.logger.debug "API called: CLIApi#get_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
172
+ end
173
+ APIResponse::new(data, status_code, headers, response)
174
+ end
175
+
176
+
177
+ # Handle cli code verification
178
+ #
179
+ # @param key [String]
180
+ # @param code [String]
181
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
182
+ def verify_code(key:, code: SENTINEL, extra: {})
183
+ extra[:code] = code if code != SENTINEL
184
+ api_response = verify_code_with_http_info_impl(key, extra)
185
+ api_response.data
186
+ end
187
+
188
+ # Handle cli code verification
189
+ #
190
+ # @param key [String]
191
+ # @param code [String]
192
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
193
+ def verify_code_with_http_info(key:, code: SENTINEL, extra: {})
194
+ extra[:code] = code if code != SENTINEL
195
+ verify_code_with_http_info_impl(key, extra)
196
+ end
197
+
198
+ # Handle cli code verification
199
+ # @param key [String]
200
+ # @param [Hash] opts the optional parameters
201
+ # @option opts [String] :code
202
+ # @return [VerifyCLICodeResDTO]
203
+ private def verify_code_impl(key, opts = {})
204
+ data, _status_code, _headers = verify_code_with_http_info(key, opts)
205
+ data
206
+ end
207
+
208
+ # Handle cli code verification
209
+ # @param key [String]
210
+ # @param [Hash] opts the optional parameters
211
+ # @option opts [String] :code
212
+ # @return [APIResponse] data is VerifyCLICodeResDTO, status code, headers and response
213
+ private def verify_code_with_http_info_impl(key, opts = {})
214
+ if @api_client.config.debugging
215
+ @api_client.config.logger.debug 'Calling API: CLIApi.verify_code ...'
216
+ end
217
+ # verify the required parameter 'key' is set
218
+ if @api_client.config.client_side_validation && key.nil?
219
+ fail ArgumentError, "Missing the required parameter 'key' when calling CLIApi.verify_code"
220
+ end
221
+ # resource path
222
+ local_var_path = '/api/v1/cli/verify-cli-code'
223
+
224
+ # query parameters
225
+ query_params = opts[:query_params] || {}
226
+ query_params[:'key'] = key
227
+ query_params[:'code'] = opts[:'code'] if !opts[:'code'].nil?
228
+
229
+ # header parameters
230
+ header_params = opts[:header_params] || {}
231
+ # HTTP header 'Accept' (if needed)
232
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
233
+
234
+ # form parameters
235
+ form_params = opts[:form_params] || {}
236
+
237
+ # http body (model)
238
+ post_body = opts[:debug_body]
239
+
240
+ # return_type
241
+ return_type = opts[:debug_return_type] || 'VerifyCLICodeResDTO'
242
+
243
+ # auth_names
244
+ auth_names = opts[:debug_auth_names] || ['api_key']
245
+
246
+ new_options = opts.merge(
247
+ :operation => :"CLIApi.verify_code",
248
+ :header_params => header_params,
249
+ :query_params => query_params,
250
+ :form_params => form_params,
251
+ :body => post_body,
252
+ :auth_names => auth_names,
253
+ :return_type => return_type
254
+ )
255
+
256
+ data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
257
+ if @api_client.config.debugging
258
+ @api_client.config.logger.debug "API called: CLIApi#verify_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
259
+ end
260
+ APIResponse::new(data, status_code, headers, response)
261
+ end
262
+ end
263
+
264
+ # top-level client access to avoid having the user to insantiate their own API instances
265
+ CLI = CLIApi::new
266
+ end
@@ -462,20 +462,22 @@ module Composio
462
462
 
463
463
  # Initiate connection
464
464
  #
465
+ # @param data [Object]
465
466
  # @param integration_id [String]
466
- # @param data [String]
467
467
  # @param redirect_uri [String]
468
468
  # @param user_uuid [String]
469
469
  # @param entity_id [String]
470
+ # @param labels [Array<String>]
470
471
  # @param body [InitiateConnectionPayloadDto]
471
472
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
472
- def initiate(integration_id:, data: SENTINEL, redirect_uri: SENTINEL, user_uuid: SENTINEL, entity_id: SENTINEL, extra: {})
473
+ def initiate(data:, integration_id:, redirect_uri: SENTINEL, user_uuid: SENTINEL, entity_id: SENTINEL, labels: SENTINEL, extra: {})
473
474
  _body = {}
474
475
  _body[:data] = data if data != SENTINEL
475
476
  _body[:integrationId] = integration_id if integration_id != SENTINEL
476
477
  _body[:redirectUri] = redirect_uri if redirect_uri != SENTINEL
477
478
  _body[:userUuid] = user_uuid if user_uuid != SENTINEL
478
479
  _body[:entityId] = entity_id if entity_id != SENTINEL
480
+ _body[:labels] = labels if labels != SENTINEL
479
481
  extra[:initiate_connection_payload_dto] = _body if !_body.empty?
480
482
  api_response = initiate_with_http_info_impl(extra)
481
483
  api_response.data
@@ -483,20 +485,22 @@ module Composio
483
485
 
484
486
  # Initiate connection
485
487
  #
488
+ # @param data [Object]
486
489
  # @param integration_id [String]
487
- # @param data [String]
488
490
  # @param redirect_uri [String]
489
491
  # @param user_uuid [String]
490
492
  # @param entity_id [String]
493
+ # @param labels [Array<String>]
491
494
  # @param body [InitiateConnectionPayloadDto]
492
495
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
493
- def initiate_with_http_info(integration_id:, data: SENTINEL, redirect_uri: SENTINEL, user_uuid: SENTINEL, entity_id: SENTINEL, extra: {})
496
+ def initiate_with_http_info(data:, integration_id:, redirect_uri: SENTINEL, user_uuid: SENTINEL, entity_id: SENTINEL, labels: SENTINEL, extra: {})
494
497
  _body = {}
495
498
  _body[:data] = data if data != SENTINEL
496
499
  _body[:integrationId] = integration_id if integration_id != SENTINEL
497
500
  _body[:redirectUri] = redirect_uri if redirect_uri != SENTINEL
498
501
  _body[:userUuid] = user_uuid if user_uuid != SENTINEL
499
502
  _body[:entityId] = entity_id if entity_id != SENTINEL
503
+ _body[:labels] = labels if labels != SENTINEL
500
504
  extra[:initiate_connection_payload_dto] = _body if !_body.empty?
501
505
  initiate_with_http_info_impl(extra)
502
506
  end
@@ -575,8 +579,9 @@ module Composio
575
579
  # @param show_active_only [Boolean]
576
580
  # @param status [String]
577
581
  # @param show_disabled [Boolean]
582
+ # @param labels [Array<String>]
578
583
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
579
- def list(page: SENTINEL, page_size: SENTINEL, app_names: SENTINEL, integration_id: SENTINEL, connection_id: SENTINEL, user_uuid: SENTINEL, show_active_only: SENTINEL, status: SENTINEL, show_disabled: SENTINEL, extra: {})
584
+ def list(page: SENTINEL, page_size: SENTINEL, app_names: SENTINEL, integration_id: SENTINEL, connection_id: SENTINEL, user_uuid: SENTINEL, show_active_only: SENTINEL, status: SENTINEL, show_disabled: SENTINEL, labels: SENTINEL, extra: {})
580
585
  extra[:page] = page if page != SENTINEL
581
586
  extra[:page_size] = page_size if page_size != SENTINEL
582
587
  extra[:app_names] = app_names if app_names != SENTINEL
@@ -586,6 +591,7 @@ module Composio
586
591
  extra[:show_active_only] = show_active_only if show_active_only != SENTINEL
587
592
  extra[:status] = status if status != SENTINEL
588
593
  extra[:show_disabled] = show_disabled if show_disabled != SENTINEL
594
+ extra[:labels] = labels if labels != SENTINEL
589
595
  api_response = list_with_http_info_impl(extra)
590
596
  api_response.data
591
597
  end
@@ -601,8 +607,9 @@ module Composio
601
607
  # @param show_active_only [Boolean]
602
608
  # @param status [String]
603
609
  # @param show_disabled [Boolean]
610
+ # @param labels [Array<String>]
604
611
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
605
- def list_with_http_info(page: SENTINEL, page_size: SENTINEL, app_names: SENTINEL, integration_id: SENTINEL, connection_id: SENTINEL, user_uuid: SENTINEL, show_active_only: SENTINEL, status: SENTINEL, show_disabled: SENTINEL, extra: {})
612
+ def list_with_http_info(page: SENTINEL, page_size: SENTINEL, app_names: SENTINEL, integration_id: SENTINEL, connection_id: SENTINEL, user_uuid: SENTINEL, show_active_only: SENTINEL, status: SENTINEL, show_disabled: SENTINEL, labels: SENTINEL, extra: {})
606
613
  extra[:page] = page if page != SENTINEL
607
614
  extra[:page_size] = page_size if page_size != SENTINEL
608
615
  extra[:app_names] = app_names if app_names != SENTINEL
@@ -612,6 +619,7 @@ module Composio
612
619
  extra[:show_active_only] = show_active_only if show_active_only != SENTINEL
613
620
  extra[:status] = status if status != SENTINEL
614
621
  extra[:show_disabled] = show_disabled if show_disabled != SENTINEL
622
+ extra[:labels] = labels if labels != SENTINEL
615
623
  list_with_http_info_impl(extra)
616
624
  end
617
625
 
@@ -626,6 +634,7 @@ module Composio
626
634
  # @option opts [Boolean] :show_active_only
627
635
  # @option opts [String] :status
628
636
  # @option opts [Boolean] :show_disabled
637
+ # @option opts [Array<String>] :labels
629
638
  # @return [GetConnectionsResponseDto]
630
639
  private def list_impl(opts = {})
631
640
  data, _status_code, _headers = list_with_http_info(opts)
@@ -643,6 +652,7 @@ module Composio
643
652
  # @option opts [Boolean] :show_active_only
644
653
  # @option opts [String] :status
645
654
  # @option opts [Boolean] :show_disabled
655
+ # @option opts [Array<String>] :labels
646
656
  # @return [APIResponse] data is GetConnectionsResponseDto, status code, headers and response
647
657
  private def list_with_http_info_impl(opts = {})
648
658
  if @api_client.config.debugging
@@ -662,6 +672,7 @@ module Composio
662
672
  query_params[:'showActiveOnly'] = opts[:'show_active_only'] if !opts[:'show_active_only'].nil?
663
673
  query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
664
674
  query_params[:'showDisabled'] = opts[:'show_disabled'] if !opts[:'show_disabled'].nil?
675
+ query_params[:'labels'] = @api_client.build_collection_param(opts[:'labels'], :multi) if !opts[:'labels'].nil?
665
676
 
666
677
  # header parameters
667
678
  header_params = opts[:header_params] || {}
@@ -696,6 +707,113 @@ module Composio
696
707
  end
697
708
  APIResponse::new(data, status_code, headers, response)
698
709
  end
710
+
711
+
712
+ # Update connection data
713
+ #
714
+ # Update connection data
715
+ #
716
+ # @param labels [Array<String>]
717
+ # @param connected_account_id [String]
718
+ # @param body [UpdateConnectionLabelsPayloadDto]
719
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
720
+ def update_connection_data(labels:, connected_account_id:, extra: {})
721
+ _body = {}
722
+ _body[:labels] = labels if labels != SENTINEL
723
+ extra[:update_connection_labels_payload_dto] = _body if !_body.empty?
724
+ api_response = update_connection_data_with_http_info_impl(connected_account_id, extra)
725
+ api_response.data
726
+ end
727
+
728
+ # Update connection data
729
+ #
730
+ # Update connection data
731
+ #
732
+ # @param labels [Array<String>]
733
+ # @param connected_account_id [String]
734
+ # @param body [UpdateConnectionLabelsPayloadDto]
735
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
736
+ def update_connection_data_with_http_info(labels:, connected_account_id:, extra: {})
737
+ _body = {}
738
+ _body[:labels] = labels if labels != SENTINEL
739
+ extra[:update_connection_labels_payload_dto] = _body if !_body.empty?
740
+ update_connection_data_with_http_info_impl(connected_account_id, extra)
741
+ end
742
+
743
+ # Update connection data
744
+ # Update connection data
745
+ # @param connected_account_id [String]
746
+ # @param [Hash] opts the optional parameters
747
+ # @option opts [UpdateConnectionLabelsPayloadDto] :update_connection_labels_payload_dto UpdateConnectionLabelsPayloadDto
748
+ # @return [Object]
749
+ private def update_connection_data_impl(connected_account_id, opts = {})
750
+ data, _status_code, _headers = update_connection_data_with_http_info(connected_account_id, opts)
751
+ data
752
+ end
753
+
754
+ # Update connection data
755
+ # Update connection data
756
+ # @param connected_account_id [String]
757
+ # @param [Hash] opts the optional parameters
758
+ # @option opts [UpdateConnectionLabelsPayloadDto] :update_connection_labels_payload_dto UpdateConnectionLabelsPayloadDto
759
+ # @return [APIResponse] data is Object, status code, headers and response
760
+ private def update_connection_data_with_http_info_impl(connected_account_id, opts = {})
761
+ if @api_client.config.debugging
762
+ @api_client.config.logger.debug 'Calling API: ConnectionsApi.update_connection_data ...'
763
+ end
764
+ # verify the required parameter 'connected_account_id' is set
765
+ if @api_client.config.client_side_validation && connected_account_id.nil?
766
+ fail ArgumentError, "Missing the required parameter 'connected_account_id' when calling ConnectionsApi.update_connection_data"
767
+ end
768
+ pattern = Regexp.new(/[^\/#\?]+?/)
769
+ if @api_client.config.client_side_validation && connected_account_id !~ pattern
770
+ fail ArgumentError, "invalid value for 'connected_account_id' when calling ConnectionsApi.update_connection_data, must conform to the pattern #{pattern}."
771
+ end
772
+
773
+ # resource path
774
+ local_var_path = '/api/v1/connectedAccounts/{connectedAccountId}/data'.sub('{' + 'connectedAccountId' + '}', CGI.escape(connected_account_id.to_s))
775
+
776
+ # query parameters
777
+ query_params = opts[:query_params] || {}
778
+
779
+ # header parameters
780
+ header_params = opts[:header_params] || {}
781
+ # HTTP header 'Accept' (if needed)
782
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
783
+ # HTTP header 'Content-Type'
784
+ content_type = @api_client.select_header_content_type(['application/json'])
785
+ if !content_type.nil?
786
+ header_params['Content-Type'] = content_type
787
+ end
788
+
789
+ # form parameters
790
+ form_params = opts[:form_params] || {}
791
+
792
+ # http body (model)
793
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'update_connection_labels_payload_dto'])
794
+
795
+ # return_type
796
+ return_type = opts[:debug_return_type] || 'Object'
797
+
798
+ # auth_names
799
+ auth_names = opts[:debug_auth_names] || ['api_key']
800
+
801
+ new_options = opts.merge(
802
+ :operation => :"ConnectionsApi.update_connection_data",
803
+ :header_params => header_params,
804
+ :query_params => query_params,
805
+ :form_params => form_params,
806
+ :body => post_body,
807
+ :auth_names => auth_names,
808
+ :return_type => return_type
809
+ )
810
+
811
+ data, status_code, headers, response = @api_client.call_api(:PATCH, local_var_path, new_options)
812
+ if @api_client.config.debugging
813
+ @api_client.config.logger.debug "API called: ConnectionsApi#update_connection_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
814
+ end
815
+ APIResponse::new(data, status_code, headers, response)
816
+ end
699
817
  end
700
818
 
701
819
  # top-level client access to avoid having the user to insantiate their own API instances