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
data/docs/APIKeysApi.md
ADDED
@@ -0,0 +1,353 @@
|
|
1
|
+
# SparteraApiSdk::APIKeysApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.spartera.com*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**companies_company_id_api_keys_api_key_id_get**](APIKeysApi.md#companies_company_id_api_keys_api_key_id_get) | **GET** /companies/{company_id}/api-keys/{api_key_id} | Get single API key by ID |
|
8
|
+
| [**companies_company_id_api_keys_api_key_id_patch**](APIKeysApi.md#companies_company_id_api_keys_api_key_id_patch) | **PATCH** /companies/{company_id}/api-keys/{api_key_id} | Update an existing API key by ID |
|
9
|
+
| [**companies_company_id_api_keys_get**](APIKeysApi.md#companies_company_id_api_keys_get) | **GET** /companies/{company_id}/api-keys | Get all API keys |
|
10
|
+
| [**companies_company_id_api_keys_post**](APIKeysApi.md#companies_company_id_api_keys_post) | **POST** /companies/{company_id}/api-keys | Create single API key |
|
11
|
+
| [**companies_company_id_api_keys_token_delete**](APIKeysApi.md#companies_company_id_api_keys_token_delete) | **DELETE** /companies/{company_id}/api-keys/{token} | Delete single API key by token |
|
12
|
+
|
13
|
+
|
14
|
+
## companies_company_id_api_keys_api_key_id_get
|
15
|
+
|
16
|
+
> Object companies_company_id_api_keys_api_key_id_get(company_id, api_key_id)
|
17
|
+
|
18
|
+
Get single API key by ID
|
19
|
+
|
20
|
+
### Examples
|
21
|
+
|
22
|
+
```ruby
|
23
|
+
require 'time'
|
24
|
+
require 'spartera_api_sdk'
|
25
|
+
# setup authorization
|
26
|
+
SparteraApiSdk.configure do |config|
|
27
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
28
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
29
|
+
end
|
30
|
+
|
31
|
+
api_instance = SparteraApiSdk::APIKeysApi.new
|
32
|
+
company_id = 'company_id_example' # String |
|
33
|
+
api_key_id = 'api_key_id_example' # String |
|
34
|
+
|
35
|
+
begin
|
36
|
+
# Get single API key by ID
|
37
|
+
result = api_instance.companies_company_id_api_keys_api_key_id_get(company_id, api_key_id)
|
38
|
+
p result
|
39
|
+
rescue SparteraApiSdk::ApiError => e
|
40
|
+
puts "Error when calling APIKeysApi->companies_company_id_api_keys_api_key_id_get: #{e}"
|
41
|
+
end
|
42
|
+
```
|
43
|
+
|
44
|
+
#### Using the companies_company_id_api_keys_api_key_id_get_with_http_info variant
|
45
|
+
|
46
|
+
This returns an Array which contains the response data, status code and headers.
|
47
|
+
|
48
|
+
> <Array(Object, Integer, Hash)> companies_company_id_api_keys_api_key_id_get_with_http_info(company_id, api_key_id)
|
49
|
+
|
50
|
+
```ruby
|
51
|
+
begin
|
52
|
+
# Get single API key by ID
|
53
|
+
data, status_code, headers = api_instance.companies_company_id_api_keys_api_key_id_get_with_http_info(company_id, api_key_id)
|
54
|
+
p status_code # => 2xx
|
55
|
+
p headers # => { ... }
|
56
|
+
p data # => Object
|
57
|
+
rescue SparteraApiSdk::ApiError => e
|
58
|
+
puts "Error when calling APIKeysApi->companies_company_id_api_keys_api_key_id_get_with_http_info: #{e}"
|
59
|
+
end
|
60
|
+
```
|
61
|
+
|
62
|
+
### Parameters
|
63
|
+
|
64
|
+
| Name | Type | Description | Notes |
|
65
|
+
| ---- | ---- | ----------- | ----- |
|
66
|
+
| **company_id** | **String** | | |
|
67
|
+
| **api_key_id** | **String** | | |
|
68
|
+
|
69
|
+
### Return type
|
70
|
+
|
71
|
+
**Object**
|
72
|
+
|
73
|
+
### Authorization
|
74
|
+
|
75
|
+
[bearerAuth](../README.md#bearerAuth)
|
76
|
+
|
77
|
+
### HTTP request headers
|
78
|
+
|
79
|
+
- **Content-Type**: Not defined
|
80
|
+
- **Accept**: application/json
|
81
|
+
|
82
|
+
|
83
|
+
## companies_company_id_api_keys_api_key_id_patch
|
84
|
+
|
85
|
+
> Object companies_company_id_api_keys_api_key_id_patch(company_id, api_key_id)
|
86
|
+
|
87
|
+
Update an existing API key by ID
|
88
|
+
|
89
|
+
### Examples
|
90
|
+
|
91
|
+
```ruby
|
92
|
+
require 'time'
|
93
|
+
require 'spartera_api_sdk'
|
94
|
+
# setup authorization
|
95
|
+
SparteraApiSdk.configure do |config|
|
96
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
97
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
98
|
+
end
|
99
|
+
|
100
|
+
api_instance = SparteraApiSdk::APIKeysApi.new
|
101
|
+
company_id = 'company_id_example' # String |
|
102
|
+
api_key_id = 'api_key_id_example' # String |
|
103
|
+
|
104
|
+
begin
|
105
|
+
# Update an existing API key by ID
|
106
|
+
result = api_instance.companies_company_id_api_keys_api_key_id_patch(company_id, api_key_id)
|
107
|
+
p result
|
108
|
+
rescue SparteraApiSdk::ApiError => e
|
109
|
+
puts "Error when calling APIKeysApi->companies_company_id_api_keys_api_key_id_patch: #{e}"
|
110
|
+
end
|
111
|
+
```
|
112
|
+
|
113
|
+
#### Using the companies_company_id_api_keys_api_key_id_patch_with_http_info variant
|
114
|
+
|
115
|
+
This returns an Array which contains the response data, status code and headers.
|
116
|
+
|
117
|
+
> <Array(Object, Integer, Hash)> companies_company_id_api_keys_api_key_id_patch_with_http_info(company_id, api_key_id)
|
118
|
+
|
119
|
+
```ruby
|
120
|
+
begin
|
121
|
+
# Update an existing API key by ID
|
122
|
+
data, status_code, headers = api_instance.companies_company_id_api_keys_api_key_id_patch_with_http_info(company_id, api_key_id)
|
123
|
+
p status_code # => 2xx
|
124
|
+
p headers # => { ... }
|
125
|
+
p data # => Object
|
126
|
+
rescue SparteraApiSdk::ApiError => e
|
127
|
+
puts "Error when calling APIKeysApi->companies_company_id_api_keys_api_key_id_patch_with_http_info: #{e}"
|
128
|
+
end
|
129
|
+
```
|
130
|
+
|
131
|
+
### Parameters
|
132
|
+
|
133
|
+
| Name | Type | Description | Notes |
|
134
|
+
| ---- | ---- | ----------- | ----- |
|
135
|
+
| **company_id** | **String** | | |
|
136
|
+
| **api_key_id** | **String** | | |
|
137
|
+
|
138
|
+
### Return type
|
139
|
+
|
140
|
+
**Object**
|
141
|
+
|
142
|
+
### Authorization
|
143
|
+
|
144
|
+
[bearerAuth](../README.md#bearerAuth)
|
145
|
+
|
146
|
+
### HTTP request headers
|
147
|
+
|
148
|
+
- **Content-Type**: Not defined
|
149
|
+
- **Accept**: application/json
|
150
|
+
|
151
|
+
|
152
|
+
## companies_company_id_api_keys_get
|
153
|
+
|
154
|
+
> Object companies_company_id_api_keys_get(company_id)
|
155
|
+
|
156
|
+
Get all API keys
|
157
|
+
|
158
|
+
### Examples
|
159
|
+
|
160
|
+
```ruby
|
161
|
+
require 'time'
|
162
|
+
require 'spartera_api_sdk'
|
163
|
+
# setup authorization
|
164
|
+
SparteraApiSdk.configure do |config|
|
165
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
166
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
167
|
+
end
|
168
|
+
|
169
|
+
api_instance = SparteraApiSdk::APIKeysApi.new
|
170
|
+
company_id = 'company_id_example' # String |
|
171
|
+
|
172
|
+
begin
|
173
|
+
# Get all API keys
|
174
|
+
result = api_instance.companies_company_id_api_keys_get(company_id)
|
175
|
+
p result
|
176
|
+
rescue SparteraApiSdk::ApiError => e
|
177
|
+
puts "Error when calling APIKeysApi->companies_company_id_api_keys_get: #{e}"
|
178
|
+
end
|
179
|
+
```
|
180
|
+
|
181
|
+
#### Using the companies_company_id_api_keys_get_with_http_info variant
|
182
|
+
|
183
|
+
This returns an Array which contains the response data, status code and headers.
|
184
|
+
|
185
|
+
> <Array(Object, Integer, Hash)> companies_company_id_api_keys_get_with_http_info(company_id)
|
186
|
+
|
187
|
+
```ruby
|
188
|
+
begin
|
189
|
+
# Get all API keys
|
190
|
+
data, status_code, headers = api_instance.companies_company_id_api_keys_get_with_http_info(company_id)
|
191
|
+
p status_code # => 2xx
|
192
|
+
p headers # => { ... }
|
193
|
+
p data # => Object
|
194
|
+
rescue SparteraApiSdk::ApiError => e
|
195
|
+
puts "Error when calling APIKeysApi->companies_company_id_api_keys_get_with_http_info: #{e}"
|
196
|
+
end
|
197
|
+
```
|
198
|
+
|
199
|
+
### Parameters
|
200
|
+
|
201
|
+
| Name | Type | Description | Notes |
|
202
|
+
| ---- | ---- | ----------- | ----- |
|
203
|
+
| **company_id** | **String** | | |
|
204
|
+
|
205
|
+
### Return type
|
206
|
+
|
207
|
+
**Object**
|
208
|
+
|
209
|
+
### Authorization
|
210
|
+
|
211
|
+
[bearerAuth](../README.md#bearerAuth)
|
212
|
+
|
213
|
+
### HTTP request headers
|
214
|
+
|
215
|
+
- **Content-Type**: Not defined
|
216
|
+
- **Accept**: application/json
|
217
|
+
|
218
|
+
|
219
|
+
## companies_company_id_api_keys_post
|
220
|
+
|
221
|
+
> Object companies_company_id_api_keys_post(company_id)
|
222
|
+
|
223
|
+
Create single API key
|
224
|
+
|
225
|
+
### Examples
|
226
|
+
|
227
|
+
```ruby
|
228
|
+
require 'time'
|
229
|
+
require 'spartera_api_sdk'
|
230
|
+
# setup authorization
|
231
|
+
SparteraApiSdk.configure do |config|
|
232
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
233
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
234
|
+
end
|
235
|
+
|
236
|
+
api_instance = SparteraApiSdk::APIKeysApi.new
|
237
|
+
company_id = 'company_id_example' # String |
|
238
|
+
|
239
|
+
begin
|
240
|
+
# Create single API key
|
241
|
+
result = api_instance.companies_company_id_api_keys_post(company_id)
|
242
|
+
p result
|
243
|
+
rescue SparteraApiSdk::ApiError => e
|
244
|
+
puts "Error when calling APIKeysApi->companies_company_id_api_keys_post: #{e}"
|
245
|
+
end
|
246
|
+
```
|
247
|
+
|
248
|
+
#### Using the companies_company_id_api_keys_post_with_http_info variant
|
249
|
+
|
250
|
+
This returns an Array which contains the response data, status code and headers.
|
251
|
+
|
252
|
+
> <Array(Object, Integer, Hash)> companies_company_id_api_keys_post_with_http_info(company_id)
|
253
|
+
|
254
|
+
```ruby
|
255
|
+
begin
|
256
|
+
# Create single API key
|
257
|
+
data, status_code, headers = api_instance.companies_company_id_api_keys_post_with_http_info(company_id)
|
258
|
+
p status_code # => 2xx
|
259
|
+
p headers # => { ... }
|
260
|
+
p data # => Object
|
261
|
+
rescue SparteraApiSdk::ApiError => e
|
262
|
+
puts "Error when calling APIKeysApi->companies_company_id_api_keys_post_with_http_info: #{e}"
|
263
|
+
end
|
264
|
+
```
|
265
|
+
|
266
|
+
### Parameters
|
267
|
+
|
268
|
+
| Name | Type | Description | Notes |
|
269
|
+
| ---- | ---- | ----------- | ----- |
|
270
|
+
| **company_id** | **String** | | |
|
271
|
+
|
272
|
+
### Return type
|
273
|
+
|
274
|
+
**Object**
|
275
|
+
|
276
|
+
### Authorization
|
277
|
+
|
278
|
+
[bearerAuth](../README.md#bearerAuth)
|
279
|
+
|
280
|
+
### HTTP request headers
|
281
|
+
|
282
|
+
- **Content-Type**: Not defined
|
283
|
+
- **Accept**: application/json
|
284
|
+
|
285
|
+
|
286
|
+
## companies_company_id_api_keys_token_delete
|
287
|
+
|
288
|
+
> Object companies_company_id_api_keys_token_delete(company_id, token)
|
289
|
+
|
290
|
+
Delete single API key by token
|
291
|
+
|
292
|
+
### Examples
|
293
|
+
|
294
|
+
```ruby
|
295
|
+
require 'time'
|
296
|
+
require 'spartera_api_sdk'
|
297
|
+
# setup authorization
|
298
|
+
SparteraApiSdk.configure do |config|
|
299
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
300
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
301
|
+
end
|
302
|
+
|
303
|
+
api_instance = SparteraApiSdk::APIKeysApi.new
|
304
|
+
company_id = 'company_id_example' # String |
|
305
|
+
token = 'token_example' # String |
|
306
|
+
|
307
|
+
begin
|
308
|
+
# Delete single API key by token
|
309
|
+
result = api_instance.companies_company_id_api_keys_token_delete(company_id, token)
|
310
|
+
p result
|
311
|
+
rescue SparteraApiSdk::ApiError => e
|
312
|
+
puts "Error when calling APIKeysApi->companies_company_id_api_keys_token_delete: #{e}"
|
313
|
+
end
|
314
|
+
```
|
315
|
+
|
316
|
+
#### Using the companies_company_id_api_keys_token_delete_with_http_info variant
|
317
|
+
|
318
|
+
This returns an Array which contains the response data, status code and headers.
|
319
|
+
|
320
|
+
> <Array(Object, Integer, Hash)> companies_company_id_api_keys_token_delete_with_http_info(company_id, token)
|
321
|
+
|
322
|
+
```ruby
|
323
|
+
begin
|
324
|
+
# Delete single API key by token
|
325
|
+
data, status_code, headers = api_instance.companies_company_id_api_keys_token_delete_with_http_info(company_id, token)
|
326
|
+
p status_code # => 2xx
|
327
|
+
p headers # => { ... }
|
328
|
+
p data # => Object
|
329
|
+
rescue SparteraApiSdk::ApiError => e
|
330
|
+
puts "Error when calling APIKeysApi->companies_company_id_api_keys_token_delete_with_http_info: #{e}"
|
331
|
+
end
|
332
|
+
```
|
333
|
+
|
334
|
+
### Parameters
|
335
|
+
|
336
|
+
| Name | Type | Description | Notes |
|
337
|
+
| ---- | ---- | ----------- | ----- |
|
338
|
+
| **company_id** | **String** | | |
|
339
|
+
| **token** | **String** | | |
|
340
|
+
|
341
|
+
### Return type
|
342
|
+
|
343
|
+
**Object**
|
344
|
+
|
345
|
+
### Authorization
|
346
|
+
|
347
|
+
[bearerAuth](../README.md#bearerAuth)
|
348
|
+
|
349
|
+
### HTTP request headers
|
350
|
+
|
351
|
+
- **Content-Type**: Not defined
|
352
|
+
- **Accept**: application/json
|
353
|
+
|
data/docs/Alert.md
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
# SparteraApiSdk::Alert
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **alert_id** | **String** | | [optional][readonly] |
|
8
|
+
| **asset_id** | **String** | | |
|
9
|
+
| **user_id** | **String** | | [optional] |
|
10
|
+
| **company_id** | **String** | | |
|
11
|
+
| **alert_type** | **String** | | |
|
12
|
+
| **is_active** | **String** | | [optional] |
|
13
|
+
| **last_triggered** | **String** | | [optional] |
|
14
|
+
| **date_created** | **String** | | [optional][readonly] |
|
15
|
+
| **last_updated** | **String** | | [optional][readonly] |
|
16
|
+
| **active** | **String** | | [optional] |
|
17
|
+
|
18
|
+
## Example
|
19
|
+
|
20
|
+
```ruby
|
21
|
+
require 'spartera_api_sdk'
|
22
|
+
|
23
|
+
instance = SparteraApiSdk::Alert.new(
|
24
|
+
alert_id: null,
|
25
|
+
asset_id: null,
|
26
|
+
user_id: null,
|
27
|
+
company_id: null,
|
28
|
+
alert_type: null,
|
29
|
+
is_active: null,
|
30
|
+
last_triggered: null,
|
31
|
+
date_created: null,
|
32
|
+
last_updated: null,
|
33
|
+
active: null
|
34
|
+
)
|
35
|
+
```
|
36
|
+
|