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,891 @@
|
|
|
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 UsersApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Create a new user
|
|
23
|
+
# @param company_id [String] Unique identifier for the Company
|
|
24
|
+
# @param users_input [UsersInput]
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @option opts [Integer] :page Page number for pagination (default to 1)
|
|
27
|
+
# @option opts [Integer] :limit Number of items per page (default to 20)
|
|
28
|
+
# @option opts [String] :sort_by Field to sort by
|
|
29
|
+
# @option opts [String] :sort_order Sort order (ascending or descending) (default to 'desc')
|
|
30
|
+
# @option opts [String] :search Search term to filter results
|
|
31
|
+
# @return [CreateUsers200Response]
|
|
32
|
+
def create_users(company_id, users_input, opts = {})
|
|
33
|
+
data, _status_code, _headers = create_users_with_http_info(company_id, users_input, opts)
|
|
34
|
+
data
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Create a new user
|
|
38
|
+
# @param company_id [String] Unique identifier for the Company
|
|
39
|
+
# @param users_input [UsersInput]
|
|
40
|
+
# @param [Hash] opts the optional parameters
|
|
41
|
+
# @option opts [Integer] :page Page number for pagination (default to 1)
|
|
42
|
+
# @option opts [Integer] :limit Number of items per page (default to 20)
|
|
43
|
+
# @option opts [String] :sort_by Field to sort by
|
|
44
|
+
# @option opts [String] :sort_order Sort order (ascending or descending) (default to 'desc')
|
|
45
|
+
# @option opts [String] :search Search term to filter results
|
|
46
|
+
# @return [Array<(CreateUsers200Response, Integer, Hash)>] CreateUsers200Response data, response status code and response headers
|
|
47
|
+
def create_users_with_http_info(company_id, users_input, opts = {})
|
|
48
|
+
if @api_client.config.debugging
|
|
49
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.create_users ...'
|
|
50
|
+
end
|
|
51
|
+
# verify the required parameter 'company_id' is set
|
|
52
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
|
53
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling UsersApi.create_users"
|
|
54
|
+
end
|
|
55
|
+
if @api_client.config.client_side_validation && company_id.to_s.length > 255
|
|
56
|
+
fail ArgumentError, 'invalid value for "company_id" when calling UsersApi.create_users, the character length must be smaller than or equal to 255.'
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
if @api_client.config.client_side_validation && company_id.to_s.length < 1
|
|
60
|
+
fail ArgumentError, 'invalid value for "company_id" when calling UsersApi.create_users, the character length must be greater than or equal to 1.'
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
64
|
+
if @api_client.config.client_side_validation && company_id !~ pattern
|
|
65
|
+
fail ArgumentError, "invalid value for 'company_id' when calling UsersApi.create_users, must conform to the pattern #{pattern}."
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# verify the required parameter 'users_input' is set
|
|
69
|
+
if @api_client.config.client_side_validation && users_input.nil?
|
|
70
|
+
fail ArgumentError, "Missing the required parameter 'users_input' when calling UsersApi.create_users"
|
|
71
|
+
end
|
|
72
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
73
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling UsersApi.create_users, must be greater than or equal to 1.'
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
77
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling UsersApi.create_users, must be smaller than or equal to 100.'
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
81
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling UsersApi.create_users, must be greater than or equal to 1.'
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
allowable_values = ["asc", "desc"]
|
|
85
|
+
if @api_client.config.client_side_validation && opts[:'sort_order'] && !allowable_values.include?(opts[:'sort_order'])
|
|
86
|
+
fail ArgumentError, "invalid value for \"sort_order\", must be one of #{allowable_values}"
|
|
87
|
+
end
|
|
88
|
+
if @api_client.config.client_side_validation && !opts[:'search'].nil? && opts[:'search'].to_s.length > 255
|
|
89
|
+
fail ArgumentError, 'invalid value for "opts[:"search"]" when calling UsersApi.create_users, the character length must be smaller than or equal to 255.'
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
if @api_client.config.client_side_validation && !opts[:'search'].nil? && opts[:'search'].to_s.length < 1
|
|
93
|
+
fail ArgumentError, 'invalid value for "opts[:"search"]" when calling UsersApi.create_users, the character length must be greater than or equal to 1.'
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# resource path
|
|
97
|
+
local_var_path = '/companies/{company_id}/users'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s))
|
|
98
|
+
|
|
99
|
+
# query parameters
|
|
100
|
+
query_params = opts[:query_params] || {}
|
|
101
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
102
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
103
|
+
query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
|
|
104
|
+
query_params[:'sort_order'] = opts[:'sort_order'] if !opts[:'sort_order'].nil?
|
|
105
|
+
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
|
106
|
+
|
|
107
|
+
# header parameters
|
|
108
|
+
header_params = opts[:header_params] || {}
|
|
109
|
+
# HTTP header 'Accept' (if needed)
|
|
110
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
111
|
+
# HTTP header 'Content-Type'
|
|
112
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
113
|
+
if !content_type.nil?
|
|
114
|
+
header_params['Content-Type'] = content_type
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# form parameters
|
|
118
|
+
form_params = opts[:form_params] || {}
|
|
119
|
+
|
|
120
|
+
# http body (model)
|
|
121
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(users_input)
|
|
122
|
+
|
|
123
|
+
# return_type
|
|
124
|
+
return_type = opts[:debug_return_type] || 'CreateUsers200Response'
|
|
125
|
+
|
|
126
|
+
# auth_names
|
|
127
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
128
|
+
|
|
129
|
+
new_options = opts.merge(
|
|
130
|
+
:operation => :"UsersApi.create_users",
|
|
131
|
+
:header_params => header_params,
|
|
132
|
+
:query_params => query_params,
|
|
133
|
+
:form_params => form_params,
|
|
134
|
+
:body => post_body,
|
|
135
|
+
:auth_names => auth_names,
|
|
136
|
+
:return_type => return_type
|
|
137
|
+
)
|
|
138
|
+
|
|
139
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
140
|
+
if @api_client.config.debugging
|
|
141
|
+
@api_client.config.logger.debug "API called: UsersApi#create_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
142
|
+
end
|
|
143
|
+
return data, status_code, headers
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# POST /companies/{company_id}/users/google-oauth
|
|
147
|
+
# @param company_id [String] Unique identifier for the Company
|
|
148
|
+
# @param users_input [UsersInput]
|
|
149
|
+
# @param [Hash] opts the optional parameters
|
|
150
|
+
# @option opts [Integer] :page Page number for pagination (default to 1)
|
|
151
|
+
# @option opts [Integer] :limit Number of items per page (default to 20)
|
|
152
|
+
# @option opts [String] :sort_by Field to sort by
|
|
153
|
+
# @option opts [String] :sort_order Sort order (ascending or descending) (default to 'desc')
|
|
154
|
+
# @option opts [String] :search Search term to filter results
|
|
155
|
+
# @return [CreateUsers200Response]
|
|
156
|
+
def create_users_google_oauth(company_id, users_input, opts = {})
|
|
157
|
+
data, _status_code, _headers = create_users_google_oauth_with_http_info(company_id, users_input, opts)
|
|
158
|
+
data
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# POST /companies/{company_id}/users/google-oauth
|
|
162
|
+
# @param company_id [String] Unique identifier for the Company
|
|
163
|
+
# @param users_input [UsersInput]
|
|
164
|
+
# @param [Hash] opts the optional parameters
|
|
165
|
+
# @option opts [Integer] :page Page number for pagination (default to 1)
|
|
166
|
+
# @option opts [Integer] :limit Number of items per page (default to 20)
|
|
167
|
+
# @option opts [String] :sort_by Field to sort by
|
|
168
|
+
# @option opts [String] :sort_order Sort order (ascending or descending) (default to 'desc')
|
|
169
|
+
# @option opts [String] :search Search term to filter results
|
|
170
|
+
# @return [Array<(CreateUsers200Response, Integer, Hash)>] CreateUsers200Response data, response status code and response headers
|
|
171
|
+
def create_users_google_oauth_with_http_info(company_id, users_input, opts = {})
|
|
172
|
+
if @api_client.config.debugging
|
|
173
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.create_users_google_oauth ...'
|
|
174
|
+
end
|
|
175
|
+
# verify the required parameter 'company_id' is set
|
|
176
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
|
177
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling UsersApi.create_users_google_oauth"
|
|
178
|
+
end
|
|
179
|
+
if @api_client.config.client_side_validation && company_id.to_s.length > 255
|
|
180
|
+
fail ArgumentError, 'invalid value for "company_id" when calling UsersApi.create_users_google_oauth, the character length must be smaller than or equal to 255.'
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
if @api_client.config.client_side_validation && company_id.to_s.length < 1
|
|
184
|
+
fail ArgumentError, 'invalid value for "company_id" when calling UsersApi.create_users_google_oauth, the character length must be greater than or equal to 1.'
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
188
|
+
if @api_client.config.client_side_validation && company_id !~ pattern
|
|
189
|
+
fail ArgumentError, "invalid value for 'company_id' when calling UsersApi.create_users_google_oauth, must conform to the pattern #{pattern}."
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# verify the required parameter 'users_input' is set
|
|
193
|
+
if @api_client.config.client_side_validation && users_input.nil?
|
|
194
|
+
fail ArgumentError, "Missing the required parameter 'users_input' when calling UsersApi.create_users_google_oauth"
|
|
195
|
+
end
|
|
196
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
197
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling UsersApi.create_users_google_oauth, must be greater than or equal to 1.'
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
201
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling UsersApi.create_users_google_oauth, must be smaller than or equal to 100.'
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
205
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling UsersApi.create_users_google_oauth, must be greater than or equal to 1.'
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
allowable_values = ["asc", "desc"]
|
|
209
|
+
if @api_client.config.client_side_validation && opts[:'sort_order'] && !allowable_values.include?(opts[:'sort_order'])
|
|
210
|
+
fail ArgumentError, "invalid value for \"sort_order\", must be one of #{allowable_values}"
|
|
211
|
+
end
|
|
212
|
+
if @api_client.config.client_side_validation && !opts[:'search'].nil? && opts[:'search'].to_s.length > 255
|
|
213
|
+
fail ArgumentError, 'invalid value for "opts[:"search"]" when calling UsersApi.create_users_google_oauth, the character length must be smaller than or equal to 255.'
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
if @api_client.config.client_side_validation && !opts[:'search'].nil? && opts[:'search'].to_s.length < 1
|
|
217
|
+
fail ArgumentError, 'invalid value for "opts[:"search"]" when calling UsersApi.create_users_google_oauth, the character length must be greater than or equal to 1.'
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
# resource path
|
|
221
|
+
local_var_path = '/companies/{company_id}/users/google-oauth'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s))
|
|
222
|
+
|
|
223
|
+
# query parameters
|
|
224
|
+
query_params = opts[:query_params] || {}
|
|
225
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
226
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
227
|
+
query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
|
|
228
|
+
query_params[:'sort_order'] = opts[:'sort_order'] if !opts[:'sort_order'].nil?
|
|
229
|
+
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
|
230
|
+
|
|
231
|
+
# header parameters
|
|
232
|
+
header_params = opts[:header_params] || {}
|
|
233
|
+
# HTTP header 'Accept' (if needed)
|
|
234
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
235
|
+
# HTTP header 'Content-Type'
|
|
236
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
237
|
+
if !content_type.nil?
|
|
238
|
+
header_params['Content-Type'] = content_type
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
# form parameters
|
|
242
|
+
form_params = opts[:form_params] || {}
|
|
243
|
+
|
|
244
|
+
# http body (model)
|
|
245
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(users_input)
|
|
246
|
+
|
|
247
|
+
# return_type
|
|
248
|
+
return_type = opts[:debug_return_type] || 'CreateUsers200Response'
|
|
249
|
+
|
|
250
|
+
# auth_names
|
|
251
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
252
|
+
|
|
253
|
+
new_options = opts.merge(
|
|
254
|
+
:operation => :"UsersApi.create_users_google_oauth",
|
|
255
|
+
:header_params => header_params,
|
|
256
|
+
:query_params => query_params,
|
|
257
|
+
:form_params => form_params,
|
|
258
|
+
:body => post_body,
|
|
259
|
+
:auth_names => auth_names,
|
|
260
|
+
:return_type => return_type
|
|
261
|
+
)
|
|
262
|
+
|
|
263
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
264
|
+
if @api_client.config.debugging
|
|
265
|
+
@api_client.config.logger.debug "API called: UsersApi#create_users_google_oauth\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
266
|
+
end
|
|
267
|
+
return data, status_code, headers
|
|
268
|
+
end
|
|
269
|
+
|
|
270
|
+
# Logout current user by revoking their sessions
|
|
271
|
+
# @param company_id [String] Unique identifier for the Company
|
|
272
|
+
# @param users_input [UsersInput]
|
|
273
|
+
# @param [Hash] opts the optional parameters
|
|
274
|
+
# @option opts [Integer] :page Page number for pagination (default to 1)
|
|
275
|
+
# @option opts [Integer] :limit Number of items per page (default to 20)
|
|
276
|
+
# @option opts [String] :sort_by Field to sort by
|
|
277
|
+
# @option opts [String] :sort_order Sort order (ascending or descending) (default to 'desc')
|
|
278
|
+
# @option opts [String] :search Search term to filter results
|
|
279
|
+
# @return [CreateUsers200Response]
|
|
280
|
+
def create_users_logout(company_id, users_input, opts = {})
|
|
281
|
+
data, _status_code, _headers = create_users_logout_with_http_info(company_id, users_input, opts)
|
|
282
|
+
data
|
|
283
|
+
end
|
|
284
|
+
|
|
285
|
+
# Logout current user by revoking their sessions
|
|
286
|
+
# @param company_id [String] Unique identifier for the Company
|
|
287
|
+
# @param users_input [UsersInput]
|
|
288
|
+
# @param [Hash] opts the optional parameters
|
|
289
|
+
# @option opts [Integer] :page Page number for pagination (default to 1)
|
|
290
|
+
# @option opts [Integer] :limit Number of items per page (default to 20)
|
|
291
|
+
# @option opts [String] :sort_by Field to sort by
|
|
292
|
+
# @option opts [String] :sort_order Sort order (ascending or descending) (default to 'desc')
|
|
293
|
+
# @option opts [String] :search Search term to filter results
|
|
294
|
+
# @return [Array<(CreateUsers200Response, Integer, Hash)>] CreateUsers200Response data, response status code and response headers
|
|
295
|
+
def create_users_logout_with_http_info(company_id, users_input, opts = {})
|
|
296
|
+
if @api_client.config.debugging
|
|
297
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.create_users_logout ...'
|
|
298
|
+
end
|
|
299
|
+
# verify the required parameter 'company_id' is set
|
|
300
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
|
301
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling UsersApi.create_users_logout"
|
|
302
|
+
end
|
|
303
|
+
if @api_client.config.client_side_validation && company_id.to_s.length > 255
|
|
304
|
+
fail ArgumentError, 'invalid value for "company_id" when calling UsersApi.create_users_logout, the character length must be smaller than or equal to 255.'
|
|
305
|
+
end
|
|
306
|
+
|
|
307
|
+
if @api_client.config.client_side_validation && company_id.to_s.length < 1
|
|
308
|
+
fail ArgumentError, 'invalid value for "company_id" when calling UsersApi.create_users_logout, the character length must be greater than or equal to 1.'
|
|
309
|
+
end
|
|
310
|
+
|
|
311
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
312
|
+
if @api_client.config.client_side_validation && company_id !~ pattern
|
|
313
|
+
fail ArgumentError, "invalid value for 'company_id' when calling UsersApi.create_users_logout, must conform to the pattern #{pattern}."
|
|
314
|
+
end
|
|
315
|
+
|
|
316
|
+
# verify the required parameter 'users_input' is set
|
|
317
|
+
if @api_client.config.client_side_validation && users_input.nil?
|
|
318
|
+
fail ArgumentError, "Missing the required parameter 'users_input' when calling UsersApi.create_users_logout"
|
|
319
|
+
end
|
|
320
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
321
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling UsersApi.create_users_logout, must be greater than or equal to 1.'
|
|
322
|
+
end
|
|
323
|
+
|
|
324
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
325
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling UsersApi.create_users_logout, must be smaller than or equal to 100.'
|
|
326
|
+
end
|
|
327
|
+
|
|
328
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
329
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling UsersApi.create_users_logout, must be greater than or equal to 1.'
|
|
330
|
+
end
|
|
331
|
+
|
|
332
|
+
allowable_values = ["asc", "desc"]
|
|
333
|
+
if @api_client.config.client_side_validation && opts[:'sort_order'] && !allowable_values.include?(opts[:'sort_order'])
|
|
334
|
+
fail ArgumentError, "invalid value for \"sort_order\", must be one of #{allowable_values}"
|
|
335
|
+
end
|
|
336
|
+
if @api_client.config.client_side_validation && !opts[:'search'].nil? && opts[:'search'].to_s.length > 255
|
|
337
|
+
fail ArgumentError, 'invalid value for "opts[:"search"]" when calling UsersApi.create_users_logout, the character length must be smaller than or equal to 255.'
|
|
338
|
+
end
|
|
339
|
+
|
|
340
|
+
if @api_client.config.client_side_validation && !opts[:'search'].nil? && opts[:'search'].to_s.length < 1
|
|
341
|
+
fail ArgumentError, 'invalid value for "opts[:"search"]" when calling UsersApi.create_users_logout, the character length must be greater than or equal to 1.'
|
|
342
|
+
end
|
|
343
|
+
|
|
344
|
+
# resource path
|
|
345
|
+
local_var_path = '/companies/{company_id}/users/logout'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s))
|
|
346
|
+
|
|
347
|
+
# query parameters
|
|
348
|
+
query_params = opts[:query_params] || {}
|
|
349
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
350
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
351
|
+
query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
|
|
352
|
+
query_params[:'sort_order'] = opts[:'sort_order'] if !opts[:'sort_order'].nil?
|
|
353
|
+
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
|
354
|
+
|
|
355
|
+
# header parameters
|
|
356
|
+
header_params = opts[:header_params] || {}
|
|
357
|
+
# HTTP header 'Accept' (if needed)
|
|
358
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
359
|
+
# HTTP header 'Content-Type'
|
|
360
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
361
|
+
if !content_type.nil?
|
|
362
|
+
header_params['Content-Type'] = content_type
|
|
363
|
+
end
|
|
364
|
+
|
|
365
|
+
# form parameters
|
|
366
|
+
form_params = opts[:form_params] || {}
|
|
367
|
+
|
|
368
|
+
# http body (model)
|
|
369
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(users_input)
|
|
370
|
+
|
|
371
|
+
# return_type
|
|
372
|
+
return_type = opts[:debug_return_type] || 'CreateUsers200Response'
|
|
373
|
+
|
|
374
|
+
# auth_names
|
|
375
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
376
|
+
|
|
377
|
+
new_options = opts.merge(
|
|
378
|
+
:operation => :"UsersApi.create_users_logout",
|
|
379
|
+
:header_params => header_params,
|
|
380
|
+
:query_params => query_params,
|
|
381
|
+
:form_params => form_params,
|
|
382
|
+
:body => post_body,
|
|
383
|
+
:auth_names => auth_names,
|
|
384
|
+
:return_type => return_type
|
|
385
|
+
)
|
|
386
|
+
|
|
387
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
388
|
+
if @api_client.config.debugging
|
|
389
|
+
@api_client.config.logger.debug "API called: UsersApi#create_users_logout\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
390
|
+
end
|
|
391
|
+
return data, status_code, headers
|
|
392
|
+
end
|
|
393
|
+
|
|
394
|
+
# Delete single user by ID
|
|
395
|
+
# @param company_id [String] Unique identifier for the Company
|
|
396
|
+
# @param user_id [String] Unique identifier for the User
|
|
397
|
+
# @param [Hash] opts the optional parameters
|
|
398
|
+
# @return [DeleteUsers200Response]
|
|
399
|
+
def delete_users(company_id, user_id, opts = {})
|
|
400
|
+
data, _status_code, _headers = delete_users_with_http_info(company_id, user_id, opts)
|
|
401
|
+
data
|
|
402
|
+
end
|
|
403
|
+
|
|
404
|
+
# Delete single user by ID
|
|
405
|
+
# @param company_id [String] Unique identifier for the Company
|
|
406
|
+
# @param user_id [String] Unique identifier for the User
|
|
407
|
+
# @param [Hash] opts the optional parameters
|
|
408
|
+
# @return [Array<(DeleteUsers200Response, Integer, Hash)>] DeleteUsers200Response data, response status code and response headers
|
|
409
|
+
def delete_users_with_http_info(company_id, user_id, opts = {})
|
|
410
|
+
if @api_client.config.debugging
|
|
411
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.delete_users ...'
|
|
412
|
+
end
|
|
413
|
+
# verify the required parameter 'company_id' is set
|
|
414
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
|
415
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling UsersApi.delete_users"
|
|
416
|
+
end
|
|
417
|
+
if @api_client.config.client_side_validation && company_id.to_s.length > 255
|
|
418
|
+
fail ArgumentError, 'invalid value for "company_id" when calling UsersApi.delete_users, the character length must be smaller than or equal to 255.'
|
|
419
|
+
end
|
|
420
|
+
|
|
421
|
+
if @api_client.config.client_side_validation && company_id.to_s.length < 1
|
|
422
|
+
fail ArgumentError, 'invalid value for "company_id" when calling UsersApi.delete_users, the character length must be greater than or equal to 1.'
|
|
423
|
+
end
|
|
424
|
+
|
|
425
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
426
|
+
if @api_client.config.client_side_validation && company_id !~ pattern
|
|
427
|
+
fail ArgumentError, "invalid value for 'company_id' when calling UsersApi.delete_users, must conform to the pattern #{pattern}."
|
|
428
|
+
end
|
|
429
|
+
|
|
430
|
+
# verify the required parameter 'user_id' is set
|
|
431
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
|
432
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.delete_users"
|
|
433
|
+
end
|
|
434
|
+
if @api_client.config.client_side_validation && user_id.to_s.length > 255
|
|
435
|
+
fail ArgumentError, 'invalid value for "user_id" when calling UsersApi.delete_users, the character length must be smaller than or equal to 255.'
|
|
436
|
+
end
|
|
437
|
+
|
|
438
|
+
if @api_client.config.client_side_validation && user_id.to_s.length < 1
|
|
439
|
+
fail ArgumentError, 'invalid value for "user_id" when calling UsersApi.delete_users, the character length must be greater than or equal to 1.'
|
|
440
|
+
end
|
|
441
|
+
|
|
442
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
443
|
+
if @api_client.config.client_side_validation && user_id !~ pattern
|
|
444
|
+
fail ArgumentError, "invalid value for 'user_id' when calling UsersApi.delete_users, must conform to the pattern #{pattern}."
|
|
445
|
+
end
|
|
446
|
+
|
|
447
|
+
# resource path
|
|
448
|
+
local_var_path = '/companies/{company_id}/users/{user_id}'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
|
|
449
|
+
|
|
450
|
+
# query parameters
|
|
451
|
+
query_params = opts[:query_params] || {}
|
|
452
|
+
|
|
453
|
+
# header parameters
|
|
454
|
+
header_params = opts[:header_params] || {}
|
|
455
|
+
# HTTP header 'Accept' (if needed)
|
|
456
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
457
|
+
|
|
458
|
+
# form parameters
|
|
459
|
+
form_params = opts[:form_params] || {}
|
|
460
|
+
|
|
461
|
+
# http body (model)
|
|
462
|
+
post_body = opts[:debug_body]
|
|
463
|
+
|
|
464
|
+
# return_type
|
|
465
|
+
return_type = opts[:debug_return_type] || 'DeleteUsers200Response'
|
|
466
|
+
|
|
467
|
+
# auth_names
|
|
468
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
469
|
+
|
|
470
|
+
new_options = opts.merge(
|
|
471
|
+
:operation => :"UsersApi.delete_users",
|
|
472
|
+
:header_params => header_params,
|
|
473
|
+
:query_params => query_params,
|
|
474
|
+
:form_params => form_params,
|
|
475
|
+
:body => post_body,
|
|
476
|
+
:auth_names => auth_names,
|
|
477
|
+
:return_type => return_type
|
|
478
|
+
)
|
|
479
|
+
|
|
480
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
481
|
+
if @api_client.config.debugging
|
|
482
|
+
@api_client.config.logger.debug "API called: UsersApi#delete_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
483
|
+
end
|
|
484
|
+
return data, status_code, headers
|
|
485
|
+
end
|
|
486
|
+
|
|
487
|
+
# Get single user by ID
|
|
488
|
+
# @param company_id [String] Unique identifier for the Company
|
|
489
|
+
# @param user_id [String] Unique identifier for the User
|
|
490
|
+
# @param [Hash] opts the optional parameters
|
|
491
|
+
# @return [GetUsersById200Response]
|
|
492
|
+
def get_users_by_id(company_id, user_id, opts = {})
|
|
493
|
+
data, _status_code, _headers = get_users_by_id_with_http_info(company_id, user_id, opts)
|
|
494
|
+
data
|
|
495
|
+
end
|
|
496
|
+
|
|
497
|
+
# Get single user by ID
|
|
498
|
+
# @param company_id [String] Unique identifier for the Company
|
|
499
|
+
# @param user_id [String] Unique identifier for the User
|
|
500
|
+
# @param [Hash] opts the optional parameters
|
|
501
|
+
# @return [Array<(GetUsersById200Response, Integer, Hash)>] GetUsersById200Response data, response status code and response headers
|
|
502
|
+
def get_users_by_id_with_http_info(company_id, user_id, opts = {})
|
|
503
|
+
if @api_client.config.debugging
|
|
504
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.get_users_by_id ...'
|
|
505
|
+
end
|
|
506
|
+
# verify the required parameter 'company_id' is set
|
|
507
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
|
508
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling UsersApi.get_users_by_id"
|
|
509
|
+
end
|
|
510
|
+
if @api_client.config.client_side_validation && company_id.to_s.length > 255
|
|
511
|
+
fail ArgumentError, 'invalid value for "company_id" when calling UsersApi.get_users_by_id, the character length must be smaller than or equal to 255.'
|
|
512
|
+
end
|
|
513
|
+
|
|
514
|
+
if @api_client.config.client_side_validation && company_id.to_s.length < 1
|
|
515
|
+
fail ArgumentError, 'invalid value for "company_id" when calling UsersApi.get_users_by_id, the character length must be greater than or equal to 1.'
|
|
516
|
+
end
|
|
517
|
+
|
|
518
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
519
|
+
if @api_client.config.client_side_validation && company_id !~ pattern
|
|
520
|
+
fail ArgumentError, "invalid value for 'company_id' when calling UsersApi.get_users_by_id, must conform to the pattern #{pattern}."
|
|
521
|
+
end
|
|
522
|
+
|
|
523
|
+
# verify the required parameter 'user_id' is set
|
|
524
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
|
525
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_users_by_id"
|
|
526
|
+
end
|
|
527
|
+
if @api_client.config.client_side_validation && user_id.to_s.length > 255
|
|
528
|
+
fail ArgumentError, 'invalid value for "user_id" when calling UsersApi.get_users_by_id, the character length must be smaller than or equal to 255.'
|
|
529
|
+
end
|
|
530
|
+
|
|
531
|
+
if @api_client.config.client_side_validation && user_id.to_s.length < 1
|
|
532
|
+
fail ArgumentError, 'invalid value for "user_id" when calling UsersApi.get_users_by_id, the character length must be greater than or equal to 1.'
|
|
533
|
+
end
|
|
534
|
+
|
|
535
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
536
|
+
if @api_client.config.client_side_validation && user_id !~ pattern
|
|
537
|
+
fail ArgumentError, "invalid value for 'user_id' when calling UsersApi.get_users_by_id, must conform to the pattern #{pattern}."
|
|
538
|
+
end
|
|
539
|
+
|
|
540
|
+
# resource path
|
|
541
|
+
local_var_path = '/companies/{company_id}/users/{user_id}'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
|
|
542
|
+
|
|
543
|
+
# query parameters
|
|
544
|
+
query_params = opts[:query_params] || {}
|
|
545
|
+
|
|
546
|
+
# header parameters
|
|
547
|
+
header_params = opts[:header_params] || {}
|
|
548
|
+
# HTTP header 'Accept' (if needed)
|
|
549
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
550
|
+
|
|
551
|
+
# form parameters
|
|
552
|
+
form_params = opts[:form_params] || {}
|
|
553
|
+
|
|
554
|
+
# http body (model)
|
|
555
|
+
post_body = opts[:debug_body]
|
|
556
|
+
|
|
557
|
+
# return_type
|
|
558
|
+
return_type = opts[:debug_return_type] || 'GetUsersById200Response'
|
|
559
|
+
|
|
560
|
+
# auth_names
|
|
561
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
562
|
+
|
|
563
|
+
new_options = opts.merge(
|
|
564
|
+
:operation => :"UsersApi.get_users_by_id",
|
|
565
|
+
:header_params => header_params,
|
|
566
|
+
:query_params => query_params,
|
|
567
|
+
:form_params => form_params,
|
|
568
|
+
:body => post_body,
|
|
569
|
+
:auth_names => auth_names,
|
|
570
|
+
:return_type => return_type
|
|
571
|
+
)
|
|
572
|
+
|
|
573
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
574
|
+
if @api_client.config.debugging
|
|
575
|
+
@api_client.config.logger.debug "API called: UsersApi#get_users_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
576
|
+
end
|
|
577
|
+
return data, status_code, headers
|
|
578
|
+
end
|
|
579
|
+
|
|
580
|
+
# Get a list of all users in a company
|
|
581
|
+
# @param company_id [String] Unique identifier for the Company
|
|
582
|
+
# @param [Hash] opts the optional parameters
|
|
583
|
+
# @option opts [Integer] :page Page number for pagination (default to 1)
|
|
584
|
+
# @option opts [Integer] :limit Number of items per page (default to 20)
|
|
585
|
+
# @option opts [String] :sort_by Field to sort by
|
|
586
|
+
# @option opts [String] :sort_order Sort order (ascending or descending) (default to 'desc')
|
|
587
|
+
# @option opts [String] :search Search term to filter results
|
|
588
|
+
# @return [ListUsers200Response]
|
|
589
|
+
def list_users(company_id, opts = {})
|
|
590
|
+
data, _status_code, _headers = list_users_with_http_info(company_id, opts)
|
|
591
|
+
data
|
|
592
|
+
end
|
|
593
|
+
|
|
594
|
+
# Get a list of all users in a company
|
|
595
|
+
# @param company_id [String] Unique identifier for the Company
|
|
596
|
+
# @param [Hash] opts the optional parameters
|
|
597
|
+
# @option opts [Integer] :page Page number for pagination (default to 1)
|
|
598
|
+
# @option opts [Integer] :limit Number of items per page (default to 20)
|
|
599
|
+
# @option opts [String] :sort_by Field to sort by
|
|
600
|
+
# @option opts [String] :sort_order Sort order (ascending or descending) (default to 'desc')
|
|
601
|
+
# @option opts [String] :search Search term to filter results
|
|
602
|
+
# @return [Array<(ListUsers200Response, Integer, Hash)>] ListUsers200Response data, response status code and response headers
|
|
603
|
+
def list_users_with_http_info(company_id, opts = {})
|
|
604
|
+
if @api_client.config.debugging
|
|
605
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.list_users ...'
|
|
606
|
+
end
|
|
607
|
+
# verify the required parameter 'company_id' is set
|
|
608
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
|
609
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling UsersApi.list_users"
|
|
610
|
+
end
|
|
611
|
+
if @api_client.config.client_side_validation && company_id.to_s.length > 255
|
|
612
|
+
fail ArgumentError, 'invalid value for "company_id" when calling UsersApi.list_users, the character length must be smaller than or equal to 255.'
|
|
613
|
+
end
|
|
614
|
+
|
|
615
|
+
if @api_client.config.client_side_validation && company_id.to_s.length < 1
|
|
616
|
+
fail ArgumentError, 'invalid value for "company_id" when calling UsersApi.list_users, the character length must be greater than or equal to 1.'
|
|
617
|
+
end
|
|
618
|
+
|
|
619
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
620
|
+
if @api_client.config.client_side_validation && company_id !~ pattern
|
|
621
|
+
fail ArgumentError, "invalid value for 'company_id' when calling UsersApi.list_users, must conform to the pattern #{pattern}."
|
|
622
|
+
end
|
|
623
|
+
|
|
624
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
625
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling UsersApi.list_users, must be greater than or equal to 1.'
|
|
626
|
+
end
|
|
627
|
+
|
|
628
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
629
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling UsersApi.list_users, must be smaller than or equal to 100.'
|
|
630
|
+
end
|
|
631
|
+
|
|
632
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
633
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling UsersApi.list_users, must be greater than or equal to 1.'
|
|
634
|
+
end
|
|
635
|
+
|
|
636
|
+
allowable_values = ["asc", "desc"]
|
|
637
|
+
if @api_client.config.client_side_validation && opts[:'sort_order'] && !allowable_values.include?(opts[:'sort_order'])
|
|
638
|
+
fail ArgumentError, "invalid value for \"sort_order\", must be one of #{allowable_values}"
|
|
639
|
+
end
|
|
640
|
+
if @api_client.config.client_side_validation && !opts[:'search'].nil? && opts[:'search'].to_s.length > 255
|
|
641
|
+
fail ArgumentError, 'invalid value for "opts[:"search"]" when calling UsersApi.list_users, the character length must be smaller than or equal to 255.'
|
|
642
|
+
end
|
|
643
|
+
|
|
644
|
+
if @api_client.config.client_side_validation && !opts[:'search'].nil? && opts[:'search'].to_s.length < 1
|
|
645
|
+
fail ArgumentError, 'invalid value for "opts[:"search"]" when calling UsersApi.list_users, the character length must be greater than or equal to 1.'
|
|
646
|
+
end
|
|
647
|
+
|
|
648
|
+
# resource path
|
|
649
|
+
local_var_path = '/companies/{company_id}/users'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s))
|
|
650
|
+
|
|
651
|
+
# query parameters
|
|
652
|
+
query_params = opts[:query_params] || {}
|
|
653
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
654
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
655
|
+
query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
|
|
656
|
+
query_params[:'sort_order'] = opts[:'sort_order'] if !opts[:'sort_order'].nil?
|
|
657
|
+
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
|
658
|
+
|
|
659
|
+
# header parameters
|
|
660
|
+
header_params = opts[:header_params] || {}
|
|
661
|
+
# HTTP header 'Accept' (if needed)
|
|
662
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
663
|
+
|
|
664
|
+
# form parameters
|
|
665
|
+
form_params = opts[:form_params] || {}
|
|
666
|
+
|
|
667
|
+
# http body (model)
|
|
668
|
+
post_body = opts[:debug_body]
|
|
669
|
+
|
|
670
|
+
# return_type
|
|
671
|
+
return_type = opts[:debug_return_type] || 'ListUsers200Response'
|
|
672
|
+
|
|
673
|
+
# auth_names
|
|
674
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
675
|
+
|
|
676
|
+
new_options = opts.merge(
|
|
677
|
+
:operation => :"UsersApi.list_users",
|
|
678
|
+
:header_params => header_params,
|
|
679
|
+
:query_params => query_params,
|
|
680
|
+
:form_params => form_params,
|
|
681
|
+
:body => post_body,
|
|
682
|
+
:auth_names => auth_names,
|
|
683
|
+
:return_type => return_type
|
|
684
|
+
)
|
|
685
|
+
|
|
686
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
687
|
+
if @api_client.config.debugging
|
|
688
|
+
@api_client.config.logger.debug "API called: UsersApi#list_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
689
|
+
end
|
|
690
|
+
return data, status_code, headers
|
|
691
|
+
end
|
|
692
|
+
|
|
693
|
+
# Get current authenticated user's profile.
|
|
694
|
+
# @param [Hash] opts the optional parameters
|
|
695
|
+
# @option opts [Integer] :page Page number for pagination (default to 1)
|
|
696
|
+
# @option opts [Integer] :limit Number of items per page (default to 20)
|
|
697
|
+
# @option opts [String] :sort_by Field to sort by
|
|
698
|
+
# @option opts [String] :sort_order Sort order (ascending or descending) (default to 'desc')
|
|
699
|
+
# @option opts [String] :search Search term to filter results
|
|
700
|
+
# @return [ListUsers200Response]
|
|
701
|
+
def list_users_me(opts = {})
|
|
702
|
+
data, _status_code, _headers = list_users_me_with_http_info(opts)
|
|
703
|
+
data
|
|
704
|
+
end
|
|
705
|
+
|
|
706
|
+
# Get current authenticated user's profile.
|
|
707
|
+
# @param [Hash] opts the optional parameters
|
|
708
|
+
# @option opts [Integer] :page Page number for pagination (default to 1)
|
|
709
|
+
# @option opts [Integer] :limit Number of items per page (default to 20)
|
|
710
|
+
# @option opts [String] :sort_by Field to sort by
|
|
711
|
+
# @option opts [String] :sort_order Sort order (ascending or descending) (default to 'desc')
|
|
712
|
+
# @option opts [String] :search Search term to filter results
|
|
713
|
+
# @return [Array<(ListUsers200Response, Integer, Hash)>] ListUsers200Response data, response status code and response headers
|
|
714
|
+
def list_users_me_with_http_info(opts = {})
|
|
715
|
+
if @api_client.config.debugging
|
|
716
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.list_users_me ...'
|
|
717
|
+
end
|
|
718
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
719
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling UsersApi.list_users_me, must be greater than or equal to 1.'
|
|
720
|
+
end
|
|
721
|
+
|
|
722
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
723
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling UsersApi.list_users_me, must be smaller than or equal to 100.'
|
|
724
|
+
end
|
|
725
|
+
|
|
726
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
727
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling UsersApi.list_users_me, must be greater than or equal to 1.'
|
|
728
|
+
end
|
|
729
|
+
|
|
730
|
+
allowable_values = ["asc", "desc"]
|
|
731
|
+
if @api_client.config.client_side_validation && opts[:'sort_order'] && !allowable_values.include?(opts[:'sort_order'])
|
|
732
|
+
fail ArgumentError, "invalid value for \"sort_order\", must be one of #{allowable_values}"
|
|
733
|
+
end
|
|
734
|
+
if @api_client.config.client_side_validation && !opts[:'search'].nil? && opts[:'search'].to_s.length > 255
|
|
735
|
+
fail ArgumentError, 'invalid value for "opts[:"search"]" when calling UsersApi.list_users_me, the character length must be smaller than or equal to 255.'
|
|
736
|
+
end
|
|
737
|
+
|
|
738
|
+
if @api_client.config.client_side_validation && !opts[:'search'].nil? && opts[:'search'].to_s.length < 1
|
|
739
|
+
fail ArgumentError, 'invalid value for "opts[:"search"]" when calling UsersApi.list_users_me, the character length must be greater than or equal to 1.'
|
|
740
|
+
end
|
|
741
|
+
|
|
742
|
+
# resource path
|
|
743
|
+
local_var_path = '/me'
|
|
744
|
+
|
|
745
|
+
# query parameters
|
|
746
|
+
query_params = opts[:query_params] || {}
|
|
747
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
748
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
749
|
+
query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
|
|
750
|
+
query_params[:'sort_order'] = opts[:'sort_order'] if !opts[:'sort_order'].nil?
|
|
751
|
+
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
|
752
|
+
|
|
753
|
+
# header parameters
|
|
754
|
+
header_params = opts[:header_params] || {}
|
|
755
|
+
# HTTP header 'Accept' (if needed)
|
|
756
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
757
|
+
|
|
758
|
+
# form parameters
|
|
759
|
+
form_params = opts[:form_params] || {}
|
|
760
|
+
|
|
761
|
+
# http body (model)
|
|
762
|
+
post_body = opts[:debug_body]
|
|
763
|
+
|
|
764
|
+
# return_type
|
|
765
|
+
return_type = opts[:debug_return_type] || 'ListUsers200Response'
|
|
766
|
+
|
|
767
|
+
# auth_names
|
|
768
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
769
|
+
|
|
770
|
+
new_options = opts.merge(
|
|
771
|
+
:operation => :"UsersApi.list_users_me",
|
|
772
|
+
:header_params => header_params,
|
|
773
|
+
:query_params => query_params,
|
|
774
|
+
:form_params => form_params,
|
|
775
|
+
:body => post_body,
|
|
776
|
+
:auth_names => auth_names,
|
|
777
|
+
:return_type => return_type
|
|
778
|
+
)
|
|
779
|
+
|
|
780
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
781
|
+
if @api_client.config.debugging
|
|
782
|
+
@api_client.config.logger.debug "API called: UsersApi#list_users_me\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
783
|
+
end
|
|
784
|
+
return data, status_code, headers
|
|
785
|
+
end
|
|
786
|
+
|
|
787
|
+
# Update an existing user by ID
|
|
788
|
+
# @param company_id [String] Unique identifier for the Company
|
|
789
|
+
# @param user_id [String] Unique identifier for the User
|
|
790
|
+
# @param users_update [UsersUpdate]
|
|
791
|
+
# @param [Hash] opts the optional parameters
|
|
792
|
+
# @return [UpdateUsers200Response]
|
|
793
|
+
def update_users(company_id, user_id, users_update, opts = {})
|
|
794
|
+
data, _status_code, _headers = update_users_with_http_info(company_id, user_id, users_update, opts)
|
|
795
|
+
data
|
|
796
|
+
end
|
|
797
|
+
|
|
798
|
+
# Update an existing user by ID
|
|
799
|
+
# @param company_id [String] Unique identifier for the Company
|
|
800
|
+
# @param user_id [String] Unique identifier for the User
|
|
801
|
+
# @param users_update [UsersUpdate]
|
|
802
|
+
# @param [Hash] opts the optional parameters
|
|
803
|
+
# @return [Array<(UpdateUsers200Response, Integer, Hash)>] UpdateUsers200Response data, response status code and response headers
|
|
804
|
+
def update_users_with_http_info(company_id, user_id, users_update, opts = {})
|
|
805
|
+
if @api_client.config.debugging
|
|
806
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.update_users ...'
|
|
807
|
+
end
|
|
808
|
+
# verify the required parameter 'company_id' is set
|
|
809
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
|
810
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling UsersApi.update_users"
|
|
811
|
+
end
|
|
812
|
+
if @api_client.config.client_side_validation && company_id.to_s.length > 255
|
|
813
|
+
fail ArgumentError, 'invalid value for "company_id" when calling UsersApi.update_users, the character length must be smaller than or equal to 255.'
|
|
814
|
+
end
|
|
815
|
+
|
|
816
|
+
if @api_client.config.client_side_validation && company_id.to_s.length < 1
|
|
817
|
+
fail ArgumentError, 'invalid value for "company_id" when calling UsersApi.update_users, the character length must be greater than or equal to 1.'
|
|
818
|
+
end
|
|
819
|
+
|
|
820
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
821
|
+
if @api_client.config.client_side_validation && company_id !~ pattern
|
|
822
|
+
fail ArgumentError, "invalid value for 'company_id' when calling UsersApi.update_users, must conform to the pattern #{pattern}."
|
|
823
|
+
end
|
|
824
|
+
|
|
825
|
+
# verify the required parameter 'user_id' is set
|
|
826
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
|
827
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.update_users"
|
|
828
|
+
end
|
|
829
|
+
if @api_client.config.client_side_validation && user_id.to_s.length > 255
|
|
830
|
+
fail ArgumentError, 'invalid value for "user_id" when calling UsersApi.update_users, the character length must be smaller than or equal to 255.'
|
|
831
|
+
end
|
|
832
|
+
|
|
833
|
+
if @api_client.config.client_side_validation && user_id.to_s.length < 1
|
|
834
|
+
fail ArgumentError, 'invalid value for "user_id" when calling UsersApi.update_users, the character length must be greater than or equal to 1.'
|
|
835
|
+
end
|
|
836
|
+
|
|
837
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
838
|
+
if @api_client.config.client_side_validation && user_id !~ pattern
|
|
839
|
+
fail ArgumentError, "invalid value for 'user_id' when calling UsersApi.update_users, must conform to the pattern #{pattern}."
|
|
840
|
+
end
|
|
841
|
+
|
|
842
|
+
# verify the required parameter 'users_update' is set
|
|
843
|
+
if @api_client.config.client_side_validation && users_update.nil?
|
|
844
|
+
fail ArgumentError, "Missing the required parameter 'users_update' when calling UsersApi.update_users"
|
|
845
|
+
end
|
|
846
|
+
# resource path
|
|
847
|
+
local_var_path = '/companies/{company_id}/users/{user_id}'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
|
|
848
|
+
|
|
849
|
+
# query parameters
|
|
850
|
+
query_params = opts[:query_params] || {}
|
|
851
|
+
|
|
852
|
+
# header parameters
|
|
853
|
+
header_params = opts[:header_params] || {}
|
|
854
|
+
# HTTP header 'Accept' (if needed)
|
|
855
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
856
|
+
# HTTP header 'Content-Type'
|
|
857
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
858
|
+
if !content_type.nil?
|
|
859
|
+
header_params['Content-Type'] = content_type
|
|
860
|
+
end
|
|
861
|
+
|
|
862
|
+
# form parameters
|
|
863
|
+
form_params = opts[:form_params] || {}
|
|
864
|
+
|
|
865
|
+
# http body (model)
|
|
866
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(users_update)
|
|
867
|
+
|
|
868
|
+
# return_type
|
|
869
|
+
return_type = opts[:debug_return_type] || 'UpdateUsers200Response'
|
|
870
|
+
|
|
871
|
+
# auth_names
|
|
872
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
873
|
+
|
|
874
|
+
new_options = opts.merge(
|
|
875
|
+
:operation => :"UsersApi.update_users",
|
|
876
|
+
:header_params => header_params,
|
|
877
|
+
:query_params => query_params,
|
|
878
|
+
:form_params => form_params,
|
|
879
|
+
:body => post_body,
|
|
880
|
+
:auth_names => auth_names,
|
|
881
|
+
:return_type => return_type
|
|
882
|
+
)
|
|
883
|
+
|
|
884
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
885
|
+
if @api_client.config.debugging
|
|
886
|
+
@api_client.config.logger.debug "API called: UsersApi#update_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
887
|
+
end
|
|
888
|
+
return data, status_code, headers
|
|
889
|
+
end
|
|
890
|
+
end
|
|
891
|
+
end
|