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