spartera_api_sdk 1.0.74 → 1.0.77
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/docs/APIKeysApi.md +210 -60
- data/docs/Alerts.md +30 -0
- data/docs/AlertsApi.md +20 -20
- data/docs/AlertsInput.md +24 -0
- data/docs/AlertsUpdate.md +24 -0
- data/docs/{CompaniesCompanyIdUsersUserIdAlertsAlertIdGet200Response.md → AnalyzeCompanyHandleAssetsAssetSlugGet200Response.md} +3 -3
- data/docs/ApiKeys.md +32 -0
- data/docs/ApiKeysInput.md +26 -0
- data/docs/ApiKeysUpdate.md +26 -0
- data/docs/AssetPriceHistory.md +28 -0
- data/docs/AssetPriceHistoryApi.md +56 -48
- data/docs/AssetPriceHistoryInput.md +22 -0
- data/docs/AssetPriceHistoryUpdate.md +22 -0
- data/docs/Assets.md +108 -0
- data/docs/AssetsApi.md +28 -28
- data/docs/AssetsInput.md +94 -0
- data/docs/AssetsUpdate.md +94 -0
- data/docs/{Cloudprovider.md → CloudProviders.md} +8 -10
- data/docs/CloudProvidersApi.md +8 -8
- data/docs/{CompaniesCompanyIdAssetsAssetIdGet200Response.md → CloudProvidersGet200Response.md} +3 -3
- data/docs/CloudProvidersInput.md +22 -0
- data/docs/CloudProvidersProviderIdGet200Response.md +20 -0
- data/docs/CloudProvidersProviderIdStorageEnginesGet200Response.md +20 -0
- data/docs/CloudProvidersUpdate.md +22 -0
- data/docs/{Company.md → Companies.md} +13 -15
- data/docs/CompaniesApi.md +41 -39
- data/docs/CompaniesCompanyIdAnalyticsAssetsGet200Response.md +20 -0
- data/docs/CompaniesCompanyIdApiKeysApiKeyIdDelete200Response.md +20 -0
- data/docs/CompaniesCompanyIdApiKeysApiKeyIdDelete200ResponseData.md +18 -0
- data/docs/CompaniesCompanyIdApiKeysApiKeyIdGet200Response.md +20 -0
- data/docs/CompaniesCompanyIdApiKeysApiKeyIdPatch200Response.md +20 -0
- data/docs/CompaniesCompanyIdApiKeysApiKeyIdPatch200ResponseData.md +18 -0
- data/docs/CompaniesCompanyIdApiKeysGet200Response.md +1 -1
- data/docs/CompaniesCompanyIdApiKeysPost200Response.md +20 -0
- data/docs/CompaniesCompanyIdApiKeysPost200ResponseData.md +18 -0
- data/docs/CompaniesCompanyIdAssetsAssetIdPricesAphIdDelete200Response.md +20 -0
- data/docs/CompaniesCompanyIdAssetsAssetIdPricesAphIdDelete200ResponseData.md +18 -0
- data/docs/CompaniesCompanyIdAssetsAssetIdPricesAphIdGet200Response.md +20 -0
- data/docs/CompaniesCompanyIdAssetsAssetIdPricesAphIdPatch200Response.md +20 -0
- data/docs/CompaniesCompanyIdAssetsAssetIdPricesAphIdPatch200ResponseData.md +18 -0
- data/docs/CompaniesCompanyIdAssetsAssetIdPricesGet200Response.md +20 -0
- data/docs/CompaniesCompanyIdAssetsAssetIdPricesPost200Response.md +20 -0
- data/docs/CompaniesCompanyIdAssetsAssetIdPricesPost200ResponseData.md +18 -0
- data/docs/CompaniesCompanyIdAssetsGet200Response.md +1 -1
- data/docs/CompaniesCompanyIdConnectionsConnectionIdGet200Response.md +1 -1
- data/docs/CompaniesCompanyIdConnectionsGet200Response.md +1 -1
- data/docs/CompaniesCompanyIdGet200Response.md +20 -0
- data/docs/CompaniesCompanyIdPatch200Response.md +20 -0
- data/docs/CompaniesCompanyIdPatch200ResponseData.md +18 -0
- data/docs/CompaniesCompanyIdUsersGet200Response.md +1 -1
- data/docs/CompaniesCompanyIdUsersUserIdAlertsAssetAssetIdGet200Response.md +20 -0
- data/docs/CompaniesCompanyIdUsersUserIdAlertsGet200Response.md +1 -1
- data/docs/{CompaniesCompanyIdUsersUserIdFavoritesFavoriteIdGet200Response.md → CompaniesCompanyIdUsersUserIdFavoritesCategoryCategoryGet200Response.md} +3 -3
- data/docs/CompaniesCompanyIdUsersUserIdFavoritesGet200Response.md +1 -1
- data/docs/CompaniesCompanyIdUsersUserIdGet200Response.md +1 -1
- data/docs/CompaniesInput.md +36 -0
- data/docs/CompaniesUpdate.md +36 -0
- data/docs/Connections.md +38 -0
- data/docs/ConnectionsApi.md +12 -12
- data/docs/ConnectionsInput.md +32 -0
- data/docs/ConnectionsUpdate.md +32 -0
- data/docs/Favorites.md +34 -0
- data/docs/FavoritesApi.md +24 -24
- data/docs/FavoritesInput.md +28 -0
- data/docs/FavoritesUpdate.md +28 -0
- data/docs/JobFunctions.md +24 -0
- data/docs/JobFunctionsApi.md +144 -0
- data/docs/JobFunctionsFunctionIdGet200Response.md +20 -0
- data/docs/JobFunctionsGet200Response.md +20 -0
- data/docs/JobFunctionsInput.md +18 -0
- data/docs/JobFunctionsUpdate.md +18 -0
- data/docs/StorageEnginesApi.md +8 -8
- data/docs/{User.md → Users.md} +9 -11
- data/docs/UsersApi.md +20 -20
- data/docs/UsersInput.md +26 -0
- data/docs/UsersUpdate.md +26 -0
- data/lib/spartera_api_sdk/api/alerts_api.rb +25 -25
- data/lib/spartera_api_sdk/api/api_keys_api.rb +222 -55
- data/lib/spartera_api_sdk/api/asset_price_history_api.rb +87 -43
- data/lib/spartera_api_sdk/api/assets_api.rb +37 -37
- data/lib/spartera_api_sdk/api/cloud_providers_api.rb +7 -7
- data/lib/spartera_api_sdk/api/companies_api.rb +43 -32
- data/lib/spartera_api_sdk/api/connections_api.rb +19 -19
- data/lib/spartera_api_sdk/api/favorites_api.rb +28 -28
- data/lib/spartera_api_sdk/api/job_functions_api.rb +138 -0
- data/lib/spartera_api_sdk/api/storage_engines_api.rb +7 -7
- data/lib/spartera_api_sdk/api/users_api.rb +24 -24
- data/lib/spartera_api_sdk/api_client.rb +1 -1
- data/lib/spartera_api_sdk/api_error.rb +1 -1
- data/lib/spartera_api_sdk/configuration.rb +1 -1
- data/lib/spartera_api_sdk/models/{alert.rb → alerts.rb} +38 -64
- data/lib/spartera_api_sdk/models/alerts_input.rb +283 -0
- data/lib/spartera_api_sdk/models/{me_get200_response_token_metadata.rb → alerts_update.rb} +31 -34
- data/lib/spartera_api_sdk/models/analyze_company_handle_assets_asset_slug_get200_response.rb +264 -0
- data/lib/spartera_api_sdk/models/{apikey.rb → api_keys.rb} +34 -64
- data/lib/spartera_api_sdk/models/api_keys_input.rb +296 -0
- data/lib/spartera_api_sdk/models/api_keys_update.rb +262 -0
- data/lib/spartera_api_sdk/models/{assetpricehistory.rb → asset_price_history.rb} +27 -88
- data/lib/spartera_api_sdk/models/asset_price_history_input.rb +257 -0
- data/lib/spartera_api_sdk/models/asset_price_history_update.rb +240 -0
- data/lib/spartera_api_sdk/models/assets.rb +879 -0
- data/lib/spartera_api_sdk/models/{asset.rb → assets_input.rb} +160 -95
- data/lib/spartera_api_sdk/models/assets_update.rb +710 -0
- data/lib/spartera_api_sdk/models/{cloudprovider.rb → cloud_providers.rb} +27 -36
- data/lib/spartera_api_sdk/models/cloud_providers_get200_response.rb +266 -0
- data/lib/spartera_api_sdk/models/cloud_providers_input.rb +256 -0
- data/lib/spartera_api_sdk/models/{companies_company_id_assets_asset_id_get200_response.rb → cloud_providers_provider_id_get200_response.rb} +5 -5
- data/lib/spartera_api_sdk/models/cloud_providers_provider_id_storage_engines_get200_response.rb +246 -0
- data/lib/spartera_api_sdk/models/cloud_providers_update.rb +239 -0
- data/lib/spartera_api_sdk/models/{company.rb → companies.rb} +33 -39
- data/lib/spartera_api_sdk/models/companies_company_id_analytics_assets_get200_response.rb +266 -0
- data/lib/spartera_api_sdk/models/companies_company_id_api_keys_api_key_id_delete200_response.rb +264 -0
- data/lib/spartera_api_sdk/models/companies_company_id_api_keys_api_key_id_delete200_response_data.rb +238 -0
- data/lib/spartera_api_sdk/models/companies_company_id_api_keys_api_key_id_get200_response.rb +264 -0
- data/lib/spartera_api_sdk/models/companies_company_id_api_keys_api_key_id_patch200_response.rb +264 -0
- data/lib/spartera_api_sdk/models/companies_company_id_api_keys_api_key_id_patch200_response_data.rb +238 -0
- data/lib/spartera_api_sdk/models/companies_company_id_api_keys_get200_response.rb +22 -4
- data/lib/spartera_api_sdk/models/companies_company_id_api_keys_post200_response.rb +264 -0
- data/lib/spartera_api_sdk/models/companies_company_id_api_keys_post200_response_data.rb +238 -0
- data/lib/spartera_api_sdk/models/companies_company_id_assets_asset_id_delete200_response.rb +1 -1
- data/lib/spartera_api_sdk/models/companies_company_id_assets_asset_id_delete200_response_data.rb +1 -1
- data/lib/spartera_api_sdk/models/companies_company_id_assets_asset_id_patch200_response.rb +1 -1
- data/lib/spartera_api_sdk/models/companies_company_id_assets_asset_id_patch200_response_data.rb +1 -1
- data/lib/spartera_api_sdk/models/companies_company_id_assets_asset_id_prices_aph_id_delete200_response.rb +264 -0
- data/lib/spartera_api_sdk/models/companies_company_id_assets_asset_id_prices_aph_id_delete200_response_data.rb +238 -0
- data/lib/spartera_api_sdk/models/{companies_company_id_users_user_id_alerts_alert_id_get200_response.rb → companies_company_id_assets_asset_id_prices_aph_id_get200_response.rb} +5 -5
- data/lib/spartera_api_sdk/models/companies_company_id_assets_asset_id_prices_aph_id_patch200_response.rb +264 -0
- data/lib/spartera_api_sdk/models/companies_company_id_assets_asset_id_prices_aph_id_patch200_response_data.rb +238 -0
- data/lib/spartera_api_sdk/models/companies_company_id_assets_asset_id_prices_get200_response.rb +266 -0
- data/lib/spartera_api_sdk/models/companies_company_id_assets_asset_id_prices_post200_response.rb +264 -0
- data/lib/spartera_api_sdk/models/companies_company_id_assets_asset_id_prices_post200_response_data.rb +238 -0
- data/lib/spartera_api_sdk/models/companies_company_id_assets_get200_response.rb +2 -2
- data/lib/spartera_api_sdk/models/companies_company_id_assets_post200_response.rb +1 -1
- data/lib/spartera_api_sdk/models/companies_company_id_assets_post200_response_data.rb +1 -1
- data/lib/spartera_api_sdk/models/companies_company_id_connections_connection_id_delete200_response.rb +1 -1
- data/lib/spartera_api_sdk/models/companies_company_id_connections_connection_id_delete200_response_data.rb +1 -1
- data/lib/spartera_api_sdk/models/companies_company_id_connections_connection_id_get200_response.rb +2 -2
- data/lib/spartera_api_sdk/models/companies_company_id_connections_connection_id_patch200_response.rb +1 -1
- data/lib/spartera_api_sdk/models/companies_company_id_connections_connection_id_patch200_response_data.rb +1 -1
- data/lib/spartera_api_sdk/models/companies_company_id_connections_get200_response.rb +2 -2
- data/lib/spartera_api_sdk/models/companies_company_id_connections_post200_response.rb +1 -1
- data/lib/spartera_api_sdk/models/companies_company_id_connections_post200_response_data.rb +1 -1
- data/lib/spartera_api_sdk/models/companies_company_id_get200_response.rb +264 -0
- data/lib/spartera_api_sdk/models/companies_company_id_patch200_response.rb +264 -0
- data/lib/spartera_api_sdk/models/companies_company_id_patch200_response_data.rb +238 -0
- data/lib/spartera_api_sdk/models/companies_company_id_users_get200_response.rb +2 -2
- data/lib/spartera_api_sdk/models/companies_company_id_users_post200_response.rb +1 -1
- data/lib/spartera_api_sdk/models/companies_company_id_users_post200_response_data.rb +1 -1
- data/lib/spartera_api_sdk/models/companies_company_id_users_user_id_alerts_alert_id_delete200_response.rb +1 -1
- data/lib/spartera_api_sdk/models/companies_company_id_users_user_id_alerts_alert_id_delete200_response_data.rb +1 -1
- data/lib/spartera_api_sdk/models/companies_company_id_users_user_id_alerts_alert_id_patch200_response.rb +1 -1
- data/lib/spartera_api_sdk/models/companies_company_id_users_user_id_alerts_alert_id_patch200_response_data.rb +1 -1
- data/lib/spartera_api_sdk/models/companies_company_id_users_user_id_alerts_asset_asset_id_get200_response.rb +264 -0
- data/lib/spartera_api_sdk/models/companies_company_id_users_user_id_alerts_get200_response.rb +2 -2
- data/lib/spartera_api_sdk/models/companies_company_id_users_user_id_alerts_post200_response.rb +1 -1
- data/lib/spartera_api_sdk/models/companies_company_id_users_user_id_alerts_post200_response_data.rb +1 -1
- data/lib/spartera_api_sdk/models/companies_company_id_users_user_id_delete200_response.rb +1 -1
- data/lib/spartera_api_sdk/models/companies_company_id_users_user_id_delete200_response_data.rb +1 -1
- data/lib/spartera_api_sdk/models/{companies_company_id_users_user_id_favorites_favorite_id_get200_response.rb → companies_company_id_users_user_id_favorites_category_category_get200_response.rb} +5 -5
- data/lib/spartera_api_sdk/models/companies_company_id_users_user_id_favorites_favorite_id_delete200_response.rb +1 -1
- data/lib/spartera_api_sdk/models/companies_company_id_users_user_id_favorites_favorite_id_delete200_response_data.rb +1 -1
- data/lib/spartera_api_sdk/models/companies_company_id_users_user_id_favorites_favorite_id_patch200_response.rb +1 -1
- data/lib/spartera_api_sdk/models/companies_company_id_users_user_id_favorites_favorite_id_patch200_response_data.rb +1 -1
- data/lib/spartera_api_sdk/models/companies_company_id_users_user_id_favorites_get200_response.rb +2 -2
- data/lib/spartera_api_sdk/models/companies_company_id_users_user_id_favorites_post200_response.rb +1 -1
- data/lib/spartera_api_sdk/models/companies_company_id_users_user_id_favorites_post200_response_data.rb +1 -1
- data/lib/spartera_api_sdk/models/companies_company_id_users_user_id_get200_response.rb +2 -2
- data/lib/spartera_api_sdk/models/companies_company_id_users_user_id_patch200_response.rb +1 -1
- data/lib/spartera_api_sdk/models/companies_company_id_users_user_id_patch200_response_data.rb +1 -1
- data/lib/spartera_api_sdk/models/companies_input.rb +339 -0
- data/lib/spartera_api_sdk/models/companies_update.rb +305 -0
- data/lib/spartera_api_sdk/models/{connection.rb → connections.rb} +57 -111
- data/lib/spartera_api_sdk/models/connections_input.rb +353 -0
- data/lib/spartera_api_sdk/models/connections_update.rb +319 -0
- data/lib/spartera_api_sdk/models/error.rb +1 -1
- data/lib/spartera_api_sdk/models/{favorite.rb → favorites.rb} +30 -36
- data/lib/spartera_api_sdk/models/favorites_input.rb +303 -0
- data/lib/spartera_api_sdk/models/favorites_update.rb +269 -0
- data/lib/spartera_api_sdk/models/inline_object.rb +1 -1
- data/lib/spartera_api_sdk/models/inline_object1.rb +1 -1
- data/lib/spartera_api_sdk/models/inline_object2.rb +1 -1
- data/lib/spartera_api_sdk/models/inline_object3.rb +1 -1
- data/lib/spartera_api_sdk/models/job_functions.rb +282 -0
- data/lib/spartera_api_sdk/models/job_functions_function_id_get200_response.rb +264 -0
- data/lib/spartera_api_sdk/models/job_functions_get200_response.rb +266 -0
- data/lib/spartera_api_sdk/models/{me_get200_response_api_key_info.rb → job_functions_input.rb} +29 -23
- data/lib/spartera_api_sdk/models/job_functions_update.rb +221 -0
- data/lib/spartera_api_sdk/models/{user.rb → users.rb} +56 -40
- data/lib/spartera_api_sdk/models/{me_get200_response_profile.rb → users_input.rb} +35 -71
- data/lib/spartera_api_sdk/models/users_update.rb +292 -0
- data/lib/spartera_api_sdk/version.rb +1 -1
- data/lib/spartera_api_sdk.rb +59 -17
- data/spec/api/alerts_api_spec.rb +5 -5
- data/spec/api/api_keys_api_spec.rb +43 -16
- data/spec/api/asset_price_history_api_spec.rb +14 -10
- data/spec/api/assets_api_spec.rb +7 -7
- data/spec/api/cloud_providers_api_spec.rb +3 -3
- data/spec/api/companies_api_spec.rb +11 -10
- data/spec/api/connections_api_spec.rb +3 -3
- data/spec/api/favorites_api_spec.rb +6 -6
- data/spec/api/job_functions_api_spec.rb +56 -0
- data/spec/api/storage_engines_api_spec.rb +3 -3
- data/spec/api/users_api_spec.rb +5 -5
- data/spec/models/{me_get200_response_token_metadata_spec.rb → alerts_input_spec.rb} +11 -11
- data/spec/models/alerts_spec.rb +72 -0
- data/spec/models/alerts_update_spec.rb +54 -0
- data/spec/models/analyze_company_handle_assets_asset_slug_get200_response_spec.rb +42 -0
- data/spec/models/api_keys_input_spec.rb +60 -0
- data/spec/models/{apikey_spec.rb → api_keys_spec.rb} +15 -27
- data/spec/models/api_keys_update_spec.rb +60 -0
- data/spec/models/asset_price_history_input_spec.rb +48 -0
- data/spec/models/asset_price_history_spec.rb +66 -0
- data/spec/models/asset_price_history_update_spec.rb +48 -0
- data/spec/models/assets_input_spec.rb +300 -0
- data/spec/models/{asset_spec.rb → assets_spec.rb} +59 -25
- data/spec/models/assets_update_spec.rb +300 -0
- data/spec/models/cloud_providers_get200_response_spec.rb +42 -0
- data/spec/models/cloud_providers_input_spec.rb +48 -0
- data/spec/models/cloud_providers_provider_id_get200_response_spec.rb +42 -0
- data/spec/models/cloud_providers_provider_id_storage_engines_get200_response_spec.rb +42 -0
- data/spec/models/{cloudprovider_spec.rb → cloud_providers_spec.rb} +13 -19
- data/spec/models/cloud_providers_update_spec.rb +48 -0
- data/spec/models/companies_company_id_analytics_assets_get200_response_spec.rb +42 -0
- data/spec/models/companies_company_id_api_keys_api_key_id_delete200_response_data_spec.rb +36 -0
- data/spec/models/companies_company_id_api_keys_api_key_id_delete200_response_spec.rb +42 -0
- data/spec/models/companies_company_id_api_keys_api_key_id_get200_response_spec.rb +42 -0
- data/spec/models/companies_company_id_api_keys_api_key_id_patch200_response_data_spec.rb +36 -0
- data/spec/models/companies_company_id_api_keys_api_key_id_patch200_response_spec.rb +42 -0
- data/spec/models/companies_company_id_api_keys_get200_response_spec.rb +1 -1
- data/spec/models/companies_company_id_api_keys_post200_response_data_spec.rb +36 -0
- data/spec/models/companies_company_id_api_keys_post200_response_spec.rb +42 -0
- data/spec/models/companies_company_id_assets_asset_id_delete200_response_data_spec.rb +1 -1
- data/spec/models/companies_company_id_assets_asset_id_delete200_response_spec.rb +1 -1
- data/spec/models/companies_company_id_assets_asset_id_patch200_response_data_spec.rb +1 -1
- data/spec/models/companies_company_id_assets_asset_id_patch200_response_spec.rb +1 -1
- data/spec/models/companies_company_id_assets_asset_id_prices_aph_id_delete200_response_data_spec.rb +36 -0
- data/spec/models/companies_company_id_assets_asset_id_prices_aph_id_delete200_response_spec.rb +42 -0
- data/spec/models/companies_company_id_assets_asset_id_prices_aph_id_get200_response_spec.rb +42 -0
- data/spec/models/companies_company_id_assets_asset_id_prices_aph_id_patch200_response_data_spec.rb +36 -0
- data/spec/models/companies_company_id_assets_asset_id_prices_aph_id_patch200_response_spec.rb +42 -0
- data/spec/models/{companies_company_id_assets_asset_id_get200_response_spec.rb → companies_company_id_assets_asset_id_prices_get200_response_spec.rb} +7 -7
- data/spec/models/companies_company_id_assets_asset_id_prices_post200_response_data_spec.rb +36 -0
- data/spec/models/companies_company_id_assets_asset_id_prices_post200_response_spec.rb +42 -0
- data/spec/models/companies_company_id_assets_get200_response_spec.rb +1 -1
- data/spec/models/companies_company_id_assets_post200_response_data_spec.rb +1 -1
- data/spec/models/companies_company_id_assets_post200_response_spec.rb +1 -1
- data/spec/models/companies_company_id_connections_connection_id_delete200_response_data_spec.rb +1 -1
- data/spec/models/companies_company_id_connections_connection_id_delete200_response_spec.rb +1 -1
- data/spec/models/companies_company_id_connections_connection_id_get200_response_spec.rb +1 -1
- data/spec/models/companies_company_id_connections_connection_id_patch200_response_data_spec.rb +1 -1
- data/spec/models/companies_company_id_connections_connection_id_patch200_response_spec.rb +1 -1
- data/spec/models/companies_company_id_connections_get200_response_spec.rb +1 -1
- data/spec/models/companies_company_id_connections_post200_response_data_spec.rb +1 -1
- data/spec/models/companies_company_id_connections_post200_response_spec.rb +1 -1
- data/spec/models/companies_company_id_get200_response_spec.rb +42 -0
- data/spec/models/companies_company_id_patch200_response_data_spec.rb +36 -0
- data/spec/models/companies_company_id_patch200_response_spec.rb +42 -0
- data/spec/models/companies_company_id_users_get200_response_spec.rb +1 -1
- data/spec/models/companies_company_id_users_post200_response_data_spec.rb +1 -1
- data/spec/models/companies_company_id_users_post200_response_spec.rb +1 -1
- data/spec/models/companies_company_id_users_user_id_alerts_alert_id_delete200_response_data_spec.rb +1 -1
- data/spec/models/companies_company_id_users_user_id_alerts_alert_id_delete200_response_spec.rb +1 -1
- data/spec/models/companies_company_id_users_user_id_alerts_alert_id_patch200_response_data_spec.rb +1 -1
- data/spec/models/companies_company_id_users_user_id_alerts_alert_id_patch200_response_spec.rb +1 -1
- data/spec/models/{companies_company_id_users_user_id_alerts_alert_id_get200_response_spec.rb → companies_company_id_users_user_id_alerts_asset_asset_id_get200_response_spec.rb} +7 -7
- data/spec/models/companies_company_id_users_user_id_alerts_get200_response_spec.rb +1 -1
- data/spec/models/companies_company_id_users_user_id_alerts_post200_response_data_spec.rb +1 -1
- data/spec/models/companies_company_id_users_user_id_alerts_post200_response_spec.rb +1 -1
- data/spec/models/companies_company_id_users_user_id_delete200_response_data_spec.rb +1 -1
- data/spec/models/companies_company_id_users_user_id_delete200_response_spec.rb +1 -1
- data/spec/models/{companies_company_id_users_user_id_favorites_favorite_id_get200_response_spec.rb → companies_company_id_users_user_id_favorites_category_category_get200_response_spec.rb} +7 -7
- data/spec/models/companies_company_id_users_user_id_favorites_favorite_id_delete200_response_data_spec.rb +1 -1
- data/spec/models/companies_company_id_users_user_id_favorites_favorite_id_delete200_response_spec.rb +1 -1
- data/spec/models/companies_company_id_users_user_id_favorites_favorite_id_patch200_response_data_spec.rb +1 -1
- data/spec/models/companies_company_id_users_user_id_favorites_favorite_id_patch200_response_spec.rb +1 -1
- data/spec/models/companies_company_id_users_user_id_favorites_get200_response_spec.rb +1 -1
- data/spec/models/companies_company_id_users_user_id_favorites_post200_response_data_spec.rb +1 -1
- data/spec/models/companies_company_id_users_user_id_favorites_post200_response_spec.rb +1 -1
- data/spec/models/companies_company_id_users_user_id_get200_response_spec.rb +1 -1
- data/spec/models/companies_company_id_users_user_id_patch200_response_data_spec.rb +1 -1
- data/spec/models/companies_company_id_users_user_id_patch200_response_spec.rb +1 -1
- data/spec/models/{alert_spec.rb → companies_input_spec.rb} +17 -17
- data/spec/models/{company_spec.rb → companies_spec.rb} +19 -25
- data/spec/models/companies_update_spec.rb +90 -0
- data/spec/models/connections_input_spec.rb +82 -0
- data/spec/models/{me_get200_response_profile_spec.rb → connections_spec.rb} +27 -21
- data/spec/models/connections_update_spec.rb +82 -0
- data/spec/models/error_spec.rb +1 -1
- data/spec/models/favorites_input_spec.rb +66 -0
- data/spec/models/{favorite_spec.rb → favorites_spec.rb} +16 -22
- data/spec/models/favorites_update_spec.rb +66 -0
- data/spec/models/inline_object1_spec.rb +1 -1
- data/spec/models/inline_object2_spec.rb +1 -1
- data/spec/models/inline_object3_spec.rb +1 -1
- data/spec/models/inline_object_spec.rb +1 -1
- data/spec/models/job_functions_function_id_get200_response_spec.rb +42 -0
- data/spec/models/{me_get200_response_api_key_info_spec.rb → job_functions_get200_response_spec.rb} +9 -9
- 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/users_input_spec.rb +64 -0
- data/spec/models/{user_spec.rb → users_spec.rb} +19 -21
- data/spec/models/users_update_spec.rb +64 -0
- metadata +285 -123
- data/docs/Alert.md +0 -36
- data/docs/Apikey.md +0 -36
- data/docs/Asset.md +0 -110
- data/docs/Assetpricehistory.md +0 -38
- data/docs/Connection.md +0 -54
- data/docs/Favorite.md +0 -36
- data/docs/MeGet200Response.md +0 -36
- data/docs/MeGet200ResponseApiKeyInfo.md +0 -20
- data/docs/MeGet200ResponseProfile.md +0 -36
- data/docs/MeGet200ResponseTokenMetadata.md +0 -24
- data/example.rb +0 -51
- data/lib/spartera_api_sdk/models/me_get200_response.rb +0 -417
- data/spec/models/assetpricehistory_spec.rb +0 -96
- data/spec/models/connection_spec.rb +0 -144
- data/spec/models/me_get200_response_spec.rb +0 -94
- data/spec/spec_helper.rb +0 -111
|
@@ -3,7 +3,7 @@
|
|
|
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: 1.24.0
|
|
7
7
|
Contact: support@spartera.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.13.0
|
|
@@ -14,38 +14,58 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module SparteraApiSdk
|
|
17
|
-
# Individual users within a company
|
|
18
|
-
class
|
|
17
|
+
# Individual users within a company with SOC2 authentication tracking
|
|
18
|
+
class Users
|
|
19
|
+
attr_accessor :date_created
|
|
20
|
+
|
|
21
|
+
attr_accessor :last_updated
|
|
22
|
+
|
|
19
23
|
attr_accessor :user_id
|
|
20
24
|
|
|
21
25
|
attr_accessor :company_id
|
|
22
26
|
|
|
23
27
|
attr_accessor :function_id
|
|
24
28
|
|
|
29
|
+
# Enum type: StatusCodes
|
|
25
30
|
attr_accessor :status
|
|
26
31
|
|
|
27
32
|
attr_accessor :email_address
|
|
28
33
|
|
|
29
34
|
attr_accessor :timezone
|
|
30
35
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
36
|
+
class EnumAttributeValidator
|
|
37
|
+
attr_reader :datatype
|
|
38
|
+
attr_reader :allowable_values
|
|
39
|
+
|
|
40
|
+
def initialize(datatype, allowable_values)
|
|
41
|
+
@allowable_values = allowable_values.map do |value|
|
|
42
|
+
case datatype.to_s
|
|
43
|
+
when /Integer/i
|
|
44
|
+
value.to_i
|
|
45
|
+
when /Float/i
|
|
46
|
+
value.to_f
|
|
47
|
+
else
|
|
48
|
+
value
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
34
52
|
|
|
35
|
-
|
|
53
|
+
def valid?(value)
|
|
54
|
+
!value || allowable_values.include?(value)
|
|
55
|
+
end
|
|
56
|
+
end
|
|
36
57
|
|
|
37
58
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
38
59
|
def self.attribute_map
|
|
39
60
|
{
|
|
61
|
+
:'date_created' => :'date_created',
|
|
62
|
+
:'last_updated' => :'last_updated',
|
|
40
63
|
:'user_id' => :'user_id',
|
|
41
64
|
:'company_id' => :'company_id',
|
|
42
65
|
:'function_id' => :'function_id',
|
|
43
66
|
:'status' => :'status',
|
|
44
67
|
:'email_address' => :'email_address',
|
|
45
|
-
:'timezone' => :'timezone'
|
|
46
|
-
:'date_created' => :'date_created',
|
|
47
|
-
:'last_updated' => :'last_updated',
|
|
48
|
-
:'active' => :'active'
|
|
68
|
+
:'timezone' => :'timezone'
|
|
49
69
|
}
|
|
50
70
|
end
|
|
51
71
|
|
|
@@ -62,15 +82,14 @@ module SparteraApiSdk
|
|
|
62
82
|
# Attribute type mapping.
|
|
63
83
|
def self.openapi_types
|
|
64
84
|
{
|
|
85
|
+
:'date_created' => :'Time',
|
|
86
|
+
:'last_updated' => :'Time',
|
|
65
87
|
:'user_id' => :'String',
|
|
66
88
|
:'company_id' => :'String',
|
|
67
|
-
:'function_id' => :'
|
|
89
|
+
:'function_id' => :'Integer',
|
|
68
90
|
:'status' => :'String',
|
|
69
91
|
:'email_address' => :'String',
|
|
70
|
-
:'timezone' => :'String'
|
|
71
|
-
:'date_created' => :'String',
|
|
72
|
-
:'last_updated' => :'String',
|
|
73
|
-
:'active' => :'String'
|
|
92
|
+
:'timezone' => :'String'
|
|
74
93
|
}
|
|
75
94
|
end
|
|
76
95
|
|
|
@@ -84,18 +103,26 @@ module SparteraApiSdk
|
|
|
84
103
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
85
104
|
def initialize(attributes = {})
|
|
86
105
|
if (!attributes.is_a?(Hash))
|
|
87
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `SparteraApiSdk::
|
|
106
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SparteraApiSdk::Users` initialize method"
|
|
88
107
|
end
|
|
89
108
|
|
|
90
109
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
91
110
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
92
111
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
93
112
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
94
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `SparteraApiSdk::
|
|
113
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SparteraApiSdk::Users`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
95
114
|
end
|
|
96
115
|
h[k.to_sym] = v
|
|
97
116
|
}
|
|
98
117
|
|
|
118
|
+
if attributes.key?(:'date_created')
|
|
119
|
+
self.date_created = attributes[:'date_created']
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
if attributes.key?(:'last_updated')
|
|
123
|
+
self.last_updated = attributes[:'last_updated']
|
|
124
|
+
end
|
|
125
|
+
|
|
99
126
|
if attributes.key?(:'user_id')
|
|
100
127
|
self.user_id = attributes[:'user_id']
|
|
101
128
|
end
|
|
@@ -123,18 +150,6 @@ module SparteraApiSdk
|
|
|
123
150
|
if attributes.key?(:'timezone')
|
|
124
151
|
self.timezone = attributes[:'timezone']
|
|
125
152
|
end
|
|
126
|
-
|
|
127
|
-
if attributes.key?(:'date_created')
|
|
128
|
-
self.date_created = attributes[:'date_created']
|
|
129
|
-
end
|
|
130
|
-
|
|
131
|
-
if attributes.key?(:'last_updated')
|
|
132
|
-
self.last_updated = attributes[:'last_updated']
|
|
133
|
-
end
|
|
134
|
-
|
|
135
|
-
if attributes.key?(:'active')
|
|
136
|
-
self.active = attributes[:'active']
|
|
137
|
-
end
|
|
138
153
|
end
|
|
139
154
|
|
|
140
155
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -159,6 +174,8 @@ module SparteraApiSdk
|
|
|
159
174
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
160
175
|
return false if @company_id.nil?
|
|
161
176
|
return false if @status.nil?
|
|
177
|
+
status_validator = EnumAttributeValidator.new('String', ["ACTIVE", "PENDING", "INACTIVE", "BANNED"])
|
|
178
|
+
return false unless status_validator.valid?(@status)
|
|
162
179
|
true
|
|
163
180
|
end
|
|
164
181
|
|
|
@@ -172,13 +189,13 @@ module SparteraApiSdk
|
|
|
172
189
|
@company_id = company_id
|
|
173
190
|
end
|
|
174
191
|
|
|
175
|
-
# Custom attribute writer method
|
|
176
|
-
# @param [Object] status
|
|
192
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
193
|
+
# @param [Object] status Object to be assigned
|
|
177
194
|
def status=(status)
|
|
178
|
-
|
|
179
|
-
|
|
195
|
+
validator = EnumAttributeValidator.new('String', ["ACTIVE", "PENDING", "INACTIVE", "BANNED"])
|
|
196
|
+
unless validator.valid?(status)
|
|
197
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
|
180
198
|
end
|
|
181
|
-
|
|
182
199
|
@status = status
|
|
183
200
|
end
|
|
184
201
|
|
|
@@ -187,15 +204,14 @@ module SparteraApiSdk
|
|
|
187
204
|
def ==(o)
|
|
188
205
|
return true if self.equal?(o)
|
|
189
206
|
self.class == o.class &&
|
|
207
|
+
date_created == o.date_created &&
|
|
208
|
+
last_updated == o.last_updated &&
|
|
190
209
|
user_id == o.user_id &&
|
|
191
210
|
company_id == o.company_id &&
|
|
192
211
|
function_id == o.function_id &&
|
|
193
212
|
status == o.status &&
|
|
194
213
|
email_address == o.email_address &&
|
|
195
|
-
timezone == o.timezone
|
|
196
|
-
date_created == o.date_created &&
|
|
197
|
-
last_updated == o.last_updated &&
|
|
198
|
-
active == o.active
|
|
214
|
+
timezone == o.timezone
|
|
199
215
|
end
|
|
200
216
|
|
|
201
217
|
# @see the `==` method
|
|
@@ -207,7 +223,7 @@ module SparteraApiSdk
|
|
|
207
223
|
# Calculates hash code according to all attributes.
|
|
208
224
|
# @return [Integer] Hash code
|
|
209
225
|
def hash
|
|
210
|
-
[user_id, company_id, function_id, status, email_address, timezone
|
|
226
|
+
[date_created, last_updated, user_id, company_id, function_id, status, email_address, timezone].hash
|
|
211
227
|
end
|
|
212
228
|
|
|
213
229
|
# Builds the object from hash
|
|
@@ -3,7 +3,7 @@
|
|
|
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: 1.24.0
|
|
7
7
|
Contact: support@spartera.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.13.0
|
|
@@ -14,37 +14,19 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module SparteraApiSdk
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
attr_accessor :id
|
|
20
|
-
|
|
21
|
-
# Profile type
|
|
22
|
-
attr_accessor :type
|
|
23
|
-
|
|
24
|
-
# Company ID
|
|
17
|
+
# Input schema for creating User
|
|
18
|
+
class UsersInput
|
|
25
19
|
attr_accessor :company_id
|
|
26
20
|
|
|
27
|
-
# User function/role ID
|
|
28
21
|
attr_accessor :function_id
|
|
29
22
|
|
|
30
|
-
#
|
|
23
|
+
# Enum type: StatusCodes
|
|
31
24
|
attr_accessor :status
|
|
32
25
|
|
|
33
|
-
# User email address
|
|
34
26
|
attr_accessor :email_address
|
|
35
27
|
|
|
36
|
-
# User timezone
|
|
37
28
|
attr_accessor :timezone
|
|
38
29
|
|
|
39
|
-
# Account creation date
|
|
40
|
-
attr_accessor :date_created
|
|
41
|
-
|
|
42
|
-
# Last profile update
|
|
43
|
-
attr_accessor :last_updated
|
|
44
|
-
|
|
45
|
-
# Account active status
|
|
46
|
-
attr_accessor :active
|
|
47
|
-
|
|
48
30
|
class EnumAttributeValidator
|
|
49
31
|
attr_reader :datatype
|
|
50
32
|
attr_reader :allowable_values
|
|
@@ -70,16 +52,11 @@ module SparteraApiSdk
|
|
|
70
52
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
71
53
|
def self.attribute_map
|
|
72
54
|
{
|
|
73
|
-
:'id' => :'id',
|
|
74
|
-
:'type' => :'type',
|
|
75
55
|
:'company_id' => :'company_id',
|
|
76
56
|
:'function_id' => :'function_id',
|
|
77
57
|
:'status' => :'status',
|
|
78
58
|
:'email_address' => :'email_address',
|
|
79
|
-
:'timezone' => :'timezone'
|
|
80
|
-
:'date_created' => :'date_created',
|
|
81
|
-
:'last_updated' => :'last_updated',
|
|
82
|
-
:'active' => :'active'
|
|
59
|
+
:'timezone' => :'timezone'
|
|
83
60
|
}
|
|
84
61
|
end
|
|
85
62
|
|
|
@@ -96,16 +73,11 @@ module SparteraApiSdk
|
|
|
96
73
|
# Attribute type mapping.
|
|
97
74
|
def self.openapi_types
|
|
98
75
|
{
|
|
99
|
-
:'id' => :'String',
|
|
100
|
-
:'type' => :'String',
|
|
101
76
|
:'company_id' => :'String',
|
|
102
77
|
:'function_id' => :'Integer',
|
|
103
78
|
:'status' => :'String',
|
|
104
79
|
:'email_address' => :'String',
|
|
105
|
-
:'timezone' => :'String'
|
|
106
|
-
:'date_created' => :'Time',
|
|
107
|
-
:'last_updated' => :'Time',
|
|
108
|
-
:'active' => :'Boolean'
|
|
80
|
+
:'timezone' => :'String'
|
|
109
81
|
}
|
|
110
82
|
end
|
|
111
83
|
|
|
@@ -119,28 +91,22 @@ module SparteraApiSdk
|
|
|
119
91
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
120
92
|
def initialize(attributes = {})
|
|
121
93
|
if (!attributes.is_a?(Hash))
|
|
122
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `SparteraApiSdk::
|
|
94
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SparteraApiSdk::UsersInput` initialize method"
|
|
123
95
|
end
|
|
124
96
|
|
|
125
97
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
126
98
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
127
99
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
128
100
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
129
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `SparteraApiSdk::
|
|
101
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SparteraApiSdk::UsersInput`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
130
102
|
end
|
|
131
103
|
h[k.to_sym] = v
|
|
132
104
|
}
|
|
133
105
|
|
|
134
|
-
if attributes.key?(:'id')
|
|
135
|
-
self.id = attributes[:'id']
|
|
136
|
-
end
|
|
137
|
-
|
|
138
|
-
if attributes.key?(:'type')
|
|
139
|
-
self.type = attributes[:'type']
|
|
140
|
-
end
|
|
141
|
-
|
|
142
106
|
if attributes.key?(:'company_id')
|
|
143
107
|
self.company_id = attributes[:'company_id']
|
|
108
|
+
else
|
|
109
|
+
self.company_id = nil
|
|
144
110
|
end
|
|
145
111
|
|
|
146
112
|
if attributes.key?(:'function_id')
|
|
@@ -158,18 +124,6 @@ module SparteraApiSdk
|
|
|
158
124
|
if attributes.key?(:'timezone')
|
|
159
125
|
self.timezone = attributes[:'timezone']
|
|
160
126
|
end
|
|
161
|
-
|
|
162
|
-
if attributes.key?(:'date_created')
|
|
163
|
-
self.date_created = attributes[:'date_created']
|
|
164
|
-
end
|
|
165
|
-
|
|
166
|
-
if attributes.key?(:'last_updated')
|
|
167
|
-
self.last_updated = attributes[:'last_updated']
|
|
168
|
-
end
|
|
169
|
-
|
|
170
|
-
if attributes.key?(:'active')
|
|
171
|
-
self.active = attributes[:'active']
|
|
172
|
-
end
|
|
173
127
|
end
|
|
174
128
|
|
|
175
129
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -177,6 +131,10 @@ module SparteraApiSdk
|
|
|
177
131
|
def list_invalid_properties
|
|
178
132
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
179
133
|
invalid_properties = Array.new
|
|
134
|
+
if @company_id.nil?
|
|
135
|
+
invalid_properties.push('invalid value for "company_id", company_id cannot be nil.')
|
|
136
|
+
end
|
|
137
|
+
|
|
180
138
|
invalid_properties
|
|
181
139
|
end
|
|
182
140
|
|
|
@@ -184,19 +142,30 @@ module SparteraApiSdk
|
|
|
184
142
|
# @return true if the model is valid
|
|
185
143
|
def valid?
|
|
186
144
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
187
|
-
|
|
188
|
-
|
|
145
|
+
return false if @company_id.nil?
|
|
146
|
+
status_validator = EnumAttributeValidator.new('String', ["ACTIVE", "PENDING", "INACTIVE", "BANNED"])
|
|
147
|
+
return false unless status_validator.valid?(@status)
|
|
189
148
|
true
|
|
190
149
|
end
|
|
191
150
|
|
|
151
|
+
# Custom attribute writer method with validation
|
|
152
|
+
# @param [Object] company_id Value to be assigned
|
|
153
|
+
def company_id=(company_id)
|
|
154
|
+
if company_id.nil?
|
|
155
|
+
fail ArgumentError, 'company_id cannot be nil'
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
@company_id = company_id
|
|
159
|
+
end
|
|
160
|
+
|
|
192
161
|
# Custom attribute writer method checking allowed values (enum).
|
|
193
|
-
# @param [Object]
|
|
194
|
-
def
|
|
195
|
-
validator = EnumAttributeValidator.new('String', ["
|
|
196
|
-
unless validator.valid?(
|
|
197
|
-
fail ArgumentError, "invalid value for \"
|
|
162
|
+
# @param [Object] status Object to be assigned
|
|
163
|
+
def status=(status)
|
|
164
|
+
validator = EnumAttributeValidator.new('String', ["ACTIVE", "PENDING", "INACTIVE", "BANNED"])
|
|
165
|
+
unless validator.valid?(status)
|
|
166
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
|
198
167
|
end
|
|
199
|
-
@
|
|
168
|
+
@status = status
|
|
200
169
|
end
|
|
201
170
|
|
|
202
171
|
# Checks equality by comparing each attribute.
|
|
@@ -204,16 +173,11 @@ module SparteraApiSdk
|
|
|
204
173
|
def ==(o)
|
|
205
174
|
return true if self.equal?(o)
|
|
206
175
|
self.class == o.class &&
|
|
207
|
-
id == o.id &&
|
|
208
|
-
type == o.type &&
|
|
209
176
|
company_id == o.company_id &&
|
|
210
177
|
function_id == o.function_id &&
|
|
211
178
|
status == o.status &&
|
|
212
179
|
email_address == o.email_address &&
|
|
213
|
-
timezone == o.timezone
|
|
214
|
-
date_created == o.date_created &&
|
|
215
|
-
last_updated == o.last_updated &&
|
|
216
|
-
active == o.active
|
|
180
|
+
timezone == o.timezone
|
|
217
181
|
end
|
|
218
182
|
|
|
219
183
|
# @see the `==` method
|
|
@@ -225,7 +189,7 @@ module SparteraApiSdk
|
|
|
225
189
|
# Calculates hash code according to all attributes.
|
|
226
190
|
# @return [Integer] Hash code
|
|
227
191
|
def hash
|
|
228
|
-
[
|
|
192
|
+
[company_id, function_id, status, email_address, timezone].hash
|
|
229
193
|
end
|
|
230
194
|
|
|
231
195
|
# Builds the object from hash
|
|
@@ -0,0 +1,292 @@
|
|
|
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.24.0
|
|
7
|
+
Contact: support@spartera.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.13.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module SparteraApiSdk
|
|
17
|
+
# Update schema for modifying User
|
|
18
|
+
class UsersUpdate
|
|
19
|
+
attr_accessor :company_id
|
|
20
|
+
|
|
21
|
+
attr_accessor :function_id
|
|
22
|
+
|
|
23
|
+
# Enum type: StatusCodes
|
|
24
|
+
attr_accessor :status
|
|
25
|
+
|
|
26
|
+
attr_accessor :email_address
|
|
27
|
+
|
|
28
|
+
attr_accessor :timezone
|
|
29
|
+
|
|
30
|
+
class EnumAttributeValidator
|
|
31
|
+
attr_reader :datatype
|
|
32
|
+
attr_reader :allowable_values
|
|
33
|
+
|
|
34
|
+
def initialize(datatype, allowable_values)
|
|
35
|
+
@allowable_values = allowable_values.map do |value|
|
|
36
|
+
case datatype.to_s
|
|
37
|
+
when /Integer/i
|
|
38
|
+
value.to_i
|
|
39
|
+
when /Float/i
|
|
40
|
+
value.to_f
|
|
41
|
+
else
|
|
42
|
+
value
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def valid?(value)
|
|
48
|
+
!value || allowable_values.include?(value)
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
53
|
+
def self.attribute_map
|
|
54
|
+
{
|
|
55
|
+
:'company_id' => :'company_id',
|
|
56
|
+
:'function_id' => :'function_id',
|
|
57
|
+
:'status' => :'status',
|
|
58
|
+
:'email_address' => :'email_address',
|
|
59
|
+
:'timezone' => :'timezone'
|
|
60
|
+
}
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Returns attribute mapping this model knows about
|
|
64
|
+
def self.acceptable_attribute_map
|
|
65
|
+
attribute_map
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Returns all the JSON keys this model knows about
|
|
69
|
+
def self.acceptable_attributes
|
|
70
|
+
acceptable_attribute_map.values
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Attribute type mapping.
|
|
74
|
+
def self.openapi_types
|
|
75
|
+
{
|
|
76
|
+
:'company_id' => :'String',
|
|
77
|
+
:'function_id' => :'Integer',
|
|
78
|
+
:'status' => :'String',
|
|
79
|
+
:'email_address' => :'String',
|
|
80
|
+
:'timezone' => :'String'
|
|
81
|
+
}
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# List of attributes with nullable: true
|
|
85
|
+
def self.openapi_nullable
|
|
86
|
+
Set.new([
|
|
87
|
+
])
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Initializes the object
|
|
91
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
92
|
+
def initialize(attributes = {})
|
|
93
|
+
if (!attributes.is_a?(Hash))
|
|
94
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SparteraApiSdk::UsersUpdate` initialize method"
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
98
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
99
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
100
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
101
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SparteraApiSdk::UsersUpdate`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
102
|
+
end
|
|
103
|
+
h[k.to_sym] = v
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
if attributes.key?(:'company_id')
|
|
107
|
+
self.company_id = attributes[:'company_id']
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
if attributes.key?(:'function_id')
|
|
111
|
+
self.function_id = attributes[:'function_id']
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if attributes.key?(:'status')
|
|
115
|
+
self.status = attributes[:'status']
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
if attributes.key?(:'email_address')
|
|
119
|
+
self.email_address = attributes[:'email_address']
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
if attributes.key?(:'timezone')
|
|
123
|
+
self.timezone = attributes[:'timezone']
|
|
124
|
+
end
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
128
|
+
# @return Array for valid properties with the reasons
|
|
129
|
+
def list_invalid_properties
|
|
130
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
131
|
+
invalid_properties = Array.new
|
|
132
|
+
invalid_properties
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# Check to see if the all the properties in the model are valid
|
|
136
|
+
# @return true if the model is valid
|
|
137
|
+
def valid?
|
|
138
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
139
|
+
status_validator = EnumAttributeValidator.new('String', ["ACTIVE", "PENDING", "INACTIVE", "BANNED"])
|
|
140
|
+
return false unless status_validator.valid?(@status)
|
|
141
|
+
true
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
145
|
+
# @param [Object] status Object to be assigned
|
|
146
|
+
def status=(status)
|
|
147
|
+
validator = EnumAttributeValidator.new('String', ["ACTIVE", "PENDING", "INACTIVE", "BANNED"])
|
|
148
|
+
unless validator.valid?(status)
|
|
149
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
|
150
|
+
end
|
|
151
|
+
@status = status
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# Checks equality by comparing each attribute.
|
|
155
|
+
# @param [Object] Object to be compared
|
|
156
|
+
def ==(o)
|
|
157
|
+
return true if self.equal?(o)
|
|
158
|
+
self.class == o.class &&
|
|
159
|
+
company_id == o.company_id &&
|
|
160
|
+
function_id == o.function_id &&
|
|
161
|
+
status == o.status &&
|
|
162
|
+
email_address == o.email_address &&
|
|
163
|
+
timezone == o.timezone
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# @see the `==` method
|
|
167
|
+
# @param [Object] Object to be compared
|
|
168
|
+
def eql?(o)
|
|
169
|
+
self == o
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# Calculates hash code according to all attributes.
|
|
173
|
+
# @return [Integer] Hash code
|
|
174
|
+
def hash
|
|
175
|
+
[company_id, function_id, status, email_address, timezone].hash
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# Builds the object from hash
|
|
179
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
180
|
+
# @return [Object] Returns the model itself
|
|
181
|
+
def self.build_from_hash(attributes)
|
|
182
|
+
return nil unless attributes.is_a?(Hash)
|
|
183
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
184
|
+
transformed_hash = {}
|
|
185
|
+
openapi_types.each_pair do |key, type|
|
|
186
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
187
|
+
transformed_hash["#{key}"] = nil
|
|
188
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
189
|
+
# check to ensure the input is an array given that the attribute
|
|
190
|
+
# is documented as an array but the input is not
|
|
191
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
192
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
193
|
+
end
|
|
194
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
195
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
196
|
+
end
|
|
197
|
+
end
|
|
198
|
+
new(transformed_hash)
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
# Deserializes the data based on type
|
|
202
|
+
# @param string type Data type
|
|
203
|
+
# @param string value Value to be deserialized
|
|
204
|
+
# @return [Object] Deserialized data
|
|
205
|
+
def self._deserialize(type, value)
|
|
206
|
+
case type.to_sym
|
|
207
|
+
when :Time
|
|
208
|
+
Time.parse(value)
|
|
209
|
+
when :Date
|
|
210
|
+
Date.parse(value)
|
|
211
|
+
when :String
|
|
212
|
+
value.to_s
|
|
213
|
+
when :Integer
|
|
214
|
+
value.to_i
|
|
215
|
+
when :Float
|
|
216
|
+
value.to_f
|
|
217
|
+
when :Boolean
|
|
218
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
219
|
+
true
|
|
220
|
+
else
|
|
221
|
+
false
|
|
222
|
+
end
|
|
223
|
+
when :Object
|
|
224
|
+
# generic object (usually a Hash), return directly
|
|
225
|
+
value
|
|
226
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
227
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
228
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
229
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
230
|
+
k_type = Regexp.last_match[:k_type]
|
|
231
|
+
v_type = Regexp.last_match[:v_type]
|
|
232
|
+
{}.tap do |hash|
|
|
233
|
+
value.each do |k, v|
|
|
234
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
235
|
+
end
|
|
236
|
+
end
|
|
237
|
+
else # model
|
|
238
|
+
# models (e.g. Pet) or oneOf
|
|
239
|
+
klass = SparteraApiSdk.const_get(type)
|
|
240
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
241
|
+
end
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
# Returns the string representation of the object
|
|
245
|
+
# @return [String] String presentation of the object
|
|
246
|
+
def to_s
|
|
247
|
+
to_hash.to_s
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
251
|
+
# @return [Hash] Returns the object in the form of hash
|
|
252
|
+
def to_body
|
|
253
|
+
to_hash
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
# Returns the object in the form of hash
|
|
257
|
+
# @return [Hash] Returns the object in the form of hash
|
|
258
|
+
def to_hash
|
|
259
|
+
hash = {}
|
|
260
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
261
|
+
value = self.send(attr)
|
|
262
|
+
if value.nil?
|
|
263
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
264
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
hash[param] = _to_hash(value)
|
|
268
|
+
end
|
|
269
|
+
hash
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
# Outputs non-array value in the form of hash
|
|
273
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
274
|
+
# @param [Object] value Any valid value
|
|
275
|
+
# @return [Hash] Returns the value in the form of hash
|
|
276
|
+
def _to_hash(value)
|
|
277
|
+
if value.is_a?(Array)
|
|
278
|
+
value.compact.map { |v| _to_hash(v) }
|
|
279
|
+
elsif value.is_a?(Hash)
|
|
280
|
+
{}.tap do |hash|
|
|
281
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
282
|
+
end
|
|
283
|
+
elsif value.respond_to? :to_hash
|
|
284
|
+
value.to_hash
|
|
285
|
+
else
|
|
286
|
+
value
|
|
287
|
+
end
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
end
|
|
291
|
+
|
|
292
|
+
end
|