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,573 @@
|
|
1
|
+
# SparteraApiSdk::AssetPriceHistoryApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.spartera.com*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**companies_company_id_assets_asset_id_prices_active_get**](AssetPriceHistoryApi.md#companies_company_id_assets_asset_id_prices_active_get) | **GET** /companies/{company_id}/assets/{asset_id}/prices/active | Get the currently active price for an asset |
|
8
|
+
| [**companies_company_id_assets_asset_id_prices_aph_id_delete**](AssetPriceHistoryApi.md#companies_company_id_assets_asset_id_prices_aph_id_delete) | **DELETE** /companies/{company_id}/assets/{asset_id}/prices/{aph_id} | Delete single price history record by ID |
|
9
|
+
| [**companies_company_id_assets_asset_id_prices_aph_id_get**](AssetPriceHistoryApi.md#companies_company_id_assets_asset_id_prices_aph_id_get) | **GET** /companies/{company_id}/assets/{asset_id}/prices/{aph_id} | Get single price history record by ID |
|
10
|
+
| [**companies_company_id_assets_asset_id_prices_aph_id_patch**](AssetPriceHistoryApi.md#companies_company_id_assets_asset_id_prices_aph_id_patch) | **PATCH** /companies/{company_id}/assets/{asset_id}/prices/{aph_id} | Update an existing price history record by ID |
|
11
|
+
| [**companies_company_id_assets_asset_id_prices_calculate_credits_post**](AssetPriceHistoryApi.md#companies_company_id_assets_asset_id_prices_calculate_credits_post) | **POST** /companies/{company_id}/assets/{asset_id}/prices/calculate_credits | Calculate the credit equivalent for a given USD price without saving |
|
12
|
+
| [**companies_company_id_assets_asset_id_prices_discount_post**](AssetPriceHistoryApi.md#companies_company_id_assets_asset_id_prices_discount_post) | **POST** /companies/{company_id}/assets/{asset_id}/prices/discount | Apply a discount to the active price for an asset |
|
13
|
+
| [**companies_company_id_assets_asset_id_prices_get**](AssetPriceHistoryApi.md#companies_company_id_assets_asset_id_prices_get) | **GET** /companies/{company_id}/assets/{asset_id}/prices | Get all price history records for a specific asset |
|
14
|
+
| [**companies_company_id_assets_asset_id_prices_post**](AssetPriceHistoryApi.md#companies_company_id_assets_asset_id_prices_post) | **POST** /companies/{company_id}/assets/{asset_id}/prices | Create a new price history record for an asset |
|
15
|
+
|
16
|
+
|
17
|
+
## companies_company_id_assets_asset_id_prices_active_get
|
18
|
+
|
19
|
+
> Object companies_company_id_assets_asset_id_prices_active_get(company_id, asset_id)
|
20
|
+
|
21
|
+
Get the currently active price for an asset
|
22
|
+
|
23
|
+
### Examples
|
24
|
+
|
25
|
+
```ruby
|
26
|
+
require 'time'
|
27
|
+
require 'spartera_api_sdk'
|
28
|
+
# setup authorization
|
29
|
+
SparteraApiSdk.configure do |config|
|
30
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
31
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
32
|
+
end
|
33
|
+
|
34
|
+
api_instance = SparteraApiSdk::AssetPriceHistoryApi.new
|
35
|
+
company_id = 'company_id_example' # String |
|
36
|
+
asset_id = 'asset_id_example' # String |
|
37
|
+
|
38
|
+
begin
|
39
|
+
# Get the currently active price for an asset
|
40
|
+
result = api_instance.companies_company_id_assets_asset_id_prices_active_get(company_id, asset_id)
|
41
|
+
p result
|
42
|
+
rescue SparteraApiSdk::ApiError => e
|
43
|
+
puts "Error when calling AssetPriceHistoryApi->companies_company_id_assets_asset_id_prices_active_get: #{e}"
|
44
|
+
end
|
45
|
+
```
|
46
|
+
|
47
|
+
#### Using the companies_company_id_assets_asset_id_prices_active_get_with_http_info variant
|
48
|
+
|
49
|
+
This returns an Array which contains the response data, status code and headers.
|
50
|
+
|
51
|
+
> <Array(Object, Integer, Hash)> companies_company_id_assets_asset_id_prices_active_get_with_http_info(company_id, asset_id)
|
52
|
+
|
53
|
+
```ruby
|
54
|
+
begin
|
55
|
+
# Get the currently active price for an asset
|
56
|
+
data, status_code, headers = api_instance.companies_company_id_assets_asset_id_prices_active_get_with_http_info(company_id, asset_id)
|
57
|
+
p status_code # => 2xx
|
58
|
+
p headers # => { ... }
|
59
|
+
p data # => Object
|
60
|
+
rescue SparteraApiSdk::ApiError => e
|
61
|
+
puts "Error when calling AssetPriceHistoryApi->companies_company_id_assets_asset_id_prices_active_get_with_http_info: #{e}"
|
62
|
+
end
|
63
|
+
```
|
64
|
+
|
65
|
+
### Parameters
|
66
|
+
|
67
|
+
| Name | Type | Description | Notes |
|
68
|
+
| ---- | ---- | ----------- | ----- |
|
69
|
+
| **company_id** | **String** | | |
|
70
|
+
| **asset_id** | **String** | | |
|
71
|
+
|
72
|
+
### Return type
|
73
|
+
|
74
|
+
**Object**
|
75
|
+
|
76
|
+
### Authorization
|
77
|
+
|
78
|
+
[bearerAuth](../README.md#bearerAuth)
|
79
|
+
|
80
|
+
### HTTP request headers
|
81
|
+
|
82
|
+
- **Content-Type**: Not defined
|
83
|
+
- **Accept**: application/json
|
84
|
+
|
85
|
+
|
86
|
+
## companies_company_id_assets_asset_id_prices_aph_id_delete
|
87
|
+
|
88
|
+
> Object companies_company_id_assets_asset_id_prices_aph_id_delete(company_id, asset_id, aph_id)
|
89
|
+
|
90
|
+
Delete single price history record by ID
|
91
|
+
|
92
|
+
### Examples
|
93
|
+
|
94
|
+
```ruby
|
95
|
+
require 'time'
|
96
|
+
require 'spartera_api_sdk'
|
97
|
+
# setup authorization
|
98
|
+
SparteraApiSdk.configure do |config|
|
99
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
100
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
101
|
+
end
|
102
|
+
|
103
|
+
api_instance = SparteraApiSdk::AssetPriceHistoryApi.new
|
104
|
+
company_id = 'company_id_example' # String |
|
105
|
+
asset_id = 'asset_id_example' # String |
|
106
|
+
aph_id = 'aph_id_example' # String |
|
107
|
+
|
108
|
+
begin
|
109
|
+
# Delete single price history record by ID
|
110
|
+
result = api_instance.companies_company_id_assets_asset_id_prices_aph_id_delete(company_id, asset_id, aph_id)
|
111
|
+
p result
|
112
|
+
rescue SparteraApiSdk::ApiError => e
|
113
|
+
puts "Error when calling AssetPriceHistoryApi->companies_company_id_assets_asset_id_prices_aph_id_delete: #{e}"
|
114
|
+
end
|
115
|
+
```
|
116
|
+
|
117
|
+
#### Using the companies_company_id_assets_asset_id_prices_aph_id_delete_with_http_info variant
|
118
|
+
|
119
|
+
This returns an Array which contains the response data, status code and headers.
|
120
|
+
|
121
|
+
> <Array(Object, Integer, Hash)> companies_company_id_assets_asset_id_prices_aph_id_delete_with_http_info(company_id, asset_id, aph_id)
|
122
|
+
|
123
|
+
```ruby
|
124
|
+
begin
|
125
|
+
# Delete single price history record by ID
|
126
|
+
data, status_code, headers = api_instance.companies_company_id_assets_asset_id_prices_aph_id_delete_with_http_info(company_id, asset_id, aph_id)
|
127
|
+
p status_code # => 2xx
|
128
|
+
p headers # => { ... }
|
129
|
+
p data # => Object
|
130
|
+
rescue SparteraApiSdk::ApiError => e
|
131
|
+
puts "Error when calling AssetPriceHistoryApi->companies_company_id_assets_asset_id_prices_aph_id_delete_with_http_info: #{e}"
|
132
|
+
end
|
133
|
+
```
|
134
|
+
|
135
|
+
### Parameters
|
136
|
+
|
137
|
+
| Name | Type | Description | Notes |
|
138
|
+
| ---- | ---- | ----------- | ----- |
|
139
|
+
| **company_id** | **String** | | |
|
140
|
+
| **asset_id** | **String** | | |
|
141
|
+
| **aph_id** | **String** | | |
|
142
|
+
|
143
|
+
### Return type
|
144
|
+
|
145
|
+
**Object**
|
146
|
+
|
147
|
+
### Authorization
|
148
|
+
|
149
|
+
[bearerAuth](../README.md#bearerAuth)
|
150
|
+
|
151
|
+
### HTTP request headers
|
152
|
+
|
153
|
+
- **Content-Type**: Not defined
|
154
|
+
- **Accept**: application/json
|
155
|
+
|
156
|
+
|
157
|
+
## companies_company_id_assets_asset_id_prices_aph_id_get
|
158
|
+
|
159
|
+
> Object companies_company_id_assets_asset_id_prices_aph_id_get(company_id, asset_id, aph_id)
|
160
|
+
|
161
|
+
Get single price history record by ID
|
162
|
+
|
163
|
+
### Examples
|
164
|
+
|
165
|
+
```ruby
|
166
|
+
require 'time'
|
167
|
+
require 'spartera_api_sdk'
|
168
|
+
# setup authorization
|
169
|
+
SparteraApiSdk.configure do |config|
|
170
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
171
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
172
|
+
end
|
173
|
+
|
174
|
+
api_instance = SparteraApiSdk::AssetPriceHistoryApi.new
|
175
|
+
company_id = 'company_id_example' # String |
|
176
|
+
asset_id = 'asset_id_example' # String |
|
177
|
+
aph_id = 'aph_id_example' # String |
|
178
|
+
|
179
|
+
begin
|
180
|
+
# Get single price history record by ID
|
181
|
+
result = api_instance.companies_company_id_assets_asset_id_prices_aph_id_get(company_id, asset_id, aph_id)
|
182
|
+
p result
|
183
|
+
rescue SparteraApiSdk::ApiError => e
|
184
|
+
puts "Error when calling AssetPriceHistoryApi->companies_company_id_assets_asset_id_prices_aph_id_get: #{e}"
|
185
|
+
end
|
186
|
+
```
|
187
|
+
|
188
|
+
#### Using the companies_company_id_assets_asset_id_prices_aph_id_get_with_http_info variant
|
189
|
+
|
190
|
+
This returns an Array which contains the response data, status code and headers.
|
191
|
+
|
192
|
+
> <Array(Object, Integer, Hash)> companies_company_id_assets_asset_id_prices_aph_id_get_with_http_info(company_id, asset_id, aph_id)
|
193
|
+
|
194
|
+
```ruby
|
195
|
+
begin
|
196
|
+
# Get single price history record by ID
|
197
|
+
data, status_code, headers = api_instance.companies_company_id_assets_asset_id_prices_aph_id_get_with_http_info(company_id, asset_id, aph_id)
|
198
|
+
p status_code # => 2xx
|
199
|
+
p headers # => { ... }
|
200
|
+
p data # => Object
|
201
|
+
rescue SparteraApiSdk::ApiError => e
|
202
|
+
puts "Error when calling AssetPriceHistoryApi->companies_company_id_assets_asset_id_prices_aph_id_get_with_http_info: #{e}"
|
203
|
+
end
|
204
|
+
```
|
205
|
+
|
206
|
+
### Parameters
|
207
|
+
|
208
|
+
| Name | Type | Description | Notes |
|
209
|
+
| ---- | ---- | ----------- | ----- |
|
210
|
+
| **company_id** | **String** | | |
|
211
|
+
| **asset_id** | **String** | | |
|
212
|
+
| **aph_id** | **String** | | |
|
213
|
+
|
214
|
+
### Return type
|
215
|
+
|
216
|
+
**Object**
|
217
|
+
|
218
|
+
### Authorization
|
219
|
+
|
220
|
+
[bearerAuth](../README.md#bearerAuth)
|
221
|
+
|
222
|
+
### HTTP request headers
|
223
|
+
|
224
|
+
- **Content-Type**: Not defined
|
225
|
+
- **Accept**: application/json
|
226
|
+
|
227
|
+
|
228
|
+
## companies_company_id_assets_asset_id_prices_aph_id_patch
|
229
|
+
|
230
|
+
> Object companies_company_id_assets_asset_id_prices_aph_id_patch(company_id, asset_id, aph_id)
|
231
|
+
|
232
|
+
Update an existing price history record by ID
|
233
|
+
|
234
|
+
### Examples
|
235
|
+
|
236
|
+
```ruby
|
237
|
+
require 'time'
|
238
|
+
require 'spartera_api_sdk'
|
239
|
+
# setup authorization
|
240
|
+
SparteraApiSdk.configure do |config|
|
241
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
242
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
243
|
+
end
|
244
|
+
|
245
|
+
api_instance = SparteraApiSdk::AssetPriceHistoryApi.new
|
246
|
+
company_id = 'company_id_example' # String |
|
247
|
+
asset_id = 'asset_id_example' # String |
|
248
|
+
aph_id = 'aph_id_example' # String |
|
249
|
+
|
250
|
+
begin
|
251
|
+
# Update an existing price history record by ID
|
252
|
+
result = api_instance.companies_company_id_assets_asset_id_prices_aph_id_patch(company_id, asset_id, aph_id)
|
253
|
+
p result
|
254
|
+
rescue SparteraApiSdk::ApiError => e
|
255
|
+
puts "Error when calling AssetPriceHistoryApi->companies_company_id_assets_asset_id_prices_aph_id_patch: #{e}"
|
256
|
+
end
|
257
|
+
```
|
258
|
+
|
259
|
+
#### Using the companies_company_id_assets_asset_id_prices_aph_id_patch_with_http_info variant
|
260
|
+
|
261
|
+
This returns an Array which contains the response data, status code and headers.
|
262
|
+
|
263
|
+
> <Array(Object, Integer, Hash)> companies_company_id_assets_asset_id_prices_aph_id_patch_with_http_info(company_id, asset_id, aph_id)
|
264
|
+
|
265
|
+
```ruby
|
266
|
+
begin
|
267
|
+
# Update an existing price history record by ID
|
268
|
+
data, status_code, headers = api_instance.companies_company_id_assets_asset_id_prices_aph_id_patch_with_http_info(company_id, asset_id, aph_id)
|
269
|
+
p status_code # => 2xx
|
270
|
+
p headers # => { ... }
|
271
|
+
p data # => Object
|
272
|
+
rescue SparteraApiSdk::ApiError => e
|
273
|
+
puts "Error when calling AssetPriceHistoryApi->companies_company_id_assets_asset_id_prices_aph_id_patch_with_http_info: #{e}"
|
274
|
+
end
|
275
|
+
```
|
276
|
+
|
277
|
+
### Parameters
|
278
|
+
|
279
|
+
| Name | Type | Description | Notes |
|
280
|
+
| ---- | ---- | ----------- | ----- |
|
281
|
+
| **company_id** | **String** | | |
|
282
|
+
| **asset_id** | **String** | | |
|
283
|
+
| **aph_id** | **String** | | |
|
284
|
+
|
285
|
+
### Return type
|
286
|
+
|
287
|
+
**Object**
|
288
|
+
|
289
|
+
### Authorization
|
290
|
+
|
291
|
+
[bearerAuth](../README.md#bearerAuth)
|
292
|
+
|
293
|
+
### HTTP request headers
|
294
|
+
|
295
|
+
- **Content-Type**: Not defined
|
296
|
+
- **Accept**: application/json
|
297
|
+
|
298
|
+
|
299
|
+
## companies_company_id_assets_asset_id_prices_calculate_credits_post
|
300
|
+
|
301
|
+
> Object companies_company_id_assets_asset_id_prices_calculate_credits_post(company_id, asset_id)
|
302
|
+
|
303
|
+
Calculate the credit equivalent for a given USD price without saving
|
304
|
+
|
305
|
+
### Examples
|
306
|
+
|
307
|
+
```ruby
|
308
|
+
require 'time'
|
309
|
+
require 'spartera_api_sdk'
|
310
|
+
# setup authorization
|
311
|
+
SparteraApiSdk.configure do |config|
|
312
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
313
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
314
|
+
end
|
315
|
+
|
316
|
+
api_instance = SparteraApiSdk::AssetPriceHistoryApi.new
|
317
|
+
company_id = 'company_id_example' # String |
|
318
|
+
asset_id = 'asset_id_example' # String |
|
319
|
+
|
320
|
+
begin
|
321
|
+
# Calculate the credit equivalent for a given USD price without saving
|
322
|
+
result = api_instance.companies_company_id_assets_asset_id_prices_calculate_credits_post(company_id, asset_id)
|
323
|
+
p result
|
324
|
+
rescue SparteraApiSdk::ApiError => e
|
325
|
+
puts "Error when calling AssetPriceHistoryApi->companies_company_id_assets_asset_id_prices_calculate_credits_post: #{e}"
|
326
|
+
end
|
327
|
+
```
|
328
|
+
|
329
|
+
#### Using the companies_company_id_assets_asset_id_prices_calculate_credits_post_with_http_info variant
|
330
|
+
|
331
|
+
This returns an Array which contains the response data, status code and headers.
|
332
|
+
|
333
|
+
> <Array(Object, Integer, Hash)> companies_company_id_assets_asset_id_prices_calculate_credits_post_with_http_info(company_id, asset_id)
|
334
|
+
|
335
|
+
```ruby
|
336
|
+
begin
|
337
|
+
# Calculate the credit equivalent for a given USD price without saving
|
338
|
+
data, status_code, headers = api_instance.companies_company_id_assets_asset_id_prices_calculate_credits_post_with_http_info(company_id, asset_id)
|
339
|
+
p status_code # => 2xx
|
340
|
+
p headers # => { ... }
|
341
|
+
p data # => Object
|
342
|
+
rescue SparteraApiSdk::ApiError => e
|
343
|
+
puts "Error when calling AssetPriceHistoryApi->companies_company_id_assets_asset_id_prices_calculate_credits_post_with_http_info: #{e}"
|
344
|
+
end
|
345
|
+
```
|
346
|
+
|
347
|
+
### Parameters
|
348
|
+
|
349
|
+
| Name | Type | Description | Notes |
|
350
|
+
| ---- | ---- | ----------- | ----- |
|
351
|
+
| **company_id** | **String** | | |
|
352
|
+
| **asset_id** | **String** | | |
|
353
|
+
|
354
|
+
### Return type
|
355
|
+
|
356
|
+
**Object**
|
357
|
+
|
358
|
+
### Authorization
|
359
|
+
|
360
|
+
[bearerAuth](../README.md#bearerAuth)
|
361
|
+
|
362
|
+
### HTTP request headers
|
363
|
+
|
364
|
+
- **Content-Type**: Not defined
|
365
|
+
- **Accept**: application/json
|
366
|
+
|
367
|
+
|
368
|
+
## companies_company_id_assets_asset_id_prices_discount_post
|
369
|
+
|
370
|
+
> Object companies_company_id_assets_asset_id_prices_discount_post(company_id, asset_id)
|
371
|
+
|
372
|
+
Apply a discount to the active price for an asset
|
373
|
+
|
374
|
+
### Examples
|
375
|
+
|
376
|
+
```ruby
|
377
|
+
require 'time'
|
378
|
+
require 'spartera_api_sdk'
|
379
|
+
# setup authorization
|
380
|
+
SparteraApiSdk.configure do |config|
|
381
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
382
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
383
|
+
end
|
384
|
+
|
385
|
+
api_instance = SparteraApiSdk::AssetPriceHistoryApi.new
|
386
|
+
company_id = 'company_id_example' # String |
|
387
|
+
asset_id = 'asset_id_example' # String |
|
388
|
+
|
389
|
+
begin
|
390
|
+
# Apply a discount to the active price for an asset
|
391
|
+
result = api_instance.companies_company_id_assets_asset_id_prices_discount_post(company_id, asset_id)
|
392
|
+
p result
|
393
|
+
rescue SparteraApiSdk::ApiError => e
|
394
|
+
puts "Error when calling AssetPriceHistoryApi->companies_company_id_assets_asset_id_prices_discount_post: #{e}"
|
395
|
+
end
|
396
|
+
```
|
397
|
+
|
398
|
+
#### Using the companies_company_id_assets_asset_id_prices_discount_post_with_http_info variant
|
399
|
+
|
400
|
+
This returns an Array which contains the response data, status code and headers.
|
401
|
+
|
402
|
+
> <Array(Object, Integer, Hash)> companies_company_id_assets_asset_id_prices_discount_post_with_http_info(company_id, asset_id)
|
403
|
+
|
404
|
+
```ruby
|
405
|
+
begin
|
406
|
+
# Apply a discount to the active price for an asset
|
407
|
+
data, status_code, headers = api_instance.companies_company_id_assets_asset_id_prices_discount_post_with_http_info(company_id, asset_id)
|
408
|
+
p status_code # => 2xx
|
409
|
+
p headers # => { ... }
|
410
|
+
p data # => Object
|
411
|
+
rescue SparteraApiSdk::ApiError => e
|
412
|
+
puts "Error when calling AssetPriceHistoryApi->companies_company_id_assets_asset_id_prices_discount_post_with_http_info: #{e}"
|
413
|
+
end
|
414
|
+
```
|
415
|
+
|
416
|
+
### Parameters
|
417
|
+
|
418
|
+
| Name | Type | Description | Notes |
|
419
|
+
| ---- | ---- | ----------- | ----- |
|
420
|
+
| **company_id** | **String** | | |
|
421
|
+
| **asset_id** | **String** | | |
|
422
|
+
|
423
|
+
### Return type
|
424
|
+
|
425
|
+
**Object**
|
426
|
+
|
427
|
+
### Authorization
|
428
|
+
|
429
|
+
[bearerAuth](../README.md#bearerAuth)
|
430
|
+
|
431
|
+
### HTTP request headers
|
432
|
+
|
433
|
+
- **Content-Type**: Not defined
|
434
|
+
- **Accept**: application/json
|
435
|
+
|
436
|
+
|
437
|
+
## companies_company_id_assets_asset_id_prices_get
|
438
|
+
|
439
|
+
> Object companies_company_id_assets_asset_id_prices_get(company_id, asset_id)
|
440
|
+
|
441
|
+
Get all price history records for a specific asset
|
442
|
+
|
443
|
+
### Examples
|
444
|
+
|
445
|
+
```ruby
|
446
|
+
require 'time'
|
447
|
+
require 'spartera_api_sdk'
|
448
|
+
# setup authorization
|
449
|
+
SparteraApiSdk.configure do |config|
|
450
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
451
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
452
|
+
end
|
453
|
+
|
454
|
+
api_instance = SparteraApiSdk::AssetPriceHistoryApi.new
|
455
|
+
company_id = 'company_id_example' # String |
|
456
|
+
asset_id = 'asset_id_example' # String |
|
457
|
+
|
458
|
+
begin
|
459
|
+
# Get all price history records for a specific asset
|
460
|
+
result = api_instance.companies_company_id_assets_asset_id_prices_get(company_id, asset_id)
|
461
|
+
p result
|
462
|
+
rescue SparteraApiSdk::ApiError => e
|
463
|
+
puts "Error when calling AssetPriceHistoryApi->companies_company_id_assets_asset_id_prices_get: #{e}"
|
464
|
+
end
|
465
|
+
```
|
466
|
+
|
467
|
+
#### Using the companies_company_id_assets_asset_id_prices_get_with_http_info variant
|
468
|
+
|
469
|
+
This returns an Array which contains the response data, status code and headers.
|
470
|
+
|
471
|
+
> <Array(Object, Integer, Hash)> companies_company_id_assets_asset_id_prices_get_with_http_info(company_id, asset_id)
|
472
|
+
|
473
|
+
```ruby
|
474
|
+
begin
|
475
|
+
# Get all price history records for a specific asset
|
476
|
+
data, status_code, headers = api_instance.companies_company_id_assets_asset_id_prices_get_with_http_info(company_id, asset_id)
|
477
|
+
p status_code # => 2xx
|
478
|
+
p headers # => { ... }
|
479
|
+
p data # => Object
|
480
|
+
rescue SparteraApiSdk::ApiError => e
|
481
|
+
puts "Error when calling AssetPriceHistoryApi->companies_company_id_assets_asset_id_prices_get_with_http_info: #{e}"
|
482
|
+
end
|
483
|
+
```
|
484
|
+
|
485
|
+
### Parameters
|
486
|
+
|
487
|
+
| Name | Type | Description | Notes |
|
488
|
+
| ---- | ---- | ----------- | ----- |
|
489
|
+
| **company_id** | **String** | | |
|
490
|
+
| **asset_id** | **String** | | |
|
491
|
+
|
492
|
+
### Return type
|
493
|
+
|
494
|
+
**Object**
|
495
|
+
|
496
|
+
### Authorization
|
497
|
+
|
498
|
+
[bearerAuth](../README.md#bearerAuth)
|
499
|
+
|
500
|
+
### HTTP request headers
|
501
|
+
|
502
|
+
- **Content-Type**: Not defined
|
503
|
+
- **Accept**: application/json
|
504
|
+
|
505
|
+
|
506
|
+
## companies_company_id_assets_asset_id_prices_post
|
507
|
+
|
508
|
+
> Object companies_company_id_assets_asset_id_prices_post(company_id, asset_id)
|
509
|
+
|
510
|
+
Create a new price history record for an asset
|
511
|
+
|
512
|
+
### Examples
|
513
|
+
|
514
|
+
```ruby
|
515
|
+
require 'time'
|
516
|
+
require 'spartera_api_sdk'
|
517
|
+
# setup authorization
|
518
|
+
SparteraApiSdk.configure do |config|
|
519
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
520
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
521
|
+
end
|
522
|
+
|
523
|
+
api_instance = SparteraApiSdk::AssetPriceHistoryApi.new
|
524
|
+
company_id = 'company_id_example' # String |
|
525
|
+
asset_id = 'asset_id_example' # String |
|
526
|
+
|
527
|
+
begin
|
528
|
+
# Create a new price history record for an asset
|
529
|
+
result = api_instance.companies_company_id_assets_asset_id_prices_post(company_id, asset_id)
|
530
|
+
p result
|
531
|
+
rescue SparteraApiSdk::ApiError => e
|
532
|
+
puts "Error when calling AssetPriceHistoryApi->companies_company_id_assets_asset_id_prices_post: #{e}"
|
533
|
+
end
|
534
|
+
```
|
535
|
+
|
536
|
+
#### Using the companies_company_id_assets_asset_id_prices_post_with_http_info variant
|
537
|
+
|
538
|
+
This returns an Array which contains the response data, status code and headers.
|
539
|
+
|
540
|
+
> <Array(Object, Integer, Hash)> companies_company_id_assets_asset_id_prices_post_with_http_info(company_id, asset_id)
|
541
|
+
|
542
|
+
```ruby
|
543
|
+
begin
|
544
|
+
# Create a new price history record for an asset
|
545
|
+
data, status_code, headers = api_instance.companies_company_id_assets_asset_id_prices_post_with_http_info(company_id, asset_id)
|
546
|
+
p status_code # => 2xx
|
547
|
+
p headers # => { ... }
|
548
|
+
p data # => Object
|
549
|
+
rescue SparteraApiSdk::ApiError => e
|
550
|
+
puts "Error when calling AssetPriceHistoryApi->companies_company_id_assets_asset_id_prices_post_with_http_info: #{e}"
|
551
|
+
end
|
552
|
+
```
|
553
|
+
|
554
|
+
### Parameters
|
555
|
+
|
556
|
+
| Name | Type | Description | Notes |
|
557
|
+
| ---- | ---- | ----------- | ----- |
|
558
|
+
| **company_id** | **String** | | |
|
559
|
+
| **asset_id** | **String** | | |
|
560
|
+
|
561
|
+
### Return type
|
562
|
+
|
563
|
+
**Object**
|
564
|
+
|
565
|
+
### Authorization
|
566
|
+
|
567
|
+
[bearerAuth](../README.md#bearerAuth)
|
568
|
+
|
569
|
+
### HTTP request headers
|
570
|
+
|
571
|
+
- **Content-Type**: Not defined
|
572
|
+
- **Accept**: application/json
|
573
|
+
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# SparteraApiSdk::Assetpricehistory
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **aph_id** | **String** | | [optional] |
|
8
|
+
| **asset_id** | **String** | | |
|
9
|
+
| **price_usd** | **Float** | | [optional] |
|
10
|
+
| **price_credits** | **String** | | [optional] |
|
11
|
+
| **discount_percentage** | **Float** | | [optional] |
|
12
|
+
| **sale_start_date** | **String** | | [optional] |
|
13
|
+
| **sale_end_date** | **String** | | [optional] |
|
14
|
+
| **date_ended** | **String** | | [optional] |
|
15
|
+
| **date_created** | **String** | | [optional][readonly] |
|
16
|
+
| **last_updated** | **String** | | [optional][readonly] |
|
17
|
+
| **active** | **String** | | |
|
18
|
+
|
19
|
+
## Example
|
20
|
+
|
21
|
+
```ruby
|
22
|
+
require 'spartera_api_sdk'
|
23
|
+
|
24
|
+
instance = SparteraApiSdk::Assetpricehistory.new(
|
25
|
+
aph_id: null,
|
26
|
+
asset_id: null,
|
27
|
+
price_usd: null,
|
28
|
+
price_credits: null,
|
29
|
+
discount_percentage: null,
|
30
|
+
sale_start_date: null,
|
31
|
+
sale_end_date: null,
|
32
|
+
date_ended: null,
|
33
|
+
date_created: null,
|
34
|
+
last_updated: null,
|
35
|
+
active: null
|
36
|
+
)
|
37
|
+
```
|
38
|
+
|