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,1085 @@
|
|
|
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 CompaniesApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Get details of the requestor's own company
|
|
23
|
+
# @param company_id [String] Unique identifier for the Company
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @return [GetCompaniesById200Response]
|
|
26
|
+
def get_companies_by_id(company_id, opts = {})
|
|
27
|
+
data, _status_code, _headers = get_companies_by_id_with_http_info(company_id, opts)
|
|
28
|
+
data
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Get details of the requestor's own company
|
|
32
|
+
# @param company_id [String] Unique identifier for the Company
|
|
33
|
+
# @param [Hash] opts the optional parameters
|
|
34
|
+
# @return [Array<(GetCompaniesById200Response, Integer, Hash)>] GetCompaniesById200Response data, response status code and response headers
|
|
35
|
+
def get_companies_by_id_with_http_info(company_id, opts = {})
|
|
36
|
+
if @api_client.config.debugging
|
|
37
|
+
@api_client.config.logger.debug 'Calling API: CompaniesApi.get_companies_by_id ...'
|
|
38
|
+
end
|
|
39
|
+
# verify the required parameter 'company_id' is set
|
|
40
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
|
41
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling CompaniesApi.get_companies_by_id"
|
|
42
|
+
end
|
|
43
|
+
if @api_client.config.client_side_validation && company_id.to_s.length > 255
|
|
44
|
+
fail ArgumentError, 'invalid value for "company_id" when calling CompaniesApi.get_companies_by_id, the character length must be smaller than or equal to 255.'
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
if @api_client.config.client_side_validation && company_id.to_s.length < 1
|
|
48
|
+
fail ArgumentError, 'invalid value for "company_id" when calling CompaniesApi.get_companies_by_id, the character length must be greater than or equal to 1.'
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
52
|
+
if @api_client.config.client_side_validation && company_id !~ pattern
|
|
53
|
+
fail ArgumentError, "invalid value for 'company_id' when calling CompaniesApi.get_companies_by_id, must conform to the pattern #{pattern}."
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# resource path
|
|
57
|
+
local_var_path = '/companies/{company_id}'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s))
|
|
58
|
+
|
|
59
|
+
# query parameters
|
|
60
|
+
query_params = opts[:query_params] || {}
|
|
61
|
+
|
|
62
|
+
# header parameters
|
|
63
|
+
header_params = opts[:header_params] || {}
|
|
64
|
+
# HTTP header 'Accept' (if needed)
|
|
65
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
66
|
+
|
|
67
|
+
# form parameters
|
|
68
|
+
form_params = opts[:form_params] || {}
|
|
69
|
+
|
|
70
|
+
# http body (model)
|
|
71
|
+
post_body = opts[:debug_body]
|
|
72
|
+
|
|
73
|
+
# return_type
|
|
74
|
+
return_type = opts[:debug_return_type] || 'GetCompaniesById200Response'
|
|
75
|
+
|
|
76
|
+
# auth_names
|
|
77
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
78
|
+
|
|
79
|
+
new_options = opts.merge(
|
|
80
|
+
:operation => :"CompaniesApi.get_companies_by_id",
|
|
81
|
+
:header_params => header_params,
|
|
82
|
+
:query_params => query_params,
|
|
83
|
+
:form_params => form_params,
|
|
84
|
+
:body => post_body,
|
|
85
|
+
:auth_names => auth_names,
|
|
86
|
+
:return_type => return_type
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
90
|
+
if @api_client.config.debugging
|
|
91
|
+
@api_client.config.logger.debug "API called: CompaniesApi#get_companies_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
92
|
+
end
|
|
93
|
+
return data, status_code, headers
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Get the total number of requests allocated in the company's current subscription plan.
|
|
97
|
+
# @param company_id [String] Unique identifier for the Company
|
|
98
|
+
# @param [Hash] opts the optional parameters
|
|
99
|
+
# @option opts [Integer] :page Page number for pagination (default to 1)
|
|
100
|
+
# @option opts [Integer] :limit Number of items per page (default to 20)
|
|
101
|
+
# @option opts [String] :sort_by Field to sort by
|
|
102
|
+
# @option opts [String] :sort_order Sort order (ascending or descending) (default to 'desc')
|
|
103
|
+
# @option opts [String] :search Search term to filter results
|
|
104
|
+
# @return [ListCompaniesAnalyticsAssets200Response]
|
|
105
|
+
def list_companies(company_id, opts = {})
|
|
106
|
+
data, _status_code, _headers = list_companies_with_http_info(company_id, opts)
|
|
107
|
+
data
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Get the total number of requests allocated in the company's current subscription plan.
|
|
111
|
+
# @param company_id [String] Unique identifier for the Company
|
|
112
|
+
# @param [Hash] opts the optional parameters
|
|
113
|
+
# @option opts [Integer] :page Page number for pagination (default to 1)
|
|
114
|
+
# @option opts [Integer] :limit Number of items per page (default to 20)
|
|
115
|
+
# @option opts [String] :sort_by Field to sort by
|
|
116
|
+
# @option opts [String] :sort_order Sort order (ascending or descending) (default to 'desc')
|
|
117
|
+
# @option opts [String] :search Search term to filter results
|
|
118
|
+
# @return [Array<(ListCompaniesAnalyticsAssets200Response, Integer, Hash)>] ListCompaniesAnalyticsAssets200Response data, response status code and response headers
|
|
119
|
+
def list_companies_with_http_info(company_id, opts = {})
|
|
120
|
+
if @api_client.config.debugging
|
|
121
|
+
@api_client.config.logger.debug 'Calling API: CompaniesApi.list_companies ...'
|
|
122
|
+
end
|
|
123
|
+
# verify the required parameter 'company_id' is set
|
|
124
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
|
125
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling CompaniesApi.list_companies"
|
|
126
|
+
end
|
|
127
|
+
if @api_client.config.client_side_validation && company_id.to_s.length > 255
|
|
128
|
+
fail ArgumentError, 'invalid value for "company_id" when calling CompaniesApi.list_companies, the character length must be smaller than or equal to 255.'
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
if @api_client.config.client_side_validation && company_id.to_s.length < 1
|
|
132
|
+
fail ArgumentError, 'invalid value for "company_id" when calling CompaniesApi.list_companies, the character length must be greater than or equal to 1.'
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
136
|
+
if @api_client.config.client_side_validation && company_id !~ pattern
|
|
137
|
+
fail ArgumentError, "invalid value for 'company_id' when calling CompaniesApi.list_companies, must conform to the pattern #{pattern}."
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
141
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling CompaniesApi.list_companies, must be greater than or equal to 1.'
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
145
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling CompaniesApi.list_companies, must be smaller than or equal to 100.'
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
149
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling CompaniesApi.list_companies, must be greater than or equal to 1.'
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
allowable_values = ["asc", "desc"]
|
|
153
|
+
if @api_client.config.client_side_validation && opts[:'sort_order'] && !allowable_values.include?(opts[:'sort_order'])
|
|
154
|
+
fail ArgumentError, "invalid value for \"sort_order\", must be one of #{allowable_values}"
|
|
155
|
+
end
|
|
156
|
+
if @api_client.config.client_side_validation && !opts[:'search'].nil? && opts[:'search'].to_s.length > 255
|
|
157
|
+
fail ArgumentError, 'invalid value for "opts[:"search"]" when calling CompaniesApi.list_companies, the character length must be smaller than or equal to 255.'
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
if @api_client.config.client_side_validation && !opts[:'search'].nil? && opts[:'search'].to_s.length < 1
|
|
161
|
+
fail ArgumentError, 'invalid value for "opts[:"search"]" when calling CompaniesApi.list_companies, the character length must be greater than or equal to 1.'
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
# resource path
|
|
165
|
+
local_var_path = '/companies/{company_id}/requests/plan'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s))
|
|
166
|
+
|
|
167
|
+
# query parameters
|
|
168
|
+
query_params = opts[:query_params] || {}
|
|
169
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
170
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
171
|
+
query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
|
|
172
|
+
query_params[:'sort_order'] = opts[:'sort_order'] if !opts[:'sort_order'].nil?
|
|
173
|
+
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
|
174
|
+
|
|
175
|
+
# header parameters
|
|
176
|
+
header_params = opts[:header_params] || {}
|
|
177
|
+
# HTTP header 'Accept' (if needed)
|
|
178
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
179
|
+
|
|
180
|
+
# form parameters
|
|
181
|
+
form_params = opts[:form_params] || {}
|
|
182
|
+
|
|
183
|
+
# http body (model)
|
|
184
|
+
post_body = opts[:debug_body]
|
|
185
|
+
|
|
186
|
+
# return_type
|
|
187
|
+
return_type = opts[:debug_return_type] || 'ListCompaniesAnalyticsAssets200Response'
|
|
188
|
+
|
|
189
|
+
# auth_names
|
|
190
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
191
|
+
|
|
192
|
+
new_options = opts.merge(
|
|
193
|
+
:operation => :"CompaniesApi.list_companies",
|
|
194
|
+
:header_params => header_params,
|
|
195
|
+
:query_params => query_params,
|
|
196
|
+
:form_params => form_params,
|
|
197
|
+
:body => post_body,
|
|
198
|
+
:auth_names => auth_names,
|
|
199
|
+
:return_type => return_type
|
|
200
|
+
)
|
|
201
|
+
|
|
202
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
203
|
+
if @api_client.config.debugging
|
|
204
|
+
@api_client.config.logger.debug "API called: CompaniesApi#list_companies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
205
|
+
end
|
|
206
|
+
return data, status_code, headers
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
# Get asset performance analytics. Query params: start_date, end_date, limit, sort_by, include
|
|
210
|
+
# @param company_id [String] Unique identifier for the Company
|
|
211
|
+
# @param [Hash] opts the optional parameters
|
|
212
|
+
# @option opts [Integer] :page Page number for pagination (default to 1)
|
|
213
|
+
# @option opts [Integer] :limit Number of items per page (default to 20)
|
|
214
|
+
# @option opts [String] :sort_by Field to sort by
|
|
215
|
+
# @option opts [String] :sort_order Sort order (ascending or descending) (default to 'desc')
|
|
216
|
+
# @option opts [String] :search Search term to filter results
|
|
217
|
+
# @return [ListCompaniesAnalyticsAssets200Response]
|
|
218
|
+
def list_companies_analytics_assets(company_id, opts = {})
|
|
219
|
+
data, _status_code, _headers = list_companies_analytics_assets_with_http_info(company_id, opts)
|
|
220
|
+
data
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
# Get asset performance analytics. Query params: start_date, end_date, limit, sort_by, include
|
|
224
|
+
# @param company_id [String] Unique identifier for the Company
|
|
225
|
+
# @param [Hash] opts the optional parameters
|
|
226
|
+
# @option opts [Integer] :page Page number for pagination (default to 1)
|
|
227
|
+
# @option opts [Integer] :limit Number of items per page (default to 20)
|
|
228
|
+
# @option opts [String] :sort_by Field to sort by
|
|
229
|
+
# @option opts [String] :sort_order Sort order (ascending or descending) (default to 'desc')
|
|
230
|
+
# @option opts [String] :search Search term to filter results
|
|
231
|
+
# @return [Array<(ListCompaniesAnalyticsAssets200Response, Integer, Hash)>] ListCompaniesAnalyticsAssets200Response data, response status code and response headers
|
|
232
|
+
def list_companies_analytics_assets_with_http_info(company_id, opts = {})
|
|
233
|
+
if @api_client.config.debugging
|
|
234
|
+
@api_client.config.logger.debug 'Calling API: CompaniesApi.list_companies_analytics_assets ...'
|
|
235
|
+
end
|
|
236
|
+
# verify the required parameter 'company_id' is set
|
|
237
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
|
238
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling CompaniesApi.list_companies_analytics_assets"
|
|
239
|
+
end
|
|
240
|
+
if @api_client.config.client_side_validation && company_id.to_s.length > 255
|
|
241
|
+
fail ArgumentError, 'invalid value for "company_id" when calling CompaniesApi.list_companies_analytics_assets, the character length must be smaller than or equal to 255.'
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
if @api_client.config.client_side_validation && company_id.to_s.length < 1
|
|
245
|
+
fail ArgumentError, 'invalid value for "company_id" when calling CompaniesApi.list_companies_analytics_assets, the character length must be greater than or equal to 1.'
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
249
|
+
if @api_client.config.client_side_validation && company_id !~ pattern
|
|
250
|
+
fail ArgumentError, "invalid value for 'company_id' when calling CompaniesApi.list_companies_analytics_assets, must conform to the pattern #{pattern}."
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
254
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling CompaniesApi.list_companies_analytics_assets, must be greater than or equal to 1.'
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
258
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling CompaniesApi.list_companies_analytics_assets, must be smaller than or equal to 100.'
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
262
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling CompaniesApi.list_companies_analytics_assets, must be greater than or equal to 1.'
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
allowable_values = ["asc", "desc"]
|
|
266
|
+
if @api_client.config.client_side_validation && opts[:'sort_order'] && !allowable_values.include?(opts[:'sort_order'])
|
|
267
|
+
fail ArgumentError, "invalid value for \"sort_order\", must be one of #{allowable_values}"
|
|
268
|
+
end
|
|
269
|
+
if @api_client.config.client_side_validation && !opts[:'search'].nil? && opts[:'search'].to_s.length > 255
|
|
270
|
+
fail ArgumentError, 'invalid value for "opts[:"search"]" when calling CompaniesApi.list_companies_analytics_assets, the character length must be smaller than or equal to 255.'
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
if @api_client.config.client_side_validation && !opts[:'search'].nil? && opts[:'search'].to_s.length < 1
|
|
274
|
+
fail ArgumentError, 'invalid value for "opts[:"search"]" when calling CompaniesApi.list_companies_analytics_assets, the character length must be greater than or equal to 1.'
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
# resource path
|
|
278
|
+
local_var_path = '/companies/{company_id}/analytics/assets'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s))
|
|
279
|
+
|
|
280
|
+
# query parameters
|
|
281
|
+
query_params = opts[:query_params] || {}
|
|
282
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
283
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
284
|
+
query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
|
|
285
|
+
query_params[:'sort_order'] = opts[:'sort_order'] if !opts[:'sort_order'].nil?
|
|
286
|
+
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
|
287
|
+
|
|
288
|
+
# header parameters
|
|
289
|
+
header_params = opts[:header_params] || {}
|
|
290
|
+
# HTTP header 'Accept' (if needed)
|
|
291
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
292
|
+
|
|
293
|
+
# form parameters
|
|
294
|
+
form_params = opts[:form_params] || {}
|
|
295
|
+
|
|
296
|
+
# http body (model)
|
|
297
|
+
post_body = opts[:debug_body]
|
|
298
|
+
|
|
299
|
+
# return_type
|
|
300
|
+
return_type = opts[:debug_return_type] || 'ListCompaniesAnalyticsAssets200Response'
|
|
301
|
+
|
|
302
|
+
# auth_names
|
|
303
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
304
|
+
|
|
305
|
+
new_options = opts.merge(
|
|
306
|
+
:operation => :"CompaniesApi.list_companies_analytics_assets",
|
|
307
|
+
:header_params => header_params,
|
|
308
|
+
:query_params => query_params,
|
|
309
|
+
:form_params => form_params,
|
|
310
|
+
:body => post_body,
|
|
311
|
+
:auth_names => auth_names,
|
|
312
|
+
:return_type => return_type
|
|
313
|
+
)
|
|
314
|
+
|
|
315
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
316
|
+
if @api_client.config.debugging
|
|
317
|
+
@api_client.config.logger.debug "API called: CompaniesApi#list_companies_analytics_assets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
318
|
+
end
|
|
319
|
+
return data, status_code, headers
|
|
320
|
+
end
|
|
321
|
+
|
|
322
|
+
# Get customer analytics including growth and segmentation. Query params: start_date, end_date, group_by, segment_by
|
|
323
|
+
# @param company_id [String] Unique identifier for the Company
|
|
324
|
+
# @param [Hash] opts the optional parameters
|
|
325
|
+
# @option opts [Integer] :page Page number for pagination (default to 1)
|
|
326
|
+
# @option opts [Integer] :limit Number of items per page (default to 20)
|
|
327
|
+
# @option opts [String] :sort_by Field to sort by
|
|
328
|
+
# @option opts [String] :sort_order Sort order (ascending or descending) (default to 'desc')
|
|
329
|
+
# @option opts [String] :search Search term to filter results
|
|
330
|
+
# @return [ListCompaniesAnalyticsAssets200Response]
|
|
331
|
+
def list_companies_analytics_customers(company_id, opts = {})
|
|
332
|
+
data, _status_code, _headers = list_companies_analytics_customers_with_http_info(company_id, opts)
|
|
333
|
+
data
|
|
334
|
+
end
|
|
335
|
+
|
|
336
|
+
# Get customer analytics including growth and segmentation. Query params: start_date, end_date, group_by, segment_by
|
|
337
|
+
# @param company_id [String] Unique identifier for the Company
|
|
338
|
+
# @param [Hash] opts the optional parameters
|
|
339
|
+
# @option opts [Integer] :page Page number for pagination (default to 1)
|
|
340
|
+
# @option opts [Integer] :limit Number of items per page (default to 20)
|
|
341
|
+
# @option opts [String] :sort_by Field to sort by
|
|
342
|
+
# @option opts [String] :sort_order Sort order (ascending or descending) (default to 'desc')
|
|
343
|
+
# @option opts [String] :search Search term to filter results
|
|
344
|
+
# @return [Array<(ListCompaniesAnalyticsAssets200Response, Integer, Hash)>] ListCompaniesAnalyticsAssets200Response data, response status code and response headers
|
|
345
|
+
def list_companies_analytics_customers_with_http_info(company_id, opts = {})
|
|
346
|
+
if @api_client.config.debugging
|
|
347
|
+
@api_client.config.logger.debug 'Calling API: CompaniesApi.list_companies_analytics_customers ...'
|
|
348
|
+
end
|
|
349
|
+
# verify the required parameter 'company_id' is set
|
|
350
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
|
351
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling CompaniesApi.list_companies_analytics_customers"
|
|
352
|
+
end
|
|
353
|
+
if @api_client.config.client_side_validation && company_id.to_s.length > 255
|
|
354
|
+
fail ArgumentError, 'invalid value for "company_id" when calling CompaniesApi.list_companies_analytics_customers, the character length must be smaller than or equal to 255.'
|
|
355
|
+
end
|
|
356
|
+
|
|
357
|
+
if @api_client.config.client_side_validation && company_id.to_s.length < 1
|
|
358
|
+
fail ArgumentError, 'invalid value for "company_id" when calling CompaniesApi.list_companies_analytics_customers, the character length must be greater than or equal to 1.'
|
|
359
|
+
end
|
|
360
|
+
|
|
361
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
362
|
+
if @api_client.config.client_side_validation && company_id !~ pattern
|
|
363
|
+
fail ArgumentError, "invalid value for 'company_id' when calling CompaniesApi.list_companies_analytics_customers, must conform to the pattern #{pattern}."
|
|
364
|
+
end
|
|
365
|
+
|
|
366
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
367
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling CompaniesApi.list_companies_analytics_customers, must be greater than or equal to 1.'
|
|
368
|
+
end
|
|
369
|
+
|
|
370
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
371
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling CompaniesApi.list_companies_analytics_customers, must be smaller than or equal to 100.'
|
|
372
|
+
end
|
|
373
|
+
|
|
374
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
375
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling CompaniesApi.list_companies_analytics_customers, must be greater than or equal to 1.'
|
|
376
|
+
end
|
|
377
|
+
|
|
378
|
+
allowable_values = ["asc", "desc"]
|
|
379
|
+
if @api_client.config.client_side_validation && opts[:'sort_order'] && !allowable_values.include?(opts[:'sort_order'])
|
|
380
|
+
fail ArgumentError, "invalid value for \"sort_order\", must be one of #{allowable_values}"
|
|
381
|
+
end
|
|
382
|
+
if @api_client.config.client_side_validation && !opts[:'search'].nil? && opts[:'search'].to_s.length > 255
|
|
383
|
+
fail ArgumentError, 'invalid value for "opts[:"search"]" when calling CompaniesApi.list_companies_analytics_customers, the character length must be smaller than or equal to 255.'
|
|
384
|
+
end
|
|
385
|
+
|
|
386
|
+
if @api_client.config.client_side_validation && !opts[:'search'].nil? && opts[:'search'].to_s.length < 1
|
|
387
|
+
fail ArgumentError, 'invalid value for "opts[:"search"]" when calling CompaniesApi.list_companies_analytics_customers, the character length must be greater than or equal to 1.'
|
|
388
|
+
end
|
|
389
|
+
|
|
390
|
+
# resource path
|
|
391
|
+
local_var_path = '/companies/{company_id}/analytics/customers'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s))
|
|
392
|
+
|
|
393
|
+
# query parameters
|
|
394
|
+
query_params = opts[:query_params] || {}
|
|
395
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
396
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
397
|
+
query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
|
|
398
|
+
query_params[:'sort_order'] = opts[:'sort_order'] if !opts[:'sort_order'].nil?
|
|
399
|
+
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
|
400
|
+
|
|
401
|
+
# header parameters
|
|
402
|
+
header_params = opts[:header_params] || {}
|
|
403
|
+
# HTTP header 'Accept' (if needed)
|
|
404
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
405
|
+
|
|
406
|
+
# form parameters
|
|
407
|
+
form_params = opts[:form_params] || {}
|
|
408
|
+
|
|
409
|
+
# http body (model)
|
|
410
|
+
post_body = opts[:debug_body]
|
|
411
|
+
|
|
412
|
+
# return_type
|
|
413
|
+
return_type = opts[:debug_return_type] || 'ListCompaniesAnalyticsAssets200Response'
|
|
414
|
+
|
|
415
|
+
# auth_names
|
|
416
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
417
|
+
|
|
418
|
+
new_options = opts.merge(
|
|
419
|
+
:operation => :"CompaniesApi.list_companies_analytics_customers",
|
|
420
|
+
:header_params => header_params,
|
|
421
|
+
:query_params => query_params,
|
|
422
|
+
:form_params => form_params,
|
|
423
|
+
:body => post_body,
|
|
424
|
+
:auth_names => auth_names,
|
|
425
|
+
:return_type => return_type
|
|
426
|
+
)
|
|
427
|
+
|
|
428
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
429
|
+
if @api_client.config.debugging
|
|
430
|
+
@api_client.config.logger.debug "API called: CompaniesApi#list_companies_analytics_customers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
431
|
+
end
|
|
432
|
+
return data, status_code, headers
|
|
433
|
+
end
|
|
434
|
+
|
|
435
|
+
# Get comprehensive dashboard analytics for seller dashboard. Query params: start_date, end_date, period (day/week/month/quarter)
|
|
436
|
+
# @param company_id [String] Unique identifier for the Company
|
|
437
|
+
# @param [Hash] opts the optional parameters
|
|
438
|
+
# @option opts [Integer] :page Page number for pagination (default to 1)
|
|
439
|
+
# @option opts [Integer] :limit Number of items per page (default to 20)
|
|
440
|
+
# @option opts [String] :sort_by Field to sort by
|
|
441
|
+
# @option opts [String] :sort_order Sort order (ascending or descending) (default to 'desc')
|
|
442
|
+
# @option opts [String] :search Search term to filter results
|
|
443
|
+
# @return [ListCompaniesAnalyticsAssets200Response]
|
|
444
|
+
def list_companies_analytics_dashboard(company_id, opts = {})
|
|
445
|
+
data, _status_code, _headers = list_companies_analytics_dashboard_with_http_info(company_id, opts)
|
|
446
|
+
data
|
|
447
|
+
end
|
|
448
|
+
|
|
449
|
+
# Get comprehensive dashboard analytics for seller dashboard. Query params: start_date, end_date, period (day/week/month/quarter)
|
|
450
|
+
# @param company_id [String] Unique identifier for the Company
|
|
451
|
+
# @param [Hash] opts the optional parameters
|
|
452
|
+
# @option opts [Integer] :page Page number for pagination (default to 1)
|
|
453
|
+
# @option opts [Integer] :limit Number of items per page (default to 20)
|
|
454
|
+
# @option opts [String] :sort_by Field to sort by
|
|
455
|
+
# @option opts [String] :sort_order Sort order (ascending or descending) (default to 'desc')
|
|
456
|
+
# @option opts [String] :search Search term to filter results
|
|
457
|
+
# @return [Array<(ListCompaniesAnalyticsAssets200Response, Integer, Hash)>] ListCompaniesAnalyticsAssets200Response data, response status code and response headers
|
|
458
|
+
def list_companies_analytics_dashboard_with_http_info(company_id, opts = {})
|
|
459
|
+
if @api_client.config.debugging
|
|
460
|
+
@api_client.config.logger.debug 'Calling API: CompaniesApi.list_companies_analytics_dashboard ...'
|
|
461
|
+
end
|
|
462
|
+
# verify the required parameter 'company_id' is set
|
|
463
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
|
464
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling CompaniesApi.list_companies_analytics_dashboard"
|
|
465
|
+
end
|
|
466
|
+
if @api_client.config.client_side_validation && company_id.to_s.length > 255
|
|
467
|
+
fail ArgumentError, 'invalid value for "company_id" when calling CompaniesApi.list_companies_analytics_dashboard, the character length must be smaller than or equal to 255.'
|
|
468
|
+
end
|
|
469
|
+
|
|
470
|
+
if @api_client.config.client_side_validation && company_id.to_s.length < 1
|
|
471
|
+
fail ArgumentError, 'invalid value for "company_id" when calling CompaniesApi.list_companies_analytics_dashboard, the character length must be greater than or equal to 1.'
|
|
472
|
+
end
|
|
473
|
+
|
|
474
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
475
|
+
if @api_client.config.client_side_validation && company_id !~ pattern
|
|
476
|
+
fail ArgumentError, "invalid value for 'company_id' when calling CompaniesApi.list_companies_analytics_dashboard, must conform to the pattern #{pattern}."
|
|
477
|
+
end
|
|
478
|
+
|
|
479
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
480
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling CompaniesApi.list_companies_analytics_dashboard, must be greater than or equal to 1.'
|
|
481
|
+
end
|
|
482
|
+
|
|
483
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
484
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling CompaniesApi.list_companies_analytics_dashboard, must be smaller than or equal to 100.'
|
|
485
|
+
end
|
|
486
|
+
|
|
487
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
488
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling CompaniesApi.list_companies_analytics_dashboard, must be greater than or equal to 1.'
|
|
489
|
+
end
|
|
490
|
+
|
|
491
|
+
allowable_values = ["asc", "desc"]
|
|
492
|
+
if @api_client.config.client_side_validation && opts[:'sort_order'] && !allowable_values.include?(opts[:'sort_order'])
|
|
493
|
+
fail ArgumentError, "invalid value for \"sort_order\", must be one of #{allowable_values}"
|
|
494
|
+
end
|
|
495
|
+
if @api_client.config.client_side_validation && !opts[:'search'].nil? && opts[:'search'].to_s.length > 255
|
|
496
|
+
fail ArgumentError, 'invalid value for "opts[:"search"]" when calling CompaniesApi.list_companies_analytics_dashboard, the character length must be smaller than or equal to 255.'
|
|
497
|
+
end
|
|
498
|
+
|
|
499
|
+
if @api_client.config.client_side_validation && !opts[:'search'].nil? && opts[:'search'].to_s.length < 1
|
|
500
|
+
fail ArgumentError, 'invalid value for "opts[:"search"]" when calling CompaniesApi.list_companies_analytics_dashboard, the character length must be greater than or equal to 1.'
|
|
501
|
+
end
|
|
502
|
+
|
|
503
|
+
# resource path
|
|
504
|
+
local_var_path = '/companies/{company_id}/analytics/dashboard'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s))
|
|
505
|
+
|
|
506
|
+
# query parameters
|
|
507
|
+
query_params = opts[:query_params] || {}
|
|
508
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
509
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
510
|
+
query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
|
|
511
|
+
query_params[:'sort_order'] = opts[:'sort_order'] if !opts[:'sort_order'].nil?
|
|
512
|
+
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
|
513
|
+
|
|
514
|
+
# header parameters
|
|
515
|
+
header_params = opts[:header_params] || {}
|
|
516
|
+
# HTTP header 'Accept' (if needed)
|
|
517
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
518
|
+
|
|
519
|
+
# form parameters
|
|
520
|
+
form_params = opts[:form_params] || {}
|
|
521
|
+
|
|
522
|
+
# http body (model)
|
|
523
|
+
post_body = opts[:debug_body]
|
|
524
|
+
|
|
525
|
+
# return_type
|
|
526
|
+
return_type = opts[:debug_return_type] || 'ListCompaniesAnalyticsAssets200Response'
|
|
527
|
+
|
|
528
|
+
# auth_names
|
|
529
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
530
|
+
|
|
531
|
+
new_options = opts.merge(
|
|
532
|
+
:operation => :"CompaniesApi.list_companies_analytics_dashboard",
|
|
533
|
+
:header_params => header_params,
|
|
534
|
+
:query_params => query_params,
|
|
535
|
+
:form_params => form_params,
|
|
536
|
+
:body => post_body,
|
|
537
|
+
:auth_names => auth_names,
|
|
538
|
+
:return_type => return_type
|
|
539
|
+
)
|
|
540
|
+
|
|
541
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
542
|
+
if @api_client.config.debugging
|
|
543
|
+
@api_client.config.logger.debug "API called: CompaniesApi#list_companies_analytics_dashboard\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
544
|
+
end
|
|
545
|
+
return data, status_code, headers
|
|
546
|
+
end
|
|
547
|
+
|
|
548
|
+
# Get summary metrics (counts only). No date params needed — returns all-time totals. Performance: < 0.1s
|
|
549
|
+
# @param company_id [String] Unique identifier for the Company
|
|
550
|
+
# @param [Hash] opts the optional parameters
|
|
551
|
+
# @option opts [Integer] :page Page number for pagination (default to 1)
|
|
552
|
+
# @option opts [Integer] :limit Number of items per page (default to 20)
|
|
553
|
+
# @option opts [String] :sort_by Field to sort by
|
|
554
|
+
# @option opts [String] :sort_order Sort order (ascending or descending) (default to 'desc')
|
|
555
|
+
# @option opts [String] :search Search term to filter results
|
|
556
|
+
# @return [ListCompaniesAnalyticsAssets200Response]
|
|
557
|
+
def list_companies_analytics_metrics(company_id, opts = {})
|
|
558
|
+
data, _status_code, _headers = list_companies_analytics_metrics_with_http_info(company_id, opts)
|
|
559
|
+
data
|
|
560
|
+
end
|
|
561
|
+
|
|
562
|
+
# Get summary metrics (counts only). No date params needed — returns all-time totals. Performance: < 0.1s
|
|
563
|
+
# @param company_id [String] Unique identifier for the Company
|
|
564
|
+
# @param [Hash] opts the optional parameters
|
|
565
|
+
# @option opts [Integer] :page Page number for pagination (default to 1)
|
|
566
|
+
# @option opts [Integer] :limit Number of items per page (default to 20)
|
|
567
|
+
# @option opts [String] :sort_by Field to sort by
|
|
568
|
+
# @option opts [String] :sort_order Sort order (ascending or descending) (default to 'desc')
|
|
569
|
+
# @option opts [String] :search Search term to filter results
|
|
570
|
+
# @return [Array<(ListCompaniesAnalyticsAssets200Response, Integer, Hash)>] ListCompaniesAnalyticsAssets200Response data, response status code and response headers
|
|
571
|
+
def list_companies_analytics_metrics_with_http_info(company_id, opts = {})
|
|
572
|
+
if @api_client.config.debugging
|
|
573
|
+
@api_client.config.logger.debug 'Calling API: CompaniesApi.list_companies_analytics_metrics ...'
|
|
574
|
+
end
|
|
575
|
+
# verify the required parameter 'company_id' is set
|
|
576
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
|
577
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling CompaniesApi.list_companies_analytics_metrics"
|
|
578
|
+
end
|
|
579
|
+
if @api_client.config.client_side_validation && company_id.to_s.length > 255
|
|
580
|
+
fail ArgumentError, 'invalid value for "company_id" when calling CompaniesApi.list_companies_analytics_metrics, the character length must be smaller than or equal to 255.'
|
|
581
|
+
end
|
|
582
|
+
|
|
583
|
+
if @api_client.config.client_side_validation && company_id.to_s.length < 1
|
|
584
|
+
fail ArgumentError, 'invalid value for "company_id" when calling CompaniesApi.list_companies_analytics_metrics, the character length must be greater than or equal to 1.'
|
|
585
|
+
end
|
|
586
|
+
|
|
587
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
588
|
+
if @api_client.config.client_side_validation && company_id !~ pattern
|
|
589
|
+
fail ArgumentError, "invalid value for 'company_id' when calling CompaniesApi.list_companies_analytics_metrics, must conform to the pattern #{pattern}."
|
|
590
|
+
end
|
|
591
|
+
|
|
592
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
593
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling CompaniesApi.list_companies_analytics_metrics, must be greater than or equal to 1.'
|
|
594
|
+
end
|
|
595
|
+
|
|
596
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
597
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling CompaniesApi.list_companies_analytics_metrics, must be smaller than or equal to 100.'
|
|
598
|
+
end
|
|
599
|
+
|
|
600
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
601
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling CompaniesApi.list_companies_analytics_metrics, must be greater than or equal to 1.'
|
|
602
|
+
end
|
|
603
|
+
|
|
604
|
+
allowable_values = ["asc", "desc"]
|
|
605
|
+
if @api_client.config.client_side_validation && opts[:'sort_order'] && !allowable_values.include?(opts[:'sort_order'])
|
|
606
|
+
fail ArgumentError, "invalid value for \"sort_order\", must be one of #{allowable_values}"
|
|
607
|
+
end
|
|
608
|
+
if @api_client.config.client_side_validation && !opts[:'search'].nil? && opts[:'search'].to_s.length > 255
|
|
609
|
+
fail ArgumentError, 'invalid value for "opts[:"search"]" when calling CompaniesApi.list_companies_analytics_metrics, the character length must be smaller than or equal to 255.'
|
|
610
|
+
end
|
|
611
|
+
|
|
612
|
+
if @api_client.config.client_side_validation && !opts[:'search'].nil? && opts[:'search'].to_s.length < 1
|
|
613
|
+
fail ArgumentError, 'invalid value for "opts[:"search"]" when calling CompaniesApi.list_companies_analytics_metrics, the character length must be greater than or equal to 1.'
|
|
614
|
+
end
|
|
615
|
+
|
|
616
|
+
# resource path
|
|
617
|
+
local_var_path = '/companies/{company_id}/analytics/metrics'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s))
|
|
618
|
+
|
|
619
|
+
# query parameters
|
|
620
|
+
query_params = opts[:query_params] || {}
|
|
621
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
622
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
623
|
+
query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
|
|
624
|
+
query_params[:'sort_order'] = opts[:'sort_order'] if !opts[:'sort_order'].nil?
|
|
625
|
+
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
|
626
|
+
|
|
627
|
+
# header parameters
|
|
628
|
+
header_params = opts[:header_params] || {}
|
|
629
|
+
# HTTP header 'Accept' (if needed)
|
|
630
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
631
|
+
|
|
632
|
+
# form parameters
|
|
633
|
+
form_params = opts[:form_params] || {}
|
|
634
|
+
|
|
635
|
+
# http body (model)
|
|
636
|
+
post_body = opts[:debug_body]
|
|
637
|
+
|
|
638
|
+
# return_type
|
|
639
|
+
return_type = opts[:debug_return_type] || 'ListCompaniesAnalyticsAssets200Response'
|
|
640
|
+
|
|
641
|
+
# auth_names
|
|
642
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
643
|
+
|
|
644
|
+
new_options = opts.merge(
|
|
645
|
+
:operation => :"CompaniesApi.list_companies_analytics_metrics",
|
|
646
|
+
:header_params => header_params,
|
|
647
|
+
:query_params => query_params,
|
|
648
|
+
:form_params => form_params,
|
|
649
|
+
:body => post_body,
|
|
650
|
+
:auth_names => auth_names,
|
|
651
|
+
:return_type => return_type
|
|
652
|
+
)
|
|
653
|
+
|
|
654
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
655
|
+
if @api_client.config.debugging
|
|
656
|
+
@api_client.config.logger.debug "API called: CompaniesApi#list_companies_analytics_metrics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
657
|
+
end
|
|
658
|
+
return data, status_code, headers
|
|
659
|
+
end
|
|
660
|
+
|
|
661
|
+
# Get sales over time analytics. Query params: start_date, end_date, group_by (day/week/month/quarter), metrics
|
|
662
|
+
# @param company_id [String] Unique identifier for the Company
|
|
663
|
+
# @param [Hash] opts the optional parameters
|
|
664
|
+
# @option opts [Integer] :page Page number for pagination (default to 1)
|
|
665
|
+
# @option opts [Integer] :limit Number of items per page (default to 20)
|
|
666
|
+
# @option opts [String] :sort_by Field to sort by
|
|
667
|
+
# @option opts [String] :sort_order Sort order (ascending or descending) (default to 'desc')
|
|
668
|
+
# @option opts [String] :search Search term to filter results
|
|
669
|
+
# @return [ListCompaniesAnalyticsAssets200Response]
|
|
670
|
+
def list_companies_analytics_sales(company_id, opts = {})
|
|
671
|
+
data, _status_code, _headers = list_companies_analytics_sales_with_http_info(company_id, opts)
|
|
672
|
+
data
|
|
673
|
+
end
|
|
674
|
+
|
|
675
|
+
# Get sales over time analytics. Query params: start_date, end_date, group_by (day/week/month/quarter), metrics
|
|
676
|
+
# @param company_id [String] Unique identifier for the Company
|
|
677
|
+
# @param [Hash] opts the optional parameters
|
|
678
|
+
# @option opts [Integer] :page Page number for pagination (default to 1)
|
|
679
|
+
# @option opts [Integer] :limit Number of items per page (default to 20)
|
|
680
|
+
# @option opts [String] :sort_by Field to sort by
|
|
681
|
+
# @option opts [String] :sort_order Sort order (ascending or descending) (default to 'desc')
|
|
682
|
+
# @option opts [String] :search Search term to filter results
|
|
683
|
+
# @return [Array<(ListCompaniesAnalyticsAssets200Response, Integer, Hash)>] ListCompaniesAnalyticsAssets200Response data, response status code and response headers
|
|
684
|
+
def list_companies_analytics_sales_with_http_info(company_id, opts = {})
|
|
685
|
+
if @api_client.config.debugging
|
|
686
|
+
@api_client.config.logger.debug 'Calling API: CompaniesApi.list_companies_analytics_sales ...'
|
|
687
|
+
end
|
|
688
|
+
# verify the required parameter 'company_id' is set
|
|
689
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
|
690
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling CompaniesApi.list_companies_analytics_sales"
|
|
691
|
+
end
|
|
692
|
+
if @api_client.config.client_side_validation && company_id.to_s.length > 255
|
|
693
|
+
fail ArgumentError, 'invalid value for "company_id" when calling CompaniesApi.list_companies_analytics_sales, the character length must be smaller than or equal to 255.'
|
|
694
|
+
end
|
|
695
|
+
|
|
696
|
+
if @api_client.config.client_side_validation && company_id.to_s.length < 1
|
|
697
|
+
fail ArgumentError, 'invalid value for "company_id" when calling CompaniesApi.list_companies_analytics_sales, the character length must be greater than or equal to 1.'
|
|
698
|
+
end
|
|
699
|
+
|
|
700
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
701
|
+
if @api_client.config.client_side_validation && company_id !~ pattern
|
|
702
|
+
fail ArgumentError, "invalid value for 'company_id' when calling CompaniesApi.list_companies_analytics_sales, must conform to the pattern #{pattern}."
|
|
703
|
+
end
|
|
704
|
+
|
|
705
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
706
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling CompaniesApi.list_companies_analytics_sales, must be greater than or equal to 1.'
|
|
707
|
+
end
|
|
708
|
+
|
|
709
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
710
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling CompaniesApi.list_companies_analytics_sales, must be smaller than or equal to 100.'
|
|
711
|
+
end
|
|
712
|
+
|
|
713
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
714
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling CompaniesApi.list_companies_analytics_sales, must be greater than or equal to 1.'
|
|
715
|
+
end
|
|
716
|
+
|
|
717
|
+
allowable_values = ["asc", "desc"]
|
|
718
|
+
if @api_client.config.client_side_validation && opts[:'sort_order'] && !allowable_values.include?(opts[:'sort_order'])
|
|
719
|
+
fail ArgumentError, "invalid value for \"sort_order\", must be one of #{allowable_values}"
|
|
720
|
+
end
|
|
721
|
+
if @api_client.config.client_side_validation && !opts[:'search'].nil? && opts[:'search'].to_s.length > 255
|
|
722
|
+
fail ArgumentError, 'invalid value for "opts[:"search"]" when calling CompaniesApi.list_companies_analytics_sales, the character length must be smaller than or equal to 255.'
|
|
723
|
+
end
|
|
724
|
+
|
|
725
|
+
if @api_client.config.client_side_validation && !opts[:'search'].nil? && opts[:'search'].to_s.length < 1
|
|
726
|
+
fail ArgumentError, 'invalid value for "opts[:"search"]" when calling CompaniesApi.list_companies_analytics_sales, the character length must be greater than or equal to 1.'
|
|
727
|
+
end
|
|
728
|
+
|
|
729
|
+
# resource path
|
|
730
|
+
local_var_path = '/companies/{company_id}/analytics/sales'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s))
|
|
731
|
+
|
|
732
|
+
# query parameters
|
|
733
|
+
query_params = opts[:query_params] || {}
|
|
734
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
735
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
736
|
+
query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
|
|
737
|
+
query_params[:'sort_order'] = opts[:'sort_order'] if !opts[:'sort_order'].nil?
|
|
738
|
+
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
|
739
|
+
|
|
740
|
+
# header parameters
|
|
741
|
+
header_params = opts[:header_params] || {}
|
|
742
|
+
# HTTP header 'Accept' (if needed)
|
|
743
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
744
|
+
|
|
745
|
+
# form parameters
|
|
746
|
+
form_params = opts[:form_params] || {}
|
|
747
|
+
|
|
748
|
+
# http body (model)
|
|
749
|
+
post_body = opts[:debug_body]
|
|
750
|
+
|
|
751
|
+
# return_type
|
|
752
|
+
return_type = opts[:debug_return_type] || 'ListCompaniesAnalyticsAssets200Response'
|
|
753
|
+
|
|
754
|
+
# auth_names
|
|
755
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
756
|
+
|
|
757
|
+
new_options = opts.merge(
|
|
758
|
+
:operation => :"CompaniesApi.list_companies_analytics_sales",
|
|
759
|
+
:header_params => header_params,
|
|
760
|
+
:query_params => query_params,
|
|
761
|
+
:form_params => form_params,
|
|
762
|
+
:body => post_body,
|
|
763
|
+
:auth_names => auth_names,
|
|
764
|
+
:return_type => return_type
|
|
765
|
+
)
|
|
766
|
+
|
|
767
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
768
|
+
if @api_client.config.debugging
|
|
769
|
+
@api_client.config.logger.debug "API called: CompaniesApi#list_companies_analytics_sales\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
770
|
+
end
|
|
771
|
+
return data, status_code, headers
|
|
772
|
+
end
|
|
773
|
+
|
|
774
|
+
# Get all objects (connections, assets) of a single company
|
|
775
|
+
# @param company_id [String] Unique identifier for the Company
|
|
776
|
+
# @param [Hash] opts the optional parameters
|
|
777
|
+
# @option opts [Integer] :page Page number for pagination (default to 1)
|
|
778
|
+
# @option opts [Integer] :limit Number of items per page (default to 20)
|
|
779
|
+
# @option opts [String] :sort_by Field to sort by
|
|
780
|
+
# @option opts [String] :sort_order Sort order (ascending or descending) (default to 'desc')
|
|
781
|
+
# @option opts [String] :search Search term to filter results
|
|
782
|
+
# @return [ListCompaniesAnalyticsAssets200Response]
|
|
783
|
+
def list_companies_objects(company_id, opts = {})
|
|
784
|
+
data, _status_code, _headers = list_companies_objects_with_http_info(company_id, opts)
|
|
785
|
+
data
|
|
786
|
+
end
|
|
787
|
+
|
|
788
|
+
# Get all objects (connections, assets) of a single company
|
|
789
|
+
# @param company_id [String] Unique identifier for the Company
|
|
790
|
+
# @param [Hash] opts the optional parameters
|
|
791
|
+
# @option opts [Integer] :page Page number for pagination (default to 1)
|
|
792
|
+
# @option opts [Integer] :limit Number of items per page (default to 20)
|
|
793
|
+
# @option opts [String] :sort_by Field to sort by
|
|
794
|
+
# @option opts [String] :sort_order Sort order (ascending or descending) (default to 'desc')
|
|
795
|
+
# @option opts [String] :search Search term to filter results
|
|
796
|
+
# @return [Array<(ListCompaniesAnalyticsAssets200Response, Integer, Hash)>] ListCompaniesAnalyticsAssets200Response data, response status code and response headers
|
|
797
|
+
def list_companies_objects_with_http_info(company_id, opts = {})
|
|
798
|
+
if @api_client.config.debugging
|
|
799
|
+
@api_client.config.logger.debug 'Calling API: CompaniesApi.list_companies_objects ...'
|
|
800
|
+
end
|
|
801
|
+
# verify the required parameter 'company_id' is set
|
|
802
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
|
803
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling CompaniesApi.list_companies_objects"
|
|
804
|
+
end
|
|
805
|
+
if @api_client.config.client_side_validation && company_id.to_s.length > 255
|
|
806
|
+
fail ArgumentError, 'invalid value for "company_id" when calling CompaniesApi.list_companies_objects, the character length must be smaller than or equal to 255.'
|
|
807
|
+
end
|
|
808
|
+
|
|
809
|
+
if @api_client.config.client_side_validation && company_id.to_s.length < 1
|
|
810
|
+
fail ArgumentError, 'invalid value for "company_id" when calling CompaniesApi.list_companies_objects, 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 && company_id !~ pattern
|
|
815
|
+
fail ArgumentError, "invalid value for 'company_id' when calling CompaniesApi.list_companies_objects, must conform to the pattern #{pattern}."
|
|
816
|
+
end
|
|
817
|
+
|
|
818
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
819
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling CompaniesApi.list_companies_objects, must be greater than or equal to 1.'
|
|
820
|
+
end
|
|
821
|
+
|
|
822
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
823
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling CompaniesApi.list_companies_objects, must be smaller than or equal to 100.'
|
|
824
|
+
end
|
|
825
|
+
|
|
826
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
827
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling CompaniesApi.list_companies_objects, must be greater than or equal to 1.'
|
|
828
|
+
end
|
|
829
|
+
|
|
830
|
+
allowable_values = ["asc", "desc"]
|
|
831
|
+
if @api_client.config.client_side_validation && opts[:'sort_order'] && !allowable_values.include?(opts[:'sort_order'])
|
|
832
|
+
fail ArgumentError, "invalid value for \"sort_order\", must be one of #{allowable_values}"
|
|
833
|
+
end
|
|
834
|
+
if @api_client.config.client_side_validation && !opts[:'search'].nil? && opts[:'search'].to_s.length > 255
|
|
835
|
+
fail ArgumentError, 'invalid value for "opts[:"search"]" when calling CompaniesApi.list_companies_objects, the character length must be smaller than or equal to 255.'
|
|
836
|
+
end
|
|
837
|
+
|
|
838
|
+
if @api_client.config.client_side_validation && !opts[:'search'].nil? && opts[:'search'].to_s.length < 1
|
|
839
|
+
fail ArgumentError, 'invalid value for "opts[:"search"]" when calling CompaniesApi.list_companies_objects, the character length must be greater than or equal to 1.'
|
|
840
|
+
end
|
|
841
|
+
|
|
842
|
+
# resource path
|
|
843
|
+
local_var_path = '/companies/{company_id}/objects'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s))
|
|
844
|
+
|
|
845
|
+
# query parameters
|
|
846
|
+
query_params = opts[:query_params] || {}
|
|
847
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
848
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
849
|
+
query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
|
|
850
|
+
query_params[:'sort_order'] = opts[:'sort_order'] if !opts[:'sort_order'].nil?
|
|
851
|
+
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
|
852
|
+
|
|
853
|
+
# header parameters
|
|
854
|
+
header_params = opts[:header_params] || {}
|
|
855
|
+
# HTTP header 'Accept' (if needed)
|
|
856
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
857
|
+
|
|
858
|
+
# form parameters
|
|
859
|
+
form_params = opts[:form_params] || {}
|
|
860
|
+
|
|
861
|
+
# http body (model)
|
|
862
|
+
post_body = opts[:debug_body]
|
|
863
|
+
|
|
864
|
+
# return_type
|
|
865
|
+
return_type = opts[:debug_return_type] || 'ListCompaniesAnalyticsAssets200Response'
|
|
866
|
+
|
|
867
|
+
# auth_names
|
|
868
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
869
|
+
|
|
870
|
+
new_options = opts.merge(
|
|
871
|
+
:operation => :"CompaniesApi.list_companies_objects",
|
|
872
|
+
:header_params => header_params,
|
|
873
|
+
:query_params => query_params,
|
|
874
|
+
:form_params => form_params,
|
|
875
|
+
:body => post_body,
|
|
876
|
+
:auth_names => auth_names,
|
|
877
|
+
:return_type => return_type
|
|
878
|
+
)
|
|
879
|
+
|
|
880
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
881
|
+
if @api_client.config.debugging
|
|
882
|
+
@api_client.config.logger.debug "API called: CompaniesApi#list_companies_objects\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
883
|
+
end
|
|
884
|
+
return data, status_code, headers
|
|
885
|
+
end
|
|
886
|
+
|
|
887
|
+
# Get company request usage data for a specific month.
|
|
888
|
+
# @param company_id [String] Unique identifier for the Company
|
|
889
|
+
# @param [Hash] opts the optional parameters
|
|
890
|
+
# @option opts [Integer] :page Page number for pagination (default to 1)
|
|
891
|
+
# @option opts [Integer] :limit Number of items per page (default to 20)
|
|
892
|
+
# @option opts [String] :sort_by Field to sort by
|
|
893
|
+
# @option opts [String] :sort_order Sort order (ascending or descending) (default to 'desc')
|
|
894
|
+
# @option opts [String] :search Search term to filter results
|
|
895
|
+
# @return [ListCompaniesAnalyticsAssets200Response]
|
|
896
|
+
def list_companies_requests_usage(company_id, opts = {})
|
|
897
|
+
data, _status_code, _headers = list_companies_requests_usage_with_http_info(company_id, opts)
|
|
898
|
+
data
|
|
899
|
+
end
|
|
900
|
+
|
|
901
|
+
# Get company request usage data for a specific month.
|
|
902
|
+
# @param company_id [String] Unique identifier for the Company
|
|
903
|
+
# @param [Hash] opts the optional parameters
|
|
904
|
+
# @option opts [Integer] :page Page number for pagination (default to 1)
|
|
905
|
+
# @option opts [Integer] :limit Number of items per page (default to 20)
|
|
906
|
+
# @option opts [String] :sort_by Field to sort by
|
|
907
|
+
# @option opts [String] :sort_order Sort order (ascending or descending) (default to 'desc')
|
|
908
|
+
# @option opts [String] :search Search term to filter results
|
|
909
|
+
# @return [Array<(ListCompaniesAnalyticsAssets200Response, Integer, Hash)>] ListCompaniesAnalyticsAssets200Response data, response status code and response headers
|
|
910
|
+
def list_companies_requests_usage_with_http_info(company_id, opts = {})
|
|
911
|
+
if @api_client.config.debugging
|
|
912
|
+
@api_client.config.logger.debug 'Calling API: CompaniesApi.list_companies_requests_usage ...'
|
|
913
|
+
end
|
|
914
|
+
# verify the required parameter 'company_id' is set
|
|
915
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
|
916
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling CompaniesApi.list_companies_requests_usage"
|
|
917
|
+
end
|
|
918
|
+
if @api_client.config.client_side_validation && company_id.to_s.length > 255
|
|
919
|
+
fail ArgumentError, 'invalid value for "company_id" when calling CompaniesApi.list_companies_requests_usage, the character length must be smaller than or equal to 255.'
|
|
920
|
+
end
|
|
921
|
+
|
|
922
|
+
if @api_client.config.client_side_validation && company_id.to_s.length < 1
|
|
923
|
+
fail ArgumentError, 'invalid value for "company_id" when calling CompaniesApi.list_companies_requests_usage, the character length must be greater than or equal to 1.'
|
|
924
|
+
end
|
|
925
|
+
|
|
926
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
927
|
+
if @api_client.config.client_side_validation && company_id !~ pattern
|
|
928
|
+
fail ArgumentError, "invalid value for 'company_id' when calling CompaniesApi.list_companies_requests_usage, must conform to the pattern #{pattern}."
|
|
929
|
+
end
|
|
930
|
+
|
|
931
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
932
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling CompaniesApi.list_companies_requests_usage, must be greater than or equal to 1.'
|
|
933
|
+
end
|
|
934
|
+
|
|
935
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
936
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling CompaniesApi.list_companies_requests_usage, must be smaller than or equal to 100.'
|
|
937
|
+
end
|
|
938
|
+
|
|
939
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
940
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling CompaniesApi.list_companies_requests_usage, must be greater than or equal to 1.'
|
|
941
|
+
end
|
|
942
|
+
|
|
943
|
+
allowable_values = ["asc", "desc"]
|
|
944
|
+
if @api_client.config.client_side_validation && opts[:'sort_order'] && !allowable_values.include?(opts[:'sort_order'])
|
|
945
|
+
fail ArgumentError, "invalid value for \"sort_order\", must be one of #{allowable_values}"
|
|
946
|
+
end
|
|
947
|
+
if @api_client.config.client_side_validation && !opts[:'search'].nil? && opts[:'search'].to_s.length > 255
|
|
948
|
+
fail ArgumentError, 'invalid value for "opts[:"search"]" when calling CompaniesApi.list_companies_requests_usage, the character length must be smaller than or equal to 255.'
|
|
949
|
+
end
|
|
950
|
+
|
|
951
|
+
if @api_client.config.client_side_validation && !opts[:'search'].nil? && opts[:'search'].to_s.length < 1
|
|
952
|
+
fail ArgumentError, 'invalid value for "opts[:"search"]" when calling CompaniesApi.list_companies_requests_usage, the character length must be greater than or equal to 1.'
|
|
953
|
+
end
|
|
954
|
+
|
|
955
|
+
# resource path
|
|
956
|
+
local_var_path = '/companies/{company_id}/requests/usage'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s))
|
|
957
|
+
|
|
958
|
+
# query parameters
|
|
959
|
+
query_params = opts[:query_params] || {}
|
|
960
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
961
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
962
|
+
query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
|
|
963
|
+
query_params[:'sort_order'] = opts[:'sort_order'] if !opts[:'sort_order'].nil?
|
|
964
|
+
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
|
965
|
+
|
|
966
|
+
# header parameters
|
|
967
|
+
header_params = opts[:header_params] || {}
|
|
968
|
+
# HTTP header 'Accept' (if needed)
|
|
969
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
970
|
+
|
|
971
|
+
# form parameters
|
|
972
|
+
form_params = opts[:form_params] || {}
|
|
973
|
+
|
|
974
|
+
# http body (model)
|
|
975
|
+
post_body = opts[:debug_body]
|
|
976
|
+
|
|
977
|
+
# return_type
|
|
978
|
+
return_type = opts[:debug_return_type] || 'ListCompaniesAnalyticsAssets200Response'
|
|
979
|
+
|
|
980
|
+
# auth_names
|
|
981
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
982
|
+
|
|
983
|
+
new_options = opts.merge(
|
|
984
|
+
:operation => :"CompaniesApi.list_companies_requests_usage",
|
|
985
|
+
:header_params => header_params,
|
|
986
|
+
:query_params => query_params,
|
|
987
|
+
:form_params => form_params,
|
|
988
|
+
:body => post_body,
|
|
989
|
+
:auth_names => auth_names,
|
|
990
|
+
:return_type => return_type
|
|
991
|
+
)
|
|
992
|
+
|
|
993
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
994
|
+
if @api_client.config.debugging
|
|
995
|
+
@api_client.config.logger.debug "API called: CompaniesApi#list_companies_requests_usage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
996
|
+
end
|
|
997
|
+
return data, status_code, headers
|
|
998
|
+
end
|
|
999
|
+
|
|
1000
|
+
# Update an existing company by ID
|
|
1001
|
+
# @param company_id [String] Unique identifier for the Company
|
|
1002
|
+
# @param companies_update [CompaniesUpdate]
|
|
1003
|
+
# @param [Hash] opts the optional parameters
|
|
1004
|
+
# @return [UpdateCompanies200Response]
|
|
1005
|
+
def update_companies(company_id, companies_update, opts = {})
|
|
1006
|
+
data, _status_code, _headers = update_companies_with_http_info(company_id, companies_update, opts)
|
|
1007
|
+
data
|
|
1008
|
+
end
|
|
1009
|
+
|
|
1010
|
+
# Update an existing company by ID
|
|
1011
|
+
# @param company_id [String] Unique identifier for the Company
|
|
1012
|
+
# @param companies_update [CompaniesUpdate]
|
|
1013
|
+
# @param [Hash] opts the optional parameters
|
|
1014
|
+
# @return [Array<(UpdateCompanies200Response, Integer, Hash)>] UpdateCompanies200Response data, response status code and response headers
|
|
1015
|
+
def update_companies_with_http_info(company_id, companies_update, opts = {})
|
|
1016
|
+
if @api_client.config.debugging
|
|
1017
|
+
@api_client.config.logger.debug 'Calling API: CompaniesApi.update_companies ...'
|
|
1018
|
+
end
|
|
1019
|
+
# verify the required parameter 'company_id' is set
|
|
1020
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
|
1021
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling CompaniesApi.update_companies"
|
|
1022
|
+
end
|
|
1023
|
+
if @api_client.config.client_side_validation && company_id.to_s.length > 255
|
|
1024
|
+
fail ArgumentError, 'invalid value for "company_id" when calling CompaniesApi.update_companies, the character length must be smaller than or equal to 255.'
|
|
1025
|
+
end
|
|
1026
|
+
|
|
1027
|
+
if @api_client.config.client_side_validation && company_id.to_s.length < 1
|
|
1028
|
+
fail ArgumentError, 'invalid value for "company_id" when calling CompaniesApi.update_companies, the character length must be greater than or equal to 1.'
|
|
1029
|
+
end
|
|
1030
|
+
|
|
1031
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
1032
|
+
if @api_client.config.client_side_validation && company_id !~ pattern
|
|
1033
|
+
fail ArgumentError, "invalid value for 'company_id' when calling CompaniesApi.update_companies, must conform to the pattern #{pattern}."
|
|
1034
|
+
end
|
|
1035
|
+
|
|
1036
|
+
# verify the required parameter 'companies_update' is set
|
|
1037
|
+
if @api_client.config.client_side_validation && companies_update.nil?
|
|
1038
|
+
fail ArgumentError, "Missing the required parameter 'companies_update' when calling CompaniesApi.update_companies"
|
|
1039
|
+
end
|
|
1040
|
+
# resource path
|
|
1041
|
+
local_var_path = '/companies/{company_id}'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s))
|
|
1042
|
+
|
|
1043
|
+
# query parameters
|
|
1044
|
+
query_params = opts[:query_params] || {}
|
|
1045
|
+
|
|
1046
|
+
# header parameters
|
|
1047
|
+
header_params = opts[:header_params] || {}
|
|
1048
|
+
# HTTP header 'Accept' (if needed)
|
|
1049
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1050
|
+
# HTTP header 'Content-Type'
|
|
1051
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1052
|
+
if !content_type.nil?
|
|
1053
|
+
header_params['Content-Type'] = content_type
|
|
1054
|
+
end
|
|
1055
|
+
|
|
1056
|
+
# form parameters
|
|
1057
|
+
form_params = opts[:form_params] || {}
|
|
1058
|
+
|
|
1059
|
+
# http body (model)
|
|
1060
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(companies_update)
|
|
1061
|
+
|
|
1062
|
+
# return_type
|
|
1063
|
+
return_type = opts[:debug_return_type] || 'UpdateCompanies200Response'
|
|
1064
|
+
|
|
1065
|
+
# auth_names
|
|
1066
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
1067
|
+
|
|
1068
|
+
new_options = opts.merge(
|
|
1069
|
+
:operation => :"CompaniesApi.update_companies",
|
|
1070
|
+
:header_params => header_params,
|
|
1071
|
+
:query_params => query_params,
|
|
1072
|
+
:form_params => form_params,
|
|
1073
|
+
:body => post_body,
|
|
1074
|
+
:auth_names => auth_names,
|
|
1075
|
+
:return_type => return_type
|
|
1076
|
+
)
|
|
1077
|
+
|
|
1078
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
1079
|
+
if @api_client.config.debugging
|
|
1080
|
+
@api_client.config.logger.debug "API called: CompaniesApi#update_companies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1081
|
+
end
|
|
1082
|
+
return data, status_code, headers
|
|
1083
|
+
end
|
|
1084
|
+
end
|
|
1085
|
+
end
|