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,345 @@
|
|
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 APIKeysApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Get single API key by ID
|
23
|
+
# @param company_id [String]
|
24
|
+
# @param api_key_id [String]
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [Object]
|
27
|
+
def companies_company_id_api_keys_api_key_id_get(company_id, api_key_id, opts = {})
|
28
|
+
data, _status_code, _headers = companies_company_id_api_keys_api_key_id_get_with_http_info(company_id, api_key_id, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Get single API key by ID
|
33
|
+
# @param company_id [String]
|
34
|
+
# @param api_key_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_api_keys_api_key_id_get_with_http_info(company_id, api_key_id, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: APIKeysApi.companies_company_id_api_keys_api_key_id_get ...'
|
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 APIKeysApi.companies_company_id_api_keys_api_key_id_get"
|
44
|
+
end
|
45
|
+
# verify the required parameter 'api_key_id' is set
|
46
|
+
if @api_client.config.client_side_validation && api_key_id.nil?
|
47
|
+
fail ArgumentError, "Missing the required parameter 'api_key_id' when calling APIKeysApi.companies_company_id_api_keys_api_key_id_get"
|
48
|
+
end
|
49
|
+
# resource path
|
50
|
+
local_var_path = '/companies/{company_id}/api-keys/{api_key_id}'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'api_key_id' + '}', CGI.escape(api_key_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 => :"APIKeysApi.companies_company_id_api_keys_api_key_id_get",
|
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(:GET, local_var_path, new_options)
|
83
|
+
if @api_client.config.debugging
|
84
|
+
@api_client.config.logger.debug "API called: APIKeysApi#companies_company_id_api_keys_api_key_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
85
|
+
end
|
86
|
+
return data, status_code, headers
|
87
|
+
end
|
88
|
+
|
89
|
+
# Update an existing API key by ID
|
90
|
+
# @param company_id [String]
|
91
|
+
# @param api_key_id [String]
|
92
|
+
# @param [Hash] opts the optional parameters
|
93
|
+
# @return [Object]
|
94
|
+
def companies_company_id_api_keys_api_key_id_patch(company_id, api_key_id, opts = {})
|
95
|
+
data, _status_code, _headers = companies_company_id_api_keys_api_key_id_patch_with_http_info(company_id, api_key_id, opts)
|
96
|
+
data
|
97
|
+
end
|
98
|
+
|
99
|
+
# Update an existing API key by ID
|
100
|
+
# @param company_id [String]
|
101
|
+
# @param api_key_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_api_keys_api_key_id_patch_with_http_info(company_id, api_key_id, opts = {})
|
105
|
+
if @api_client.config.debugging
|
106
|
+
@api_client.config.logger.debug 'Calling API: APIKeysApi.companies_company_id_api_keys_api_key_id_patch ...'
|
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 APIKeysApi.companies_company_id_api_keys_api_key_id_patch"
|
111
|
+
end
|
112
|
+
# verify the required parameter 'api_key_id' is set
|
113
|
+
if @api_client.config.client_side_validation && api_key_id.nil?
|
114
|
+
fail ArgumentError, "Missing the required parameter 'api_key_id' when calling APIKeysApi.companies_company_id_api_keys_api_key_id_patch"
|
115
|
+
end
|
116
|
+
# resource path
|
117
|
+
local_var_path = '/companies/{company_id}/api-keys/{api_key_id}'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'api_key_id' + '}', CGI.escape(api_key_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 => :"APIKeysApi.companies_company_id_api_keys_api_key_id_patch",
|
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(:PATCH, local_var_path, new_options)
|
150
|
+
if @api_client.config.debugging
|
151
|
+
@api_client.config.logger.debug "API called: APIKeysApi#companies_company_id_api_keys_api_key_id_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
152
|
+
end
|
153
|
+
return data, status_code, headers
|
154
|
+
end
|
155
|
+
|
156
|
+
# Get all API keys
|
157
|
+
# @param company_id [String]
|
158
|
+
# @param [Hash] opts the optional parameters
|
159
|
+
# @return [Object]
|
160
|
+
def companies_company_id_api_keys_get(company_id, opts = {})
|
161
|
+
data, _status_code, _headers = companies_company_id_api_keys_get_with_http_info(company_id, opts)
|
162
|
+
data
|
163
|
+
end
|
164
|
+
|
165
|
+
# Get all API keys
|
166
|
+
# @param company_id [String]
|
167
|
+
# @param [Hash] opts the optional parameters
|
168
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
169
|
+
def companies_company_id_api_keys_get_with_http_info(company_id, opts = {})
|
170
|
+
if @api_client.config.debugging
|
171
|
+
@api_client.config.logger.debug 'Calling API: APIKeysApi.companies_company_id_api_keys_get ...'
|
172
|
+
end
|
173
|
+
# verify the required parameter 'company_id' is set
|
174
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
175
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling APIKeysApi.companies_company_id_api_keys_get"
|
176
|
+
end
|
177
|
+
# resource path
|
178
|
+
local_var_path = '/companies/{company_id}/api-keys'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s))
|
179
|
+
|
180
|
+
# query parameters
|
181
|
+
query_params = opts[:query_params] || {}
|
182
|
+
|
183
|
+
# header parameters
|
184
|
+
header_params = opts[:header_params] || {}
|
185
|
+
# HTTP header 'Accept' (if needed)
|
186
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
187
|
+
|
188
|
+
# form parameters
|
189
|
+
form_params = opts[:form_params] || {}
|
190
|
+
|
191
|
+
# http body (model)
|
192
|
+
post_body = opts[:debug_body]
|
193
|
+
|
194
|
+
# return_type
|
195
|
+
return_type = opts[:debug_return_type] || 'Object'
|
196
|
+
|
197
|
+
# auth_names
|
198
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
199
|
+
|
200
|
+
new_options = opts.merge(
|
201
|
+
:operation => :"APIKeysApi.companies_company_id_api_keys_get",
|
202
|
+
:header_params => header_params,
|
203
|
+
:query_params => query_params,
|
204
|
+
:form_params => form_params,
|
205
|
+
:body => post_body,
|
206
|
+
:auth_names => auth_names,
|
207
|
+
:return_type => return_type
|
208
|
+
)
|
209
|
+
|
210
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
211
|
+
if @api_client.config.debugging
|
212
|
+
@api_client.config.logger.debug "API called: APIKeysApi#companies_company_id_api_keys_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
213
|
+
end
|
214
|
+
return data, status_code, headers
|
215
|
+
end
|
216
|
+
|
217
|
+
# Create single API key
|
218
|
+
# @param company_id [String]
|
219
|
+
# @param [Hash] opts the optional parameters
|
220
|
+
# @return [Object]
|
221
|
+
def companies_company_id_api_keys_post(company_id, opts = {})
|
222
|
+
data, _status_code, _headers = companies_company_id_api_keys_post_with_http_info(company_id, opts)
|
223
|
+
data
|
224
|
+
end
|
225
|
+
|
226
|
+
# Create single API key
|
227
|
+
# @param company_id [String]
|
228
|
+
# @param [Hash] opts the optional parameters
|
229
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
230
|
+
def companies_company_id_api_keys_post_with_http_info(company_id, opts = {})
|
231
|
+
if @api_client.config.debugging
|
232
|
+
@api_client.config.logger.debug 'Calling API: APIKeysApi.companies_company_id_api_keys_post ...'
|
233
|
+
end
|
234
|
+
# verify the required parameter 'company_id' is set
|
235
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
236
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling APIKeysApi.companies_company_id_api_keys_post"
|
237
|
+
end
|
238
|
+
# resource path
|
239
|
+
local_var_path = '/companies/{company_id}/api-keys'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s))
|
240
|
+
|
241
|
+
# query parameters
|
242
|
+
query_params = opts[:query_params] || {}
|
243
|
+
|
244
|
+
# header parameters
|
245
|
+
header_params = opts[:header_params] || {}
|
246
|
+
# HTTP header 'Accept' (if needed)
|
247
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
248
|
+
|
249
|
+
# form parameters
|
250
|
+
form_params = opts[:form_params] || {}
|
251
|
+
|
252
|
+
# http body (model)
|
253
|
+
post_body = opts[:debug_body]
|
254
|
+
|
255
|
+
# return_type
|
256
|
+
return_type = opts[:debug_return_type] || 'Object'
|
257
|
+
|
258
|
+
# auth_names
|
259
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
260
|
+
|
261
|
+
new_options = opts.merge(
|
262
|
+
:operation => :"APIKeysApi.companies_company_id_api_keys_post",
|
263
|
+
:header_params => header_params,
|
264
|
+
:query_params => query_params,
|
265
|
+
:form_params => form_params,
|
266
|
+
:body => post_body,
|
267
|
+
:auth_names => auth_names,
|
268
|
+
:return_type => return_type
|
269
|
+
)
|
270
|
+
|
271
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
272
|
+
if @api_client.config.debugging
|
273
|
+
@api_client.config.logger.debug "API called: APIKeysApi#companies_company_id_api_keys_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
274
|
+
end
|
275
|
+
return data, status_code, headers
|
276
|
+
end
|
277
|
+
|
278
|
+
# Delete single API key by token
|
279
|
+
# @param company_id [String]
|
280
|
+
# @param token [String]
|
281
|
+
# @param [Hash] opts the optional parameters
|
282
|
+
# @return [Object]
|
283
|
+
def companies_company_id_api_keys_token_delete(company_id, token, opts = {})
|
284
|
+
data, _status_code, _headers = companies_company_id_api_keys_token_delete_with_http_info(company_id, token, opts)
|
285
|
+
data
|
286
|
+
end
|
287
|
+
|
288
|
+
# Delete single API key by token
|
289
|
+
# @param company_id [String]
|
290
|
+
# @param token [String]
|
291
|
+
# @param [Hash] opts the optional parameters
|
292
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
293
|
+
def companies_company_id_api_keys_token_delete_with_http_info(company_id, token, opts = {})
|
294
|
+
if @api_client.config.debugging
|
295
|
+
@api_client.config.logger.debug 'Calling API: APIKeysApi.companies_company_id_api_keys_token_delete ...'
|
296
|
+
end
|
297
|
+
# verify the required parameter 'company_id' is set
|
298
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
299
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling APIKeysApi.companies_company_id_api_keys_token_delete"
|
300
|
+
end
|
301
|
+
# verify the required parameter 'token' is set
|
302
|
+
if @api_client.config.client_side_validation && token.nil?
|
303
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling APIKeysApi.companies_company_id_api_keys_token_delete"
|
304
|
+
end
|
305
|
+
# resource path
|
306
|
+
local_var_path = '/companies/{company_id}/api-keys/{token}'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'token' + '}', CGI.escape(token.to_s))
|
307
|
+
|
308
|
+
# query parameters
|
309
|
+
query_params = opts[:query_params] || {}
|
310
|
+
|
311
|
+
# header parameters
|
312
|
+
header_params = opts[:header_params] || {}
|
313
|
+
# HTTP header 'Accept' (if needed)
|
314
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
315
|
+
|
316
|
+
# form parameters
|
317
|
+
form_params = opts[:form_params] || {}
|
318
|
+
|
319
|
+
# http body (model)
|
320
|
+
post_body = opts[:debug_body]
|
321
|
+
|
322
|
+
# return_type
|
323
|
+
return_type = opts[:debug_return_type] || 'Object'
|
324
|
+
|
325
|
+
# auth_names
|
326
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
327
|
+
|
328
|
+
new_options = opts.merge(
|
329
|
+
:operation => :"APIKeysApi.companies_company_id_api_keys_token_delete",
|
330
|
+
:header_params => header_params,
|
331
|
+
:query_params => query_params,
|
332
|
+
:form_params => form_params,
|
333
|
+
:body => post_body,
|
334
|
+
:auth_names => auth_names,
|
335
|
+
:return_type => return_type
|
336
|
+
)
|
337
|
+
|
338
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
339
|
+
if @api_client.config.debugging
|
340
|
+
@api_client.config.logger.debug "API called: APIKeysApi#companies_company_id_api_keys_token_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
341
|
+
end
|
342
|
+
return data, status_code, headers
|
343
|
+
end
|
344
|
+
end
|
345
|
+
end
|