spartera_api_sdk 1.0.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +11 -0
- data/Gemfile.lock +69 -0
- data/LICENSE +21 -0
- data/README.md +360 -0
- data/Rakefile +10 -0
- data/config.json +10 -0
- data/docs/APIKeysApi.md +353 -0
- data/docs/Alert.md +36 -0
- data/docs/AlertsApi.md +511 -0
- data/docs/Apikey.md +36 -0
- data/docs/Asset.md +110 -0
- data/docs/AssetPriceHistoryApi.md +573 -0
- data/docs/Assetpricehistory.md +38 -0
- data/docs/AssetsApi.md +1131 -0
- data/docs/CloudProvidersApi.md +341 -0
- data/docs/Cloudprovider.md +30 -0
- data/docs/CompaniesApi.md +619 -0
- data/docs/Company.md +44 -0
- data/docs/Connection.md +54 -0
- data/docs/ConnectionsApi.md +497 -0
- data/docs/Error.md +24 -0
- data/docs/Favorite.md +36 -0
- data/docs/FavoritesApi.md +581 -0
- data/docs/InlineObject.md +22 -0
- data/docs/InlineObject1.md +20 -0
- data/docs/InlineObject2.md +20 -0
- data/docs/InlineObject3.md +20 -0
- data/docs/User.md +34 -0
- data/docs/UsersApi.md +357 -0
- data/example.rb +51 -0
- data/git_push.sh +57 -0
- data/lib/spartera_api_sdk/api/alerts_api.rb +543 -0
- data/lib/spartera_api_sdk/api/api_keys_api.rb +345 -0
- data/lib/spartera_api_sdk/api/asset_price_history_api.rb +576 -0
- data/lib/spartera_api_sdk/api/assets_api.rb +1106 -0
- data/lib/spartera_api_sdk/api/cloud_providers_api.rb +315 -0
- data/lib/spartera_api_sdk/api/companies_api.rb +571 -0
- data/lib/spartera_api_sdk/api/connections_api.rb +501 -0
- data/lib/spartera_api_sdk/api/favorites_api.rb +610 -0
- data/lib/spartera_api_sdk/api/users_api.rb +367 -0
- data/lib/spartera_api_sdk/api_client.rb +393 -0
- data/lib/spartera_api_sdk/api_error.rb +58 -0
- data/lib/spartera_api_sdk/configuration.rb +320 -0
- data/lib/spartera_api_sdk/models/alert.rb +353 -0
- data/lib/spartera_api_sdk/models/apikey.rb +370 -0
- data/lib/spartera_api_sdk/models/asset.rb +686 -0
- data/lib/spartera_api_sdk/models/assetpricehistory.rb +345 -0
- data/lib/spartera_api_sdk/models/cloudprovider.rb +292 -0
- data/lib/spartera_api_sdk/models/company.rb +389 -0
- data/lib/spartera_api_sdk/models/connection.rb +434 -0
- data/lib/spartera_api_sdk/models/error.rb +285 -0
- data/lib/spartera_api_sdk/models/favorite.rb +353 -0
- data/lib/spartera_api_sdk/models/inline_object.rb +240 -0
- data/lib/spartera_api_sdk/models/inline_object1.rb +229 -0
- data/lib/spartera_api_sdk/models/inline_object2.rb +229 -0
- data/lib/spartera_api_sdk/models/inline_object3.rb +229 -0
- data/lib/spartera_api_sdk/models/user.rb +327 -0
- data/lib/spartera_api_sdk/version.rb +15 -0
- data/lib/spartera_api_sdk.rb +62 -0
- data/spartera_api_sdk.gemspec +28 -0
- data/spec/api/alerts_api_spec.rb +126 -0
- data/spec/api/api_keys_api_spec.rb +93 -0
- data/spec/api/asset_price_history_api_spec.rb +134 -0
- data/spec/api/assets_api_spec.rb +228 -0
- data/spec/api/cloud_providers_api_spec.rb +88 -0
- data/spec/api/companies_api_spec.rb +134 -0
- data/spec/api/connections_api_spec.rb +119 -0
- data/spec/api/favorites_api_spec.rb +138 -0
- data/spec/api/users_api_spec.rb +95 -0
- data/spec/models/alert_spec.rb +90 -0
- data/spec/models/apikey_spec.rb +90 -0
- data/spec/models/asset_spec.rb +312 -0
- data/spec/models/assetpricehistory_spec.rb +96 -0
- data/spec/models/cloudprovider_spec.rb +72 -0
- data/spec/models/company_spec.rb +114 -0
- data/spec/models/connection_spec.rb +144 -0
- data/spec/models/error_spec.rb +54 -0
- data/spec/models/favorite_spec.rb +90 -0
- data/spec/models/inline_object1_spec.rb +42 -0
- data/spec/models/inline_object2_spec.rb +42 -0
- data/spec/models/inline_object3_spec.rb +42 -0
- data/spec/models/inline_object_spec.rb +48 -0
- data/spec/models/user_spec.rb +84 -0
- data/spec/spec_helper.rb +111 -0
- data/test.sh +42 -0
- metadata +204 -0
@@ -0,0 +1,501 @@
|
|
1
|
+
=begin
|
2
|
+
#Spartera API Documentation
|
3
|
+
|
4
|
+
#Auto-generated API documentation for REST services of the Spartera platform
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 0.0.0
|
7
|
+
Contact: support@spartera.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.13.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module SparteraApiSdk
|
16
|
+
class ConnectionsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Delete single connection by ID
|
23
|
+
# @param company_id [String]
|
24
|
+
# @param connection_id [String]
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [Object]
|
27
|
+
def companies_company_id_connections_connection_id_delete(company_id, connection_id, opts = {})
|
28
|
+
data, _status_code, _headers = companies_company_id_connections_connection_id_delete_with_http_info(company_id, connection_id, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Delete single connection by ID
|
33
|
+
# @param company_id [String]
|
34
|
+
# @param connection_id [String]
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
37
|
+
def companies_company_id_connections_connection_id_delete_with_http_info(company_id, connection_id, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: ConnectionsApi.companies_company_id_connections_connection_id_delete ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'company_id' is set
|
42
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling ConnectionsApi.companies_company_id_connections_connection_id_delete"
|
44
|
+
end
|
45
|
+
# verify the required parameter 'connection_id' is set
|
46
|
+
if @api_client.config.client_side_validation && connection_id.nil?
|
47
|
+
fail ArgumentError, "Missing the required parameter 'connection_id' when calling ConnectionsApi.companies_company_id_connections_connection_id_delete"
|
48
|
+
end
|
49
|
+
# resource path
|
50
|
+
local_var_path = '/companies/{company_id}/connections/{connection_id}'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'connection_id' + '}', CGI.escape(connection_id.to_s))
|
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']) unless header_params['Accept']
|
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] || 'Object'
|
68
|
+
|
69
|
+
# auth_names
|
70
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
71
|
+
|
72
|
+
new_options = opts.merge(
|
73
|
+
:operation => :"ConnectionsApi.companies_company_id_connections_connection_id_delete",
|
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 = @api_client.call_api(:DELETE, local_var_path, new_options)
|
83
|
+
if @api_client.config.debugging
|
84
|
+
@api_client.config.logger.debug "API called: ConnectionsApi#companies_company_id_connections_connection_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
85
|
+
end
|
86
|
+
return data, status_code, headers
|
87
|
+
end
|
88
|
+
|
89
|
+
# Get single connection by ID
|
90
|
+
# @param company_id [String]
|
91
|
+
# @param connection_id [String]
|
92
|
+
# @param [Hash] opts the optional parameters
|
93
|
+
# @return [Object]
|
94
|
+
def companies_company_id_connections_connection_id_get(company_id, connection_id, opts = {})
|
95
|
+
data, _status_code, _headers = companies_company_id_connections_connection_id_get_with_http_info(company_id, connection_id, opts)
|
96
|
+
data
|
97
|
+
end
|
98
|
+
|
99
|
+
# Get single connection by ID
|
100
|
+
# @param company_id [String]
|
101
|
+
# @param connection_id [String]
|
102
|
+
# @param [Hash] opts the optional parameters
|
103
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
104
|
+
def companies_company_id_connections_connection_id_get_with_http_info(company_id, connection_id, opts = {})
|
105
|
+
if @api_client.config.debugging
|
106
|
+
@api_client.config.logger.debug 'Calling API: ConnectionsApi.companies_company_id_connections_connection_id_get ...'
|
107
|
+
end
|
108
|
+
# verify the required parameter 'company_id' is set
|
109
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
110
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling ConnectionsApi.companies_company_id_connections_connection_id_get"
|
111
|
+
end
|
112
|
+
# verify the required parameter 'connection_id' is set
|
113
|
+
if @api_client.config.client_side_validation && connection_id.nil?
|
114
|
+
fail ArgumentError, "Missing the required parameter 'connection_id' when calling ConnectionsApi.companies_company_id_connections_connection_id_get"
|
115
|
+
end
|
116
|
+
# resource path
|
117
|
+
local_var_path = '/companies/{company_id}/connections/{connection_id}'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'connection_id' + '}', CGI.escape(connection_id.to_s))
|
118
|
+
|
119
|
+
# query parameters
|
120
|
+
query_params = opts[:query_params] || {}
|
121
|
+
|
122
|
+
# header parameters
|
123
|
+
header_params = opts[:header_params] || {}
|
124
|
+
# HTTP header 'Accept' (if needed)
|
125
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
126
|
+
|
127
|
+
# form parameters
|
128
|
+
form_params = opts[:form_params] || {}
|
129
|
+
|
130
|
+
# http body (model)
|
131
|
+
post_body = opts[:debug_body]
|
132
|
+
|
133
|
+
# return_type
|
134
|
+
return_type = opts[:debug_return_type] || 'Object'
|
135
|
+
|
136
|
+
# auth_names
|
137
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
138
|
+
|
139
|
+
new_options = opts.merge(
|
140
|
+
:operation => :"ConnectionsApi.companies_company_id_connections_connection_id_get",
|
141
|
+
:header_params => header_params,
|
142
|
+
:query_params => query_params,
|
143
|
+
:form_params => form_params,
|
144
|
+
:body => post_body,
|
145
|
+
:auth_names => auth_names,
|
146
|
+
:return_type => return_type
|
147
|
+
)
|
148
|
+
|
149
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
150
|
+
if @api_client.config.debugging
|
151
|
+
@api_client.config.logger.debug "API called: ConnectionsApi#companies_company_id_connections_connection_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
152
|
+
end
|
153
|
+
return data, status_code, headers
|
154
|
+
end
|
155
|
+
|
156
|
+
# Retrieve the information schema for the specified connection
|
157
|
+
# @param company_id [String]
|
158
|
+
# @param connection_id [String]
|
159
|
+
# @param [Hash] opts the optional parameters
|
160
|
+
# @return [Object]
|
161
|
+
def companies_company_id_connections_connection_id_infoschema_get(company_id, connection_id, opts = {})
|
162
|
+
data, _status_code, _headers = companies_company_id_connections_connection_id_infoschema_get_with_http_info(company_id, connection_id, opts)
|
163
|
+
data
|
164
|
+
end
|
165
|
+
|
166
|
+
# Retrieve the information schema for the specified connection
|
167
|
+
# @param company_id [String]
|
168
|
+
# @param connection_id [String]
|
169
|
+
# @param [Hash] opts the optional parameters
|
170
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
171
|
+
def companies_company_id_connections_connection_id_infoschema_get_with_http_info(company_id, connection_id, opts = {})
|
172
|
+
if @api_client.config.debugging
|
173
|
+
@api_client.config.logger.debug 'Calling API: ConnectionsApi.companies_company_id_connections_connection_id_infoschema_get ...'
|
174
|
+
end
|
175
|
+
# verify the required parameter 'company_id' is set
|
176
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
177
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling ConnectionsApi.companies_company_id_connections_connection_id_infoschema_get"
|
178
|
+
end
|
179
|
+
# verify the required parameter 'connection_id' is set
|
180
|
+
if @api_client.config.client_side_validation && connection_id.nil?
|
181
|
+
fail ArgumentError, "Missing the required parameter 'connection_id' when calling ConnectionsApi.companies_company_id_connections_connection_id_infoschema_get"
|
182
|
+
end
|
183
|
+
# resource path
|
184
|
+
local_var_path = '/companies/{company_id}/connections/{connection_id}/infoschema'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'connection_id' + '}', CGI.escape(connection_id.to_s))
|
185
|
+
|
186
|
+
# query parameters
|
187
|
+
query_params = opts[:query_params] || {}
|
188
|
+
|
189
|
+
# header parameters
|
190
|
+
header_params = opts[:header_params] || {}
|
191
|
+
# HTTP header 'Accept' (if needed)
|
192
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
193
|
+
|
194
|
+
# form parameters
|
195
|
+
form_params = opts[:form_params] || {}
|
196
|
+
|
197
|
+
# http body (model)
|
198
|
+
post_body = opts[:debug_body]
|
199
|
+
|
200
|
+
# return_type
|
201
|
+
return_type = opts[:debug_return_type] || 'Object'
|
202
|
+
|
203
|
+
# auth_names
|
204
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
205
|
+
|
206
|
+
new_options = opts.merge(
|
207
|
+
:operation => :"ConnectionsApi.companies_company_id_connections_connection_id_infoschema_get",
|
208
|
+
:header_params => header_params,
|
209
|
+
:query_params => query_params,
|
210
|
+
:form_params => form_params,
|
211
|
+
:body => post_body,
|
212
|
+
:auth_names => auth_names,
|
213
|
+
:return_type => return_type
|
214
|
+
)
|
215
|
+
|
216
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
217
|
+
if @api_client.config.debugging
|
218
|
+
@api_client.config.logger.debug "API called: ConnectionsApi#companies_company_id_connections_connection_id_infoschema_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
219
|
+
end
|
220
|
+
return data, status_code, headers
|
221
|
+
end
|
222
|
+
|
223
|
+
# Update an existing connection by ID
|
224
|
+
# @param company_id [String]
|
225
|
+
# @param connection_id [String]
|
226
|
+
# @param connection [Connection]
|
227
|
+
# @param [Hash] opts the optional parameters
|
228
|
+
# @return [Object]
|
229
|
+
def companies_company_id_connections_connection_id_patch(company_id, connection_id, connection, opts = {})
|
230
|
+
data, _status_code, _headers = companies_company_id_connections_connection_id_patch_with_http_info(company_id, connection_id, connection, opts)
|
231
|
+
data
|
232
|
+
end
|
233
|
+
|
234
|
+
# Update an existing connection by ID
|
235
|
+
# @param company_id [String]
|
236
|
+
# @param connection_id [String]
|
237
|
+
# @param connection [Connection]
|
238
|
+
# @param [Hash] opts the optional parameters
|
239
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
240
|
+
def companies_company_id_connections_connection_id_patch_with_http_info(company_id, connection_id, connection, opts = {})
|
241
|
+
if @api_client.config.debugging
|
242
|
+
@api_client.config.logger.debug 'Calling API: ConnectionsApi.companies_company_id_connections_connection_id_patch ...'
|
243
|
+
end
|
244
|
+
# verify the required parameter 'company_id' is set
|
245
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
246
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling ConnectionsApi.companies_company_id_connections_connection_id_patch"
|
247
|
+
end
|
248
|
+
# verify the required parameter 'connection_id' is set
|
249
|
+
if @api_client.config.client_side_validation && connection_id.nil?
|
250
|
+
fail ArgumentError, "Missing the required parameter 'connection_id' when calling ConnectionsApi.companies_company_id_connections_connection_id_patch"
|
251
|
+
end
|
252
|
+
# verify the required parameter 'connection' is set
|
253
|
+
if @api_client.config.client_side_validation && connection.nil?
|
254
|
+
fail ArgumentError, "Missing the required parameter 'connection' when calling ConnectionsApi.companies_company_id_connections_connection_id_patch"
|
255
|
+
end
|
256
|
+
# resource path
|
257
|
+
local_var_path = '/companies/{company_id}/connections/{connection_id}'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'connection_id' + '}', CGI.escape(connection_id.to_s))
|
258
|
+
|
259
|
+
# query parameters
|
260
|
+
query_params = opts[:query_params] || {}
|
261
|
+
|
262
|
+
# header parameters
|
263
|
+
header_params = opts[:header_params] || {}
|
264
|
+
# HTTP header 'Accept' (if needed)
|
265
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
266
|
+
# HTTP header 'Content-Type'
|
267
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
268
|
+
if !content_type.nil?
|
269
|
+
header_params['Content-Type'] = content_type
|
270
|
+
end
|
271
|
+
|
272
|
+
# form parameters
|
273
|
+
form_params = opts[:form_params] || {}
|
274
|
+
|
275
|
+
# http body (model)
|
276
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(connection)
|
277
|
+
|
278
|
+
# return_type
|
279
|
+
return_type = opts[:debug_return_type] || 'Object'
|
280
|
+
|
281
|
+
# auth_names
|
282
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
283
|
+
|
284
|
+
new_options = opts.merge(
|
285
|
+
:operation => :"ConnectionsApi.companies_company_id_connections_connection_id_patch",
|
286
|
+
:header_params => header_params,
|
287
|
+
:query_params => query_params,
|
288
|
+
:form_params => form_params,
|
289
|
+
:body => post_body,
|
290
|
+
:auth_names => auth_names,
|
291
|
+
:return_type => return_type
|
292
|
+
)
|
293
|
+
|
294
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
295
|
+
if @api_client.config.debugging
|
296
|
+
@api_client.config.logger.debug "API called: ConnectionsApi#companies_company_id_connections_connection_id_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
297
|
+
end
|
298
|
+
return data, status_code, headers
|
299
|
+
end
|
300
|
+
|
301
|
+
# Verify the specified connection to ensure it is functioning correctly
|
302
|
+
# @param company_id [String]
|
303
|
+
# @param connection_id [String]
|
304
|
+
# @param [Hash] opts the optional parameters
|
305
|
+
# @return [Object]
|
306
|
+
def companies_company_id_connections_connection_id_test_get(company_id, connection_id, opts = {})
|
307
|
+
data, _status_code, _headers = companies_company_id_connections_connection_id_test_get_with_http_info(company_id, connection_id, opts)
|
308
|
+
data
|
309
|
+
end
|
310
|
+
|
311
|
+
# Verify the specified connection to ensure it is functioning correctly
|
312
|
+
# @param company_id [String]
|
313
|
+
# @param connection_id [String]
|
314
|
+
# @param [Hash] opts the optional parameters
|
315
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
316
|
+
def companies_company_id_connections_connection_id_test_get_with_http_info(company_id, connection_id, opts = {})
|
317
|
+
if @api_client.config.debugging
|
318
|
+
@api_client.config.logger.debug 'Calling API: ConnectionsApi.companies_company_id_connections_connection_id_test_get ...'
|
319
|
+
end
|
320
|
+
# verify the required parameter 'company_id' is set
|
321
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
322
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling ConnectionsApi.companies_company_id_connections_connection_id_test_get"
|
323
|
+
end
|
324
|
+
# verify the required parameter 'connection_id' is set
|
325
|
+
if @api_client.config.client_side_validation && connection_id.nil?
|
326
|
+
fail ArgumentError, "Missing the required parameter 'connection_id' when calling ConnectionsApi.companies_company_id_connections_connection_id_test_get"
|
327
|
+
end
|
328
|
+
# resource path
|
329
|
+
local_var_path = '/companies/{company_id}/connections/{connection_id}/test'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'connection_id' + '}', CGI.escape(connection_id.to_s))
|
330
|
+
|
331
|
+
# query parameters
|
332
|
+
query_params = opts[:query_params] || {}
|
333
|
+
|
334
|
+
# header parameters
|
335
|
+
header_params = opts[:header_params] || {}
|
336
|
+
# HTTP header 'Accept' (if needed)
|
337
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
338
|
+
|
339
|
+
# form parameters
|
340
|
+
form_params = opts[:form_params] || {}
|
341
|
+
|
342
|
+
# http body (model)
|
343
|
+
post_body = opts[:debug_body]
|
344
|
+
|
345
|
+
# return_type
|
346
|
+
return_type = opts[:debug_return_type] || 'Object'
|
347
|
+
|
348
|
+
# auth_names
|
349
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
350
|
+
|
351
|
+
new_options = opts.merge(
|
352
|
+
:operation => :"ConnectionsApi.companies_company_id_connections_connection_id_test_get",
|
353
|
+
:header_params => header_params,
|
354
|
+
:query_params => query_params,
|
355
|
+
:form_params => form_params,
|
356
|
+
:body => post_body,
|
357
|
+
:auth_names => auth_names,
|
358
|
+
:return_type => return_type
|
359
|
+
)
|
360
|
+
|
361
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
362
|
+
if @api_client.config.debugging
|
363
|
+
@api_client.config.logger.debug "API called: ConnectionsApi#companies_company_id_connections_connection_id_test_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
364
|
+
end
|
365
|
+
return data, status_code, headers
|
366
|
+
end
|
367
|
+
|
368
|
+
# Get all connections for a specific company
|
369
|
+
# @param company_id [String]
|
370
|
+
# @param [Hash] opts the optional parameters
|
371
|
+
# @return [Object]
|
372
|
+
def companies_company_id_connections_get(company_id, opts = {})
|
373
|
+
data, _status_code, _headers = companies_company_id_connections_get_with_http_info(company_id, opts)
|
374
|
+
data
|
375
|
+
end
|
376
|
+
|
377
|
+
# Get all connections for a specific company
|
378
|
+
# @param company_id [String]
|
379
|
+
# @param [Hash] opts the optional parameters
|
380
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
381
|
+
def companies_company_id_connections_get_with_http_info(company_id, opts = {})
|
382
|
+
if @api_client.config.debugging
|
383
|
+
@api_client.config.logger.debug 'Calling API: ConnectionsApi.companies_company_id_connections_get ...'
|
384
|
+
end
|
385
|
+
# verify the required parameter 'company_id' is set
|
386
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
387
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling ConnectionsApi.companies_company_id_connections_get"
|
388
|
+
end
|
389
|
+
# resource path
|
390
|
+
local_var_path = '/companies/{company_id}/connections'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s))
|
391
|
+
|
392
|
+
# query parameters
|
393
|
+
query_params = opts[:query_params] || {}
|
394
|
+
|
395
|
+
# header parameters
|
396
|
+
header_params = opts[:header_params] || {}
|
397
|
+
# HTTP header 'Accept' (if needed)
|
398
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
399
|
+
|
400
|
+
# form parameters
|
401
|
+
form_params = opts[:form_params] || {}
|
402
|
+
|
403
|
+
# http body (model)
|
404
|
+
post_body = opts[:debug_body]
|
405
|
+
|
406
|
+
# return_type
|
407
|
+
return_type = opts[:debug_return_type] || 'Object'
|
408
|
+
|
409
|
+
# auth_names
|
410
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
411
|
+
|
412
|
+
new_options = opts.merge(
|
413
|
+
:operation => :"ConnectionsApi.companies_company_id_connections_get",
|
414
|
+
:header_params => header_params,
|
415
|
+
:query_params => query_params,
|
416
|
+
:form_params => form_params,
|
417
|
+
:body => post_body,
|
418
|
+
:auth_names => auth_names,
|
419
|
+
:return_type => return_type
|
420
|
+
)
|
421
|
+
|
422
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
423
|
+
if @api_client.config.debugging
|
424
|
+
@api_client.config.logger.debug "API called: ConnectionsApi#companies_company_id_connections_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
425
|
+
end
|
426
|
+
return data, status_code, headers
|
427
|
+
end
|
428
|
+
|
429
|
+
# Create a new connection by ID
|
430
|
+
# @param company_id [String]
|
431
|
+
# @param connection [Connection]
|
432
|
+
# @param [Hash] opts the optional parameters
|
433
|
+
# @return [Object]
|
434
|
+
def companies_company_id_connections_post(company_id, connection, opts = {})
|
435
|
+
data, _status_code, _headers = companies_company_id_connections_post_with_http_info(company_id, connection, opts)
|
436
|
+
data
|
437
|
+
end
|
438
|
+
|
439
|
+
# Create a new connection by ID
|
440
|
+
# @param company_id [String]
|
441
|
+
# @param connection [Connection]
|
442
|
+
# @param [Hash] opts the optional parameters
|
443
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
444
|
+
def companies_company_id_connections_post_with_http_info(company_id, connection, opts = {})
|
445
|
+
if @api_client.config.debugging
|
446
|
+
@api_client.config.logger.debug 'Calling API: ConnectionsApi.companies_company_id_connections_post ...'
|
447
|
+
end
|
448
|
+
# verify the required parameter 'company_id' is set
|
449
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
450
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling ConnectionsApi.companies_company_id_connections_post"
|
451
|
+
end
|
452
|
+
# verify the required parameter 'connection' is set
|
453
|
+
if @api_client.config.client_side_validation && connection.nil?
|
454
|
+
fail ArgumentError, "Missing the required parameter 'connection' when calling ConnectionsApi.companies_company_id_connections_post"
|
455
|
+
end
|
456
|
+
# resource path
|
457
|
+
local_var_path = '/companies/{company_id}/connections'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s))
|
458
|
+
|
459
|
+
# query parameters
|
460
|
+
query_params = opts[:query_params] || {}
|
461
|
+
|
462
|
+
# header parameters
|
463
|
+
header_params = opts[:header_params] || {}
|
464
|
+
# HTTP header 'Accept' (if needed)
|
465
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
466
|
+
# HTTP header 'Content-Type'
|
467
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
468
|
+
if !content_type.nil?
|
469
|
+
header_params['Content-Type'] = content_type
|
470
|
+
end
|
471
|
+
|
472
|
+
# form parameters
|
473
|
+
form_params = opts[:form_params] || {}
|
474
|
+
|
475
|
+
# http body (model)
|
476
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(connection)
|
477
|
+
|
478
|
+
# return_type
|
479
|
+
return_type = opts[:debug_return_type] || 'Object'
|
480
|
+
|
481
|
+
# auth_names
|
482
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
483
|
+
|
484
|
+
new_options = opts.merge(
|
485
|
+
:operation => :"ConnectionsApi.companies_company_id_connections_post",
|
486
|
+
:header_params => header_params,
|
487
|
+
:query_params => query_params,
|
488
|
+
:form_params => form_params,
|
489
|
+
:body => post_body,
|
490
|
+
:auth_names => auth_names,
|
491
|
+
:return_type => return_type
|
492
|
+
)
|
493
|
+
|
494
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
495
|
+
if @api_client.config.debugging
|
496
|
+
@api_client.config.logger.debug "API called: ConnectionsApi#companies_company_id_connections_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
497
|
+
end
|
498
|
+
return data, status_code, headers
|
499
|
+
end
|
500
|
+
end
|
501
|
+
end
|