spartera_api_sdk 0.4.2 → 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.
Files changed (506) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +5 -3
  3. data/Gemfile.lock +69 -0
  4. data/README.md +324 -336
  5. data/config.json +10 -0
  6. data/docs/APIKeysApi.md +102 -286
  7. data/docs/Alert.md +36 -0
  8. data/docs/AlertsApi.md +163 -177
  9. data/docs/Apikey.md +36 -0
  10. data/docs/Asset.md +110 -0
  11. data/docs/AssetPriceHistoryApi.md +178 -202
  12. data/docs/Assetpricehistory.md +38 -0
  13. data/docs/AssetsApi.md +352 -418
  14. data/docs/CloudProvidersApi.md +233 -49
  15. data/docs/Cloudprovider.md +30 -0
  16. data/docs/CompaniesApi.md +171 -357
  17. data/docs/Company.md +44 -0
  18. data/docs/Connection.md +54 -0
  19. data/docs/ConnectionsApi.md +139 -249
  20. data/docs/Favorite.md +36 -0
  21. data/docs/FavoritesApi.md +183 -199
  22. data/docs/User.md +34 -0
  23. data/docs/UsersApi.md +97 -379
  24. data/example.rb +51 -0
  25. data/git_push.sh +2 -2
  26. data/lib/spartera_api_sdk/api/alerts_api.rb +176 -423
  27. data/lib/spartera_api_sdk/api/api_keys_api.rb +95 -496
  28. data/lib/spartera_api_sdk/api/asset_price_history_api.rb +177 -468
  29. data/lib/spartera_api_sdk/api/assets_api.rb +358 -806
  30. data/lib/spartera_api_sdk/api/cloud_providers_api.rb +199 -74
  31. data/lib/spartera_api_sdk/api/companies_api.rb +146 -660
  32. data/lib/spartera_api_sdk/api/connections_api.rb +139 -466
  33. data/lib/spartera_api_sdk/api/favorites_api.rb +204 -464
  34. data/lib/spartera_api_sdk/api/users_api.rb +95 -619
  35. data/lib/spartera_api_sdk/api_client.rb +4 -8
  36. data/lib/spartera_api_sdk/api_error.rb +2 -2
  37. data/lib/spartera_api_sdk/configuration.rb +12 -4
  38. data/lib/spartera_api_sdk/models/{alerts.rb → alert.rb} +139 -46
  39. data/lib/spartera_api_sdk/models/{api_keys.rb → apikey.rb} +124 -98
  40. data/lib/spartera_api_sdk/models/asset.rb +686 -0
  41. data/lib/spartera_api_sdk/models/{asset_price_history.rb → assetpricehistory.rb} +180 -44
  42. data/lib/spartera_api_sdk/models/{cloud_providers.rb → cloudprovider.rb} +111 -35
  43. data/lib/spartera_api_sdk/models/{companies.rb → company.rb} +105 -90
  44. data/lib/spartera_api_sdk/models/{connections.rb → connection.rb} +186 -69
  45. data/lib/spartera_api_sdk/models/error.rb +76 -3
  46. data/lib/spartera_api_sdk/models/{favorites.rb → favorite.rb} +111 -38
  47. data/lib/spartera_api_sdk/models/inline_object.rb +76 -3
  48. data/lib/spartera_api_sdk/models/inline_object1.rb +76 -3
  49. data/lib/spartera_api_sdk/models/inline_object2.rb +76 -3
  50. data/lib/spartera_api_sdk/models/inline_object3.rb +76 -3
  51. data/lib/spartera_api_sdk/models/{users.rb → user.rb} +108 -112
  52. data/lib/spartera_api_sdk/version.rb +3 -3
  53. data/lib/spartera_api_sdk.rb +11 -150
  54. data/spartera_api_sdk.gemspec +8 -19
  55. data/spec/api/alerts_api_spec.rb +51 -51
  56. data/spec/api/api_keys_api_spec.rb +30 -67
  57. data/spec/api/asset_price_history_api_spec.rb +53 -57
  58. data/spec/api/assets_api_spec.rb +99 -114
  59. data/spec/api/cloud_providers_api_spec.rb +42 -15
  60. data/spec/api/companies_api_spec.rb +47 -99
  61. data/spec/api/connections_api_spec.rb +41 -63
  62. data/spec/api/favorites_api_spec.rb +56 -56
  63. data/spec/api/users_api_spec.rb +29 -88
  64. data/spec/models/{postgen_integrations_spec.rb → alert_spec.rb} +17 -17
  65. data/spec/models/{api_keys_update_spec.rb → apikey_spec.rb} +20 -14
  66. data/spec/models/{endpoints_spec.rb → asset_spec.rb} +83 -69
  67. data/spec/models/{api_keys_spec.rb → assetpricehistory_spec.rb} +19 -25
  68. data/spec/models/{cloud_providers_spec.rb → cloudprovider_spec.rb} +20 -14
  69. data/spec/models/{companies_spec.rb → company_spec.rb} +16 -26
  70. data/spec/models/{posts_input_spec.rb → connection_spec.rb} +27 -51
  71. data/spec/models/error_spec.rb +3 -3
  72. data/spec/models/{favorites_spec.rb → favorite_spec.rb} +23 -17
  73. data/spec/models/inline_object1_spec.rb +3 -3
  74. data/spec/models/inline_object2_spec.rb +3 -3
  75. data/spec/models/inline_object3_spec.rb +3 -3
  76. data/spec/models/inline_object_spec.rb +3 -3
  77. data/spec/models/{api_keys_input_spec.rb → user_spec.rb} +15 -15
  78. data/spec/spec_helper.rb +2 -2
  79. data/test.sh +42 -0
  80. metadata +78 -616
  81. data/CHANGELOG.md +0 -25
  82. data/docs/Alerts.md +0 -30
  83. data/docs/AlertsInput.md +0 -24
  84. data/docs/AlertsUpdate.md +0 -24
  85. data/docs/ApiKeys.md +0 -40
  86. data/docs/ApiKeysInput.md +0 -34
  87. data/docs/ApiKeysUpdate.md +0 -34
  88. data/docs/AssetPriceHistory.md +0 -30
  89. data/docs/AssetPriceHistoryInput.md +0 -24
  90. data/docs/AssetPriceHistoryUpdate.md +0 -24
  91. data/docs/AssetUsecases.md +0 -28
  92. data/docs/AssetUsecasesApi.md +0 -157
  93. data/docs/Assets.md +0 -142
  94. data/docs/AssetsInput.md +0 -128
  95. data/docs/AssetsUpdate.md +0 -128
  96. data/docs/CloudProviders.md +0 -28
  97. data/docs/CloudProvidersInput.md +0 -22
  98. data/docs/CloudProvidersUpdate.md +0 -22
  99. data/docs/Companies.md +0 -46
  100. data/docs/CompaniesInput.md +0 -40
  101. data/docs/CompaniesUpdate.md +0 -40
  102. data/docs/Connections.md +0 -38
  103. data/docs/ConnectionsInput.md +0 -32
  104. data/docs/ConnectionsUpdate.md +0 -32
  105. data/docs/CreateAlerts200Response.md +0 -20
  106. data/docs/CreateAlerts200ResponseData.md +0 -18
  107. data/docs/CreateApiKeys200Response.md +0 -20
  108. data/docs/CreateApiKeys200ResponseData.md +0 -18
  109. data/docs/CreateAssetPriceHistory200Response.md +0 -20
  110. data/docs/CreateAssetPriceHistory200ResponseData.md +0 -18
  111. data/docs/CreateAssetsAnalyze200Response.md +0 -20
  112. data/docs/CreateAssetsAnalyze200ResponseData.md +0 -18
  113. data/docs/CreateConnections200Response.md +0 -20
  114. data/docs/CreateConnections200ResponseData.md +0 -18
  115. data/docs/CreateEndpoints200Response.md +0 -20
  116. data/docs/CreateEndpoints200ResponseData.md +0 -18
  117. data/docs/CreateFavorites200Response.md +0 -20
  118. data/docs/CreateFavorites200ResponseData.md +0 -18
  119. data/docs/CreatePostgenIntegrations200Response.md +0 -20
  120. data/docs/CreatePostgenIntegrations200ResponseData.md +0 -18
  121. data/docs/CreatePosts200Response.md +0 -20
  122. data/docs/CreatePosts200ResponseData.md +0 -18
  123. data/docs/CreateUsers200Response.md +0 -20
  124. data/docs/CreateUsers200ResponseData.md +0 -18
  125. data/docs/DeleteAlerts200Response.md +0 -20
  126. data/docs/DeleteAlerts200ResponseData.md +0 -18
  127. data/docs/DeleteApiKeys200Response.md +0 -20
  128. data/docs/DeleteApiKeys200ResponseData.md +0 -18
  129. data/docs/DeleteAssetPriceHistory200Response.md +0 -20
  130. data/docs/DeleteAssetPriceHistory200ResponseData.md +0 -18
  131. data/docs/DeleteAssets200Response.md +0 -20
  132. data/docs/DeleteAssets200ResponseData.md +0 -18
  133. data/docs/DeleteConnections200Response.md +0 -20
  134. data/docs/DeleteConnections200ResponseData.md +0 -18
  135. data/docs/DeleteEndpoints200Response.md +0 -20
  136. data/docs/DeleteEndpoints200ResponseData.md +0 -18
  137. data/docs/DeleteFavorites200Response.md +0 -20
  138. data/docs/DeleteFavorites200ResponseData.md +0 -18
  139. data/docs/DeletePostgenIntegrations200Response.md +0 -20
  140. data/docs/DeletePostgenIntegrations200ResponseData.md +0 -18
  141. data/docs/DeletePosts200Response.md +0 -20
  142. data/docs/DeletePosts200ResponseData.md +0 -18
  143. data/docs/DeleteUsers200Response.md +0 -20
  144. data/docs/DeleteUsers200ResponseData.md +0 -18
  145. data/docs/Endpoints.md +0 -96
  146. data/docs/EndpointsApi.md +0 -1189
  147. data/docs/EndpointsInput.md +0 -94
  148. data/docs/EndpointsUpdate.md +0 -94
  149. data/docs/Favorites.md +0 -34
  150. data/docs/FavoritesInput.md +0 -28
  151. data/docs/FavoritesUpdate.md +0 -28
  152. data/docs/GetAlertsById200Response.md +0 -20
  153. data/docs/GetApiKeysById200Response.md +0 -20
  154. data/docs/GetAssetPriceHistoryById200Response.md +0 -20
  155. data/docs/GetAssetUsecasesById200Response.md +0 -20
  156. data/docs/GetAssetsByIdAnalyze200Response.md +0 -20
  157. data/docs/GetCloudProvidersById200Response.md +0 -20
  158. data/docs/GetCompaniesById200Response.md +0 -20
  159. data/docs/GetConnectionsById200Response.md +0 -20
  160. data/docs/GetEndpointsByIdConnectionsDescribe200Response.md +0 -20
  161. data/docs/GetFavoritesById200Response.md +0 -20
  162. data/docs/GetIndustriesById200Response.md +0 -20
  163. data/docs/GetJobFunctionsById200Response.md +0 -20
  164. data/docs/GetPostgenIntegrationsById200Response.md +0 -20
  165. data/docs/GetPostsById200Response.md +0 -20
  166. data/docs/GetStorageEnginesById200Response.md +0 -20
  167. data/docs/GetUsersById200Response.md +0 -20
  168. data/docs/Industries.md +0 -32
  169. data/docs/IndustriesApi.md +0 -237
  170. data/docs/InlineObject4.md +0 -20
  171. data/docs/InlineObject5.md +0 -20
  172. data/docs/InlineObject6.md +0 -22
  173. data/docs/InlineObject7.md +0 -20
  174. data/docs/JobFunctions.md +0 -24
  175. data/docs/JobFunctionsApi.md +0 -157
  176. data/docs/JobFunctionsInput.md +0 -18
  177. data/docs/JobFunctionsUpdate.md +0 -18
  178. data/docs/ListApiKeys200Response.md +0 -20
  179. data/docs/ListAssetUsecases200Response.md +0 -20
  180. data/docs/ListAssets200Response.md +0 -20
  181. data/docs/ListCloudProviders200Response.md +0 -20
  182. data/docs/ListCompaniesAnalyticsAssets200Response.md +0 -20
  183. data/docs/ListConnections200Response.md +0 -20
  184. data/docs/ListEndpoints200Response.md +0 -20
  185. data/docs/ListIndustries200Response.md +0 -20
  186. data/docs/ListJobFunctions200Response.md +0 -20
  187. data/docs/ListPostgenIntegrations200Response.md +0 -20
  188. data/docs/ListPosts200Response.md +0 -20
  189. data/docs/ListStorageEngines200Response.md +0 -20
  190. data/docs/ListUsers200Response.md +0 -20
  191. data/docs/PostPublications.md +0 -40
  192. data/docs/PostPublicationsInput.md +0 -34
  193. data/docs/PostPublicationsUpdate.md +0 -34
  194. data/docs/PostgenIntegrations.md +0 -36
  195. data/docs/PostgenIntegrationsApi.md +0 -463
  196. data/docs/PostgenIntegrationsInput.md +0 -30
  197. data/docs/PostgenIntegrationsUpdate.md +0 -30
  198. data/docs/Posts.md +0 -68
  199. data/docs/PostsApi.md +0 -843
  200. data/docs/PostsInput.md +0 -62
  201. data/docs/PostsUpdate.md +0 -62
  202. data/docs/StorageEngines.md +0 -32
  203. data/docs/StorageEnginesApi.md +0 -161
  204. data/docs/UpdateAlerts200Response.md +0 -20
  205. data/docs/UpdateAlerts200ResponseData.md +0 -18
  206. data/docs/UpdateApiKeys200Response.md +0 -20
  207. data/docs/UpdateApiKeys200ResponseData.md +0 -18
  208. data/docs/UpdateAssetPriceHistory200Response.md +0 -20
  209. data/docs/UpdateAssetPriceHistory200ResponseData.md +0 -18
  210. data/docs/UpdateAssets200Response.md +0 -20
  211. data/docs/UpdateAssets200ResponseData.md +0 -18
  212. data/docs/UpdateCompanies200Response.md +0 -20
  213. data/docs/UpdateCompanies200ResponseData.md +0 -18
  214. data/docs/UpdateConnections200Response.md +0 -20
  215. data/docs/UpdateConnections200ResponseData.md +0 -18
  216. data/docs/UpdateEndpoints200Response.md +0 -20
  217. data/docs/UpdateEndpoints200ResponseData.md +0 -18
  218. data/docs/UpdateFavorites200Response.md +0 -20
  219. data/docs/UpdateFavorites200ResponseData.md +0 -18
  220. data/docs/UpdatePostgenIntegrations200Response.md +0 -20
  221. data/docs/UpdatePostgenIntegrations200ResponseData.md +0 -18
  222. data/docs/UpdatePosts200Response.md +0 -20
  223. data/docs/UpdatePosts200ResponseData.md +0 -18
  224. data/docs/UpdateUsers200Response.md +0 -20
  225. data/docs/UpdateUsers200ResponseData.md +0 -18
  226. data/docs/Users.md +0 -36
  227. data/docs/UsersInput.md +0 -30
  228. data/docs/UsersUpdate.md +0 -30
  229. data/lib/spartera_api_sdk/api/asset_usecases_api.rb +0 -190
  230. data/lib/spartera_api_sdk/api/endpoints_api.rb +0 -1613
  231. data/lib/spartera_api_sdk/api/industries_api.rb +0 -284
  232. data/lib/spartera_api_sdk/api/job_functions_api.rb +0 -190
  233. data/lib/spartera_api_sdk/api/postgen_integrations_api.rb +0 -634
  234. data/lib/spartera_api_sdk/api/posts_api.rb +0 -1190
  235. data/lib/spartera_api_sdk/api/storage_engines_api.rb +0 -228
  236. data/lib/spartera_api_sdk/api_model_base.rb +0 -88
  237. data/lib/spartera_api_sdk/models/alerts_input.rb +0 -213
  238. data/lib/spartera_api_sdk/models/alerts_update.rb +0 -179
  239. data/lib/spartera_api_sdk/models/api_keys_input.rb +0 -263
  240. data/lib/spartera_api_sdk/models/api_keys_update.rb +0 -229
  241. data/lib/spartera_api_sdk/models/asset_price_history_input.rb +0 -179
  242. data/lib/spartera_api_sdk/models/asset_price_history_update.rb +0 -179
  243. data/lib/spartera_api_sdk/models/asset_usecases.rb +0 -216
  244. data/lib/spartera_api_sdk/models/assets.rb +0 -1068
  245. data/lib/spartera_api_sdk/models/assets_input.rb +0 -918
  246. data/lib/spartera_api_sdk/models/assets_update.rb +0 -877
  247. data/lib/spartera_api_sdk/models/cloud_providers_input.rb +0 -186
  248. data/lib/spartera_api_sdk/models/cloud_providers_update.rb +0 -169
  249. data/lib/spartera_api_sdk/models/companies_input.rb +0 -327
  250. data/lib/spartera_api_sdk/models/companies_update.rb +0 -293
  251. data/lib/spartera_api_sdk/models/connections_input.rb +0 -287
  252. data/lib/spartera_api_sdk/models/connections_update.rb +0 -253
  253. data/lib/spartera_api_sdk/models/create_alerts200_response.rb +0 -191
  254. data/lib/spartera_api_sdk/models/create_alerts200_response_data.rb +0 -165
  255. data/lib/spartera_api_sdk/models/create_api_keys200_response.rb +0 -191
  256. data/lib/spartera_api_sdk/models/create_api_keys200_response_data.rb +0 -165
  257. data/lib/spartera_api_sdk/models/create_asset_price_history200_response.rb +0 -191
  258. data/lib/spartera_api_sdk/models/create_asset_price_history200_response_data.rb +0 -165
  259. data/lib/spartera_api_sdk/models/create_assets_analyze200_response.rb +0 -191
  260. data/lib/spartera_api_sdk/models/create_assets_analyze200_response_data.rb +0 -165
  261. data/lib/spartera_api_sdk/models/create_connections200_response.rb +0 -191
  262. data/lib/spartera_api_sdk/models/create_connections200_response_data.rb +0 -165
  263. data/lib/spartera_api_sdk/models/create_endpoints200_response.rb +0 -191
  264. data/lib/spartera_api_sdk/models/create_endpoints200_response_data.rb +0 -165
  265. data/lib/spartera_api_sdk/models/create_favorites200_response.rb +0 -191
  266. data/lib/spartera_api_sdk/models/create_favorites200_response_data.rb +0 -165
  267. data/lib/spartera_api_sdk/models/create_postgen_integrations200_response.rb +0 -191
  268. data/lib/spartera_api_sdk/models/create_postgen_integrations200_response_data.rb +0 -165
  269. data/lib/spartera_api_sdk/models/create_posts200_response.rb +0 -191
  270. data/lib/spartera_api_sdk/models/create_posts200_response_data.rb +0 -165
  271. data/lib/spartera_api_sdk/models/create_users200_response.rb +0 -191
  272. data/lib/spartera_api_sdk/models/create_users200_response_data.rb +0 -165
  273. data/lib/spartera_api_sdk/models/delete_alerts200_response.rb +0 -191
  274. data/lib/spartera_api_sdk/models/delete_alerts200_response_data.rb +0 -165
  275. data/lib/spartera_api_sdk/models/delete_api_keys200_response.rb +0 -191
  276. data/lib/spartera_api_sdk/models/delete_api_keys200_response_data.rb +0 -165
  277. data/lib/spartera_api_sdk/models/delete_asset_price_history200_response.rb +0 -191
  278. data/lib/spartera_api_sdk/models/delete_asset_price_history200_response_data.rb +0 -165
  279. data/lib/spartera_api_sdk/models/delete_assets200_response.rb +0 -191
  280. data/lib/spartera_api_sdk/models/delete_assets200_response_data.rb +0 -165
  281. data/lib/spartera_api_sdk/models/delete_connections200_response.rb +0 -191
  282. data/lib/spartera_api_sdk/models/delete_connections200_response_data.rb +0 -165
  283. data/lib/spartera_api_sdk/models/delete_endpoints200_response.rb +0 -191
  284. data/lib/spartera_api_sdk/models/delete_endpoints200_response_data.rb +0 -165
  285. data/lib/spartera_api_sdk/models/delete_favorites200_response.rb +0 -191
  286. data/lib/spartera_api_sdk/models/delete_favorites200_response_data.rb +0 -165
  287. data/lib/spartera_api_sdk/models/delete_postgen_integrations200_response.rb +0 -191
  288. data/lib/spartera_api_sdk/models/delete_postgen_integrations200_response_data.rb +0 -165
  289. data/lib/spartera_api_sdk/models/delete_posts200_response.rb +0 -191
  290. data/lib/spartera_api_sdk/models/delete_posts200_response_data.rb +0 -165
  291. data/lib/spartera_api_sdk/models/delete_users200_response.rb +0 -191
  292. data/lib/spartera_api_sdk/models/delete_users200_response_data.rb +0 -165
  293. data/lib/spartera_api_sdk/models/endpoints.rb +0 -788
  294. data/lib/spartera_api_sdk/models/endpoints_input.rb +0 -686
  295. data/lib/spartera_api_sdk/models/endpoints_update.rb +0 -635
  296. data/lib/spartera_api_sdk/models/favorites_input.rb +0 -233
  297. data/lib/spartera_api_sdk/models/favorites_update.rb +0 -199
  298. data/lib/spartera_api_sdk/models/get_alerts_by_id200_response.rb +0 -191
  299. data/lib/spartera_api_sdk/models/get_api_keys_by_id200_response.rb +0 -191
  300. data/lib/spartera_api_sdk/models/get_asset_price_history_by_id200_response.rb +0 -191
  301. data/lib/spartera_api_sdk/models/get_asset_usecases_by_id200_response.rb +0 -191
  302. data/lib/spartera_api_sdk/models/get_assets_by_id_analyze200_response.rb +0 -191
  303. data/lib/spartera_api_sdk/models/get_cloud_providers_by_id200_response.rb +0 -191
  304. data/lib/spartera_api_sdk/models/get_companies_by_id200_response.rb +0 -191
  305. data/lib/spartera_api_sdk/models/get_connections_by_id200_response.rb +0 -191
  306. data/lib/spartera_api_sdk/models/get_endpoints_by_id_connections_describe200_response.rb +0 -191
  307. data/lib/spartera_api_sdk/models/get_favorites_by_id200_response.rb +0 -191
  308. data/lib/spartera_api_sdk/models/get_industries_by_id200_response.rb +0 -191
  309. data/lib/spartera_api_sdk/models/get_job_functions_by_id200_response.rb +0 -191
  310. data/lib/spartera_api_sdk/models/get_postgen_integrations_by_id200_response.rb +0 -191
  311. data/lib/spartera_api_sdk/models/get_posts_by_id200_response.rb +0 -191
  312. data/lib/spartera_api_sdk/models/get_storage_engines_by_id200_response.rb +0 -191
  313. data/lib/spartera_api_sdk/models/get_users_by_id200_response.rb +0 -191
  314. data/lib/spartera_api_sdk/models/industries.rb +0 -253
  315. data/lib/spartera_api_sdk/models/inline_object4.rb +0 -156
  316. data/lib/spartera_api_sdk/models/inline_object5.rb +0 -156
  317. data/lib/spartera_api_sdk/models/inline_object6.rb +0 -166
  318. data/lib/spartera_api_sdk/models/inline_object7.rb +0 -156
  319. data/lib/spartera_api_sdk/models/job_functions.rb +0 -213
  320. data/lib/spartera_api_sdk/models/job_functions_input.rb +0 -166
  321. data/lib/spartera_api_sdk/models/job_functions_update.rb +0 -149
  322. data/lib/spartera_api_sdk/models/list_api_keys200_response.rb +0 -193
  323. data/lib/spartera_api_sdk/models/list_asset_usecases200_response.rb +0 -193
  324. data/lib/spartera_api_sdk/models/list_assets200_response.rb +0 -193
  325. data/lib/spartera_api_sdk/models/list_cloud_providers200_response.rb +0 -193
  326. data/lib/spartera_api_sdk/models/list_companies_analytics_assets200_response.rb +0 -193
  327. data/lib/spartera_api_sdk/models/list_connections200_response.rb +0 -193
  328. data/lib/spartera_api_sdk/models/list_endpoints200_response.rb +0 -193
  329. data/lib/spartera_api_sdk/models/list_industries200_response.rb +0 -193
  330. data/lib/spartera_api_sdk/models/list_job_functions200_response.rb +0 -193
  331. data/lib/spartera_api_sdk/models/list_postgen_integrations200_response.rb +0 -193
  332. data/lib/spartera_api_sdk/models/list_posts200_response.rb +0 -193
  333. data/lib/spartera_api_sdk/models/list_storage_engines200_response.rb +0 -193
  334. data/lib/spartera_api_sdk/models/list_users200_response.rb +0 -193
  335. data/lib/spartera_api_sdk/models/post_publications.rb +0 -327
  336. data/lib/spartera_api_sdk/models/post_publications_input.rb +0 -280
  337. data/lib/spartera_api_sdk/models/post_publications_update.rb +0 -229
  338. data/lib/spartera_api_sdk/models/postgen_integrations.rb +0 -341
  339. data/lib/spartera_api_sdk/models/postgen_integrations_input.rb +0 -294
  340. data/lib/spartera_api_sdk/models/postgen_integrations_update.rb +0 -209
  341. data/lib/spartera_api_sdk/models/posts.rb +0 -586
  342. data/lib/spartera_api_sdk/models/posts_input.rb +0 -437
  343. data/lib/spartera_api_sdk/models/posts_update.rb +0 -369
  344. data/lib/spartera_api_sdk/models/storage_engines.rb +0 -294
  345. data/lib/spartera_api_sdk/models/update_alerts200_response.rb +0 -191
  346. data/lib/spartera_api_sdk/models/update_alerts200_response_data.rb +0 -165
  347. data/lib/spartera_api_sdk/models/update_api_keys200_response.rb +0 -191
  348. data/lib/spartera_api_sdk/models/update_api_keys200_response_data.rb +0 -165
  349. data/lib/spartera_api_sdk/models/update_asset_price_history200_response.rb +0 -191
  350. data/lib/spartera_api_sdk/models/update_asset_price_history200_response_data.rb +0 -165
  351. data/lib/spartera_api_sdk/models/update_assets200_response.rb +0 -191
  352. data/lib/spartera_api_sdk/models/update_assets200_response_data.rb +0 -165
  353. data/lib/spartera_api_sdk/models/update_companies200_response.rb +0 -191
  354. data/lib/spartera_api_sdk/models/update_companies200_response_data.rb +0 -165
  355. data/lib/spartera_api_sdk/models/update_connections200_response.rb +0 -191
  356. data/lib/spartera_api_sdk/models/update_connections200_response_data.rb +0 -165
  357. data/lib/spartera_api_sdk/models/update_endpoints200_response.rb +0 -191
  358. data/lib/spartera_api_sdk/models/update_endpoints200_response_data.rb +0 -165
  359. data/lib/spartera_api_sdk/models/update_favorites200_response.rb +0 -191
  360. data/lib/spartera_api_sdk/models/update_favorites200_response_data.rb +0 -165
  361. data/lib/spartera_api_sdk/models/update_postgen_integrations200_response.rb +0 -191
  362. data/lib/spartera_api_sdk/models/update_postgen_integrations200_response_data.rb +0 -165
  363. data/lib/spartera_api_sdk/models/update_posts200_response.rb +0 -191
  364. data/lib/spartera_api_sdk/models/update_posts200_response_data.rb +0 -165
  365. data/lib/spartera_api_sdk/models/update_users200_response.rb +0 -191
  366. data/lib/spartera_api_sdk/models/update_users200_response_data.rb +0 -165
  367. data/lib/spartera_api_sdk/models/users_input.rb +0 -260
  368. data/lib/spartera_api_sdk/models/users_update.rb +0 -243
  369. data/spec/api/asset_usecases_api_spec.rb +0 -61
  370. data/spec/api/endpoints_api_spec.rb +0 -240
  371. data/spec/api/industries_api_spec.rb +0 -76
  372. data/spec/api/job_functions_api_spec.rb +0 -61
  373. data/spec/api/postgen_integrations_api_spec.rb +0 -117
  374. data/spec/api/posts_api_spec.rb +0 -186
  375. data/spec/api/storage_engines_api_spec.rb +0 -63
  376. data/spec/models/alerts_input_spec.rb +0 -54
  377. data/spec/models/alerts_spec.rb +0 -72
  378. data/spec/models/alerts_update_spec.rb +0 -54
  379. data/spec/models/asset_price_history_input_spec.rb +0 -54
  380. data/spec/models/asset_price_history_spec.rb +0 -72
  381. data/spec/models/asset_price_history_update_spec.rb +0 -54
  382. data/spec/models/asset_usecases_spec.rb +0 -66
  383. data/spec/models/assets_input_spec.rb +0 -418
  384. data/spec/models/assets_spec.rb +0 -464
  385. data/spec/models/assets_update_spec.rb +0 -418
  386. data/spec/models/cloud_providers_input_spec.rb +0 -48
  387. data/spec/models/cloud_providers_update_spec.rb +0 -48
  388. data/spec/models/companies_input_spec.rb +0 -106
  389. data/spec/models/companies_update_spec.rb +0 -106
  390. data/spec/models/connections_input_spec.rb +0 -82
  391. data/spec/models/connections_spec.rb +0 -100
  392. data/spec/models/connections_update_spec.rb +0 -82
  393. data/spec/models/create_alerts200_response_data_spec.rb +0 -36
  394. data/spec/models/create_alerts200_response_spec.rb +0 -42
  395. data/spec/models/create_api_keys200_response_data_spec.rb +0 -36
  396. data/spec/models/create_api_keys200_response_spec.rb +0 -42
  397. data/spec/models/create_asset_price_history200_response_data_spec.rb +0 -36
  398. data/spec/models/create_asset_price_history200_response_spec.rb +0 -42
  399. data/spec/models/create_assets_analyze200_response_data_spec.rb +0 -36
  400. data/spec/models/create_assets_analyze200_response_spec.rb +0 -42
  401. data/spec/models/create_connections200_response_data_spec.rb +0 -36
  402. data/spec/models/create_connections200_response_spec.rb +0 -42
  403. data/spec/models/create_endpoints200_response_data_spec.rb +0 -36
  404. data/spec/models/create_endpoints200_response_spec.rb +0 -42
  405. data/spec/models/create_favorites200_response_data_spec.rb +0 -36
  406. data/spec/models/create_favorites200_response_spec.rb +0 -42
  407. data/spec/models/create_postgen_integrations200_response_data_spec.rb +0 -36
  408. data/spec/models/create_postgen_integrations200_response_spec.rb +0 -42
  409. data/spec/models/create_posts200_response_data_spec.rb +0 -36
  410. data/spec/models/create_posts200_response_spec.rb +0 -42
  411. data/spec/models/create_users200_response_data_spec.rb +0 -36
  412. data/spec/models/create_users200_response_spec.rb +0 -42
  413. data/spec/models/delete_alerts200_response_data_spec.rb +0 -36
  414. data/spec/models/delete_alerts200_response_spec.rb +0 -42
  415. data/spec/models/delete_api_keys200_response_data_spec.rb +0 -36
  416. data/spec/models/delete_api_keys200_response_spec.rb +0 -42
  417. data/spec/models/delete_asset_price_history200_response_data_spec.rb +0 -36
  418. data/spec/models/delete_asset_price_history200_response_spec.rb +0 -42
  419. data/spec/models/delete_assets200_response_data_spec.rb +0 -36
  420. data/spec/models/delete_assets200_response_spec.rb +0 -42
  421. data/spec/models/delete_connections200_response_data_spec.rb +0 -36
  422. data/spec/models/delete_connections200_response_spec.rb +0 -42
  423. data/spec/models/delete_endpoints200_response_data_spec.rb +0 -36
  424. data/spec/models/delete_endpoints200_response_spec.rb +0 -42
  425. data/spec/models/delete_favorites200_response_data_spec.rb +0 -36
  426. data/spec/models/delete_favorites200_response_spec.rb +0 -42
  427. data/spec/models/delete_postgen_integrations200_response_data_spec.rb +0 -36
  428. data/spec/models/delete_postgen_integrations200_response_spec.rb +0 -42
  429. data/spec/models/delete_posts200_response_data_spec.rb +0 -36
  430. data/spec/models/delete_posts200_response_spec.rb +0 -42
  431. data/spec/models/delete_users200_response_data_spec.rb +0 -36
  432. data/spec/models/delete_users200_response_spec.rb +0 -42
  433. data/spec/models/endpoints_input_spec.rb +0 -292
  434. data/spec/models/endpoints_update_spec.rb +0 -292
  435. data/spec/models/favorites_input_spec.rb +0 -66
  436. data/spec/models/favorites_update_spec.rb +0 -66
  437. data/spec/models/get_alerts_by_id200_response_spec.rb +0 -42
  438. data/spec/models/get_api_keys_by_id200_response_spec.rb +0 -42
  439. data/spec/models/get_asset_price_history_by_id200_response_spec.rb +0 -42
  440. data/spec/models/get_asset_usecases_by_id200_response_spec.rb +0 -42
  441. data/spec/models/get_assets_by_id_analyze200_response_spec.rb +0 -42
  442. data/spec/models/get_cloud_providers_by_id200_response_spec.rb +0 -42
  443. data/spec/models/get_companies_by_id200_response_spec.rb +0 -42
  444. data/spec/models/get_connections_by_id200_response_spec.rb +0 -42
  445. data/spec/models/get_endpoints_by_id_connections_describe200_response_spec.rb +0 -42
  446. data/spec/models/get_favorites_by_id200_response_spec.rb +0 -42
  447. data/spec/models/get_industries_by_id200_response_spec.rb +0 -42
  448. data/spec/models/get_job_functions_by_id200_response_spec.rb +0 -42
  449. data/spec/models/get_postgen_integrations_by_id200_response_spec.rb +0 -42
  450. data/spec/models/get_posts_by_id200_response_spec.rb +0 -42
  451. data/spec/models/get_storage_engines_by_id200_response_spec.rb +0 -42
  452. data/spec/models/get_users_by_id200_response_spec.rb +0 -42
  453. data/spec/models/industries_spec.rb +0 -78
  454. data/spec/models/inline_object4_spec.rb +0 -42
  455. data/spec/models/inline_object5_spec.rb +0 -42
  456. data/spec/models/inline_object6_spec.rb +0 -48
  457. data/spec/models/inline_object7_spec.rb +0 -42
  458. data/spec/models/job_functions_input_spec.rb +0 -36
  459. data/spec/models/job_functions_spec.rb +0 -54
  460. data/spec/models/job_functions_update_spec.rb +0 -36
  461. data/spec/models/list_api_keys200_response_spec.rb +0 -42
  462. data/spec/models/list_asset_usecases200_response_spec.rb +0 -42
  463. data/spec/models/list_assets200_response_spec.rb +0 -42
  464. data/spec/models/list_cloud_providers200_response_spec.rb +0 -42
  465. data/spec/models/list_companies_analytics_assets200_response_spec.rb +0 -42
  466. data/spec/models/list_connections200_response_spec.rb +0 -42
  467. data/spec/models/list_endpoints200_response_spec.rb +0 -42
  468. data/spec/models/list_industries200_response_spec.rb +0 -42
  469. data/spec/models/list_job_functions200_response_spec.rb +0 -42
  470. data/spec/models/list_postgen_integrations200_response_spec.rb +0 -42
  471. data/spec/models/list_posts200_response_spec.rb +0 -42
  472. data/spec/models/list_storage_engines200_response_spec.rb +0 -42
  473. data/spec/models/list_users200_response_spec.rb +0 -42
  474. data/spec/models/post_publications_input_spec.rb +0 -84
  475. data/spec/models/post_publications_spec.rb +0 -102
  476. data/spec/models/post_publications_update_spec.rb +0 -84
  477. data/spec/models/postgen_integrations_input_spec.rb +0 -72
  478. data/spec/models/postgen_integrations_update_spec.rb +0 -72
  479. data/spec/models/posts_spec.rb +0 -186
  480. data/spec/models/posts_update_spec.rb +0 -168
  481. data/spec/models/storage_engines_spec.rb +0 -82
  482. data/spec/models/update_alerts200_response_data_spec.rb +0 -36
  483. data/spec/models/update_alerts200_response_spec.rb +0 -42
  484. data/spec/models/update_api_keys200_response_data_spec.rb +0 -36
  485. data/spec/models/update_api_keys200_response_spec.rb +0 -42
  486. data/spec/models/update_asset_price_history200_response_data_spec.rb +0 -36
  487. data/spec/models/update_asset_price_history200_response_spec.rb +0 -42
  488. data/spec/models/update_assets200_response_data_spec.rb +0 -36
  489. data/spec/models/update_assets200_response_spec.rb +0 -42
  490. data/spec/models/update_companies200_response_data_spec.rb +0 -36
  491. data/spec/models/update_companies200_response_spec.rb +0 -42
  492. data/spec/models/update_connections200_response_data_spec.rb +0 -36
  493. data/spec/models/update_connections200_response_spec.rb +0 -42
  494. data/spec/models/update_endpoints200_response_data_spec.rb +0 -36
  495. data/spec/models/update_endpoints200_response_spec.rb +0 -42
  496. data/spec/models/update_favorites200_response_data_spec.rb +0 -36
  497. data/spec/models/update_favorites200_response_spec.rb +0 -42
  498. data/spec/models/update_postgen_integrations200_response_data_spec.rb +0 -36
  499. data/spec/models/update_postgen_integrations200_response_spec.rb +0 -42
  500. data/spec/models/update_posts200_response_data_spec.rb +0 -36
  501. data/spec/models/update_posts200_response_spec.rb +0 -42
  502. data/spec/models/update_users200_response_data_spec.rb +0 -36
  503. data/spec/models/update_users200_response_spec.rb +0 -42
  504. data/spec/models/users_input_spec.rb +0 -76
  505. data/spec/models/users_spec.rb +0 -94
  506. data/spec/models/users_update_spec.rb +0 -76
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Auto-generated API documentation for REST services of the Spartera platform
5
5
 
6
- The version of the OpenAPI document: 1.25.0
6
+ The version of the OpenAPI document: 0.0.0
7
7
  Contact: support@spartera.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.21.0
9
+ Generator version: 7.13.0
10
10
 
11
11
  =end
12
12
 
@@ -19,67 +19,35 @@ module SparteraApiSdk
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
- # Create a new price history record for an asset
23
- # @param company_id [String] Unique identifier for the Company
24
- # @param asset_id [String] Unique identifier for the Asset
25
- # @param asset_price_history_input [AssetPriceHistoryInput]
22
+ # Get the currently active price for an asset
23
+ # @param company_id [String]
24
+ # @param asset_id [String]
26
25
  # @param [Hash] opts the optional parameters
27
- # @return [CreateAssetPriceHistory200Response]
28
- def create_asset_price_history(company_id, asset_id, asset_price_history_input, opts = {})
29
- data, _status_code, _headers = create_asset_price_history_with_http_info(company_id, asset_id, asset_price_history_input, opts)
26
+ # @return [Object]
27
+ def companies_company_id_assets_asset_id_prices_active_get(company_id, asset_id, opts = {})
28
+ data, _status_code, _headers = companies_company_id_assets_asset_id_prices_active_get_with_http_info(company_id, asset_id, opts)
30
29
  data
31
30
  end
32
31
 
33
- # Create a new price history record for an asset
34
- # @param company_id [String] Unique identifier for the Company
35
- # @param asset_id [String] Unique identifier for the Asset
36
- # @param asset_price_history_input [AssetPriceHistoryInput]
32
+ # Get the currently active price for an asset
33
+ # @param company_id [String]
34
+ # @param asset_id [String]
37
35
  # @param [Hash] opts the optional parameters
38
- # @return [Array<(CreateAssetPriceHistory200Response, Integer, Hash)>] CreateAssetPriceHistory200Response data, response status code and response headers
39
- def create_asset_price_history_with_http_info(company_id, asset_id, asset_price_history_input, opts = {})
36
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
37
+ def companies_company_id_assets_asset_id_prices_active_get_with_http_info(company_id, asset_id, opts = {})
40
38
  if @api_client.config.debugging
41
- @api_client.config.logger.debug 'Calling API: AssetPriceHistoryApi.create_asset_price_history ...'
39
+ @api_client.config.logger.debug 'Calling API: AssetPriceHistoryApi.companies_company_id_assets_asset_id_prices_active_get ...'
42
40
  end
43
41
  # verify the required parameter 'company_id' is set
44
42
  if @api_client.config.client_side_validation && company_id.nil?
45
- fail ArgumentError, "Missing the required parameter 'company_id' when calling AssetPriceHistoryApi.create_asset_price_history"
46
- end
47
- if @api_client.config.client_side_validation && company_id.to_s.length > 255
48
- fail ArgumentError, 'invalid value for "company_id" when calling AssetPriceHistoryApi.create_asset_price_history, the character length must be smaller than or equal to 255.'
49
- end
50
-
51
- if @api_client.config.client_side_validation && company_id.to_s.length < 1
52
- fail ArgumentError, 'invalid value for "company_id" when calling AssetPriceHistoryApi.create_asset_price_history, the character length must be greater than or equal to 1.'
53
- end
54
-
55
- pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
56
- if @api_client.config.client_side_validation && company_id !~ pattern
57
- fail ArgumentError, "invalid value for 'company_id' when calling AssetPriceHistoryApi.create_asset_price_history, must conform to the pattern #{pattern}."
43
+ fail ArgumentError, "Missing the required parameter 'company_id' when calling AssetPriceHistoryApi.companies_company_id_assets_asset_id_prices_active_get"
58
44
  end
59
-
60
45
  # verify the required parameter 'asset_id' is set
61
46
  if @api_client.config.client_side_validation && asset_id.nil?
62
- fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetPriceHistoryApi.create_asset_price_history"
63
- end
64
- if @api_client.config.client_side_validation && asset_id.to_s.length > 255
65
- fail ArgumentError, 'invalid value for "asset_id" when calling AssetPriceHistoryApi.create_asset_price_history, the character length must be smaller than or equal to 255.'
66
- end
67
-
68
- if @api_client.config.client_side_validation && asset_id.to_s.length < 1
69
- fail ArgumentError, 'invalid value for "asset_id" when calling AssetPriceHistoryApi.create_asset_price_history, the character length must be greater than or equal to 1.'
70
- end
71
-
72
- pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
73
- if @api_client.config.client_side_validation && asset_id !~ pattern
74
- fail ArgumentError, "invalid value for 'asset_id' when calling AssetPriceHistoryApi.create_asset_price_history, must conform to the pattern #{pattern}."
75
- end
76
-
77
- # verify the required parameter 'asset_price_history_input' is set
78
- if @api_client.config.client_side_validation && asset_price_history_input.nil?
79
- fail ArgumentError, "Missing the required parameter 'asset_price_history_input' when calling AssetPriceHistoryApi.create_asset_price_history"
47
+ fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetPriceHistoryApi.companies_company_id_assets_asset_id_prices_active_get"
80
48
  end
81
49
  # resource path
82
- local_var_path = '/companies/{company_id}/assets/{asset_id}/prices'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'asset_id' + '}', CGI.escape(asset_id.to_s))
50
+ local_var_path = '/companies/{company_id}/assets/{asset_id}/prices/active'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'asset_id' + '}', CGI.escape(asset_id.to_s))
83
51
 
84
52
  # query parameters
85
53
  query_params = opts[:query_params] || {}
@@ -88,26 +56,21 @@ module SparteraApiSdk
88
56
  header_params = opts[:header_params] || {}
89
57
  # HTTP header 'Accept' (if needed)
90
58
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
91
- # HTTP header 'Content-Type'
92
- content_type = @api_client.select_header_content_type(['application/json'])
93
- if !content_type.nil?
94
- header_params['Content-Type'] = content_type
95
- end
96
59
 
97
60
  # form parameters
98
61
  form_params = opts[:form_params] || {}
99
62
 
100
63
  # http body (model)
101
- post_body = opts[:debug_body] || @api_client.object_to_http_body(asset_price_history_input)
64
+ post_body = opts[:debug_body]
102
65
 
103
66
  # return_type
104
- return_type = opts[:debug_return_type] || 'CreateAssetPriceHistory200Response'
67
+ return_type = opts[:debug_return_type] || 'Object'
105
68
 
106
69
  # auth_names
107
- auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
70
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
108
71
 
109
72
  new_options = opts.merge(
110
- :operation => :"AssetPriceHistoryApi.create_asset_price_history",
73
+ :operation => :"AssetPriceHistoryApi.companies_company_id_assets_asset_id_prices_active_get",
111
74
  :header_params => header_params,
112
75
  :query_params => query_params,
113
76
  :form_params => form_params,
@@ -116,74 +79,48 @@ module SparteraApiSdk
116
79
  :return_type => return_type
117
80
  )
118
81
 
119
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
82
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
120
83
  if @api_client.config.debugging
121
- @api_client.config.logger.debug "API called: AssetPriceHistoryApi#create_asset_price_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
84
+ @api_client.config.logger.debug "API called: AssetPriceHistoryApi#companies_company_id_assets_asset_id_prices_active_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
122
85
  end
123
86
  return data, status_code, headers
124
87
  end
125
88
 
126
- # Calculate the credit equivalent for a given USD price without saving
127
- # @param company_id [String] Unique identifier for the Company
128
- # @param asset_id [String] Unique identifier for the Asset
129
- # @param asset_price_history_input [AssetPriceHistoryInput]
89
+ # Delete single price history record by ID
90
+ # @param company_id [String]
91
+ # @param asset_id [String]
92
+ # @param aph_id [String]
130
93
  # @param [Hash] opts the optional parameters
131
- # @return [CreateAssetPriceHistory200Response]
132
- def create_asset_price_history_prices_calculate_credits(company_id, asset_id, asset_price_history_input, opts = {})
133
- data, _status_code, _headers = create_asset_price_history_prices_calculate_credits_with_http_info(company_id, asset_id, asset_price_history_input, opts)
94
+ # @return [Object]
95
+ def companies_company_id_assets_asset_id_prices_aph_id_delete(company_id, asset_id, aph_id, opts = {})
96
+ data, _status_code, _headers = companies_company_id_assets_asset_id_prices_aph_id_delete_with_http_info(company_id, asset_id, aph_id, opts)
134
97
  data
135
98
  end
136
99
 
137
- # Calculate the credit equivalent for a given USD price without saving
138
- # @param company_id [String] Unique identifier for the Company
139
- # @param asset_id [String] Unique identifier for the Asset
140
- # @param asset_price_history_input [AssetPriceHistoryInput]
100
+ # Delete single price history record by ID
101
+ # @param company_id [String]
102
+ # @param asset_id [String]
103
+ # @param aph_id [String]
141
104
  # @param [Hash] opts the optional parameters
142
- # @return [Array<(CreateAssetPriceHistory200Response, Integer, Hash)>] CreateAssetPriceHistory200Response data, response status code and response headers
143
- def create_asset_price_history_prices_calculate_credits_with_http_info(company_id, asset_id, asset_price_history_input, opts = {})
105
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
106
+ def companies_company_id_assets_asset_id_prices_aph_id_delete_with_http_info(company_id, asset_id, aph_id, opts = {})
144
107
  if @api_client.config.debugging
145
- @api_client.config.logger.debug 'Calling API: AssetPriceHistoryApi.create_asset_price_history_prices_calculate_credits ...'
108
+ @api_client.config.logger.debug 'Calling API: AssetPriceHistoryApi.companies_company_id_assets_asset_id_prices_aph_id_delete ...'
146
109
  end
147
110
  # verify the required parameter 'company_id' is set
148
111
  if @api_client.config.client_side_validation && company_id.nil?
149
- fail ArgumentError, "Missing the required parameter 'company_id' when calling AssetPriceHistoryApi.create_asset_price_history_prices_calculate_credits"
150
- end
151
- if @api_client.config.client_side_validation && company_id.to_s.length > 255
152
- fail ArgumentError, 'invalid value for "company_id" when calling AssetPriceHistoryApi.create_asset_price_history_prices_calculate_credits, the character length must be smaller than or equal to 255.'
153
- end
154
-
155
- if @api_client.config.client_side_validation && company_id.to_s.length < 1
156
- fail ArgumentError, 'invalid value for "company_id" when calling AssetPriceHistoryApi.create_asset_price_history_prices_calculate_credits, the character length must be greater than or equal to 1.'
112
+ fail ArgumentError, "Missing the required parameter 'company_id' when calling AssetPriceHistoryApi.companies_company_id_assets_asset_id_prices_aph_id_delete"
157
113
  end
158
-
159
- pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
160
- if @api_client.config.client_side_validation && company_id !~ pattern
161
- fail ArgumentError, "invalid value for 'company_id' when calling AssetPriceHistoryApi.create_asset_price_history_prices_calculate_credits, must conform to the pattern #{pattern}."
162
- end
163
-
164
114
  # verify the required parameter 'asset_id' is set
165
115
  if @api_client.config.client_side_validation && asset_id.nil?
166
- fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetPriceHistoryApi.create_asset_price_history_prices_calculate_credits"
167
- end
168
- if @api_client.config.client_side_validation && asset_id.to_s.length > 255
169
- fail ArgumentError, 'invalid value for "asset_id" when calling AssetPriceHistoryApi.create_asset_price_history_prices_calculate_credits, the character length must be smaller than or equal to 255.'
170
- end
171
-
172
- if @api_client.config.client_side_validation && asset_id.to_s.length < 1
173
- fail ArgumentError, 'invalid value for "asset_id" when calling AssetPriceHistoryApi.create_asset_price_history_prices_calculate_credits, the character length must be greater than or equal to 1.'
116
+ fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetPriceHistoryApi.companies_company_id_assets_asset_id_prices_aph_id_delete"
174
117
  end
175
-
176
- pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
177
- if @api_client.config.client_side_validation && asset_id !~ pattern
178
- fail ArgumentError, "invalid value for 'asset_id' when calling AssetPriceHistoryApi.create_asset_price_history_prices_calculate_credits, must conform to the pattern #{pattern}."
179
- end
180
-
181
- # verify the required parameter 'asset_price_history_input' is set
182
- if @api_client.config.client_side_validation && asset_price_history_input.nil?
183
- fail ArgumentError, "Missing the required parameter 'asset_price_history_input' when calling AssetPriceHistoryApi.create_asset_price_history_prices_calculate_credits"
118
+ # verify the required parameter 'aph_id' is set
119
+ if @api_client.config.client_side_validation && aph_id.nil?
120
+ fail ArgumentError, "Missing the required parameter 'aph_id' when calling AssetPriceHistoryApi.companies_company_id_assets_asset_id_prices_aph_id_delete"
184
121
  end
185
122
  # resource path
186
- local_var_path = '/companies/{company_id}/assets/{asset_id}/prices/calculate_credits'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'asset_id' + '}', CGI.escape(asset_id.to_s))
123
+ local_var_path = '/companies/{company_id}/assets/{asset_id}/prices/{aph_id}'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'asset_id' + '}', CGI.escape(asset_id.to_s)).sub('{' + 'aph_id' + '}', CGI.escape(aph_id.to_s))
187
124
 
188
125
  # query parameters
189
126
  query_params = opts[:query_params] || {}
@@ -192,26 +129,21 @@ module SparteraApiSdk
192
129
  header_params = opts[:header_params] || {}
193
130
  # HTTP header 'Accept' (if needed)
194
131
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
195
- # HTTP header 'Content-Type'
196
- content_type = @api_client.select_header_content_type(['application/json'])
197
- if !content_type.nil?
198
- header_params['Content-Type'] = content_type
199
- end
200
132
 
201
133
  # form parameters
202
134
  form_params = opts[:form_params] || {}
203
135
 
204
136
  # http body (model)
205
- post_body = opts[:debug_body] || @api_client.object_to_http_body(asset_price_history_input)
137
+ post_body = opts[:debug_body]
206
138
 
207
139
  # return_type
208
- return_type = opts[:debug_return_type] || 'CreateAssetPriceHistory200Response'
140
+ return_type = opts[:debug_return_type] || 'Object'
209
141
 
210
142
  # auth_names
211
- auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
143
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
212
144
 
213
145
  new_options = opts.merge(
214
- :operation => :"AssetPriceHistoryApi.create_asset_price_history_prices_calculate_credits",
146
+ :operation => :"AssetPriceHistoryApi.companies_company_id_assets_asset_id_prices_aph_id_delete",
215
147
  :header_params => header_params,
216
148
  :query_params => query_params,
217
149
  :form_params => form_params,
@@ -220,74 +152,48 @@ module SparteraApiSdk
220
152
  :return_type => return_type
221
153
  )
222
154
 
223
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
155
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
224
156
  if @api_client.config.debugging
225
- @api_client.config.logger.debug "API called: AssetPriceHistoryApi#create_asset_price_history_prices_calculate_credits\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
157
+ @api_client.config.logger.debug "API called: AssetPriceHistoryApi#companies_company_id_assets_asset_id_prices_aph_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
226
158
  end
227
159
  return data, status_code, headers
228
160
  end
229
161
 
230
- # POST /companies/{company_id}/assets/{asset_id}/prices/discount
231
- # @param company_id [String] Unique identifier for the Company
232
- # @param asset_id [String] Unique identifier for the Asset
233
- # @param asset_price_history_input [AssetPriceHistoryInput]
162
+ # Get single price history record by ID
163
+ # @param company_id [String]
164
+ # @param asset_id [String]
165
+ # @param aph_id [String]
234
166
  # @param [Hash] opts the optional parameters
235
- # @return [CreateAssetPriceHistory200Response]
236
- def create_asset_price_history_prices_discount(company_id, asset_id, asset_price_history_input, opts = {})
237
- data, _status_code, _headers = create_asset_price_history_prices_discount_with_http_info(company_id, asset_id, asset_price_history_input, opts)
167
+ # @return [Object]
168
+ def companies_company_id_assets_asset_id_prices_aph_id_get(company_id, asset_id, aph_id, opts = {})
169
+ data, _status_code, _headers = companies_company_id_assets_asset_id_prices_aph_id_get_with_http_info(company_id, asset_id, aph_id, opts)
238
170
  data
239
171
  end
240
172
 
241
- # POST /companies/{company_id}/assets/{asset_id}/prices/discount
242
- # @param company_id [String] Unique identifier for the Company
243
- # @param asset_id [String] Unique identifier for the Asset
244
- # @param asset_price_history_input [AssetPriceHistoryInput]
173
+ # Get single price history record by ID
174
+ # @param company_id [String]
175
+ # @param asset_id [String]
176
+ # @param aph_id [String]
245
177
  # @param [Hash] opts the optional parameters
246
- # @return [Array<(CreateAssetPriceHistory200Response, Integer, Hash)>] CreateAssetPriceHistory200Response data, response status code and response headers
247
- def create_asset_price_history_prices_discount_with_http_info(company_id, asset_id, asset_price_history_input, opts = {})
178
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
179
+ def companies_company_id_assets_asset_id_prices_aph_id_get_with_http_info(company_id, asset_id, aph_id, opts = {})
248
180
  if @api_client.config.debugging
249
- @api_client.config.logger.debug 'Calling API: AssetPriceHistoryApi.create_asset_price_history_prices_discount ...'
181
+ @api_client.config.logger.debug 'Calling API: AssetPriceHistoryApi.companies_company_id_assets_asset_id_prices_aph_id_get ...'
250
182
  end
251
183
  # verify the required parameter 'company_id' is set
252
184
  if @api_client.config.client_side_validation && company_id.nil?
253
- fail ArgumentError, "Missing the required parameter 'company_id' when calling AssetPriceHistoryApi.create_asset_price_history_prices_discount"
254
- end
255
- if @api_client.config.client_side_validation && company_id.to_s.length > 255
256
- fail ArgumentError, 'invalid value for "company_id" when calling AssetPriceHistoryApi.create_asset_price_history_prices_discount, the character length must be smaller than or equal to 255.'
257
- end
258
-
259
- if @api_client.config.client_side_validation && company_id.to_s.length < 1
260
- fail ArgumentError, 'invalid value for "company_id" when calling AssetPriceHistoryApi.create_asset_price_history_prices_discount, the character length must be greater than or equal to 1.'
261
- end
262
-
263
- pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
264
- if @api_client.config.client_side_validation && company_id !~ pattern
265
- fail ArgumentError, "invalid value for 'company_id' when calling AssetPriceHistoryApi.create_asset_price_history_prices_discount, must conform to the pattern #{pattern}."
185
+ fail ArgumentError, "Missing the required parameter 'company_id' when calling AssetPriceHistoryApi.companies_company_id_assets_asset_id_prices_aph_id_get"
266
186
  end
267
-
268
187
  # verify the required parameter 'asset_id' is set
269
188
  if @api_client.config.client_side_validation && asset_id.nil?
270
- fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetPriceHistoryApi.create_asset_price_history_prices_discount"
271
- end
272
- if @api_client.config.client_side_validation && asset_id.to_s.length > 255
273
- fail ArgumentError, 'invalid value for "asset_id" when calling AssetPriceHistoryApi.create_asset_price_history_prices_discount, the character length must be smaller than or equal to 255.'
274
- end
275
-
276
- if @api_client.config.client_side_validation && asset_id.to_s.length < 1
277
- fail ArgumentError, 'invalid value for "asset_id" when calling AssetPriceHistoryApi.create_asset_price_history_prices_discount, the character length must be greater than or equal to 1.'
278
- end
279
-
280
- pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
281
- if @api_client.config.client_side_validation && asset_id !~ pattern
282
- fail ArgumentError, "invalid value for 'asset_id' when calling AssetPriceHistoryApi.create_asset_price_history_prices_discount, must conform to the pattern #{pattern}."
189
+ fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetPriceHistoryApi.companies_company_id_assets_asset_id_prices_aph_id_get"
283
190
  end
284
-
285
- # verify the required parameter 'asset_price_history_input' is set
286
- if @api_client.config.client_side_validation && asset_price_history_input.nil?
287
- fail ArgumentError, "Missing the required parameter 'asset_price_history_input' when calling AssetPriceHistoryApi.create_asset_price_history_prices_discount"
191
+ # verify the required parameter 'aph_id' is set
192
+ if @api_client.config.client_side_validation && aph_id.nil?
193
+ fail ArgumentError, "Missing the required parameter 'aph_id' when calling AssetPriceHistoryApi.companies_company_id_assets_asset_id_prices_aph_id_get"
288
194
  end
289
195
  # resource path
290
- local_var_path = '/companies/{company_id}/assets/{asset_id}/prices/discount'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'asset_id' + '}', CGI.escape(asset_id.to_s))
196
+ local_var_path = '/companies/{company_id}/assets/{asset_id}/prices/{aph_id}'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'asset_id' + '}', CGI.escape(asset_id.to_s)).sub('{' + 'aph_id' + '}', CGI.escape(aph_id.to_s))
291
197
 
292
198
  # query parameters
293
199
  query_params = opts[:query_params] || {}
@@ -296,26 +202,21 @@ module SparteraApiSdk
296
202
  header_params = opts[:header_params] || {}
297
203
  # HTTP header 'Accept' (if needed)
298
204
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
299
- # HTTP header 'Content-Type'
300
- content_type = @api_client.select_header_content_type(['application/json'])
301
- if !content_type.nil?
302
- header_params['Content-Type'] = content_type
303
- end
304
205
 
305
206
  # form parameters
306
207
  form_params = opts[:form_params] || {}
307
208
 
308
209
  # http body (model)
309
- post_body = opts[:debug_body] || @api_client.object_to_http_body(asset_price_history_input)
210
+ post_body = opts[:debug_body]
310
211
 
311
212
  # return_type
312
- return_type = opts[:debug_return_type] || 'CreateAssetPriceHistory200Response'
213
+ return_type = opts[:debug_return_type] || 'Object'
313
214
 
314
215
  # auth_names
315
- auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
216
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
316
217
 
317
218
  new_options = opts.merge(
318
- :operation => :"AssetPriceHistoryApi.create_asset_price_history_prices_discount",
219
+ :operation => :"AssetPriceHistoryApi.companies_company_id_assets_asset_id_prices_aph_id_get",
319
220
  :header_params => header_params,
320
221
  :query_params => query_params,
321
222
  :form_params => form_params,
@@ -324,85 +225,46 @@ module SparteraApiSdk
324
225
  :return_type => return_type
325
226
  )
326
227
 
327
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
228
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
328
229
  if @api_client.config.debugging
329
- @api_client.config.logger.debug "API called: AssetPriceHistoryApi#create_asset_price_history_prices_discount\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
230
+ @api_client.config.logger.debug "API called: AssetPriceHistoryApi#companies_company_id_assets_asset_id_prices_aph_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
330
231
  end
331
232
  return data, status_code, headers
332
233
  end
333
234
 
334
- # Delete single price history record by ID
335
- # @param company_id [String] Unique identifier for the Company
336
- # @param asset_id [String] Unique identifier for the Asset
337
- # @param aph_id [String] Unique identifier for the Aph
235
+ # Update an existing price history record by ID
236
+ # @param company_id [String]
237
+ # @param asset_id [String]
238
+ # @param aph_id [String]
338
239
  # @param [Hash] opts the optional parameters
339
- # @return [DeleteAssetPriceHistory200Response]
340
- def delete_asset_price_history(company_id, asset_id, aph_id, opts = {})
341
- data, _status_code, _headers = delete_asset_price_history_with_http_info(company_id, asset_id, aph_id, opts)
240
+ # @return [Object]
241
+ def companies_company_id_assets_asset_id_prices_aph_id_patch(company_id, asset_id, aph_id, opts = {})
242
+ data, _status_code, _headers = companies_company_id_assets_asset_id_prices_aph_id_patch_with_http_info(company_id, asset_id, aph_id, opts)
342
243
  data
343
244
  end
344
245
 
345
- # Delete single price history record by ID
346
- # @param company_id [String] Unique identifier for the Company
347
- # @param asset_id [String] Unique identifier for the Asset
348
- # @param aph_id [String] Unique identifier for the Aph
246
+ # Update an existing price history record by ID
247
+ # @param company_id [String]
248
+ # @param asset_id [String]
249
+ # @param aph_id [String]
349
250
  # @param [Hash] opts the optional parameters
350
- # @return [Array<(DeleteAssetPriceHistory200Response, Integer, Hash)>] DeleteAssetPriceHistory200Response data, response status code and response headers
351
- def delete_asset_price_history_with_http_info(company_id, asset_id, aph_id, opts = {})
251
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
252
+ def companies_company_id_assets_asset_id_prices_aph_id_patch_with_http_info(company_id, asset_id, aph_id, opts = {})
352
253
  if @api_client.config.debugging
353
- @api_client.config.logger.debug 'Calling API: AssetPriceHistoryApi.delete_asset_price_history ...'
254
+ @api_client.config.logger.debug 'Calling API: AssetPriceHistoryApi.companies_company_id_assets_asset_id_prices_aph_id_patch ...'
354
255
  end
355
256
  # verify the required parameter 'company_id' is set
356
257
  if @api_client.config.client_side_validation && company_id.nil?
357
- fail ArgumentError, "Missing the required parameter 'company_id' when calling AssetPriceHistoryApi.delete_asset_price_history"
358
- end
359
- if @api_client.config.client_side_validation && company_id.to_s.length > 255
360
- fail ArgumentError, 'invalid value for "company_id" when calling AssetPriceHistoryApi.delete_asset_price_history, the character length must be smaller than or equal to 255.'
361
- end
362
-
363
- if @api_client.config.client_side_validation && company_id.to_s.length < 1
364
- fail ArgumentError, 'invalid value for "company_id" when calling AssetPriceHistoryApi.delete_asset_price_history, the character length must be greater than or equal to 1.'
365
- end
366
-
367
- pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
368
- if @api_client.config.client_side_validation && company_id !~ pattern
369
- fail ArgumentError, "invalid value for 'company_id' when calling AssetPriceHistoryApi.delete_asset_price_history, must conform to the pattern #{pattern}."
258
+ fail ArgumentError, "Missing the required parameter 'company_id' when calling AssetPriceHistoryApi.companies_company_id_assets_asset_id_prices_aph_id_patch"
370
259
  end
371
-
372
260
  # verify the required parameter 'asset_id' is set
373
261
  if @api_client.config.client_side_validation && asset_id.nil?
374
- fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetPriceHistoryApi.delete_asset_price_history"
375
- end
376
- if @api_client.config.client_side_validation && asset_id.to_s.length > 255
377
- fail ArgumentError, 'invalid value for "asset_id" when calling AssetPriceHistoryApi.delete_asset_price_history, the character length must be smaller than or equal to 255.'
378
- end
379
-
380
- if @api_client.config.client_side_validation && asset_id.to_s.length < 1
381
- fail ArgumentError, 'invalid value for "asset_id" when calling AssetPriceHistoryApi.delete_asset_price_history, the character length must be greater than or equal to 1.'
382
- end
383
-
384
- pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
385
- if @api_client.config.client_side_validation && asset_id !~ pattern
386
- fail ArgumentError, "invalid value for 'asset_id' when calling AssetPriceHistoryApi.delete_asset_price_history, must conform to the pattern #{pattern}."
262
+ fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetPriceHistoryApi.companies_company_id_assets_asset_id_prices_aph_id_patch"
387
263
  end
388
-
389
264
  # verify the required parameter 'aph_id' is set
390
265
  if @api_client.config.client_side_validation && aph_id.nil?
391
- fail ArgumentError, "Missing the required parameter 'aph_id' when calling AssetPriceHistoryApi.delete_asset_price_history"
392
- end
393
- if @api_client.config.client_side_validation && aph_id.to_s.length > 255
394
- fail ArgumentError, 'invalid value for "aph_id" when calling AssetPriceHistoryApi.delete_asset_price_history, the character length must be smaller than or equal to 255.'
395
- end
396
-
397
- if @api_client.config.client_side_validation && aph_id.to_s.length < 1
398
- fail ArgumentError, 'invalid value for "aph_id" when calling AssetPriceHistoryApi.delete_asset_price_history, the character length must be greater than or equal to 1.'
399
- end
400
-
401
- pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
402
- if @api_client.config.client_side_validation && aph_id !~ pattern
403
- fail ArgumentError, "invalid value for 'aph_id' when calling AssetPriceHistoryApi.delete_asset_price_history, must conform to the pattern #{pattern}."
266
+ fail ArgumentError, "Missing the required parameter 'aph_id' when calling AssetPriceHistoryApi.companies_company_id_assets_asset_id_prices_aph_id_patch"
404
267
  end
405
-
406
268
  # resource path
407
269
  local_var_path = '/companies/{company_id}/assets/{asset_id}/prices/{aph_id}'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'asset_id' + '}', CGI.escape(asset_id.to_s)).sub('{' + 'aph_id' + '}', CGI.escape(aph_id.to_s))
408
270
 
@@ -421,13 +283,13 @@ module SparteraApiSdk
421
283
  post_body = opts[:debug_body]
422
284
 
423
285
  # return_type
424
- return_type = opts[:debug_return_type] || 'DeleteAssetPriceHistory200Response'
286
+ return_type = opts[:debug_return_type] || 'Object'
425
287
 
426
288
  # auth_names
427
- auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
289
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
428
290
 
429
291
  new_options = opts.merge(
430
- :operation => :"AssetPriceHistoryApi.delete_asset_price_history",
292
+ :operation => :"AssetPriceHistoryApi.companies_company_id_assets_asset_id_prices_aph_id_patch",
431
293
  :header_params => header_params,
432
294
  :query_params => query_params,
433
295
  :form_params => form_params,
@@ -436,68 +298,42 @@ module SparteraApiSdk
436
298
  :return_type => return_type
437
299
  )
438
300
 
439
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
301
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
440
302
  if @api_client.config.debugging
441
- @api_client.config.logger.debug "API called: AssetPriceHistoryApi#delete_asset_price_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
303
+ @api_client.config.logger.debug "API called: AssetPriceHistoryApi#companies_company_id_assets_asset_id_prices_aph_id_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
442
304
  end
443
305
  return data, status_code, headers
444
306
  end
445
307
 
446
- # Get all price history records for a specific asset
447
- # @param company_id [String] Unique identifier for the Company
448
- # @param asset_id [String] Unique identifier for the Asset
308
+ # Calculate the credit equivalent for a given USD price without saving
309
+ # @param company_id [String]
310
+ # @param asset_id [String]
449
311
  # @param [Hash] opts the optional parameters
450
- # @return [GetAssetPriceHistoryById200Response]
451
- def get_asset_price_history_by_id(company_id, asset_id, opts = {})
452
- data, _status_code, _headers = get_asset_price_history_by_id_with_http_info(company_id, asset_id, opts)
312
+ # @return [Object]
313
+ def companies_company_id_assets_asset_id_prices_calculate_credits_post(company_id, asset_id, opts = {})
314
+ data, _status_code, _headers = companies_company_id_assets_asset_id_prices_calculate_credits_post_with_http_info(company_id, asset_id, opts)
453
315
  data
454
316
  end
455
317
 
456
- # Get all price history records for a specific asset
457
- # @param company_id [String] Unique identifier for the Company
458
- # @param asset_id [String] Unique identifier for the Asset
318
+ # Calculate the credit equivalent for a given USD price without saving
319
+ # @param company_id [String]
320
+ # @param asset_id [String]
459
321
  # @param [Hash] opts the optional parameters
460
- # @return [Array<(GetAssetPriceHistoryById200Response, Integer, Hash)>] GetAssetPriceHistoryById200Response data, response status code and response headers
461
- def get_asset_price_history_by_id_with_http_info(company_id, asset_id, opts = {})
322
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
323
+ def companies_company_id_assets_asset_id_prices_calculate_credits_post_with_http_info(company_id, asset_id, opts = {})
462
324
  if @api_client.config.debugging
463
- @api_client.config.logger.debug 'Calling API: AssetPriceHistoryApi.get_asset_price_history_by_id ...'
325
+ @api_client.config.logger.debug 'Calling API: AssetPriceHistoryApi.companies_company_id_assets_asset_id_prices_calculate_credits_post ...'
464
326
  end
465
327
  # verify the required parameter 'company_id' is set
466
328
  if @api_client.config.client_side_validation && company_id.nil?
467
- fail ArgumentError, "Missing the required parameter 'company_id' when calling AssetPriceHistoryApi.get_asset_price_history_by_id"
468
- end
469
- if @api_client.config.client_side_validation && company_id.to_s.length > 255
470
- fail ArgumentError, 'invalid value for "company_id" when calling AssetPriceHistoryApi.get_asset_price_history_by_id, the character length must be smaller than or equal to 255.'
471
- end
472
-
473
- if @api_client.config.client_side_validation && company_id.to_s.length < 1
474
- fail ArgumentError, 'invalid value for "company_id" when calling AssetPriceHistoryApi.get_asset_price_history_by_id, the character length must be greater than or equal to 1.'
475
- end
476
-
477
- pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
478
- if @api_client.config.client_side_validation && company_id !~ pattern
479
- fail ArgumentError, "invalid value for 'company_id' when calling AssetPriceHistoryApi.get_asset_price_history_by_id, must conform to the pattern #{pattern}."
329
+ fail ArgumentError, "Missing the required parameter 'company_id' when calling AssetPriceHistoryApi.companies_company_id_assets_asset_id_prices_calculate_credits_post"
480
330
  end
481
-
482
331
  # verify the required parameter 'asset_id' is set
483
332
  if @api_client.config.client_side_validation && asset_id.nil?
484
- fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetPriceHistoryApi.get_asset_price_history_by_id"
485
- end
486
- if @api_client.config.client_side_validation && asset_id.to_s.length > 255
487
- fail ArgumentError, 'invalid value for "asset_id" when calling AssetPriceHistoryApi.get_asset_price_history_by_id, the character length must be smaller than or equal to 255.'
488
- end
489
-
490
- if @api_client.config.client_side_validation && asset_id.to_s.length < 1
491
- fail ArgumentError, 'invalid value for "asset_id" when calling AssetPriceHistoryApi.get_asset_price_history_by_id, the character length must be greater than or equal to 1.'
492
- end
493
-
494
- pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
495
- if @api_client.config.client_side_validation && asset_id !~ pattern
496
- fail ArgumentError, "invalid value for 'asset_id' when calling AssetPriceHistoryApi.get_asset_price_history_by_id, must conform to the pattern #{pattern}."
333
+ fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetPriceHistoryApi.companies_company_id_assets_asset_id_prices_calculate_credits_post"
497
334
  end
498
-
499
335
  # resource path
500
- local_var_path = '/companies/{company_id}/assets/{asset_id}/prices'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'asset_id' + '}', CGI.escape(asset_id.to_s))
336
+ local_var_path = '/companies/{company_id}/assets/{asset_id}/prices/calculate_credits'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'asset_id' + '}', CGI.escape(asset_id.to_s))
501
337
 
502
338
  # query parameters
503
339
  query_params = opts[:query_params] || {}
@@ -514,13 +350,13 @@ module SparteraApiSdk
514
350
  post_body = opts[:debug_body]
515
351
 
516
352
  # return_type
517
- return_type = opts[:debug_return_type] || 'GetAssetPriceHistoryById200Response'
353
+ return_type = opts[:debug_return_type] || 'Object'
518
354
 
519
355
  # auth_names
520
- auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
356
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
521
357
 
522
358
  new_options = opts.merge(
523
- :operation => :"AssetPriceHistoryApi.get_asset_price_history_by_id",
359
+ :operation => :"AssetPriceHistoryApi.companies_company_id_assets_asset_id_prices_calculate_credits_post",
524
360
  :header_params => header_params,
525
361
  :query_params => query_params,
526
362
  :form_params => form_params,
@@ -529,87 +365,42 @@ module SparteraApiSdk
529
365
  :return_type => return_type
530
366
  )
531
367
 
532
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
368
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
533
369
  if @api_client.config.debugging
534
- @api_client.config.logger.debug "API called: AssetPriceHistoryApi#get_asset_price_history_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
370
+ @api_client.config.logger.debug "API called: AssetPriceHistoryApi#companies_company_id_assets_asset_id_prices_calculate_credits_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
535
371
  end
536
372
  return data, status_code, headers
537
373
  end
538
374
 
539
- # Get single price history record by ID
540
- # @param company_id [String] Unique identifier for the Company
541
- # @param asset_id [String] Unique identifier for the Asset
542
- # @param aph_id [String] Unique identifier for the Aph
375
+ # Apply a discount to the active price for an asset
376
+ # @param company_id [String]
377
+ # @param asset_id [String]
543
378
  # @param [Hash] opts the optional parameters
544
- # @return [GetAssetPriceHistoryById200Response]
545
- def get_asset_price_history_by_id_assets_prices(company_id, asset_id, aph_id, opts = {})
546
- data, _status_code, _headers = get_asset_price_history_by_id_assets_prices_with_http_info(company_id, asset_id, aph_id, opts)
379
+ # @return [Object]
380
+ def companies_company_id_assets_asset_id_prices_discount_post(company_id, asset_id, opts = {})
381
+ data, _status_code, _headers = companies_company_id_assets_asset_id_prices_discount_post_with_http_info(company_id, asset_id, opts)
547
382
  data
548
383
  end
549
384
 
550
- # Get single price history record by ID
551
- # @param company_id [String] Unique identifier for the Company
552
- # @param asset_id [String] Unique identifier for the Asset
553
- # @param aph_id [String] Unique identifier for the Aph
385
+ # Apply a discount to the active price for an asset
386
+ # @param company_id [String]
387
+ # @param asset_id [String]
554
388
  # @param [Hash] opts the optional parameters
555
- # @return [Array<(GetAssetPriceHistoryById200Response, Integer, Hash)>] GetAssetPriceHistoryById200Response data, response status code and response headers
556
- def get_asset_price_history_by_id_assets_prices_with_http_info(company_id, asset_id, aph_id, opts = {})
389
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
390
+ def companies_company_id_assets_asset_id_prices_discount_post_with_http_info(company_id, asset_id, opts = {})
557
391
  if @api_client.config.debugging
558
- @api_client.config.logger.debug 'Calling API: AssetPriceHistoryApi.get_asset_price_history_by_id_assets_prices ...'
392
+ @api_client.config.logger.debug 'Calling API: AssetPriceHistoryApi.companies_company_id_assets_asset_id_prices_discount_post ...'
559
393
  end
560
394
  # verify the required parameter 'company_id' is set
561
395
  if @api_client.config.client_side_validation && company_id.nil?
562
- fail ArgumentError, "Missing the required parameter 'company_id' when calling AssetPriceHistoryApi.get_asset_price_history_by_id_assets_prices"
563
- end
564
- if @api_client.config.client_side_validation && company_id.to_s.length > 255
565
- fail ArgumentError, 'invalid value for "company_id" when calling AssetPriceHistoryApi.get_asset_price_history_by_id_assets_prices, the character length must be smaller than or equal to 255.'
566
- end
567
-
568
- if @api_client.config.client_side_validation && company_id.to_s.length < 1
569
- fail ArgumentError, 'invalid value for "company_id" when calling AssetPriceHistoryApi.get_asset_price_history_by_id_assets_prices, the character length must be greater than or equal to 1.'
570
- end
571
-
572
- pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
573
- if @api_client.config.client_side_validation && company_id !~ pattern
574
- fail ArgumentError, "invalid value for 'company_id' when calling AssetPriceHistoryApi.get_asset_price_history_by_id_assets_prices, must conform to the pattern #{pattern}."
396
+ fail ArgumentError, "Missing the required parameter 'company_id' when calling AssetPriceHistoryApi.companies_company_id_assets_asset_id_prices_discount_post"
575
397
  end
576
-
577
398
  # verify the required parameter 'asset_id' is set
578
399
  if @api_client.config.client_side_validation && asset_id.nil?
579
- fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetPriceHistoryApi.get_asset_price_history_by_id_assets_prices"
580
- end
581
- if @api_client.config.client_side_validation && asset_id.to_s.length > 255
582
- fail ArgumentError, 'invalid value for "asset_id" when calling AssetPriceHistoryApi.get_asset_price_history_by_id_assets_prices, the character length must be smaller than or equal to 255.'
583
- end
584
-
585
- if @api_client.config.client_side_validation && asset_id.to_s.length < 1
586
- fail ArgumentError, 'invalid value for "asset_id" when calling AssetPriceHistoryApi.get_asset_price_history_by_id_assets_prices, the character length must be greater than or equal to 1.'
587
- end
588
-
589
- pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
590
- if @api_client.config.client_side_validation && asset_id !~ pattern
591
- fail ArgumentError, "invalid value for 'asset_id' when calling AssetPriceHistoryApi.get_asset_price_history_by_id_assets_prices, must conform to the pattern #{pattern}."
592
- end
593
-
594
- # verify the required parameter 'aph_id' is set
595
- if @api_client.config.client_side_validation && aph_id.nil?
596
- fail ArgumentError, "Missing the required parameter 'aph_id' when calling AssetPriceHistoryApi.get_asset_price_history_by_id_assets_prices"
597
- end
598
- if @api_client.config.client_side_validation && aph_id.to_s.length > 255
599
- fail ArgumentError, 'invalid value for "aph_id" when calling AssetPriceHistoryApi.get_asset_price_history_by_id_assets_prices, the character length must be smaller than or equal to 255.'
400
+ fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetPriceHistoryApi.companies_company_id_assets_asset_id_prices_discount_post"
600
401
  end
601
-
602
- if @api_client.config.client_side_validation && aph_id.to_s.length < 1
603
- fail ArgumentError, 'invalid value for "aph_id" when calling AssetPriceHistoryApi.get_asset_price_history_by_id_assets_prices, the character length must be greater than or equal to 1.'
604
- end
605
-
606
- pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
607
- if @api_client.config.client_side_validation && aph_id !~ pattern
608
- fail ArgumentError, "invalid value for 'aph_id' when calling AssetPriceHistoryApi.get_asset_price_history_by_id_assets_prices, must conform to the pattern #{pattern}."
609
- end
610
-
611
402
  # resource path
612
- local_var_path = '/companies/{company_id}/assets/{asset_id}/prices/{aph_id}'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'asset_id' + '}', CGI.escape(asset_id.to_s)).sub('{' + 'aph_id' + '}', CGI.escape(aph_id.to_s))
403
+ local_var_path = '/companies/{company_id}/assets/{asset_id}/prices/discount'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'asset_id' + '}', CGI.escape(asset_id.to_s))
613
404
 
614
405
  # query parameters
615
406
  query_params = opts[:query_params] || {}
@@ -626,13 +417,13 @@ module SparteraApiSdk
626
417
  post_body = opts[:debug_body]
627
418
 
628
419
  # return_type
629
- return_type = opts[:debug_return_type] || 'GetAssetPriceHistoryById200Response'
420
+ return_type = opts[:debug_return_type] || 'Object'
630
421
 
631
422
  # auth_names
632
- auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
423
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
633
424
 
634
425
  new_options = opts.merge(
635
- :operation => :"AssetPriceHistoryApi.get_asset_price_history_by_id_assets_prices",
426
+ :operation => :"AssetPriceHistoryApi.companies_company_id_assets_asset_id_prices_discount_post",
636
427
  :header_params => header_params,
637
428
  :query_params => query_params,
638
429
  :form_params => form_params,
@@ -641,68 +432,42 @@ module SparteraApiSdk
641
432
  :return_type => return_type
642
433
  )
643
434
 
644
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
435
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
645
436
  if @api_client.config.debugging
646
- @api_client.config.logger.debug "API called: AssetPriceHistoryApi#get_asset_price_history_by_id_assets_prices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
437
+ @api_client.config.logger.debug "API called: AssetPriceHistoryApi#companies_company_id_assets_asset_id_prices_discount_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
647
438
  end
648
439
  return data, status_code, headers
649
440
  end
650
441
 
651
- # Get the currently active price for an asset
652
- # @param company_id [String] Unique identifier for the Company
653
- # @param asset_id [String] Unique identifier for the Asset
442
+ # Get all price history records for a specific asset
443
+ # @param company_id [String]
444
+ # @param asset_id [String]
654
445
  # @param [Hash] opts the optional parameters
655
- # @return [GetAssetPriceHistoryById200Response]
656
- def get_asset_price_history_by_id_prices_active(company_id, asset_id, opts = {})
657
- data, _status_code, _headers = get_asset_price_history_by_id_prices_active_with_http_info(company_id, asset_id, opts)
446
+ # @return [Object]
447
+ def companies_company_id_assets_asset_id_prices_get(company_id, asset_id, opts = {})
448
+ data, _status_code, _headers = companies_company_id_assets_asset_id_prices_get_with_http_info(company_id, asset_id, opts)
658
449
  data
659
450
  end
660
451
 
661
- # Get the currently active price for an asset
662
- # @param company_id [String] Unique identifier for the Company
663
- # @param asset_id [String] Unique identifier for the Asset
452
+ # Get all price history records for a specific asset
453
+ # @param company_id [String]
454
+ # @param asset_id [String]
664
455
  # @param [Hash] opts the optional parameters
665
- # @return [Array<(GetAssetPriceHistoryById200Response, Integer, Hash)>] GetAssetPriceHistoryById200Response data, response status code and response headers
666
- def get_asset_price_history_by_id_prices_active_with_http_info(company_id, asset_id, opts = {})
456
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
457
+ def companies_company_id_assets_asset_id_prices_get_with_http_info(company_id, asset_id, opts = {})
667
458
  if @api_client.config.debugging
668
- @api_client.config.logger.debug 'Calling API: AssetPriceHistoryApi.get_asset_price_history_by_id_prices_active ...'
459
+ @api_client.config.logger.debug 'Calling API: AssetPriceHistoryApi.companies_company_id_assets_asset_id_prices_get ...'
669
460
  end
670
461
  # verify the required parameter 'company_id' is set
671
462
  if @api_client.config.client_side_validation && company_id.nil?
672
- fail ArgumentError, "Missing the required parameter 'company_id' when calling AssetPriceHistoryApi.get_asset_price_history_by_id_prices_active"
673
- end
674
- if @api_client.config.client_side_validation && company_id.to_s.length > 255
675
- fail ArgumentError, 'invalid value for "company_id" when calling AssetPriceHistoryApi.get_asset_price_history_by_id_prices_active, the character length must be smaller than or equal to 255.'
676
- end
677
-
678
- if @api_client.config.client_side_validation && company_id.to_s.length < 1
679
- fail ArgumentError, 'invalid value for "company_id" when calling AssetPriceHistoryApi.get_asset_price_history_by_id_prices_active, the character length must be greater than or equal to 1.'
680
- end
681
-
682
- pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
683
- if @api_client.config.client_side_validation && company_id !~ pattern
684
- fail ArgumentError, "invalid value for 'company_id' when calling AssetPriceHistoryApi.get_asset_price_history_by_id_prices_active, must conform to the pattern #{pattern}."
463
+ fail ArgumentError, "Missing the required parameter 'company_id' when calling AssetPriceHistoryApi.companies_company_id_assets_asset_id_prices_get"
685
464
  end
686
-
687
465
  # verify the required parameter 'asset_id' is set
688
466
  if @api_client.config.client_side_validation && asset_id.nil?
689
- fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetPriceHistoryApi.get_asset_price_history_by_id_prices_active"
690
- end
691
- if @api_client.config.client_side_validation && asset_id.to_s.length > 255
692
- fail ArgumentError, 'invalid value for "asset_id" when calling AssetPriceHistoryApi.get_asset_price_history_by_id_prices_active, the character length must be smaller than or equal to 255.'
693
- end
694
-
695
- if @api_client.config.client_side_validation && asset_id.to_s.length < 1
696
- fail ArgumentError, 'invalid value for "asset_id" when calling AssetPriceHistoryApi.get_asset_price_history_by_id_prices_active, the character length must be greater than or equal to 1.'
697
- end
698
-
699
- pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
700
- if @api_client.config.client_side_validation && asset_id !~ pattern
701
- fail ArgumentError, "invalid value for 'asset_id' when calling AssetPriceHistoryApi.get_asset_price_history_by_id_prices_active, must conform to the pattern #{pattern}."
467
+ fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetPriceHistoryApi.companies_company_id_assets_asset_id_prices_get"
702
468
  end
703
-
704
469
  # resource path
705
- local_var_path = '/companies/{company_id}/assets/{asset_id}/prices/active'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'asset_id' + '}', CGI.escape(asset_id.to_s))
470
+ local_var_path = '/companies/{company_id}/assets/{asset_id}/prices'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'asset_id' + '}', CGI.escape(asset_id.to_s))
706
471
 
707
472
  # query parameters
708
473
  query_params = opts[:query_params] || {}
@@ -719,13 +484,13 @@ module SparteraApiSdk
719
484
  post_body = opts[:debug_body]
720
485
 
721
486
  # return_type
722
- return_type = opts[:debug_return_type] || 'GetAssetPriceHistoryById200Response'
487
+ return_type = opts[:debug_return_type] || 'Object'
723
488
 
724
489
  # auth_names
725
- auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
490
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
726
491
 
727
492
  new_options = opts.merge(
728
- :operation => :"AssetPriceHistoryApi.get_asset_price_history_by_id_prices_active",
493
+ :operation => :"AssetPriceHistoryApi.companies_company_id_assets_asset_id_prices_get",
729
494
  :header_params => header_params,
730
495
  :query_params => query_params,
731
496
  :form_params => form_params,
@@ -736,91 +501,40 @@ module SparteraApiSdk
736
501
 
737
502
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
738
503
  if @api_client.config.debugging
739
- @api_client.config.logger.debug "API called: AssetPriceHistoryApi#get_asset_price_history_by_id_prices_active\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
504
+ @api_client.config.logger.debug "API called: AssetPriceHistoryApi#companies_company_id_assets_asset_id_prices_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
740
505
  end
741
506
  return data, status_code, headers
742
507
  end
743
508
 
744
- # Update an existing price history record by ID
745
- # @param company_id [String] Unique identifier for the Company
746
- # @param asset_id [String] Unique identifier for the Asset
747
- # @param aph_id [String] Unique identifier for the Aph
748
- # @param asset_price_history_update [AssetPriceHistoryUpdate]
509
+ # Create a new price history record for an asset
510
+ # @param company_id [String]
511
+ # @param asset_id [String]
749
512
  # @param [Hash] opts the optional parameters
750
- # @return [UpdateAssetPriceHistory200Response]
751
- def update_asset_price_history(company_id, asset_id, aph_id, asset_price_history_update, opts = {})
752
- data, _status_code, _headers = update_asset_price_history_with_http_info(company_id, asset_id, aph_id, asset_price_history_update, opts)
513
+ # @return [Object]
514
+ def companies_company_id_assets_asset_id_prices_post(company_id, asset_id, opts = {})
515
+ data, _status_code, _headers = companies_company_id_assets_asset_id_prices_post_with_http_info(company_id, asset_id, opts)
753
516
  data
754
517
  end
755
518
 
756
- # Update an existing price history record by ID
757
- # @param company_id [String] Unique identifier for the Company
758
- # @param asset_id [String] Unique identifier for the Asset
759
- # @param aph_id [String] Unique identifier for the Aph
760
- # @param asset_price_history_update [AssetPriceHistoryUpdate]
519
+ # Create a new price history record for an asset
520
+ # @param company_id [String]
521
+ # @param asset_id [String]
761
522
  # @param [Hash] opts the optional parameters
762
- # @return [Array<(UpdateAssetPriceHistory200Response, Integer, Hash)>] UpdateAssetPriceHistory200Response data, response status code and response headers
763
- def update_asset_price_history_with_http_info(company_id, asset_id, aph_id, asset_price_history_update, opts = {})
523
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
524
+ def companies_company_id_assets_asset_id_prices_post_with_http_info(company_id, asset_id, opts = {})
764
525
  if @api_client.config.debugging
765
- @api_client.config.logger.debug 'Calling API: AssetPriceHistoryApi.update_asset_price_history ...'
526
+ @api_client.config.logger.debug 'Calling API: AssetPriceHistoryApi.companies_company_id_assets_asset_id_prices_post ...'
766
527
  end
767
528
  # verify the required parameter 'company_id' is set
768
529
  if @api_client.config.client_side_validation && company_id.nil?
769
- fail ArgumentError, "Missing the required parameter 'company_id' when calling AssetPriceHistoryApi.update_asset_price_history"
770
- end
771
- if @api_client.config.client_side_validation && company_id.to_s.length > 255
772
- fail ArgumentError, 'invalid value for "company_id" when calling AssetPriceHistoryApi.update_asset_price_history, the character length must be smaller than or equal to 255.'
773
- end
774
-
775
- if @api_client.config.client_side_validation && company_id.to_s.length < 1
776
- fail ArgumentError, 'invalid value for "company_id" when calling AssetPriceHistoryApi.update_asset_price_history, the character length must be greater than or equal to 1.'
777
- end
778
-
779
- pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
780
- if @api_client.config.client_side_validation && company_id !~ pattern
781
- fail ArgumentError, "invalid value for 'company_id' when calling AssetPriceHistoryApi.update_asset_price_history, must conform to the pattern #{pattern}."
530
+ fail ArgumentError, "Missing the required parameter 'company_id' when calling AssetPriceHistoryApi.companies_company_id_assets_asset_id_prices_post"
782
531
  end
783
-
784
532
  # verify the required parameter 'asset_id' is set
785
533
  if @api_client.config.client_side_validation && asset_id.nil?
786
- fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetPriceHistoryApi.update_asset_price_history"
787
- end
788
- if @api_client.config.client_side_validation && asset_id.to_s.length > 255
789
- fail ArgumentError, 'invalid value for "asset_id" when calling AssetPriceHistoryApi.update_asset_price_history, the character length must be smaller than or equal to 255.'
790
- end
791
-
792
- if @api_client.config.client_side_validation && asset_id.to_s.length < 1
793
- fail ArgumentError, 'invalid value for "asset_id" when calling AssetPriceHistoryApi.update_asset_price_history, the character length must be greater than or equal to 1.'
794
- end
795
-
796
- pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
797
- if @api_client.config.client_side_validation && asset_id !~ pattern
798
- fail ArgumentError, "invalid value for 'asset_id' when calling AssetPriceHistoryApi.update_asset_price_history, must conform to the pattern #{pattern}."
799
- end
800
-
801
- # verify the required parameter 'aph_id' is set
802
- if @api_client.config.client_side_validation && aph_id.nil?
803
- fail ArgumentError, "Missing the required parameter 'aph_id' when calling AssetPriceHistoryApi.update_asset_price_history"
804
- end
805
- if @api_client.config.client_side_validation && aph_id.to_s.length > 255
806
- fail ArgumentError, 'invalid value for "aph_id" when calling AssetPriceHistoryApi.update_asset_price_history, the character length must be smaller than or equal to 255.'
807
- end
808
-
809
- if @api_client.config.client_side_validation && aph_id.to_s.length < 1
810
- fail ArgumentError, 'invalid value for "aph_id" when calling AssetPriceHistoryApi.update_asset_price_history, the character length must be greater than or equal to 1.'
811
- end
812
-
813
- pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
814
- if @api_client.config.client_side_validation && aph_id !~ pattern
815
- fail ArgumentError, "invalid value for 'aph_id' when calling AssetPriceHistoryApi.update_asset_price_history, must conform to the pattern #{pattern}."
816
- end
817
-
818
- # verify the required parameter 'asset_price_history_update' is set
819
- if @api_client.config.client_side_validation && asset_price_history_update.nil?
820
- fail ArgumentError, "Missing the required parameter 'asset_price_history_update' when calling AssetPriceHistoryApi.update_asset_price_history"
534
+ fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetPriceHistoryApi.companies_company_id_assets_asset_id_prices_post"
821
535
  end
822
536
  # resource path
823
- local_var_path = '/companies/{company_id}/assets/{asset_id}/prices/{aph_id}'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'asset_id' + '}', CGI.escape(asset_id.to_s)).sub('{' + 'aph_id' + '}', CGI.escape(aph_id.to_s))
537
+ local_var_path = '/companies/{company_id}/assets/{asset_id}/prices'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'asset_id' + '}', CGI.escape(asset_id.to_s))
824
538
 
825
539
  # query parameters
826
540
  query_params = opts[:query_params] || {}
@@ -829,26 +543,21 @@ module SparteraApiSdk
829
543
  header_params = opts[:header_params] || {}
830
544
  # HTTP header 'Accept' (if needed)
831
545
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
832
- # HTTP header 'Content-Type'
833
- content_type = @api_client.select_header_content_type(['application/json'])
834
- if !content_type.nil?
835
- header_params['Content-Type'] = content_type
836
- end
837
546
 
838
547
  # form parameters
839
548
  form_params = opts[:form_params] || {}
840
549
 
841
550
  # http body (model)
842
- post_body = opts[:debug_body] || @api_client.object_to_http_body(asset_price_history_update)
551
+ post_body = opts[:debug_body]
843
552
 
844
553
  # return_type
845
- return_type = opts[:debug_return_type] || 'UpdateAssetPriceHistory200Response'
554
+ return_type = opts[:debug_return_type] || 'Object'
846
555
 
847
556
  # auth_names
848
- auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
557
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
849
558
 
850
559
  new_options = opts.merge(
851
- :operation => :"AssetPriceHistoryApi.update_asset_price_history",
560
+ :operation => :"AssetPriceHistoryApi.companies_company_id_assets_asset_id_prices_post",
852
561
  :header_params => header_params,
853
562
  :query_params => query_params,
854
563
  :form_params => form_params,
@@ -857,9 +566,9 @@ module SparteraApiSdk
857
566
  :return_type => return_type
858
567
  )
859
568
 
860
- data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
569
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
861
570
  if @api_client.config.debugging
862
- @api_client.config.logger.debug "API called: AssetPriceHistoryApi#update_asset_price_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
571
+ @api_client.config.logger.debug "API called: AssetPriceHistoryApi#companies_company_id_assets_asset_id_prices_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
863
572
  end
864
573
  return data, status_code, headers
865
574
  end