spartera_api_sdk 0.3.7 → 1.0.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +5 -3
- data/Gemfile.lock +69 -0
- data/README.md +324 -336
- data/config.json +10 -0
- data/docs/APIKeysApi.md +102 -286
- data/docs/Alert.md +36 -0
- data/docs/AlertsApi.md +163 -177
- data/docs/Apikey.md +36 -0
- data/docs/Asset.md +110 -0
- data/docs/AssetPriceHistoryApi.md +178 -202
- data/docs/Assetpricehistory.md +38 -0
- data/docs/AssetsApi.md +352 -418
- data/docs/CloudProvidersApi.md +233 -49
- data/docs/Cloudprovider.md +30 -0
- data/docs/CompaniesApi.md +171 -357
- data/docs/Company.md +44 -0
- data/docs/Connection.md +54 -0
- data/docs/ConnectionsApi.md +139 -249
- data/docs/Favorite.md +36 -0
- data/docs/FavoritesApi.md +183 -199
- data/docs/User.md +34 -0
- data/docs/UsersApi.md +97 -379
- data/example.rb +51 -0
- data/git_push.sh +2 -2
- data/lib/spartera_api_sdk/api/alerts_api.rb +176 -423
- data/lib/spartera_api_sdk/api/api_keys_api.rb +95 -496
- data/lib/spartera_api_sdk/api/asset_price_history_api.rb +177 -468
- data/lib/spartera_api_sdk/api/assets_api.rb +358 -806
- data/lib/spartera_api_sdk/api/cloud_providers_api.rb +199 -74
- data/lib/spartera_api_sdk/api/companies_api.rb +146 -660
- data/lib/spartera_api_sdk/api/connections_api.rb +139 -466
- data/lib/spartera_api_sdk/api/favorites_api.rb +204 -464
- data/lib/spartera_api_sdk/api/users_api.rb +95 -619
- data/lib/spartera_api_sdk/api_client.rb +4 -8
- data/lib/spartera_api_sdk/api_error.rb +2 -2
- data/lib/spartera_api_sdk/configuration.rb +12 -4
- data/lib/spartera_api_sdk/models/{alerts.rb → alert.rb} +139 -46
- data/lib/spartera_api_sdk/models/{api_keys.rb → apikey.rb} +124 -98
- data/lib/spartera_api_sdk/models/asset.rb +686 -0
- data/lib/spartera_api_sdk/models/{asset_price_history.rb → assetpricehistory.rb} +180 -44
- data/lib/spartera_api_sdk/models/{cloud_providers.rb → cloudprovider.rb} +111 -35
- data/lib/spartera_api_sdk/models/{companies.rb → company.rb} +105 -90
- data/lib/spartera_api_sdk/models/{connections.rb → connection.rb} +186 -69
- data/lib/spartera_api_sdk/models/error.rb +76 -3
- data/lib/spartera_api_sdk/models/{favorites.rb → favorite.rb} +111 -38
- data/lib/spartera_api_sdk/models/inline_object.rb +76 -3
- data/lib/spartera_api_sdk/models/inline_object1.rb +76 -3
- data/lib/spartera_api_sdk/models/inline_object2.rb +76 -3
- data/lib/spartera_api_sdk/models/inline_object3.rb +76 -3
- data/lib/spartera_api_sdk/models/{users.rb → user.rb} +108 -112
- data/lib/spartera_api_sdk/version.rb +3 -3
- data/lib/spartera_api_sdk.rb +11 -150
- data/spartera_api_sdk.gemspec +8 -19
- data/spec/api/alerts_api_spec.rb +51 -51
- data/spec/api/api_keys_api_spec.rb +30 -67
- data/spec/api/asset_price_history_api_spec.rb +53 -57
- data/spec/api/assets_api_spec.rb +99 -114
- data/spec/api/cloud_providers_api_spec.rb +42 -15
- data/spec/api/companies_api_spec.rb +47 -99
- data/spec/api/connections_api_spec.rb +41 -63
- data/spec/api/favorites_api_spec.rb +56 -56
- data/spec/api/users_api_spec.rb +29 -88
- data/spec/models/{postgen_integrations_spec.rb → alert_spec.rb} +17 -17
- data/spec/models/{api_keys_update_spec.rb → apikey_spec.rb} +20 -14
- data/spec/models/{endpoints_spec.rb → asset_spec.rb} +83 -69
- data/spec/models/{api_keys_spec.rb → assetpricehistory_spec.rb} +19 -25
- data/spec/models/{cloud_providers_spec.rb → cloudprovider_spec.rb} +20 -14
- data/spec/models/{companies_spec.rb → company_spec.rb} +16 -26
- data/spec/models/{posts_input_spec.rb → connection_spec.rb} +27 -51
- data/spec/models/error_spec.rb +3 -3
- data/spec/models/{favorites_spec.rb → favorite_spec.rb} +23 -17
- data/spec/models/inline_object1_spec.rb +3 -3
- data/spec/models/inline_object2_spec.rb +3 -3
- data/spec/models/inline_object3_spec.rb +3 -3
- data/spec/models/inline_object_spec.rb +3 -3
- data/spec/models/{api_keys_input_spec.rb → user_spec.rb} +15 -15
- data/spec/spec_helper.rb +2 -2
- data/test.sh +42 -0
- metadata +77 -615
- data/CHANGELOG.md +0 -13
- data/docs/Alerts.md +0 -30
- data/docs/AlertsInput.md +0 -24
- data/docs/AlertsUpdate.md +0 -24
- data/docs/ApiKeys.md +0 -40
- data/docs/ApiKeysInput.md +0 -34
- data/docs/ApiKeysUpdate.md +0 -34
- data/docs/AssetPriceHistory.md +0 -30
- data/docs/AssetPriceHistoryInput.md +0 -24
- data/docs/AssetPriceHistoryUpdate.md +0 -24
- data/docs/AssetUsecases.md +0 -28
- data/docs/AssetUsecasesApi.md +0 -157
- data/docs/Assets.md +0 -142
- data/docs/AssetsInput.md +0 -128
- data/docs/AssetsUpdate.md +0 -128
- data/docs/CloudProviders.md +0 -28
- data/docs/CloudProvidersInput.md +0 -22
- data/docs/CloudProvidersUpdate.md +0 -22
- data/docs/Companies.md +0 -46
- data/docs/CompaniesInput.md +0 -40
- data/docs/CompaniesUpdate.md +0 -40
- data/docs/Connections.md +0 -38
- data/docs/ConnectionsInput.md +0 -32
- data/docs/ConnectionsUpdate.md +0 -32
- data/docs/CreateAlerts200Response.md +0 -20
- data/docs/CreateAlerts200ResponseData.md +0 -18
- data/docs/CreateApiKeys200Response.md +0 -20
- data/docs/CreateApiKeys200ResponseData.md +0 -18
- data/docs/CreateAssetPriceHistory200Response.md +0 -20
- data/docs/CreateAssetPriceHistory200ResponseData.md +0 -18
- data/docs/CreateAssetsAnalyze200Response.md +0 -20
- data/docs/CreateAssetsAnalyze200ResponseData.md +0 -18
- data/docs/CreateConnections200Response.md +0 -20
- data/docs/CreateConnections200ResponseData.md +0 -18
- data/docs/CreateEndpoints200Response.md +0 -20
- data/docs/CreateEndpoints200ResponseData.md +0 -18
- data/docs/CreateFavorites200Response.md +0 -20
- data/docs/CreateFavorites200ResponseData.md +0 -18
- data/docs/CreatePostgenIntegrations200Response.md +0 -20
- data/docs/CreatePostgenIntegrations200ResponseData.md +0 -18
- data/docs/CreatePosts200Response.md +0 -20
- data/docs/CreatePosts200ResponseData.md +0 -18
- data/docs/CreateUsers200Response.md +0 -20
- data/docs/CreateUsers200ResponseData.md +0 -18
- data/docs/DeleteAlerts200Response.md +0 -20
- data/docs/DeleteAlerts200ResponseData.md +0 -18
- data/docs/DeleteApiKeys200Response.md +0 -20
- data/docs/DeleteApiKeys200ResponseData.md +0 -18
- data/docs/DeleteAssetPriceHistory200Response.md +0 -20
- data/docs/DeleteAssetPriceHistory200ResponseData.md +0 -18
- data/docs/DeleteAssets200Response.md +0 -20
- data/docs/DeleteAssets200ResponseData.md +0 -18
- data/docs/DeleteConnections200Response.md +0 -20
- data/docs/DeleteConnections200ResponseData.md +0 -18
- data/docs/DeleteEndpoints200Response.md +0 -20
- data/docs/DeleteEndpoints200ResponseData.md +0 -18
- data/docs/DeleteFavorites200Response.md +0 -20
- data/docs/DeleteFavorites200ResponseData.md +0 -18
- data/docs/DeletePostgenIntegrations200Response.md +0 -20
- data/docs/DeletePostgenIntegrations200ResponseData.md +0 -18
- data/docs/DeletePosts200Response.md +0 -20
- data/docs/DeletePosts200ResponseData.md +0 -18
- data/docs/DeleteUsers200Response.md +0 -20
- data/docs/DeleteUsers200ResponseData.md +0 -18
- data/docs/Endpoints.md +0 -96
- data/docs/EndpointsApi.md +0 -1189
- data/docs/EndpointsInput.md +0 -94
- data/docs/EndpointsUpdate.md +0 -94
- data/docs/Favorites.md +0 -34
- data/docs/FavoritesInput.md +0 -28
- data/docs/FavoritesUpdate.md +0 -28
- data/docs/GetAlertsById200Response.md +0 -20
- data/docs/GetApiKeysById200Response.md +0 -20
- data/docs/GetAssetPriceHistoryById200Response.md +0 -20
- data/docs/GetAssetUsecasesById200Response.md +0 -20
- data/docs/GetAssetsByIdAnalyze200Response.md +0 -20
- data/docs/GetCloudProvidersById200Response.md +0 -20
- data/docs/GetCompaniesById200Response.md +0 -20
- data/docs/GetConnectionsById200Response.md +0 -20
- data/docs/GetEndpointsByIdConnectionsDescribe200Response.md +0 -20
- data/docs/GetFavoritesById200Response.md +0 -20
- data/docs/GetIndustriesById200Response.md +0 -20
- data/docs/GetJobFunctionsById200Response.md +0 -20
- data/docs/GetPostgenIntegrationsById200Response.md +0 -20
- data/docs/GetPostsById200Response.md +0 -20
- data/docs/GetStorageEnginesById200Response.md +0 -20
- data/docs/GetUsersById200Response.md +0 -20
- data/docs/Industries.md +0 -32
- data/docs/IndustriesApi.md +0 -237
- data/docs/InlineObject4.md +0 -20
- data/docs/InlineObject5.md +0 -20
- data/docs/InlineObject6.md +0 -22
- data/docs/InlineObject7.md +0 -20
- data/docs/JobFunctions.md +0 -24
- data/docs/JobFunctionsApi.md +0 -157
- data/docs/JobFunctionsInput.md +0 -18
- data/docs/JobFunctionsUpdate.md +0 -18
- data/docs/ListApiKeys200Response.md +0 -20
- data/docs/ListAssetUsecases200Response.md +0 -20
- data/docs/ListAssets200Response.md +0 -20
- data/docs/ListCloudProviders200Response.md +0 -20
- data/docs/ListCompaniesAnalyticsAssets200Response.md +0 -20
- data/docs/ListConnections200Response.md +0 -20
- data/docs/ListEndpoints200Response.md +0 -20
- data/docs/ListIndustries200Response.md +0 -20
- data/docs/ListJobFunctions200Response.md +0 -20
- data/docs/ListPostgenIntegrations200Response.md +0 -20
- data/docs/ListPosts200Response.md +0 -20
- data/docs/ListStorageEngines200Response.md +0 -20
- data/docs/ListUsers200Response.md +0 -20
- data/docs/PostPublications.md +0 -40
- data/docs/PostPublicationsInput.md +0 -34
- data/docs/PostPublicationsUpdate.md +0 -34
- data/docs/PostgenIntegrations.md +0 -36
- data/docs/PostgenIntegrationsApi.md +0 -463
- data/docs/PostgenIntegrationsInput.md +0 -30
- data/docs/PostgenIntegrationsUpdate.md +0 -30
- data/docs/Posts.md +0 -68
- data/docs/PostsApi.md +0 -843
- data/docs/PostsInput.md +0 -62
- data/docs/PostsUpdate.md +0 -62
- data/docs/StorageEngines.md +0 -32
- data/docs/StorageEnginesApi.md +0 -161
- data/docs/UpdateAlerts200Response.md +0 -20
- data/docs/UpdateAlerts200ResponseData.md +0 -18
- data/docs/UpdateApiKeys200Response.md +0 -20
- data/docs/UpdateApiKeys200ResponseData.md +0 -18
- data/docs/UpdateAssetPriceHistory200Response.md +0 -20
- data/docs/UpdateAssetPriceHistory200ResponseData.md +0 -18
- data/docs/UpdateAssets200Response.md +0 -20
- data/docs/UpdateAssets200ResponseData.md +0 -18
- data/docs/UpdateCompanies200Response.md +0 -20
- data/docs/UpdateCompanies200ResponseData.md +0 -18
- data/docs/UpdateConnections200Response.md +0 -20
- data/docs/UpdateConnections200ResponseData.md +0 -18
- data/docs/UpdateEndpoints200Response.md +0 -20
- data/docs/UpdateEndpoints200ResponseData.md +0 -18
- data/docs/UpdateFavorites200Response.md +0 -20
- data/docs/UpdateFavorites200ResponseData.md +0 -18
- data/docs/UpdatePostgenIntegrations200Response.md +0 -20
- data/docs/UpdatePostgenIntegrations200ResponseData.md +0 -18
- data/docs/UpdatePosts200Response.md +0 -20
- data/docs/UpdatePosts200ResponseData.md +0 -18
- data/docs/UpdateUsers200Response.md +0 -20
- data/docs/UpdateUsers200ResponseData.md +0 -18
- data/docs/Users.md +0 -36
- data/docs/UsersInput.md +0 -30
- data/docs/UsersUpdate.md +0 -30
- data/lib/spartera_api_sdk/api/asset_usecases_api.rb +0 -190
- data/lib/spartera_api_sdk/api/endpoints_api.rb +0 -1613
- data/lib/spartera_api_sdk/api/industries_api.rb +0 -284
- data/lib/spartera_api_sdk/api/job_functions_api.rb +0 -190
- data/lib/spartera_api_sdk/api/postgen_integrations_api.rb +0 -634
- data/lib/spartera_api_sdk/api/posts_api.rb +0 -1190
- data/lib/spartera_api_sdk/api/storage_engines_api.rb +0 -228
- data/lib/spartera_api_sdk/api_model_base.rb +0 -88
- data/lib/spartera_api_sdk/models/alerts_input.rb +0 -213
- data/lib/spartera_api_sdk/models/alerts_update.rb +0 -179
- data/lib/spartera_api_sdk/models/api_keys_input.rb +0 -263
- data/lib/spartera_api_sdk/models/api_keys_update.rb +0 -229
- data/lib/spartera_api_sdk/models/asset_price_history_input.rb +0 -179
- data/lib/spartera_api_sdk/models/asset_price_history_update.rb +0 -179
- data/lib/spartera_api_sdk/models/asset_usecases.rb +0 -216
- data/lib/spartera_api_sdk/models/assets.rb +0 -1068
- data/lib/spartera_api_sdk/models/assets_input.rb +0 -918
- data/lib/spartera_api_sdk/models/assets_update.rb +0 -877
- data/lib/spartera_api_sdk/models/cloud_providers_input.rb +0 -186
- data/lib/spartera_api_sdk/models/cloud_providers_update.rb +0 -169
- data/lib/spartera_api_sdk/models/companies_input.rb +0 -327
- data/lib/spartera_api_sdk/models/companies_update.rb +0 -293
- data/lib/spartera_api_sdk/models/connections_input.rb +0 -287
- data/lib/spartera_api_sdk/models/connections_update.rb +0 -253
- data/lib/spartera_api_sdk/models/create_alerts200_response.rb +0 -191
- data/lib/spartera_api_sdk/models/create_alerts200_response_data.rb +0 -165
- data/lib/spartera_api_sdk/models/create_api_keys200_response.rb +0 -191
- data/lib/spartera_api_sdk/models/create_api_keys200_response_data.rb +0 -165
- data/lib/spartera_api_sdk/models/create_asset_price_history200_response.rb +0 -191
- data/lib/spartera_api_sdk/models/create_asset_price_history200_response_data.rb +0 -165
- data/lib/spartera_api_sdk/models/create_assets_analyze200_response.rb +0 -191
- data/lib/spartera_api_sdk/models/create_assets_analyze200_response_data.rb +0 -165
- data/lib/spartera_api_sdk/models/create_connections200_response.rb +0 -191
- data/lib/spartera_api_sdk/models/create_connections200_response_data.rb +0 -165
- data/lib/spartera_api_sdk/models/create_endpoints200_response.rb +0 -191
- data/lib/spartera_api_sdk/models/create_endpoints200_response_data.rb +0 -165
- data/lib/spartera_api_sdk/models/create_favorites200_response.rb +0 -191
- data/lib/spartera_api_sdk/models/create_favorites200_response_data.rb +0 -165
- data/lib/spartera_api_sdk/models/create_postgen_integrations200_response.rb +0 -191
- data/lib/spartera_api_sdk/models/create_postgen_integrations200_response_data.rb +0 -165
- data/lib/spartera_api_sdk/models/create_posts200_response.rb +0 -191
- data/lib/spartera_api_sdk/models/create_posts200_response_data.rb +0 -165
- data/lib/spartera_api_sdk/models/create_users200_response.rb +0 -191
- data/lib/spartera_api_sdk/models/create_users200_response_data.rb +0 -165
- data/lib/spartera_api_sdk/models/delete_alerts200_response.rb +0 -191
- data/lib/spartera_api_sdk/models/delete_alerts200_response_data.rb +0 -165
- data/lib/spartera_api_sdk/models/delete_api_keys200_response.rb +0 -191
- data/lib/spartera_api_sdk/models/delete_api_keys200_response_data.rb +0 -165
- data/lib/spartera_api_sdk/models/delete_asset_price_history200_response.rb +0 -191
- data/lib/spartera_api_sdk/models/delete_asset_price_history200_response_data.rb +0 -165
- data/lib/spartera_api_sdk/models/delete_assets200_response.rb +0 -191
- data/lib/spartera_api_sdk/models/delete_assets200_response_data.rb +0 -165
- data/lib/spartera_api_sdk/models/delete_connections200_response.rb +0 -191
- data/lib/spartera_api_sdk/models/delete_connections200_response_data.rb +0 -165
- data/lib/spartera_api_sdk/models/delete_endpoints200_response.rb +0 -191
- data/lib/spartera_api_sdk/models/delete_endpoints200_response_data.rb +0 -165
- data/lib/spartera_api_sdk/models/delete_favorites200_response.rb +0 -191
- data/lib/spartera_api_sdk/models/delete_favorites200_response_data.rb +0 -165
- data/lib/spartera_api_sdk/models/delete_postgen_integrations200_response.rb +0 -191
- data/lib/spartera_api_sdk/models/delete_postgen_integrations200_response_data.rb +0 -165
- data/lib/spartera_api_sdk/models/delete_posts200_response.rb +0 -191
- data/lib/spartera_api_sdk/models/delete_posts200_response_data.rb +0 -165
- data/lib/spartera_api_sdk/models/delete_users200_response.rb +0 -191
- data/lib/spartera_api_sdk/models/delete_users200_response_data.rb +0 -165
- data/lib/spartera_api_sdk/models/endpoints.rb +0 -788
- data/lib/spartera_api_sdk/models/endpoints_input.rb +0 -686
- data/lib/spartera_api_sdk/models/endpoints_update.rb +0 -635
- data/lib/spartera_api_sdk/models/favorites_input.rb +0 -233
- data/lib/spartera_api_sdk/models/favorites_update.rb +0 -199
- data/lib/spartera_api_sdk/models/get_alerts_by_id200_response.rb +0 -191
- data/lib/spartera_api_sdk/models/get_api_keys_by_id200_response.rb +0 -191
- data/lib/spartera_api_sdk/models/get_asset_price_history_by_id200_response.rb +0 -191
- data/lib/spartera_api_sdk/models/get_asset_usecases_by_id200_response.rb +0 -191
- data/lib/spartera_api_sdk/models/get_assets_by_id_analyze200_response.rb +0 -191
- data/lib/spartera_api_sdk/models/get_cloud_providers_by_id200_response.rb +0 -191
- data/lib/spartera_api_sdk/models/get_companies_by_id200_response.rb +0 -191
- data/lib/spartera_api_sdk/models/get_connections_by_id200_response.rb +0 -191
- data/lib/spartera_api_sdk/models/get_endpoints_by_id_connections_describe200_response.rb +0 -191
- data/lib/spartera_api_sdk/models/get_favorites_by_id200_response.rb +0 -191
- data/lib/spartera_api_sdk/models/get_industries_by_id200_response.rb +0 -191
- data/lib/spartera_api_sdk/models/get_job_functions_by_id200_response.rb +0 -191
- data/lib/spartera_api_sdk/models/get_postgen_integrations_by_id200_response.rb +0 -191
- data/lib/spartera_api_sdk/models/get_posts_by_id200_response.rb +0 -191
- data/lib/spartera_api_sdk/models/get_storage_engines_by_id200_response.rb +0 -191
- data/lib/spartera_api_sdk/models/get_users_by_id200_response.rb +0 -191
- data/lib/spartera_api_sdk/models/industries.rb +0 -253
- data/lib/spartera_api_sdk/models/inline_object4.rb +0 -156
- data/lib/spartera_api_sdk/models/inline_object5.rb +0 -156
- data/lib/spartera_api_sdk/models/inline_object6.rb +0 -166
- data/lib/spartera_api_sdk/models/inline_object7.rb +0 -156
- data/lib/spartera_api_sdk/models/job_functions.rb +0 -213
- data/lib/spartera_api_sdk/models/job_functions_input.rb +0 -166
- data/lib/spartera_api_sdk/models/job_functions_update.rb +0 -149
- data/lib/spartera_api_sdk/models/list_api_keys200_response.rb +0 -193
- data/lib/spartera_api_sdk/models/list_asset_usecases200_response.rb +0 -193
- data/lib/spartera_api_sdk/models/list_assets200_response.rb +0 -193
- data/lib/spartera_api_sdk/models/list_cloud_providers200_response.rb +0 -193
- data/lib/spartera_api_sdk/models/list_companies_analytics_assets200_response.rb +0 -193
- data/lib/spartera_api_sdk/models/list_connections200_response.rb +0 -193
- data/lib/spartera_api_sdk/models/list_endpoints200_response.rb +0 -193
- data/lib/spartera_api_sdk/models/list_industries200_response.rb +0 -193
- data/lib/spartera_api_sdk/models/list_job_functions200_response.rb +0 -193
- data/lib/spartera_api_sdk/models/list_postgen_integrations200_response.rb +0 -193
- data/lib/spartera_api_sdk/models/list_posts200_response.rb +0 -193
- data/lib/spartera_api_sdk/models/list_storage_engines200_response.rb +0 -193
- data/lib/spartera_api_sdk/models/list_users200_response.rb +0 -193
- data/lib/spartera_api_sdk/models/post_publications.rb +0 -327
- data/lib/spartera_api_sdk/models/post_publications_input.rb +0 -280
- data/lib/spartera_api_sdk/models/post_publications_update.rb +0 -229
- data/lib/spartera_api_sdk/models/postgen_integrations.rb +0 -341
- data/lib/spartera_api_sdk/models/postgen_integrations_input.rb +0 -294
- data/lib/spartera_api_sdk/models/postgen_integrations_update.rb +0 -209
- data/lib/spartera_api_sdk/models/posts.rb +0 -586
- data/lib/spartera_api_sdk/models/posts_input.rb +0 -437
- data/lib/spartera_api_sdk/models/posts_update.rb +0 -369
- data/lib/spartera_api_sdk/models/storage_engines.rb +0 -294
- data/lib/spartera_api_sdk/models/update_alerts200_response.rb +0 -191
- data/lib/spartera_api_sdk/models/update_alerts200_response_data.rb +0 -165
- data/lib/spartera_api_sdk/models/update_api_keys200_response.rb +0 -191
- data/lib/spartera_api_sdk/models/update_api_keys200_response_data.rb +0 -165
- data/lib/spartera_api_sdk/models/update_asset_price_history200_response.rb +0 -191
- data/lib/spartera_api_sdk/models/update_asset_price_history200_response_data.rb +0 -165
- data/lib/spartera_api_sdk/models/update_assets200_response.rb +0 -191
- data/lib/spartera_api_sdk/models/update_assets200_response_data.rb +0 -165
- data/lib/spartera_api_sdk/models/update_companies200_response.rb +0 -191
- data/lib/spartera_api_sdk/models/update_companies200_response_data.rb +0 -165
- data/lib/spartera_api_sdk/models/update_connections200_response.rb +0 -191
- data/lib/spartera_api_sdk/models/update_connections200_response_data.rb +0 -165
- data/lib/spartera_api_sdk/models/update_endpoints200_response.rb +0 -191
- data/lib/spartera_api_sdk/models/update_endpoints200_response_data.rb +0 -165
- data/lib/spartera_api_sdk/models/update_favorites200_response.rb +0 -191
- data/lib/spartera_api_sdk/models/update_favorites200_response_data.rb +0 -165
- data/lib/spartera_api_sdk/models/update_postgen_integrations200_response.rb +0 -191
- data/lib/spartera_api_sdk/models/update_postgen_integrations200_response_data.rb +0 -165
- data/lib/spartera_api_sdk/models/update_posts200_response.rb +0 -191
- data/lib/spartera_api_sdk/models/update_posts200_response_data.rb +0 -165
- data/lib/spartera_api_sdk/models/update_users200_response.rb +0 -191
- data/lib/spartera_api_sdk/models/update_users200_response_data.rb +0 -165
- data/lib/spartera_api_sdk/models/users_input.rb +0 -260
- data/lib/spartera_api_sdk/models/users_update.rb +0 -243
- data/spec/api/asset_usecases_api_spec.rb +0 -61
- data/spec/api/endpoints_api_spec.rb +0 -240
- data/spec/api/industries_api_spec.rb +0 -76
- data/spec/api/job_functions_api_spec.rb +0 -61
- data/spec/api/postgen_integrations_api_spec.rb +0 -117
- data/spec/api/posts_api_spec.rb +0 -186
- data/spec/api/storage_engines_api_spec.rb +0 -63
- data/spec/models/alerts_input_spec.rb +0 -54
- data/spec/models/alerts_spec.rb +0 -72
- data/spec/models/alerts_update_spec.rb +0 -54
- data/spec/models/asset_price_history_input_spec.rb +0 -54
- data/spec/models/asset_price_history_spec.rb +0 -72
- data/spec/models/asset_price_history_update_spec.rb +0 -54
- data/spec/models/asset_usecases_spec.rb +0 -66
- data/spec/models/assets_input_spec.rb +0 -418
- data/spec/models/assets_spec.rb +0 -464
- data/spec/models/assets_update_spec.rb +0 -418
- data/spec/models/cloud_providers_input_spec.rb +0 -48
- data/spec/models/cloud_providers_update_spec.rb +0 -48
- data/spec/models/companies_input_spec.rb +0 -106
- data/spec/models/companies_update_spec.rb +0 -106
- data/spec/models/connections_input_spec.rb +0 -82
- data/spec/models/connections_spec.rb +0 -100
- data/spec/models/connections_update_spec.rb +0 -82
- data/spec/models/create_alerts200_response_data_spec.rb +0 -36
- data/spec/models/create_alerts200_response_spec.rb +0 -42
- data/spec/models/create_api_keys200_response_data_spec.rb +0 -36
- data/spec/models/create_api_keys200_response_spec.rb +0 -42
- data/spec/models/create_asset_price_history200_response_data_spec.rb +0 -36
- data/spec/models/create_asset_price_history200_response_spec.rb +0 -42
- data/spec/models/create_assets_analyze200_response_data_spec.rb +0 -36
- data/spec/models/create_assets_analyze200_response_spec.rb +0 -42
- data/spec/models/create_connections200_response_data_spec.rb +0 -36
- data/spec/models/create_connections200_response_spec.rb +0 -42
- data/spec/models/create_endpoints200_response_data_spec.rb +0 -36
- data/spec/models/create_endpoints200_response_spec.rb +0 -42
- data/spec/models/create_favorites200_response_data_spec.rb +0 -36
- data/spec/models/create_favorites200_response_spec.rb +0 -42
- data/spec/models/create_postgen_integrations200_response_data_spec.rb +0 -36
- data/spec/models/create_postgen_integrations200_response_spec.rb +0 -42
- data/spec/models/create_posts200_response_data_spec.rb +0 -36
- data/spec/models/create_posts200_response_spec.rb +0 -42
- data/spec/models/create_users200_response_data_spec.rb +0 -36
- data/spec/models/create_users200_response_spec.rb +0 -42
- data/spec/models/delete_alerts200_response_data_spec.rb +0 -36
- data/spec/models/delete_alerts200_response_spec.rb +0 -42
- data/spec/models/delete_api_keys200_response_data_spec.rb +0 -36
- data/spec/models/delete_api_keys200_response_spec.rb +0 -42
- data/spec/models/delete_asset_price_history200_response_data_spec.rb +0 -36
- data/spec/models/delete_asset_price_history200_response_spec.rb +0 -42
- data/spec/models/delete_assets200_response_data_spec.rb +0 -36
- data/spec/models/delete_assets200_response_spec.rb +0 -42
- data/spec/models/delete_connections200_response_data_spec.rb +0 -36
- data/spec/models/delete_connections200_response_spec.rb +0 -42
- data/spec/models/delete_endpoints200_response_data_spec.rb +0 -36
- data/spec/models/delete_endpoints200_response_spec.rb +0 -42
- data/spec/models/delete_favorites200_response_data_spec.rb +0 -36
- data/spec/models/delete_favorites200_response_spec.rb +0 -42
- data/spec/models/delete_postgen_integrations200_response_data_spec.rb +0 -36
- data/spec/models/delete_postgen_integrations200_response_spec.rb +0 -42
- data/spec/models/delete_posts200_response_data_spec.rb +0 -36
- data/spec/models/delete_posts200_response_spec.rb +0 -42
- data/spec/models/delete_users200_response_data_spec.rb +0 -36
- data/spec/models/delete_users200_response_spec.rb +0 -42
- data/spec/models/endpoints_input_spec.rb +0 -292
- data/spec/models/endpoints_update_spec.rb +0 -292
- data/spec/models/favorites_input_spec.rb +0 -66
- data/spec/models/favorites_update_spec.rb +0 -66
- data/spec/models/get_alerts_by_id200_response_spec.rb +0 -42
- data/spec/models/get_api_keys_by_id200_response_spec.rb +0 -42
- data/spec/models/get_asset_price_history_by_id200_response_spec.rb +0 -42
- data/spec/models/get_asset_usecases_by_id200_response_spec.rb +0 -42
- data/spec/models/get_assets_by_id_analyze200_response_spec.rb +0 -42
- data/spec/models/get_cloud_providers_by_id200_response_spec.rb +0 -42
- data/spec/models/get_companies_by_id200_response_spec.rb +0 -42
- data/spec/models/get_connections_by_id200_response_spec.rb +0 -42
- data/spec/models/get_endpoints_by_id_connections_describe200_response_spec.rb +0 -42
- data/spec/models/get_favorites_by_id200_response_spec.rb +0 -42
- data/spec/models/get_industries_by_id200_response_spec.rb +0 -42
- data/spec/models/get_job_functions_by_id200_response_spec.rb +0 -42
- data/spec/models/get_postgen_integrations_by_id200_response_spec.rb +0 -42
- data/spec/models/get_posts_by_id200_response_spec.rb +0 -42
- data/spec/models/get_storage_engines_by_id200_response_spec.rb +0 -42
- data/spec/models/get_users_by_id200_response_spec.rb +0 -42
- data/spec/models/industries_spec.rb +0 -78
- data/spec/models/inline_object4_spec.rb +0 -42
- data/spec/models/inline_object5_spec.rb +0 -42
- data/spec/models/inline_object6_spec.rb +0 -48
- data/spec/models/inline_object7_spec.rb +0 -42
- data/spec/models/job_functions_input_spec.rb +0 -36
- data/spec/models/job_functions_spec.rb +0 -54
- data/spec/models/job_functions_update_spec.rb +0 -36
- data/spec/models/list_api_keys200_response_spec.rb +0 -42
- data/spec/models/list_asset_usecases200_response_spec.rb +0 -42
- data/spec/models/list_assets200_response_spec.rb +0 -42
- data/spec/models/list_cloud_providers200_response_spec.rb +0 -42
- data/spec/models/list_companies_analytics_assets200_response_spec.rb +0 -42
- data/spec/models/list_connections200_response_spec.rb +0 -42
- data/spec/models/list_endpoints200_response_spec.rb +0 -42
- data/spec/models/list_industries200_response_spec.rb +0 -42
- data/spec/models/list_job_functions200_response_spec.rb +0 -42
- data/spec/models/list_postgen_integrations200_response_spec.rb +0 -42
- data/spec/models/list_posts200_response_spec.rb +0 -42
- data/spec/models/list_storage_engines200_response_spec.rb +0 -42
- data/spec/models/list_users200_response_spec.rb +0 -42
- data/spec/models/post_publications_input_spec.rb +0 -84
- data/spec/models/post_publications_spec.rb +0 -102
- data/spec/models/post_publications_update_spec.rb +0 -84
- data/spec/models/postgen_integrations_input_spec.rb +0 -72
- data/spec/models/postgen_integrations_update_spec.rb +0 -72
- data/spec/models/posts_spec.rb +0 -186
- data/spec/models/posts_update_spec.rb +0 -168
- data/spec/models/storage_engines_spec.rb +0 -82
- data/spec/models/update_alerts200_response_data_spec.rb +0 -36
- data/spec/models/update_alerts200_response_spec.rb +0 -42
- data/spec/models/update_api_keys200_response_data_spec.rb +0 -36
- data/spec/models/update_api_keys200_response_spec.rb +0 -42
- data/spec/models/update_asset_price_history200_response_data_spec.rb +0 -36
- data/spec/models/update_asset_price_history200_response_spec.rb +0 -42
- data/spec/models/update_assets200_response_data_spec.rb +0 -36
- data/spec/models/update_assets200_response_spec.rb +0 -42
- data/spec/models/update_companies200_response_data_spec.rb +0 -36
- data/spec/models/update_companies200_response_spec.rb +0 -42
- data/spec/models/update_connections200_response_data_spec.rb +0 -36
- data/spec/models/update_connections200_response_spec.rb +0 -42
- data/spec/models/update_endpoints200_response_data_spec.rb +0 -36
- data/spec/models/update_endpoints200_response_spec.rb +0 -42
- data/spec/models/update_favorites200_response_data_spec.rb +0 -36
- data/spec/models/update_favorites200_response_spec.rb +0 -42
- data/spec/models/update_postgen_integrations200_response_data_spec.rb +0 -36
- data/spec/models/update_postgen_integrations200_response_spec.rb +0 -42
- data/spec/models/update_posts200_response_data_spec.rb +0 -36
- data/spec/models/update_posts200_response_spec.rb +0 -42
- data/spec/models/update_users200_response_data_spec.rb +0 -36
- data/spec/models/update_users200_response_spec.rb +0 -42
- data/spec/models/users_input_spec.rb +0 -76
- data/spec/models/users_spec.rb +0 -94
- data/spec/models/users_update_spec.rb +0 -76
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
#Auto-generated API documentation for REST services of the Spartera platform
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 0.0.0
|
|
7
7
|
Contact: support@spartera.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.13.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -19,239 +19,52 @@ module SparteraApiSdk
|
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
|
-
#
|
|
23
|
-
# @param company_id [String]
|
|
24
|
-
# @param users_input [UsersInput]
|
|
22
|
+
# Get a list of all users for a particular company
|
|
23
|
+
# @param company_id [String]
|
|
25
24
|
# @param [Hash] opts the optional parameters
|
|
26
|
-
# @
|
|
27
|
-
|
|
28
|
-
|
|
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)
|
|
25
|
+
# @return [Object]
|
|
26
|
+
def companies_company_id_users_get(company_id, opts = {})
|
|
27
|
+
data, _status_code, _headers = companies_company_id_users_get_with_http_info(company_id, opts)
|
|
34
28
|
data
|
|
35
29
|
end
|
|
36
30
|
|
|
37
|
-
#
|
|
38
|
-
# @param company_id [String]
|
|
39
|
-
# @param users_input [UsersInput]
|
|
31
|
+
# Get a list of all users for a particular company
|
|
32
|
+
# @param company_id [String]
|
|
40
33
|
# @param [Hash] opts the optional parameters
|
|
41
|
-
# @
|
|
42
|
-
|
|
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 = {})
|
|
34
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
35
|
+
def companies_company_id_users_get_with_http_info(company_id, opts = {})
|
|
48
36
|
if @api_client.config.debugging
|
|
49
|
-
@api_client.config.logger.debug 'Calling API: UsersApi.
|
|
37
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.companies_company_id_users_get ...'
|
|
50
38
|
end
|
|
51
39
|
# verify the required parameter 'company_id' is set
|
|
52
40
|
if @api_client.config.client_side_validation && company_id.nil?
|
|
53
|
-
fail ArgumentError, "Missing the required parameter 'company_id' when calling UsersApi.
|
|
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.'
|
|
41
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling UsersApi.companies_company_id_users_get"
|
|
90
42
|
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
43
|
# resource path
|
|
97
44
|
local_var_path = '/companies/{company_id}/users'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s))
|
|
98
45
|
|
|
99
46
|
# query parameters
|
|
100
47
|
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
48
|
|
|
231
49
|
# header parameters
|
|
232
50
|
header_params = opts[:header_params] || {}
|
|
233
51
|
# HTTP header 'Accept' (if needed)
|
|
234
52
|
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
53
|
|
|
241
54
|
# form parameters
|
|
242
55
|
form_params = opts[:form_params] || {}
|
|
243
56
|
|
|
244
57
|
# http body (model)
|
|
245
|
-
post_body = opts[:debug_body]
|
|
58
|
+
post_body = opts[:debug_body]
|
|
246
59
|
|
|
247
60
|
# return_type
|
|
248
|
-
return_type = opts[:debug_return_type] || '
|
|
61
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
249
62
|
|
|
250
63
|
# auth_names
|
|
251
|
-
auth_names = opts[:debug_auth_names] || ['
|
|
64
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
252
65
|
|
|
253
66
|
new_options = opts.merge(
|
|
254
|
-
:operation => :"UsersApi.
|
|
67
|
+
:operation => :"UsersApi.companies_company_id_users_get",
|
|
255
68
|
:header_params => header_params,
|
|
256
69
|
:query_params => query_params,
|
|
257
70
|
:form_params => form_params,
|
|
@@ -260,97 +73,45 @@ module SparteraApiSdk
|
|
|
260
73
|
:return_type => return_type
|
|
261
74
|
)
|
|
262
75
|
|
|
263
|
-
data, status_code, headers = @api_client.call_api(:
|
|
76
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
264
77
|
if @api_client.config.debugging
|
|
265
|
-
@api_client.config.logger.debug "API called: UsersApi#
|
|
78
|
+
@api_client.config.logger.debug "API called: UsersApi#companies_company_id_users_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
266
79
|
end
|
|
267
80
|
return data, status_code, headers
|
|
268
81
|
end
|
|
269
82
|
|
|
270
|
-
#
|
|
271
|
-
# @param company_id [String]
|
|
272
|
-
# @param
|
|
83
|
+
# Create a new user
|
|
84
|
+
# @param company_id [String]
|
|
85
|
+
# @param user [User]
|
|
273
86
|
# @param [Hash] opts the optional parameters
|
|
274
|
-
# @
|
|
275
|
-
|
|
276
|
-
|
|
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)
|
|
87
|
+
# @return [Object]
|
|
88
|
+
def companies_company_id_users_post(company_id, user, opts = {})
|
|
89
|
+
data, _status_code, _headers = companies_company_id_users_post_with_http_info(company_id, user, opts)
|
|
282
90
|
data
|
|
283
91
|
end
|
|
284
92
|
|
|
285
|
-
#
|
|
286
|
-
# @param company_id [String]
|
|
287
|
-
# @param
|
|
93
|
+
# Create a new user
|
|
94
|
+
# @param company_id [String]
|
|
95
|
+
# @param user [User]
|
|
288
96
|
# @param [Hash] opts the optional parameters
|
|
289
|
-
# @
|
|
290
|
-
|
|
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 = {})
|
|
97
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
98
|
+
def companies_company_id_users_post_with_http_info(company_id, user, opts = {})
|
|
296
99
|
if @api_client.config.debugging
|
|
297
|
-
@api_client.config.logger.debug 'Calling API: UsersApi.
|
|
100
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.companies_company_id_users_post ...'
|
|
298
101
|
end
|
|
299
102
|
# verify the required parameter 'company_id' is set
|
|
300
103
|
if @api_client.config.client_side_validation && company_id.nil?
|
|
301
|
-
fail ArgumentError, "Missing the required parameter 'company_id' when calling UsersApi.
|
|
104
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling UsersApi.companies_company_id_users_post"
|
|
302
105
|
end
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
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}."
|
|
106
|
+
# verify the required parameter 'user' is set
|
|
107
|
+
if @api_client.config.client_side_validation && user.nil?
|
|
108
|
+
fail ArgumentError, "Missing the required parameter 'user' when calling UsersApi.companies_company_id_users_post"
|
|
314
109
|
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
110
|
# resource path
|
|
345
|
-
local_var_path = '/companies/{company_id}/users
|
|
111
|
+
local_var_path = '/companies/{company_id}/users'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s))
|
|
346
112
|
|
|
347
113
|
# query parameters
|
|
348
114
|
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
115
|
|
|
355
116
|
# header parameters
|
|
356
117
|
header_params = opts[:header_params] || {}
|
|
@@ -366,16 +127,16 @@ module SparteraApiSdk
|
|
|
366
127
|
form_params = opts[:form_params] || {}
|
|
367
128
|
|
|
368
129
|
# http body (model)
|
|
369
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
130
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(user)
|
|
370
131
|
|
|
371
132
|
# return_type
|
|
372
|
-
return_type = opts[:debug_return_type] || '
|
|
133
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
373
134
|
|
|
374
135
|
# auth_names
|
|
375
|
-
auth_names = opts[:debug_auth_names] || ['
|
|
136
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
376
137
|
|
|
377
138
|
new_options = opts.merge(
|
|
378
|
-
:operation => :"UsersApi.
|
|
139
|
+
:operation => :"UsersApi.companies_company_id_users_post",
|
|
379
140
|
:header_params => header_params,
|
|
380
141
|
:query_params => query_params,
|
|
381
142
|
:form_params => form_params,
|
|
@@ -386,64 +147,38 @@ module SparteraApiSdk
|
|
|
386
147
|
|
|
387
148
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
388
149
|
if @api_client.config.debugging
|
|
389
|
-
@api_client.config.logger.debug "API called: UsersApi#
|
|
150
|
+
@api_client.config.logger.debug "API called: UsersApi#companies_company_id_users_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
390
151
|
end
|
|
391
152
|
return data, status_code, headers
|
|
392
153
|
end
|
|
393
154
|
|
|
394
155
|
# Delete single user by ID
|
|
395
|
-
# @param company_id [String]
|
|
396
|
-
# @param user_id [String]
|
|
156
|
+
# @param company_id [String]
|
|
157
|
+
# @param user_id [String]
|
|
397
158
|
# @param [Hash] opts the optional parameters
|
|
398
|
-
# @return [
|
|
399
|
-
def
|
|
400
|
-
data, _status_code, _headers =
|
|
159
|
+
# @return [Object]
|
|
160
|
+
def companies_company_id_users_user_id_delete(company_id, user_id, opts = {})
|
|
161
|
+
data, _status_code, _headers = companies_company_id_users_user_id_delete_with_http_info(company_id, user_id, opts)
|
|
401
162
|
data
|
|
402
163
|
end
|
|
403
164
|
|
|
404
165
|
# Delete single user by ID
|
|
405
|
-
# @param company_id [String]
|
|
406
|
-
# @param user_id [String]
|
|
166
|
+
# @param company_id [String]
|
|
167
|
+
# @param user_id [String]
|
|
407
168
|
# @param [Hash] opts the optional parameters
|
|
408
|
-
# @return [Array<(
|
|
409
|
-
def
|
|
169
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
170
|
+
def companies_company_id_users_user_id_delete_with_http_info(company_id, user_id, opts = {})
|
|
410
171
|
if @api_client.config.debugging
|
|
411
|
-
@api_client.config.logger.debug 'Calling API: UsersApi.
|
|
172
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.companies_company_id_users_user_id_delete ...'
|
|
412
173
|
end
|
|
413
174
|
# verify the required parameter 'company_id' is set
|
|
414
175
|
if @api_client.config.client_side_validation && company_id.nil?
|
|
415
|
-
fail ArgumentError, "Missing the required parameter 'company_id' when calling UsersApi.
|
|
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.'
|
|
176
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling UsersApi.companies_company_id_users_user_id_delete"
|
|
423
177
|
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
178
|
# verify the required parameter 'user_id' is set
|
|
431
179
|
if @api_client.config.client_side_validation && user_id.nil?
|
|
432
|
-
fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.
|
|
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}."
|
|
180
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.companies_company_id_users_user_id_delete"
|
|
445
181
|
end
|
|
446
|
-
|
|
447
182
|
# resource path
|
|
448
183
|
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
184
|
|
|
@@ -462,13 +197,13 @@ module SparteraApiSdk
|
|
|
462
197
|
post_body = opts[:debug_body]
|
|
463
198
|
|
|
464
199
|
# return_type
|
|
465
|
-
return_type = opts[:debug_return_type] || '
|
|
200
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
466
201
|
|
|
467
202
|
# auth_names
|
|
468
|
-
auth_names = opts[:debug_auth_names] || ['
|
|
203
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
469
204
|
|
|
470
205
|
new_options = opts.merge(
|
|
471
|
-
:operation => :"UsersApi.
|
|
206
|
+
:operation => :"UsersApi.companies_company_id_users_user_id_delete",
|
|
472
207
|
:header_params => header_params,
|
|
473
208
|
:query_params => query_params,
|
|
474
209
|
:form_params => form_params,
|
|
@@ -479,64 +214,38 @@ module SparteraApiSdk
|
|
|
479
214
|
|
|
480
215
|
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
481
216
|
if @api_client.config.debugging
|
|
482
|
-
@api_client.config.logger.debug "API called: UsersApi#
|
|
217
|
+
@api_client.config.logger.debug "API called: UsersApi#companies_company_id_users_user_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
483
218
|
end
|
|
484
219
|
return data, status_code, headers
|
|
485
220
|
end
|
|
486
221
|
|
|
487
222
|
# Get single user by ID
|
|
488
|
-
# @param company_id [String]
|
|
489
|
-
# @param user_id [String]
|
|
223
|
+
# @param company_id [String]
|
|
224
|
+
# @param user_id [String]
|
|
490
225
|
# @param [Hash] opts the optional parameters
|
|
491
|
-
# @return [
|
|
492
|
-
def
|
|
493
|
-
data, _status_code, _headers =
|
|
226
|
+
# @return [Object]
|
|
227
|
+
def companies_company_id_users_user_id_get(company_id, user_id, opts = {})
|
|
228
|
+
data, _status_code, _headers = companies_company_id_users_user_id_get_with_http_info(company_id, user_id, opts)
|
|
494
229
|
data
|
|
495
230
|
end
|
|
496
231
|
|
|
497
232
|
# Get single user by ID
|
|
498
|
-
# @param company_id [String]
|
|
499
|
-
# @param user_id [String]
|
|
233
|
+
# @param company_id [String]
|
|
234
|
+
# @param user_id [String]
|
|
500
235
|
# @param [Hash] opts the optional parameters
|
|
501
|
-
# @return [Array<(
|
|
502
|
-
def
|
|
236
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
237
|
+
def companies_company_id_users_user_id_get_with_http_info(company_id, user_id, opts = {})
|
|
503
238
|
if @api_client.config.debugging
|
|
504
|
-
@api_client.config.logger.debug 'Calling API: UsersApi.
|
|
239
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.companies_company_id_users_user_id_get ...'
|
|
505
240
|
end
|
|
506
241
|
# verify the required parameter 'company_id' is set
|
|
507
242
|
if @api_client.config.client_side_validation && company_id.nil?
|
|
508
|
-
fail ArgumentError, "Missing the required parameter 'company_id' when calling UsersApi.
|
|
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.'
|
|
243
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling UsersApi.companies_company_id_users_user_id_get"
|
|
516
244
|
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
245
|
# verify the required parameter 'user_id' is set
|
|
524
246
|
if @api_client.config.client_side_validation && user_id.nil?
|
|
525
|
-
fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.
|
|
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.'
|
|
247
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.companies_company_id_users_user_id_get"
|
|
529
248
|
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
249
|
# resource path
|
|
541
250
|
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
251
|
|
|
@@ -555,13 +264,13 @@ module SparteraApiSdk
|
|
|
555
264
|
post_body = opts[:debug_body]
|
|
556
265
|
|
|
557
266
|
# return_type
|
|
558
|
-
return_type = opts[:debug_return_type] || '
|
|
267
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
559
268
|
|
|
560
269
|
# auth_names
|
|
561
|
-
auth_names = opts[:debug_auth_names] || ['
|
|
270
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
562
271
|
|
|
563
272
|
new_options = opts.merge(
|
|
564
|
-
:operation => :"UsersApi.
|
|
273
|
+
:operation => :"UsersApi.companies_company_id_users_user_id_get",
|
|
565
274
|
:header_params => header_params,
|
|
566
275
|
:query_params => query_params,
|
|
567
276
|
:form_params => form_params,
|
|
@@ -572,276 +281,43 @@ module SparteraApiSdk
|
|
|
572
281
|
|
|
573
282
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
574
283
|
if @api_client.config.debugging
|
|
575
|
-
@api_client.config.logger.debug "API called: UsersApi#
|
|
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}"
|
|
284
|
+
@api_client.config.logger.debug "API called: UsersApi#companies_company_id_users_user_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
783
285
|
end
|
|
784
286
|
return data, status_code, headers
|
|
785
287
|
end
|
|
786
288
|
|
|
787
289
|
# Update an existing user by ID
|
|
788
|
-
# @param company_id [String]
|
|
789
|
-
# @param user_id [String]
|
|
790
|
-
# @param
|
|
290
|
+
# @param company_id [String]
|
|
291
|
+
# @param user_id [String]
|
|
292
|
+
# @param user [User]
|
|
791
293
|
# @param [Hash] opts the optional parameters
|
|
792
|
-
# @return [
|
|
793
|
-
def
|
|
794
|
-
data, _status_code, _headers =
|
|
294
|
+
# @return [Object]
|
|
295
|
+
def companies_company_id_users_user_id_patch(company_id, user_id, user, opts = {})
|
|
296
|
+
data, _status_code, _headers = companies_company_id_users_user_id_patch_with_http_info(company_id, user_id, user, opts)
|
|
795
297
|
data
|
|
796
298
|
end
|
|
797
299
|
|
|
798
300
|
# Update an existing user by ID
|
|
799
|
-
# @param company_id [String]
|
|
800
|
-
# @param user_id [String]
|
|
801
|
-
# @param
|
|
301
|
+
# @param company_id [String]
|
|
302
|
+
# @param user_id [String]
|
|
303
|
+
# @param user [User]
|
|
802
304
|
# @param [Hash] opts the optional parameters
|
|
803
|
-
# @return [Array<(
|
|
804
|
-
def
|
|
305
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
306
|
+
def companies_company_id_users_user_id_patch_with_http_info(company_id, user_id, user, opts = {})
|
|
805
307
|
if @api_client.config.debugging
|
|
806
|
-
@api_client.config.logger.debug 'Calling API: UsersApi.
|
|
308
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.companies_company_id_users_user_id_patch ...'
|
|
807
309
|
end
|
|
808
310
|
# verify the required parameter 'company_id' is set
|
|
809
311
|
if @api_client.config.client_side_validation && company_id.nil?
|
|
810
|
-
fail ArgumentError, "Missing the required parameter 'company_id' when calling UsersApi.
|
|
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}."
|
|
312
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling UsersApi.companies_company_id_users_user_id_patch"
|
|
823
313
|
end
|
|
824
|
-
|
|
825
314
|
# verify the required parameter 'user_id' is set
|
|
826
315
|
if @api_client.config.client_side_validation && user_id.nil?
|
|
827
|
-
fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.
|
|
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}."
|
|
316
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.companies_company_id_users_user_id_patch"
|
|
840
317
|
end
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
fail ArgumentError, "Missing the required parameter 'users_update' when calling UsersApi.update_users"
|
|
318
|
+
# verify the required parameter 'user' is set
|
|
319
|
+
if @api_client.config.client_side_validation && user.nil?
|
|
320
|
+
fail ArgumentError, "Missing the required parameter 'user' when calling UsersApi.companies_company_id_users_user_id_patch"
|
|
845
321
|
end
|
|
846
322
|
# resource path
|
|
847
323
|
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))
|
|
@@ -863,16 +339,16 @@ module SparteraApiSdk
|
|
|
863
339
|
form_params = opts[:form_params] || {}
|
|
864
340
|
|
|
865
341
|
# http body (model)
|
|
866
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
342
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(user)
|
|
867
343
|
|
|
868
344
|
# return_type
|
|
869
|
-
return_type = opts[:debug_return_type] || '
|
|
345
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
870
346
|
|
|
871
347
|
# auth_names
|
|
872
|
-
auth_names = opts[:debug_auth_names] || ['
|
|
348
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
873
349
|
|
|
874
350
|
new_options = opts.merge(
|
|
875
|
-
:operation => :"UsersApi.
|
|
351
|
+
:operation => :"UsersApi.companies_company_id_users_user_id_patch",
|
|
876
352
|
:header_params => header_params,
|
|
877
353
|
:query_params => query_params,
|
|
878
354
|
:form_params => form_params,
|
|
@@ -883,7 +359,7 @@ module SparteraApiSdk
|
|
|
883
359
|
|
|
884
360
|
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
885
361
|
if @api_client.config.debugging
|
|
886
|
-
@api_client.config.logger.debug "API called: UsersApi#
|
|
362
|
+
@api_client.config.logger.debug "API called: UsersApi#companies_company_id_users_user_id_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
887
363
|
end
|
|
888
364
|
return data, status_code, headers
|
|
889
365
|
end
|