From 692ca3eb8609ec724bd1b42bde0add7ef0fd71f2 Mon Sep 17 00:00:00 2001 From: George Khaburzaniya Date: Mon, 8 Aug 2022 12:17:39 -0700 Subject: [PATCH 1/4] Add experimental openapi-generator SDK. --- .gitignore | 41 +- .gitlab-ci.yml | 26 + .openapi-generator-ignore | 23 + .openapi-generator/FILES | 292 + .openapi-generator/VERSION | 1 + .rspec | 2 + .rubocop.yml | 148 + .travis.yml | 16 +- Gemfile | 11 +- README.md | 731 +- Rakefile | 10 +- bin/console | 14 - bin/setup | 6 - docs/Action.md | 26 + docs/ActivateFactorRequest.md | 24 + docs/AddAccessTokenClaimRequest.md | 22 + docs/AddClientAppRequest.md | 20 + docs/AddRoleUsers200ResponseInner.md | 18 + docs/AddScopeRequest.md | 20 + docs/AuthMethod.md | 15 + docs/AuthServerConfiguration.md | 24 + docs/ClientApp.md | 20 + docs/Condition.md | 22 + docs/Connector.md | 26 + docs/CreateAuthorizationServerRequest.md | 22 + docs/CreateEnvironmentVariableRequest.md | 20 + docs/CreateRoles201ResponseInner.md | 18 + docs/DefaultApi.md | 6812 +++++++++++++++ docs/Device.md | 26 + docs/EnrollFactorRequest.md | 28 + docs/Envvar.md | 24 + docs/ErrorStatus.md | 22 + docs/ErrorStatusErrorsInner.md | 20 + docs/FactorInner.md | 32 + docs/FactorInnerFactorData.md | 20 + docs/GenerateMfaToken200Response.md | 24 + docs/GenerateMfaToken422Response.md | 24 + docs/GenerateMfaToken422ResponseDetails.md | 18 + docs/GenerateMfaTokenRequest.md | 20 + docs/GenerateSamlAssertionRequest.md | 26 + docs/GenerateToken200Response.md | 28 + docs/GenerateToken400Response.md | 18 + docs/GenerateTokenRequest.md | 18 + docs/GetAuthorizationServer200Response.md | 24 + docs/GetAvailableFactors200ResponseInner.md | 22 + docs/GetClientApps200ResponseInner.md | 24 + ...etClientApps200ResponseInnerScopesInner.md | 22 + docs/GetRateLimit200Response.md | 20 + docs/GetRateLimit200ResponseData.md | 22 + docs/GetRiskScore200Response.md | 20 + docs/GetRiskScore400Response.md | 18 + docs/GetRiskScoreRequest.md | 30 + docs/GetScoreInsights200Response.md | 20 + docs/GetScoreInsights200ResponseScores.md | 26 + docs/GetUserApps200ResponseInner.md | 32 + docs/Hook.md | 46 + docs/HookConditionsInner.md | 22 + docs/HookOptions.md | 22 + docs/HookStatus.md | 20 + docs/Id.md | 18 + docs/ListAccessTokenClaims200ResponseInner.md | 34 + docs/ListActions200ResponseInner.md | 20 + docs/ListAppUsers200ResponseInner.md | 26 + ...istAuthorizationServers200ResponseInner.md | 24 + ...ionServers200ResponseInnerConfiguration.md | 20 + .../ListConditionOperators200ResponseInner.md | 20 + docs/ListConditionValues200ResponseInner.md | 20 + docs/ListConditions200ResponseInner.md | 20 + ...ppingConditionOperators200ResponseInner.md | 20 + docs/ListMappingConditions200ResponseInner.md | 20 + docs/ListScopes200ResponseInner.md | 22 + docs/Log.md | 24 + docs/Mapping.md | 30 + docs/Registration.md | 22 + docs/RemoveRoleUsersRequest.md | 18 + docs/RevokeTokenRequest.md | 18 + docs/RiskDevice.md | 18 + docs/RiskRule.md | 30 + docs/RiskUser.md | 22 + docs/Role.md | 26 + docs/Rule.md | 30 + docs/RuleId.md | 18 + docs/Schema.md | 56 + docs/Schema1.md | 28 + docs/Schema1AddedBy.md | 20 + docs/SchemaProvisioning.md | 18 + docs/Session.md | 18 + docs/SetRoleApps200ResponseInner.md | 18 + docs/Source.md | 20 + docs/Status.md | 24 + docs/Status1.md | 22 + docs/Status2.md | 18 + docs/Status2Status.md | 24 + docs/TrackEventRequest.md | 34 + docs/UpdateAuthorizationServer400Response.md | 24 + docs/UpdateClientAppRequest.md | 18 + docs/UpdateEnvironmentVariableRequest.md | 18 + docs/UpdateRole200Response.md | 18 + docs/User.md | 90 + docs/VerifyEnrollmentRequest.md | 18 + docs/VerifyFactorRequest.md | 20 + docs/VerifyFactorSaml200Response.md | 20 + docs/VerifyFactorSamlRequest.md | 26 + docs/VerifyFactorVoice200ResponseInner.md | 22 + examples/Gemfile | 3 - examples/Gemfile.lock | 25 - examples/README.md | 19 - examples/all-users-to-csv.rb | 48 - ...get-all-login-events-of-last-day-to-csv.rb | 141 - examples/create-user.rb | 16 - examples/events-to-csv.rb | 93 - ...get-all-login-events-of-last-day-to-csv.rb | 88 - examples/last-app-user-login-to-csv.rb | 72 - examples/list-users.rb | 15 - examples/rails-custom-login-page/.gitignore | 45 - .../rails-custom-login-page/.ruby-version | 1 - examples/rails-custom-login-page/Gemfile | 57 - examples/rails-custom-login-page/Gemfile.lock | 212 - examples/rails-custom-login-page/README.md | 137 - examples/rails-custom-login-page/Rakefile | 6 - .../app/assets/config/manifest.js | 3 - .../app/assets/images/.keep | 0 .../app/assets/javascripts/application.js | 18 - .../app/assets/javascripts/cable.js | 13 - .../app/assets/javascripts/channels/.keep | 0 .../app/assets/javascripts/dashboard.coffee | 3 - .../app/assets/javascripts/home.coffee | 3 - .../app/assets/javascripts/sessions.coffee | 3 - .../app/assets/stylesheets/application.css | 15 - .../app/assets/stylesheets/dashboard.scss | 3 - .../app/assets/stylesheets/home.scss | 3 - .../app/assets/stylesheets/sessions.scss | 3 - .../app/channels/application_cable/channel.rb | 4 - .../channels/application_cable/connection.rb | 4 - .../app/controllers/application_controller.rb | 23 - .../app/controllers/concerns/.keep | 0 .../app/controllers/dashboard_controller.rb | 10 - .../app/controllers/home_controller.rb | 5 - .../app/controllers/sessions_controller.rb | 46 - .../app/controllers/users_controller.rb | 120 - .../app/helpers/application_helper.rb | 2 - .../app/helpers/dashboard_helper.rb | 28 - .../app/helpers/home_helper.rb | 2 - .../app/helpers/sessions_helper.rb | 87 - .../app/helpers/users_helper.rb | 3 - .../app/jobs/application_job.rb | 2 - .../app/mailers/application_mailer.rb | 4 - .../app/models/application_record.rb | 3 - .../app/models/concerns/.keep | 0 .../app/views/dashboard/index.html.erb | 43 - .../app/views/home/index.html.erb | 272 - .../app/views/layouts/application.html.erb | 31 - .../app/views/layouts/mailer.html.erb | 13 - .../app/views/layouts/mailer.text.erb | 1 - .../app/views/users/_form.html.erb | 1 - .../app/views/users/_user.json.jbuilder | 2 - .../app/views/users/edit.html.erb | 33 - .../app/views/users/index.html.erb | 33 - .../app/views/users/index.json.jbuilder | 1 - .../app/views/users/new.html.erb | 60 - .../app/views/users/onboard.html.erb | 54 - .../app/views/users/show.html.erb | 17 - .../app/views/users/show.json.jbuilder | 1 - examples/rails-custom-login-page/bin/bundle | 3 - examples/rails-custom-login-page/bin/rails | 9 - examples/rails-custom-login-page/bin/rake | 9 - examples/rails-custom-login-page/bin/setup | 38 - examples/rails-custom-login-page/bin/spring | 17 - examples/rails-custom-login-page/bin/update | 29 - examples/rails-custom-login-page/bin/yarn | 11 - examples/rails-custom-login-page/config.ru | 5 - .../config/application.rb | 18 - .../rails-custom-login-page/config/boot.rb | 3 - .../rails-custom-login-page/config/cable.yml | 10 - .../config/database.yml | 25 - .../config/environment.rb | 5 - .../config/environments/development.rb | 54 - .../config/environments/production.rb | 91 - .../config/environments/test.rb | 42 - .../application_controller_renderer.rb | 8 - .../config/initializers/assets.rb | 14 - .../initializers/backtrace_silencers.rb | 7 - .../config/initializers/cookies_serializer.rb | 5 - .../initializers/filter_parameter_logging.rb | 4 - .../config/initializers/inflections.rb | 16 - .../config/initializers/mime_types.rb | 4 - .../config/initializers/onelogin.rb | 6 - .../config/initializers/wrap_parameters.rb | 14 - .../config/locales/en.yml | 33 - .../rails-custom-login-page/config/puma.rb | 56 - .../rails-custom-login-page/config/routes.rb | 23 - .../config/secrets.yml.sample | 38 - .../rails-custom-login-page/config/spring.rb | 6 - examples/rails-custom-login-page/db/seeds.rb | 7 - .../rails-custom-login-page/lib/assets/.keep | 0 .../rails-custom-login-page/lib/tasks/.keep | 0 examples/rails-custom-login-page/package.json | 5 - .../rails-custom-login-page/public/404.html | 67 - .../rails-custom-login-page/public/422.html | 67 - .../rails-custom-login-page/public/500.html | 66 - .../public/apple-touch-icon-precomposed.png | 0 .../public/apple-touch-icon.png | 0 .../public/favicon.ico | 0 .../rails-custom-login-page/public/robots.txt | 1 - .../test/application_system_test_case.rb | 5 - .../test/controllers/.keep | 0 .../controllers/dashboard_controller_test.rb | 9 - .../test/controllers/home_controller_test.rb | 9 - .../controllers/sessions_controller_test.rb | 7 - .../test/controllers/users_controller_test.rb | 48 - .../test/fixtures/.keep | 0 .../test/fixtures/files/.keep | 0 .../test/helpers/.keep | 0 .../test/integration/.keep | 0 .../test/mailers/.keep | 0 .../rails-custom-login-page/test/models/.keep | 0 .../rails-custom-login-page/test/system/.keep | 0 .../test/test_helper.rb | 9 - examples/rails-custom-login-page/vendor/.keep | 0 git_push.sh | 57 + lib/onelogin.rb | 1 - lib/onelogin/api.rb | 2 - lib/onelogin/api/apiexception.rb | 10 - lib/onelogin/api/client.rb | 2954 ------- lib/onelogin/api/cursor.rb | 114 - lib/onelogin/api/models.rb | 26 - lib/onelogin/api/models/app.rb | 22 - lib/onelogin/api/models/auth_factor.rb | 16 - lib/onelogin/api/models/connector_basic.rb | 20 - lib/onelogin/api/models/device.rb | 18 - lib/onelogin/api/models/embed_app.rb | 31 - lib/onelogin/api/models/event.rb | 54 - lib/onelogin/api/models/event_type.rb | 17 - .../api/models/factor_enrollment_response.rb | 22 - lib/onelogin/api/models/group.rb | 17 - lib/onelogin/api/models/mfa.rb | 26 - lib/onelogin/api/models/mfa_token.rb | 18 - lib/onelogin/api/models/onelogin_app.rb | 62 - lib/onelogin/api/models/onelogin_app_basic.rb | 51 - lib/onelogin/api/models/onelogin_app_v1.rb | 22 - lib/onelogin/api/models/onelogin_token.rb | 20 - lib/onelogin/api/models/otp_device.rb | 25 - lib/onelogin/api/models/privilege.rb | 51 - lib/onelogin/api/models/rate_limit.rb | 17 - lib/onelogin/api/models/role.rb | 16 - .../api/models/saml_endpoint_response.rb | 18 - lib/onelogin/api/models/session_token_info.rb | 21 - .../api/models/session_token_mfa_info.rb | 26 - lib/onelogin/api/models/statement.rb | 36 - lib/onelogin/api/models/user.rb | 135 - lib/onelogin/api/models/user_data.rb | 13 - lib/onelogin/api/models/user_metadata.rb | 13 - lib/onelogin/api/util.rb | 13 - lib/onelogin/api/util/constants.rb | 177 - lib/onelogin/api/util/parser.rb | 56 - lib/onelogin/api/util/url_builder.rb | 24 - lib/onelogin/version.rb | 3 - lib/openapi_client.rb | 130 + lib/openapi_client/api/default_api.rb | 7334 +++++++++++++++++ lib/openapi_client/api_client.rb | 391 + lib/openapi_client/api_error.rb | 57 + lib/openapi_client/configuration.rb | 282 + lib/openapi_client/models/action.rb | 262 + .../models/activate_factor_request.rb | 250 + .../models/add_access_token_claim_request.rb | 237 + .../models/add_client_app_request.rb | 230 + .../add_role_users200_response_inner.rb | 219 + .../models/add_scope_request.rb | 228 + lib/openapi_client/models/auth_method.rb | 43 + .../models/auth_server_configuration.rb | 248 + lib/openapi_client/models/client_app.rb | 228 + lib/openapi_client/models/condition.rb | 240 + lib/openapi_client/models/connector.rb | 259 + .../create_authorization_server_request.rb | 237 + .../create_environment_variable_request.rb | 240 + .../models/create_roles201_response_inner.rb | 219 + lib/openapi_client/models/device.rb | 255 + .../models/enroll_factor_request.rb | 280 + lib/openapi_client/models/envvar.rb | 250 + lib/openapi_client/models/error_status.rb | 239 + .../models/error_status_errors_inner.rb | 230 + lib/openapi_client/models/factor_inner.rb | 323 + .../models/factor_inner_factor_data.rb | 231 + .../models/generate_mfa_token200_response.rb | 250 + .../models/generate_mfa_token422_response.rb | 246 + .../generate_mfa_token422_response_details.rb | 221 + .../models/generate_mfa_token_request.rb | 230 + .../models/generate_saml_assertion_request.rb | 280 + .../models/generate_token200_response.rb | 264 + .../models/generate_token400_response.rb | 219 + .../models/generate_token_request.rb | 253 + .../get_authorization_server200_response.rb | 246 + ...get_available_factors200_response_inner.rb | 240 + .../get_client_apps200_response_inner.rb | 248 + ...ent_apps200_response_inner_scopes_inner.rb | 237 + .../models/get_rate_limit200_response.rb | 228 + .../models/get_rate_limit200_response_data.rb | 237 + .../models/get_risk_score200_response.rb | 256 + .../models/get_risk_score400_response.rb | 221 + .../models/get_risk_score_request.rb | 291 + .../models/get_score_insights200_response.rb | 228 + .../get_score_insights200_response_scores.rb | 255 + .../models/get_user_apps200_response_inner.rb | 335 + lib/openapi_client/models/hook.rb | 462 ++ .../models/hook_conditions_inner.rb | 237 + lib/openapi_client/models/hook_options.rb | 238 + lib/openapi_client/models/hook_status.rb | 228 + lib/openapi_client/models/id.rb | 219 + ...t_access_token_claims200_response_inner.rb | 293 + .../models/list_actions200_response_inner.rb | 230 + .../list_app_users200_response_inner.rb | 255 + ...authorization_servers200_response_inner.rb | 246 + ...servers200_response_inner_configuration.rb | 230 + ...t_condition_operators200_response_inner.rb | 230 + ...list_condition_values200_response_inner.rb | 228 + .../list_conditions200_response_inner.rb | 230 + ...g_condition_operators200_response_inner.rb | 230 + ...st_mapping_conditions200_response_inner.rb | 230 + .../models/list_scopes200_response_inner.rb | 237 + lib/openapi_client/models/log.rb | 248 + lib/openapi_client/models/mapping.rb | 342 + lib/openapi_client/models/registration.rb | 274 + .../models/remove_role_users_request.rb | 221 + .../models/revoke_token_request.rb | 219 + lib/openapi_client/models/risk_device.rb | 221 + lib/openapi_client/models/risk_rule.rb | 325 + lib/openapi_client/models/risk_user.rb | 248 + lib/openapi_client/models/role.rb | 266 + lib/openapi_client/models/rule.rb | 317 + lib/openapi_client/models/rule_id.rb | 219 + lib/openapi_client/models/schema.rb | 441 + lib/openapi_client/models/schema1.rb | 265 + lib/openapi_client/models/schema1_added_by.rb | 228 + .../models/schema_provisioning.rb | 220 + lib/openapi_client/models/session.rb | 221 + .../models/set_role_apps200_response_inner.rb | 220 + lib/openapi_client/models/source.rb | 230 + lib/openapi_client/models/status.rb | 246 + lib/openapi_client/models/status1.rb | 237 + lib/openapi_client/models/status2.rb | 219 + lib/openapi_client/models/status2_status.rb | 246 + .../models/track_event_request.rb | 316 + ...update_authorization_server400_response.rb | 246 + .../models/update_client_app_request.rb | 221 + .../update_environment_variable_request.rb | 225 + .../models/update_role200_response.rb | 219 + lib/openapi_client/models/user.rb | 615 ++ .../models/verify_enrollment_request.rb | 219 + .../models/verify_factor_request.rb | 230 + .../models/verify_factor_saml200_response.rb | 230 + .../models/verify_factor_saml_request.rb | 275 + .../verify_factor_voice200_response_inner.rb | 271 + lib/openapi_client/version.rb | 15 + openapi_client.gemspec | 38 + spec/api/default_api_spec.rb | 1259 +++ spec/api_client_spec.rb | 226 + spec/configuration_spec.rb | 42 + spec/lib/onelogin/api/client_spec.rb | 49 - .../lib/onelogin/api/models/embed_app_spec.rb | 71 - spec/lib/onelogin/api/models/event_spec.rb | 17 - spec/lib/onelogin_spec.rb | 7 - spec/models/action_spec.rb | 58 + spec/models/activate_factor_request_spec.rb | 52 + .../add_access_token_claim_request_spec.rb | 46 + spec/models/add_client_app_request_spec.rb | 40 + .../add_role_users200_response_inner_spec.rb | 34 + spec/models/add_scope_request_spec.rb | 40 + spec/models/auth_method_spec.rb | 28 + spec/models/auth_server_configuration_spec.rb | 52 + spec/models/client_app_spec.rb | 40 + spec/models/condition_spec.rb | 46 + spec/models/connector_spec.rb | 58 + ...reate_authorization_server_request_spec.rb | 46 + ...reate_environment_variable_request_spec.rb | 40 + .../create_roles201_response_inner_spec.rb | 34 + spec/models/device_spec.rb | 58 + spec/models/enroll_factor_request_spec.rb | 64 + spec/models/envvar_spec.rb | 52 + spec/models/error_status_errors_inner_spec.rb | 40 + spec/models/error_status_spec.rb | 46 + spec/models/factor_inner_factor_data_spec.rb | 40 + spec/models/factor_inner_spec.rb | 80 + .../generate_mfa_token200_response_spec.rb | 52 + ...rate_mfa_token422_response_details_spec.rb | 34 + .../generate_mfa_token422_response_spec.rb | 52 + .../models/generate_mfa_token_request_spec.rb | 40 + .../generate_saml_assertion_request_spec.rb | 58 + .../models/generate_token200_response_spec.rb | 64 + .../models/generate_token400_response_spec.rb | 34 + spec/models/generate_token_request_spec.rb | 38 + ...t_authorization_server200_response_spec.rb | 52 + ...vailable_factors200_response_inner_spec.rb | 46 + ...pps200_response_inner_scopes_inner_spec.rb | 46 + .../get_client_apps200_response_inner_spec.rb | 52 + .../get_rate_limit200_response_data_spec.rb | 46 + .../models/get_rate_limit200_response_spec.rb | 40 + .../models/get_risk_score200_response_spec.rb | 40 + .../models/get_risk_score400_response_spec.rb | 34 + spec/models/get_risk_score_request_spec.rb | 70 + ..._score_insights200_response_scores_spec.rb | 58 + .../get_score_insights200_response_spec.rb | 40 + .../get_user_apps200_response_inner_spec.rb | 84 + spec/models/hook_conditions_inner_spec.rb | 46 + spec/models/hook_options_spec.rb | 46 + spec/models/hook_spec.rb | 122 + spec/models/hook_status_spec.rb | 40 + spec/models/id_spec.rb | 34 + ...ess_token_claims200_response_inner_spec.rb | 82 + .../list_actions200_response_inner_spec.rb | 40 + .../list_app_users200_response_inner_spec.rb | 58 + ...rs200_response_inner_configuration_spec.rb | 40 + ...rization_servers200_response_inner_spec.rb | 52 + ...dition_operators200_response_inner_spec.rb | 40 + ...condition_values200_response_inner_spec.rb | 40 + .../list_conditions200_response_inner_spec.rb | 40 + ...dition_operators200_response_inner_spec.rb | 40 + ...pping_conditions200_response_inner_spec.rb | 40 + .../list_scopes200_response_inner_spec.rb | 46 + spec/models/log_spec.rb | 52 + spec/models/mapping_spec.rb | 74 + spec/models/registration_spec.rb | 50 + spec/models/remove_role_users_request_spec.rb | 34 + spec/models/revoke_token_request_spec.rb | 34 + spec/models/risk_device_spec.rb | 34 + spec/models/risk_rule_spec.rb | 78 + spec/models/risk_user_spec.rb | 46 + spec/models/role_spec.rb | 58 + spec/models/rule_id_spec.rb | 34 + spec/models/rule_spec.rb | 74 + spec/models/schema1_added_by_spec.rb | 40 + spec/models/schema1_spec.rb | 64 + spec/models/schema_provisioning_spec.rb | 34 + spec/models/schema_spec.rb | 152 + spec/models/session_spec.rb | 34 + .../set_role_apps200_response_inner_spec.rb | 34 + spec/models/source_spec.rb | 40 + spec/models/status1_spec.rb | 46 + spec/models/status2_spec.rb | 34 + spec/models/status2_status_spec.rb | 52 + spec/models/status_spec.rb | 52 + spec/models/track_event_request_spec.rb | 82 + ...e_authorization_server400_response_spec.rb | 52 + spec/models/update_client_app_request_spec.rb | 34 + ...pdate_environment_variable_request_spec.rb | 34 + spec/models/update_role200_response_spec.rb | 34 + spec/models/user_spec.rb | 258 + spec/models/verify_enrollment_request_spec.rb | 34 + spec/models/verify_factor_request_spec.rb | 40 + .../verify_factor_saml200_response_spec.rb | 40 + .../models/verify_factor_saml_request_spec.rb | 58 + ...ify_factor_voice200_response_inner_spec.rb | 50 + spec/spec_helper.rb | 111 +- 452 files changed, 47016 insertions(+), 7694 deletions(-) create mode 100644 .gitlab-ci.yml create mode 100644 .openapi-generator-ignore create mode 100644 .openapi-generator/FILES create mode 100644 .openapi-generator/VERSION create mode 100644 .rspec create mode 100644 .rubocop.yml delete mode 100755 bin/console delete mode 100755 bin/setup create mode 100644 docs/Action.md create mode 100644 docs/ActivateFactorRequest.md create mode 100644 docs/AddAccessTokenClaimRequest.md create mode 100644 docs/AddClientAppRequest.md create mode 100644 docs/AddRoleUsers200ResponseInner.md create mode 100644 docs/AddScopeRequest.md create mode 100644 docs/AuthMethod.md create mode 100644 docs/AuthServerConfiguration.md create mode 100644 docs/ClientApp.md create mode 100644 docs/Condition.md create mode 100644 docs/Connector.md create mode 100644 docs/CreateAuthorizationServerRequest.md create mode 100644 docs/CreateEnvironmentVariableRequest.md create mode 100644 docs/CreateRoles201ResponseInner.md create mode 100644 docs/DefaultApi.md create mode 100644 docs/Device.md create mode 100644 docs/EnrollFactorRequest.md create mode 100644 docs/Envvar.md create mode 100644 docs/ErrorStatus.md create mode 100644 docs/ErrorStatusErrorsInner.md create mode 100644 docs/FactorInner.md create mode 100644 docs/FactorInnerFactorData.md create mode 100644 docs/GenerateMfaToken200Response.md create mode 100644 docs/GenerateMfaToken422Response.md create mode 100644 docs/GenerateMfaToken422ResponseDetails.md create mode 100644 docs/GenerateMfaTokenRequest.md create mode 100644 docs/GenerateSamlAssertionRequest.md create mode 100644 docs/GenerateToken200Response.md create mode 100644 docs/GenerateToken400Response.md create mode 100644 docs/GenerateTokenRequest.md create mode 100644 docs/GetAuthorizationServer200Response.md create mode 100644 docs/GetAvailableFactors200ResponseInner.md create mode 100644 docs/GetClientApps200ResponseInner.md create mode 100644 docs/GetClientApps200ResponseInnerScopesInner.md create mode 100644 docs/GetRateLimit200Response.md create mode 100644 docs/GetRateLimit200ResponseData.md create mode 100644 docs/GetRiskScore200Response.md create mode 100644 docs/GetRiskScore400Response.md create mode 100644 docs/GetRiskScoreRequest.md create mode 100644 docs/GetScoreInsights200Response.md create mode 100644 docs/GetScoreInsights200ResponseScores.md create mode 100644 docs/GetUserApps200ResponseInner.md create mode 100644 docs/Hook.md create mode 100644 docs/HookConditionsInner.md create mode 100644 docs/HookOptions.md create mode 100644 docs/HookStatus.md create mode 100644 docs/Id.md create mode 100644 docs/ListAccessTokenClaims200ResponseInner.md create mode 100644 docs/ListActions200ResponseInner.md create mode 100644 docs/ListAppUsers200ResponseInner.md create mode 100644 docs/ListAuthorizationServers200ResponseInner.md create mode 100644 docs/ListAuthorizationServers200ResponseInnerConfiguration.md create mode 100644 docs/ListConditionOperators200ResponseInner.md create mode 100644 docs/ListConditionValues200ResponseInner.md create mode 100644 docs/ListConditions200ResponseInner.md create mode 100644 docs/ListMappingConditionOperators200ResponseInner.md create mode 100644 docs/ListMappingConditions200ResponseInner.md create mode 100644 docs/ListScopes200ResponseInner.md create mode 100644 docs/Log.md create mode 100644 docs/Mapping.md create mode 100644 docs/Registration.md create mode 100644 docs/RemoveRoleUsersRequest.md create mode 100644 docs/RevokeTokenRequest.md create mode 100644 docs/RiskDevice.md create mode 100644 docs/RiskRule.md create mode 100644 docs/RiskUser.md create mode 100644 docs/Role.md create mode 100644 docs/Rule.md create mode 100644 docs/RuleId.md create mode 100644 docs/Schema.md create mode 100644 docs/Schema1.md create mode 100644 docs/Schema1AddedBy.md create mode 100644 docs/SchemaProvisioning.md create mode 100644 docs/Session.md create mode 100644 docs/SetRoleApps200ResponseInner.md create mode 100644 docs/Source.md create mode 100644 docs/Status.md create mode 100644 docs/Status1.md create mode 100644 docs/Status2.md create mode 100644 docs/Status2Status.md create mode 100644 docs/TrackEventRequest.md create mode 100644 docs/UpdateAuthorizationServer400Response.md create mode 100644 docs/UpdateClientAppRequest.md create mode 100644 docs/UpdateEnvironmentVariableRequest.md create mode 100644 docs/UpdateRole200Response.md create mode 100644 docs/User.md create mode 100644 docs/VerifyEnrollmentRequest.md create mode 100644 docs/VerifyFactorRequest.md create mode 100644 docs/VerifyFactorSaml200Response.md create mode 100644 docs/VerifyFactorSamlRequest.md create mode 100644 docs/VerifyFactorVoice200ResponseInner.md delete mode 100644 examples/Gemfile delete mode 100644 examples/Gemfile.lock delete mode 100644 examples/README.md delete mode 100644 examples/all-users-to-csv.rb delete mode 100644 examples/another-get-all-login-events-of-last-day-to-csv.rb delete mode 100644 examples/create-user.rb delete mode 100644 examples/events-to-csv.rb delete mode 100644 examples/get-all-login-events-of-last-day-to-csv.rb delete mode 100644 examples/last-app-user-login-to-csv.rb delete mode 100644 examples/list-users.rb delete mode 100644 examples/rails-custom-login-page/.gitignore delete mode 100644 examples/rails-custom-login-page/.ruby-version delete mode 100644 examples/rails-custom-login-page/Gemfile delete mode 100644 examples/rails-custom-login-page/Gemfile.lock delete mode 100644 examples/rails-custom-login-page/README.md delete mode 100644 examples/rails-custom-login-page/Rakefile delete mode 100644 examples/rails-custom-login-page/app/assets/config/manifest.js delete mode 100644 examples/rails-custom-login-page/app/assets/images/.keep delete mode 100644 examples/rails-custom-login-page/app/assets/javascripts/application.js delete mode 100644 examples/rails-custom-login-page/app/assets/javascripts/cable.js delete mode 100644 examples/rails-custom-login-page/app/assets/javascripts/channels/.keep delete mode 100644 examples/rails-custom-login-page/app/assets/javascripts/dashboard.coffee delete mode 100644 examples/rails-custom-login-page/app/assets/javascripts/home.coffee delete mode 100644 examples/rails-custom-login-page/app/assets/javascripts/sessions.coffee delete mode 100644 examples/rails-custom-login-page/app/assets/stylesheets/application.css delete mode 100644 examples/rails-custom-login-page/app/assets/stylesheets/dashboard.scss delete mode 100644 examples/rails-custom-login-page/app/assets/stylesheets/home.scss delete mode 100644 examples/rails-custom-login-page/app/assets/stylesheets/sessions.scss delete mode 100644 examples/rails-custom-login-page/app/channels/application_cable/channel.rb delete mode 100644 examples/rails-custom-login-page/app/channels/application_cable/connection.rb delete mode 100644 examples/rails-custom-login-page/app/controllers/application_controller.rb delete mode 100644 examples/rails-custom-login-page/app/controllers/concerns/.keep delete mode 100644 examples/rails-custom-login-page/app/controllers/dashboard_controller.rb delete mode 100644 examples/rails-custom-login-page/app/controllers/home_controller.rb delete mode 100644 examples/rails-custom-login-page/app/controllers/sessions_controller.rb delete mode 100644 examples/rails-custom-login-page/app/controllers/users_controller.rb delete mode 100644 examples/rails-custom-login-page/app/helpers/application_helper.rb delete mode 100644 examples/rails-custom-login-page/app/helpers/dashboard_helper.rb delete mode 100644 examples/rails-custom-login-page/app/helpers/home_helper.rb delete mode 100644 examples/rails-custom-login-page/app/helpers/sessions_helper.rb delete mode 100644 examples/rails-custom-login-page/app/helpers/users_helper.rb delete mode 100644 examples/rails-custom-login-page/app/jobs/application_job.rb delete mode 100644 examples/rails-custom-login-page/app/mailers/application_mailer.rb delete mode 100644 examples/rails-custom-login-page/app/models/application_record.rb delete mode 100644 examples/rails-custom-login-page/app/models/concerns/.keep delete mode 100644 examples/rails-custom-login-page/app/views/dashboard/index.html.erb delete mode 100644 examples/rails-custom-login-page/app/views/home/index.html.erb delete mode 100644 examples/rails-custom-login-page/app/views/layouts/application.html.erb delete mode 100644 examples/rails-custom-login-page/app/views/layouts/mailer.html.erb delete mode 100644 examples/rails-custom-login-page/app/views/layouts/mailer.text.erb delete mode 100644 examples/rails-custom-login-page/app/views/users/_form.html.erb delete mode 100644 examples/rails-custom-login-page/app/views/users/_user.json.jbuilder delete mode 100644 examples/rails-custom-login-page/app/views/users/edit.html.erb delete mode 100644 examples/rails-custom-login-page/app/views/users/index.html.erb delete mode 100644 examples/rails-custom-login-page/app/views/users/index.json.jbuilder delete mode 100644 examples/rails-custom-login-page/app/views/users/new.html.erb delete mode 100644 examples/rails-custom-login-page/app/views/users/onboard.html.erb delete mode 100644 examples/rails-custom-login-page/app/views/users/show.html.erb delete mode 100644 examples/rails-custom-login-page/app/views/users/show.json.jbuilder delete mode 100755 examples/rails-custom-login-page/bin/bundle delete mode 100755 examples/rails-custom-login-page/bin/rails delete mode 100755 examples/rails-custom-login-page/bin/rake delete mode 100755 examples/rails-custom-login-page/bin/setup delete mode 100755 examples/rails-custom-login-page/bin/spring delete mode 100755 examples/rails-custom-login-page/bin/update delete mode 100755 examples/rails-custom-login-page/bin/yarn delete mode 100644 examples/rails-custom-login-page/config.ru delete mode 100644 examples/rails-custom-login-page/config/application.rb delete mode 100644 examples/rails-custom-login-page/config/boot.rb delete mode 100644 examples/rails-custom-login-page/config/cable.yml delete mode 100644 examples/rails-custom-login-page/config/database.yml delete mode 100644 examples/rails-custom-login-page/config/environment.rb delete mode 100644 examples/rails-custom-login-page/config/environments/development.rb delete mode 100644 examples/rails-custom-login-page/config/environments/production.rb delete mode 100644 examples/rails-custom-login-page/config/environments/test.rb delete mode 100644 examples/rails-custom-login-page/config/initializers/application_controller_renderer.rb delete mode 100644 examples/rails-custom-login-page/config/initializers/assets.rb delete mode 100644 examples/rails-custom-login-page/config/initializers/backtrace_silencers.rb delete mode 100644 examples/rails-custom-login-page/config/initializers/cookies_serializer.rb delete mode 100644 examples/rails-custom-login-page/config/initializers/filter_parameter_logging.rb delete mode 100644 examples/rails-custom-login-page/config/initializers/inflections.rb delete mode 100644 examples/rails-custom-login-page/config/initializers/mime_types.rb delete mode 100644 examples/rails-custom-login-page/config/initializers/onelogin.rb delete mode 100644 examples/rails-custom-login-page/config/initializers/wrap_parameters.rb delete mode 100644 examples/rails-custom-login-page/config/locales/en.yml delete mode 100644 examples/rails-custom-login-page/config/puma.rb delete mode 100644 examples/rails-custom-login-page/config/routes.rb delete mode 100644 examples/rails-custom-login-page/config/secrets.yml.sample delete mode 100644 examples/rails-custom-login-page/config/spring.rb delete mode 100644 examples/rails-custom-login-page/db/seeds.rb delete mode 100644 examples/rails-custom-login-page/lib/assets/.keep delete mode 100644 examples/rails-custom-login-page/lib/tasks/.keep delete mode 100644 examples/rails-custom-login-page/package.json delete mode 100644 examples/rails-custom-login-page/public/404.html delete mode 100644 examples/rails-custom-login-page/public/422.html delete mode 100644 examples/rails-custom-login-page/public/500.html delete mode 100644 examples/rails-custom-login-page/public/apple-touch-icon-precomposed.png delete mode 100644 examples/rails-custom-login-page/public/apple-touch-icon.png delete mode 100644 examples/rails-custom-login-page/public/favicon.ico delete mode 100644 examples/rails-custom-login-page/public/robots.txt delete mode 100644 examples/rails-custom-login-page/test/application_system_test_case.rb delete mode 100644 examples/rails-custom-login-page/test/controllers/.keep delete mode 100644 examples/rails-custom-login-page/test/controllers/dashboard_controller_test.rb delete mode 100644 examples/rails-custom-login-page/test/controllers/home_controller_test.rb delete mode 100644 examples/rails-custom-login-page/test/controllers/sessions_controller_test.rb delete mode 100644 examples/rails-custom-login-page/test/controllers/users_controller_test.rb delete mode 100644 examples/rails-custom-login-page/test/fixtures/.keep delete mode 100644 examples/rails-custom-login-page/test/fixtures/files/.keep delete mode 100644 examples/rails-custom-login-page/test/helpers/.keep delete mode 100644 examples/rails-custom-login-page/test/integration/.keep delete mode 100644 examples/rails-custom-login-page/test/mailers/.keep delete mode 100644 examples/rails-custom-login-page/test/models/.keep delete mode 100644 examples/rails-custom-login-page/test/system/.keep delete mode 100644 examples/rails-custom-login-page/test/test_helper.rb delete mode 100644 examples/rails-custom-login-page/vendor/.keep create mode 100644 git_push.sh delete mode 100644 lib/onelogin.rb delete mode 100644 lib/onelogin/api.rb delete mode 100644 lib/onelogin/api/apiexception.rb delete mode 100644 lib/onelogin/api/client.rb delete mode 100644 lib/onelogin/api/cursor.rb delete mode 100644 lib/onelogin/api/models.rb delete mode 100644 lib/onelogin/api/models/app.rb delete mode 100644 lib/onelogin/api/models/auth_factor.rb delete mode 100644 lib/onelogin/api/models/connector_basic.rb delete mode 100644 lib/onelogin/api/models/device.rb delete mode 100644 lib/onelogin/api/models/embed_app.rb delete mode 100644 lib/onelogin/api/models/event.rb delete mode 100644 lib/onelogin/api/models/event_type.rb delete mode 100644 lib/onelogin/api/models/factor_enrollment_response.rb delete mode 100644 lib/onelogin/api/models/group.rb delete mode 100644 lib/onelogin/api/models/mfa.rb delete mode 100644 lib/onelogin/api/models/mfa_token.rb delete mode 100644 lib/onelogin/api/models/onelogin_app.rb delete mode 100644 lib/onelogin/api/models/onelogin_app_basic.rb delete mode 100644 lib/onelogin/api/models/onelogin_app_v1.rb delete mode 100644 lib/onelogin/api/models/onelogin_token.rb delete mode 100644 lib/onelogin/api/models/otp_device.rb delete mode 100644 lib/onelogin/api/models/privilege.rb delete mode 100644 lib/onelogin/api/models/rate_limit.rb delete mode 100644 lib/onelogin/api/models/role.rb delete mode 100644 lib/onelogin/api/models/saml_endpoint_response.rb delete mode 100644 lib/onelogin/api/models/session_token_info.rb delete mode 100644 lib/onelogin/api/models/session_token_mfa_info.rb delete mode 100644 lib/onelogin/api/models/statement.rb delete mode 100644 lib/onelogin/api/models/user.rb delete mode 100644 lib/onelogin/api/models/user_data.rb delete mode 100644 lib/onelogin/api/models/user_metadata.rb delete mode 100644 lib/onelogin/api/util.rb delete mode 100644 lib/onelogin/api/util/constants.rb delete mode 100644 lib/onelogin/api/util/parser.rb delete mode 100644 lib/onelogin/api/util/url_builder.rb delete mode 100644 lib/onelogin/version.rb create mode 100644 lib/openapi_client.rb create mode 100644 lib/openapi_client/api/default_api.rb create mode 100644 lib/openapi_client/api_client.rb create mode 100644 lib/openapi_client/api_error.rb create mode 100644 lib/openapi_client/configuration.rb create mode 100644 lib/openapi_client/models/action.rb create mode 100644 lib/openapi_client/models/activate_factor_request.rb create mode 100644 lib/openapi_client/models/add_access_token_claim_request.rb create mode 100644 lib/openapi_client/models/add_client_app_request.rb create mode 100644 lib/openapi_client/models/add_role_users200_response_inner.rb create mode 100644 lib/openapi_client/models/add_scope_request.rb create mode 100644 lib/openapi_client/models/auth_method.rb create mode 100644 lib/openapi_client/models/auth_server_configuration.rb create mode 100644 lib/openapi_client/models/client_app.rb create mode 100644 lib/openapi_client/models/condition.rb create mode 100644 lib/openapi_client/models/connector.rb create mode 100644 lib/openapi_client/models/create_authorization_server_request.rb create mode 100644 lib/openapi_client/models/create_environment_variable_request.rb create mode 100644 lib/openapi_client/models/create_roles201_response_inner.rb create mode 100644 lib/openapi_client/models/device.rb create mode 100644 lib/openapi_client/models/enroll_factor_request.rb create mode 100644 lib/openapi_client/models/envvar.rb create mode 100644 lib/openapi_client/models/error_status.rb create mode 100644 lib/openapi_client/models/error_status_errors_inner.rb create mode 100644 lib/openapi_client/models/factor_inner.rb create mode 100644 lib/openapi_client/models/factor_inner_factor_data.rb create mode 100644 lib/openapi_client/models/generate_mfa_token200_response.rb create mode 100644 lib/openapi_client/models/generate_mfa_token422_response.rb create mode 100644 lib/openapi_client/models/generate_mfa_token422_response_details.rb create mode 100644 lib/openapi_client/models/generate_mfa_token_request.rb create mode 100644 lib/openapi_client/models/generate_saml_assertion_request.rb create mode 100644 lib/openapi_client/models/generate_token200_response.rb create mode 100644 lib/openapi_client/models/generate_token400_response.rb create mode 100644 lib/openapi_client/models/generate_token_request.rb create mode 100644 lib/openapi_client/models/get_authorization_server200_response.rb create mode 100644 lib/openapi_client/models/get_available_factors200_response_inner.rb create mode 100644 lib/openapi_client/models/get_client_apps200_response_inner.rb create mode 100644 lib/openapi_client/models/get_client_apps200_response_inner_scopes_inner.rb create mode 100644 lib/openapi_client/models/get_rate_limit200_response.rb create mode 100644 lib/openapi_client/models/get_rate_limit200_response_data.rb create mode 100644 lib/openapi_client/models/get_risk_score200_response.rb create mode 100644 lib/openapi_client/models/get_risk_score400_response.rb create mode 100644 lib/openapi_client/models/get_risk_score_request.rb create mode 100644 lib/openapi_client/models/get_score_insights200_response.rb create mode 100644 lib/openapi_client/models/get_score_insights200_response_scores.rb create mode 100644 lib/openapi_client/models/get_user_apps200_response_inner.rb create mode 100644 lib/openapi_client/models/hook.rb create mode 100644 lib/openapi_client/models/hook_conditions_inner.rb create mode 100644 lib/openapi_client/models/hook_options.rb create mode 100644 lib/openapi_client/models/hook_status.rb create mode 100644 lib/openapi_client/models/id.rb create mode 100644 lib/openapi_client/models/list_access_token_claims200_response_inner.rb create mode 100644 lib/openapi_client/models/list_actions200_response_inner.rb create mode 100644 lib/openapi_client/models/list_app_users200_response_inner.rb create mode 100644 lib/openapi_client/models/list_authorization_servers200_response_inner.rb create mode 100644 lib/openapi_client/models/list_authorization_servers200_response_inner_configuration.rb create mode 100644 lib/openapi_client/models/list_condition_operators200_response_inner.rb create mode 100644 lib/openapi_client/models/list_condition_values200_response_inner.rb create mode 100644 lib/openapi_client/models/list_conditions200_response_inner.rb create mode 100644 lib/openapi_client/models/list_mapping_condition_operators200_response_inner.rb create mode 100644 lib/openapi_client/models/list_mapping_conditions200_response_inner.rb create mode 100644 lib/openapi_client/models/list_scopes200_response_inner.rb create mode 100644 lib/openapi_client/models/log.rb create mode 100644 lib/openapi_client/models/mapping.rb create mode 100644 lib/openapi_client/models/registration.rb create mode 100644 lib/openapi_client/models/remove_role_users_request.rb create mode 100644 lib/openapi_client/models/revoke_token_request.rb create mode 100644 lib/openapi_client/models/risk_device.rb create mode 100644 lib/openapi_client/models/risk_rule.rb create mode 100644 lib/openapi_client/models/risk_user.rb create mode 100644 lib/openapi_client/models/role.rb create mode 100644 lib/openapi_client/models/rule.rb create mode 100644 lib/openapi_client/models/rule_id.rb create mode 100644 lib/openapi_client/models/schema.rb create mode 100644 lib/openapi_client/models/schema1.rb create mode 100644 lib/openapi_client/models/schema1_added_by.rb create mode 100644 lib/openapi_client/models/schema_provisioning.rb create mode 100644 lib/openapi_client/models/session.rb create mode 100644 lib/openapi_client/models/set_role_apps200_response_inner.rb create mode 100644 lib/openapi_client/models/source.rb create mode 100644 lib/openapi_client/models/status.rb create mode 100644 lib/openapi_client/models/status1.rb create mode 100644 lib/openapi_client/models/status2.rb create mode 100644 lib/openapi_client/models/status2_status.rb create mode 100644 lib/openapi_client/models/track_event_request.rb create mode 100644 lib/openapi_client/models/update_authorization_server400_response.rb create mode 100644 lib/openapi_client/models/update_client_app_request.rb create mode 100644 lib/openapi_client/models/update_environment_variable_request.rb create mode 100644 lib/openapi_client/models/update_role200_response.rb create mode 100644 lib/openapi_client/models/user.rb create mode 100644 lib/openapi_client/models/verify_enrollment_request.rb create mode 100644 lib/openapi_client/models/verify_factor_request.rb create mode 100644 lib/openapi_client/models/verify_factor_saml200_response.rb create mode 100644 lib/openapi_client/models/verify_factor_saml_request.rb create mode 100644 lib/openapi_client/models/verify_factor_voice200_response_inner.rb create mode 100644 lib/openapi_client/version.rb create mode 100644 openapi_client.gemspec create mode 100644 spec/api/default_api_spec.rb create mode 100644 spec/api_client_spec.rb create mode 100644 spec/configuration_spec.rb delete mode 100644 spec/lib/onelogin/api/client_spec.rb delete mode 100644 spec/lib/onelogin/api/models/embed_app_spec.rb delete mode 100644 spec/lib/onelogin/api/models/event_spec.rb delete mode 100644 spec/lib/onelogin_spec.rb create mode 100644 spec/models/action_spec.rb create mode 100644 spec/models/activate_factor_request_spec.rb create mode 100644 spec/models/add_access_token_claim_request_spec.rb create mode 100644 spec/models/add_client_app_request_spec.rb create mode 100644 spec/models/add_role_users200_response_inner_spec.rb create mode 100644 spec/models/add_scope_request_spec.rb create mode 100644 spec/models/auth_method_spec.rb create mode 100644 spec/models/auth_server_configuration_spec.rb create mode 100644 spec/models/client_app_spec.rb create mode 100644 spec/models/condition_spec.rb create mode 100644 spec/models/connector_spec.rb create mode 100644 spec/models/create_authorization_server_request_spec.rb create mode 100644 spec/models/create_environment_variable_request_spec.rb create mode 100644 spec/models/create_roles201_response_inner_spec.rb create mode 100644 spec/models/device_spec.rb create mode 100644 spec/models/enroll_factor_request_spec.rb create mode 100644 spec/models/envvar_spec.rb create mode 100644 spec/models/error_status_errors_inner_spec.rb create mode 100644 spec/models/error_status_spec.rb create mode 100644 spec/models/factor_inner_factor_data_spec.rb create mode 100644 spec/models/factor_inner_spec.rb create mode 100644 spec/models/generate_mfa_token200_response_spec.rb create mode 100644 spec/models/generate_mfa_token422_response_details_spec.rb create mode 100644 spec/models/generate_mfa_token422_response_spec.rb create mode 100644 spec/models/generate_mfa_token_request_spec.rb create mode 100644 spec/models/generate_saml_assertion_request_spec.rb create mode 100644 spec/models/generate_token200_response_spec.rb create mode 100644 spec/models/generate_token400_response_spec.rb create mode 100644 spec/models/generate_token_request_spec.rb create mode 100644 spec/models/get_authorization_server200_response_spec.rb create mode 100644 spec/models/get_available_factors200_response_inner_spec.rb create mode 100644 spec/models/get_client_apps200_response_inner_scopes_inner_spec.rb create mode 100644 spec/models/get_client_apps200_response_inner_spec.rb create mode 100644 spec/models/get_rate_limit200_response_data_spec.rb create mode 100644 spec/models/get_rate_limit200_response_spec.rb create mode 100644 spec/models/get_risk_score200_response_spec.rb create mode 100644 spec/models/get_risk_score400_response_spec.rb create mode 100644 spec/models/get_risk_score_request_spec.rb create mode 100644 spec/models/get_score_insights200_response_scores_spec.rb create mode 100644 spec/models/get_score_insights200_response_spec.rb create mode 100644 spec/models/get_user_apps200_response_inner_spec.rb create mode 100644 spec/models/hook_conditions_inner_spec.rb create mode 100644 spec/models/hook_options_spec.rb create mode 100644 spec/models/hook_spec.rb create mode 100644 spec/models/hook_status_spec.rb create mode 100644 spec/models/id_spec.rb create mode 100644 spec/models/list_access_token_claims200_response_inner_spec.rb create mode 100644 spec/models/list_actions200_response_inner_spec.rb create mode 100644 spec/models/list_app_users200_response_inner_spec.rb create mode 100644 spec/models/list_authorization_servers200_response_inner_configuration_spec.rb create mode 100644 spec/models/list_authorization_servers200_response_inner_spec.rb create mode 100644 spec/models/list_condition_operators200_response_inner_spec.rb create mode 100644 spec/models/list_condition_values200_response_inner_spec.rb create mode 100644 spec/models/list_conditions200_response_inner_spec.rb create mode 100644 spec/models/list_mapping_condition_operators200_response_inner_spec.rb create mode 100644 spec/models/list_mapping_conditions200_response_inner_spec.rb create mode 100644 spec/models/list_scopes200_response_inner_spec.rb create mode 100644 spec/models/log_spec.rb create mode 100644 spec/models/mapping_spec.rb create mode 100644 spec/models/registration_spec.rb create mode 100644 spec/models/remove_role_users_request_spec.rb create mode 100644 spec/models/revoke_token_request_spec.rb create mode 100644 spec/models/risk_device_spec.rb create mode 100644 spec/models/risk_rule_spec.rb create mode 100644 spec/models/risk_user_spec.rb create mode 100644 spec/models/role_spec.rb create mode 100644 spec/models/rule_id_spec.rb create mode 100644 spec/models/rule_spec.rb create mode 100644 spec/models/schema1_added_by_spec.rb create mode 100644 spec/models/schema1_spec.rb create mode 100644 spec/models/schema_provisioning_spec.rb create mode 100644 spec/models/schema_spec.rb create mode 100644 spec/models/session_spec.rb create mode 100644 spec/models/set_role_apps200_response_inner_spec.rb create mode 100644 spec/models/source_spec.rb create mode 100644 spec/models/status1_spec.rb create mode 100644 spec/models/status2_spec.rb create mode 100644 spec/models/status2_status_spec.rb create mode 100644 spec/models/status_spec.rb create mode 100644 spec/models/track_event_request_spec.rb create mode 100644 spec/models/update_authorization_server400_response_spec.rb create mode 100644 spec/models/update_client_app_request_spec.rb create mode 100644 spec/models/update_environment_variable_request_spec.rb create mode 100644 spec/models/update_role200_response_spec.rb create mode 100644 spec/models/user_spec.rb create mode 100644 spec/models/verify_enrollment_request_spec.rb create mode 100644 spec/models/verify_factor_request_spec.rb create mode 100644 spec/models/verify_factor_saml200_response_spec.rb create mode 100644 spec/models/verify_factor_saml_request_spec.rb create mode 100644 spec/models/verify_factor_voice200_response_inner_spec.rb diff --git a/.gitignore b/.gitignore index a686629..05a17cb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,12 +1,39 @@ -/.bundle/ -/.yardoc -/Gemfile.lock -/_yardoc/ +# Generated by: https://openapi-generator.tech +# + +*.gem +*.rbc +/.config /coverage/ -/doc/ +/InstalledFiles /pkg/ /spec/reports/ +/spec/examples.txt +/test/tmp/ +/test/version_tmp/ /tmp/ -.DS_Store -.rspec_status \ No newline at end of file +## Specific to RubyMotion: +.dat* +.repl_history +build/ + +## Documentation cache and generated files: +/.yardoc/ +/_yardoc/ +/doc/ +/rdoc/ + +## Environment normalization: +/.bundle/ +/vendor/bundle +/lib/bundler/man/ + +# for a library or gem, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# Gemfile.lock +# .ruby-version +# .ruby-gemset + +# unless supporting rvm < 1.11.0 or doing something fancy, ignore this: +.rvmrc diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..3d57c5b --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,26 @@ +.ruby: &ruby + variables: + LANG: "C.UTF-8" + before_script: + - ruby -v + - bundle config set --local deployment true + - bundle install -j $(nproc) + parallel: + matrix: + - RUBY_VERSION: ['2.3', '2.4', '2.5', '2.6', '2.7', '3.0'] + image: "ruby:$RUBY_VERSION" + cache: + paths: + - vendor/ruby + key: 'ruby-$RUBY_VERSION' + +gem: + extends: .ruby + script: + - bundle exec rspec + - bundle exec rake build + - bundle exec rake install + artifacts: + paths: + - pkg/*.gem + diff --git a/.openapi-generator-ignore b/.openapi-generator-ignore new file mode 100644 index 0000000..7484ee5 --- /dev/null +++ b/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES new file mode 100644 index 0000000..1020df1 --- /dev/null +++ b/.openapi-generator/FILES @@ -0,0 +1,292 @@ +.gitignore +.gitlab-ci.yml +.openapi-generator-ignore +.rspec +.rubocop.yml +.travis.yml +Gemfile +README.md +Rakefile +docs/Action.md +docs/ActivateFactorRequest.md +docs/AddAccessTokenClaimRequest.md +docs/AddClientAppRequest.md +docs/AddRoleUsers200ResponseInner.md +docs/AddScopeRequest.md +docs/AuthMethod.md +docs/AuthServerConfiguration.md +docs/ClientApp.md +docs/Condition.md +docs/Connector.md +docs/CreateAuthorizationServerRequest.md +docs/CreateEnvironmentVariableRequest.md +docs/CreateRoles201ResponseInner.md +docs/DefaultApi.md +docs/Device.md +docs/EnrollFactorRequest.md +docs/Envvar.md +docs/ErrorStatus.md +docs/ErrorStatusErrorsInner.md +docs/FactorInner.md +docs/FactorInnerFactorData.md +docs/GenerateMfaToken200Response.md +docs/GenerateMfaToken422Response.md +docs/GenerateMfaToken422ResponseDetails.md +docs/GenerateMfaTokenRequest.md +docs/GenerateSamlAssertionRequest.md +docs/GenerateToken200Response.md +docs/GenerateToken400Response.md +docs/GenerateTokenRequest.md +docs/GetAuthorizationServer200Response.md +docs/GetAvailableFactors200ResponseInner.md +docs/GetClientApps200ResponseInner.md +docs/GetClientApps200ResponseInnerScopesInner.md +docs/GetRateLimit200Response.md +docs/GetRateLimit200ResponseData.md +docs/GetRiskScore200Response.md +docs/GetRiskScore400Response.md +docs/GetRiskScoreRequest.md +docs/GetScoreInsights200Response.md +docs/GetScoreInsights200ResponseScores.md +docs/GetUserApps200ResponseInner.md +docs/Hook.md +docs/HookConditionsInner.md +docs/HookOptions.md +docs/HookStatus.md +docs/Id.md +docs/ListAccessTokenClaims200ResponseInner.md +docs/ListActions200ResponseInner.md +docs/ListAppUsers200ResponseInner.md +docs/ListAuthorizationServers200ResponseInner.md +docs/ListAuthorizationServers200ResponseInnerConfiguration.md +docs/ListConditionOperators200ResponseInner.md +docs/ListConditionValues200ResponseInner.md +docs/ListConditions200ResponseInner.md +docs/ListMappingConditionOperators200ResponseInner.md +docs/ListMappingConditions200ResponseInner.md +docs/ListScopes200ResponseInner.md +docs/Log.md +docs/Mapping.md +docs/Registration.md +docs/RemoveRoleUsersRequest.md +docs/RevokeTokenRequest.md +docs/RiskDevice.md +docs/RiskRule.md +docs/RiskUser.md +docs/Role.md +docs/Rule.md +docs/RuleId.md +docs/Schema.md +docs/Schema1.md +docs/Schema1AddedBy.md +docs/SchemaProvisioning.md +docs/Session.md +docs/SetRoleApps200ResponseInner.md +docs/Source.md +docs/Status.md +docs/Status1.md +docs/Status2.md +docs/Status2Status.md +docs/TrackEventRequest.md +docs/UpdateAuthorizationServer400Response.md +docs/UpdateClientAppRequest.md +docs/UpdateEnvironmentVariableRequest.md +docs/UpdateRole200Response.md +docs/User.md +docs/VerifyEnrollmentRequest.md +docs/VerifyFactorRequest.md +docs/VerifyFactorSaml200Response.md +docs/VerifyFactorSamlRequest.md +docs/VerifyFactorVoice200ResponseInner.md +git_push.sh +lib/openapi_client.rb +lib/openapi_client/api/default_api.rb +lib/openapi_client/api_client.rb +lib/openapi_client/api_error.rb +lib/openapi_client/configuration.rb +lib/openapi_client/models/action.rb +lib/openapi_client/models/activate_factor_request.rb +lib/openapi_client/models/add_access_token_claim_request.rb +lib/openapi_client/models/add_client_app_request.rb +lib/openapi_client/models/add_role_users200_response_inner.rb +lib/openapi_client/models/add_scope_request.rb +lib/openapi_client/models/auth_method.rb +lib/openapi_client/models/auth_server_configuration.rb +lib/openapi_client/models/client_app.rb +lib/openapi_client/models/condition.rb +lib/openapi_client/models/connector.rb +lib/openapi_client/models/create_authorization_server_request.rb +lib/openapi_client/models/create_environment_variable_request.rb +lib/openapi_client/models/create_roles201_response_inner.rb +lib/openapi_client/models/device.rb +lib/openapi_client/models/enroll_factor_request.rb +lib/openapi_client/models/envvar.rb +lib/openapi_client/models/error_status.rb +lib/openapi_client/models/error_status_errors_inner.rb +lib/openapi_client/models/factor_inner.rb +lib/openapi_client/models/factor_inner_factor_data.rb +lib/openapi_client/models/generate_mfa_token200_response.rb +lib/openapi_client/models/generate_mfa_token422_response.rb +lib/openapi_client/models/generate_mfa_token422_response_details.rb +lib/openapi_client/models/generate_mfa_token_request.rb +lib/openapi_client/models/generate_saml_assertion_request.rb +lib/openapi_client/models/generate_token200_response.rb +lib/openapi_client/models/generate_token400_response.rb +lib/openapi_client/models/generate_token_request.rb +lib/openapi_client/models/get_authorization_server200_response.rb +lib/openapi_client/models/get_available_factors200_response_inner.rb +lib/openapi_client/models/get_client_apps200_response_inner.rb +lib/openapi_client/models/get_client_apps200_response_inner_scopes_inner.rb +lib/openapi_client/models/get_rate_limit200_response.rb +lib/openapi_client/models/get_rate_limit200_response_data.rb +lib/openapi_client/models/get_risk_score200_response.rb +lib/openapi_client/models/get_risk_score400_response.rb +lib/openapi_client/models/get_risk_score_request.rb +lib/openapi_client/models/get_score_insights200_response.rb +lib/openapi_client/models/get_score_insights200_response_scores.rb +lib/openapi_client/models/get_user_apps200_response_inner.rb +lib/openapi_client/models/hook.rb +lib/openapi_client/models/hook_conditions_inner.rb +lib/openapi_client/models/hook_options.rb +lib/openapi_client/models/hook_status.rb +lib/openapi_client/models/id.rb +lib/openapi_client/models/list_access_token_claims200_response_inner.rb +lib/openapi_client/models/list_actions200_response_inner.rb +lib/openapi_client/models/list_app_users200_response_inner.rb +lib/openapi_client/models/list_authorization_servers200_response_inner.rb +lib/openapi_client/models/list_authorization_servers200_response_inner_configuration.rb +lib/openapi_client/models/list_condition_operators200_response_inner.rb +lib/openapi_client/models/list_condition_values200_response_inner.rb +lib/openapi_client/models/list_conditions200_response_inner.rb +lib/openapi_client/models/list_mapping_condition_operators200_response_inner.rb +lib/openapi_client/models/list_mapping_conditions200_response_inner.rb +lib/openapi_client/models/list_scopes200_response_inner.rb +lib/openapi_client/models/log.rb +lib/openapi_client/models/mapping.rb +lib/openapi_client/models/registration.rb +lib/openapi_client/models/remove_role_users_request.rb +lib/openapi_client/models/revoke_token_request.rb +lib/openapi_client/models/risk_device.rb +lib/openapi_client/models/risk_rule.rb +lib/openapi_client/models/risk_user.rb +lib/openapi_client/models/role.rb +lib/openapi_client/models/rule.rb +lib/openapi_client/models/rule_id.rb +lib/openapi_client/models/schema.rb +lib/openapi_client/models/schema1.rb +lib/openapi_client/models/schema1_added_by.rb +lib/openapi_client/models/schema_provisioning.rb +lib/openapi_client/models/session.rb +lib/openapi_client/models/set_role_apps200_response_inner.rb +lib/openapi_client/models/source.rb +lib/openapi_client/models/status.rb +lib/openapi_client/models/status1.rb +lib/openapi_client/models/status2.rb +lib/openapi_client/models/status2_status.rb +lib/openapi_client/models/track_event_request.rb +lib/openapi_client/models/update_authorization_server400_response.rb +lib/openapi_client/models/update_client_app_request.rb +lib/openapi_client/models/update_environment_variable_request.rb +lib/openapi_client/models/update_role200_response.rb +lib/openapi_client/models/user.rb +lib/openapi_client/models/verify_enrollment_request.rb +lib/openapi_client/models/verify_factor_request.rb +lib/openapi_client/models/verify_factor_saml200_response.rb +lib/openapi_client/models/verify_factor_saml_request.rb +lib/openapi_client/models/verify_factor_voice200_response_inner.rb +lib/openapi_client/version.rb +openapi_client.gemspec +spec/api/default_api_spec.rb +spec/api_client_spec.rb +spec/configuration_spec.rb +spec/models/action_spec.rb +spec/models/activate_factor_request_spec.rb +spec/models/add_access_token_claim_request_spec.rb +spec/models/add_client_app_request_spec.rb +spec/models/add_role_users200_response_inner_spec.rb +spec/models/add_scope_request_spec.rb +spec/models/auth_method_spec.rb +spec/models/auth_server_configuration_spec.rb +spec/models/client_app_spec.rb +spec/models/condition_spec.rb +spec/models/connector_spec.rb +spec/models/create_authorization_server_request_spec.rb +spec/models/create_environment_variable_request_spec.rb +spec/models/create_roles201_response_inner_spec.rb +spec/models/device_spec.rb +spec/models/enroll_factor_request_spec.rb +spec/models/envvar_spec.rb +spec/models/error_status_errors_inner_spec.rb +spec/models/error_status_spec.rb +spec/models/factor_inner_factor_data_spec.rb +spec/models/factor_inner_spec.rb +spec/models/generate_mfa_token200_response_spec.rb +spec/models/generate_mfa_token422_response_details_spec.rb +spec/models/generate_mfa_token422_response_spec.rb +spec/models/generate_mfa_token_request_spec.rb +spec/models/generate_saml_assertion_request_spec.rb +spec/models/generate_token200_response_spec.rb +spec/models/generate_token400_response_spec.rb +spec/models/generate_token_request_spec.rb +spec/models/get_authorization_server200_response_spec.rb +spec/models/get_available_factors200_response_inner_spec.rb +spec/models/get_client_apps200_response_inner_scopes_inner_spec.rb +spec/models/get_client_apps200_response_inner_spec.rb +spec/models/get_rate_limit200_response_data_spec.rb +spec/models/get_rate_limit200_response_spec.rb +spec/models/get_risk_score200_response_spec.rb +spec/models/get_risk_score400_response_spec.rb +spec/models/get_risk_score_request_spec.rb +spec/models/get_score_insights200_response_scores_spec.rb +spec/models/get_score_insights200_response_spec.rb +spec/models/get_user_apps200_response_inner_spec.rb +spec/models/hook_conditions_inner_spec.rb +spec/models/hook_options_spec.rb +spec/models/hook_spec.rb +spec/models/hook_status_spec.rb +spec/models/id_spec.rb +spec/models/list_access_token_claims200_response_inner_spec.rb +spec/models/list_actions200_response_inner_spec.rb +spec/models/list_app_users200_response_inner_spec.rb +spec/models/list_authorization_servers200_response_inner_configuration_spec.rb +spec/models/list_authorization_servers200_response_inner_spec.rb +spec/models/list_condition_operators200_response_inner_spec.rb +spec/models/list_condition_values200_response_inner_spec.rb +spec/models/list_conditions200_response_inner_spec.rb +spec/models/list_mapping_condition_operators200_response_inner_spec.rb +spec/models/list_mapping_conditions200_response_inner_spec.rb +spec/models/list_scopes200_response_inner_spec.rb +spec/models/log_spec.rb +spec/models/mapping_spec.rb +spec/models/registration_spec.rb +spec/models/remove_role_users_request_spec.rb +spec/models/revoke_token_request_spec.rb +spec/models/risk_device_spec.rb +spec/models/risk_rule_spec.rb +spec/models/risk_user_spec.rb +spec/models/role_spec.rb +spec/models/rule_id_spec.rb +spec/models/rule_spec.rb +spec/models/schema1_added_by_spec.rb +spec/models/schema1_spec.rb +spec/models/schema_provisioning_spec.rb +spec/models/schema_spec.rb +spec/models/session_spec.rb +spec/models/set_role_apps200_response_inner_spec.rb +spec/models/source_spec.rb +spec/models/status1_spec.rb +spec/models/status2_spec.rb +spec/models/status2_status_spec.rb +spec/models/status_spec.rb +spec/models/track_event_request_spec.rb +spec/models/update_authorization_server400_response_spec.rb +spec/models/update_client_app_request_spec.rb +spec/models/update_environment_variable_request_spec.rb +spec/models/update_role200_response_spec.rb +spec/models/user_spec.rb +spec/models/verify_enrollment_request_spec.rb +spec/models/verify_factor_request_spec.rb +spec/models/verify_factor_saml200_response_spec.rb +spec/models/verify_factor_saml_request_spec.rb +spec/models/verify_factor_voice200_response_inner_spec.rb +spec/spec_helper.rb diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION new file mode 100644 index 0000000..6d54bbd --- /dev/null +++ b/.openapi-generator/VERSION @@ -0,0 +1 @@ +6.0.1 \ No newline at end of file diff --git a/.rspec b/.rspec new file mode 100644 index 0000000..83e16f8 --- /dev/null +++ b/.rspec @@ -0,0 +1,2 @@ +--color +--require spec_helper diff --git a/.rubocop.yml b/.rubocop.yml new file mode 100644 index 0000000..d32b2b1 --- /dev/null +++ b/.rubocop.yml @@ -0,0 +1,148 @@ +# This file is based on https://github.com/rails/rails/blob/master/.rubocop.yml (MIT license) +# Automatically generated by OpenAPI Generator (https://openapi-generator.tech) +AllCops: + TargetRubyVersion: 2.4 + # RuboCop has a bunch of cops enabled by default. This setting tells RuboCop + # to ignore them, so only the ones explicitly set in this file are enabled. + DisabledByDefault: true + Exclude: + - '**/templates/**/*' + - '**/vendor/**/*' + - 'actionpack/lib/action_dispatch/journey/parser.rb' + +# Prefer &&/|| over and/or. +Style/AndOr: + Enabled: true + +# Align `when` with `case`. +Layout/CaseIndentation: + Enabled: true + +# Align comments with method definitions. +Layout/CommentIndentation: + Enabled: true + +Layout/ElseAlignment: + Enabled: true + +Layout/EmptyLineAfterMagicComment: + Enabled: true + +# In a regular class definition, no empty lines around the body. +Layout/EmptyLinesAroundClassBody: + Enabled: true + +# In a regular method definition, no empty lines around the body. +Layout/EmptyLinesAroundMethodBody: + Enabled: true + +# In a regular module definition, no empty lines around the body. +Layout/EmptyLinesAroundModuleBody: + Enabled: true + +Layout/FirstArgumentIndentation: + Enabled: true + +# Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }. +Style/HashSyntax: + Enabled: false + +# Method definitions after `private` or `protected` isolated calls need one +# extra level of indentation. +Layout/IndentationConsistency: + Enabled: true + EnforcedStyle: indented_internal_methods + +# Two spaces, no tabs (for indentation). +Layout/IndentationWidth: + Enabled: true + +Layout/LeadingCommentSpace: + Enabled: true + +Layout/SpaceAfterColon: + Enabled: true + +Layout/SpaceAfterComma: + Enabled: true + +Layout/SpaceAroundEqualsInParameterDefault: + Enabled: true + +Layout/SpaceAroundKeyword: + Enabled: true + +Layout/SpaceAroundOperators: + Enabled: true + +Layout/SpaceBeforeComma: + Enabled: true + +Layout/SpaceBeforeFirstArg: + Enabled: true + +Style/DefWithParentheses: + Enabled: true + +# Defining a method with parameters needs parentheses. +Style/MethodDefParentheses: + Enabled: true + +Style/FrozenStringLiteralComment: + Enabled: false + EnforcedStyle: always + +# Use `foo {}` not `foo{}`. +Layout/SpaceBeforeBlockBraces: + Enabled: true + +# Use `foo { bar }` not `foo {bar}`. +Layout/SpaceInsideBlockBraces: + Enabled: true + +# Use `{ a: 1 }` not `{a:1}`. +Layout/SpaceInsideHashLiteralBraces: + Enabled: true + +Layout/SpaceInsideParens: + Enabled: true + +# Check quotes usage according to lint rule below. +#Style/StringLiterals: +# Enabled: true +# EnforcedStyle: single_quotes + +# Detect hard tabs, no hard tabs. +Layout/IndentationStyle: + Enabled: true + +# Blank lines should not have any spaces. +Layout/TrailingEmptyLines: + Enabled: true + +# No trailing whitespace. +Layout/TrailingWhitespace: + Enabled: false + +# Use quotes for string literals when they are enough. +Style/RedundantPercentQ: + Enabled: true + +# Align `end` with the matching keyword or starting expression except for +# assignments, where it should be aligned with the LHS. +Layout/EndAlignment: + Enabled: true + EnforcedStyleAlignWith: variable + AutoCorrect: true + +# Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg. +Lint/RequireParentheses: + Enabled: true + +Style/RedundantReturn: + Enabled: true + AllowMultipleReturnValues: true + +Style/Semicolon: + Enabled: true + AllowAsExpressionSeparator: true diff --git a/.travis.yml b/.travis.yml index 8bf19a7..bd0f1a5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,14 @@ -sudo: false language: ruby +cache: bundler rvm: - - 1.9.3 - - 2.4.1 -before_install: gem install bundler -v 1.15.3 \ No newline at end of file + - 2.3 + - 2.4 + - 2.5 + - 2.6 + - 2.7 + - 3.0 +script: + - bundle install --path vendor/bundle + - bundle exec rspec + - gem build openapi_client.gemspec + - gem install ./openapi_client-1.0.0.gem diff --git a/Gemfile b/Gemfile index 421d322..c2e3127 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,9 @@ -source "https://rubygems.org" +source 'https://rubygems.org' -git_source(:github) {|repo_name| "https://github.com/#{repo_name}" } - -# Specify your gem's dependencies in onelogin-ruby-sdk.gemspec gemspec + +group :development, :test do + gem 'rake', '~> 13.0.1' + gem 'pry-byebug' + gem 'rubocop', '~> 0.66.0' +end diff --git a/README.md b/README.md index 77da4ae..4ac198f 100644 --- a/README.md +++ b/README.md @@ -1,517 +1,278 @@ -# OneLogin Ruby SDK +# openapi_client -This SDK will let you execute all the API methods, version/1, described -at https://developers.onelogin.com/api-docs/1/getting-started/dev-overview. +OpenapiClient - the Ruby gem for the OneLogin API -The toolkit is hosted on github. You can download it from: -* Lastest release: https://github.com/onelogin/onelogin-ruby-sdk/releases/latest -* Master repo: https://github.com/onelogin/onelogin-ruby-sdk/tree/master +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -## Installation - -Add this line to your application's Gemfile: - -```ruby -gem 'onelogin' -``` - -And then execute: - - $ bundle - -Or install it yourself as: - - $ gem install onelogin - - -### Dependencies - -* httparty - -## Getting started - -You'll need a OneLogin account and a set of API credentials before you get started. +- API version: 3.0.0-alpha.1 +- Package version: 1.0.0 +- Build package: org.openapitools.codegen.languages.RubyClientCodegen -If you don't have an account you can [sign up for a free developer account here](https://www.onelogin.com/developer-signup). - -||| -|---|---| -|client_id|Required: A valid OneLogin API client_id| -|client_secret|Required: A valid OneLogin API client_secret| -|region| Optional: `us` or `eu`. Defaults to `us` | -|max_results| Optional: Defaults to 1000 | -|timeout| Optional: Defaults to 60 (requires httparty > 0.16.2) | - -```ruby -require 'onelogin' - -client = OneLogin::Api::Client.new( - client_id: '', - client_secret:'', - region: 'us' -) - -# Now you can make requests -client.get_users -``` - -For all methods see Rubydoc of this SDK published at: -http://www.rubydoc.info/github/onelogin/onelogin-ruby-sdk - - -## Usage - -### Errors and exceptions - -OneLogin's API can return 400, 401, 403 or 404 when there was any issue executing the action. When that happens, the methods of the SDK will include error and errorMessage in the client. Use `error` and `error_description` of the Client to retrieve them. - -```ruby -users = client.get_users +## Installation -if users.nil? - puts client.error - puts client.error_description -end -``` +### Build a gem -In some scenarios there is an attribute not provided or invalid that causes the error, -when that happens in addition to the error_description a error_attribute is available -with the name of the attribute that caused the issue. Accesible at the client like: +To build the Ruby code into a gem: -```ruby -client.error_attribute +```shell +gem build openapi_client.gemspec ``` -### Authentication - -By default methods call internally to `get_access_token` if there is no valid access_token. You can also get tokens etc directly if needed. - -```ruby -# Get an AccessToken -token = client.get_access_token - -# Refresh an AccessToken -token2 = client.regenerate_token +Then either install the gem locally: -# Revoke an AccessToken -token3 = client.get_access_token +```shell +gem install ./openapi_client-1.0.0.gem ``` -### Paging -All OneLogin API endpoints that support paging are returned as enumerations to save you keeping track of the paging cursor. +(for development, run `gem install --dev ./openapi_client-1.0.0.gem` to install the development dependencies) -User `take` to limit the results or get all results by enumerating. +or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/). -e.g. -```ruby -# List the first name of all users -client.get_users.each do |user| - puts user.firstname -end +Finally add this to the Gemfile: -# List the first name of all users starting with the 2nd user -# `each` accepts a start param to skip first x results -client.get_users.each(1) do |user| - puts user.firstname -end + gem 'openapi_client', '~> 1.0.0' -# List the first 5 users with the name of Joe -client.get_users(firstname: 'Joe').take(5).each do |user| - puts "#{user.firstname} #{user.lastname}" -end +### Install from Git -# Get 10 event ids -client.get_events.take(10).map{|event| event.id } +If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile: -# Get all roles -client.get_roles.to_a -``` + gem 'openapi_client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git' -For safety where some collections (e.g. `get_events`) have large numbers of resources there is a -limit of 1000 total results returned. You can override this with the `max_results` param during Client initialization. +### Include the Ruby code directly -``` -client = OneLogin::Api::Client.new( - client_id: '', - client_secret:'', - max_results: 50000 -) +Include the Ruby code directly using `-I` as follows: -client.get_events.map {|event| event.id} +```shell +ruby -Ilib script.rb ``` +## Getting Started - -### Available Methods +Please follow the [installation](#installation) procedure and then run the following code: ```ruby -# Get rate limits -rate_limits = client.get_rate_limits - -# Get Custom Attributes -custom_global_attributes = client.get_custom_attributes - -# Get Users with no query parameters -users = client.get_users - -# Get Users with query parameters -query_parameters = { - email: "user@example.com" -} -users_filtered = client.get_users(query_parameters) - -query_parameters = { - email: "usermfa@example.com" -} -users_filtered2 = client.get_users(query_parameters) - -# Get Users with limit -query_parameters = { - limit: 3 -} -users_filtered_limited = client.get_users(query_parameters) - -# Only return the firstname and email fields for each user -client.get_users(fields: 'email,firstname').each do |user| - puts "#{user.firstname} - #{user.email}" +# Load the gem +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +user_id = 56 # Integer | Set to the id of the user. +activate_factor_request = OpenapiClient::ActivateFactorRequest.new # ActivateFactorRequest | + +begin + api_instance.activate_factor(authorization, user_id, activate_factor_request) +rescue OpenapiClient::ApiError => e + puts "Exception when calling DefaultApi->activate_factor: #{e}" end -# Get User by id -user = client.get_user(users_filtered.first.id) -user_mfa = client.get_user(users_filtered2.first.id) - -# Update User with specific id -user = client.get_user(user.id) -update_user_params = user.get_user_params -update_user_params["firstname"] = 'modified_firstname' -user = client.update_user(user.id, update_user_params) -user = client.get_user(user.id) - -# Get Global Roles -roles = client.get_roles - -# Get Role -role = client.get_role(1234) - -# Assign & Remove Roles On Users -role_ids = [ - 1234, 5678 -] -result = client.assign_role_to_user(user.id, role_ids) -role_ids.pop -result = client.remove_role_from_user(user.id, role_ids) -user = client.get_user(user.id) - -# Sets Password by ID Using Cleartext -password = "Aa765431-XxX" -result = client.set_password_using_clear_text(user.id, password, password) - -# Sets Password by ID Using Salt and SHA-256 -password = "Aa765432-YyY" -salt = "11xxxx1" - -require 'digest' -sha256 = Digest::SHA256.new -hashed_salted_password = sha256.hexdigest("#{pw}#{salt}") -result = client.set_password_using_hash_salt(user_mfa.id, hashed_salted_password, hashed_salted_password, "salt+sha256", salt) - - Set Custom Attribute Value to User -customAttributes = { - custom_global_attributes[0]=> "xxxx", - custom_global_attributes[1]=> "yyyy" -} -result = client.set_custom_attribute_to_user(34687020, customAttributes) - -# Log Out User -result = client.log_user_out(user.id) - -# Lock User -result = client.lock_user(user.id, 5) - -# Get User apps -apps = client.get_user_apps(user.id) - -# Get User Roles -role_ids = client.get_user_roles(user.id) - -# Generate MFA Token -mfa_token = client.generate_mfa_token(user.id) - -# Get all Connectors in a OneLogin account filtering by name*/ -apps = client.get_connectors({name:'SAML'}) - -# Get all Apps in a OneLogin account using API v1 */ -apps_v1 = client.get_apps_v1 - -# Get all Apps in a OneLogin account filtering by auth_method*/ -apps = client.get_apps({auth_method:6}) - -# Create app -app_data = { - name: "Created SAML App by API", - description:"Created SAML App by API description", - notes: "Created SAML App by API notes", - auth_method: 2, - policy_id: 167865, - allow_assumed_signin: false, - parameters: { - saml_username: { - user_attribute_mappings: "email", - label: "NameID (fka Email)", - } - }, - connector_id: 110016, - visible: true, - configuration: { - saml_initiater_id: "0", - encrypt_assertion: "0", - recipient: "http://sp.example.com/acs", - saml_notbefore: "3", - saml_nameid_format_id: "0", - saml_issuer_type: "0", - saml_sign_element: "0", - consumer_url: "http://sp.example.com/acs", - validator: ".*", - relaystate: "", - logout_url: "http://sp.example.com/sls", - saml_encryption_method_id: "0", - login: "http://sp.example.com/login", - saml_sessionnotonorafter: "1440", - generate_attribute_value_tags: "0", - saml_notonorafter: "3", - audience: "http://sp.example.com/audience", - signature_algorithm: "SHA-256" - } -} -app = client.create_app(app_data) - -# Update app -app_data[:name] = "Created SAML App by API updated" -client.update_app(app.id, app_data) - -# Get app -app = client.get_app(app.id) - -# Delete app -result = client.delete_app(app.id) - -# Delete parameter from app -result = client.delete_parameter_from_app(app.id, parameter_id) - -# Create user -new_user_params = { - email: "testcreate_1@example.com", - firstname: "testcreate_1_fn", - lastname: "testcreate_1_ln", - username: "testcreate_1@example.com" -} -created_user = client.create_user(new_user_params) - -# Delete User -result = client.delete_user(created_user.id) - -# Get EventTypes -event_types = client.get_event_types - -# Get Events -events = client.get_events - -query_events_params = { - limit: 2 -} -events_limited = client.get_events(query_events_params) - -# Get Event -event = client.get_event(events[0].id) - -# Create Event -new_event_params = { - event_type_id: "000", - account_id: "00000", - actor_system: "00", - user_id: "00000000", - user_name: "test_event", - custom_message: "test creating event from python :)" -} -result = client.create_event(new_event_params) - -# Get Filtered Events -query_events_params = array( - user_id: "00000000" -) -events = client.get_events(query_events_params) - -# Get Groups -groups = client.get_groups - -# Get Group -group = client.get_group(groups.first.id) - -# Get SAMLResponse directly -app_id = "000000" -saml_endpoint_response = client.get_saml_assertion("user@example.com", "Aa765431-XxX", app_id, "example-onelogin-subdomain") - -# Get SAMLResponse after MFA -saml_endpoint_response2 = client.get_saml_assertion("usermfa@example.com", "Aa765432-YyY", app_id, "example-onelogin-subdomain") -mfa = saml_endpoint_response2.mfa -otp_token = "000000" -saml_endpoint_response_after_verify = client.get_saml_assertion_verifying(app_id, mfa.devices[0].id, mfa.state_token, "78395727", nil) - -# Create Session Login Token -session_login_token_params = { - username_or_email: "user@example.com", - password: "Aa765431-XxX", - subdomain: "example-onelogin-subdomain" -} -session_token_data = client.create_session_login_token(session_login_token_params) - -# Create Session Login Token MFA , after verify -session_login_token_mfa_params = { - username_or_email: "usermfa@example.com", - password: "Aa765432-YyY", - subdomain: "example-onelogin-subdomain" -} -session_token_mfa_data = client.create_session_login_token(session_login_token_mfa_params) -otp_token = "000000" # We get this value from OTP device -session_token_data2 = client.get_session_token_verified(session_token_mfa_data.devices.first.id,session_token_mfa_data.state_token, otp_token) - -user_id = 00000000 -# Get Available Authentication Factors -auth_factors = client.get_factors(user_id) - -# Enroll an Authentication Factor -enroll_factor = client.enroll_factor(user_id, auth_factors.first.id, 'My Device', '+14156456830') - -# Get Enrolled Authentication Factors -otp_devices = client.get_enrolled_factors(user_id) - -# Activate an Authentication Factor -device_id = 0000000 -enrollment_response = client.activate_factor(user_id, device_id) - -# Verify an Authentication Factor -result = client.verify_factor(user_id, device_id, otp_token="4242342423") - -# Remove a Factor -result = client.remove_factor(user_id, device_id) - -# Generate Invite Link -url_link = client.generate_invite_link("user@example.com") - -# Send Invite Link -sent = client.send_invite_link("user@example.com") - -#Get Apps to Embed for a User -embed_token = "30e256c101cd0d2e731de1ec222e93c4be8a1572" -apps = client.get_embed_apps("30e256c101cd0d2e731de1ec222e93c4be8a1572", "user@example.com") - -# Get Privileges -privileges = client.get_privileges() - -# Create Privilege -name = "privilege_example" -version = "2018-05-18" - -statement1 = OneLogin::Api::Models::Statement.new( - "Allow", - [ - "users:List", - "users:Get", - ], - ["*"] -) - -statement2 = OneLogin::Api::Models::Statement.new( - "Allow", - [ - "apps:List", - "apps:Get", - ], - ["*"] -) - -statements = [ - statement1, - statement2 -] -privilege = client.create_privilege(name, version, statements) - -# Update Privilege -name = "privilege_example_updated" -statement2 = OneLogin::Api::Models::Statement.new( - "Allow", - [ - "apps:List", - ], - ["*"] -) -statements = [ - statement1, - statement2 -] -privilege = client.update_privilege(privilege.id, name, version, statements) - -# Get Privilege -privileges = client.get_privilege(privilege.id) - -# Delete Privilege -result = client.delete_privilege(privilege.id) - -# Gets a list of the roles assigned to a privilege -assigned_roles = client.get_roles_assigned_to_privilege(privilege.id) - -# Assign roles to a privilege -result = client.assign_roles_to_privilege(privilege.id, [role_id1, role_id2]) - -# Remove role from a privilege -result = client.remove_role_from_privilege(privilege.id, role_id_1) - -# Gets a list of the users assigned to a privilege -assigned_users = client.get_users_assigned_to_privilege(privilege.id) - -# Assign users to a privilege -result = client.assign_users_to_privilege(privilege.id, [user_id1, user_id2]) - -# Remove user from a privilege -result = client.remove_user_from_privilege(privilege.id, user_id2) ``` -## Proxy Servers -If you're stuck behind a proxy then you can still use this SDK by providing at a minimum the -host address of your proxy server. - -```ruby -client = OneLogin::Api::Client.new( - client_id: 'some-client-id', - client_secret:'some-client-secret', - region: 'us', - proxy_host: 'https://blah.com', - proxy_port: '8080', - proxy_user: 'username', - proxy_pass: 'password' -) -``` - -* `proxy_host` - required, the host address of your proxy server -* `proxy_port` - optional, the port number of your proxy server -* `proxy_user` - optional, the username for your proxy server -* `proxy_pass` - optional, the password for your proxy server - -## Development - -After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. - -To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org). - -## Contributing - -Bug reports and pull requests are welcome on GitHub at https://github.com/onelogin/onelogin-ruby-sdk. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct. - -## License - -The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT). - -## Code of Conduct +## Documentation for API Endpoints + +All URIs are relative to *https://onelogininc.onelogin.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*OpenapiClient::DefaultApi* | [**activate_factor**](docs/DefaultApi.md#activate_factor) | **POST** /api/2/mfa/users/{user_id}/verifications | +*OpenapiClient::DefaultApi* | [**add_access_token_claim**](docs/DefaultApi.md#add_access_token_claim) | **POST** /api/2/api_authorizations/{id}/claims | +*OpenapiClient::DefaultApi* | [**add_client_app**](docs/DefaultApi.md#add_client_app) | **POST** /api/2/api_authorizations/{id}/clients | +*OpenapiClient::DefaultApi* | [**add_role_admins**](docs/DefaultApi.md#add_role_admins) | **POST** /api/2/roles/{role_id}/admins | +*OpenapiClient::DefaultApi* | [**add_role_users**](docs/DefaultApi.md#add_role_users) | **POST** /api/2/roles/{role_id}/users | +*OpenapiClient::DefaultApi* | [**add_scope**](docs/DefaultApi.md#add_scope) | **POST** /api/2/api_authorizations/{id}/scopes | +*OpenapiClient::DefaultApi* | [**bulk_mapping_sort**](docs/DefaultApi.md#bulk_mapping_sort) | **PUT** /api/2/apps/mappings/sort | +*OpenapiClient::DefaultApi* | [**bulk_sort**](docs/DefaultApi.md#bulk_sort) | **PUT** /api/2/apps/{app_id}/rules/sort | +*OpenapiClient::DefaultApi* | [**create_app**](docs/DefaultApi.md#create_app) | **POST** /api/2/apps | +*OpenapiClient::DefaultApi* | [**create_authorization_server**](docs/DefaultApi.md#create_authorization_server) | **POST** /api/2/api_authorizations | +*OpenapiClient::DefaultApi* | [**create_environment_variable**](docs/DefaultApi.md#create_environment_variable) | **POST** /api/2/hooks/envs | +*OpenapiClient::DefaultApi* | [**create_hook**](docs/DefaultApi.md#create_hook) | **POST** /api/2/hooks | +*OpenapiClient::DefaultApi* | [**create_mapping**](docs/DefaultApi.md#create_mapping) | **POST** /api/2/mappings | +*OpenapiClient::DefaultApi* | [**create_risk_rule**](docs/DefaultApi.md#create_risk_rule) | **POST** /api/2/risk/rules | +*OpenapiClient::DefaultApi* | [**create_roles**](docs/DefaultApi.md#create_roles) | **POST** /api/2/roles | +*OpenapiClient::DefaultApi* | [**create_rule**](docs/DefaultApi.md#create_rule) | **POST** /api/2/apps/{app_id}/rules | +*OpenapiClient::DefaultApi* | [**create_user**](docs/DefaultApi.md#create_user) | **POST** /api/2/users | +*OpenapiClient::DefaultApi* | [**delete_access_token_claim**](docs/DefaultApi.md#delete_access_token_claim) | **DELETE** /api/2/api_authorizations/{id}/claims/{claim_id} | +*OpenapiClient::DefaultApi* | [**delete_app**](docs/DefaultApi.md#delete_app) | **DELETE** /api/2/apps/{app_id} | +*OpenapiClient::DefaultApi* | [**delete_app_parameter**](docs/DefaultApi.md#delete_app_parameter) | **DELETE** /api/2/apps/{app_id}/parameters/{parameter_id} | +*OpenapiClient::DefaultApi* | [**delete_authorization_server**](docs/DefaultApi.md#delete_authorization_server) | **DELETE** /api/2/api_authorizations/{id} | +*OpenapiClient::DefaultApi* | [**delete_environment_variable**](docs/DefaultApi.md#delete_environment_variable) | **DELETE** /api/2/hooks/envs/{envvar_id} | +*OpenapiClient::DefaultApi* | [**delete_factor**](docs/DefaultApi.md#delete_factor) | **DELETE** /api/2/mfa/users/{user_id}/devices/{device_id} | +*OpenapiClient::DefaultApi* | [**delete_hook**](docs/DefaultApi.md#delete_hook) | **DELETE** /api/2/hooks/{hook_id} | +*OpenapiClient::DefaultApi* | [**delete_mapping**](docs/DefaultApi.md#delete_mapping) | **DELETE** /api/2/mappings/{mapping_id} | +*OpenapiClient::DefaultApi* | [**delete_risk_rule**](docs/DefaultApi.md#delete_risk_rule) | **DELETE** /api/2/risk/rules/{risk_rule_id} | +*OpenapiClient::DefaultApi* | [**delete_role**](docs/DefaultApi.md#delete_role) | **DELETE** /api/2/roles/{role_id} | +*OpenapiClient::DefaultApi* | [**delete_rule**](docs/DefaultApi.md#delete_rule) | **DELETE** /api/2/apps/{app_id}/rules/{rule_id} | +*OpenapiClient::DefaultApi* | [**delete_scope**](docs/DefaultApi.md#delete_scope) | **DELETE** /api/2/api_authorizations/{id}/scopes/{scope_id} | +*OpenapiClient::DefaultApi* | [**delete_user**](docs/DefaultApi.md#delete_user) | **DELETE** /api/2/users/{user_id} | +*OpenapiClient::DefaultApi* | [**dry_run_mapping**](docs/DefaultApi.md#dry_run_mapping) | **POST** /api/2/mappings/{mapping_id}/dryrun | +*OpenapiClient::DefaultApi* | [**enroll_factor**](docs/DefaultApi.md#enroll_factor) | **POST** /api/2/mfa/users/{user_id}/registrations | +*OpenapiClient::DefaultApi* | [**generate_mfa_token**](docs/DefaultApi.md#generate_mfa_token) | **POST** /api/2/mfs/users/{user_id}/mfa_token | +*OpenapiClient::DefaultApi* | [**generate_saml_assertion**](docs/DefaultApi.md#generate_saml_assertion) | **POST** /api/2/saml_assertion | +*OpenapiClient::DefaultApi* | [**generate_token**](docs/DefaultApi.md#generate_token) | **POST** /auth/oauth2/v2/token | +*OpenapiClient::DefaultApi* | [**get_app**](docs/DefaultApi.md#get_app) | **GET** /api/2/apps/{app_id} | +*OpenapiClient::DefaultApi* | [**get_authorization_server**](docs/DefaultApi.md#get_authorization_server) | **GET** /api/2/api_authorizations/{id} | +*OpenapiClient::DefaultApi* | [**get_available_factors**](docs/DefaultApi.md#get_available_factors) | **GET** /api/2/mfa/users/{user_id}/factors | +*OpenapiClient::DefaultApi* | [**get_client_apps**](docs/DefaultApi.md#get_client_apps) | **GET** /api/2/api_authorizations/{id}/clients | +*OpenapiClient::DefaultApi* | [**get_enrolled_factors**](docs/DefaultApi.md#get_enrolled_factors) | **GET** /api/2/mfa/users/{user_id}/devices | +*OpenapiClient::DefaultApi* | [**get_environment_variable**](docs/DefaultApi.md#get_environment_variable) | **GET** /api/2/hooks/envs/{envvar_id} | +*OpenapiClient::DefaultApi* | [**get_hook**](docs/DefaultApi.md#get_hook) | **GET** /api/2/hooks/{hook_id} | +*OpenapiClient::DefaultApi* | [**get_logs**](docs/DefaultApi.md#get_logs) | **GET** /api/2/hooks/{hook_id}/logs | +*OpenapiClient::DefaultApi* | [**get_mapping**](docs/DefaultApi.md#get_mapping) | **GET** /api/2/mappings/{mapping_id} | +*OpenapiClient::DefaultApi* | [**get_rate_limit**](docs/DefaultApi.md#get_rate_limit) | **GET** /auth/rate_limit | +*OpenapiClient::DefaultApi* | [**get_risk_rule**](docs/DefaultApi.md#get_risk_rule) | **GET** /api/2/risk/rules/{risk_rule_id} | +*OpenapiClient::DefaultApi* | [**get_risk_score**](docs/DefaultApi.md#get_risk_score) | **POST** /api/2/risk/verify | +*OpenapiClient::DefaultApi* | [**get_role**](docs/DefaultApi.md#get_role) | **GET** /api/2/roles/{role_id} | +*OpenapiClient::DefaultApi* | [**get_role_admins**](docs/DefaultApi.md#get_role_admins) | **GET** /api/2/roles/{role_id}/admins | +*OpenapiClient::DefaultApi* | [**get_role_apps**](docs/DefaultApi.md#get_role_apps) | **GET** /api/2/roles/{role_id}/apps | +*OpenapiClient::DefaultApi* | [**get_role_users**](docs/DefaultApi.md#get_role_users) | **GET** /api/2/roles/{role_id}/users | +*OpenapiClient::DefaultApi* | [**get_rule**](docs/DefaultApi.md#get_rule) | **GET** /api/2/apps/{app_id}/rules/{rule_id} | +*OpenapiClient::DefaultApi* | [**get_score_insights**](docs/DefaultApi.md#get_score_insights) | **GET** /api/2/risk/scores | +*OpenapiClient::DefaultApi* | [**get_user**](docs/DefaultApi.md#get_user) | **GET** /api/2/users/{user_id} | +*OpenapiClient::DefaultApi* | [**get_user_apps**](docs/DefaultApi.md#get_user_apps) | **GET** /api/2/users/{user_id}/apps | +*OpenapiClient::DefaultApi* | [**list_access_token_claims**](docs/DefaultApi.md#list_access_token_claims) | **GET** /api/2/api_authorizations/{id}/claims | +*OpenapiClient::DefaultApi* | [**list_action_values**](docs/DefaultApi.md#list_action_values) | **GET** /api/2/apps/{app_id}/rules/actions/{actuion_value}/values | +*OpenapiClient::DefaultApi* | [**list_actions**](docs/DefaultApi.md#list_actions) | **GET** /api/2/apps/{app_id}/rules/actions | +*OpenapiClient::DefaultApi* | [**list_app_users**](docs/DefaultApi.md#list_app_users) | **GET** /api/2/apps/{app_id}/users | +*OpenapiClient::DefaultApi* | [**list_apps**](docs/DefaultApi.md#list_apps) | **GET** /api/2/apps | +*OpenapiClient::DefaultApi* | [**list_authorization_servers**](docs/DefaultApi.md#list_authorization_servers) | **GET** /api/2/api_authorizations | +*OpenapiClient::DefaultApi* | [**list_condition_operators**](docs/DefaultApi.md#list_condition_operators) | **GET** /api/2/apps/{app_id}/rules/conditions/{condition_value}/operators | +*OpenapiClient::DefaultApi* | [**list_condition_values**](docs/DefaultApi.md#list_condition_values) | **GET** /api/2/apps/{app_id}/rules/conditions/{condition_value}/values | +*OpenapiClient::DefaultApi* | [**list_conditions**](docs/DefaultApi.md#list_conditions) | **GET** /api/2/apps/{app_id}/rules/conditions | +*OpenapiClient::DefaultApi* | [**list_connectors**](docs/DefaultApi.md#list_connectors) | **GET** /api/2/connectors | +*OpenapiClient::DefaultApi* | [**list_environment_variables**](docs/DefaultApi.md#list_environment_variables) | **GET** /api/2/hooks/envs | +*OpenapiClient::DefaultApi* | [**list_hooks**](docs/DefaultApi.md#list_hooks) | **GET** /api/2/hooks | +*OpenapiClient::DefaultApi* | [**list_mapping_action_values**](docs/DefaultApi.md#list_mapping_action_values) | **GET** /api/2/apps/mappings/actions/{actuion_value}/values | +*OpenapiClient::DefaultApi* | [**list_mapping_actions**](docs/DefaultApi.md#list_mapping_actions) | **GET** /api/2/apps/mappings/actions | +*OpenapiClient::DefaultApi* | [**list_mapping_condition_operators**](docs/DefaultApi.md#list_mapping_condition_operators) | **GET** /api/2/apps/mappings/conditions/{condition_value}/operators | +*OpenapiClient::DefaultApi* | [**list_mapping_condition_values**](docs/DefaultApi.md#list_mapping_condition_values) | **GET** /api/2/apps/mappings/conditions/{condition_value}/values | +*OpenapiClient::DefaultApi* | [**list_mapping_conditions**](docs/DefaultApi.md#list_mapping_conditions) | **GET** /api/2/apps/mappings/conditions | +*OpenapiClient::DefaultApi* | [**list_mappings**](docs/DefaultApi.md#list_mappings) | **GET** /api/2/mappings | +*OpenapiClient::DefaultApi* | [**list_risk_rules**](docs/DefaultApi.md#list_risk_rules) | **GET** /api/2/risk/rules | +*OpenapiClient::DefaultApi* | [**list_roles**](docs/DefaultApi.md#list_roles) | **GET** /api/2/roles | +*OpenapiClient::DefaultApi* | [**list_rules**](docs/DefaultApi.md#list_rules) | **GET** /api/2/apps/{app_id}/rules | +*OpenapiClient::DefaultApi* | [**list_scopes**](docs/DefaultApi.md#list_scopes) | **GET** /api/2/api_authorizations/{id}/scopes | +*OpenapiClient::DefaultApi* | [**list_users**](docs/DefaultApi.md#list_users) | **GET** /api/2/users | +*OpenapiClient::DefaultApi* | [**remove_client_app**](docs/DefaultApi.md#remove_client_app) | **DELETE** /api/2/api_authorizations/{id}/clients/{client_app_id} | +*OpenapiClient::DefaultApi* | [**remove_role_admins**](docs/DefaultApi.md#remove_role_admins) | **DELETE** /api/2/roles/{role_id}/admins | +*OpenapiClient::DefaultApi* | [**remove_role_users**](docs/DefaultApi.md#remove_role_users) | **DELETE** /api/2/roles/{role_id}/users | +*OpenapiClient::DefaultApi* | [**revoke_token**](docs/DefaultApi.md#revoke_token) | **POST** /auth/oauth2/revoke | +*OpenapiClient::DefaultApi* | [**set_role_apps**](docs/DefaultApi.md#set_role_apps) | **PUT** /api/2/roles/{role_id}/apps | +*OpenapiClient::DefaultApi* | [**track_event**](docs/DefaultApi.md#track_event) | **POST** /api/2/risk/events | +*OpenapiClient::DefaultApi* | [**update_access_token_claim**](docs/DefaultApi.md#update_access_token_claim) | **PUT** /api/2/api_authorizations/{id}/claims/{claim_id} | +*OpenapiClient::DefaultApi* | [**update_app**](docs/DefaultApi.md#update_app) | **PUT** /api/2/apps/{app_id} | +*OpenapiClient::DefaultApi* | [**update_authorization_server**](docs/DefaultApi.md#update_authorization_server) | **PUT** /api/2/api_authorizations/{id} | +*OpenapiClient::DefaultApi* | [**update_client_app**](docs/DefaultApi.md#update_client_app) | **PUT** /api/2/api_authorizations/{id}/clients/{client_app_id} | +*OpenapiClient::DefaultApi* | [**update_environment_variable**](docs/DefaultApi.md#update_environment_variable) | **PUT** /api/2/hooks/envs/{envvar_id} | +*OpenapiClient::DefaultApi* | [**update_hook**](docs/DefaultApi.md#update_hook) | **PUT** /api/2/hooks/{hook_id} | +*OpenapiClient::DefaultApi* | [**update_mapping**](docs/DefaultApi.md#update_mapping) | **PUT** /api/2/mappings/{mapping_id} | +*OpenapiClient::DefaultApi* | [**update_risk_rule**](docs/DefaultApi.md#update_risk_rule) | **PUT** /api/2/risk/rules/{risk_rule_id} | +*OpenapiClient::DefaultApi* | [**update_role**](docs/DefaultApi.md#update_role) | **PUT** /api/2/roles/{role_id} | +*OpenapiClient::DefaultApi* | [**update_rule**](docs/DefaultApi.md#update_rule) | **PUT** /api/2/apps/{app_id}/rules/{rule_id} | +*OpenapiClient::DefaultApi* | [**update_scope**](docs/DefaultApi.md#update_scope) | **PUT** /api/2/api_authorizations/{id}/scopes/{scope_id} | +*OpenapiClient::DefaultApi* | [**update_user**](docs/DefaultApi.md#update_user) | **PUT** /api/2/users/{user_id} | +*OpenapiClient::DefaultApi* | [**verify_enrollment**](docs/DefaultApi.md#verify_enrollment) | **PUT** /api/2/mfa/users/{user_id}/registrations/{registration_id} | +*OpenapiClient::DefaultApi* | [**verify_enrollment_voice_protect**](docs/DefaultApi.md#verify_enrollment_voice_protect) | **GET** /api/2/mfa/users/{user_id}/registrations/{registration_id} | +*OpenapiClient::DefaultApi* | [**verify_factor**](docs/DefaultApi.md#verify_factor) | **PUT** /api/2/mfa/users/{user_id}/verifications/{verification_id} | +*OpenapiClient::DefaultApi* | [**verify_factor_saml**](docs/DefaultApi.md#verify_factor_saml) | **POST** /api/2/saml_assertion/verify_factor | +*OpenapiClient::DefaultApi* | [**verify_factor_voice**](docs/DefaultApi.md#verify_factor_voice) | **GET** /api/2/mfa/users/{user_id}/verifications/{verification_id} | + + +## Documentation for Models + + - [OpenapiClient::Action](docs/Action.md) + - [OpenapiClient::ActivateFactorRequest](docs/ActivateFactorRequest.md) + - [OpenapiClient::AddAccessTokenClaimRequest](docs/AddAccessTokenClaimRequest.md) + - [OpenapiClient::AddClientAppRequest](docs/AddClientAppRequest.md) + - [OpenapiClient::AddRoleUsers200ResponseInner](docs/AddRoleUsers200ResponseInner.md) + - [OpenapiClient::AddScopeRequest](docs/AddScopeRequest.md) + - [OpenapiClient::AuthMethod](docs/AuthMethod.md) + - [OpenapiClient::AuthServerConfiguration](docs/AuthServerConfiguration.md) + - [OpenapiClient::ClientApp](docs/ClientApp.md) + - [OpenapiClient::Condition](docs/Condition.md) + - [OpenapiClient::Connector](docs/Connector.md) + - [OpenapiClient::CreateAuthorizationServerRequest](docs/CreateAuthorizationServerRequest.md) + - [OpenapiClient::CreateEnvironmentVariableRequest](docs/CreateEnvironmentVariableRequest.md) + - [OpenapiClient::CreateRoles201ResponseInner](docs/CreateRoles201ResponseInner.md) + - [OpenapiClient::Device](docs/Device.md) + - [OpenapiClient::EnrollFactorRequest](docs/EnrollFactorRequest.md) + - [OpenapiClient::Envvar](docs/Envvar.md) + - [OpenapiClient::ErrorStatus](docs/ErrorStatus.md) + - [OpenapiClient::ErrorStatusErrorsInner](docs/ErrorStatusErrorsInner.md) + - [OpenapiClient::FactorInner](docs/FactorInner.md) + - [OpenapiClient::FactorInnerFactorData](docs/FactorInnerFactorData.md) + - [OpenapiClient::GenerateMfaToken200Response](docs/GenerateMfaToken200Response.md) + - [OpenapiClient::GenerateMfaToken422Response](docs/GenerateMfaToken422Response.md) + - [OpenapiClient::GenerateMfaToken422ResponseDetails](docs/GenerateMfaToken422ResponseDetails.md) + - [OpenapiClient::GenerateMfaTokenRequest](docs/GenerateMfaTokenRequest.md) + - [OpenapiClient::GenerateSamlAssertionRequest](docs/GenerateSamlAssertionRequest.md) + - [OpenapiClient::GenerateToken200Response](docs/GenerateToken200Response.md) + - [OpenapiClient::GenerateToken400Response](docs/GenerateToken400Response.md) + - [OpenapiClient::GenerateTokenRequest](docs/GenerateTokenRequest.md) + - [OpenapiClient::GetAuthorizationServer200Response](docs/GetAuthorizationServer200Response.md) + - [OpenapiClient::GetAvailableFactors200ResponseInner](docs/GetAvailableFactors200ResponseInner.md) + - [OpenapiClient::GetClientApps200ResponseInner](docs/GetClientApps200ResponseInner.md) + - [OpenapiClient::GetClientApps200ResponseInnerScopesInner](docs/GetClientApps200ResponseInnerScopesInner.md) + - [OpenapiClient::GetRateLimit200Response](docs/GetRateLimit200Response.md) + - [OpenapiClient::GetRateLimit200ResponseData](docs/GetRateLimit200ResponseData.md) + - [OpenapiClient::GetRiskScore200Response](docs/GetRiskScore200Response.md) + - [OpenapiClient::GetRiskScore400Response](docs/GetRiskScore400Response.md) + - [OpenapiClient::GetRiskScoreRequest](docs/GetRiskScoreRequest.md) + - [OpenapiClient::GetScoreInsights200Response](docs/GetScoreInsights200Response.md) + - [OpenapiClient::GetScoreInsights200ResponseScores](docs/GetScoreInsights200ResponseScores.md) + - [OpenapiClient::GetUserApps200ResponseInner](docs/GetUserApps200ResponseInner.md) + - [OpenapiClient::Hook](docs/Hook.md) + - [OpenapiClient::HookConditionsInner](docs/HookConditionsInner.md) + - [OpenapiClient::HookOptions](docs/HookOptions.md) + - [OpenapiClient::HookStatus](docs/HookStatus.md) + - [OpenapiClient::Id](docs/Id.md) + - [OpenapiClient::ListAccessTokenClaims200ResponseInner](docs/ListAccessTokenClaims200ResponseInner.md) + - [OpenapiClient::ListActions200ResponseInner](docs/ListActions200ResponseInner.md) + - [OpenapiClient::ListAppUsers200ResponseInner](docs/ListAppUsers200ResponseInner.md) + - [OpenapiClient::ListAuthorizationServers200ResponseInner](docs/ListAuthorizationServers200ResponseInner.md) + - [OpenapiClient::ListAuthorizationServers200ResponseInnerConfiguration](docs/ListAuthorizationServers200ResponseInnerConfiguration.md) + - [OpenapiClient::ListConditionOperators200ResponseInner](docs/ListConditionOperators200ResponseInner.md) + - [OpenapiClient::ListConditionValues200ResponseInner](docs/ListConditionValues200ResponseInner.md) + - [OpenapiClient::ListConditions200ResponseInner](docs/ListConditions200ResponseInner.md) + - [OpenapiClient::ListMappingConditionOperators200ResponseInner](docs/ListMappingConditionOperators200ResponseInner.md) + - [OpenapiClient::ListMappingConditions200ResponseInner](docs/ListMappingConditions200ResponseInner.md) + - [OpenapiClient::ListScopes200ResponseInner](docs/ListScopes200ResponseInner.md) + - [OpenapiClient::Log](docs/Log.md) + - [OpenapiClient::Mapping](docs/Mapping.md) + - [OpenapiClient::Registration](docs/Registration.md) + - [OpenapiClient::RemoveRoleUsersRequest](docs/RemoveRoleUsersRequest.md) + - [OpenapiClient::RevokeTokenRequest](docs/RevokeTokenRequest.md) + - [OpenapiClient::RiskDevice](docs/RiskDevice.md) + - [OpenapiClient::RiskRule](docs/RiskRule.md) + - [OpenapiClient::RiskUser](docs/RiskUser.md) + - [OpenapiClient::Role](docs/Role.md) + - [OpenapiClient::Rule](docs/Rule.md) + - [OpenapiClient::RuleId](docs/RuleId.md) + - [OpenapiClient::Schema](docs/Schema.md) + - [OpenapiClient::Schema1](docs/Schema1.md) + - [OpenapiClient::Schema1AddedBy](docs/Schema1AddedBy.md) + - [OpenapiClient::SchemaProvisioning](docs/SchemaProvisioning.md) + - [OpenapiClient::Session](docs/Session.md) + - [OpenapiClient::SetRoleApps200ResponseInner](docs/SetRoleApps200ResponseInner.md) + - [OpenapiClient::Source](docs/Source.md) + - [OpenapiClient::Status](docs/Status.md) + - [OpenapiClient::Status1](docs/Status1.md) + - [OpenapiClient::Status2](docs/Status2.md) + - [OpenapiClient::Status2Status](docs/Status2Status.md) + - [OpenapiClient::TrackEventRequest](docs/TrackEventRequest.md) + - [OpenapiClient::UpdateAuthorizationServer400Response](docs/UpdateAuthorizationServer400Response.md) + - [OpenapiClient::UpdateClientAppRequest](docs/UpdateClientAppRequest.md) + - [OpenapiClient::UpdateEnvironmentVariableRequest](docs/UpdateEnvironmentVariableRequest.md) + - [OpenapiClient::UpdateRole200Response](docs/UpdateRole200Response.md) + - [OpenapiClient::User](docs/User.md) + - [OpenapiClient::VerifyEnrollmentRequest](docs/VerifyEnrollmentRequest.md) + - [OpenapiClient::VerifyFactorRequest](docs/VerifyFactorRequest.md) + - [OpenapiClient::VerifyFactorSaml200Response](docs/VerifyFactorSaml200Response.md) + - [OpenapiClient::VerifyFactorSamlRequest](docs/VerifyFactorSamlRequest.md) + - [OpenapiClient::VerifyFactorVoice200ResponseInner](docs/VerifyFactorVoice200ResponseInner.md) + + +## Documentation for Authorization + + All endpoints do not require authorization. -Everyone interacting in the OneLogin Ruby Sdk project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/onelogin/onelogin-ruby-sdk/blob/master/CODE_OF_CONDUCT.md). diff --git a/Rakefile b/Rakefile index b7e9ed5..c72ca30 100644 --- a/Rakefile +++ b/Rakefile @@ -1,6 +1,10 @@ require "bundler/gem_tasks" -require "rspec/core/rake_task" -RSpec::Core::RakeTask.new(:spec) +begin + require 'rspec/core/rake_task' -task :default => :spec + RSpec::Core::RakeTask.new(:spec) + task default: :spec +rescue LoadError + # no rspec available +end diff --git a/bin/console b/bin/console deleted file mode 100755 index aceafbe..0000000 --- a/bin/console +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env ruby - -require "bundler/setup" -require "onelogin" - -# You can add fixtures and/or initialization code here to make experimenting -# with your gem easier. You can also use a different console, if you like. - -# (If you use this, don't forget to add pry to your Gemfile!) -# require "pry" -# Pry.start - -require "irb" -IRB.start(__FILE__) diff --git a/bin/setup b/bin/setup deleted file mode 100755 index cf4ad25..0000000 --- a/bin/setup +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail -IFS=$'\n\t' -set -vx - -bundle install diff --git a/docs/Action.md b/docs/Action.md new file mode 100644 index 0000000..5b87692 --- /dev/null +++ b/docs/Action.md @@ -0,0 +1,26 @@ +# OpenapiClient::Action + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **action** | **String** | The action to apply | [optional] | +| **value** | **Array<String>** | Only applicable to provisioned and set_* actions. Items in the array will be a plain text string or valid value for the selected action. | [optional] | +| **expression** | **String** | A regular expression to extract a value. Applies to provisionable, multi-selects, and string actions. | [optional] | +| **scriplet** | **String** | A hash containing scriptlet code that returns a value. | [optional] | +| **macro** | **String** | A template to construct a value. Applies to default, string, and list actions. | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::Action.new( + action: null, + value: null, + expression: null, + scriplet: null, + macro: null +) +``` + diff --git a/docs/ActivateFactorRequest.md b/docs/ActivateFactorRequest.md new file mode 100644 index 0000000..1493e11 --- /dev/null +++ b/docs/ActivateFactorRequest.md @@ -0,0 +1,24 @@ +# OpenapiClient::ActivateFactorRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **device_id** | **Integer** | Required. Specifies the factor to be verified. | [optional] | +| **expires_in** | **Integer** | Optional. Sets the window of time in seconds that the factor must be verified within. | [optional] | +| **redirect_to** | **String** | Optional. Only applies to Email MagicLink factor. | [optional] | +| **custom_message** | **String** | Optional. Only applies to SMS factor. A message template that will be sent via SMS. | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::ActivateFactorRequest.new( + device_id: null, + expires_in: null, + redirect_to: null, + custom_message: null +) +``` + diff --git a/docs/AddAccessTokenClaimRequest.md b/docs/AddAccessTokenClaimRequest.md new file mode 100644 index 0000000..5b0fbaa --- /dev/null +++ b/docs/AddAccessTokenClaimRequest.md @@ -0,0 +1,22 @@ +# OpenapiClient::AddAccessTokenClaimRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **name** | **String** | | [optional] | +| **user_attribute_mappings** | **String** | | [optional] | +| **user_attribute_macros** | **String** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::AddAccessTokenClaimRequest.new( + name: null, + user_attribute_mappings: null, + user_attribute_macros: null +) +``` + diff --git a/docs/AddClientAppRequest.md b/docs/AddClientAppRequest.md new file mode 100644 index 0000000..6acdbdc --- /dev/null +++ b/docs/AddClientAppRequest.md @@ -0,0 +1,20 @@ +# OpenapiClient::AddClientAppRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **app_id** | **Integer** | | [optional] | +| **scopes** | **Array<Integer>** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::AddClientAppRequest.new( + app_id: null, + scopes: null +) +``` + diff --git a/docs/AddRoleUsers200ResponseInner.md b/docs/AddRoleUsers200ResponseInner.md new file mode 100644 index 0000000..2c4f3fb --- /dev/null +++ b/docs/AddRoleUsers200ResponseInner.md @@ -0,0 +1,18 @@ +# OpenapiClient::AddRoleUsers200ResponseInner + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **Integer** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::AddRoleUsers200ResponseInner.new( + id: null +) +``` + diff --git a/docs/AddScopeRequest.md b/docs/AddScopeRequest.md new file mode 100644 index 0000000..1040f86 --- /dev/null +++ b/docs/AddScopeRequest.md @@ -0,0 +1,20 @@ +# OpenapiClient::AddScopeRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **value** | **String** | | [optional] | +| **description** | **String** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::AddScopeRequest.new( + value: null, + description: null +) +``` + diff --git a/docs/AuthMethod.md b/docs/AuthMethod.md new file mode 100644 index 0000000..814348c --- /dev/null +++ b/docs/AuthMethod.md @@ -0,0 +1,15 @@ +# OpenapiClient::AuthMethod + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::AuthMethod.new() +``` + diff --git a/docs/AuthServerConfiguration.md b/docs/AuthServerConfiguration.md new file mode 100644 index 0000000..2d603cc --- /dev/null +++ b/docs/AuthServerConfiguration.md @@ -0,0 +1,24 @@ +# OpenapiClient::AuthServerConfiguration + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **audiences** | **Array<String>** | | [optional] | +| **refresh_token_expiration_minutes** | **Integer** | | [optional] | +| **resource_identifier** | **String** | | [optional] | +| **access_token_expiration_minutes** | **Integer** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::AuthServerConfiguration.new( + audiences: null, + refresh_token_expiration_minutes: null, + resource_identifier: null, + access_token_expiration_minutes: null +) +``` + diff --git a/docs/ClientApp.md b/docs/ClientApp.md new file mode 100644 index 0000000..eed53fe --- /dev/null +++ b/docs/ClientApp.md @@ -0,0 +1,20 @@ +# OpenapiClient::ClientApp + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **app_id** | **Integer** | | [optional] | +| **api_auth_id** | **Integer** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::ClientApp.new( + app_id: null, + api_auth_id: null +) +``` + diff --git a/docs/Condition.md b/docs/Condition.md new file mode 100644 index 0000000..e7ba475 --- /dev/null +++ b/docs/Condition.md @@ -0,0 +1,22 @@ +# OpenapiClient::Condition + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **source** | **String** | The source field to check. | [optional] | +| **operator** | **String** | A valid operator for the selected condition source | [optional] | +| **value** | **String** | A plain text string or valid value for the selected condition source. | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::Condition.new( + source: null, + operator: null, + value: null +) +``` + diff --git a/docs/Connector.md b/docs/Connector.md new file mode 100644 index 0000000..d3e688b --- /dev/null +++ b/docs/Connector.md @@ -0,0 +1,26 @@ +# OpenapiClient::Connector + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **Integer** | The connectors unique ID in OneLogin. | [optional] | +| **name** | **String** | The name of the connector. | [optional] | +| **auth_method** | [**AuthMethod**](AuthMethod.md) | | [optional] | +| **allows_new_parameters** | **Boolean** | Indicates if apps created using this connector will be allowed to create custom parameters. | [optional] | +| **icon_url** | **String** | A link to the apps icon url. | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::Connector.new( + id: null, + name: null, + auth_method: null, + allows_new_parameters: null, + icon_url: null +) +``` + diff --git a/docs/CreateAuthorizationServerRequest.md b/docs/CreateAuthorizationServerRequest.md new file mode 100644 index 0000000..f9102b1 --- /dev/null +++ b/docs/CreateAuthorizationServerRequest.md @@ -0,0 +1,22 @@ +# OpenapiClient::CreateAuthorizationServerRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **name** | **String** | | [optional] | +| **description** | **String** | | [optional] | +| **configuration** | [**AuthServerConfiguration**](AuthServerConfiguration.md) | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::CreateAuthorizationServerRequest.new( + name: null, + description: null, + configuration: null +) +``` + diff --git a/docs/CreateEnvironmentVariableRequest.md b/docs/CreateEnvironmentVariableRequest.md new file mode 100644 index 0000000..3734901 --- /dev/null +++ b/docs/CreateEnvironmentVariableRequest.md @@ -0,0 +1,20 @@ +# OpenapiClient::CreateEnvironmentVariableRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **name** | **String** | The name for the environment variable that will be used to retrieve the value from a hook function. | | +| **value** | **String** | The secret value that will be encrypted at rest and injected in applicable hook functions at run time. | | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::CreateEnvironmentVariableRequest.new( + name: null, + value: null +) +``` + diff --git a/docs/CreateRoles201ResponseInner.md b/docs/CreateRoles201ResponseInner.md new file mode 100644 index 0000000..3c492d1 --- /dev/null +++ b/docs/CreateRoles201ResponseInner.md @@ -0,0 +1,18 @@ +# OpenapiClient::CreateRoles201ResponseInner + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **Integer** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::CreateRoles201ResponseInner.new( + id: null +) +``` + diff --git a/docs/DefaultApi.md b/docs/DefaultApi.md new file mode 100644 index 0000000..43a34b3 --- /dev/null +++ b/docs/DefaultApi.md @@ -0,0 +1,6812 @@ +# OpenapiClient::DefaultApi + +All URIs are relative to *https://onelogininc.onelogin.com* + +| Method | HTTP request | Description | +| ------ | ------------ | ----------- | +| [**activate_factor**](DefaultApi.md#activate_factor) | **POST** /api/2/mfa/users/{user_id}/verifications | | +| [**add_access_token_claim**](DefaultApi.md#add_access_token_claim) | **POST** /api/2/api_authorizations/{id}/claims | | +| [**add_client_app**](DefaultApi.md#add_client_app) | **POST** /api/2/api_authorizations/{id}/clients | | +| [**add_role_admins**](DefaultApi.md#add_role_admins) | **POST** /api/2/roles/{role_id}/admins | | +| [**add_role_users**](DefaultApi.md#add_role_users) | **POST** /api/2/roles/{role_id}/users | | +| [**add_scope**](DefaultApi.md#add_scope) | **POST** /api/2/api_authorizations/{id}/scopes | | +| [**bulk_mapping_sort**](DefaultApi.md#bulk_mapping_sort) | **PUT** /api/2/apps/mappings/sort | | +| [**bulk_sort**](DefaultApi.md#bulk_sort) | **PUT** /api/2/apps/{app_id}/rules/sort | | +| [**create_app**](DefaultApi.md#create_app) | **POST** /api/2/apps | | +| [**create_authorization_server**](DefaultApi.md#create_authorization_server) | **POST** /api/2/api_authorizations | | +| [**create_environment_variable**](DefaultApi.md#create_environment_variable) | **POST** /api/2/hooks/envs | | +| [**create_hook**](DefaultApi.md#create_hook) | **POST** /api/2/hooks | | +| [**create_mapping**](DefaultApi.md#create_mapping) | **POST** /api/2/mappings | | +| [**create_risk_rule**](DefaultApi.md#create_risk_rule) | **POST** /api/2/risk/rules | | +| [**create_roles**](DefaultApi.md#create_roles) | **POST** /api/2/roles | | +| [**create_rule**](DefaultApi.md#create_rule) | **POST** /api/2/apps/{app_id}/rules | | +| [**create_user**](DefaultApi.md#create_user) | **POST** /api/2/users | | +| [**delete_access_token_claim**](DefaultApi.md#delete_access_token_claim) | **DELETE** /api/2/api_authorizations/{id}/claims/{claim_id} | | +| [**delete_app**](DefaultApi.md#delete_app) | **DELETE** /api/2/apps/{app_id} | | +| [**delete_app_parameter**](DefaultApi.md#delete_app_parameter) | **DELETE** /api/2/apps/{app_id}/parameters/{parameter_id} | | +| [**delete_authorization_server**](DefaultApi.md#delete_authorization_server) | **DELETE** /api/2/api_authorizations/{id} | | +| [**delete_environment_variable**](DefaultApi.md#delete_environment_variable) | **DELETE** /api/2/hooks/envs/{envvar_id} | | +| [**delete_factor**](DefaultApi.md#delete_factor) | **DELETE** /api/2/mfa/users/{user_id}/devices/{device_id} | | +| [**delete_hook**](DefaultApi.md#delete_hook) | **DELETE** /api/2/hooks/{hook_id} | | +| [**delete_mapping**](DefaultApi.md#delete_mapping) | **DELETE** /api/2/mappings/{mapping_id} | | +| [**delete_risk_rule**](DefaultApi.md#delete_risk_rule) | **DELETE** /api/2/risk/rules/{risk_rule_id} | | +| [**delete_role**](DefaultApi.md#delete_role) | **DELETE** /api/2/roles/{role_id} | | +| [**delete_rule**](DefaultApi.md#delete_rule) | **DELETE** /api/2/apps/{app_id}/rules/{rule_id} | | +| [**delete_scope**](DefaultApi.md#delete_scope) | **DELETE** /api/2/api_authorizations/{id}/scopes/{scope_id} | | +| [**delete_user**](DefaultApi.md#delete_user) | **DELETE** /api/2/users/{user_id} | | +| [**dry_run_mapping**](DefaultApi.md#dry_run_mapping) | **POST** /api/2/mappings/{mapping_id}/dryrun | | +| [**enroll_factor**](DefaultApi.md#enroll_factor) | **POST** /api/2/mfa/users/{user_id}/registrations | | +| [**generate_mfa_token**](DefaultApi.md#generate_mfa_token) | **POST** /api/2/mfs/users/{user_id}/mfa_token | | +| [**generate_saml_assertion**](DefaultApi.md#generate_saml_assertion) | **POST** /api/2/saml_assertion | | +| [**generate_token**](DefaultApi.md#generate_token) | **POST** /auth/oauth2/v2/token | | +| [**get_app**](DefaultApi.md#get_app) | **GET** /api/2/apps/{app_id} | | +| [**get_authorization_server**](DefaultApi.md#get_authorization_server) | **GET** /api/2/api_authorizations/{id} | | +| [**get_available_factors**](DefaultApi.md#get_available_factors) | **GET** /api/2/mfa/users/{user_id}/factors | | +| [**get_client_apps**](DefaultApi.md#get_client_apps) | **GET** /api/2/api_authorizations/{id}/clients | | +| [**get_enrolled_factors**](DefaultApi.md#get_enrolled_factors) | **GET** /api/2/mfa/users/{user_id}/devices | | +| [**get_environment_variable**](DefaultApi.md#get_environment_variable) | **GET** /api/2/hooks/envs/{envvar_id} | | +| [**get_hook**](DefaultApi.md#get_hook) | **GET** /api/2/hooks/{hook_id} | | +| [**get_logs**](DefaultApi.md#get_logs) | **GET** /api/2/hooks/{hook_id}/logs | | +| [**get_mapping**](DefaultApi.md#get_mapping) | **GET** /api/2/mappings/{mapping_id} | | +| [**get_rate_limit**](DefaultApi.md#get_rate_limit) | **GET** /auth/rate_limit | | +| [**get_risk_rule**](DefaultApi.md#get_risk_rule) | **GET** /api/2/risk/rules/{risk_rule_id} | | +| [**get_risk_score**](DefaultApi.md#get_risk_score) | **POST** /api/2/risk/verify | | +| [**get_role**](DefaultApi.md#get_role) | **GET** /api/2/roles/{role_id} | | +| [**get_role_admins**](DefaultApi.md#get_role_admins) | **GET** /api/2/roles/{role_id}/admins | | +| [**get_role_apps**](DefaultApi.md#get_role_apps) | **GET** /api/2/roles/{role_id}/apps | | +| [**get_role_users**](DefaultApi.md#get_role_users) | **GET** /api/2/roles/{role_id}/users | | +| [**get_rule**](DefaultApi.md#get_rule) | **GET** /api/2/apps/{app_id}/rules/{rule_id} | | +| [**get_score_insights**](DefaultApi.md#get_score_insights) | **GET** /api/2/risk/scores | | +| [**get_user**](DefaultApi.md#get_user) | **GET** /api/2/users/{user_id} | | +| [**get_user_apps**](DefaultApi.md#get_user_apps) | **GET** /api/2/users/{user_id}/apps | | +| [**list_access_token_claims**](DefaultApi.md#list_access_token_claims) | **GET** /api/2/api_authorizations/{id}/claims | | +| [**list_action_values**](DefaultApi.md#list_action_values) | **GET** /api/2/apps/{app_id}/rules/actions/{actuion_value}/values | | +| [**list_actions**](DefaultApi.md#list_actions) | **GET** /api/2/apps/{app_id}/rules/actions | | +| [**list_app_users**](DefaultApi.md#list_app_users) | **GET** /api/2/apps/{app_id}/users | | +| [**list_apps**](DefaultApi.md#list_apps) | **GET** /api/2/apps | | +| [**list_authorization_servers**](DefaultApi.md#list_authorization_servers) | **GET** /api/2/api_authorizations | | +| [**list_condition_operators**](DefaultApi.md#list_condition_operators) | **GET** /api/2/apps/{app_id}/rules/conditions/{condition_value}/operators | | +| [**list_condition_values**](DefaultApi.md#list_condition_values) | **GET** /api/2/apps/{app_id}/rules/conditions/{condition_value}/values | | +| [**list_conditions**](DefaultApi.md#list_conditions) | **GET** /api/2/apps/{app_id}/rules/conditions | | +| [**list_connectors**](DefaultApi.md#list_connectors) | **GET** /api/2/connectors | | +| [**list_environment_variables**](DefaultApi.md#list_environment_variables) | **GET** /api/2/hooks/envs | | +| [**list_hooks**](DefaultApi.md#list_hooks) | **GET** /api/2/hooks | | +| [**list_mapping_action_values**](DefaultApi.md#list_mapping_action_values) | **GET** /api/2/apps/mappings/actions/{actuion_value}/values | | +| [**list_mapping_actions**](DefaultApi.md#list_mapping_actions) | **GET** /api/2/apps/mappings/actions | | +| [**list_mapping_condition_operators**](DefaultApi.md#list_mapping_condition_operators) | **GET** /api/2/apps/mappings/conditions/{condition_value}/operators | | +| [**list_mapping_condition_values**](DefaultApi.md#list_mapping_condition_values) | **GET** /api/2/apps/mappings/conditions/{condition_value}/values | | +| [**list_mapping_conditions**](DefaultApi.md#list_mapping_conditions) | **GET** /api/2/apps/mappings/conditions | | +| [**list_mappings**](DefaultApi.md#list_mappings) | **GET** /api/2/mappings | | +| [**list_risk_rules**](DefaultApi.md#list_risk_rules) | **GET** /api/2/risk/rules | | +| [**list_roles**](DefaultApi.md#list_roles) | **GET** /api/2/roles | | +| [**list_rules**](DefaultApi.md#list_rules) | **GET** /api/2/apps/{app_id}/rules | | +| [**list_scopes**](DefaultApi.md#list_scopes) | **GET** /api/2/api_authorizations/{id}/scopes | | +| [**list_users**](DefaultApi.md#list_users) | **GET** /api/2/users | | +| [**remove_client_app**](DefaultApi.md#remove_client_app) | **DELETE** /api/2/api_authorizations/{id}/clients/{client_app_id} | | +| [**remove_role_admins**](DefaultApi.md#remove_role_admins) | **DELETE** /api/2/roles/{role_id}/admins | | +| [**remove_role_users**](DefaultApi.md#remove_role_users) | **DELETE** /api/2/roles/{role_id}/users | | +| [**revoke_token**](DefaultApi.md#revoke_token) | **POST** /auth/oauth2/revoke | | +| [**set_role_apps**](DefaultApi.md#set_role_apps) | **PUT** /api/2/roles/{role_id}/apps | | +| [**track_event**](DefaultApi.md#track_event) | **POST** /api/2/risk/events | | +| [**update_access_token_claim**](DefaultApi.md#update_access_token_claim) | **PUT** /api/2/api_authorizations/{id}/claims/{claim_id} | | +| [**update_app**](DefaultApi.md#update_app) | **PUT** /api/2/apps/{app_id} | | +| [**update_authorization_server**](DefaultApi.md#update_authorization_server) | **PUT** /api/2/api_authorizations/{id} | | +| [**update_client_app**](DefaultApi.md#update_client_app) | **PUT** /api/2/api_authorizations/{id}/clients/{client_app_id} | | +| [**update_environment_variable**](DefaultApi.md#update_environment_variable) | **PUT** /api/2/hooks/envs/{envvar_id} | | +| [**update_hook**](DefaultApi.md#update_hook) | **PUT** /api/2/hooks/{hook_id} | | +| [**update_mapping**](DefaultApi.md#update_mapping) | **PUT** /api/2/mappings/{mapping_id} | | +| [**update_risk_rule**](DefaultApi.md#update_risk_rule) | **PUT** /api/2/risk/rules/{risk_rule_id} | | +| [**update_role**](DefaultApi.md#update_role) | **PUT** /api/2/roles/{role_id} | | +| [**update_rule**](DefaultApi.md#update_rule) | **PUT** /api/2/apps/{app_id}/rules/{rule_id} | | +| [**update_scope**](DefaultApi.md#update_scope) | **PUT** /api/2/api_authorizations/{id}/scopes/{scope_id} | | +| [**update_user**](DefaultApi.md#update_user) | **PUT** /api/2/users/{user_id} | | +| [**verify_enrollment**](DefaultApi.md#verify_enrollment) | **PUT** /api/2/mfa/users/{user_id}/registrations/{registration_id} | | +| [**verify_enrollment_voice_protect**](DefaultApi.md#verify_enrollment_voice_protect) | **GET** /api/2/mfa/users/{user_id}/registrations/{registration_id} | | +| [**verify_factor**](DefaultApi.md#verify_factor) | **PUT** /api/2/mfa/users/{user_id}/verifications/{verification_id} | | +| [**verify_factor_saml**](DefaultApi.md#verify_factor_saml) | **POST** /api/2/saml_assertion/verify_factor | | +| [**verify_factor_voice**](DefaultApi.md#verify_factor_voice) | **GET** /api/2/mfa/users/{user_id}/verifications/{verification_id} | | + + +## activate_factor + +> activate_factor(authorization, user_id, activate_factor_request) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +user_id = 56 # Integer | Set to the id of the user. +activate_factor_request = OpenapiClient::ActivateFactorRequest.new # ActivateFactorRequest | + +begin + + api_instance.activate_factor(authorization, user_id, activate_factor_request) +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->activate_factor: #{e}" +end +``` + +#### Using the activate_factor_with_http_info variant + +This returns an Array which contains the response data (`nil` in this case), status code and headers. + +> activate_factor_with_http_info(authorization, user_id, activate_factor_request) + +```ruby +begin + + data, status_code, headers = api_instance.activate_factor_with_http_info(authorization, user_id, activate_factor_request) + p status_code # => 2xx + p headers # => { ... } + p data # => nil +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->activate_factor_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **user_id** | **Integer** | Set to the id of the user. | | +| **activate_factor_request** | [**ActivateFactorRequest**](ActivateFactorRequest.md) | | | + +### Return type + +nil (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## add_access_token_claim + +> add_access_token_claim(authorization, id, add_access_token_claim_request) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +id = 56 # Integer | +add_access_token_claim_request = OpenapiClient::AddAccessTokenClaimRequest.new # AddAccessTokenClaimRequest | + +begin + + result = api_instance.add_access_token_claim(authorization, id, add_access_token_claim_request) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->add_access_token_claim: #{e}" +end +``` + +#### Using the add_access_token_claim_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> add_access_token_claim_with_http_info(authorization, id, add_access_token_claim_request) + +```ruby +begin + + data, status_code, headers = api_instance.add_access_token_claim_with_http_info(authorization, id, add_access_token_claim_request) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->add_access_token_claim_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **id** | **Integer** | | | +| **add_access_token_claim_request** | [**AddAccessTokenClaimRequest**](AddAccessTokenClaimRequest.md) | | | + +### Return type + +[**Id**](Id.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## add_client_app + +> add_client_app(authorization, id, add_client_app_request) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +id = 56 # Integer | +add_client_app_request = OpenapiClient::AddClientAppRequest.new # AddClientAppRequest | + +begin + + result = api_instance.add_client_app(authorization, id, add_client_app_request) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->add_client_app: #{e}" +end +``` + +#### Using the add_client_app_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> add_client_app_with_http_info(authorization, id, add_client_app_request) + +```ruby +begin + + data, status_code, headers = api_instance.add_client_app_with_http_info(authorization, id, add_client_app_request) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->add_client_app_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **id** | **Integer** | | | +| **add_client_app_request** | [**AddClientAppRequest**](AddClientAppRequest.md) | | | + +### Return type + +[**ClientApp**](ClientApp.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## add_role_admins + +> > add_role_admins(authorization, role_id, request_body) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +role_id = 56 # Integer | Set to the id of the role you want to return. +request_body = [37] # Array | + +begin + + result = api_instance.add_role_admins(authorization, role_id, request_body) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->add_role_admins: #{e}" +end +``` + +#### Using the add_role_admins_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> >, Integer, Hash)> add_role_admins_with_http_info(authorization, role_id, request_body) + +```ruby +begin + + data, status_code, headers = api_instance.add_role_admins_with_http_info(authorization, role_id, request_body) + p status_code # => 2xx + p headers # => { ... } + p data # => > +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->add_role_admins_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **role_id** | **Integer** | Set to the id of the role you want to return. | | +| **request_body** | [**Array<Integer>**](Integer.md) | | | + +### Return type + +[**Array<AddRoleUsers200ResponseInner>**](AddRoleUsers200ResponseInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## add_role_users + +> > add_role_users(authorization, role_id, request_body) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +role_id = 56 # Integer | Set to the id of the role you want to return. +request_body = [37] # Array | + +begin + + result = api_instance.add_role_users(authorization, role_id, request_body) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->add_role_users: #{e}" +end +``` + +#### Using the add_role_users_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> >, Integer, Hash)> add_role_users_with_http_info(authorization, role_id, request_body) + +```ruby +begin + + data, status_code, headers = api_instance.add_role_users_with_http_info(authorization, role_id, request_body) + p status_code # => 2xx + p headers # => { ... } + p data # => > +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->add_role_users_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **role_id** | **Integer** | Set to the id of the role you want to return. | | +| **request_body** | [**Array<Integer>**](Integer.md) | | | + +### Return type + +[**Array<AddRoleUsers200ResponseInner>**](AddRoleUsers200ResponseInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## add_scope + +> add_scope(authorization, id, add_scope_request) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +id = 56 # Integer | +add_scope_request = OpenapiClient::AddScopeRequest.new # AddScopeRequest | + +begin + + result = api_instance.add_scope(authorization, id, add_scope_request) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->add_scope: #{e}" +end +``` + +#### Using the add_scope_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> add_scope_with_http_info(authorization, id, add_scope_request) + +```ruby +begin + + data, status_code, headers = api_instance.add_scope_with_http_info(authorization, id, add_scope_request) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->add_scope_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **id** | **Integer** | | | +| **add_scope_request** | [**AddScopeRequest**](AddScopeRequest.md) | | | + +### Return type + +[**Id**](Id.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## bulk_mapping_sort + +> Array<Integer> bulk_mapping_sort(authorization, request_body) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +request_body = [37] # Array | The request body must contain an array of User Mapping IDs in the desired order. + +begin + + result = api_instance.bulk_mapping_sort(authorization, request_body) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->bulk_mapping_sort: #{e}" +end +``` + +#### Using the bulk_mapping_sort_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> bulk_mapping_sort_with_http_info(authorization, request_body) + +```ruby +begin + + data, status_code, headers = api_instance.bulk_mapping_sort_with_http_info(authorization, request_body) + p status_code # => 2xx + p headers # => { ... } + p data # => Array<Integer> +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->bulk_mapping_sort_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **request_body** | [**Array<Integer>**](Integer.md) | The request body must contain an array of User Mapping IDs in the desired order. | | + +### Return type + +**Array<Integer>** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## bulk_sort + +> Array<Integer> bulk_sort(authorization, app_id, request_body) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +app_id = 56 # Integer | +request_body = [37] # Array | The request body must contain an array of App Rule IDs in the desired order. + +begin + + result = api_instance.bulk_sort(authorization, app_id, request_body) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->bulk_sort: #{e}" +end +``` + +#### Using the bulk_sort_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> bulk_sort_with_http_info(authorization, app_id, request_body) + +```ruby +begin + + data, status_code, headers = api_instance.bulk_sort_with_http_info(authorization, app_id, request_body) + p status_code # => 2xx + p headers # => { ... } + p data # => Array<Integer> +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->bulk_sort_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **app_id** | **Integer** | | | +| **request_body** | [**Array<Integer>**](Integer.md) | The request body must contain an array of App Rule IDs in the desired order. | | + +### Return type + +**Array<Integer>** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## create_app + +> create_app(authorization, schema) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +schema = OpenapiClient::Schema.new # Schema | + +begin + + result = api_instance.create_app(authorization, schema) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->create_app: #{e}" +end +``` + +#### Using the create_app_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> create_app_with_http_info(authorization, schema) + +```ruby +begin + + data, status_code, headers = api_instance.create_app_with_http_info(authorization, schema) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->create_app_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **schema** | [**Schema**](Schema.md) | | | + +### Return type + +[**Schema**](Schema.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## create_authorization_server + +> create_authorization_server(authorization, create_authorization_server_request) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +create_authorization_server_request = OpenapiClient::CreateAuthorizationServerRequest.new # CreateAuthorizationServerRequest | + +begin + + result = api_instance.create_authorization_server(authorization, create_authorization_server_request) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->create_authorization_server: #{e}" +end +``` + +#### Using the create_authorization_server_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> create_authorization_server_with_http_info(authorization, create_authorization_server_request) + +```ruby +begin + + data, status_code, headers = api_instance.create_authorization_server_with_http_info(authorization, create_authorization_server_request) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->create_authorization_server_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **create_authorization_server_request** | [**CreateAuthorizationServerRequest**](CreateAuthorizationServerRequest.md) | | | + +### Return type + +[**Id**](Id.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## create_environment_variable + +> create_environment_variable(authorization, create_environment_variable_request) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +create_environment_variable_request = OpenapiClient::CreateEnvironmentVariableRequest.new({name: 'name_example', value: 'value_example'}) # CreateEnvironmentVariableRequest | + +begin + + result = api_instance.create_environment_variable(authorization, create_environment_variable_request) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->create_environment_variable: #{e}" +end +``` + +#### Using the create_environment_variable_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> create_environment_variable_with_http_info(authorization, create_environment_variable_request) + +```ruby +begin + + data, status_code, headers = api_instance.create_environment_variable_with_http_info(authorization, create_environment_variable_request) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->create_environment_variable_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **create_environment_variable_request** | [**CreateEnvironmentVariableRequest**](CreateEnvironmentVariableRequest.md) | | | + +### Return type + +[**Envvar**](Envvar.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## create_hook + +> create_hook(authorization, hook) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +hook = OpenapiClient::Hook.new({type: 'type_example', disabled: false, timeout: 37, env_vars: ['env_vars_example'], runtime: 'runtime_example', retries: 37, packages: 3.56, function: 'function_example'}) # Hook | + +begin + + api_instance.create_hook(authorization, hook) +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->create_hook: #{e}" +end +``` + +#### Using the create_hook_with_http_info variant + +This returns an Array which contains the response data (`nil` in this case), status code and headers. + +> create_hook_with_http_info(authorization, hook) + +```ruby +begin + + data, status_code, headers = api_instance.create_hook_with_http_info(authorization, hook) + p status_code # => 2xx + p headers # => { ... } + p data # => nil +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->create_hook_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **hook** | [**Hook**](Hook.md) | | | + +### Return type + +nil (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + + +## create_mapping + +> Integer create_mapping(authorization, mapping) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +mapping = OpenapiClient::Mapping.new({name: 'name_example', enabled: false, match: 'all', position: 37, actions: [OpenapiClient::Action.new]}) # Mapping | + +begin + + result = api_instance.create_mapping(authorization, mapping) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->create_mapping: #{e}" +end +``` + +#### Using the create_mapping_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> create_mapping_with_http_info(authorization, mapping) + +```ruby +begin + + data, status_code, headers = api_instance.create_mapping_with_http_info(authorization, mapping) + p status_code # => 2xx + p headers # => { ... } + p data # => Integer +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->create_mapping_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **mapping** | [**Mapping**](Mapping.md) | | | + +### Return type + +**Integer** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## create_risk_rule + +> create_risk_rule(authorization, risk_rule) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +risk_rule = OpenapiClient::RiskRule.new # RiskRule | + +begin + + api_instance.create_risk_rule(authorization, risk_rule) +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->create_risk_rule: #{e}" +end +``` + +#### Using the create_risk_rule_with_http_info variant + +This returns an Array which contains the response data (`nil` in this case), status code and headers. + +> create_risk_rule_with_http_info(authorization, risk_rule) + +```ruby +begin + + data, status_code, headers = api_instance.create_risk_rule_with_http_info(authorization, risk_rule) + p status_code # => 2xx + p headers # => { ... } + p data # => nil +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->create_risk_rule_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **risk_rule** | [**RiskRule**](RiskRule.md) | | | + +### Return type + +nil (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + + +## create_roles + +> > create_roles(authorization) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | + +begin + + result = api_instance.create_roles(authorization) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->create_roles: #{e}" +end +``` + +#### Using the create_roles_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> >, Integer, Hash)> create_roles_with_http_info(authorization) + +```ruby +begin + + data, status_code, headers = api_instance.create_roles_with_http_info(authorization) + p status_code # => 2xx + p headers # => { ... } + p data # => > +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->create_roles_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | + +### Return type + +[**Array<CreateRoles201ResponseInner>**](CreateRoles201ResponseInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## create_rule + +> create_rule(authorization, app_id, rule) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +app_id = 56 # Integer | +rule = OpenapiClient::Rule.new # Rule | + +begin + + result = api_instance.create_rule(authorization, app_id, rule) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->create_rule: #{e}" +end +``` + +#### Using the create_rule_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> create_rule_with_http_info(authorization, app_id, rule) + +```ruby +begin + + data, status_code, headers = api_instance.create_rule_with_http_info(authorization, app_id, rule) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->create_rule_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **app_id** | **Integer** | | | +| **rule** | [**Rule**](Rule.md) | | | + +### Return type + +[**RuleId**](RuleId.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## create_user + +> create_user(authorization, user, opts) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +user = OpenapiClient::User.new # User | +opts = { + mappings: 'async', # String | Controls how mappings will be applied to the user on creation. Defaults to async. + validate_policy: true # Boolean | Will passwords validate against the User Policy? Defaults to true. +} + +begin + + result = api_instance.create_user(authorization, user, opts) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->create_user: #{e}" +end +``` + +#### Using the create_user_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> create_user_with_http_info(authorization, user, opts) + +```ruby +begin + + data, status_code, headers = api_instance.create_user_with_http_info(authorization, user, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->create_user_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **user** | [**User**](User.md) | | | +| **mappings** | **String** | Controls how mappings will be applied to the user on creation. Defaults to async. | [optional] | +| **validate_policy** | **Boolean** | Will passwords validate against the User Policy? Defaults to true. | [optional] | + +### Return type + +[**User**](User.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## delete_access_token_claim + +> delete_access_token_claim(authorization, id, claim_id) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +id = 56 # Integer | +claim_id = 56 # Integer | + +begin + + api_instance.delete_access_token_claim(authorization, id, claim_id) +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->delete_access_token_claim: #{e}" +end +``` + +#### Using the delete_access_token_claim_with_http_info variant + +This returns an Array which contains the response data (`nil` in this case), status code and headers. + +> delete_access_token_claim_with_http_info(authorization, id, claim_id) + +```ruby +begin + + data, status_code, headers = api_instance.delete_access_token_claim_with_http_info(authorization, id, claim_id) + p status_code # => 2xx + p headers # => { ... } + p data # => nil +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->delete_access_token_claim_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **id** | **Integer** | | | +| **claim_id** | **Integer** | | | + +### Return type + +nil (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## delete_app + +> delete_app(authorization, app_id) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +app_id = 56 # Integer | + +begin + + api_instance.delete_app(authorization, app_id) +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->delete_app: #{e}" +end +``` + +#### Using the delete_app_with_http_info variant + +This returns an Array which contains the response data (`nil` in this case), status code and headers. + +> delete_app_with_http_info(authorization, app_id) + +```ruby +begin + + data, status_code, headers = api_instance.delete_app_with_http_info(authorization, app_id) + p status_code # => 2xx + p headers # => { ... } + p data # => nil +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->delete_app_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **app_id** | **Integer** | | | + +### Return type + +nil (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## delete_app_parameter + +> delete_app_parameter(authorization, app_id, parameter_id) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +app_id = 56 # Integer | +parameter_id = 56 # Integer | + +begin + + api_instance.delete_app_parameter(authorization, app_id, parameter_id) +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->delete_app_parameter: #{e}" +end +``` + +#### Using the delete_app_parameter_with_http_info variant + +This returns an Array which contains the response data (`nil` in this case), status code and headers. + +> delete_app_parameter_with_http_info(authorization, app_id, parameter_id) + +```ruby +begin + + data, status_code, headers = api_instance.delete_app_parameter_with_http_info(authorization, app_id, parameter_id) + p status_code # => 2xx + p headers # => { ... } + p data # => nil +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->delete_app_parameter_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **app_id** | **Integer** | | | +| **parameter_id** | **Integer** | | | + +### Return type + +nil (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## delete_authorization_server + +> delete_authorization_server(authorization, id) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +id = 56 # Integer | + +begin + + api_instance.delete_authorization_server(authorization, id) +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->delete_authorization_server: #{e}" +end +``` + +#### Using the delete_authorization_server_with_http_info variant + +This returns an Array which contains the response data (`nil` in this case), status code and headers. + +> delete_authorization_server_with_http_info(authorization, id) + +```ruby +begin + + data, status_code, headers = api_instance.delete_authorization_server_with_http_info(authorization, id) + p status_code # => 2xx + p headers # => { ... } + p data # => nil +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->delete_authorization_server_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **id** | **Integer** | | | + +### Return type + +nil (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## delete_environment_variable + +> delete_environment_variable(authorization, envvar_id) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +envvar_id = 'envvar_id_example' # String | Set to the id of the Hook Environment Variable that you want to fetch. + +begin + + api_instance.delete_environment_variable(authorization, envvar_id) +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->delete_environment_variable: #{e}" +end +``` + +#### Using the delete_environment_variable_with_http_info variant + +This returns an Array which contains the response data (`nil` in this case), status code and headers. + +> delete_environment_variable_with_http_info(authorization, envvar_id) + +```ruby +begin + + data, status_code, headers = api_instance.delete_environment_variable_with_http_info(authorization, envvar_id) + p status_code # => 2xx + p headers # => { ... } + p data # => nil +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->delete_environment_variable_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **envvar_id** | **String** | Set to the id of the Hook Environment Variable that you want to fetch. | | + +### Return type + +nil (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## delete_factor + +> delete_factor(authorization, user_id, device_id) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +user_id = 56 # Integer | Set to the id of the user. +device_id = 56 # Integer | Set to the device_id of the MFA device. + +begin + + api_instance.delete_factor(authorization, user_id, device_id) +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->delete_factor: #{e}" +end +``` + +#### Using the delete_factor_with_http_info variant + +This returns an Array which contains the response data (`nil` in this case), status code and headers. + +> delete_factor_with_http_info(authorization, user_id, device_id) + +```ruby +begin + + data, status_code, headers = api_instance.delete_factor_with_http_info(authorization, user_id, device_id) + p status_code # => 2xx + p headers # => { ... } + p data # => nil +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->delete_factor_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **user_id** | **Integer** | Set to the id of the user. | | +| **device_id** | **Integer** | Set to the device_id of the MFA device. | | + +### Return type + +nil (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + + +## delete_hook + +> delete_hook(authorization, hook_id) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +hook_id = 'hook_id_example' # String | Set to the id of the Hook that you want to return. + +begin + + api_instance.delete_hook(authorization, hook_id) +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->delete_hook: #{e}" +end +``` + +#### Using the delete_hook_with_http_info variant + +This returns an Array which contains the response data (`nil` in this case), status code and headers. + +> delete_hook_with_http_info(authorization, hook_id) + +```ruby +begin + + data, status_code, headers = api_instance.delete_hook_with_http_info(authorization, hook_id) + p status_code # => 2xx + p headers # => { ... } + p data # => nil +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->delete_hook_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **hook_id** | **String** | Set to the id of the Hook that you want to return. | | + +### Return type + +nil (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## delete_mapping + +> delete_mapping(authorization, mapping_id) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +mapping_id = 56 # Integer | The id of the user mapping to locate. + +begin + + api_instance.delete_mapping(authorization, mapping_id) +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->delete_mapping: #{e}" +end +``` + +#### Using the delete_mapping_with_http_info variant + +This returns an Array which contains the response data (`nil` in this case), status code and headers. + +> delete_mapping_with_http_info(authorization, mapping_id) + +```ruby +begin + + data, status_code, headers = api_instance.delete_mapping_with_http_info(authorization, mapping_id) + p status_code # => 2xx + p headers # => { ... } + p data # => nil +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->delete_mapping_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **mapping_id** | **Integer** | The id of the user mapping to locate. | | + +### Return type + +nil (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## delete_risk_rule + +> delete_risk_rule(authorization, risk_rule_id) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +risk_rule_id = 'risk_rule_id_example' # String | + +begin + + result = api_instance.delete_risk_rule(authorization, risk_rule_id) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->delete_risk_rule: #{e}" +end +``` + +#### Using the delete_risk_rule_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> delete_risk_rule_with_http_info(authorization, risk_rule_id) + +```ruby +begin + + data, status_code, headers = api_instance.delete_risk_rule_with_http_info(authorization, risk_rule_id) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->delete_risk_rule_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **risk_rule_id** | **String** | | | + +### Return type + +[**RiskRule**](RiskRule.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## delete_role + +> delete_role(authorization, role_id) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +role_id = 56 # Integer | Set to the id of the role you want to return. + +begin + + api_instance.delete_role(authorization, role_id) +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->delete_role: #{e}" +end +``` + +#### Using the delete_role_with_http_info variant + +This returns an Array which contains the response data (`nil` in this case), status code and headers. + +> delete_role_with_http_info(authorization, role_id) + +```ruby +begin + + data, status_code, headers = api_instance.delete_role_with_http_info(authorization, role_id) + p status_code # => 2xx + p headers # => { ... } + p data # => nil +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->delete_role_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **role_id** | **Integer** | Set to the id of the role you want to return. | | + +### Return type + +nil (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## delete_rule + +> delete_rule(authorization, app_id, rule_id) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +app_id = 56 # Integer | +rule_id = 56 # Integer | The id of the app rule to locate. + +begin + + api_instance.delete_rule(authorization, app_id, rule_id) +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->delete_rule: #{e}" +end +``` + +#### Using the delete_rule_with_http_info variant + +This returns an Array which contains the response data (`nil` in this case), status code and headers. + +> delete_rule_with_http_info(authorization, app_id, rule_id) + +```ruby +begin + + data, status_code, headers = api_instance.delete_rule_with_http_info(authorization, app_id, rule_id) + p status_code # => 2xx + p headers # => { ... } + p data # => nil +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->delete_rule_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **app_id** | **Integer** | | | +| **rule_id** | **Integer** | The id of the app rule to locate. | | + +### Return type + +nil (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## delete_scope + +> delete_scope(authorization, id, scope_id) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +id = 56 # Integer | +scope_id = 56 # Integer | + +begin + + api_instance.delete_scope(authorization, id, scope_id) +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->delete_scope: #{e}" +end +``` + +#### Using the delete_scope_with_http_info variant + +This returns an Array which contains the response data (`nil` in this case), status code and headers. + +> delete_scope_with_http_info(authorization, id, scope_id) + +```ruby +begin + + data, status_code, headers = api_instance.delete_scope_with_http_info(authorization, id, scope_id) + p status_code # => 2xx + p headers # => { ... } + p data # => nil +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->delete_scope_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **id** | **Integer** | | | +| **scope_id** | **Integer** | | | + +### Return type + +nil (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## delete_user + +> delete_user(authorization, user_id) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +user_id = 56 # Integer | Set to the id of the user that you want to return. + +begin + + api_instance.delete_user(authorization, user_id) +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->delete_user: #{e}" +end +``` + +#### Using the delete_user_with_http_info variant + +This returns an Array which contains the response data (`nil` in this case), status code and headers. + +> delete_user_with_http_info(authorization, user_id) + +```ruby +begin + + data, status_code, headers = api_instance.delete_user_with_http_info(authorization, user_id) + p status_code # => 2xx + p headers # => { ... } + p data # => nil +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->delete_user_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **user_id** | **Integer** | Set to the id of the user that you want to return. | | + +### Return type + +nil (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## dry_run_mapping + +> Array<Object> dry_run_mapping(authorization, mapping_id, request_body) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +mapping_id = 56 # Integer | The id of the user mapping to locate. +request_body = [37] # Array | Request body is a list of user IDs tested against the mapping conditions to verify that the mapping would be applied + +begin + + result = api_instance.dry_run_mapping(authorization, mapping_id, request_body) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->dry_run_mapping: #{e}" +end +``` + +#### Using the dry_run_mapping_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> dry_run_mapping_with_http_info(authorization, mapping_id, request_body) + +```ruby +begin + + data, status_code, headers = api_instance.dry_run_mapping_with_http_info(authorization, mapping_id, request_body) + p status_code # => 2xx + p headers # => { ... } + p data # => Array<Object> +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->dry_run_mapping_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **mapping_id** | **Integer** | The id of the user mapping to locate. | | +| **request_body** | [**Array<Integer>**](Integer.md) | Request body is a list of user IDs tested against the mapping conditions to verify that the mapping would be applied | | + +### Return type + +**Array<Object>** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## enroll_factor + +> Array<Array> enroll_factor(authorization, user_id, enroll_factor_request) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +user_id = 56 # Integer | Set to the id of the user. +enroll_factor_request = OpenapiClient::EnrollFactorRequest.new({factor_id: 37, display_name: 'display_name_example'}) # EnrollFactorRequest | + +begin + + result = api_instance.enroll_factor(authorization, user_id, enroll_factor_request) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->enroll_factor: #{e}" +end +``` + +#### Using the enroll_factor_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> enroll_factor_with_http_info(authorization, user_id, enroll_factor_request) + +```ruby +begin + + data, status_code, headers = api_instance.enroll_factor_with_http_info(authorization, user_id, enroll_factor_request) + p status_code # => 2xx + p headers # => { ... } + p data # => Array<Array> +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->enroll_factor_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **user_id** | **Integer** | Set to the id of the user. | | +| **enroll_factor_request** | [**EnrollFactorRequest**](EnrollFactorRequest.md) | | | + +### Return type + +**Array<Array>** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## generate_mfa_token + +> generate_mfa_token(authorization, generate_mfa_token_request) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +generate_mfa_token_request = OpenapiClient::GenerateMfaTokenRequest.new # GenerateMfaTokenRequest | + +begin + + result = api_instance.generate_mfa_token(authorization, generate_mfa_token_request) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->generate_mfa_token: #{e}" +end +``` + +#### Using the generate_mfa_token_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> generate_mfa_token_with_http_info(authorization, generate_mfa_token_request) + +```ruby +begin + + data, status_code, headers = api_instance.generate_mfa_token_with_http_info(authorization, generate_mfa_token_request) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->generate_mfa_token_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **generate_mfa_token_request** | [**GenerateMfaTokenRequest**](GenerateMfaTokenRequest.md) | | | + +### Return type + +[**GenerateMfaToken200Response**](GenerateMfaToken200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## generate_saml_assertion + +> generate_saml_assertion(authorization, generate_saml_assertion_request) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +generate_saml_assertion_request = OpenapiClient::GenerateSamlAssertionRequest.new({username_or_email: 'username_or_email_example', password: 'password_example', app_id: 'app_id_example', subdomain: 'subdomain_example'}) # GenerateSamlAssertionRequest | + +begin + + api_instance.generate_saml_assertion(authorization, generate_saml_assertion_request) +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->generate_saml_assertion: #{e}" +end +``` + +#### Using the generate_saml_assertion_with_http_info variant + +This returns an Array which contains the response data (`nil` in this case), status code and headers. + +> generate_saml_assertion_with_http_info(authorization, generate_saml_assertion_request) + +```ruby +begin + + data, status_code, headers = api_instance.generate_saml_assertion_with_http_info(authorization, generate_saml_assertion_request) + p status_code # => 2xx + p headers # => { ... } + p data # => nil +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->generate_saml_assertion_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **generate_saml_assertion_request** | [**GenerateSamlAssertionRequest**](GenerateSamlAssertionRequest.md) | | | + +### Return type + +nil (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## generate_token + +> generate_token(authorization, generate_token_request) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +generate_token_request = OpenapiClient::GenerateTokenRequest.new # GenerateTokenRequest | + +begin + + result = api_instance.generate_token(authorization, generate_token_request) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->generate_token: #{e}" +end +``` + +#### Using the generate_token_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> generate_token_with_http_info(authorization, generate_token_request) + +```ruby +begin + + data, status_code, headers = api_instance.generate_token_with_http_info(authorization, generate_token_request) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->generate_token_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **generate_token_request** | [**GenerateTokenRequest**](GenerateTokenRequest.md) | | | + +### Return type + +[**GenerateToken200Response**](GenerateToken200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## get_app + +> get_app(authorization, app_id) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +app_id = 56 # Integer | + +begin + + result = api_instance.get_app(authorization, app_id) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->get_app: #{e}" +end +``` + +#### Using the get_app_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_app_with_http_info(authorization, app_id) + +```ruby +begin + + data, status_code, headers = api_instance.get_app_with_http_info(authorization, app_id) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->get_app_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **app_id** | **Integer** | | | + +### Return type + +[**Schema**](Schema.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_authorization_server + +> get_authorization_server(authorization, id) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +id = 56 # Integer | + +begin + + result = api_instance.get_authorization_server(authorization, id) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->get_authorization_server: #{e}" +end +``` + +#### Using the get_authorization_server_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_authorization_server_with_http_info(authorization, id) + +```ruby +begin + + data, status_code, headers = api_instance.get_authorization_server_with_http_info(authorization, id) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->get_authorization_server_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **id** | **Integer** | | | + +### Return type + +[**GetAuthorizationServer200Response**](GetAuthorizationServer200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_available_factors + +> > get_available_factors(authorization, user_id) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +user_id = 56 # Integer | Set to the id of the user. + +begin + + result = api_instance.get_available_factors(authorization, user_id) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->get_available_factors: #{e}" +end +``` + +#### Using the get_available_factors_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> >, Integer, Hash)> get_available_factors_with_http_info(authorization, user_id) + +```ruby +begin + + data, status_code, headers = api_instance.get_available_factors_with_http_info(authorization, user_id) + p status_code # => 2xx + p headers # => { ... } + p data # => > +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->get_available_factors_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **user_id** | **Integer** | Set to the id of the user. | | + +### Return type + +[**Array<GetAvailableFactors200ResponseInner>**](GetAvailableFactors200ResponseInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_client_apps + +> > get_client_apps(authorization, id) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +id = 56 # Integer | + +begin + + result = api_instance.get_client_apps(authorization, id) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->get_client_apps: #{e}" +end +``` + +#### Using the get_client_apps_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> >, Integer, Hash)> get_client_apps_with_http_info(authorization, id) + +```ruby +begin + + data, status_code, headers = api_instance.get_client_apps_with_http_info(authorization, id) + p status_code # => 2xx + p headers # => { ... } + p data # => > +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->get_client_apps_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **id** | **Integer** | | | + +### Return type + +[**Array<GetClientApps200ResponseInner>**](GetClientApps200ResponseInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_enrolled_factors + +> > get_enrolled_factors(authorization, user_id) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +user_id = 56 # Integer | Set to the id of the user. + +begin + + result = api_instance.get_enrolled_factors(authorization, user_id) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->get_enrolled_factors: #{e}" +end +``` + +#### Using the get_enrolled_factors_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> >, Integer, Hash)> get_enrolled_factors_with_http_info(authorization, user_id) + +```ruby +begin + + data, status_code, headers = api_instance.get_enrolled_factors_with_http_info(authorization, user_id) + p status_code # => 2xx + p headers # => { ... } + p data # => > +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->get_enrolled_factors_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **user_id** | **Integer** | Set to the id of the user. | | + +### Return type + +[**Array<Device>**](Device.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_environment_variable + +> get_environment_variable(authorization, envvar_id) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +envvar_id = 'envvar_id_example' # String | Set to the id of the Hook Environment Variable that you want to fetch. + +begin + + result = api_instance.get_environment_variable(authorization, envvar_id) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->get_environment_variable: #{e}" +end +``` + +#### Using the get_environment_variable_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_environment_variable_with_http_info(authorization, envvar_id) + +```ruby +begin + + data, status_code, headers = api_instance.get_environment_variable_with_http_info(authorization, envvar_id) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->get_environment_variable_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **envvar_id** | **String** | Set to the id of the Hook Environment Variable that you want to fetch. | | + +### Return type + +[**Envvar**](Envvar.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_hook + +> get_hook(authorization, hook_id) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +hook_id = 'hook_id_example' # String | Set to the id of the Hook that you want to return. + +begin + + result = api_instance.get_hook(authorization, hook_id) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->get_hook: #{e}" +end +``` + +#### Using the get_hook_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_hook_with_http_info(authorization, hook_id) + +```ruby +begin + + data, status_code, headers = api_instance.get_hook_with_http_info(authorization, hook_id) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->get_hook_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **hook_id** | **String** | Set to the id of the Hook that you want to return. | | + +### Return type + +[**Hook**](Hook.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_logs + +> > get_logs(authorization, hook_id, opts) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +hook_id = 'hook_id_example' # String | Set to the id of the Hook that you want to return. +opts = { + limit: 56, # Integer | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. + page: 56, # Integer | The page number of results to return. + cursor: 'cursor_example', # String | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. + request_id: 'request_id_example', # String | Returns logs that contain this request_id. + correlation_id: 'correlation_id_example' # String | Returns logs that contain this correlation_id. +} + +begin + + result = api_instance.get_logs(authorization, hook_id, opts) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->get_logs: #{e}" +end +``` + +#### Using the get_logs_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> >, Integer, Hash)> get_logs_with_http_info(authorization, hook_id, opts) + +```ruby +begin + + data, status_code, headers = api_instance.get_logs_with_http_info(authorization, hook_id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => > +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->get_logs_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **hook_id** | **String** | Set to the id of the Hook that you want to return. | | +| **limit** | **Integer** | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. | [optional] | +| **page** | **Integer** | The page number of results to return. | [optional] | +| **cursor** | **String** | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | [optional] | +| **request_id** | **String** | Returns logs that contain this request_id. | [optional] | +| **correlation_id** | **String** | Returns logs that contain this correlation_id. | [optional] | + +### Return type + +[**Array<Log>**](Log.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_mapping + +> get_mapping(authorization, mapping_id) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +mapping_id = 56 # Integer | The id of the user mapping to locate. + +begin + + result = api_instance.get_mapping(authorization, mapping_id) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->get_mapping: #{e}" +end +``` + +#### Using the get_mapping_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_mapping_with_http_info(authorization, mapping_id) + +```ruby +begin + + data, status_code, headers = api_instance.get_mapping_with_http_info(authorization, mapping_id) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->get_mapping_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **mapping_id** | **Integer** | The id of the user mapping to locate. | | + +### Return type + +[**Mapping**](Mapping.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_rate_limit + +> get_rate_limit(authorization) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | + +begin + + result = api_instance.get_rate_limit(authorization) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->get_rate_limit: #{e}" +end +``` + +#### Using the get_rate_limit_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_rate_limit_with_http_info(authorization) + +```ruby +begin + + data, status_code, headers = api_instance.get_rate_limit_with_http_info(authorization) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->get_rate_limit_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | + +### Return type + +[**GetRateLimit200Response**](GetRateLimit200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_risk_rule + +> get_risk_rule(authorization, risk_rule_id) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +risk_rule_id = 'risk_rule_id_example' # String | + +begin + + api_instance.get_risk_rule(authorization, risk_rule_id) +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->get_risk_rule: #{e}" +end +``` + +#### Using the get_risk_rule_with_http_info variant + +This returns an Array which contains the response data (`nil` in this case), status code and headers. + +> get_risk_rule_with_http_info(authorization, risk_rule_id) + +```ruby +begin + + data, status_code, headers = api_instance.get_risk_rule_with_http_info(authorization, risk_rule_id) + p status_code # => 2xx + p headers # => { ... } + p data # => nil +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->get_risk_rule_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **risk_rule_id** | **String** | | | + +### Return type + +nil (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + + +## get_risk_score + +> get_risk_score(authorization, get_risk_score_request) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +get_risk_score_request = OpenapiClient::GetRiskScoreRequest.new({ip: 'ip_example', user_agent: 'user_agent_example', user: OpenapiClient::RiskUser.new({id: 'id_example'})}) # GetRiskScoreRequest | + +begin + + result = api_instance.get_risk_score(authorization, get_risk_score_request) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->get_risk_score: #{e}" +end +``` + +#### Using the get_risk_score_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_risk_score_with_http_info(authorization, get_risk_score_request) + +```ruby +begin + + data, status_code, headers = api_instance.get_risk_score_with_http_info(authorization, get_risk_score_request) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->get_risk_score_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **get_risk_score_request** | [**GetRiskScoreRequest**](GetRiskScoreRequest.md) | | | + +### Return type + +[**GetRiskScore200Response**](GetRiskScore200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## get_role + +> get_role(authorization, role_id) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +role_id = 56 # Integer | Set to the id of the role you want to return. + +begin + + result = api_instance.get_role(authorization, role_id) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->get_role: #{e}" +end +``` + +#### Using the get_role_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_role_with_http_info(authorization, role_id) + +```ruby +begin + + data, status_code, headers = api_instance.get_role_with_http_info(authorization, role_id) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->get_role_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **role_id** | **Integer** | Set to the id of the role you want to return. | | + +### Return type + +[**Role**](Role.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_role_admins + +> > get_role_admins(authorization, role_id, opts) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +role_id = 56 # Integer | Set to the id of the role you want to return. +opts = { + limit: 56, # Integer | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. + page: 56, # Integer | The page number of results to return. + cursor: 'cursor_example', # String | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. + name: 'name_example', # String | Allows you to filter on first name, last name, username, and email address. + include_unassigned: true # Boolean | Optional. Defaults to false. Include users that aren’t assigned to the role. +} + +begin + + result = api_instance.get_role_admins(authorization, role_id, opts) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->get_role_admins: #{e}" +end +``` + +#### Using the get_role_admins_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> >, Integer, Hash)> get_role_admins_with_http_info(authorization, role_id, opts) + +```ruby +begin + + data, status_code, headers = api_instance.get_role_admins_with_http_info(authorization, role_id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => > +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->get_role_admins_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **role_id** | **Integer** | Set to the id of the role you want to return. | | +| **limit** | **Integer** | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. | [optional] | +| **page** | **Integer** | The page number of results to return. | [optional] | +| **cursor** | **String** | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | [optional] | +| **name** | **String** | Allows you to filter on first name, last name, username, and email address. | [optional] | +| **include_unassigned** | **Boolean** | Optional. Defaults to false. Include users that aren’t assigned to the role. | [optional] | + +### Return type + +[**Array<Schema1>**](Schema1.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: applcation/json, application/json + + +## get_role_apps + +> > get_role_apps(authorization, role_id, opts) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +role_id = 56 # Integer | Set to the id of the role you want to return. +opts = { + limit: 56, # Integer | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. + page: 56, # Integer | The page number of results to return. + cursor: 'cursor_example', # String | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. + assigned: true # Boolean | Optional. Defaults to true. Returns all apps not yet assigned to the role. +} + +begin + + result = api_instance.get_role_apps(authorization, role_id, opts) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->get_role_apps: #{e}" +end +``` + +#### Using the get_role_apps_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> >, Integer, Hash)> get_role_apps_with_http_info(authorization, role_id, opts) + +```ruby +begin + + data, status_code, headers = api_instance.get_role_apps_with_http_info(authorization, role_id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => > +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->get_role_apps_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **role_id** | **Integer** | Set to the id of the role you want to return. | | +| **limit** | **Integer** | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. | [optional] | +| **page** | **Integer** | The page number of results to return. | [optional] | +| **cursor** | **String** | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | [optional] | +| **assigned** | **Boolean** | Optional. Defaults to true. Returns all apps not yet assigned to the role. | [optional] | + +### Return type + +[**Array<Schema>**](Schema.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: applcation/json, application/json + + +## get_role_users + +> > get_role_users(authorization, role_id, opts) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +role_id = 56 # Integer | Set to the id of the role you want to return. +opts = { + limit: 56, # Integer | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. + page: 56, # Integer | The page number of results to return. + cursor: 'cursor_example', # String | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. + name: 'name_example', # String | Allows you to filter on first name, last name, username, and email address. + include_unassigned: true # Boolean | Optional. Defaults to false. Include users that aren’t assigned to the role. +} + +begin + + result = api_instance.get_role_users(authorization, role_id, opts) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->get_role_users: #{e}" +end +``` + +#### Using the get_role_users_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> >, Integer, Hash)> get_role_users_with_http_info(authorization, role_id, opts) + +```ruby +begin + + data, status_code, headers = api_instance.get_role_users_with_http_info(authorization, role_id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => > +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->get_role_users_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **role_id** | **Integer** | Set to the id of the role you want to return. | | +| **limit** | **Integer** | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. | [optional] | +| **page** | **Integer** | The page number of results to return. | [optional] | +| **cursor** | **String** | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | [optional] | +| **name** | **String** | Allows you to filter on first name, last name, username, and email address. | [optional] | +| **include_unassigned** | **Boolean** | Optional. Defaults to false. Include users that aren’t assigned to the role. | [optional] | + +### Return type + +[**Array<Schema1>**](Schema1.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: applcation/json, application/json + + +## get_rule + +> get_rule(authorization, app_id, rule_id) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +app_id = 56 # Integer | +rule_id = 56 # Integer | The id of the app rule to locate. + +begin + + result = api_instance.get_rule(authorization, app_id, rule_id) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->get_rule: #{e}" +end +``` + +#### Using the get_rule_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_rule_with_http_info(authorization, app_id, rule_id) + +```ruby +begin + + data, status_code, headers = api_instance.get_rule_with_http_info(authorization, app_id, rule_id) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->get_rule_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **app_id** | **Integer** | | | +| **rule_id** | **Integer** | The id of the app rule to locate. | | + +### Return type + +[**Rule**](Rule.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_score_insights + +> get_score_insights(authorization, opts) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +opts = { + before: 'before_example', # String | Optional ISO8601 formatted date string. Defaults to current date. Maximum date is 90 days ago. + after: 'after_example' # String | Optional ISO8601 formatted date string. Defaults to 30 days ago. Maximum date is 90 days ago. +} + +begin + + result = api_instance.get_score_insights(authorization, opts) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->get_score_insights: #{e}" +end +``` + +#### Using the get_score_insights_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_score_insights_with_http_info(authorization, opts) + +```ruby +begin + + data, status_code, headers = api_instance.get_score_insights_with_http_info(authorization, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->get_score_insights_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **before** | **String** | Optional ISO8601 formatted date string. Defaults to current date. Maximum date is 90 days ago. | [optional] | +| **after** | **String** | Optional ISO8601 formatted date string. Defaults to 30 days ago. Maximum date is 90 days ago. | [optional] | + +### Return type + +[**GetScoreInsights200Response**](GetScoreInsights200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_user + +> get_user(authorization, user_id) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +user_id = 56 # Integer | Set to the id of the user that you want to return. + +begin + + result = api_instance.get_user(authorization, user_id) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->get_user: #{e}" +end +``` + +#### Using the get_user_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_user_with_http_info(authorization, user_id) + +```ruby +begin + + data, status_code, headers = api_instance.get_user_with_http_info(authorization, user_id) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->get_user_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **user_id** | **Integer** | Set to the id of the user that you want to return. | | + +### Return type + +[**User**](User.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_user_apps + +> > get_user_apps(authorization, user_id, opts) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +user_id = 56 # Integer | Set to the id of the user that you want to return. +opts = { + ignore_visibility: true # Boolean | Defaults to `false`. When `true` will show all apps that are assigned to a user regardless of their portal visibility setting. +} + +begin + + result = api_instance.get_user_apps(authorization, user_id, opts) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->get_user_apps: #{e}" +end +``` + +#### Using the get_user_apps_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> >, Integer, Hash)> get_user_apps_with_http_info(authorization, user_id, opts) + +```ruby +begin + + data, status_code, headers = api_instance.get_user_apps_with_http_info(authorization, user_id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => > +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->get_user_apps_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **user_id** | **Integer** | Set to the id of the user that you want to return. | | +| **ignore_visibility** | **Boolean** | Defaults to `false`. When `true` will show all apps that are assigned to a user regardless of their portal visibility setting. | [optional] | + +### Return type + +[**Array<GetUserApps200ResponseInner>**](GetUserApps200ResponseInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## list_access_token_claims + +> > list_access_token_claims(authorization, id) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +id = 56 # Integer | + +begin + + result = api_instance.list_access_token_claims(authorization, id) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->list_access_token_claims: #{e}" +end +``` + +#### Using the list_access_token_claims_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> >, Integer, Hash)> list_access_token_claims_with_http_info(authorization, id) + +```ruby +begin + + data, status_code, headers = api_instance.list_access_token_claims_with_http_info(authorization, id) + p status_code # => 2xx + p headers # => { ... } + p data # => > +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->list_access_token_claims_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **id** | **Integer** | | | + +### Return type + +[**Array<ListAccessTokenClaims200ResponseInner>**](ListAccessTokenClaims200ResponseInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## list_action_values + +> > list_action_values(authorization, app_id, action_value) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +app_id = 56 # Integer | +action_value = 'action_value_example' # String | The value for the selected action. + +begin + + result = api_instance.list_action_values(authorization, app_id, action_value) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->list_action_values: #{e}" +end +``` + +#### Using the list_action_values_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> >, Integer, Hash)> list_action_values_with_http_info(authorization, app_id, action_value) + +```ruby +begin + + data, status_code, headers = api_instance.list_action_values_with_http_info(authorization, app_id, action_value) + p status_code # => 2xx + p headers # => { ... } + p data # => > +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->list_action_values_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **app_id** | **Integer** | | | +| **action_value** | **String** | The value for the selected action. | | + +### Return type + +[**Array<ListConditionValues200ResponseInner>**](ListConditionValues200ResponseInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## list_actions + +> > list_actions(authorization, app_id) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +app_id = 56 # Integer | + +begin + + result = api_instance.list_actions(authorization, app_id) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->list_actions: #{e}" +end +``` + +#### Using the list_actions_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> >, Integer, Hash)> list_actions_with_http_info(authorization, app_id) + +```ruby +begin + + data, status_code, headers = api_instance.list_actions_with_http_info(authorization, app_id) + p status_code # => 2xx + p headers # => { ... } + p data # => > +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->list_actions_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **app_id** | **Integer** | | | + +### Return type + +[**Array<ListActions200ResponseInner>**](ListActions200ResponseInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## list_app_users + +> > list_app_users(authorization, app_id, opts) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +app_id = 56 # Integer | +opts = { + limit: 56, # Integer | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. + page: 56, # Integer | The page number of results to return. + cursor: 'cursor_example' # String | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. +} + +begin + + result = api_instance.list_app_users(authorization, app_id, opts) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->list_app_users: #{e}" +end +``` + +#### Using the list_app_users_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> >, Integer, Hash)> list_app_users_with_http_info(authorization, app_id, opts) + +```ruby +begin + + data, status_code, headers = api_instance.list_app_users_with_http_info(authorization, app_id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => > +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->list_app_users_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **app_id** | **Integer** | | | +| **limit** | **Integer** | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. | [optional] | +| **page** | **Integer** | The page number of results to return. | [optional] | +| **cursor** | **String** | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | [optional] | + +### Return type + +[**Array<ListAppUsers200ResponseInner>**](ListAppUsers200ResponseInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## list_apps + +> > list_apps(authorization, opts) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +opts = { + limit: 56, # Integer | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. + page: 56, # Integer | The page number of results to return. + cursor: 'cursor_example', # String | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. + name: 'name_example', # String | The name or partial name of the app to search for. When using a partial name you must append a wildcard `*` + connector_id: 56, # Integer | Returns all apps based off a specific connector. See List Connectors for a complete list of Connector IDs. + auth_method: OpenapiClient::AuthMethod::N0 # AuthMethod | Returns all apps based of a given type. +} + +begin + + result = api_instance.list_apps(authorization, opts) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->list_apps: #{e}" +end +``` + +#### Using the list_apps_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> >, Integer, Hash)> list_apps_with_http_info(authorization, opts) + +```ruby +begin + + data, status_code, headers = api_instance.list_apps_with_http_info(authorization, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => > +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->list_apps_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **limit** | **Integer** | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. | [optional] | +| **page** | **Integer** | The page number of results to return. | [optional] | +| **cursor** | **String** | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | [optional] | +| **name** | **String** | The name or partial name of the app to search for. When using a partial name you must append a wildcard `*` | [optional] | +| **connector_id** | **Integer** | Returns all apps based off a specific connector. See List Connectors for a complete list of Connector IDs. | [optional] | +| **auth_method** | [**AuthMethod**](.md) | Returns all apps based of a given type. | [optional] | + +### Return type + +[**Array<Schema>**](Schema.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## list_authorization_servers + +> > list_authorization_servers(authorization) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | + +begin + + result = api_instance.list_authorization_servers(authorization) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->list_authorization_servers: #{e}" +end +``` + +#### Using the list_authorization_servers_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> >, Integer, Hash)> list_authorization_servers_with_http_info(authorization) + +```ruby +begin + + data, status_code, headers = api_instance.list_authorization_servers_with_http_info(authorization) + p status_code # => 2xx + p headers # => { ... } + p data # => > +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->list_authorization_servers_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | + +### Return type + +[**Array<ListAuthorizationServers200ResponseInner>**](ListAuthorizationServers200ResponseInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## list_condition_operators + +> > list_condition_operators(authorization, app_id, condition_value) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +app_id = 56 # Integer | +condition_value = 'condition_value_example' # String | The value for the selected condition. + +begin + + result = api_instance.list_condition_operators(authorization, app_id, condition_value) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->list_condition_operators: #{e}" +end +``` + +#### Using the list_condition_operators_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> >, Integer, Hash)> list_condition_operators_with_http_info(authorization, app_id, condition_value) + +```ruby +begin + + data, status_code, headers = api_instance.list_condition_operators_with_http_info(authorization, app_id, condition_value) + p status_code # => 2xx + p headers # => { ... } + p data # => > +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->list_condition_operators_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **app_id** | **Integer** | | | +| **condition_value** | **String** | The value for the selected condition. | | + +### Return type + +[**Array<ListConditionOperators200ResponseInner>**](ListConditionOperators200ResponseInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## list_condition_values + +> > list_condition_values(authorization, app_id, condition_value) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +app_id = 56 # Integer | +condition_value = 'condition_value_example' # String | The value for the selected condition. + +begin + + result = api_instance.list_condition_values(authorization, app_id, condition_value) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->list_condition_values: #{e}" +end +``` + +#### Using the list_condition_values_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> >, Integer, Hash)> list_condition_values_with_http_info(authorization, app_id, condition_value) + +```ruby +begin + + data, status_code, headers = api_instance.list_condition_values_with_http_info(authorization, app_id, condition_value) + p status_code # => 2xx + p headers # => { ... } + p data # => > +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->list_condition_values_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **app_id** | **Integer** | | | +| **condition_value** | **String** | The value for the selected condition. | | + +### Return type + +[**Array<ListConditionValues200ResponseInner>**](ListConditionValues200ResponseInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## list_conditions + +> > list_conditions(authorization, app_id) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +app_id = 56 # Integer | + +begin + + result = api_instance.list_conditions(authorization, app_id) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->list_conditions: #{e}" +end +``` + +#### Using the list_conditions_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> >, Integer, Hash)> list_conditions_with_http_info(authorization, app_id) + +```ruby +begin + + data, status_code, headers = api_instance.list_conditions_with_http_info(authorization, app_id) + p status_code # => 2xx + p headers # => { ... } + p data # => > +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->list_conditions_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **app_id** | **Integer** | | | + +### Return type + +[**Array<ListConditions200ResponseInner>**](ListConditions200ResponseInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## list_connectors + +> > list_connectors(authorization, opts) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +opts = { + limit: 56, # Integer | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. + page: 56, # Integer | The page number of results to return. + cursor: 'cursor_example', # String | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. + name: 'name_example', # String | The name or partial name of the connector to search for. When using a partial name you must append a wildcard `*` + auth_method: OpenapiClient::AuthMethod::N0 # AuthMethod | Returns all connectors of a given type. +} + +begin + + result = api_instance.list_connectors(authorization, opts) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->list_connectors: #{e}" +end +``` + +#### Using the list_connectors_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> >, Integer, Hash)> list_connectors_with_http_info(authorization, opts) + +```ruby +begin + + data, status_code, headers = api_instance.list_connectors_with_http_info(authorization, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => > +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->list_connectors_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **limit** | **Integer** | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. | [optional] | +| **page** | **Integer** | The page number of results to return. | [optional] | +| **cursor** | **String** | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | [optional] | +| **name** | **String** | The name or partial name of the connector to search for. When using a partial name you must append a wildcard `*` | [optional] | +| **auth_method** | [**AuthMethod**](.md) | Returns all connectors of a given type. | [optional] | + +### Return type + +[**Array<Connector>**](Connector.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## list_environment_variables + +> > list_environment_variables(authorization, opts) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +opts = { + limit: 56, # Integer | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. + page: 56, # Integer | The page number of results to return. + cursor: 'cursor_example' # String | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. +} + +begin + + result = api_instance.list_environment_variables(authorization, opts) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->list_environment_variables: #{e}" +end +``` + +#### Using the list_environment_variables_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> >, Integer, Hash)> list_environment_variables_with_http_info(authorization, opts) + +```ruby +begin + + data, status_code, headers = api_instance.list_environment_variables_with_http_info(authorization, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => > +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->list_environment_variables_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **limit** | **Integer** | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. | [optional] | +| **page** | **Integer** | The page number of results to return. | [optional] | +| **cursor** | **String** | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | [optional] | + +### Return type + +[**Array<Envvar>**](Envvar.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## list_hooks + +> > list_hooks(authorization, opts) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +opts = { + limit: 56, # Integer | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. + page: 56, # Integer | The page number of results to return. + cursor: 'cursor_example' # String | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. +} + +begin + + result = api_instance.list_hooks(authorization, opts) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->list_hooks: #{e}" +end +``` + +#### Using the list_hooks_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> >, Integer, Hash)> list_hooks_with_http_info(authorization, opts) + +```ruby +begin + + data, status_code, headers = api_instance.list_hooks_with_http_info(authorization, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => > +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->list_hooks_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **limit** | **Integer** | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. | [optional] | +| **page** | **Integer** | The page number of results to return. | [optional] | +| **cursor** | **String** | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | [optional] | + +### Return type + +[**Array<Hook>**](Hook.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## list_mapping_action_values + +> > list_mapping_action_values(authorization, action_value) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +action_value = 'action_value_example' # String | The value for the selected action. + +begin + + result = api_instance.list_mapping_action_values(authorization, action_value) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->list_mapping_action_values: #{e}" +end +``` + +#### Using the list_mapping_action_values_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> >, Integer, Hash)> list_mapping_action_values_with_http_info(authorization, action_value) + +```ruby +begin + + data, status_code, headers = api_instance.list_mapping_action_values_with_http_info(authorization, action_value) + p status_code # => 2xx + p headers # => { ... } + p data # => > +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->list_mapping_action_values_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **action_value** | **String** | The value for the selected action. | | + +### Return type + +[**Array<ListConditionValues200ResponseInner>**](ListConditionValues200ResponseInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## list_mapping_actions + +> > list_mapping_actions(authorization) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | + +begin + + result = api_instance.list_mapping_actions(authorization) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->list_mapping_actions: #{e}" +end +``` + +#### Using the list_mapping_actions_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> >, Integer, Hash)> list_mapping_actions_with_http_info(authorization) + +```ruby +begin + + data, status_code, headers = api_instance.list_mapping_actions_with_http_info(authorization) + p status_code # => 2xx + p headers # => { ... } + p data # => > +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->list_mapping_actions_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | + +### Return type + +[**Array<ListActions200ResponseInner>**](ListActions200ResponseInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## list_mapping_condition_operators + +> > list_mapping_condition_operators(authorization, condition_value) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +condition_value = 'condition_value_example' # String | The value for the selected condition. + +begin + + result = api_instance.list_mapping_condition_operators(authorization, condition_value) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->list_mapping_condition_operators: #{e}" +end +``` + +#### Using the list_mapping_condition_operators_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> >, Integer, Hash)> list_mapping_condition_operators_with_http_info(authorization, condition_value) + +```ruby +begin + + data, status_code, headers = api_instance.list_mapping_condition_operators_with_http_info(authorization, condition_value) + p status_code # => 2xx + p headers # => { ... } + p data # => > +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->list_mapping_condition_operators_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **condition_value** | **String** | The value for the selected condition. | | + +### Return type + +[**Array<ListMappingConditionOperators200ResponseInner>**](ListMappingConditionOperators200ResponseInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## list_mapping_condition_values + +> > list_mapping_condition_values(authorization, condition_value) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +condition_value = 'condition_value_example' # String | The value for the selected condition. + +begin + + result = api_instance.list_mapping_condition_values(authorization, condition_value) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->list_mapping_condition_values: #{e}" +end +``` + +#### Using the list_mapping_condition_values_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> >, Integer, Hash)> list_mapping_condition_values_with_http_info(authorization, condition_value) + +```ruby +begin + + data, status_code, headers = api_instance.list_mapping_condition_values_with_http_info(authorization, condition_value) + p status_code # => 2xx + p headers # => { ... } + p data # => > +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->list_mapping_condition_values_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **condition_value** | **String** | The value for the selected condition. | | + +### Return type + +[**Array<ListConditionValues200ResponseInner>**](ListConditionValues200ResponseInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## list_mapping_conditions + +> > list_mapping_conditions(authorization) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | + +begin + + result = api_instance.list_mapping_conditions(authorization) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->list_mapping_conditions: #{e}" +end +``` + +#### Using the list_mapping_conditions_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> >, Integer, Hash)> list_mapping_conditions_with_http_info(authorization) + +```ruby +begin + + data, status_code, headers = api_instance.list_mapping_conditions_with_http_info(authorization) + p status_code # => 2xx + p headers # => { ... } + p data # => > +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->list_mapping_conditions_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | + +### Return type + +[**Array<ListMappingConditions200ResponseInner>**](ListMappingConditions200ResponseInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## list_mappings + +> > list_mappings(authorization, opts) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +opts = { + enabled: true, # Boolean | Defaults to true. When set to `false` will return all disabled mappings. + has_condition: 'has_condition=has_role:123456,status:1', # String | Filters Mappings based on their Conditions. + has_condition_type: 'builtin', # String | Filters Mappings based on their condition types. + has_action: 'has_action=set_groups:123456,set_usertype:*', # String | Filters Mappings based on their Actions. + has_action_type: 'builtin' # String | Filters Mappings based on their action types. +} + +begin + + result = api_instance.list_mappings(authorization, opts) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->list_mappings: #{e}" +end +``` + +#### Using the list_mappings_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> >, Integer, Hash)> list_mappings_with_http_info(authorization, opts) + +```ruby +begin + + data, status_code, headers = api_instance.list_mappings_with_http_info(authorization, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => > +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->list_mappings_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **enabled** | **Boolean** | Defaults to true. When set to `false` will return all disabled mappings. | [optional][default to true] | +| **has_condition** | **String** | Filters Mappings based on their Conditions. | [optional] | +| **has_condition_type** | **String** | Filters Mappings based on their condition types. | [optional] | +| **has_action** | **String** | Filters Mappings based on their Actions. | [optional] | +| **has_action_type** | **String** | Filters Mappings based on their action types. | [optional] | + +### Return type + +[**Array<Mapping>**](Mapping.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## list_risk_rules + +> list_risk_rules(authorization) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | + +begin + + api_instance.list_risk_rules(authorization) +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->list_risk_rules: #{e}" +end +``` + +#### Using the list_risk_rules_with_http_info variant + +This returns an Array which contains the response data (`nil` in this case), status code and headers. + +> list_risk_rules_with_http_info(authorization) + +```ruby +begin + + data, status_code, headers = api_instance.list_risk_rules_with_http_info(authorization) + p status_code # => 2xx + p headers # => { ... } + p data # => nil +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->list_risk_rules_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | + +### Return type + +nil (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + + +## list_roles + +> > list_roles(authorization, opts) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +opts = { + limit: 56, # Integer | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. + page: 56, # Integer | The page number of results to return. + cursor: 'cursor_example', # String | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. + name: 'name_example', # String | Optional. Filters by role name. + app_id: 'app_id_example', # String | Optional. Returns roles that contain this app name. + fields: 'apps' # String | Optional. Comma delimited list of fields to return. +} + +begin + + result = api_instance.list_roles(authorization, opts) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->list_roles: #{e}" +end +``` + +#### Using the list_roles_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> >, Integer, Hash)> list_roles_with_http_info(authorization, opts) + +```ruby +begin + + data, status_code, headers = api_instance.list_roles_with_http_info(authorization, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => > +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->list_roles_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **limit** | **Integer** | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. | [optional] | +| **page** | **Integer** | The page number of results to return. | [optional] | +| **cursor** | **String** | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | [optional] | +| **name** | **String** | Optional. Filters by role name. | [optional] | +| **app_id** | **String** | Optional. Returns roles that contain this app name. | [optional] | +| **fields** | **String** | Optional. Comma delimited list of fields to return. | [optional] | + +### Return type + +[**Array<Role>**](Role.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## list_rules + +> > list_rules(authorization, app_id, opts) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +app_id = 56 # Integer | +opts = { + enabled: true, # Boolean | Defaults to true. When set to `false` will return all disabled rules. + has_condition: 'has_condition_example', # String | Filters Rules based on their Conditions. + has_condition_type: 'has_condition_type_example', # String | Filters Rules based on their condition types. + has_action: 'has_action_example', # String | Filters Rules based on their Actions. + has_action_type: 'has_action_type_example' # String | Filters Rules based on their action types. +} + +begin + + result = api_instance.list_rules(authorization, app_id, opts) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->list_rules: #{e}" +end +``` + +#### Using the list_rules_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> >, Integer, Hash)> list_rules_with_http_info(authorization, app_id, opts) + +```ruby +begin + + data, status_code, headers = api_instance.list_rules_with_http_info(authorization, app_id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => > +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->list_rules_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **app_id** | **Integer** | | | +| **enabled** | **Boolean** | Defaults to true. When set to `false` will return all disabled rules. | [optional] | +| **has_condition** | **String** | Filters Rules based on their Conditions. | [optional] | +| **has_condition_type** | **String** | Filters Rules based on their condition types. | [optional] | +| **has_action** | **String** | Filters Rules based on their Actions. | [optional] | +| **has_action_type** | **String** | Filters Rules based on their action types. | [optional] | + +### Return type + +[**Array<Rule>**](Rule.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## list_scopes + +> > list_scopes(authorization, id) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +id = 56 # Integer | + +begin + + result = api_instance.list_scopes(authorization, id) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->list_scopes: #{e}" +end +``` + +#### Using the list_scopes_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> >, Integer, Hash)> list_scopes_with_http_info(authorization, id) + +```ruby +begin + + data, status_code, headers = api_instance.list_scopes_with_http_info(authorization, id) + p status_code # => 2xx + p headers # => { ... } + p data # => > +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->list_scopes_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **id** | **Integer** | | | + +### Return type + +[**Array<ListScopes200ResponseInner>**](ListScopes200ResponseInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## list_users + +> > list_users(authorization, opts) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +opts = { + limit: 56, # Integer | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. + page: 56, # Integer | The page number of results to return. + cursor: 'cursor_example', # String | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. + created_since: 'created_since_example', # String | An ISO8601 timestamp value that returns all users created after a given date & time. + created_until: 'created_until_example', # String | An ISO8601 timestamp value that returns all users created before a given date & time. + updated_since: 'updated_since_example', # String | An ISO8601 timestamp value that returns all users updated after a given date & time. + updated_until: 'updated_until_example', # String | An ISO8601 timestamp value that returns all users updated before a given date & time. + last_login_since: 'last_login_since_example', # String | An ISO8601 timestamp value that returns all users that logged in after a given date & time. + last_login_until: 'last_login_until_example', # String | + firstname: 'firstname_example', # String | The first name of the user + lastname: 'lastname_example', # String | The last name of the user + email: 'email_example', # String | The email address of the user + username: 'username_example', # String | The username for the user + samaccountname: 'samaccountname_example', # String | The AD login name for the user + directory_id: 'directory_id_example', # String | The ID in OneLogin of the Directory that the user belongs to + external_id: 'external_id_example', # String | An external identifier that has been set on the user + app_id: 'app_id_example', # String | The ID of a OneLogin Application + user_ids: 'user_ids_example', # String | A comma separated list of OneLogin User IDs + custom_attributes_attribute_name: 'custom_attributes_attribute_name_example', # String | The short name of a custom attribute. Note that the attribute name is prefixed with custom_attributes. + fields: 'fields_example' # String | A comma separated list user attributes to return. +} + +begin + + result = api_instance.list_users(authorization, opts) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->list_users: #{e}" +end +``` + +#### Using the list_users_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> >, Integer, Hash)> list_users_with_http_info(authorization, opts) + +```ruby +begin + + data, status_code, headers = api_instance.list_users_with_http_info(authorization, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => > +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->list_users_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **limit** | **Integer** | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. | [optional] | +| **page** | **Integer** | The page number of results to return. | [optional] | +| **cursor** | **String** | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | [optional] | +| **created_since** | **String** | An ISO8601 timestamp value that returns all users created after a given date & time. | [optional] | +| **created_until** | **String** | An ISO8601 timestamp value that returns all users created before a given date & time. | [optional] | +| **updated_since** | **String** | An ISO8601 timestamp value that returns all users updated after a given date & time. | [optional] | +| **updated_until** | **String** | An ISO8601 timestamp value that returns all users updated before a given date & time. | [optional] | +| **last_login_since** | **String** | An ISO8601 timestamp value that returns all users that logged in after a given date & time. | [optional] | +| **last_login_until** | **String** | | [optional] | +| **firstname** | **String** | The first name of the user | [optional] | +| **lastname** | **String** | The last name of the user | [optional] | +| **email** | **String** | The email address of the user | [optional] | +| **username** | **String** | The username for the user | [optional] | +| **samaccountname** | **String** | The AD login name for the user | [optional] | +| **directory_id** | **String** | The ID in OneLogin of the Directory that the user belongs to | [optional] | +| **external_id** | **String** | An external identifier that has been set on the user | [optional] | +| **app_id** | **String** | The ID of a OneLogin Application | [optional] | +| **user_ids** | **String** | A comma separated list of OneLogin User IDs | [optional] | +| **custom_attributes_attribute_name** | **String** | The short name of a custom attribute. Note that the attribute name is prefixed with custom_attributes. | [optional] | +| **fields** | **String** | A comma separated list user attributes to return. | [optional] | + +### Return type + +[**Array<User>**](User.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## remove_client_app + +> remove_client_app(authorization, id, client_app_id) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +id = 56 # Integer | +client_app_id = 56 # Integer | + +begin + + api_instance.remove_client_app(authorization, id, client_app_id) +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->remove_client_app: #{e}" +end +``` + +#### Using the remove_client_app_with_http_info variant + +This returns an Array which contains the response data (`nil` in this case), status code and headers. + +> remove_client_app_with_http_info(authorization, id, client_app_id) + +```ruby +begin + + data, status_code, headers = api_instance.remove_client_app_with_http_info(authorization, id, client_app_id) + p status_code # => 2xx + p headers # => { ... } + p data # => nil +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->remove_client_app_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **id** | **Integer** | | | +| **client_app_id** | **Integer** | | | + +### Return type + +nil (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## remove_role_admins + +> remove_role_admins(authorization, role_id, remove_role_users_request) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +role_id = 56 # Integer | Set to the id of the role you want to return. +remove_role_users_request = OpenapiClient::RemoveRoleUsersRequest.new # RemoveRoleUsersRequest | + +begin + + api_instance.remove_role_admins(authorization, role_id, remove_role_users_request) +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->remove_role_admins: #{e}" +end +``` + +#### Using the remove_role_admins_with_http_info variant + +This returns an Array which contains the response data (`nil` in this case), status code and headers. + +> remove_role_admins_with_http_info(authorization, role_id, remove_role_users_request) + +```ruby +begin + + data, status_code, headers = api_instance.remove_role_admins_with_http_info(authorization, role_id, remove_role_users_request) + p status_code # => 2xx + p headers # => { ... } + p data # => nil +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->remove_role_admins_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **role_id** | **Integer** | Set to the id of the role you want to return. | | +| **remove_role_users_request** | [**RemoveRoleUsersRequest**](RemoveRoleUsersRequest.md) | | | + +### Return type + +nil (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## remove_role_users + +> remove_role_users(authorization, role_id, remove_role_users_request) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +role_id = 56 # Integer | Set to the id of the role you want to return. +remove_role_users_request = OpenapiClient::RemoveRoleUsersRequest.new # RemoveRoleUsersRequest | + +begin + + api_instance.remove_role_users(authorization, role_id, remove_role_users_request) +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->remove_role_users: #{e}" +end +``` + +#### Using the remove_role_users_with_http_info variant + +This returns an Array which contains the response data (`nil` in this case), status code and headers. + +> remove_role_users_with_http_info(authorization, role_id, remove_role_users_request) + +```ruby +begin + + data, status_code, headers = api_instance.remove_role_users_with_http_info(authorization, role_id, remove_role_users_request) + p status_code # => 2xx + p headers # => { ... } + p data # => nil +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->remove_role_users_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **role_id** | **Integer** | Set to the id of the role you want to return. | | +| **remove_role_users_request** | [**RemoveRoleUsersRequest**](RemoveRoleUsersRequest.md) | | | + +### Return type + +nil (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## revoke_token + +> revoke_token(authorization, opts) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +opts = { + revoke_token_request: OpenapiClient::RevokeTokenRequest.new # RevokeTokenRequest | +} + +begin + + result = api_instance.revoke_token(authorization, opts) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->revoke_token: #{e}" +end +``` + +#### Using the revoke_token_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> revoke_token_with_http_info(authorization, opts) + +```ruby +begin + + data, status_code, headers = api_instance.revoke_token_with_http_info(authorization, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->revoke_token_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **revoke_token_request** | [**RevokeTokenRequest**](RevokeTokenRequest.md) | | [optional] | + +### Return type + +[**GenerateToken400Response**](GenerateToken400Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## set_role_apps + +> > set_role_apps(authorization, role_id, request_body) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +role_id = 56 # Integer | Set to the id of the role you want to return. +request_body = [37] # Array | + +begin + + result = api_instance.set_role_apps(authorization, role_id, request_body) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->set_role_apps: #{e}" +end +``` + +#### Using the set_role_apps_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> >, Integer, Hash)> set_role_apps_with_http_info(authorization, role_id, request_body) + +```ruby +begin + + data, status_code, headers = api_instance.set_role_apps_with_http_info(authorization, role_id, request_body) + p status_code # => 2xx + p headers # => { ... } + p data # => > +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->set_role_apps_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **role_id** | **Integer** | Set to the id of the role you want to return. | | +| **request_body** | [**Array<Integer>**](Integer.md) | | | + +### Return type + +[**Array<SetRoleApps200ResponseInner>**](SetRoleApps200ResponseInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## track_event + +> track_event(authorization, track_event_request) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +track_event_request = OpenapiClient::TrackEventRequest.new({verb: 'verb_example', ip: 'ip_example', user_agent: 'user_agent_example', user: OpenapiClient::RiskUser.new({id: 'id_example'})}) # TrackEventRequest | + +begin + + api_instance.track_event(authorization, track_event_request) +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->track_event: #{e}" +end +``` + +#### Using the track_event_with_http_info variant + +This returns an Array which contains the response data (`nil` in this case), status code and headers. + +> track_event_with_http_info(authorization, track_event_request) + +```ruby +begin + + data, status_code, headers = api_instance.track_event_with_http_info(authorization, track_event_request) + p status_code # => 2xx + p headers # => { ... } + p data # => nil +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->track_event_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **track_event_request** | [**TrackEventRequest**](TrackEventRequest.md) | | | + +### Return type + +nil (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + + +## update_access_token_claim + +> update_access_token_claim(authorization, id, claim_id, add_access_token_claim_request) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +id = 56 # Integer | +claim_id = 56 # Integer | +add_access_token_claim_request = OpenapiClient::AddAccessTokenClaimRequest.new # AddAccessTokenClaimRequest | + +begin + + result = api_instance.update_access_token_claim(authorization, id, claim_id, add_access_token_claim_request) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->update_access_token_claim: #{e}" +end +``` + +#### Using the update_access_token_claim_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> update_access_token_claim_with_http_info(authorization, id, claim_id, add_access_token_claim_request) + +```ruby +begin + + data, status_code, headers = api_instance.update_access_token_claim_with_http_info(authorization, id, claim_id, add_access_token_claim_request) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->update_access_token_claim_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **id** | **Integer** | | | +| **claim_id** | **Integer** | | | +| **add_access_token_claim_request** | [**AddAccessTokenClaimRequest**](AddAccessTokenClaimRequest.md) | | | + +### Return type + +[**Id**](Id.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## update_app + +> update_app(authorization, app_id, schema) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +app_id = 56 # Integer | +schema = OpenapiClient::Schema.new # Schema | + +begin + + result = api_instance.update_app(authorization, app_id, schema) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->update_app: #{e}" +end +``` + +#### Using the update_app_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> update_app_with_http_info(authorization, app_id, schema) + +```ruby +begin + + data, status_code, headers = api_instance.update_app_with_http_info(authorization, app_id, schema) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->update_app_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **app_id** | **Integer** | | | +| **schema** | [**Schema**](Schema.md) | | | + +### Return type + +[**Schema**](Schema.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## update_authorization_server + +> update_authorization_server(authorization, id, create_authorization_server_request) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +id = 56 # Integer | +create_authorization_server_request = OpenapiClient::CreateAuthorizationServerRequest.new # CreateAuthorizationServerRequest | + +begin + + result = api_instance.update_authorization_server(authorization, id, create_authorization_server_request) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->update_authorization_server: #{e}" +end +``` + +#### Using the update_authorization_server_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> update_authorization_server_with_http_info(authorization, id, create_authorization_server_request) + +```ruby +begin + + data, status_code, headers = api_instance.update_authorization_server_with_http_info(authorization, id, create_authorization_server_request) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->update_authorization_server_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **id** | **Integer** | | | +| **create_authorization_server_request** | [**CreateAuthorizationServerRequest**](CreateAuthorizationServerRequest.md) | | | + +### Return type + +[**Id**](Id.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## update_client_app + +> update_client_app(authorization, id, client_app_id, update_client_app_request) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +id = 56 # Integer | +client_app_id = 56 # Integer | +update_client_app_request = OpenapiClient::UpdateClientAppRequest.new # UpdateClientAppRequest | + +begin + + result = api_instance.update_client_app(authorization, id, client_app_id, update_client_app_request) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->update_client_app: #{e}" +end +``` + +#### Using the update_client_app_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> update_client_app_with_http_info(authorization, id, client_app_id, update_client_app_request) + +```ruby +begin + + data, status_code, headers = api_instance.update_client_app_with_http_info(authorization, id, client_app_id, update_client_app_request) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->update_client_app_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **id** | **Integer** | | | +| **client_app_id** | **Integer** | | | +| **update_client_app_request** | [**UpdateClientAppRequest**](UpdateClientAppRequest.md) | | | + +### Return type + +[**ClientApp**](ClientApp.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## update_environment_variable + +> update_environment_variable(authorization, envvar_id, update_environment_variable_request) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +envvar_id = 'envvar_id_example' # String | Set to the id of the Hook Environment Variable that you want to fetch. +update_environment_variable_request = OpenapiClient::UpdateEnvironmentVariableRequest.new({value: 'value_example'}) # UpdateEnvironmentVariableRequest | + +begin + + result = api_instance.update_environment_variable(authorization, envvar_id, update_environment_variable_request) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->update_environment_variable: #{e}" +end +``` + +#### Using the update_environment_variable_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> update_environment_variable_with_http_info(authorization, envvar_id, update_environment_variable_request) + +```ruby +begin + + data, status_code, headers = api_instance.update_environment_variable_with_http_info(authorization, envvar_id, update_environment_variable_request) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->update_environment_variable_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **envvar_id** | **String** | Set to the id of the Hook Environment Variable that you want to fetch. | | +| **update_environment_variable_request** | [**UpdateEnvironmentVariableRequest**](UpdateEnvironmentVariableRequest.md) | | | + +### Return type + +[**Envvar**](Envvar.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## update_hook + +> update_hook(authorization, hook_id, hook) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +hook_id = 'hook_id_example' # String | Set to the id of the Hook that you want to return. +hook = OpenapiClient::Hook.new({type: 'type_example', disabled: false, timeout: 37, env_vars: ['env_vars_example'], runtime: 'runtime_example', retries: 37, packages: 3.56, function: 'function_example'}) # Hook | + +begin + + result = api_instance.update_hook(authorization, hook_id, hook) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->update_hook: #{e}" +end +``` + +#### Using the update_hook_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> update_hook_with_http_info(authorization, hook_id, hook) + +```ruby +begin + + data, status_code, headers = api_instance.update_hook_with_http_info(authorization, hook_id, hook) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->update_hook_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **hook_id** | **String** | Set to the id of the Hook that you want to return. | | +| **hook** | [**Hook**](Hook.md) | | | + +### Return type + +[**Hook**](Hook.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## update_mapping + +> Integer update_mapping(authorization, mapping_id, mapping) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +mapping_id = 56 # Integer | The id of the user mapping to locate. +mapping = OpenapiClient::Mapping.new({name: 'name_example', enabled: false, match: 'all', position: 37, actions: [OpenapiClient::Action.new]}) # Mapping | + +begin + + result = api_instance.update_mapping(authorization, mapping_id, mapping) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->update_mapping: #{e}" +end +``` + +#### Using the update_mapping_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> update_mapping_with_http_info(authorization, mapping_id, mapping) + +```ruby +begin + + data, status_code, headers = api_instance.update_mapping_with_http_info(authorization, mapping_id, mapping) + p status_code # => 2xx + p headers # => { ... } + p data # => Integer +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->update_mapping_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **mapping_id** | **Integer** | The id of the user mapping to locate. | | +| **mapping** | [**Mapping**](Mapping.md) | | | + +### Return type + +**Integer** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## update_risk_rule + +> update_risk_rule(authorization, risk_rule_id, risk_rule) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +risk_rule_id = 'risk_rule_id_example' # String | +risk_rule = OpenapiClient::RiskRule.new # RiskRule | + +begin + + result = api_instance.update_risk_rule(authorization, risk_rule_id, risk_rule) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->update_risk_rule: #{e}" +end +``` + +#### Using the update_risk_rule_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> update_risk_rule_with_http_info(authorization, risk_rule_id, risk_rule) + +```ruby +begin + + data, status_code, headers = api_instance.update_risk_rule_with_http_info(authorization, risk_rule_id, risk_rule) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->update_risk_rule_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **risk_rule_id** | **String** | | | +| **risk_rule** | [**RiskRule**](RiskRule.md) | | | + +### Return type + +[**RiskRule**](RiskRule.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## update_role + +> update_role(authorization, role_id, role) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +role_id = 56 # Integer | Set to the id of the role you want to return. +role = OpenapiClient::Role.new({name: 'name_example'}) # Role | + +begin + + result = api_instance.update_role(authorization, role_id, role) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->update_role: #{e}" +end +``` + +#### Using the update_role_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> update_role_with_http_info(authorization, role_id, role) + +```ruby +begin + + data, status_code, headers = api_instance.update_role_with_http_info(authorization, role_id, role) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->update_role_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **role_id** | **Integer** | Set to the id of the role you want to return. | | +| **role** | [**Role**](Role.md) | | | + +### Return type + +[**UpdateRole200Response**](UpdateRole200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## update_rule + +> update_rule(authorization, app_id, rule_id, rule) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +app_id = 56 # Integer | +rule_id = 56 # Integer | The id of the app rule to locate. +rule = OpenapiClient::Rule.new # Rule | + +begin + + result = api_instance.update_rule(authorization, app_id, rule_id, rule) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->update_rule: #{e}" +end +``` + +#### Using the update_rule_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> update_rule_with_http_info(authorization, app_id, rule_id, rule) + +```ruby +begin + + data, status_code, headers = api_instance.update_rule_with_http_info(authorization, app_id, rule_id, rule) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->update_rule_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **app_id** | **Integer** | | | +| **rule_id** | **Integer** | The id of the app rule to locate. | | +| **rule** | [**Rule**](Rule.md) | | | + +### Return type + +[**RuleId**](RuleId.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## update_scope + +> update_scope(authorization, id, scope_id, add_scope_request) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +id = 56 # Integer | +scope_id = 56 # Integer | +add_scope_request = OpenapiClient::AddScopeRequest.new # AddScopeRequest | + +begin + + result = api_instance.update_scope(authorization, id, scope_id, add_scope_request) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->update_scope: #{e}" +end +``` + +#### Using the update_scope_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> update_scope_with_http_info(authorization, id, scope_id, add_scope_request) + +```ruby +begin + + data, status_code, headers = api_instance.update_scope_with_http_info(authorization, id, scope_id, add_scope_request) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->update_scope_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **id** | **Integer** | | | +| **scope_id** | **Integer** | | | +| **add_scope_request** | [**AddScopeRequest**](AddScopeRequest.md) | | | + +### Return type + +[**Id**](Id.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## update_user + +> update_user(authorization, user_id, user, opts) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +user_id = 56 # Integer | Set to the id of the user that you want to return. +user = OpenapiClient::User.new # User | +opts = { + mappings: 'async', # String | Controls how mappings will be applied to the user on creation. Defaults to async. + validate_policy: true # Boolean | Will passwords validate against the User Policy? Defaults to true. +} + +begin + + result = api_instance.update_user(authorization, user_id, user, opts) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->update_user: #{e}" +end +``` + +#### Using the update_user_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> update_user_with_http_info(authorization, user_id, user, opts) + +```ruby +begin + + data, status_code, headers = api_instance.update_user_with_http_info(authorization, user_id, user, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->update_user_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **user_id** | **Integer** | Set to the id of the user that you want to return. | | +| **user** | [**User**](User.md) | | | +| **mappings** | **String** | Controls how mappings will be applied to the user on creation. Defaults to async. | [optional] | +| **validate_policy** | **Boolean** | Will passwords validate against the User Policy? Defaults to true. | [optional] | + +### Return type + +[**User**](User.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## verify_enrollment + +> > verify_enrollment(authorization, user_id, registration_id, verify_enrollment_request) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +user_id = 56 # Integer | Set to the id of the user. +registration_id = 56 # Integer | Set to the uuid of the registration. This was included in the response as part of the initial request in Enroll Factor. +verify_enrollment_request = OpenapiClient::VerifyEnrollmentRequest.new # VerifyEnrollmentRequest | + +begin + + result = api_instance.verify_enrollment(authorization, user_id, registration_id, verify_enrollment_request) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->verify_enrollment: #{e}" +end +``` + +#### Using the verify_enrollment_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> >, Integer, Hash)> verify_enrollment_with_http_info(authorization, user_id, registration_id, verify_enrollment_request) + +```ruby +begin + + data, status_code, headers = api_instance.verify_enrollment_with_http_info(authorization, user_id, registration_id, verify_enrollment_request) + p status_code # => 2xx + p headers # => { ... } + p data # => > +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->verify_enrollment_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **user_id** | **Integer** | Set to the id of the user. | | +| **registration_id** | **Integer** | Set to the uuid of the registration. This was included in the response as part of the initial request in Enroll Factor. | | +| **verify_enrollment_request** | [**VerifyEnrollmentRequest**](VerifyEnrollmentRequest.md) | | | + +### Return type + +[**Array<Registration>**](Registration.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## verify_enrollment_voice_protect + +> > verify_enrollment_voice_protect(authorization, user_id, registration_id) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +user_id = 56 # Integer | Set to the id of the user. +registration_id = 56 # Integer | Set to the uuid of the registration. This was included in the response as part of the initial request in Enroll Factor. + +begin + + result = api_instance.verify_enrollment_voice_protect(authorization, user_id, registration_id) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->verify_enrollment_voice_protect: #{e}" +end +``` + +#### Using the verify_enrollment_voice_protect_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> >, Integer, Hash)> verify_enrollment_voice_protect_with_http_info(authorization, user_id, registration_id) + +```ruby +begin + + data, status_code, headers = api_instance.verify_enrollment_voice_protect_with_http_info(authorization, user_id, registration_id) + p status_code # => 2xx + p headers # => { ... } + p data # => > +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->verify_enrollment_voice_protect_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **user_id** | **Integer** | Set to the id of the user. | | +| **registration_id** | **Integer** | Set to the uuid of the registration. This was included in the response as part of the initial request in Enroll Factor. | | + +### Return type + +[**Array<Registration>**](Registration.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## verify_factor + +> verify_factor(authorization, user_id, verification_id, verify_factor_request) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +user_id = 56 # Integer | Set to the id of the user. +verification_id = 56 # Integer | The verification_id is returned on activation of the factor or you can get the device_id using the Activate Factor API call. +verify_factor_request = OpenapiClient::VerifyFactorRequest.new # VerifyFactorRequest | + +begin + + result = api_instance.verify_factor(authorization, user_id, verification_id, verify_factor_request) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->verify_factor: #{e}" +end +``` + +#### Using the verify_factor_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> verify_factor_with_http_info(authorization, user_id, verification_id, verify_factor_request) + +```ruby +begin + + data, status_code, headers = api_instance.verify_factor_with_http_info(authorization, user_id, verification_id, verify_factor_request) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->verify_factor_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **user_id** | **Integer** | Set to the id of the user. | | +| **verification_id** | **Integer** | The verification_id is returned on activation of the factor or you can get the device_id using the Activate Factor API call. | | +| **verify_factor_request** | [**VerifyFactorRequest**](VerifyFactorRequest.md) | | | + +### Return type + +[**Status2**](Status2.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## verify_factor_saml + +> verify_factor_saml(authorization, verify_factor_saml_request) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +verify_factor_saml_request = OpenapiClient::VerifyFactorSamlRequest.new({app_id: 'app_id_example', device_id: 'device_id_example', state_token: 'state_token_example'}) # VerifyFactorSamlRequest | + +begin + + result = api_instance.verify_factor_saml(authorization, verify_factor_saml_request) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->verify_factor_saml: #{e}" +end +``` + +#### Using the verify_factor_saml_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> verify_factor_saml_with_http_info(authorization, verify_factor_saml_request) + +```ruby +begin + + data, status_code, headers = api_instance.verify_factor_saml_with_http_info(authorization, verify_factor_saml_request) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->verify_factor_saml_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **verify_factor_saml_request** | [**VerifyFactorSamlRequest**](VerifyFactorSamlRequest.md) | | | + +### Return type + +[**VerifyFactorSaml200Response**](VerifyFactorSaml200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## verify_factor_voice + +> > verify_factor_voice(authorization, user_id, verification_id) + + + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +authorization = 'authorization_example' # String | +user_id = 56 # Integer | Set to the id of the user. +verification_id = 56 # Integer | The verification_id is returned on activation of the factor or you can get the device_id using the Activate Factor API call. + +begin + + result = api_instance.verify_factor_voice(authorization, user_id, verification_id) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->verify_factor_voice: #{e}" +end +``` + +#### Using the verify_factor_voice_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> >, Integer, Hash)> verify_factor_voice_with_http_info(authorization, user_id, verification_id) + +```ruby +begin + + data, status_code, headers = api_instance.verify_factor_voice_with_http_info(authorization, user_id, verification_id) + p status_code # => 2xx + p headers # => { ... } + p data # => > +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->verify_factor_voice_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | | | +| **user_id** | **Integer** | Set to the id of the user. | | +| **verification_id** | **Integer** | The verification_id is returned on activation of the factor or you can get the device_id using the Activate Factor API call. | | + +### Return type + +[**Array<VerifyFactorVoice200ResponseInner>**](VerifyFactorVoice200ResponseInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + diff --git a/docs/Device.md b/docs/Device.md new file mode 100644 index 0000000..292c19b --- /dev/null +++ b/docs/Device.md @@ -0,0 +1,26 @@ +# OpenapiClient::Device + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **device_id** | **String** | | [optional] | +| **user_display_name** | **String** | | [optional] | +| **type_display_name** | **String** | | [optional] | +| **auth_factor_name** | **String** | | [optional] | +| **default** | **Boolean** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::Device.new( + device_id: null, + user_display_name: null, + type_display_name: null, + auth_factor_name: null, + default: null +) +``` + diff --git a/docs/EnrollFactorRequest.md b/docs/EnrollFactorRequest.md new file mode 100644 index 0000000..bcf0599 --- /dev/null +++ b/docs/EnrollFactorRequest.md @@ -0,0 +1,28 @@ +# OpenapiClient::EnrollFactorRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **factor_id** | **Integer** | The identifier of the factor to enroll the user with. | | +| **display_name** | **String** | A name for the users device. | | +| **expires_in** | **String** | Defaults to 120. Valid values are: 120-900 seconds. | [optional] | +| **verified** | **Boolean** | Defaults to false. | [optional] | +| **redirect_to** | **String** | Redirects MagicLink success page to specified URL after 2 seconds. | [optional] | +| **custom_message** | **String** | A message template that will be sent via SMS. Max length of the message after template items are inserted is 160 characters including the OTP code. | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::EnrollFactorRequest.new( + factor_id: null, + display_name: null, + expires_in: null, + verified: null, + redirect_to: null, + custom_message: null +) +``` + diff --git a/docs/Envvar.md b/docs/Envvar.md new file mode 100644 index 0000000..e2409fc --- /dev/null +++ b/docs/Envvar.md @@ -0,0 +1,24 @@ +# OpenapiClient::Envvar + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | A unique identifier for the Hook Environment Variable | [optional] | +| **name** | **String** | The name of the environment variable. | [optional] | +| **created_at** | **String** | The ISO8601 formatted date that the environment variable was created. | [optional] | +| **updated_at** | **String** | The ISO8601 formatted date that the environment variable was last updated. | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::Envvar.new( + id: null, + name: null, + created_at: null, + updated_at: null +) +``` + diff --git a/docs/ErrorStatus.md b/docs/ErrorStatus.md new file mode 100644 index 0000000..16d6569 --- /dev/null +++ b/docs/ErrorStatus.md @@ -0,0 +1,22 @@ +# OpenapiClient::ErrorStatus + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **code** | **Integer** | | [optional] | +| **message** | **String** | | [optional] | +| **errors** | [**Array<ErrorStatusErrorsInner>**](ErrorStatusErrorsInner.md) | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::ErrorStatus.new( + code: null, + message: null, + errors: null +) +``` + diff --git a/docs/ErrorStatusErrorsInner.md b/docs/ErrorStatusErrorsInner.md new file mode 100644 index 0000000..f3cd088 --- /dev/null +++ b/docs/ErrorStatusErrorsInner.md @@ -0,0 +1,20 @@ +# OpenapiClient::ErrorStatusErrorsInner + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **field** | **String** | | [optional] | +| **message** | **Array<String>** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::ErrorStatusErrorsInner.new( + field: null, + message: null +) +``` + diff --git a/docs/FactorInner.md b/docs/FactorInner.md new file mode 100644 index 0000000..f711349 --- /dev/null +++ b/docs/FactorInner.md @@ -0,0 +1,32 @@ +# OpenapiClient::FactorInner + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | MFA device identifier. | [optional] | +| **status** | **String** | accepted : factor has been verified. pending: registered but has not been verified. | [optional] | +| **default** | **Boolean** | True = is user's default MFA device for OneLogin. | [optional] | +| **auth_factor_name** | **String** | \"Official\" authentication factor name, as it appears to administrators in OneLogin. | [optional] | +| **type_display_name** | **String** | Authentication factor display name as it appears to users upon initial registration, as defined by admins at Settings > Authentication Factors. | [optional] | +| **user_display_name** | **String** | Authentication factor display name assigned by users when they enroll the device. | [optional] | +| **expires_at** | **String** | A short lived token that is required to Verify the Factor. This token expires based on the expires_in parameter passed in. | [optional] | +| **factor_data** | [**FactorInnerFactorData**](FactorInnerFactorData.md) | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::FactorInner.new( + id: null, + status: null, + default: null, + auth_factor_name: null, + type_display_name: null, + user_display_name: null, + expires_at: null, + factor_data: null +) +``` + diff --git a/docs/FactorInnerFactorData.md b/docs/FactorInnerFactorData.md new file mode 100644 index 0000000..bc78696 --- /dev/null +++ b/docs/FactorInnerFactorData.md @@ -0,0 +1,20 @@ +# OpenapiClient::FactorInnerFactorData + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **verification_token** | **String** | The token which can be used to verify the factor registration. | [optional] | +| **totp_url** | **String** | OTP Url that can be leveraged for any authenticator that supports the key uri format. | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::FactorInnerFactorData.new( + verification_token: null, + totp_url: null +) +``` + diff --git a/docs/GenerateMfaToken200Response.md b/docs/GenerateMfaToken200Response.md new file mode 100644 index 0000000..0f6c778 --- /dev/null +++ b/docs/GenerateMfaToken200Response.md @@ -0,0 +1,24 @@ +# OpenapiClient::GenerateMfaToken200Response + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **mfa_token** | **String** | Token can function as a temporary MFA token. It can be used to authenticate for any app when valid. | [optional] | +| **reusable** | **Boolean** | true indcates the token can be used multiple times. false indicates the token is invalid after a single use | [optional] | +| **expires_at** | **String** | Defines the expiration time and date for the token. Format is UTC time. | [optional] | +| **device_id** | **String** | Defines the expiration time and date for the token. Format is UTC time. | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::GenerateMfaToken200Response.new( + mfa_token: null, + reusable: null, + expires_at: null, + device_id: null +) +``` + diff --git a/docs/GenerateMfaToken422Response.md b/docs/GenerateMfaToken422Response.md new file mode 100644 index 0000000..8f14629 --- /dev/null +++ b/docs/GenerateMfaToken422Response.md @@ -0,0 +1,24 @@ +# OpenapiClient::GenerateMfaToken422Response + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **status_code** | **Integer** | | [optional] | +| **name** | **String** | | [optional] | +| **message** | **String** | | [optional] | +| **details** | [**GenerateMfaToken422ResponseDetails**](GenerateMfaToken422ResponseDetails.md) | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::GenerateMfaToken422Response.new( + status_code: null, + name: null, + message: null, + details: null +) +``` + diff --git a/docs/GenerateMfaToken422ResponseDetails.md b/docs/GenerateMfaToken422ResponseDetails.md new file mode 100644 index 0000000..33213dd --- /dev/null +++ b/docs/GenerateMfaToken422ResponseDetails.md @@ -0,0 +1,18 @@ +# OpenapiClient::GenerateMfaToken422ResponseDetails + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **parameters** | **Array<String>** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::GenerateMfaToken422ResponseDetails.new( + parameters: null +) +``` + diff --git a/docs/GenerateMfaTokenRequest.md b/docs/GenerateMfaTokenRequest.md new file mode 100644 index 0000000..767f09b --- /dev/null +++ b/docs/GenerateMfaTokenRequest.md @@ -0,0 +1,20 @@ +# OpenapiClient::GenerateMfaTokenRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **expires_in** | **String** | Set the duration of the token in seconds. | [optional] | +| **reusable** | **Boolean** | Defines if the token is reusable multiple times within the expiry window. | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::GenerateMfaTokenRequest.new( + expires_in: null, + reusable: null +) +``` + diff --git a/docs/GenerateSamlAssertionRequest.md b/docs/GenerateSamlAssertionRequest.md new file mode 100644 index 0000000..476e9e4 --- /dev/null +++ b/docs/GenerateSamlAssertionRequest.md @@ -0,0 +1,26 @@ +# OpenapiClient::GenerateSamlAssertionRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **username_or_email** | **String** | Set this to the username or email of the OneLogin user accessing the app for which you want to generate a SAML token. | | +| **password** | **String** | Password of the OneLogin user accessing the app for which you want to generate a SAML token. | | +| **app_id** | **String** | App ID of the app for which you want to generate a SAML token. This is the app ID in OneLogin. | | +| **subdomain** | **String** | Set to the subdomain of the OneLogin user accessing the app for which you want to generate a SAML token. | | +| **ip_address** | **String** | Whitelisted IP address, if MFA is required and you need to honor IP address whitelisting defined in MFA policies. | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::GenerateSamlAssertionRequest.new( + username_or_email: null, + password: null, + app_id: null, + subdomain: null, + ip_address: null +) +``` + diff --git a/docs/GenerateToken200Response.md b/docs/GenerateToken200Response.md new file mode 100644 index 0000000..3147010 --- /dev/null +++ b/docs/GenerateToken200Response.md @@ -0,0 +1,28 @@ +# OpenapiClient::GenerateToken200Response + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **access_token** | **String** | | [optional] | +| **created_at** | **String** | | [optional] | +| **expires_in** | **Integer** | | [optional] | +| **refresh_token** | **String** | | [optional] | +| **token_type** | **String** | | [optional] | +| **accountt_id** | **Integer** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::GenerateToken200Response.new( + access_token: null, + created_at: null, + expires_in: null, + refresh_token: null, + token_type: null, + accountt_id: null +) +``` + diff --git a/docs/GenerateToken400Response.md b/docs/GenerateToken400Response.md new file mode 100644 index 0000000..af85296 --- /dev/null +++ b/docs/GenerateToken400Response.md @@ -0,0 +1,18 @@ +# OpenapiClient::GenerateToken400Response + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **status** | [**Status**](Status.md) | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::GenerateToken400Response.new( + status: null +) +``` + diff --git a/docs/GenerateTokenRequest.md b/docs/GenerateTokenRequest.md new file mode 100644 index 0000000..f078e12 --- /dev/null +++ b/docs/GenerateTokenRequest.md @@ -0,0 +1,18 @@ +# OpenapiClient::GenerateTokenRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **grant_type** | **String** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::GenerateTokenRequest.new( + grant_type: null +) +``` + diff --git a/docs/GetAuthorizationServer200Response.md b/docs/GetAuthorizationServer200Response.md new file mode 100644 index 0000000..dff1060 --- /dev/null +++ b/docs/GetAuthorizationServer200Response.md @@ -0,0 +1,24 @@ +# OpenapiClient::GetAuthorizationServer200Response + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **configuration** | [**AuthServerConfiguration**](AuthServerConfiguration.md) | | [optional] | +| **id** | **Integer** | | [optional] | +| **description** | **String** | | [optional] | +| **name** | **String** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::GetAuthorizationServer200Response.new( + configuration: null, + id: null, + description: null, + name: null +) +``` + diff --git a/docs/GetAvailableFactors200ResponseInner.md b/docs/GetAvailableFactors200ResponseInner.md new file mode 100644 index 0000000..971f0c7 --- /dev/null +++ b/docs/GetAvailableFactors200ResponseInner.md @@ -0,0 +1,22 @@ +# OpenapiClient::GetAvailableFactors200ResponseInner + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **factor_id** | **Integer** | Identifier for the factor which will be used for user enrollment | [optional] | +| **name** | **String** | Authentication factor name, as it appears to administrators in OneLogin. | [optional] | +| **auth_factor_name** | **String** | Internal use only | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::GetAvailableFactors200ResponseInner.new( + factor_id: null, + name: null, + auth_factor_name: null +) +``` + diff --git a/docs/GetClientApps200ResponseInner.md b/docs/GetClientApps200ResponseInner.md new file mode 100644 index 0000000..4afc4ec --- /dev/null +++ b/docs/GetClientApps200ResponseInner.md @@ -0,0 +1,24 @@ +# OpenapiClient::GetClientApps200ResponseInner + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **scopes** | [**Array<GetClientApps200ResponseInnerScopesInner>**](GetClientApps200ResponseInnerScopesInner.md) | | [optional] | +| **app_id** | **Integer** | | [optional] | +| **name** | **String** | | [optional] | +| **api_auth_id** | **Integer** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::GetClientApps200ResponseInner.new( + scopes: null, + app_id: null, + name: null, + api_auth_id: null +) +``` + diff --git a/docs/GetClientApps200ResponseInnerScopesInner.md b/docs/GetClientApps200ResponseInnerScopesInner.md new file mode 100644 index 0000000..24e0af8 --- /dev/null +++ b/docs/GetClientApps200ResponseInnerScopesInner.md @@ -0,0 +1,22 @@ +# OpenapiClient::GetClientApps200ResponseInnerScopesInner + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **description** | **String** | | [optional] | +| **value** | **String** | | [optional] | +| **id** | **Integer** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::GetClientApps200ResponseInnerScopesInner.new( + description: null, + value: null, + id: null +) +``` + diff --git a/docs/GetRateLimit200Response.md b/docs/GetRateLimit200Response.md new file mode 100644 index 0000000..0a620d3 --- /dev/null +++ b/docs/GetRateLimit200Response.md @@ -0,0 +1,20 @@ +# OpenapiClient::GetRateLimit200Response + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **status** | [**Status**](Status.md) | | [optional] | +| **data** | [**GetRateLimit200ResponseData**](GetRateLimit200ResponseData.md) | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::GetRateLimit200Response.new( + status: null, + data: null +) +``` + diff --git a/docs/GetRateLimit200ResponseData.md b/docs/GetRateLimit200ResponseData.md new file mode 100644 index 0000000..01a69f2 --- /dev/null +++ b/docs/GetRateLimit200ResponseData.md @@ -0,0 +1,22 @@ +# OpenapiClient::GetRateLimit200ResponseData + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **x_rate_limit_limit** | **Integer** | | [optional] | +| **x_rate_limit_remaining** | **Integer** | | [optional] | +| **x_rate_limit_reset** | **Integer** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::GetRateLimit200ResponseData.new( + x_rate_limit_limit: null, + x_rate_limit_remaining: null, + x_rate_limit_reset: null +) +``` + diff --git a/docs/GetRiskScore200Response.md b/docs/GetRiskScore200Response.md new file mode 100644 index 0000000..cd4ca03 --- /dev/null +++ b/docs/GetRiskScore200Response.md @@ -0,0 +1,20 @@ +# OpenapiClient::GetRiskScore200Response + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **score** | **Float** | A risk score 0 is low risk and 100 is the highest risk level possible. | [optional] | +| **triggers** | **Array<String>** | Triggers are indicators of some of the key items that influenced the risk score. | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::GetRiskScore200Response.new( + score: null, + triggers: null +) +``` + diff --git a/docs/GetRiskScore400Response.md b/docs/GetRiskScore400Response.md new file mode 100644 index 0000000..6d0be51 --- /dev/null +++ b/docs/GetRiskScore400Response.md @@ -0,0 +1,18 @@ +# OpenapiClient::GetRiskScore400Response + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **messages** | **Array<String>** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::GetRiskScore400Response.new( + messages: null +) +``` + diff --git a/docs/GetRiskScoreRequest.md b/docs/GetRiskScoreRequest.md new file mode 100644 index 0000000..81eaa27 --- /dev/null +++ b/docs/GetRiskScoreRequest.md @@ -0,0 +1,30 @@ +# OpenapiClient::GetRiskScoreRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **ip** | **String** | The IP address of the User's request. | | +| **user_agent** | **String** | The user agent of the User's request. | | +| **user** | [**RiskUser**](RiskUser.md) | | | +| **source** | [**Source**](Source.md) | | [optional] | +| **session** | [**Session**](Session.md) | | [optional] | +| **device** | [**RiskDevice**](RiskDevice.md) | | [optional] | +| **fp** | **String** | Set to the value of the __tdli_fp cookie. | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::GetRiskScoreRequest.new( + ip: null, + user_agent: null, + user: null, + source: null, + session: null, + device: null, + fp: null +) +``` + diff --git a/docs/GetScoreInsights200Response.md b/docs/GetScoreInsights200Response.md new file mode 100644 index 0000000..80f8406 --- /dev/null +++ b/docs/GetScoreInsights200Response.md @@ -0,0 +1,20 @@ +# OpenapiClient::GetScoreInsights200Response + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **scores** | [**GetScoreInsights200ResponseScores**](GetScoreInsights200ResponseScores.md) | | [optional] | +| **total** | **Integer** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::GetScoreInsights200Response.new( + scores: null, + total: null +) +``` + diff --git a/docs/GetScoreInsights200ResponseScores.md b/docs/GetScoreInsights200ResponseScores.md new file mode 100644 index 0000000..28b26f6 --- /dev/null +++ b/docs/GetScoreInsights200ResponseScores.md @@ -0,0 +1,26 @@ +# OpenapiClient::GetScoreInsights200ResponseScores + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **minimal** | **Integer** | | [optional] | +| **low** | **Integer** | | [optional] | +| **medium** | **Integer** | | [optional] | +| **high** | **Integer** | | [optional] | +| **very_high** | **Integer** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::GetScoreInsights200ResponseScores.new( + minimal: null, + low: null, + medium: null, + high: null, + very_high: null +) +``` + diff --git a/docs/GetUserApps200ResponseInner.md b/docs/GetUserApps200ResponseInner.md new file mode 100644 index 0000000..1842195 --- /dev/null +++ b/docs/GetUserApps200ResponseInner.md @@ -0,0 +1,32 @@ +# OpenapiClient::GetUserApps200ResponseInner + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **Integer** | The App ID | [optional] | +| **icon_url** | **String** | A url for the icon that represents the app in the OneLogin portal | [optional] | +| **extension** | **Boolean** | Boolean that indicates if the OneLogin browser extension is required to launch this app. | [optional] | +| **login_id** | **Integer** | Unqiue identifier for this user and app combination. | [optional] | +| **name** | **String** | The name of the app. | [optional] | +| **provisioning_status** | **String** | | [optional] | +| **provisioning_state** | **String** | If provisioning is enabled this indicates the state of provisioning for the given user. | [optional] | +| **provisioning_enabled** | **Boolean** | Indicates if provisioning is enabled for this app. | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::GetUserApps200ResponseInner.new( + id: null, + icon_url: null, + extension: null, + login_id: null, + name: null, + provisioning_status: null, + provisioning_state: null, + provisioning_enabled: null +) +``` + diff --git a/docs/Hook.md b/docs/Hook.md new file mode 100644 index 0000000..0d01291 --- /dev/null +++ b/docs/Hook.md @@ -0,0 +1,46 @@ +# OpenapiClient::Hook + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | The Hook unique ID in OneLogin. | [optional] | +| **type** | **String** | A string describing the type of hook. e.g. `pre-authentication` | | +| **disabled** | **Boolean** | Boolean to enable or disable the hook. Disabled hooks will not run. | [default to true] | +| **timeout** | **Integer** | The number of seconds to allow the hook function to run before before timing out. Maximum timeout varies based on the type of hook. | [default to 1] | +| **env_vars** | **Array<String>** | Environment Variable objects that will be available via process.env.ENV_VAR_NAME in the hook code. | | +| **runtime** | **String** | The Smart Hooks supported Node.js version to execute this hook with. | | +| **retries** | **Integer** | Number of retries if execution fails. | [default to 0] | +| **packages** | **Object** | An object containing NPM packages that are bundled with the hook function. | | +| **function** | **String** | A base64 encoded string containing the javascript function code. | | +| **context_version** | **String** | The semantic version of the content that will be injected into this hook. | [optional] | +| **status** | **String** | String describing the state of the hook function. When a hook is ready and disabled is false it will be executed. | [optional] | +| **options** | [**HookOptions**](HookOptions.md) | | [optional] | +| **conditions** | [**Array<HookConditionsInner>**](HookConditionsInner.md) | An array of objects that let you limit the execution of a hook to users in specific roles. | [optional] | +| **created_at** | **String** | ISO8601 format date that they hook function was created. | [optional] | +| **updated_at** | **String** | ISO8601 format date that they hook function was last updated. | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::Hook.new( + id: null, + type: null, + disabled: null, + timeout: null, + env_vars: null, + runtime: null, + retries: null, + packages: null, + function: null, + context_version: null, + status: null, + options: null, + conditions: null, + created_at: null, + updated_at: null +) +``` + diff --git a/docs/HookConditionsInner.md b/docs/HookConditionsInner.md new file mode 100644 index 0000000..be6bb39 --- /dev/null +++ b/docs/HookConditionsInner.md @@ -0,0 +1,22 @@ +# OpenapiClient::HookConditionsInner + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **source** | **String** | | [optional] | +| **operator** | **String** | | [optional] | +| **value** | **String** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::HookConditionsInner.new( + source: null, + operator: null, + value: null +) +``` + diff --git a/docs/HookOptions.md b/docs/HookOptions.md new file mode 100644 index 0000000..55da5fc --- /dev/null +++ b/docs/HookOptions.md @@ -0,0 +1,22 @@ +# OpenapiClient::HookOptions + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **risk_enabled** | **Boolean** | | [optional] | +| **location_enabled** | **Boolean** | | [optional] | +| **mfa_device_info_enabled** | **Boolean** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::HookOptions.new( + risk_enabled: null, + location_enabled: null, + mfa_device_info_enabled: null +) +``` + diff --git a/docs/HookStatus.md b/docs/HookStatus.md new file mode 100644 index 0000000..4f76315 --- /dev/null +++ b/docs/HookStatus.md @@ -0,0 +1,20 @@ +# OpenapiClient::HookStatus + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **name** | **String** | | [optional] | +| **message** | **String** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::HookStatus.new( + name: null, + message: null +) +``` + diff --git a/docs/Id.md b/docs/Id.md new file mode 100644 index 0000000..4a59a9b --- /dev/null +++ b/docs/Id.md @@ -0,0 +1,18 @@ +# OpenapiClient::Id + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::Id.new( + id: null +) +``` + diff --git a/docs/ListAccessTokenClaims200ResponseInner.md b/docs/ListAccessTokenClaims200ResponseInner.md new file mode 100644 index 0000000..d700e23 --- /dev/null +++ b/docs/ListAccessTokenClaims200ResponseInner.md @@ -0,0 +1,34 @@ +# OpenapiClient::ListAccessTokenClaims200ResponseInner + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **Integer** | | [optional] | +| **label** | **String** | | [optional] | +| **user_attribute_mappings** | **String** | | [optional] | +| **user_attribute_macros** | **String** | | [optional] | +| **attributes_transformations** | **String** | | [optional] | +| **skip_if_blank** | **Boolean** | | [optional] | +| **values** | **Array<String>** | | [optional] | +| **default_values** | **String** | | [optional] | +| **provisioned_entitlements** | **Boolean** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::ListAccessTokenClaims200ResponseInner.new( + id: null, + label: null, + user_attribute_mappings: null, + user_attribute_macros: null, + attributes_transformations: null, + skip_if_blank: null, + values: null, + default_values: null, + provisioned_entitlements: null +) +``` + diff --git a/docs/ListActions200ResponseInner.md b/docs/ListActions200ResponseInner.md new file mode 100644 index 0000000..6d1c31a --- /dev/null +++ b/docs/ListActions200ResponseInner.md @@ -0,0 +1,20 @@ +# OpenapiClient::ListActions200ResponseInner + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **name** | **String** | The name of the Action. | [optional] | +| **value** | **String** | The unique identifier of the action. This should be used when defining actions for a User Mapping. | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::ListActions200ResponseInner.new( + name: null, + value: null +) +``` + diff --git a/docs/ListAppUsers200ResponseInner.md b/docs/ListAppUsers200ResponseInner.md new file mode 100644 index 0000000..20563e6 --- /dev/null +++ b/docs/ListAppUsers200ResponseInner.md @@ -0,0 +1,26 @@ +# OpenapiClient::ListAppUsers200ResponseInner + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **firstname** | **String** | | [optional] | +| **id** | **Integer** | | [optional] | +| **email** | **String** | | [optional] | +| **lastname** | **String** | | [optional] | +| **username** | **String** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::ListAppUsers200ResponseInner.new( + firstname: null, + id: null, + email: null, + lastname: null, + username: null +) +``` + diff --git a/docs/ListAuthorizationServers200ResponseInner.md b/docs/ListAuthorizationServers200ResponseInner.md new file mode 100644 index 0000000..5958f5b --- /dev/null +++ b/docs/ListAuthorizationServers200ResponseInner.md @@ -0,0 +1,24 @@ +# OpenapiClient::ListAuthorizationServers200ResponseInner + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **Integer** | | [optional] | +| **name** | **String** | | [optional] | +| **configuration** | [**ListAuthorizationServers200ResponseInnerConfiguration**](ListAuthorizationServers200ResponseInnerConfiguration.md) | | [optional] | +| **description** | **String** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::ListAuthorizationServers200ResponseInner.new( + id: null, + name: null, + configuration: null, + description: null +) +``` + diff --git a/docs/ListAuthorizationServers200ResponseInnerConfiguration.md b/docs/ListAuthorizationServers200ResponseInnerConfiguration.md new file mode 100644 index 0000000..0d3a584 --- /dev/null +++ b/docs/ListAuthorizationServers200ResponseInnerConfiguration.md @@ -0,0 +1,20 @@ +# OpenapiClient::ListAuthorizationServers200ResponseInnerConfiguration + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **resource_identifier** | **String** | | [optional] | +| **audiences** | **Array<String>** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::ListAuthorizationServers200ResponseInnerConfiguration.new( + resource_identifier: null, + audiences: null +) +``` + diff --git a/docs/ListConditionOperators200ResponseInner.md b/docs/ListConditionOperators200ResponseInner.md new file mode 100644 index 0000000..b4d0932 --- /dev/null +++ b/docs/ListConditionOperators200ResponseInner.md @@ -0,0 +1,20 @@ +# OpenapiClient::ListConditionOperators200ResponseInner + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **name** | **String** | The name or description of the operator. | [optional] | +| **value** | **String** | The condition operator value to use when creating or updating App Rules. | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::ListConditionOperators200ResponseInner.new( + name: null, + value: null +) +``` + diff --git a/docs/ListConditionValues200ResponseInner.md b/docs/ListConditionValues200ResponseInner.md new file mode 100644 index 0000000..8ebfc12 --- /dev/null +++ b/docs/ListConditionValues200ResponseInner.md @@ -0,0 +1,20 @@ +# OpenapiClient::ListConditionValues200ResponseInner + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **name** | **String** | | [optional] | +| **value** | **String** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::ListConditionValues200ResponseInner.new( + name: null, + value: null +) +``` + diff --git a/docs/ListConditions200ResponseInner.md b/docs/ListConditions200ResponseInner.md new file mode 100644 index 0000000..8fb02b2 --- /dev/null +++ b/docs/ListConditions200ResponseInner.md @@ -0,0 +1,20 @@ +# OpenapiClient::ListConditions200ResponseInner + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **name** | **String** | The name of the Condition. | [optional] | +| **value** | **String** | The unique identifier of the condition. This should be used when defining conditions for a rule. | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::ListConditions200ResponseInner.new( + name: null, + value: null +) +``` + diff --git a/docs/ListMappingConditionOperators200ResponseInner.md b/docs/ListMappingConditionOperators200ResponseInner.md new file mode 100644 index 0000000..24da1cc --- /dev/null +++ b/docs/ListMappingConditionOperators200ResponseInner.md @@ -0,0 +1,20 @@ +# OpenapiClient::ListMappingConditionOperators200ResponseInner + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **name** | **String** | The name or description of the operator. | [optional] | +| **value** | **String** | The condition operator value to use when creating or updating User Mappings. | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::ListMappingConditionOperators200ResponseInner.new( + name: null, + value: null +) +``` + diff --git a/docs/ListMappingConditions200ResponseInner.md b/docs/ListMappingConditions200ResponseInner.md new file mode 100644 index 0000000..e9f5812 --- /dev/null +++ b/docs/ListMappingConditions200ResponseInner.md @@ -0,0 +1,20 @@ +# OpenapiClient::ListMappingConditions200ResponseInner + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **name** | **String** | The name of the Condition. | [optional] | +| **value** | **String** | The unique identifier of the condition. This should be used when defining conditions for a User Mapping. | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::ListMappingConditions200ResponseInner.new( + name: null, + value: null +) +``` + diff --git a/docs/ListScopes200ResponseInner.md b/docs/ListScopes200ResponseInner.md new file mode 100644 index 0000000..98760f6 --- /dev/null +++ b/docs/ListScopes200ResponseInner.md @@ -0,0 +1,22 @@ +# OpenapiClient::ListScopes200ResponseInner + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **Integer** | | [optional] | +| **value** | **String** | | [optional] | +| **description** | **String** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::ListScopes200ResponseInner.new( + id: null, + value: null, + description: null +) +``` + diff --git a/docs/Log.md b/docs/Log.md new file mode 100644 index 0000000..424426e --- /dev/null +++ b/docs/Log.md @@ -0,0 +1,24 @@ +# OpenapiClient::Log + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **request_id** | **String** | | [optional] | +| **correlation_id** | **String** | | [optional] | +| **created_at** | **String** | | [optional] | +| **events** | **Array<String>** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::Log.new( + request_id: null, + correlation_id: null, + created_at: null, + events: null +) +``` + diff --git a/docs/Mapping.md b/docs/Mapping.md new file mode 100644 index 0000000..d96913a --- /dev/null +++ b/docs/Mapping.md @@ -0,0 +1,30 @@ +# OpenapiClient::Mapping + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **Integer** | | [optional] | +| **name** | **String** | The name of the mapping. | | +| **enabled** | **Boolean** | Indicates if the mapping is enabled or not. | | +| **match** | **String** | Indicates how conditions should be matched. | | +| **position** | **Integer** | Indicates the order of the mapping. When `null` this will default to last position. | | +| **conditions** | [**Array<Condition>**](Condition.md) | An array of conditions that the user must meet in order for the mapping to be applied. | [optional] | +| **actions** | [**Array<Action>**](Action.md) | An array of actions that will be applied to the users that are matched by the conditions. | | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::Mapping.new( + id: null, + name: null, + enabled: null, + match: null, + position: null, + conditions: null, + actions: null +) +``` + diff --git a/docs/Registration.md b/docs/Registration.md new file mode 100644 index 0000000..781a080 --- /dev/null +++ b/docs/Registration.md @@ -0,0 +1,22 @@ +# OpenapiClient::Registration + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | Registration identifier. | [optional] | +| **status** | **String** | pending registration has not been completed successfully. accepted registration has successfully completed. | [optional] | +| **device_id** | **String** | Device id to be used with Verify the Factor. | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::Registration.new( + id: null, + status: null, + device_id: null +) +``` + diff --git a/docs/RemoveRoleUsersRequest.md b/docs/RemoveRoleUsersRequest.md new file mode 100644 index 0000000..628bea0 --- /dev/null +++ b/docs/RemoveRoleUsersRequest.md @@ -0,0 +1,18 @@ +# OpenapiClient::RemoveRoleUsersRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **user_id** | **Array<Integer>** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::RemoveRoleUsersRequest.new( + user_id: null +) +``` + diff --git a/docs/RevokeTokenRequest.md b/docs/RevokeTokenRequest.md new file mode 100644 index 0000000..49d81a6 --- /dev/null +++ b/docs/RevokeTokenRequest.md @@ -0,0 +1,18 @@ +# OpenapiClient::RevokeTokenRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **access_token** | **String** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::RevokeTokenRequest.new( + access_token: null +) +``` + diff --git a/docs/RiskDevice.md b/docs/RiskDevice.md new file mode 100644 index 0000000..9877424 --- /dev/null +++ b/docs/RiskDevice.md @@ -0,0 +1,18 @@ +# OpenapiClient::RiskDevice + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | This device's unique identifier | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::RiskDevice.new( + id: null +) +``` + diff --git a/docs/RiskRule.md b/docs/RiskRule.md new file mode 100644 index 0000000..0360bae --- /dev/null +++ b/docs/RiskRule.md @@ -0,0 +1,30 @@ +# OpenapiClient::RiskRule + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | | [optional] | +| **name** | **String** | The name of this rule | [optional] | +| **description** | **String** | | [optional] | +| **type** | **String** | The type parameter specifies the type of rule that will be created. | [optional] | +| **target** | **String** | The target parameter that will be used when evaluating the rule against an incoming event. | [optional] | +| **filters** | **Array<String>** | A list of IP addresses or country codes or names to evaluate against each event. | [optional] | +| **source** | [**Source**](Source.md) | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::RiskRule.new( + id: null, + name: null, + description: null, + type: null, + target: null, + filters: null, + source: null +) +``` + diff --git a/docs/RiskUser.md b/docs/RiskUser.md new file mode 100644 index 0000000..dbcaabf --- /dev/null +++ b/docs/RiskUser.md @@ -0,0 +1,22 @@ +# OpenapiClient::RiskUser + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | A unique identifier for the user. | | +| **name** | **String** | A name for the user. | [optional] | +| **authenticated** | **Boolean** | Indicates if the metadata supplied in this event should be considered as trusted for the user. | [optional][default to false] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::RiskUser.new( + id: null, + name: null, + authenticated: null +) +``` + diff --git a/docs/Role.md b/docs/Role.md new file mode 100644 index 0000000..efa33af --- /dev/null +++ b/docs/Role.md @@ -0,0 +1,26 @@ +# OpenapiClient::Role + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **Integer** | | [optional] | +| **name** | **String** | | | +| **apps** | **Array<Integer>** | | [optional] | +| **users** | **Array<Integer>** | | [optional] | +| **admins** | **Array<Integer>** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::Role.new( + id: null, + name: null, + apps: null, + users: null, + admins: null +) +``` + diff --git a/docs/Rule.md b/docs/Rule.md new file mode 100644 index 0000000..d25d92d --- /dev/null +++ b/docs/Rule.md @@ -0,0 +1,30 @@ +# OpenapiClient::Rule + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **Integer** | | [optional] | +| **name** | **String** | The name of the rule. | [optional] | +| **match** | **String** | Indicates how conditions should be matched. | [optional] | +| **enabled** | **Boolean** | Indicates if the rule is enabled or not. | [optional] | +| **position** | **Integer** | Indicates the order of the rule. When `null` this will default to last position. | [optional] | +| **conditions** | [**Array<Condition>**](Condition.md) | An array of conditions that the user must meet in order for the rule to be applied. | [optional] | +| **actions** | [**Array<Action>**](Action.md) | An array of actions that will be applied to the users that are matched by the conditions. | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::Rule.new( + id: null, + name: null, + match: null, + enabled: null, + position: null, + conditions: null, + actions: null +) +``` + diff --git a/docs/RuleId.md b/docs/RuleId.md new file mode 100644 index 0000000..37bfcd5 --- /dev/null +++ b/docs/RuleId.md @@ -0,0 +1,18 @@ +# OpenapiClient::RuleId + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **Integer** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::RuleId.new( + id: null +) +``` + diff --git a/docs/Schema.md b/docs/Schema.md new file mode 100644 index 0000000..72eba97 --- /dev/null +++ b/docs/Schema.md @@ -0,0 +1,56 @@ +# OpenapiClient::Schema + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **Integer** | Apps unique ID in OneLogin. | [optional] | +| **connector_id** | **Integer** | ID of the apps underlying connector. | [optional] | +| **name** | **String** | App name. | [optional] | +| **description** | **String** | Freeform description of the app. | [optional] | +| **notes** | **String** | Freeform notes about the app. | [optional] | +| **policy_id** | **Integer** | The security policy assigned to the app. | [optional] | +| **brand_id** | **Integer** | The custom login page branding to use for this app. Applies to app initiated logins via OIDC or SAML. | [optional] | +| **icon_url** | **String** | A link to the apps icon url. | [optional] | +| **visible** | **Boolean** | Indicates if the app is visible in the OneLogin portal. | [optional] | +| **auth_method** | **Integer** | An ID indicating the type of app. | [optional] | +| **tab_id** | **Integer** | ID of the OneLogin portal tab that the app is assigned to. | [optional] | +| **created_at** | **String** | The date the app was created. | [optional] | +| **updated_at** | **String** | The date the app was last updated. | [optional] | +| **role_ids** | **Array<Integer>** | List of Role IDs that are assigned to the app. On App Create or Update the entire array is replaced with the values provided. | [optional] | +| **allow_assumed_signin** | **Boolean** | Indicates whether or not administrators can access the app as a user that they have assumed control over. | [optional] | +| **provisioning** | [**SchemaProvisioning**](SchemaProvisioning.md) | | [optional] | +| **sso** | **Object** | | [optional] | +| **configuration** | **Object** | | [optional] | +| **parameters** | **Object** | | [optional] | +| **enforcement_point** | **Object** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::Schema.new( + id: null, + connector_id: null, + name: null, + description: null, + notes: null, + policy_id: null, + brand_id: null, + icon_url: null, + visible: null, + auth_method: null, + tab_id: null, + created_at: null, + updated_at: null, + role_ids: null, + allow_assumed_signin: null, + provisioning: null, + sso: null, + configuration: null, + parameters: null, + enforcement_point: null +) +``` + diff --git a/docs/Schema1.md b/docs/Schema1.md new file mode 100644 index 0000000..51654de --- /dev/null +++ b/docs/Schema1.md @@ -0,0 +1,28 @@ +# OpenapiClient::Schema1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **Integer** | | [optional] | +| **name** | **String** | | [optional] | +| **username** | **String** | | [optional] | +| **added_by** | [**Schema1AddedBy**](Schema1AddedBy.md) | | [optional] | +| **added_at** | **String** | | [optional] | +| **assigned** | **Boolean** | Indicates if assigned to role or not. Defaults to true. | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::Schema1.new( + id: null, + name: null, + username: null, + added_by: null, + added_at: null, + assigned: null +) +``` + diff --git a/docs/Schema1AddedBy.md b/docs/Schema1AddedBy.md new file mode 100644 index 0000000..cb01407 --- /dev/null +++ b/docs/Schema1AddedBy.md @@ -0,0 +1,20 @@ +# OpenapiClient::Schema1AddedBy + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **Integer** | | [optional] | +| **name** | **String** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::Schema1AddedBy.new( + id: null, + name: null +) +``` + diff --git a/docs/SchemaProvisioning.md b/docs/SchemaProvisioning.md new file mode 100644 index 0000000..cd7e853 --- /dev/null +++ b/docs/SchemaProvisioning.md @@ -0,0 +1,18 @@ +# OpenapiClient::SchemaProvisioning + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **enabled** | **Boolean** | Indicates if provisioning is enabled for this app. | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::SchemaProvisioning.new( + enabled: null +) +``` + diff --git a/docs/Session.md b/docs/Session.md new file mode 100644 index 0000000..ed5fc5b --- /dev/null +++ b/docs/Session.md @@ -0,0 +1,18 @@ +# OpenapiClient::Session + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | If you use a database to track sessions, you can send us the session ID. | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::Session.new( + id: null +) +``` + diff --git a/docs/SetRoleApps200ResponseInner.md b/docs/SetRoleApps200ResponseInner.md new file mode 100644 index 0000000..3319c02 --- /dev/null +++ b/docs/SetRoleApps200ResponseInner.md @@ -0,0 +1,18 @@ +# OpenapiClient::SetRoleApps200ResponseInner + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **Integer** | Apps unique ID in OneLogin. | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::SetRoleApps200ResponseInner.new( + id: null +) +``` + diff --git a/docs/Source.md b/docs/Source.md new file mode 100644 index 0000000..4a1065e --- /dev/null +++ b/docs/Source.md @@ -0,0 +1,20 @@ +# OpenapiClient::Source + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | | [optional] | +| **name** | **String** | The name of the source | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::Source.new( + id: null, + name: null +) +``` + diff --git a/docs/Status.md b/docs/Status.md new file mode 100644 index 0000000..05d1f6d --- /dev/null +++ b/docs/Status.md @@ -0,0 +1,24 @@ +# OpenapiClient::Status + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **error** | **Boolean** | | [optional] | +| **code** | **Integer** | | [optional] | +| **type** | **String** | | [optional] | +| **message** | **String** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::Status.new( + error: null, + code: null, + type: null, + message: null +) +``` + diff --git a/docs/Status1.md b/docs/Status1.md new file mode 100644 index 0000000..447ca91 --- /dev/null +++ b/docs/Status1.md @@ -0,0 +1,22 @@ +# OpenapiClient::Status1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **message** | **String** | | [optional] | +| **status_code** | **Integer** | | [optional] | +| **name** | **String** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::Status1.new( + message: null, + status_code: null, + name: null +) +``` + diff --git a/docs/Status2.md b/docs/Status2.md new file mode 100644 index 0000000..0053541 --- /dev/null +++ b/docs/Status2.md @@ -0,0 +1,18 @@ +# OpenapiClient::Status2 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **status** | [**Status2Status**](Status2Status.md) | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::Status2.new( + status: null +) +``` + diff --git a/docs/Status2Status.md b/docs/Status2Status.md new file mode 100644 index 0000000..b312be5 --- /dev/null +++ b/docs/Status2Status.md @@ -0,0 +1,24 @@ +# OpenapiClient::Status2Status + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **type** | **String** | | [optional] | +| **code** | **Integer** | | [optional] | +| **message** | **String** | | [optional] | +| **error** | **Boolean** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::Status2Status.new( + type: null, + code: null, + message: null, + error: null +) +``` + diff --git a/docs/TrackEventRequest.md b/docs/TrackEventRequest.md new file mode 100644 index 0000000..e828492 --- /dev/null +++ b/docs/TrackEventRequest.md @@ -0,0 +1,34 @@ +# OpenapiClient::TrackEventRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **verb** | **String** | Verbs are used to distinguish between different types of events. | | +| **ip** | **String** | The IP address of the User's request. | | +| **user_agent** | **String** | The user agent of the User's request. | | +| **user** | [**RiskUser**](RiskUser.md) | | | +| **source** | [**Source**](Source.md) | | [optional] | +| **session** | [**Session**](Session.md) | | [optional] | +| **device** | [**RiskDevice**](RiskDevice.md) | | [optional] | +| **fp** | **String** | Set to the value of the __tdli_fp cookie. | [optional] | +| **published** | **String** | Date and time of the event in IS08601 format. Useful for preloading old events. Defaults to date time this API request is received. | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::TrackEventRequest.new( + verb: null, + ip: null, + user_agent: null, + user: null, + source: null, + session: null, + device: null, + fp: null, + published: null +) +``` + diff --git a/docs/UpdateAuthorizationServer400Response.md b/docs/UpdateAuthorizationServer400Response.md new file mode 100644 index 0000000..e5c171f --- /dev/null +++ b/docs/UpdateAuthorizationServer400Response.md @@ -0,0 +1,24 @@ +# OpenapiClient::UpdateAuthorizationServer400Response + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **field** | **String** | | [optional] | +| **message** | **String** | | [optional] | +| **status_code** | **Integer** | | [optional] | +| **name** | **String** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::UpdateAuthorizationServer400Response.new( + field: null, + message: null, + status_code: null, + name: null +) +``` + diff --git a/docs/UpdateClientAppRequest.md b/docs/UpdateClientAppRequest.md new file mode 100644 index 0000000..53f19a4 --- /dev/null +++ b/docs/UpdateClientAppRequest.md @@ -0,0 +1,18 @@ +# OpenapiClient::UpdateClientAppRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **scopes** | **Array<Integer>** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::UpdateClientAppRequest.new( + scopes: null +) +``` + diff --git a/docs/UpdateEnvironmentVariableRequest.md b/docs/UpdateEnvironmentVariableRequest.md new file mode 100644 index 0000000..9268b30 --- /dev/null +++ b/docs/UpdateEnvironmentVariableRequest.md @@ -0,0 +1,18 @@ +# OpenapiClient::UpdateEnvironmentVariableRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **value** | **String** | The secret value that will be encrypted at rest and injected in applicable hook functions at run time. | | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::UpdateEnvironmentVariableRequest.new( + value: null +) +``` + diff --git a/docs/UpdateRole200Response.md b/docs/UpdateRole200Response.md new file mode 100644 index 0000000..569bf8b --- /dev/null +++ b/docs/UpdateRole200Response.md @@ -0,0 +1,18 @@ +# OpenapiClient::UpdateRole200Response + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **Integer** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::UpdateRole200Response.new( + id: null +) +``` + diff --git a/docs/User.md b/docs/User.md new file mode 100644 index 0000000..cbfd568 --- /dev/null +++ b/docs/User.md @@ -0,0 +1,90 @@ +# OpenapiClient::User + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **Integer** | | [optional] | +| **username** | **String** | A username for the user. | [optional] | +| **email** | **String** | A valid email for the user. | [optional] | +| **firstname** | **String** | The user's first name. | [optional] | +| **lastname** | **String** | The user's last name. | [optional] | +| **title** | **String** | The user's job title. | [optional] | +| **department** | **String** | The user's department. | [optional] | +| **company** | **String** | The user's company. | [optional] | +| **comment** | **String** | Free text related to the user. | [optional] | +| **group_id** | **Integer** | The ID of the Group in OneLogin that the user is assigned to. | [optional] | +| **role_ids** | **Array<Integer>** | A list of OneLogin Role IDs of the user | [optional] | +| **phone** | **String** | The E.164 format phone number for a user. | [optional] | +| **state** | **Integer** | | [optional] | +| **status** | **Integer** | | [optional] | +| **directory_id** | **Integer** | The ID of the OneLogin Directory of the user. | [optional] | +| **trusted_idp_id** | **Integer** | The ID of the OneLogin Trusted IDP of the user. | [optional] | +| **manager_ad_id** | **String** | The ID of the user's manager in Active Directory. | [optional] | +| **manager_user_id** | **String** | The OneLogin User ID for the user's manager. | [optional] | +| **samaccount_name** | **String** | The user's Active Directory username. | [optional] | +| **member_of** | **String** | The user's directory membership. | [optional] | +| **userprincipalname** | **String** | The principle name of the user. | [optional] | +| **distinguished_name** | **String** | The distinguished name of the user. | [optional] | +| **external_id** | **String** | The ID of the user in an external directory. | [optional] | +| **activated_at** | **String** | | [optional] | +| **last_login** | **String** | | [optional] | +| **invitation_sent_at** | **String** | | [optional] | +| **updated_at** | **String** | | [optional] | +| **preferred_locale_code** | **String** | | [optional] | +| **created_at** | **String** | | [optional] | +| **custom_attributes** | **Object** | | [optional] | +| **invalid_login_attempts** | **Integer** | | [optional] | +| **locked_until** | **String** | | [optional] | +| **password_changed_at** | **String** | | [optional] | +| **password** | **String** | The password to set for a user. | [optional] | +| **password_confirmation** | **String** | Required if the password is being set. | [optional] | +| **password_algorithm** | **String** | Use this when importing a password that's already hashed. Prepend the salt value to the cleartext password value before SHA-256-encoding it | [optional] | +| **salt** | **String** | The salt value used with the password_algorithm. | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::User.new( + id: null, + username: null, + email: null, + firstname: null, + lastname: null, + title: null, + department: null, + company: null, + comment: null, + group_id: null, + role_ids: null, + phone: null, + state: null, + status: null, + directory_id: null, + trusted_idp_id: null, + manager_ad_id: null, + manager_user_id: null, + samaccount_name: null, + member_of: null, + userprincipalname: null, + distinguished_name: null, + external_id: null, + activated_at: null, + last_login: null, + invitation_sent_at: null, + updated_at: null, + preferred_locale_code: null, + created_at: null, + custom_attributes: null, + invalid_login_attempts: null, + locked_until: null, + password_changed_at: null, + password: null, + password_confirmation: null, + password_algorithm: null, + salt: null +) +``` + diff --git a/docs/VerifyEnrollmentRequest.md b/docs/VerifyEnrollmentRequest.md new file mode 100644 index 0000000..a93fd1d --- /dev/null +++ b/docs/VerifyEnrollmentRequest.md @@ -0,0 +1,18 @@ +# OpenapiClient::VerifyEnrollmentRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **otp** | **Integer** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::VerifyEnrollmentRequest.new( + otp: null +) +``` + diff --git a/docs/VerifyFactorRequest.md b/docs/VerifyFactorRequest.md new file mode 100644 index 0000000..dc5dd13 --- /dev/null +++ b/docs/VerifyFactorRequest.md @@ -0,0 +1,20 @@ +# OpenapiClient::VerifyFactorRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **otp** | **String** | OTP code provided by the device or SMS message sent to user. | [optional] | +| **device_id** | **Integer** | ID of the specified device which has been registerd for the given user. | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::VerifyFactorRequest.new( + otp: null, + device_id: null +) +``` + diff --git a/docs/VerifyFactorSaml200Response.md b/docs/VerifyFactorSaml200Response.md new file mode 100644 index 0000000..95a2b7c --- /dev/null +++ b/docs/VerifyFactorSaml200Response.md @@ -0,0 +1,20 @@ +# OpenapiClient::VerifyFactorSaml200Response + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **data** | **String** | Provides the SAML assertion. | [optional] | +| **message** | **String** | Plain text description describing the outcome of the response. | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::VerifyFactorSaml200Response.new( + data: null, + message: null +) +``` + diff --git a/docs/VerifyFactorSamlRequest.md b/docs/VerifyFactorSamlRequest.md new file mode 100644 index 0000000..fb75307 --- /dev/null +++ b/docs/VerifyFactorSamlRequest.md @@ -0,0 +1,26 @@ +# OpenapiClient::VerifyFactorSamlRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **app_id** | **String** | App ID of the app for which you want to generate a SAML token. This is the app ID in OneLogin. | | +| **device_id** | **String** | Provide the MFA device_id you are submitting for verification. The device_id is supplied by the Generate SAML Assertion API. | | +| **state_token** | **String** | state_token associated with the MFA device_id you are submitting. The state_token is supplied by the Generate SAML Assertion API. | | +| **otp_token** | **String** | Provide the OTP value for the MFA factor you are submitting for verification. | [optional] | +| **do_not_notify** | **Boolean** | When verifying MFA via Protect Push, set this to true to stop additional push notifications being sent to the OneLogin Protect device. | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::VerifyFactorSamlRequest.new( + app_id: null, + device_id: null, + state_token: null, + otp_token: null, + do_not_notify: null +) +``` + diff --git a/docs/VerifyFactorVoice200ResponseInner.md b/docs/VerifyFactorVoice200ResponseInner.md new file mode 100644 index 0000000..f0f0717 --- /dev/null +++ b/docs/VerifyFactorVoice200ResponseInner.md @@ -0,0 +1,22 @@ +# OpenapiClient::VerifyFactorVoice200ResponseInner + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | | [optional] | +| **status** | **String** | | [optional] | +| **device_id** | **String** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::VerifyFactorVoice200ResponseInner.new( + id: null, + status: null, + device_id: null +) +``` + diff --git a/examples/Gemfile b/examples/Gemfile deleted file mode 100644 index c41ec55..0000000 --- a/examples/Gemfile +++ /dev/null @@ -1,3 +0,0 @@ -source 'https://rubygems.org' - -gem 'onelogin' \ No newline at end of file diff --git a/examples/Gemfile.lock b/examples/Gemfile.lock deleted file mode 100644 index b15358d..0000000 --- a/examples/Gemfile.lock +++ /dev/null @@ -1,25 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - httparty (0.18.0) - mime-types (~> 3.0) - multi_xml (>= 0.5.2) - mime-types (3.3.1) - mime-types-data (~> 3.2015) - mime-types-data (3.2020.0425) - mini_portile2 (2.4.0) - multi_xml (0.6.0) - nokogiri (1.10.9) - mini_portile2 (~> 2.4.0) - onelogin (1.6.0) - httparty (>= 0.13.7) - nokogiri (>= 1.6.3.1) - -PLATFORMS - ruby - -DEPENDENCIES - onelogin - -BUNDLED WITH - 2.1.4 diff --git a/examples/README.md b/examples/README.md deleted file mode 100644 index 4b400f2..0000000 --- a/examples/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# Ruby SDK Examples - -This folder contains various samples that make use of the OneLogin -Ruby SDK. - -It assumes that you have a valid OneLogin `client_id` and `client_secret` -with the appropriate level of access for each example. - -## Try the examples in terminal - -First install the OneLogin gem and any other required gems -```shell -bundle install -``` - -Then update your API credentials in the example file and run it -```shell -ruby create-user.rb -``` diff --git a/examples/all-users-to-csv.rb b/examples/all-users-to-csv.rb deleted file mode 100644 index fd15912..0000000 --- a/examples/all-users-to-csv.rb +++ /dev/null @@ -1,48 +0,0 @@ -require 'onelogin' - -# -# This example shows how you can export user details from OneLogin using the Ruby SDK -# -# Usage: -# 1. Set your own CLIENT_ID and CLIENT_SECRET below -# 2. From terminal run "ruby all-users-to-csv.rb" to extract all users including -# any custom attributes that might have been defined for the each user -# - -client = OneLogin::Api::Client.new( - client_id: 'ONELOGIN_CLIENT_ID', - client_secret:'ONELOGIN_CLIENT_SECRET', - region: 'us', - max_results: 50000 -) - -attribute_names = ['id', 'external_id', 'email', 'username', 'firstname', 'lastname', 'distinguished_name', - 'phone', 'company', 'department', 'status', 'member_of', 'samaccountname', 'userprincipalname', - 'group_id', 'role_ids', 'custom_attributes', 'openid_name', 'locale_code', 'comment', 'directory_id', - 'manager_ad_id', 'trusted_idp_id', 'activated_at', 'created_at', 'updated_at', - 'password_changed_at', 'invitation_sent_at', 'invalid_login_attempts', 'last_login', 'locked_until'] - -custom_attribute_names = client.get_custom_attributes - -CSV.open('users.csv', 'wb') do |csv| - # header row - csv << attribute_names + custom_attribute_names - - client.get_users.each do |user| - - row = [] - - # standard attributes - attribute_names.each do |attribute_name| - row << user.send(attribute_name) - end - - # custom attributes - custom_attribute_names.each do |attribute_name| - row << user.custom_attributes[attribute_name] unless user.custom_attributes.empty? - end - - csv << row - end -end - diff --git a/examples/another-get-all-login-events-of-last-day-to-csv.rb b/examples/another-get-all-login-events-of-last-day-to-csv.rb deleted file mode 100644 index a0f4c24..0000000 --- a/examples/another-get-all-login-events-of-last-day-to-csv.rb +++ /dev/null @@ -1,141 +0,0 @@ -require 'onelogin' - -client = OneLogin::Api::Client.new( - client_id: '9a19e9b07257c30ed3eddc0f9cf8d4127b4387646940acc8432c0dbcbd5f0c0d', - client_secret: 'd5cfcbe70b626f1d131f632c398b5b0d60dbc149b9ad9a55ac33715c7239acf7', - region: 'us', - max_results: 50000 -) - -client.access_token - -unless client.error.nil? - puts "Error #{client.error} #{client.error_description}" - exit -end - - -user_attribute_names = ['id', 'username', 'email'] -event_attribute_names = ['created_at', 'user_id', 'user_name', 'ipaddr', 'app_id', 'app_name'] -csv_event_header = ['Timestamp', 'Description', 'Username', 'App', 'IP Address', 'User Id', 'Email', 'App Id'] - -user_options = {} -user_options[:fields] = user_attribute_names.join(",") - - -now = Date.today -days_ago = (now - 1) -event_options = {} -event_options[:since] = days_ago.strftime('%Y-%m-%dT%H:%M:%SZ') -event_options[:event_type_id] = 8; -event_options[:fields] = event_attribute_names.join(",") -event_options[:sort] = "-created_at" - -now_str = Time.now.strftime("%Y-%m-%d_%H-%M-%S") -login_app_event_csv_name = now_str + '_login_app_events.csv' -login_event_csv_name = now_str + '_login_events.csv' -radius_event_csv_name = now_str + '_radius_events.csv' - -users = {} -counter = 0 - -rate_limits = client.get_rate_limits -remaining_before = rate_limits.remaining -puts "Remaining RateLimit: #{remaining_before}" - -puts "Extracting users from OneLogin" - -client.get_users(user_options).each do |user| - users[user.id] = user - counter +=1 -end -puts "#{counter} users extracted" - -csv_login_app_event_header = ['Timestamp', 'Description', 'Username', 'App', 'IP Address', 'User Id', 'App Id', 'Email'] -csv_login_event_header = ['Timestamp', 'Description', 'Username', 'IP Address', 'User Id', 'Email'] - -puts "Extracting login app events from OneLogin" -counter = 0 -CSV.open(login_app_event_csv_name, 'wb') do |csv| - # header row - csv << csv_login_app_event_header - - # fetch the events - client.get_events(event_options).each do |event| - username = email = "" - description = "#{event.user_name} signed into #{event.app_name}" - unless users.nil? - if users.has_key?(event.user_id) - username = users[event.user_id].username - email = users[event.user_id].email - end - end - csv << [event.created_at, description, username, event.app_name, event.ipaddr, event.user_id, event.app_id, email] - counter +=1 - end -end -puts "Exported #{counter} login app events to #{login_app_event_csv_name}" - -rate_limits = client.get_rate_limits -remaining_after = rate_limits.remaining -puts "Remaining RateLimit: #{remaining_after}" - - -event_options[:event_type_id] = 5; -puts "Extracting login events from OneLogin" -counter = 0 -CSV.open(login_event_csv_name, 'wb') do |csv| - # header row - csv << csv_login_event_header - - # fetch the events - client.get_events(event_options).each do |event| - username = email = "" - description = "#{event.user_name} logged into OneLogin" - unless users.nil? - if users.has_key?(event.user_id) - username = users[event.user_id].username - email = users[event.user_id].email - end - end - csv << [event.created_at, description, username, event.ipaddr, event.user_id, email] - counter +=1 - end -end -puts "Exported #{counter} login events to #{login_event_csv_name}" - -rate_limits = client.get_rate_limits -remaining_after = rate_limits.remaining -puts "Remaining RateLimit: #{remaining_after}" - - -event_options[:event_type_id] = 68; -puts "Extracting login radius events from OneLogin" -counter = 0 -CSV.open(radius_event_csv_name, 'wb') do |csv| - # header row - csv << csv_login_event_header - - # fetch the events - client.get_events(event_options).each do |event| - username = email = "" - description = "#{event.user_name} logged via Radius" - unless users.nil? - if users.has_key?(event.user_id) - username = users[event.user_id].username - email = users[event.user_id].email - end - end - csv << [event.created_at, description, username, event.ipaddr, event.user_id, email] - counter +=1 - end -end -puts "Exported #{counter} radius events to #{radius_event_csv_name}" - -rate_limits = client.get_rate_limits -remaining_after = rate_limits.remaining -puts "Remaining RateLimit: #{remaining_after}" - - -consumed = remaining_before - remaining_after -puts "The script consumed #{consumed} calls" diff --git a/examples/create-user.rb b/examples/create-user.rb deleted file mode 100644 index cb0fb7a..0000000 --- a/examples/create-user.rb +++ /dev/null @@ -1,16 +0,0 @@ -require 'onelogin' - -client = OneLogin::Api::Client.new( - client_id: 'ONELOGIN_CLIENT_ID', - client_secret:'ONELOGIN_CLIENT_SECRET', - region: 'us' -) - -user = client.create_user( - firstname: "Mick", - lastname: "Fanning", - email: "mick@onelogin.com", - username: "mick" -) - -puts user \ No newline at end of file diff --git a/examples/events-to-csv.rb b/examples/events-to-csv.rb deleted file mode 100644 index bdce8e1..0000000 --- a/examples/events-to-csv.rb +++ /dev/null @@ -1,93 +0,0 @@ -require 'onelogin' -require 'optparse' -require 'optparse/time' - -# -# This example shows how you can export events from OneLogin using the Ruby SDK -# -# Usage: -# 1. Set your own CLIENT_ID and CLIENT_SECRET below -# 2. From terminal run "ruby events-to-csv.rb" for the last 1000 events -# 3. Use the command line args to filter events -# -# e.g. "ruby events-to-csv.rb -t 5 -s 2018-01-01" for login events since Jan 1 2018 -# - - -# Parse CLI arguments -options = {} - -OptionParser.new do |opts| - opts.banner = "Usage: events-to-csv.rb [options]" - - opts.on("-sSINCE", "--since=SINCE", Time, "Events after this date") do |s| - options[:since] = s.iso8601 - end - - opts.on("-dLAST", "--last=LAST", Integer, "Events since this many days ago") do |d| - now = Date.today - days_ago = (now - d) - options[:since] = days_ago.strftime('%Y-%m-%dT%H:%M:%SZ') - end - - opts.on("-bUNTIL", "--until=UNTIL", Time, "Events before this date") do |u| - options[:until] = u.iso8601 - end - - opts.on("-lLIMIT", "--limit=LIMIT", Integer, "Only return this many events, Default 1000") do |l| - options[:limit] = l - end - - opts.on("-tTYPE", "--type=TYPE", Integer, "Filter by event type id") do |t| - options[:event_type_id] = t - end - - opts.on("-uUSER", "--user=USER", Integer, "Filter by user id") do |u| - options[:user_id] = u - end - - # Sort direction is done by adding a + or - before the field name that you want to sort on - opts.on("-zSORT", "--sort=SORT", String, "Sort by this field") do |s| - options[:sort] = s - end -end.parse! - -# Fetch the events -client = OneLogin::Api::Client.new( - client_id: 'ONELOGIN_CLIENT_ID_GOES_HERE', - client_secret: 'ONELOGIN_CLIENT_SECRET_GOES_HERE', - region: 'us' -) - -attribute_names = ['id', 'created_at', 'account_id', 'user_id', 'user_name', 'event_type_id', - 'notes', 'ipaddr', 'actor_user_id', 'actor_user_name', 'assuming_acting_user_id', - 'role_id', 'role_name', 'app_id', 'app_name', 'group_id', 'group_name', 'otp_device_id', - 'otp_device_name', 'policy_id', 'policy_name', 'actor_system', 'custom_message', - 'operation_name', 'directory_sync_run_id', 'directory_id', 'resolution', 'client_id', - 'resource_type_id', 'error_description', 'risk_score', 'risk_reasons', 'risk_cookie_id', 'browser_fingerprint'] - -counter = 0 -limit = options[:limit] || 1000 - -# We remove limit from options parsed to the api as we want to fetch -# the max number of records possible and then use the cursor that is -# built into the ruby sdk to limit the results -options.delete(:limit) - -CSV.open('events.csv', 'wb') do |csv| - puts "Exporting events to events.csv" - - # header row - csv << attribute_names - - # fetch the events - client.get_events(options).take(limit).each do |event| - csv << attribute_names.map { |attribute_name| event.send(attribute_name) if event.respond_to?(attribute_name) } - counter += 1 - end -end - -puts "Exported #{counter} events to events.csv" - - - diff --git a/examples/get-all-login-events-of-last-day-to-csv.rb b/examples/get-all-login-events-of-last-day-to-csv.rb deleted file mode 100644 index 18da1aa..0000000 --- a/examples/get-all-login-events-of-last-day-to-csv.rb +++ /dev/null @@ -1,88 +0,0 @@ -require 'onelogin' - -# -# This example shows how you can export user details from OneLogin using the Ruby SDK -# -# Usage: -# 1. Set your own CLIENT_ID and CLIENT_SECRET below -# 2. From terminal run "ruby all-users-to-csv.rb" to extract all users including -# any custom attributes that might have been defined for the each user -# - -#client = OneLogin::Api::Client.new( -# client_id: 'ONELOGIN_CLIENT_ID', -# client_secret:'ONELOGIN_CLIENT_SECRET', -# region: 'us', -# max_results: 50000 -#) -client = OneLogin::Api::Client.new( - client_id: 'ONELOGIN_CLIENT_ID_GOES_HERE', - client_secret: 'ONELOGIN_CLIENT_SECRET_GOES_HERE', - region: 'us', - max_results: 50000 -) - - -user_attribute_names = ['id', 'username', 'email'] -event_attribute_names = ['created_at', 'user_id', 'user_name', 'ipaddr', 'app_id', 'app_name'] -csv_event_header = ['Timestamp', 'Description', 'Username', 'App', 'IP Address', 'User Id', 'Email', 'App Id'] - -user_options = {} -user_options[:fields] = user_attribute_names.join(",") - - -now = Date.today -days_ago = (now - 1) -event_options = {} -event_options[:since] = days_ago.strftime('%Y-%m-%dT%H:%M:%SZ') -event_options[:event_type_id] = 8; -event_options[:fields] = event_attribute_names.join(",") -event_options[:sort] = "-created_at" - -now_str = Time.now.strftime("%Y-%m-%d_%H-%M-%S") -event_csv_name = now_str + '_events.csv' - -users = {} -counter = 0 - -rate_limits = client.get_rate_limits -remaining_before = rate_limits.remaining -puts "Remaining RateLimit: #{remaining_before}" - -puts "Extracting users from OneLogin" - -client.get_users(user_options).each do |user| - users[user.id] = user - counter +=1 -end -puts "#{counter} users extracted" - -puts "Extracting events from OneLogin" -csv_event_header = ['Timestamp', 'Description', 'Username', 'App', 'IP Address', 'User Id', 'App Id', 'Email'] -counter = 0 -CSV.open(event_csv_name, 'wb') do |csv| - # header row - csv << csv_event_header - - # fetch the events - client.get_events(event_options).each do |event| - username = email = "" - description = "#{event.user_name} signed into #{event.app_name}" - unless users.nil? - if users.has_key?(event.user_id) - username = users[event.user_id].username - email = users[event.user_id].email - end - end - csv << [event.created_at, description, username, event.app_name, event.ipaddr, event.user_id, event.app_id, email] - counter +=1 - end -end -puts "Exported #{counter} events to events.csv" - -rate_limits = client.get_rate_limits -remaining_after = rate_limits.remaining -puts "Remaining RateLimit: #{remaining_after}" - -consumed = remaining_before - remaining_after -puts "The script consumed #{consumed} calls" diff --git a/examples/last-app-user-login-to-csv.rb b/examples/last-app-user-login-to-csv.rb deleted file mode 100644 index 80ab9f7..0000000 --- a/examples/last-app-user-login-to-csv.rb +++ /dev/null @@ -1,72 +0,0 @@ -require 'onelogin' -require 'optparse' -require 'optparse/time' - -# -# This generates a report listing the last login date for all users who have logged into a specified app in the last x days. -# -# Usage: -# 1. Set your own CLIENT_ID and CLIENT_SECRET below -# 2. From terminal run "ruby last-app-user-login-to-csv.rb" -# 3. Use the command line args to filter events -# -# e.g. "ruby last-app-user-login-to-csv.rb -l 90" for last 90 days -# - - -# Parse CLI arguments -options = { - event_type_id: 8, # User Logged into an App - sort: '-created_at' -} - -OptionParser.new do |opts| - opts.banner = "Usage: last-app-user-login-to-csv.rb [options]" - - opts.on("-lLAST", "--LAST=LAST", Integer, "Events since this many days ago") do |d| - now = Date.today - days_ago = (now - d) - options[:since] = days_ago.strftime('%Y-%m-%dT%H:%M:%SZ') - end - -end.parse! - -client = OneLogin::Api::Client.new( - client_id: 'ONELOGIN_CLIENT_ID_GOES_HERE', - client_secret: 'ONELOGIN_CLIENT_SECRET_GOES_HERE', - region: 'us', - max_results: 50000 -) - -counter = 0 - -logins = {} - -# build a hash from events which contains user_id and latest login date -client.get_events(options).each do |event| - key = "#{event.app_id}-#{event.user_id}" - - unless logins[key] - logins[key] = { - app_id: event.app_id, - app_name: event.app_name, - user_id: event.user_id, - user_name: event.user_name, - last_login_at: event.created_at - } - end -end - -CSV.open('last-login-by-app.csv', 'wb') do |csv| - puts "Exporting user logins to last-login-by-app.csv" - - # header row - csv << ['app_id', 'app_name', 'user_id', 'user_name', 'last_login_at'] - - logins.each do |login| - csv << login[1].values - counter += 1 - end -end - -puts "Exported #{counter} user logins to last-login-by-app.csv" diff --git a/examples/list-users.rb b/examples/list-users.rb deleted file mode 100644 index b02d58d..0000000 --- a/examples/list-users.rb +++ /dev/null @@ -1,15 +0,0 @@ -require 'onelogin' - -client = OneLogin::Api::Client.new( - client_id: 'ONELOGIN_CLIENT_ID', - client_secret:'ONELOGIN_CLIENT_SECRET', - region: 'us' -) - -# List all of the users in your account -# the sdk uses a cursor to keep requesting -# chunks of users as you loop through - -client.get_users.each do |user| - puts "#{user.id} - #{user.firstname} - #{user.email}" -end \ No newline at end of file diff --git a/examples/rails-custom-login-page/.gitignore b/examples/rails-custom-login-page/.gitignore deleted file mode 100644 index ca21237..0000000 --- a/examples/rails-custom-login-page/.gitignore +++ /dev/null @@ -1,45 +0,0 @@ -*.rbc -capybara-*.html -.rspec -/log -/tmp -/db/*.sqlite3 -/db/*.sqlite3-journal -/public/system -/coverage/ -/spec/tmp -*.orig -rerun.txt -pickle-email-*.html - - -# TODO Comment out this rule if you are OK with secrets being uploaded to the repo -config/initializers/secret_token.rb - -# Only include if you have production secrets in this file, which is no longer a Rails default -config/secrets.yml - -# dotenv -# TODO Comment out this rule if environment variables can be committed -.env - -## Environment normalization: -/.bundle -/vendor/bundle - -# these should all be checked in to normalize the environment: -Gemfile.lock, .ruby-version, .ruby-gemset - -# unless supporting rvm < 1.11.0 or doing something fancy, ignore this: -.rvmrc - -# if using bower-rails ignore default bower_components path bower.json files -/vendor/assets/bower_components -*.bowerrc -bower.json - -# Ignore pow environment settings -.powenv - -# Ignore Byebug command history file. -.byebug_history diff --git a/examples/rails-custom-login-page/.ruby-version b/examples/rails-custom-login-page/.ruby-version deleted file mode 100644 index 21bb5e1..0000000 --- a/examples/rails-custom-login-page/.ruby-version +++ /dev/null @@ -1 +0,0 @@ -2.2.5 diff --git a/examples/rails-custom-login-page/Gemfile b/examples/rails-custom-login-page/Gemfile deleted file mode 100644 index ef1038a..0000000 --- a/examples/rails-custom-login-page/Gemfile +++ /dev/null @@ -1,57 +0,0 @@ -source 'https://rubygems.org' - -git_source(:github) do |repo_name| - repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/") - "https://github.com/#{repo_name}.git" -end - - -# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' -gem 'rails', '~> 5.1.4' -# Use sqlite3 as the database for Active Record -gem 'sqlite3' -# Use Puma as the app server -gem 'puma', '~> 3.12' -# Use SCSS for stylesheets -gem 'sass-rails', '~> 5.0' -# Use Uglifier as compressor for JavaScript assets -gem 'uglifier', '>= 1.3.0' -# See https://github.com/rails/execjs#readme for more supported runtimes -# gem 'therubyracer', platforms: :ruby - -# Use CoffeeScript for .coffee assets and views -gem 'coffee-rails', '~> 4.2' -# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks -gem 'turbolinks', '~> 5' -# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder -gem 'jbuilder', '~> 2.5' -# Use Redis adapter to run Action Cable in production -# gem 'redis', '~> 3.0' -# Use ActiveModel has_secure_password -# gem 'bcrypt', '~> 3.1.7' - -# Use Capistrano for deployment -# gem 'capistrano-rails', group: :development - -gem 'onelogin', '~> 1.6.0' -gem 'jquery-rails' - -group :development, :test do - # Call 'byebug' anywhere in the code to stop execution and get a debugger console - gem 'byebug', platforms: [:mri, :mingw, :x64_mingw] - # Adds support for Capybara system testing and selenium driver - gem 'capybara', '~> 2.13' - gem 'selenium-webdriver' -end - -group :development do - # Access an IRB console on exception pages or by using <%= console %> anywhere in the code. - gem 'web-console', '>= 3.3.0' - gem 'listen', '>= 3.0.5', '< 3.2' - # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring - gem 'spring' - gem 'spring-watcher-listen', '~> 2.0.0' -end - -# Windows does not include zoneinfo files, so bundle the tzinfo-data gem -gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] diff --git a/examples/rails-custom-login-page/Gemfile.lock b/examples/rails-custom-login-page/Gemfile.lock deleted file mode 100644 index 4f83961..0000000 --- a/examples/rails-custom-login-page/Gemfile.lock +++ /dev/null @@ -1,212 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - actioncable (5.1.5) - actionpack (= 5.1.5) - nio4r (~> 2.0) - websocket-driver (~> 0.6.1) - actionmailer (5.1.5) - actionpack (= 5.1.5) - actionview (= 5.1.5) - activejob (= 5.1.5) - mail (~> 2.5, >= 2.5.4) - rails-dom-testing (~> 2.0) - actionpack (5.1.5) - actionview (= 5.1.5) - activesupport (= 5.1.5) - rack (~> 2.0) - rack-test (>= 0.6.3) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (5.1.5) - activesupport (= 5.1.5) - builder (~> 3.1) - erubi (~> 1.4) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.0.3) - activejob (5.1.5) - activesupport (= 5.1.5) - globalid (>= 0.3.6) - activemodel (5.1.5) - activesupport (= 5.1.5) - activerecord (5.1.5) - activemodel (= 5.1.5) - activesupport (= 5.1.5) - arel (~> 8.0) - activesupport (5.1.5) - concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (~> 0.7) - minitest (~> 5.1) - tzinfo (~> 1.1) - addressable (2.5.2) - public_suffix (>= 2.0.2, < 4.0) - arel (8.0.0) - bindex (0.5.0) - builder (3.2.3) - byebug (10.0.1) - capybara (2.18.0) - addressable - mini_mime (>= 0.1.3) - nokogiri (>= 1.3.3) - rack (>= 1.0.0) - rack-test (>= 0.5.4) - xpath (>= 2.0, < 4.0) - childprocess (0.9.0) - ffi (~> 1.0, >= 1.0.11) - coffee-rails (4.2.2) - coffee-script (>= 2.2.0) - railties (>= 4.0.0) - coffee-script (2.4.1) - coffee-script-source - execjs - coffee-script-source (1.12.2) - concurrent-ruby (1.1.5) - crass (1.0.5) - erubi (1.7.1) - execjs (2.7.0) - ffi (1.11.1) - globalid (0.4.1) - activesupport (>= 4.2.0) - httparty (0.18.1) - mime-types (~> 3.0) - multi_xml (>= 0.5.2) - i18n (0.9.5) - concurrent-ruby (~> 1.0) - jbuilder (2.7.0) - activesupport (>= 4.2.0) - multi_json (>= 1.2) - jquery-rails (4.3.1) - rails-dom-testing (>= 1, < 3) - railties (>= 4.2.0) - thor (>= 0.14, < 2.0) - listen (3.1.5) - rb-fsevent (~> 0.9, >= 0.9.4) - rb-inotify (~> 0.9, >= 0.9.7) - ruby_dep (~> 1.2) - loofah (2.3.1) - crass (~> 1.0.2) - nokogiri (>= 1.5.9) - mail (2.7.0) - mini_mime (>= 0.1.1) - method_source (0.9.0) - mime-types (3.3.1) - mime-types-data (~> 3.2015) - mime-types-data (3.2020.1104) - mini_mime (1.0.0) - mini_portile2 (2.4.0) - minitest (5.11.3) - multi_json (1.13.1) - multi_xml (0.6.0) - nio4r (2.3.0) - nokogiri (1.10.4) - mini_portile2 (~> 2.4.0) - onelogin (1.6.0) - httparty (>= 0.13.7) - nokogiri (>= 1.6.3.1) - public_suffix (3.0.2) - puma (3.12.2) - rack (2.0.8) - rack-test (0.8.3) - rack (>= 1.0, < 3) - rails (5.1.5) - actioncable (= 5.1.5) - actionmailer (= 5.1.5) - actionpack (= 5.1.5) - actionview (= 5.1.5) - activejob (= 5.1.5) - activemodel (= 5.1.5) - activerecord (= 5.1.5) - activesupport (= 5.1.5) - bundler (>= 1.3.0) - railties (= 5.1.5) - sprockets-rails (>= 2.0.0) - rails-dom-testing (2.0.3) - activesupport (>= 4.2.0) - nokogiri (>= 1.6) - rails-html-sanitizer (1.0.4) - loofah (~> 2.2, >= 2.2.2) - railties (5.1.5) - actionpack (= 5.1.5) - activesupport (= 5.1.5) - method_source - rake (>= 0.8.7) - thor (>= 0.18.1, < 2.0) - rake (12.3.1) - rb-fsevent (0.10.3) - rb-inotify (0.9.10) - ffi (>= 0.5.0, < 2) - ruby_dep (1.5.0) - rubyzip (1.3.0) - sass (3.5.5) - sass-listen (~> 4.0.0) - sass-listen (4.0.0) - rb-fsevent (~> 0.9, >= 0.9.4) - rb-inotify (~> 0.9, >= 0.9.7) - sass-rails (5.0.7) - railties (>= 4.0.0, < 6) - sass (~> 3.1) - sprockets (>= 2.8, < 4.0) - sprockets-rails (>= 2.0, < 4.0) - tilt (>= 1.1, < 3) - selenium-webdriver (3.11.0) - childprocess (~> 0.5) - rubyzip (~> 1.2) - spring (2.0.2) - activesupport (>= 4.2) - spring-watcher-listen (2.0.1) - listen (>= 2.7, < 4.0) - spring (>= 1.2, < 3.0) - sprockets (3.7.2) - concurrent-ruby (~> 1.0) - rack (> 1, < 3) - sprockets-rails (3.2.1) - actionpack (>= 4.0) - activesupport (>= 4.0) - sprockets (>= 3.0.0) - sqlite3 (1.3.13) - thor (0.20.0) - thread_safe (0.3.6) - tilt (2.0.8) - turbolinks (5.1.0) - turbolinks-source (~> 5.1) - turbolinks-source (5.1.0) - tzinfo (1.2.5) - thread_safe (~> 0.1) - uglifier (4.1.8) - execjs (>= 0.3.0, < 3) - web-console (3.5.1) - actionview (>= 5.0) - activemodel (>= 5.0) - bindex (>= 0.4.0) - railties (>= 5.0) - websocket-driver (0.6.5) - websocket-extensions (>= 0.1.0) - websocket-extensions (0.1.3) - xpath (3.0.0) - nokogiri (~> 1.8) - -PLATFORMS - ruby - -DEPENDENCIES - byebug - capybara (~> 2.13) - coffee-rails (~> 4.2) - jbuilder (~> 2.5) - jquery-rails - listen (>= 3.0.5, < 3.2) - onelogin (~> 1.5.0) - puma (~> 3.12) - rails (~> 5.1.4) - sass-rails (~> 5.0) - selenium-webdriver - spring - spring-watcher-listen (~> 2.0.0) - sqlite3 - turbolinks (~> 5) - tzinfo-data - uglifier (>= 1.3.0) - web-console (>= 3.3.0) - -BUNDLED WITH - 1.17.3 diff --git a/examples/rails-custom-login-page/README.md b/examples/rails-custom-login-page/README.md deleted file mode 100644 index 97dde34..0000000 --- a/examples/rails-custom-login-page/README.md +++ /dev/null @@ -1,137 +0,0 @@ -# Customized Login Page - -This sample is a default [Ruby on Rails 5](http://rubyonrails.org/) app that makes use of the OneLogin ruby sdk for authenticating users. - -It is the recommended approach when building a customized login flow where you want complete control -over the look & feel. - -The downside to this approach is that you have to implement MFA and password resets etc yourself. However we do have the APIs for these actions available and have demonstrated how to use them in this app. - -If you want a standards based, out of the box way to authenticate users then we recommend you use [our OpenId Connect implementation](https://github.com/onelogin/onelogin-oidc-ruby). - -## Get Started - -The sample tries to keep everything as simple as possible so only -implements -* Login - Authenticate users in a single request to OneLogin with out any redirects -* MFA - Does MFA verification if required -* Password Reset with user verification via MFA -* Self sign Up / Create a new user -* Onboard / Activate a user -* User Apps - List apps available to a user and provides SSO links -* User Roles - Lists a users roles -* Logout - destroying the local session and revoking the token at OneLogin - -In order to run this sample you need API credentials for a OneLogin account. If you don't have a OneLogin developer account [you can sign up here](https://www.onelogin.com/developer-signup). - -1. Clone this repo - -```sh -git clone https://github.com/onelogin/onelogin-ruby-sdk.git -``` - -2. Move to the rails example and install the required gems -```sh -cd onelogin-ruby-sdk/examples/rails-custom-login-page && bundle install -``` - -3. Rename `config/secrets.yml.sample` to `config/secrets.yml` and update with your OneLogin API credentials, region and subdomain. - -If you are using a custom domain instance, set it -in order to be used for the login demo. - -If you want to set the cookie via post-form set -COOKIE_VIA_POST_FORM to true, otherwise the cookie -will be set via javascript via the makeCors method -described later. - -```yaml -development: - secret_key_base: xxx - ONELOGIN_CLIENT_ID: xxx - ONELOGIN_CLIENT_SECRET: xxx - ONELOGIN_REGION: us - ONELOGIN_SUBDOMAIN: xxx - CUSTOM_DOMAIN: xxx - COOKIE_VIA_POST_FORM: true -``` -4. Run the sample and browse to `http://localhost:3000` -```sh -rails s -``` - -The `/dashboard` route renders a protected page to prove the authentication works and creates a session. You will need to be authenticated to view it. If you are not authenticate you will be redirected back to the login page. - -### Authenticate the user - -*helpers/sessions_helper.rb* -```ruby -response = api_client.create_session_login_token({ - 'username_or_email' => username, - 'password' => password, - 'subdomain' => ONELOGIN_SUBDOMAIN, - }, - request.base_url # included for CORS session cookie request -) -``` - -### Verify MFA - -*helpers/sessions_helper.rb* -```ruby -response = api_client.get_session_token_verified( - device_id, - session[:state_token], - otp_token, - request.base_url -) -``` - -### Destroy the session - -*helpers/sessions_helper.rb* -```ruby -api_client.log_user_out(current_user_id) -session.delete(:user) -``` - -### Make CORS request to establish SSO session - -Using the `session_token` returned from the `session_controller` after a new login or successful MFA verification. - -*views/home/index.html.erb* -```javascript -function makeCors(session_token) { - var xhr = new XMLHttpRequest(); - xhr.withCredentials = true; - method = "POST"; - var url = "https://" + ONELOGIN_SUBDOMAIN + ".onelogin.com/session_via_api_token"; - // var url = "https://" + CUSTOM_DOMAIN + "/session_via_api_token"; - xhr.open(method, url, true); - xhr.setRequestHeader("Content-Type", "application/json"); - body = {"session_token": session_token}; - xhr.send(JSON.stringify(body)); -}; -``` - -### Make form-based request to establish SSO session -```html - - - - - - -

Auth API Test

-
- - - -
- - - -where onelogin_instance is a custom domain or -{subdomain}.onelogin.com -``` diff --git a/examples/rails-custom-login-page/Rakefile b/examples/rails-custom-login-page/Rakefile deleted file mode 100644 index e85f913..0000000 --- a/examples/rails-custom-login-page/Rakefile +++ /dev/null @@ -1,6 +0,0 @@ -# Add your own tasks in files placed in lib/tasks ending in .rake, -# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. - -require_relative 'config/application' - -Rails.application.load_tasks diff --git a/examples/rails-custom-login-page/app/assets/config/manifest.js b/examples/rails-custom-login-page/app/assets/config/manifest.js deleted file mode 100644 index b16e53d..0000000 --- a/examples/rails-custom-login-page/app/assets/config/manifest.js +++ /dev/null @@ -1,3 +0,0 @@ -//= link_tree ../images -//= link_directory ../javascripts .js -//= link_directory ../stylesheets .css diff --git a/examples/rails-custom-login-page/app/assets/images/.keep b/examples/rails-custom-login-page/app/assets/images/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/examples/rails-custom-login-page/app/assets/javascripts/application.js b/examples/rails-custom-login-page/app/assets/javascripts/application.js deleted file mode 100644 index c716be4..0000000 --- a/examples/rails-custom-login-page/app/assets/javascripts/application.js +++ /dev/null @@ -1,18 +0,0 @@ -// This is a manifest file that'll be compiled into application.js, which will include all the files -// listed below. -// -// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, or any plugin's -// vendor/assets/javascripts directory can be referenced here using a relative path. -// -// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the -// compiled file. JavaScript code in this file should be added after the last require_* statement. -// -// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details -// about supported directives. -// -//= require rails-ujs -//= require turbolinks -//= require_tree . -//= require jquery -//= require jquery_ujs - diff --git a/examples/rails-custom-login-page/app/assets/javascripts/cable.js b/examples/rails-custom-login-page/app/assets/javascripts/cable.js deleted file mode 100644 index 739aa5f..0000000 --- a/examples/rails-custom-login-page/app/assets/javascripts/cable.js +++ /dev/null @@ -1,13 +0,0 @@ -// Action Cable provides the framework to deal with WebSockets in Rails. -// You can generate new channels where WebSocket features live using the `rails generate channel` command. -// -//= require action_cable -//= require_self -//= require_tree ./channels - -(function() { - this.App || (this.App = {}); - - App.cable = ActionCable.createConsumer(); - -}).call(this); diff --git a/examples/rails-custom-login-page/app/assets/javascripts/channels/.keep b/examples/rails-custom-login-page/app/assets/javascripts/channels/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/examples/rails-custom-login-page/app/assets/javascripts/dashboard.coffee b/examples/rails-custom-login-page/app/assets/javascripts/dashboard.coffee deleted file mode 100644 index 24f83d1..0000000 --- a/examples/rails-custom-login-page/app/assets/javascripts/dashboard.coffee +++ /dev/null @@ -1,3 +0,0 @@ -# Place all the behaviors and hooks related to the matching controller here. -# All this logic will automatically be available in application.js. -# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/examples/rails-custom-login-page/app/assets/javascripts/home.coffee b/examples/rails-custom-login-page/app/assets/javascripts/home.coffee deleted file mode 100644 index 24f83d1..0000000 --- a/examples/rails-custom-login-page/app/assets/javascripts/home.coffee +++ /dev/null @@ -1,3 +0,0 @@ -# Place all the behaviors and hooks related to the matching controller here. -# All this logic will automatically be available in application.js. -# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/examples/rails-custom-login-page/app/assets/javascripts/sessions.coffee b/examples/rails-custom-login-page/app/assets/javascripts/sessions.coffee deleted file mode 100644 index 24f83d1..0000000 --- a/examples/rails-custom-login-page/app/assets/javascripts/sessions.coffee +++ /dev/null @@ -1,3 +0,0 @@ -# Place all the behaviors and hooks related to the matching controller here. -# All this logic will automatically be available in application.js. -# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/examples/rails-custom-login-page/app/assets/stylesheets/application.css b/examples/rails-custom-login-page/app/assets/stylesheets/application.css deleted file mode 100644 index 216b3f0..0000000 --- a/examples/rails-custom-login-page/app/assets/stylesheets/application.css +++ /dev/null @@ -1,15 +0,0 @@ -/* - * This is a manifest file that'll be compiled into application.css, which will include all the files - * listed below. - * - * Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's - * vendor/assets/stylesheets directory can be referenced here using a relative path. - * - * You're free to add application-wide styles to this file and they'll appear at the bottom of the - * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS - * files in this directory. Styles in this file should be added after the last require_* statement. - * It is generally better to create a new file per style scope. - * - *= require_tree . - *= require_self - */ \ No newline at end of file diff --git a/examples/rails-custom-login-page/app/assets/stylesheets/dashboard.scss b/examples/rails-custom-login-page/app/assets/stylesheets/dashboard.scss deleted file mode 100644 index e8f34fd..0000000 --- a/examples/rails-custom-login-page/app/assets/stylesheets/dashboard.scss +++ /dev/null @@ -1,3 +0,0 @@ -// Place all the styles related to the Dashboard controller here. -// They will automatically be included in application.css. -// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/examples/rails-custom-login-page/app/assets/stylesheets/home.scss b/examples/rails-custom-login-page/app/assets/stylesheets/home.scss deleted file mode 100644 index 7131aac..0000000 --- a/examples/rails-custom-login-page/app/assets/stylesheets/home.scss +++ /dev/null @@ -1,3 +0,0 @@ -// Place all the styles related to the Home controller here. -// They will automatically be included in application.css. -// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/examples/rails-custom-login-page/app/assets/stylesheets/sessions.scss b/examples/rails-custom-login-page/app/assets/stylesheets/sessions.scss deleted file mode 100644 index ccb1ed2..0000000 --- a/examples/rails-custom-login-page/app/assets/stylesheets/sessions.scss +++ /dev/null @@ -1,3 +0,0 @@ -// Place all the styles related to the Sessions controller here. -// They will automatically be included in application.css. -// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/examples/rails-custom-login-page/app/channels/application_cable/channel.rb b/examples/rails-custom-login-page/app/channels/application_cable/channel.rb deleted file mode 100644 index d672697..0000000 --- a/examples/rails-custom-login-page/app/channels/application_cable/channel.rb +++ /dev/null @@ -1,4 +0,0 @@ -module ApplicationCable - class Channel < ActionCable::Channel::Base - end -end diff --git a/examples/rails-custom-login-page/app/channels/application_cable/connection.rb b/examples/rails-custom-login-page/app/channels/application_cable/connection.rb deleted file mode 100644 index 0ff5442..0000000 --- a/examples/rails-custom-login-page/app/channels/application_cable/connection.rb +++ /dev/null @@ -1,4 +0,0 @@ -module ApplicationCable - class Connection < ActionCable::Connection::Base - end -end diff --git a/examples/rails-custom-login-page/app/controllers/application_controller.rb b/examples/rails-custom-login-page/app/controllers/application_controller.rb deleted file mode 100644 index f77d8af..0000000 --- a/examples/rails-custom-login-page/app/controllers/application_controller.rb +++ /dev/null @@ -1,23 +0,0 @@ -require 'onelogin' - -class ApplicationController < ActionController::Base - protect_from_forgery with: :exception - include SessionsHelper - - def require_current_user - if current_user - return true - else - redirect_to root_url, error: "Please sign in." - return false - end - end - - def api_client - @api_client ||= OneLogin::Api::Client.new( - client_id: ONELOGIN_CLIENT_ID, - client_secret: ONELOGIN_CLIENT_SECRET, - region: ONELOGIN_REGION - ) - end -end diff --git a/examples/rails-custom-login-page/app/controllers/concerns/.keep b/examples/rails-custom-login-page/app/controllers/concerns/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/examples/rails-custom-login-page/app/controllers/dashboard_controller.rb b/examples/rails-custom-login-page/app/controllers/dashboard_controller.rb deleted file mode 100644 index ee30ce2..0000000 --- a/examples/rails-custom-login-page/app/controllers/dashboard_controller.rb +++ /dev/null @@ -1,10 +0,0 @@ -class DashboardController < ApplicationController - include DashboardHelper - - before_action :require_current_user - - def index - @apps = user_apps - @roles = user_roles - end -end diff --git a/examples/rails-custom-login-page/app/controllers/home_controller.rb b/examples/rails-custom-login-page/app/controllers/home_controller.rb deleted file mode 100644 index 9e35d76..0000000 --- a/examples/rails-custom-login-page/app/controllers/home_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class HomeController < ApplicationController - def index - redirect_to "/dashboard" if session["user"] - end -end diff --git a/examples/rails-custom-login-page/app/controllers/sessions_controller.rb b/examples/rails-custom-login-page/app/controllers/sessions_controller.rb deleted file mode 100644 index a59e55d..0000000 --- a/examples/rails-custom-login-page/app/controllers/sessions_controller.rb +++ /dev/null @@ -1,46 +0,0 @@ -class SessionsController < ApplicationController - def new - response = log_in(params['username'], params['password']) - status = response[:error] ? :unauthorized : :ok - - render json: response, status: status - end - - def verify - response = verify_mfa(params['device_id'], params['otp_token']) - status = response ? :ok : :unauthorized - - render json: response, status: status - end - - # Checks for user and gets MFA devices - # available to verify token before - # password reset is completed - def forgot_password - user = validate_user(params['forgot_username']) - - devices = get_mfa_devices(user.id) - - status = user ? :ok : :not_found - - render json: devices, status: status - end - - # Verify MFA token and then update password - def reset_password - if verify_token(params['reset_device_id'], params['reset_otp_token']) - status = :ok - response = set_password(session[:user_id], params['new_password']) - else - status = :unauthorized - response = 'Invalid token' - end - - render json: response, status: status - end - - def destroy - log_out - redirect_to root_url - end -end diff --git a/examples/rails-custom-login-page/app/controllers/users_controller.rb b/examples/rails-custom-login-page/app/controllers/users_controller.rb deleted file mode 100644 index 88fd939..0000000 --- a/examples/rails-custom-login-page/app/controllers/users_controller.rb +++ /dev/null @@ -1,120 +0,0 @@ -class UsersController < ApplicationController - - before_action :require_current_user, except: [:new, :create, :onboard, :activate] - before_action :set_user, only: [:show, :edit, :update, :destroy] - - # GET /users - # GET /users.json - def index - @users = api_client.get_users.take(25) # only fetch the first 50 users - end - - # GET /users/1 - # GET /users/1.json - def show - end - - # GET /users/new - def new - end - - # GET /users/1/edit - def edit - end - - # POST /users - # POST /users.json - def create - # Create a user - user = api_client.create_user(user_params) - # Update custom attributes - api_client.set_custom_attribute_to_user(user.id, custom_user_params) - # Set status to unactivated - api_client.update_user(user.id, status: 0) - - if api_client.error - puts api_client.error_description - end - - redirect_to onboard_path, notice: 'User has been created with status set to unactivated' - end - - # GET /onboard - def onboard - end - - # POST /activate - def activate - # Search for a user with this email address - @user = api_client.get_users(email: user_params[:email]).first - - unless @user && verify_dob && verify_ssn - return redirect_to onboard_path, notice: "User #{user_params[:email]} was not verified" - end - - # Update password - unless api_client.set_password_using_clear_text(@user.id, user_params[:password], user_params[:password]) - return redirect_to onboard_path, notice: "Password update failed. #{api_client.error_description}" - end - - # Activate user - api_client.update_user(@user.id, status: 1) - - # Redirect to login page - redirect_to home_index_path - end - - # Verify dob and ssn match - def verify_ssn - @user.custom_attributes["custom_ssn"].eql? (custom_user_params[:custom_ssn]) - end - - def verify_dob - @user.custom_attributes["custom_dob"].eql? (custom_user_params[:custom_dob]) - end - - # PATCH/PUT /users/1 - # PATCH/PUT /users/1.json - def update - # update the user - api_client.update_user(params[:id], user_params) - - # update custom attributes - api_client.set_custom_attribute_to_user(params[:id], custom_user_params) - - respond_to do |format| - unless api_client.error - format.html { redirect_to user_path(params[:id]), notice: 'User was successfully updated.' } - format.json { render :show, status: :ok, location: @user } - else - format.html { render :edit } - format.json { render json: @user.errors, status: :unprocessable_entity } - end - end - end - - # DELETE /users/1 - # DELETE /users/1.json - def destroy - @user.destroy - respond_to do |format| - format.html { redirect_to users_url, notice: 'User was successfully destroyed.' } - format.json { head :no_content } - end - end - - private - - def set_user - @user = api_client.get_user(params[:id]) - end - - # Never trust parameters from the scary internet, only allow the white list through. - def user_params - params.permit(:firstname, :lastname, :email, :phone, :username, :password) - end - - def custom_user_params - params.permit(:custom_field, :custom_dob, :custom_ssn) - end -end diff --git a/examples/rails-custom-login-page/app/helpers/application_helper.rb b/examples/rails-custom-login-page/app/helpers/application_helper.rb deleted file mode 100644 index de6be79..0000000 --- a/examples/rails-custom-login-page/app/helpers/application_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module ApplicationHelper -end diff --git a/examples/rails-custom-login-page/app/helpers/dashboard_helper.rb b/examples/rails-custom-login-page/app/helpers/dashboard_helper.rb deleted file mode 100644 index b3045ad..0000000 --- a/examples/rails-custom-login-page/app/helpers/dashboard_helper.rb +++ /dev/null @@ -1,28 +0,0 @@ -module DashboardHelper - - # - # Get a list of app for the current user - # - def user_apps - api_client.get_user_apps(current_user_id) - end - - # - # Get a list of roles for the current user - # - def user_roles - role_ids = api_client.get_user_roles(current_user_id) - - roles.map do |role| - role if role_ids.include?(role.id) - end.compact - end - - # - # Get a list of all roles in onelogin account - # - def roles - @roles ||= api_client.get_roles - end - -end diff --git a/examples/rails-custom-login-page/app/helpers/home_helper.rb b/examples/rails-custom-login-page/app/helpers/home_helper.rb deleted file mode 100644 index 23de56a..0000000 --- a/examples/rails-custom-login-page/app/helpers/home_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module HomeHelper -end diff --git a/examples/rails-custom-login-page/app/helpers/sessions_helper.rb b/examples/rails-custom-login-page/app/helpers/sessions_helper.rb deleted file mode 100644 index 17e0fc3..0000000 --- a/examples/rails-custom-login-page/app/helpers/sessions_helper.rb +++ /dev/null @@ -1,87 +0,0 @@ -module SessionsHelper - - def log_in(username, password) - response = api_client.create_session_login_token({ - 'username_or_email' => username, - 'password' => password, - 'subdomain' => ONELOGIN_SUBDOMAIN, - }, - request.base_url # included for CORS session cookie request - ) - return { error: api_client.error_description } unless response - - if response.is_a? OneLogin::Api::Models::SessionTokenMFAInfo - session[:state_token] = response.state_token - { - requires_mfa: true, - devices: response.devices - } - else - create_session(response.user) - { - requires_mfa: false, - session_token: response.session_token - } - end - end - - def verify_mfa(device_id, otp_token) - response = api_client.get_session_token_verified( - device_id, - session[:state_token], - otp_token, - request.base_url - ) - return nil unless response - - create_session(response.user) - { - session_token: response.session_token - } - end - - def create_session(user) - session[:user] = user - end - - def log_out - return unless current_user - api_client.log_user_out(current_user_id) - session.delete(:user) - end - - def current_user - session[:user] - end - - def current_user_id - session[:user]['id'] if current_user - end - - def validate_user(username) - user = api_client.get_users(username: username).first - - if user - session[:user_id] = user.id - end - - user - end - - def get_mfa_devices(user_id) - devices = api_client.get_enrolled_factors(user_id) - - # only return devices that dont need a trigger. - # i.e. this sample does not support push yet - devices.select {|d| d.needs_trigger == true } - end - - def verify_token(device_id, mfa_token) - puts "VERIFY MFA TOKEN User:#{session[:user_id]}, Device:#{device_id}, Token:#{mfa_token}" - api_client.verify_factor(session[:user_id], device_id, mfa_token) - end - - def set_password(user_id, password) - api_client.set_password_using_clear_text(user_id, password, password) - end -end diff --git a/examples/rails-custom-login-page/app/helpers/users_helper.rb b/examples/rails-custom-login-page/app/helpers/users_helper.rb deleted file mode 100644 index 44e7820..0000000 --- a/examples/rails-custom-login-page/app/helpers/users_helper.rb +++ /dev/null @@ -1,3 +0,0 @@ -module UsersHelper - -end diff --git a/examples/rails-custom-login-page/app/jobs/application_job.rb b/examples/rails-custom-login-page/app/jobs/application_job.rb deleted file mode 100644 index a009ace..0000000 --- a/examples/rails-custom-login-page/app/jobs/application_job.rb +++ /dev/null @@ -1,2 +0,0 @@ -class ApplicationJob < ActiveJob::Base -end diff --git a/examples/rails-custom-login-page/app/mailers/application_mailer.rb b/examples/rails-custom-login-page/app/mailers/application_mailer.rb deleted file mode 100644 index 286b223..0000000 --- a/examples/rails-custom-login-page/app/mailers/application_mailer.rb +++ /dev/null @@ -1,4 +0,0 @@ -class ApplicationMailer < ActionMailer::Base - default from: 'from@example.com' - layout 'mailer' -end diff --git a/examples/rails-custom-login-page/app/models/application_record.rb b/examples/rails-custom-login-page/app/models/application_record.rb deleted file mode 100644 index 10a4cba..0000000 --- a/examples/rails-custom-login-page/app/models/application_record.rb +++ /dev/null @@ -1,3 +0,0 @@ -class ApplicationRecord < ActiveRecord::Base - self.abstract_class = true -end diff --git a/examples/rails-custom-login-page/app/models/concerns/.keep b/examples/rails-custom-login-page/app/models/concerns/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/examples/rails-custom-login-page/app/views/dashboard/index.html.erb b/examples/rails-custom-login-page/app/views/dashboard/index.html.erb deleted file mode 100644 index 39755d3..0000000 --- a/examples/rails-custom-login-page/app/views/dashboard/index.html.erb +++ /dev/null @@ -1,43 +0,0 @@ -
-

Dashboard

-

- You must be authenticated to see this page so if you're seeing it then - everything worked as expected 🎉 -

-

- List Users | Log Out -

-
- -
-
-
-

Apps

-
    - <% url_base = CUSTOM_DOMAIN || ONELOGIN_SUBDOMAIN + ".onelogin.com" %> - <%@apps.each do |app|%> -
  • <%= app.name %>
  • - <%end%> -
-
-
-

Roles

-
    - <%@roles.each do |role|%> -
  • <%= role.name %>
  • - <%end%> -
- -
- -

Profile

-
    - <%current_user.each do |k, v|%> -
  • - <%= k%>: <%= v%> -
  • - <%end%> -
-
-
-
diff --git a/examples/rails-custom-login-page/app/views/home/index.html.erb b/examples/rails-custom-login-page/app/views/home/index.html.erb deleted file mode 100644 index 59d7374..0000000 --- a/examples/rails-custom-login-page/app/views/home/index.html.erb +++ /dev/null @@ -1,272 +0,0 @@ -
-

This is a simple demo of how to authenticate a user and handle MFA when required

-
- -
-
-
-
-
- - - - <% url_base = CUSTOM_DOMAIN || ONELOGIN_SUBDOMAIN + ".onelogin.com" %> - <% url_create_session = "https://" + url_base + "/session_via_api_token" %> - -
- - - -
- - <%= form_tag("/login", method: "post", class: 'login-form') do %> -
- - <%= text_field_tag :username, nil, placeholder: 'Enter Username', class: 'form-control' %> -
-
- - <%= password_field_tag :password, nil, placeholder: 'Enter Password', class: 'form-control' %> -
- -
- Forgot Password | Sign Up - <% end %> - - <%= form_tag("/verify_mfa", method: "post", class: 'mfa-form') do %> -
- - <%= select_tag :device_id, nil, {:class => 'form-control'} %> -
-
- - <%= text_field_tag :otp_token, nil, placeholder: 'Enter Token', class: 'form-control' %> -
- - <% end %> - - <%= form_tag("/forgot_password", method: "post", class: 'forgot-password-form') do %> -
- - <%= text_field_tag :forgot_username, nil, placeholder: 'Enter Username', class: 'form-control' %> -
- or Login - <% end %> - - <%= form_tag("/reset_password", method: "post", class: 'reset-password-form') do %> -
- - <%= select_tag :reset_device_id, nil, {:class => 'form-control'} %> -
-
- - <%= text_field_tag :reset_otp_token, nil, placeholder: 'Enter Token', class: 'form-control' %> -
-
- - <%= password_field_tag :new_password, nil, placeholder: 'Enter New Password', class: 'form-control' %> -
- - <% end %> - -
- -
-
-
-
-
- - - - - diff --git a/examples/rails-custom-login-page/app/views/layouts/application.html.erb b/examples/rails-custom-login-page/app/views/layouts/application.html.erb deleted file mode 100644 index 881b84f..0000000 --- a/examples/rails-custom-login-page/app/views/layouts/application.html.erb +++ /dev/null @@ -1,31 +0,0 @@ - - - - OneLogin - <%= csrf_meta_tags %> - - <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %> - <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %> - - - - - - - - <% flash.each do |key, value| %> -
<%= value %>
- <% end %> - - <%= yield %> - - diff --git a/examples/rails-custom-login-page/app/views/layouts/mailer.html.erb b/examples/rails-custom-login-page/app/views/layouts/mailer.html.erb deleted file mode 100644 index cbd34d2..0000000 --- a/examples/rails-custom-login-page/app/views/layouts/mailer.html.erb +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - <%= yield %> - - diff --git a/examples/rails-custom-login-page/app/views/layouts/mailer.text.erb b/examples/rails-custom-login-page/app/views/layouts/mailer.text.erb deleted file mode 100644 index 37f0bdd..0000000 --- a/examples/rails-custom-login-page/app/views/layouts/mailer.text.erb +++ /dev/null @@ -1 +0,0 @@ -<%= yield %> diff --git a/examples/rails-custom-login-page/app/views/users/_form.html.erb b/examples/rails-custom-login-page/app/views/users/_form.html.erb deleted file mode 100644 index 8b13789..0000000 --- a/examples/rails-custom-login-page/app/views/users/_form.html.erb +++ /dev/null @@ -1 +0,0 @@ - diff --git a/examples/rails-custom-login-page/app/views/users/_user.json.jbuilder b/examples/rails-custom-login-page/app/views/users/_user.json.jbuilder deleted file mode 100644 index 2f081bb..0000000 --- a/examples/rails-custom-login-page/app/views/users/_user.json.jbuilder +++ /dev/null @@ -1,2 +0,0 @@ -json.extract! user, :id, :created_at, :updated_at -json.url user_url(user, format: :json) diff --git a/examples/rails-custom-login-page/app/views/users/edit.html.erb b/examples/rails-custom-login-page/app/views/users/edit.html.erb deleted file mode 100644 index 9c913e3..0000000 --- a/examples/rails-custom-login-page/app/views/users/edit.html.erb +++ /dev/null @@ -1,33 +0,0 @@ -
-
-
-

<%= link_to 'Back', users_path %>

- -

Edit User

- - <%= form_tag update_user_path, method: "patch", class: "edit" do %> -
- - -
-
- - -
-
- - -
-
- - -
-
- - -
- - <% end %> -
-
-
diff --git a/examples/rails-custom-login-page/app/views/users/index.html.erb b/examples/rails-custom-login-page/app/views/users/index.html.erb deleted file mode 100644 index 36877f4..0000000 --- a/examples/rails-custom-login-page/app/views/users/index.html.erb +++ /dev/null @@ -1,33 +0,0 @@ -

<%= notice %>

- -
-
-
-

Users

- - - - - - - - - - - - - <% @users.each do |user| %> - - - - - - - - - <% end %> - -
NameEmailPhoneCustom Field
<%= user.firstname %> <%= user.lastname %><%= user.email %><%= user.phone %><%= user.custom_attributes["custom_field"] if user.custom_attributes.is_a?(Hash) %><%= link_to 'Show', user_path(user.id) %><%= link_to 'Edit', edit_user_path(user.id) %>
-
-
-
diff --git a/examples/rails-custom-login-page/app/views/users/index.json.jbuilder b/examples/rails-custom-login-page/app/views/users/index.json.jbuilder deleted file mode 100644 index 2faf5af..0000000 --- a/examples/rails-custom-login-page/app/views/users/index.json.jbuilder +++ /dev/null @@ -1 +0,0 @@ -json.array! @users, partial: 'users/user', as: :user diff --git a/examples/rails-custom-login-page/app/views/users/new.html.erb b/examples/rails-custom-login-page/app/views/users/new.html.erb deleted file mode 100644 index d9d69ed..0000000 --- a/examples/rails-custom-login-page/app/views/users/new.html.erb +++ /dev/null @@ -1,60 +0,0 @@ -
-

This is a simple demo of how to sign up a new user and then make them activate their account

-
- -
-
-
-
-
- - - - <%= form_tag("/users", method: "post", class: 'signup-form') do %> -
- - <%= text_field_tag :firstname, nil, placeholder: 'First Name', class: 'form-control' %> -
-
- - <%= text_field_tag :lastname, nil, placeholder: 'Last Name', class: 'form-control' %> -
-
- - <%= text_field_tag :email, nil, placeholder: 'Email Address', class: 'form-control' %> -
-
- - <%= text_field_tag :custom_dob, nil, placeholder: 'mm/dd/yyyy', class: 'form-control' %> -
-
- - <%= text_field_tag :custom_ssn, nil, placeholder: 'Last 4 of SSN', class: 'form-control' %> -
- -
- Login - <% end %> - -
-
-
-
-
- - - diff --git a/examples/rails-custom-login-page/app/views/users/onboard.html.erb b/examples/rails-custom-login-page/app/views/users/onboard.html.erb deleted file mode 100644 index 94293d4..0000000 --- a/examples/rails-custom-login-page/app/views/users/onboard.html.erb +++ /dev/null @@ -1,54 +0,0 @@ -
-

This shows how an unactivated user could supply infomation to complete a sign up flow

-
- -
-
-
-
-
- - - - <%= form_tag("/activate", method: "post", class: 'signup-form') do %> -
- - <%= text_field_tag :email, nil, placeholder: 'Email Address', class: 'form-control' %> -
-
- - <%= text_field_tag :custom_dob, nil, placeholder: 'mm/dd/yyyy', class: 'form-control' %> -
-
- - <%= text_field_tag :custom_ssn, nil, placeholder: 'Last 4 of SSN', class: 'form-control' %> -
-
- - <%= password_field_tag :password, nil, placeholder: 'Make up a password', class: 'form-control' %> -
- - <% end %> - -
-
-
-
-
- - - diff --git a/examples/rails-custom-login-page/app/views/users/show.html.erb b/examples/rails-custom-login-page/app/views/users/show.html.erb deleted file mode 100644 index 1649ee0..0000000 --- a/examples/rails-custom-login-page/app/views/users/show.html.erb +++ /dev/null @@ -1,17 +0,0 @@ -
-
-
- <%= link_to 'Edit', edit_user_path(@user.id) %> | - <%= link_to 'Back', users_path %> - -

<%= @user.firstname %> <%= @user.lastname %>

-
    - <%@user.instance_values.symbolize_keys.each do |k, v|%> -
  • - <%= k%>: <%= v%> -
  • - <%end%> -
-
-
-
\ No newline at end of file diff --git a/examples/rails-custom-login-page/app/views/users/show.json.jbuilder b/examples/rails-custom-login-page/app/views/users/show.json.jbuilder deleted file mode 100644 index ff40bb9..0000000 --- a/examples/rails-custom-login-page/app/views/users/show.json.jbuilder +++ /dev/null @@ -1 +0,0 @@ -json.partial! "users/user", user: @user diff --git a/examples/rails-custom-login-page/bin/bundle b/examples/rails-custom-login-page/bin/bundle deleted file mode 100755 index 66e9889..0000000 --- a/examples/rails-custom-login-page/bin/bundle +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env ruby -ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) -load Gem.bin_path('bundler', 'bundle') diff --git a/examples/rails-custom-login-page/bin/rails b/examples/rails-custom-login-page/bin/rails deleted file mode 100755 index 5badb2f..0000000 --- a/examples/rails-custom-login-page/bin/rails +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env ruby -begin - load File.expand_path('../spring', __FILE__) -rescue LoadError => e - raise unless e.message.include?('spring') -end -APP_PATH = File.expand_path('../config/application', __dir__) -require_relative '../config/boot' -require 'rails/commands' diff --git a/examples/rails-custom-login-page/bin/rake b/examples/rails-custom-login-page/bin/rake deleted file mode 100755 index d87d5f5..0000000 --- a/examples/rails-custom-login-page/bin/rake +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env ruby -begin - load File.expand_path('../spring', __FILE__) -rescue LoadError => e - raise unless e.message.include?('spring') -end -require_relative '../config/boot' -require 'rake' -Rake.application.run diff --git a/examples/rails-custom-login-page/bin/setup b/examples/rails-custom-login-page/bin/setup deleted file mode 100755 index 78c4e86..0000000 --- a/examples/rails-custom-login-page/bin/setup +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env ruby -require 'pathname' -require 'fileutils' -include FileUtils - -# path to your application root. -APP_ROOT = Pathname.new File.expand_path('../../', __FILE__) - -def system!(*args) - system(*args) || abort("\n== Command #{args} failed ==") -end - -chdir APP_ROOT do - # This script is a starting point to setup your application. - # Add necessary setup steps to this file. - - puts '== Installing dependencies ==' - system! 'gem install bundler --conservative' - system('bundle check') || system!('bundle install') - - # Install JavaScript dependencies if using Yarn - # system('bin/yarn') - - - # puts "\n== Copying sample files ==" - # unless File.exist?('config/database.yml') - # cp 'config/database.yml.sample', 'config/database.yml' - # end - - puts "\n== Preparing database ==" - system! 'bin/rails db:setup' - - puts "\n== Removing old logs and tempfiles ==" - system! 'bin/rails log:clear tmp:clear' - - puts "\n== Restarting application server ==" - system! 'bin/rails restart' -end diff --git a/examples/rails-custom-login-page/bin/spring b/examples/rails-custom-login-page/bin/spring deleted file mode 100755 index fb2ec2e..0000000 --- a/examples/rails-custom-login-page/bin/spring +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env ruby - -# This file loads spring without using Bundler, in order to be fast. -# It gets overwritten when you run the `spring binstub` command. - -unless defined?(Spring) - require 'rubygems' - require 'bundler' - - lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read) - spring = lockfile.specs.detect { |spec| spec.name == "spring" } - if spring - Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path - gem 'spring', spring.version - require 'spring/binstub' - end -end diff --git a/examples/rails-custom-login-page/bin/update b/examples/rails-custom-login-page/bin/update deleted file mode 100755 index a8e4462..0000000 --- a/examples/rails-custom-login-page/bin/update +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env ruby -require 'pathname' -require 'fileutils' -include FileUtils - -# path to your application root. -APP_ROOT = Pathname.new File.expand_path('../../', __FILE__) - -def system!(*args) - system(*args) || abort("\n== Command #{args} failed ==") -end - -chdir APP_ROOT do - # This script is a way to update your development environment automatically. - # Add necessary update steps to this file. - - puts '== Installing dependencies ==' - system! 'gem install bundler --conservative' - system('bundle check') || system!('bundle install') - - puts "\n== Updating database ==" - system! 'bin/rails db:migrate' - - puts "\n== Removing old logs and tempfiles ==" - system! 'bin/rails log:clear tmp:clear' - - puts "\n== Restarting application server ==" - system! 'bin/rails restart' -end diff --git a/examples/rails-custom-login-page/bin/yarn b/examples/rails-custom-login-page/bin/yarn deleted file mode 100755 index c2bacef..0000000 --- a/examples/rails-custom-login-page/bin/yarn +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env ruby -VENDOR_PATH = File.expand_path('..', __dir__) -Dir.chdir(VENDOR_PATH) do - begin - exec "yarnpkg #{ARGV.join(" ")}" - rescue Errno::ENOENT - $stderr.puts "Yarn executable was not detected in the system." - $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install" - exit 1 - end -end diff --git a/examples/rails-custom-login-page/config.ru b/examples/rails-custom-login-page/config.ru deleted file mode 100644 index f7ba0b5..0000000 --- a/examples/rails-custom-login-page/config.ru +++ /dev/null @@ -1,5 +0,0 @@ -# This file is used by Rack-based servers to start the application. - -require_relative 'config/environment' - -run Rails.application diff --git a/examples/rails-custom-login-page/config/application.rb b/examples/rails-custom-login-page/config/application.rb deleted file mode 100644 index 4ee228c..0000000 --- a/examples/rails-custom-login-page/config/application.rb +++ /dev/null @@ -1,18 +0,0 @@ -require_relative 'boot' - -require 'rails/all' - -# Require the gems listed in Gemfile, including any gems -# you've limited to :test, :development, or :production. -Bundler.require(*Rails.groups) - -module OneloginOidcRails - class Application < Rails::Application - # Initialize configuration defaults for originally generated Rails version. - config.load_defaults 5.1 - - # Settings in config/environments/* take precedence over those specified here. - # Application configuration should go into files in config/initializers - # -- all .rb files in that directory are automatically loaded. - end -end diff --git a/examples/rails-custom-login-page/config/boot.rb b/examples/rails-custom-login-page/config/boot.rb deleted file mode 100644 index 30f5120..0000000 --- a/examples/rails-custom-login-page/config/boot.rb +++ /dev/null @@ -1,3 +0,0 @@ -ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) - -require 'bundler/setup' # Set up gems listed in the Gemfile. diff --git a/examples/rails-custom-login-page/config/cable.yml b/examples/rails-custom-login-page/config/cable.yml deleted file mode 100644 index 407607a..0000000 --- a/examples/rails-custom-login-page/config/cable.yml +++ /dev/null @@ -1,10 +0,0 @@ -development: - adapter: async - -test: - adapter: async - -production: - adapter: redis - url: redis://localhost:6379/1 - channel_prefix: onelogin-oidc-rails_production diff --git a/examples/rails-custom-login-page/config/database.yml b/examples/rails-custom-login-page/config/database.yml deleted file mode 100644 index 0d02f24..0000000 --- a/examples/rails-custom-login-page/config/database.yml +++ /dev/null @@ -1,25 +0,0 @@ -# SQLite version 3.x -# gem install sqlite3 -# -# Ensure the SQLite 3 gem is defined in your Gemfile -# gem 'sqlite3' -# -default: &default - adapter: sqlite3 - pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> - timeout: 5000 - -development: - <<: *default - database: db/development.sqlite3 - -# Warning: The database defined as "test" will be erased and -# re-generated from your development database when you run "rake". -# Do not set this db to the same as development or production. -test: - <<: *default - database: db/test.sqlite3 - -production: - <<: *default - database: db/production.sqlite3 diff --git a/examples/rails-custom-login-page/config/environment.rb b/examples/rails-custom-login-page/config/environment.rb deleted file mode 100644 index 426333b..0000000 --- a/examples/rails-custom-login-page/config/environment.rb +++ /dev/null @@ -1,5 +0,0 @@ -# Load the Rails application. -require_relative 'application' - -# Initialize the Rails application. -Rails.application.initialize! diff --git a/examples/rails-custom-login-page/config/environments/development.rb b/examples/rails-custom-login-page/config/environments/development.rb deleted file mode 100644 index 5187e22..0000000 --- a/examples/rails-custom-login-page/config/environments/development.rb +++ /dev/null @@ -1,54 +0,0 @@ -Rails.application.configure do - # Settings specified here will take precedence over those in config/application.rb. - - # In the development environment your application's code is reloaded on - # every request. This slows down response time but is perfect for development - # since you don't have to restart the web server when you make code changes. - config.cache_classes = false - - # Do not eager load code on boot. - config.eager_load = false - - # Show full error reports. - config.consider_all_requests_local = true - - # Enable/disable caching. By default caching is disabled. - if Rails.root.join('tmp/caching-dev.txt').exist? - config.action_controller.perform_caching = true - - config.cache_store = :memory_store - config.public_file_server.headers = { - 'Cache-Control' => "public, max-age=#{2.days.seconds.to_i}" - } - else - config.action_controller.perform_caching = false - - config.cache_store = :null_store - end - - # Don't care if the mailer can't send. - config.action_mailer.raise_delivery_errors = false - - config.action_mailer.perform_caching = false - - # Print deprecation notices to the Rails logger. - config.active_support.deprecation = :log - - # Raise an error on page load if there are pending migrations. - config.active_record.migration_error = :page_load - - # Debug mode disables concatenation and preprocessing of assets. - # This option may cause significant delays in view rendering with a large - # number of complex assets. - config.assets.debug = true - - # Suppress logger output for asset requests. - config.assets.quiet = true - - # Raises error for missing translations - # config.action_view.raise_on_missing_translations = true - - # Use an evented file watcher to asynchronously detect changes in source code, - # routes, locales, etc. This feature depends on the listen gem. - config.file_watcher = ActiveSupport::EventedFileUpdateChecker -end diff --git a/examples/rails-custom-login-page/config/environments/production.rb b/examples/rails-custom-login-page/config/environments/production.rb deleted file mode 100644 index e4dd79d..0000000 --- a/examples/rails-custom-login-page/config/environments/production.rb +++ /dev/null @@ -1,91 +0,0 @@ -Rails.application.configure do - # Settings specified here will take precedence over those in config/application.rb. - - # Code is not reloaded between requests. - config.cache_classes = true - - # Eager load code on boot. This eager loads most of Rails and - # your application in memory, allowing both threaded web servers - # and those relying on copy on write to perform better. - # Rake tasks automatically ignore this option for performance. - config.eager_load = true - - # Full error reports are disabled and caching is turned on. - config.consider_all_requests_local = false - config.action_controller.perform_caching = true - - # Attempt to read encrypted secrets from `config/secrets.yml.enc`. - # Requires an encryption key in `ENV["RAILS_MASTER_KEY"]` or - # `config/secrets.yml.key`. - config.read_encrypted_secrets = true - - # Disable serving static files from the `/public` folder by default since - # Apache or NGINX already handles this. - config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? - - # Compress JavaScripts and CSS. - config.assets.js_compressor = :uglifier - # config.assets.css_compressor = :sass - - # Do not fallback to assets pipeline if a precompiled asset is missed. - config.assets.compile = false - - # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb - - # Enable serving of images, stylesheets, and JavaScripts from an asset server. - # config.action_controller.asset_host = 'http://assets.example.com' - - # Specifies the header that your server uses for sending files. - # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache - # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX - - # Mount Action Cable outside main process or domain - # config.action_cable.mount_path = nil - # config.action_cable.url = 'wss://example.com/cable' - # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ] - - # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. - # config.force_ssl = true - - # Use the lowest log level to ensure availability of diagnostic information - # when problems arise. - config.log_level = :debug - - # Prepend all log lines with the following tags. - config.log_tags = [ :request_id ] - - # Use a different cache store in production. - # config.cache_store = :mem_cache_store - - # Use a real queuing backend for Active Job (and separate queues per environment) - # config.active_job.queue_adapter = :resque - # config.active_job.queue_name_prefix = "onelogin-oidc-rails_#{Rails.env}" - config.action_mailer.perform_caching = false - - # Ignore bad email addresses and do not raise email delivery errors. - # Set this to true and configure the email server for immediate delivery to raise delivery errors. - # config.action_mailer.raise_delivery_errors = false - - # Enable locale fallbacks for I18n (makes lookups for any locale fall back to - # the I18n.default_locale when a translation cannot be found). - config.i18n.fallbacks = true - - # Send deprecation notices to registered listeners. - config.active_support.deprecation = :notify - - # Use default logging formatter so that PID and timestamp are not suppressed. - config.log_formatter = ::Logger::Formatter.new - - # Use a different logger for distributed setups. - # require 'syslog/logger' - # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name') - - if ENV["RAILS_LOG_TO_STDOUT"].present? - logger = ActiveSupport::Logger.new(STDOUT) - logger.formatter = config.log_formatter - config.logger = ActiveSupport::TaggedLogging.new(logger) - end - - # Do not dump schema after migrations. - config.active_record.dump_schema_after_migration = false -end diff --git a/examples/rails-custom-login-page/config/environments/test.rb b/examples/rails-custom-login-page/config/environments/test.rb deleted file mode 100644 index 8e5cbde..0000000 --- a/examples/rails-custom-login-page/config/environments/test.rb +++ /dev/null @@ -1,42 +0,0 @@ -Rails.application.configure do - # Settings specified here will take precedence over those in config/application.rb. - - # The test environment is used exclusively to run your application's - # test suite. You never need to work with it otherwise. Remember that - # your test database is "scratch space" for the test suite and is wiped - # and recreated between test runs. Don't rely on the data there! - config.cache_classes = true - - # Do not eager load code on boot. This avoids loading your whole application - # just for the purpose of running a single test. If you are using a tool that - # preloads Rails for running tests, you may have to set it to true. - config.eager_load = false - - # Configure public file server for tests with Cache-Control for performance. - config.public_file_server.enabled = true - config.public_file_server.headers = { - 'Cache-Control' => "public, max-age=#{1.hour.seconds.to_i}" - } - - # Show full error reports and disable caching. - config.consider_all_requests_local = true - config.action_controller.perform_caching = false - - # Raise exceptions instead of rendering exception templates. - config.action_dispatch.show_exceptions = false - - # Disable request forgery protection in test environment. - config.action_controller.allow_forgery_protection = false - config.action_mailer.perform_caching = false - - # Tell Action Mailer not to deliver emails to the real world. - # The :test delivery method accumulates sent emails in the - # ActionMailer::Base.deliveries array. - config.action_mailer.delivery_method = :test - - # Print deprecation notices to the stderr. - config.active_support.deprecation = :stderr - - # Raises error for missing translations - # config.action_view.raise_on_missing_translations = true -end diff --git a/examples/rails-custom-login-page/config/initializers/application_controller_renderer.rb b/examples/rails-custom-login-page/config/initializers/application_controller_renderer.rb deleted file mode 100644 index 89d2efa..0000000 --- a/examples/rails-custom-login-page/config/initializers/application_controller_renderer.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# ActiveSupport::Reloader.to_prepare do -# ApplicationController.renderer.defaults.merge!( -# http_host: 'example.org', -# https: false -# ) -# end diff --git a/examples/rails-custom-login-page/config/initializers/assets.rb b/examples/rails-custom-login-page/config/initializers/assets.rb deleted file mode 100644 index 4b828e8..0000000 --- a/examples/rails-custom-login-page/config/initializers/assets.rb +++ /dev/null @@ -1,14 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Version of your assets, change this if you want to expire all your assets. -Rails.application.config.assets.version = '1.0' - -# Add additional assets to the asset load path. -# Rails.application.config.assets.paths << Emoji.images_path -# Add Yarn node_modules folder to the asset load path. -Rails.application.config.assets.paths << Rails.root.join('node_modules') - -# Precompile additional assets. -# application.js, application.css, and all non-JS/CSS in the app/assets -# folder are already added. -# Rails.application.config.assets.precompile += %w( admin.js admin.css ) diff --git a/examples/rails-custom-login-page/config/initializers/backtrace_silencers.rb b/examples/rails-custom-login-page/config/initializers/backtrace_silencers.rb deleted file mode 100644 index 59385cd..0000000 --- a/examples/rails-custom-login-page/config/initializers/backtrace_silencers.rb +++ /dev/null @@ -1,7 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. -# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } - -# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. -# Rails.backtrace_cleaner.remove_silencers! diff --git a/examples/rails-custom-login-page/config/initializers/cookies_serializer.rb b/examples/rails-custom-login-page/config/initializers/cookies_serializer.rb deleted file mode 100644 index 5a6a32d..0000000 --- a/examples/rails-custom-login-page/config/initializers/cookies_serializer.rb +++ /dev/null @@ -1,5 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Specify a serializer for the signed and encrypted cookie jars. -# Valid options are :json, :marshal, and :hybrid. -Rails.application.config.action_dispatch.cookies_serializer = :json diff --git a/examples/rails-custom-login-page/config/initializers/filter_parameter_logging.rb b/examples/rails-custom-login-page/config/initializers/filter_parameter_logging.rb deleted file mode 100644 index 4a994e1..0000000 --- a/examples/rails-custom-login-page/config/initializers/filter_parameter_logging.rb +++ /dev/null @@ -1,4 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Configure sensitive parameters which will be filtered from the log file. -Rails.application.config.filter_parameters += [:password] diff --git a/examples/rails-custom-login-page/config/initializers/inflections.rb b/examples/rails-custom-login-page/config/initializers/inflections.rb deleted file mode 100644 index ac033bf..0000000 --- a/examples/rails-custom-login-page/config/initializers/inflections.rb +++ /dev/null @@ -1,16 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Add new inflection rules using the following format. Inflections -# are locale specific, and you may define rules for as many different -# locales as you wish. All of these examples are active by default: -# ActiveSupport::Inflector.inflections(:en) do |inflect| -# inflect.plural /^(ox)$/i, '\1en' -# inflect.singular /^(ox)en/i, '\1' -# inflect.irregular 'person', 'people' -# inflect.uncountable %w( fish sheep ) -# end - -# These inflection rules are supported but not enabled by default: -# ActiveSupport::Inflector.inflections(:en) do |inflect| -# inflect.acronym 'RESTful' -# end diff --git a/examples/rails-custom-login-page/config/initializers/mime_types.rb b/examples/rails-custom-login-page/config/initializers/mime_types.rb deleted file mode 100644 index dc18996..0000000 --- a/examples/rails-custom-login-page/config/initializers/mime_types.rb +++ /dev/null @@ -1,4 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Add new mime types for use in respond_to blocks: -# Mime::Type.register "text/richtext", :rtf diff --git a/examples/rails-custom-login-page/config/initializers/onelogin.rb b/examples/rails-custom-login-page/config/initializers/onelogin.rb deleted file mode 100644 index 28abd50..0000000 --- a/examples/rails-custom-login-page/config/initializers/onelogin.rb +++ /dev/null @@ -1,6 +0,0 @@ -ONELOGIN_CLIENT_ID = Rails.application.secrets.ONELOGIN_CLIENT_ID -ONELOGIN_CLIENT_SECRET = Rails.application.secrets.ONELOGIN_CLIENT_SECRET -ONELOGIN_REGION = Rails.application.secrets.ONELOGIN_REGION -ONELOGIN_SUBDOMAIN = Rails.application.secrets.ONELOGIN_SUBDOMAIN -CUSTOM_DOMAIN = Rails.application.secrets.CUSTOM_DOMAIN -COOKIE_VIA_POST_FORM = Rails.application.secrets.COOKIE_VIA_POST_FORM diff --git a/examples/rails-custom-login-page/config/initializers/wrap_parameters.rb b/examples/rails-custom-login-page/config/initializers/wrap_parameters.rb deleted file mode 100644 index bbfc396..0000000 --- a/examples/rails-custom-login-page/config/initializers/wrap_parameters.rb +++ /dev/null @@ -1,14 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# This file contains settings for ActionController::ParamsWrapper which -# is enabled by default. - -# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. -ActiveSupport.on_load(:action_controller) do - wrap_parameters format: [:json] -end - -# To enable root element in JSON for ActiveRecord objects. -# ActiveSupport.on_load(:active_record) do -# self.include_root_in_json = true -# end diff --git a/examples/rails-custom-login-page/config/locales/en.yml b/examples/rails-custom-login-page/config/locales/en.yml deleted file mode 100644 index decc5a8..0000000 --- a/examples/rails-custom-login-page/config/locales/en.yml +++ /dev/null @@ -1,33 +0,0 @@ -# Files in the config/locales directory are used for internationalization -# and are automatically loaded by Rails. If you want to use locales other -# than English, add the necessary files in this directory. -# -# To use the locales, use `I18n.t`: -# -# I18n.t 'hello' -# -# In views, this is aliased to just `t`: -# -# <%= t('hello') %> -# -# To use a different locale, set it with `I18n.locale`: -# -# I18n.locale = :es -# -# This would use the information in config/locales/es.yml. -# -# The following keys must be escaped otherwise they will not be retrieved by -# the default I18n backend: -# -# true, false, on, off, yes, no -# -# Instead, surround them with single quotes. -# -# en: -# 'true': 'foo' -# -# To learn more, please read the Rails Internationalization guide -# available at http://guides.rubyonrails.org/i18n.html. - -en: - hello: "Hello world" diff --git a/examples/rails-custom-login-page/config/puma.rb b/examples/rails-custom-login-page/config/puma.rb deleted file mode 100644 index 1e19380..0000000 --- a/examples/rails-custom-login-page/config/puma.rb +++ /dev/null @@ -1,56 +0,0 @@ -# Puma can serve each request in a thread from an internal thread pool. -# The `threads` method setting takes two numbers: a minimum and maximum. -# Any libraries that use thread pools should be configured to match -# the maximum value specified for Puma. Default is set to 5 threads for minimum -# and maximum; this matches the default thread size of Active Record. -# -threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 } -threads threads_count, threads_count - -# Specifies the `port` that Puma will listen on to receive requests; default is 3000. -# -port ENV.fetch("PORT") { 3000 } - -# Specifies the `environment` that Puma will run in. -# -environment ENV.fetch("RAILS_ENV") { "development" } - -# Specifies the number of `workers` to boot in clustered mode. -# Workers are forked webserver processes. If using threads and workers together -# the concurrency of the application would be max `threads` * `workers`. -# Workers do not work on JRuby or Windows (both of which do not support -# processes). -# -# workers ENV.fetch("WEB_CONCURRENCY") { 2 } - -# Use the `preload_app!` method when specifying a `workers` number. -# This directive tells Puma to first boot the application and load code -# before forking the application. This takes advantage of Copy On Write -# process behavior so workers use less memory. If you use this option -# you need to make sure to reconnect any threads in the `on_worker_boot` -# block. -# -# preload_app! - -# If you are preloading your application and using Active Record, it's -# recommended that you close any connections to the database before workers -# are forked to prevent connection leakage. -# -# before_fork do -# ActiveRecord::Base.connection_pool.disconnect! if defined?(ActiveRecord) -# end - -# The code in the `on_worker_boot` will be called if you are using -# clustered mode by specifying a number of `workers`. After each worker -# process is booted, this block will be run. If you are using the `preload_app!` -# option, you will want to use this block to reconnect to any threads -# or connections that may have been created at application boot, as Ruby -# cannot share connections between processes. -# -# on_worker_boot do -# ActiveRecord::Base.establish_connection if defined?(ActiveRecord) -# end -# - -# Allow puma to be restarted by `rails restart` command. -plugin :tmp_restart diff --git a/examples/rails-custom-login-page/config/routes.rb b/examples/rails-custom-login-page/config/routes.rb deleted file mode 100644 index 292097b..0000000 --- a/examples/rails-custom-login-page/config/routes.rb +++ /dev/null @@ -1,23 +0,0 @@ -Rails.application.routes.draw do - get 'home/index' - - post 'login', to: 'sessions#new', as: 'new_session' - get 'logout', to: 'sessions#destroy', as: 'destroy_session' - post 'verify_mfa', to: 'sessions#verify', as: 'verify_mfa' - post 'forgot_password', to: 'sessions#forgot_password', as: 'forgot_password' - post 'reset_password', to: 'sessions#reset_password', as: 'reset_password' - - get 'dashboard', to: 'dashboard#index' - - get 'users', to: 'users#index' - get 'users/:id', to: 'users#show', as: 'user' - get 'signup', to: 'users#new' - get 'onboard', to: 'users#onboard' - post 'users', to: 'users#create' - post 'activate', to: 'users#activate' - get 'users/:id/edit', to: 'users#edit', as: 'edit_user' - patch 'users/:id', to: 'users#update', as: 'update_user' - - root 'home#index' - # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html -end diff --git a/examples/rails-custom-login-page/config/secrets.yml.sample b/examples/rails-custom-login-page/config/secrets.yml.sample deleted file mode 100644 index 70b29ba..0000000 --- a/examples/rails-custom-login-page/config/secrets.yml.sample +++ /dev/null @@ -1,38 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Your secret key is used for verifying the integrity of signed cookies. -# If you change this key, all old signed cookies will become invalid! - -# Make sure the secret is at least 30 characters and all random, -# no regular words or you'll be exposed to dictionary attacks. -# You can use `rails secret` to generate a secure secret key. - -# Make sure the secrets in this file are kept private -# if you're sharing your code publicly. - -# Shared secrets are available across all environments. - -# shared: -# api_key: a1B2c3D4e5F6 - -# Environmental secrets are only available for that specific environment. - -development: - secret_key_base: 8675d963d3be368312020c957a4967d38f8b94e9100226731141c00a675d7cd991a7c29a4d01c35513edf50893e169df8d70cd6f216f701470c610a04b9e9828 - ONELOGIN_CLIENT_ID: - ONELOGIN_CLIENT_SECRET: - ONELOGIN_REGION: us - ONELOGIN_SUBDOMAIN: - CUSTOM_DOMAIN: - COOKIE_VIA_POST_FORM: - -test: - secret_key_base: 4560f08eba120b9601635410e1ceb958d9e119733b1ed614dee82dfb8cd6d121ed756463ae53dd9876bea1995505f85f8c86cc6848397fd2b3f63ae4f8980d30 - -# Do not keep production secrets in the unencrypted secrets file. -# Instead, either read values from the environment. -# Or, use `bin/rails secrets:setup` to configure encrypted secrets -# and move the `production:` environment over there. - -production: - secret_key_base: <%= ENV["SECRET_KEY_BASE"] %> diff --git a/examples/rails-custom-login-page/config/spring.rb b/examples/rails-custom-login-page/config/spring.rb deleted file mode 100644 index c9119b4..0000000 --- a/examples/rails-custom-login-page/config/spring.rb +++ /dev/null @@ -1,6 +0,0 @@ -%w( - .ruby-version - .rbenv-vars - tmp/restart.txt - tmp/caching-dev.txt -).each { |path| Spring.watch(path) } diff --git a/examples/rails-custom-login-page/db/seeds.rb b/examples/rails-custom-login-page/db/seeds.rb deleted file mode 100644 index 1beea2a..0000000 --- a/examples/rails-custom-login-page/db/seeds.rb +++ /dev/null @@ -1,7 +0,0 @@ -# This file should contain all the record creation needed to seed the database with its default values. -# The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup). -# -# Examples: -# -# movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }]) -# Character.create(name: 'Luke', movie: movies.first) diff --git a/examples/rails-custom-login-page/lib/assets/.keep b/examples/rails-custom-login-page/lib/assets/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/examples/rails-custom-login-page/lib/tasks/.keep b/examples/rails-custom-login-page/lib/tasks/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/examples/rails-custom-login-page/package.json b/examples/rails-custom-login-page/package.json deleted file mode 100644 index 2c0227f..0000000 --- a/examples/rails-custom-login-page/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "onelogin-oidc-rails", - "private": true, - "dependencies": {} -} diff --git a/examples/rails-custom-login-page/public/404.html b/examples/rails-custom-login-page/public/404.html deleted file mode 100644 index 2be3af2..0000000 --- a/examples/rails-custom-login-page/public/404.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - The page you were looking for doesn't exist (404) - - - - - - -
-
-

The page you were looking for doesn't exist.

-

You may have mistyped the address or the page may have moved.

-
-

If you are the application owner check the logs for more information.

-
- - diff --git a/examples/rails-custom-login-page/public/422.html b/examples/rails-custom-login-page/public/422.html deleted file mode 100644 index c08eac0..0000000 --- a/examples/rails-custom-login-page/public/422.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - The change you wanted was rejected (422) - - - - - - -
-
-

The change you wanted was rejected.

-

Maybe you tried to change something you didn't have access to.

-
-

If you are the application owner check the logs for more information.

-
- - diff --git a/examples/rails-custom-login-page/public/500.html b/examples/rails-custom-login-page/public/500.html deleted file mode 100644 index 78a030a..0000000 --- a/examples/rails-custom-login-page/public/500.html +++ /dev/null @@ -1,66 +0,0 @@ - - - - We're sorry, but something went wrong (500) - - - - - - -
-
-

We're sorry, but something went wrong.

-
-

If you are the application owner check the logs for more information.

-
- - diff --git a/examples/rails-custom-login-page/public/apple-touch-icon-precomposed.png b/examples/rails-custom-login-page/public/apple-touch-icon-precomposed.png deleted file mode 100644 index e69de29..0000000 diff --git a/examples/rails-custom-login-page/public/apple-touch-icon.png b/examples/rails-custom-login-page/public/apple-touch-icon.png deleted file mode 100644 index e69de29..0000000 diff --git a/examples/rails-custom-login-page/public/favicon.ico b/examples/rails-custom-login-page/public/favicon.ico deleted file mode 100644 index e69de29..0000000 diff --git a/examples/rails-custom-login-page/public/robots.txt b/examples/rails-custom-login-page/public/robots.txt deleted file mode 100644 index 37b576a..0000000 --- a/examples/rails-custom-login-page/public/robots.txt +++ /dev/null @@ -1 +0,0 @@ -# See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file diff --git a/examples/rails-custom-login-page/test/application_system_test_case.rb b/examples/rails-custom-login-page/test/application_system_test_case.rb deleted file mode 100644 index d19212a..0000000 --- a/examples/rails-custom-login-page/test/application_system_test_case.rb +++ /dev/null @@ -1,5 +0,0 @@ -require "test_helper" - -class ApplicationSystemTestCase < ActionDispatch::SystemTestCase - driven_by :selenium, using: :chrome, screen_size: [1400, 1400] -end diff --git a/examples/rails-custom-login-page/test/controllers/.keep b/examples/rails-custom-login-page/test/controllers/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/examples/rails-custom-login-page/test/controllers/dashboard_controller_test.rb b/examples/rails-custom-login-page/test/controllers/dashboard_controller_test.rb deleted file mode 100644 index a0b2184..0000000 --- a/examples/rails-custom-login-page/test/controllers/dashboard_controller_test.rb +++ /dev/null @@ -1,9 +0,0 @@ -require 'test_helper' - -class DashboardControllerTest < ActionDispatch::IntegrationTest - test "should get index" do - get dashboard_index_url - assert_response :success - end - -end diff --git a/examples/rails-custom-login-page/test/controllers/home_controller_test.rb b/examples/rails-custom-login-page/test/controllers/home_controller_test.rb deleted file mode 100644 index 6013b68..0000000 --- a/examples/rails-custom-login-page/test/controllers/home_controller_test.rb +++ /dev/null @@ -1,9 +0,0 @@ -require 'test_helper' - -class HomeControllerTest < ActionDispatch::IntegrationTest - test "should get index" do - get home_index_url - assert_response :success - end - -end diff --git a/examples/rails-custom-login-page/test/controllers/sessions_controller_test.rb b/examples/rails-custom-login-page/test/controllers/sessions_controller_test.rb deleted file mode 100644 index 6135ce6..0000000 --- a/examples/rails-custom-login-page/test/controllers/sessions_controller_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'test_helper' - -class SessionsControllerTest < ActionDispatch::IntegrationTest - # test "the truth" do - # assert true - # end -end diff --git a/examples/rails-custom-login-page/test/controllers/users_controller_test.rb b/examples/rails-custom-login-page/test/controllers/users_controller_test.rb deleted file mode 100644 index 2d142e6..0000000 --- a/examples/rails-custom-login-page/test/controllers/users_controller_test.rb +++ /dev/null @@ -1,48 +0,0 @@ -require 'test_helper' - -class UsersControllerTest < ActionDispatch::IntegrationTest - setup do - @user = users(:one) - end - - test "should get index" do - get users_url - assert_response :success - end - - test "should get new" do - get new_user_url - assert_response :success - end - - test "should create user" do - assert_difference('User.count') do - post users_url, params: { user: { } } - end - - assert_redirected_to user_url(User.last) - end - - test "should show user" do - get user_url(@user) - assert_response :success - end - - test "should get edit" do - get edit_user_url(@user) - assert_response :success - end - - test "should update user" do - patch user_url(@user), params: { user: { } } - assert_redirected_to user_url(@user) - end - - test "should destroy user" do - assert_difference('User.count', -1) do - delete user_url(@user) - end - - assert_redirected_to users_url - end -end diff --git a/examples/rails-custom-login-page/test/fixtures/.keep b/examples/rails-custom-login-page/test/fixtures/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/examples/rails-custom-login-page/test/fixtures/files/.keep b/examples/rails-custom-login-page/test/fixtures/files/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/examples/rails-custom-login-page/test/helpers/.keep b/examples/rails-custom-login-page/test/helpers/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/examples/rails-custom-login-page/test/integration/.keep b/examples/rails-custom-login-page/test/integration/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/examples/rails-custom-login-page/test/mailers/.keep b/examples/rails-custom-login-page/test/mailers/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/examples/rails-custom-login-page/test/models/.keep b/examples/rails-custom-login-page/test/models/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/examples/rails-custom-login-page/test/system/.keep b/examples/rails-custom-login-page/test/system/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/examples/rails-custom-login-page/test/test_helper.rb b/examples/rails-custom-login-page/test/test_helper.rb deleted file mode 100644 index e3c4ff0..0000000 --- a/examples/rails-custom-login-page/test/test_helper.rb +++ /dev/null @@ -1,9 +0,0 @@ -require File.expand_path('../../config/environment', __FILE__) -require 'rails/test_help' - -class ActiveSupport::TestCase - # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. - fixtures :all - - # Add more helper methods to be used by all tests here... -end diff --git a/examples/rails-custom-login-page/vendor/.keep b/examples/rails-custom-login-page/vendor/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/git_push.sh b/git_push.sh new file mode 100644 index 0000000..f53a75d --- /dev/null +++ b/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/lib/onelogin.rb b/lib/onelogin.rb deleted file mode 100644 index 381ff3a..0000000 --- a/lib/onelogin.rb +++ /dev/null @@ -1 +0,0 @@ -require 'onelogin/api' \ No newline at end of file diff --git a/lib/onelogin/api.rb b/lib/onelogin/api.rb deleted file mode 100644 index 262b7ff..0000000 --- a/lib/onelogin/api.rb +++ /dev/null @@ -1,2 +0,0 @@ -require 'onelogin/api/client' -require 'onelogin/api/models' diff --git a/lib/onelogin/api/apiexception.rb b/lib/onelogin/api/apiexception.rb deleted file mode 100644 index 7be7665..0000000 --- a/lib/onelogin/api/apiexception.rb +++ /dev/null @@ -1,10 +0,0 @@ -module OneLogin - module Api - class ApiException < Exception - def initialize(message, code) - super(message) - @code = code - end - end - end -end \ No newline at end of file diff --git a/lib/onelogin/api/client.rb b/lib/onelogin/api/client.rb deleted file mode 100644 index 505e691..0000000 --- a/lib/onelogin/api/client.rb +++ /dev/null @@ -1,2954 +0,0 @@ -require 'onelogin/version' -require 'onelogin/api/apiexception' -require 'onelogin/api/cursor' -require 'onelogin/api/util' -require 'json' -require 'httparty' -require 'nokogiri' -require 'time' - -module OneLogin - module Api - # Client class - # - # Client class of the OneLogin's Ruby SDK. - # It makes the API calls to the Onelogin's platform described - # at https://developers.onelogin.com/api-docs/1/getting-started/dev-overview. - # - class Client - include OneLogin::Api::Util - include HTTParty - - attr_accessor :client_id, :client_secret, :region - attr_accessor :user_agent, :error, :error_description, :error_attribute - - NOKOGIRI_OPTIONS = Nokogiri::XML::ParseOptions::STRICT | - Nokogiri::XML::ParseOptions::NONET - - DEFAULT_USER_AGENT = "onelogin-ruby-sdk v#{OneLogin::VERSION}".freeze - - # Create a new instance of the Client. - # - # @param config [Hash] Client Id, Client Secret and Region - # - def initialize(config) - options = Hash[config.map { |(k, v)| [k.to_sym, v] }] - - @client_id = options[:client_id] - @client_secret = options[:client_secret] - @region = options[:region] || 'us' - @max_results = options[:max_results] || 1000 - - if options[:timeout] and defined? self.class.default_timeout - self.class.default_timeout options[:timeout] - end - - if options[:proxy_host] - self.class.http_proxy options[:proxy_host], options[:proxy_port], options[:proxy_user], options[:proxy_pass] - end - - self.class.default_options.update(verify: false) - - validate_config - - @user_agent = DEFAULT_USER_AGENT - end - - def validate_config - raise ArgumentError, 'client_id & client_secret are required' unless @client_id && @client_secret - end - - # Clean any previous error registered at the client. - # - def clean_error - @error = nil - @error_description = nil - @error_attribute = nil - end - - def expired? - Time.now.utc > @expiration - end - - def prepare_token - if @access_token.nil? - access_token - elsif expired? - regenerate_token - end - end - - def handle_operation_response(response) - result = false - begin - content = JSON.parse(response.body) - if content - if content.has_key?('status') && content['status'].has_key?('type') && content['status']['type'] == "success" - result = true - elsif content.has_key?('success') && content['success'] - result = true - end - end - rescue Exception => e - result = false - end - - result - end - - def handle_session_token_response(response) - content = JSON.parse(response.body) - if content && content.has_key?('status') && content['status'].has_key?('message') && content.has_key?('data') - if content['status']['message'] == "Success" - return OneLogin::Api::Models::SessionTokenInfo.new(content['data'][0]) - elsif content['status']['message'] == "MFA is required for this user" - return OneLogin::Api::Models::SessionTokenMFAInfo.new(content['data'][0]) - else - raise "Status Message type not reognized: %s" % content['status']['message'] - end - end - - nil - end - - def handle_saml_endpoint_response(response) - content = JSON.parse(response.body) - if content && content.has_key?('status') && content['status'].has_key?('message') && content['status'].has_key?('type') - status_type = content['status']['type'] - status_message = content['status']['message'] - saml_endpoint_response = OneLogin::Api::Models::SAMLEndpointResponse.new(status_type, status_message) - if content.has_key?('data') - if status_message == 'Success' - saml_endpoint_response.saml_response = content['data'] - else - mfa = OneLogin::Api::Models::MFA.new(content['data'][0]) - saml_endpoint_response.mfa = mfa - end - end - - return saml_endpoint_response - end - - nil - end - - def headers - { - 'Content-Type' => 'application/json', - 'User-Agent' => @user_agent - } - end - - def authorized_headers(bearer = true) - # Removed the ":" - authorization = if bearer - "bearer #{@access_token}" - else - "client_id:#{@client_id},client_secret:#{@client_secret}" - end - - headers.merge({ - 'Authorization' => authorization - }) - end - - ############################ - # OAuth 2.0 Tokens Methods # - ############################ - - # Generates an access token and refresh token that you may use to - # call Onelogin's API methods. - # - # @return [OneLoginToken] Returns the generated OAuth Token info - # - # @see {https://developers.onelogin.com/api-docs/1/oauth20-tokens/generate-tokens Generate Tokens documentation} - def access_token - clean_error - - begin - url = url_for(TOKEN_REQUEST_URL) - - data = { - 'grant_type' => 'client_credentials' - } - - response = self.class.post( - url, - headers: authorized_headers(false), - body: data.to_json - ) - - if response.code == 200 - json_data = JSON.parse(response.body) - if json_data.has_key?('status') - @error = json_data['status']['code'].to_s - @error_description = extract_error_message_from_response(response) - else - token = OneLogin::Api::Models::OneLoginToken.new(json_data) - @access_token = token.access_token - @refresh_token = token.refresh_token - @expiration = token.created_at + token.expires_in - return token - end - else - @error = response.code.to_s - @error_description = extract_error_message_from_response(response) - end - rescue Exception => e - @error = '500' - @error_description = e.message - end - - nil - end - - # Refreshing tokens provides a new set of access and refresh tokens. - # - # @return [OneLoginToken] Returns the refreshed OAuth Token info - # - # @see {https://developers.onelogin.com/api-docs/1/oauth20-tokens/refresh-tokens Refresh Tokens documentation} - def regenerate_token - clean_error - - begin - url = url_for(TOKEN_REQUEST_URL) - - data = { - 'grant_type' => 'refresh_token', - 'access_token' => @access_token, - 'refresh_token' => @refresh_token - } - - response = self.class.post( - url, - headers: headers, - body: data.to_json - ) - - if response.code == 200 - json_data = JSON.parse(response.body) - if json_data.has_key?('status') - @error = json_data['status']['code'].to_s - @error_description = extract_error_message_from_response(response) - else - token = OneLogin::Api::Models::OneLoginToken.new(json_data) - @access_token = token.access_token - @refresh_token = token.refresh_token - @expiration = token.created_at + token.expires_in - return token - end - else - @error = response.code.to_s - @error_description = extract_error_message_from_response(response) - end - rescue Exception => e - @error = '500' - @error_description = e.message - end - - nil - end - - # Revokes an access token and refresh token pair. - # - # @return [Boolean] If the opeation succeded - # - # @see {https://developers.onelogin.com/api-docs/1/oauth20-tokens/revoke-tokens Revoke Tokens documentation} - def revoke_token - clean_error - - begin - url = url_for(TOKEN_REVOKE_URL) - - data = { - access_token: @access_token - } - - response = self.class.post( - url, - headers: authorized_headers(false), - body: data.to_json - ) - - if response.code == 200 - @access_token = nil - @refresh_token = nil - @expiration = nil - return true - else - @error = response.code.to_s - @error_description = extract_error_message_from_response(response) - end - rescue Exception => e - @error = '500' - @error_description = e.message - end - - false - end - - # Gets current rate limit details about an access token. - # - # @return [RateLimit] Returns the rate limit info - # - # @see {https://developers.onelogin.com/api-docs/1/oauth20-tokens/get-rate-limit Get Rate Limit documentation} - def get_rate_limits - clean_error - prepare_token - - begin - url = url_for(GET_RATE_URL) - - response = self.class.get( - url, - headers: authorized_headers - ) - - if response.code == 200 - json_data = JSON.parse(response.body) - if json_data && json_data['data'] - return OneLogin::Api::Models::RateLimit.new(json_data['data']) - end - else - @error = response.code.to_s - @error_description = extract_error_message_from_response(response) - end - rescue Exception => e - @error = '500' - @error_description = e.message - end - - nil - end - - ################ - # User Methods # - ################ - - # Gets a list of User resources. (if no limit provided, by default gt 50 elements) - # - # @param params [Hash] Parameters to filter the result of the list - # - # @return [Array] list of User objects - # - # @see {https://developers.onelogin.com/api-docs/1/users/get-users Get Users documentation} - def get_users(params = {}) - clean_error - prepare_token - - begin - options = { - model: OneLogin::Api::Models::User, - headers: authorized_headers, - max_results: @max_results, - params: params - } - - return Cursor.new(self, url_for(GET_USERS_URL), options) - - rescue Exception => e - @error = '500' - @error_description = e.message - end - - nil - end - - # Gets User by ID. - # - # @param user_id [Integer] Id of the user - # - # @return [User] the user identified by the id - # - # @see {https://developers.onelogin.com/api-docs/1/users/get-user-by-id Get User by ID documentation} - def get_user(user_id) - clean_error - prepare_token - - begin - if user_id.nil? || user_id.to_s.empty? - @error = '400' - @error_description = "user_id is required" - @error_attribute = "user_id" - return - end - - url = url_for(GET_USER_URL, user_id) - - response = self.class.get( - url, - headers: authorized_headers - ) - - if response.code == 200 - json_data = JSON.parse(response.body) - if json_data && json_data['data'] - return OneLogin::Api::Models::User.new(json_data['data'][0]) - end - else - @error = response.code.to_s - @error_description = extract_error_message_from_response(response) - end - rescue Exception => e - @error = '500' - @error_description = e.message - end - - nil - end - - # Gets a list of apps accessible by a user, not including personal apps. - # - # @param user_id [Integer] Id of the user - # - # @return [Array] the apps of the user identified by the id - # - # @see {https://developers.onelogin.com/api-docs/1/users/get-apps-for-user Get Apps for a User documentation} - def get_user_apps(user_id) - clean_error - prepare_token - - begin - if user_id.nil? || user_id.to_s.empty? - @error = '400' - @error_description = "user_id is required" - @error_attribute = "user_id" - return - end - - options = { - model: OneLogin::Api::Models::App, - headers: authorized_headers, - max_results: @max_results - } - - return Cursor.new(self, url_for(GET_APPS_FOR_USER_URL, user_id), options) - - rescue Exception => e - @error = '500' - @error_description = e.message - end - - nil - end - - # Gets a list of role IDs that have been assigned to a user. - # - # @param user_id [Integer] Id of the user - # - # @return [Array] the role ids of the user identified by the id - # - # @see {https://developers.onelogin.com/api-docs/1/users/get-roles-for-user Get Roles for a User documentation} - def get_user_roles(user_id) - clean_error - prepare_token - - begin - if user_id.nil? || user_id.to_s.empty? - @error = '400' - @error_description = "user_id is required" - @error_attribute = "user_id" - return - end - - url = url_for(GET_ROLES_FOR_USER_URL, user_id) - - response = self.class.get( - url, - headers: authorized_headers - ) - - role_ids = [] - if response.code == 200 - json_data = JSON.parse(response.body) - role_ids = json_data['data'][0] if json_data && json_data['data'] - else - @error = response.code.to_s - @error_description = extract_error_message_from_response(response) - end - - return role_ids - rescue Exception => e - @error = '500' - @error_description = e.message - end - - nil - end - - # Gets a list of all custom attribute fields (also known as custom user fields) that have been defined for OL account. - # - # @return [Array] the custom attributes of the account - # - # @see {https://developers.onelogin.com/api-docs/1/users/get-custom-attributes Get Custom Attributes documentation} - def get_custom_attributes - clean_error - prepare_token - - begin - url = url_for(GET_CUSTOM_ATTRIBUTES_URL) - - response = self.class.get( - url, - headers: authorized_headers - ) - - custom_attributes = [] - if response.code == 200 - json_data = JSON.parse(response.body) - if json_data && json_data['data'] - custom_attributes = json_data['data'][0] - end - else - @error = response.code.to_s - @error_description = extract_error_message_from_response(response) - end - - return custom_attributes - rescue Exception => e - @error = '500' - @error_description = e.message - end - - nil - end - - # Creates an user - # - # @param user_params [Hash] User data (firstname, lastname, email, username, company, - # department, directory_id, distinguished_name, - # external_id, group_id, invalid_login_attempts, - # locale_code, manager_ad_id, member_of, - # openid_name, phone, samaccountname, title, - # userprincipalname) - # - # @return [User] the created user - # - # @see {https://developers.onelogin.com/api-docs/1/users/create-user Create User documentation} - def create_user(user_params) - clean_error - prepare_token - - begin - url = url_for(CREATE_USER_URL) - - response = self.class.post( - url, - headers: authorized_headers, - body: user_params.to_json - ) - - if response.code == 200 - json_data = JSON.parse(response.body) - if json_data && json_data['data'] - return OneLogin::Api::Models::User.new(json_data['data'][0]) - end - else - @error = response.code.to_s - @error_description = extract_error_message_from_response(response) - @error_attribute = extract_error_attribute_from_response(response) - end - rescue Exception => e - @error = '500' - @error_description = e.message - end - - nil - end - - # Updates an user - # - # @param user_id [Integer] Id of the user - # @param user_params [Hash] User data (firstname, lastname, email, username, company, - # department, directory_id, distinguished_name, - # external_id, group_id, invalid_login_attempts, - # locale_code, manager_ad_id, member_of, - # openid_name, phone, samaccountname, title, - # userprincipalname) - # - # @return [User] the modified user - # - # @see {https://developers.onelogin.com/api-docs/1/users/update-user Update User by ID documentation} - def update_user(user_id, user_params) - clean_error - prepare_token - - begin - if user_id.nil? || user_id.to_s.empty? - @error = '400' - @error_description = "user_id is required" - @error_attribute = "user_id" - return - end - - url = url_for(UPDATE_USER_URL, user_id) - - response = self.class.put( - url, - headers: authorized_headers, - body: user_params.to_json - ) - - if response.code == 200 - json_data = JSON.parse(response.body) - if json_data && json_data['data'] - return OneLogin::Api::Models::User.new(json_data['data'][0]) - end - else - @error = response.code.to_s - @error_description = extract_error_message_from_response(response) - @error_attribute = extract_error_attribute_from_response(response) - end - rescue Exception => e - @error = '500' - @error_description = e.message - end - - nil - end - - # Assigns Roles to User - # - # @param user_id [Integer] Id of the user - # @param role_ids [Array] List of role ids to be added - # - # @return [Boolean] if the action succeed - # - # @see {https://developers.onelogin.com/api-docs/1/users/assign-role-to-user Assign Role to User documentation} - def assign_role_to_user(user_id, role_ids) - clean_error - prepare_token - - begin - if user_id.nil? || user_id.to_s.empty? - @error = '400' - @error_description = "user_id is required" - @error_attribute = "user_id" - return - end - - url = url_for(ADD_ROLE_TO_USER_URL, user_id) - - data = { - 'role_id_array' => role_ids - } - - response = self.class.put( - url, - headers: authorized_headers, - body: data.to_json - ) - - if response.code == 200 - return handle_operation_response(response) - else - @error = response.code.to_s - @error_description = extract_error_message_from_response(response) - @error_attribute = extract_error_attribute_from_response(response) - end - rescue Exception => e - @error = '500' - @error_description = e.message - end - - false - end - - # Removes Role from User - # - # @param user_id [Integer] Id of the user - # @param role_ids [Array] List of role ids to be removed - # - # @return [Boolean] if the action succeed - # - # @see {https://developers.onelogin.com/api-docs/1/users/remove-role-from-user Remove Role from User documentation} - def remove_role_from_user(user_id, role_ids) - clean_error - prepare_token - - begin - if user_id.nil? || user_id.to_s.empty? - @error = '400' - @error_description = "user_id is required" - @error_attribute = "user_id" - return - end - - url = url_for(DELETE_ROLE_TO_USER_URL, user_id) - - data = { - 'role_id_array' => role_ids - } - - response = self.class.put( - url, - headers: authorized_headers, - body: data.to_json - ) - - if response.code == 200 - return handle_operation_response(response) - else - @error = response.code.to_s - @error_description = extract_error_message_from_response(response) - @error_attribute = extract_error_attribute_from_response(response) - end - rescue Exception => e - @error = '500' - @error_description = e.message - end - - false - end - - # Sets Password by ID Using Cleartext - # - # @param user_id [Integer] Id of the user - # @param password [String] Set to the password value using cleartext. - # @param password_confirmation [String] Ensure that this value matches the password value exactly. - # @validate_policy [Boolean] Force validation against assigned OneLogin user password policy - # - # @return [Boolean] if the action succeed - # - # @see {https://developers.onelogin.com/api-docs/1/users/set-password-in-cleartext Set Password by ID Using Cleartext documentation} - def set_password_using_clear_text(user_id, password, password_confirmation, validate_policy=false) - clean_error - prepare_token - - begin - if user_id.nil? || user_id.to_s.empty? - @error = '400' - @error_description = "user_id is required" - @error_attribute = "user_id" - return - end - - url = url_for(SET_PW_CLEARTEXT, user_id) - - data = { - 'password' => password, - 'password_confirmation' => password_confirmation, - 'validate_policy' => validate_policy - } - - response = self.class.put( - url, - headers: authorized_headers, - body: data.to_json - ) - - if response.code == 200 - return handle_operation_response(response) - else - @error = response.code.to_s - @error_description = extract_error_message_from_response(response) - @error_attribute = extract_error_attribute_from_response(response) - end - rescue Exception => e - @error = '500' - @error_description = e.message - end - - false - end - - # Set Password by ID Using Salt and SHA-256 - # - # @param user_id [Integer] Id of the user - # @param password [String] Set to the password value using cleartext. - # @param password_confirmation [String] Ensure that this value matches the password value exactly. - # @param password_algorithm [String] Set to salt+sha256. - # @param password_salt [String] (Optional) To provide your own salt value. - # - # @return [Boolean] if the action succeed - # - # @see {https://developers.onelogin.com/api-docs/1/users/set-password-using-sha-256 Set Password by ID Using Salt and SHA-256 documentation} - def set_password_using_hash_salt(user_id, password, password_confirmation, password_algorithm, password_salt=nil) - clean_error - prepare_token - - begin - if user_id.nil? || user_id.to_s.empty? - @error = '400' - @error_description = "user_id is required" - @error_attribute = "user_id" - return - end - - url = url_for(SET_PW_SALT, user_id) - - data = { - 'password' => password, - 'password_confirmation' => password_confirmation, - 'password_algorithm' => password_algorithm - } - - unless password_salt.nil? - data['password_salt'] = password_salt - end - - response = self.class.put( - url, - headers: authorized_headers, - body: data.to_json - ) - - if response.code == 200 - return handle_operation_response(response) - else - @error = response.code.to_s - @error_description = extract_error_message_from_response(response) - @error_attribute = extract_error_attribute_from_response(response) - end - rescue Exception => e - @error = '500' - @error_description = e.message - end - - false - end - - # Set User State - # - # @param id [Integer] Id of the user to be modified - # @param state [Integer] Set to the state value. [Unapproved: 0, Approved (licensed): 1, Rejected: 2, Unlicensed: 3] - # - # @return [Boolean] if the action succeed - # - # @see {https://developers.onelogin.com/api-docs/1/users/set-state Set User State documentation} - def set_state_to_user(user_id, state) - clean_error - prepare_token - - begin - if user_id.nil? || user_id.to_s.empty? - @error = '400' - @error_description = "user_id is required" - @error_attribute = "user_id" - return - end - - url = url_for(SET_USER_STATE_URL, user_id) - - data = { - 'state' => state - } - - response = self.class.put( - url, - headers: authorized_headers, - body: data.to_json - ) - - if response.code == 200 - return handle_operation_response(response) - else - @error = response.code.to_s - @error_description = extract_error_message_from_response(response) - @error_attribute = extract_error_attribute_from_response(response) - end - rescue Exception => e - @error = '500' - @error_description = e.message - end - - false - end - - # Set Custom Attribute Value - # - # @param user_id [Integer] Id of the user - # @param custom_attributes [Hash] Provide one or more key value pairs composed of the custom attribute field shortname and the value that you want to set the field to. - # - # @return [Boolean] if the action succeed - # - # @see {https://developers.onelogin.com/api-docs/1/users/set-custom-attribute Set Custom Attribute Value documentation} - def set_custom_attribute_to_user(user_id, custom_attributes) - clean_error - prepare_token - - begin - if user_id.nil? || user_id.to_s.empty? - @error = '400' - @error_description = "user_id is required" - @error_attribute = "user_id" - return - end - - url = url_for(SET_CUSTOM_ATTRIBUTE_TO_USER_URL, user_id) - - data = { - 'custom_attributes' => custom_attributes - } - - response = self.class.put( - url, - headers: authorized_headers, - body: data.to_json - ) - - if response.code == 200 - return handle_operation_response(response) - else - @error = response.code.to_s - @error_description = extract_error_message_from_response(response) - @error_attribute = extract_error_attribute_from_response(response) - end - rescue Exception => e - @error = '500' - @error_description = e.message - end - - false - end - - # Log a user out of any and all sessions. - # - # @param user_id [Integer] Id of the user to be logged out - # - # @return [Boolean] if the action succeed - # - # @see {https://developers.onelogin.com/api-docs/1/users/log-user-out Log User Out documentation} - def log_user_out(user_id) - clean_error - prepare_token - - begin - if user_id.nil? || user_id.to_s.empty? - @error = '400' - @error_description = "user_id is required" - @error_attribute = "user_id" - return - end - - url = url_for(LOG_USER_OUT_URL, user_id) - - response = self.class.put( - url, - headers: authorized_headers - ) - - if response.code == 200 - return handle_operation_response(response) - else - @error = response.code.to_s - @error_description = extract_error_message_from_response(response) - @error_attribute = extract_error_attribute_from_response(response) - end - rescue Exception => e - @error = '500' - @error_description = e.message - end - - false - end - - # Use this call to lock a user's account based on the policy assigned to - # the user, for a specific time you define in the request, or until you - # unlock it. - # - # @param user_id [Integer] Id of the user to be locked - # @param minutes [Integer] Set to the number of minutes for which you want to lock the user account. (0 to delegate on policy) - # - # @return [Boolean] if the action succeed - # - # @see {https://developers.onelogin.com/api-docs/1/users/lock-user-account Lock User Account documentation} - def lock_user(user_id, minutes) - clean_error - prepare_token - - begin - if user_id.nil? || user_id.to_s.empty? - @error = '400' - @error_description = "user_id is required" - @error_attribute = "user_id" - return - end - - url = url_for(LOCK_USER_URL, user_id) - - data = { - 'locked_until' => minutes - } - - response = self.class.put( - url, - headers: authorized_headers, - body: data.to_json - ) - - if response.code == 200 - return handle_operation_response(response) - else - @error = response.code.to_s - @error_description = extract_error_message_from_response(response) - @error_attribute = extract_error_attribute_from_response(response) - end - rescue Exception => e - @error = '500' - @error_description = e.message - end - - false - end - - # Deletes an user - # - # @param user_id [Integer] Id of the user to be removed - # - # @return [Boolean] if the action succeed - # - # @see {https://developers.onelogin.com/api-docs/1/users/delete-user Delete User by ID documentation} - def delete_user(user_id) - clean_error - prepare_token - - begin - if user_id.nil? || user_id.to_s.empty? - @error = '400' - @error_description = "user_id is required" - @error_attribute = "user_id" - return - end - - url = url_for(DELETE_USER_URL, user_id) - - response = self.class.delete( - url, - headers: authorized_headers - ) - - if response.code == 200 - return handle_operation_response(response) - else - @error = response.code.to_s - @error_description = extract_error_message_from_response(response) - @error_attribute = extract_error_attribute_from_response(response) - end - rescue Exception => e - @error = '500' - @error_description = e.message - end - - false - end - - # Use to generate a temporary MFA token that can be used in place of other MFA tokens for a set time period. - # For example, use this token for account recovery. - # - # @param user_id [Integer] Id of the user - # @param expires_in [Integer] Set the duration of the token in seconds. - # (default: 259200 seconds = 72h) 72 hours is the max value. - # @param reusable [Boolean] Defines if the token reusable. (default: false) If set to true, token can be used for multiple apps, until it expires. - # - # @return [MFAToken] if the action succeed - # - # @see {https://developers.onelogin.com/api-docs/1/multi-factor-authentication/generate-mfa-token Generate MFA Token documentation} - def generate_mfa_token(user_id, expires_in=259200, reusable=false) - clean_error - prepare_token - - begin - if user_id.nil? || user_id.to_s.empty? - @error = '400' - @error_description = "user_id is required" - @error_attribute = "user_id" - return - end - - url = url_for(GENERATE_MFA_TOKEN_URL, user_id) - - data = { - 'expires_in' => expires_in, - 'reusable' => reusable - } - - response = self.class.post( - url, - headers: authorized_headers, - body: data.to_json - ) - - if response.code == 201 - json_data = JSON.parse(response.body) - if !json_data.empty? - return OneLogin::Api::Models::MFAToken.new(json_data) - end - else - @error = extract_status_code_from_response(response) - @error_description = extract_error_message_from_response(response) - end - rescue Exception => e - @error = '500' - @error_description = e.message - end - - nil - end - - # Generates a session login token in scenarios in which MFA may or may not be required. - # A session login token expires two minutes after creation. - # - # @param query_params [Hash] Query Parameters (username_or_email, password, subdomain, return_to_url, - # ip_address, browser_id) - # @param allowed_origin [String] Custom-Allowed-Origin-Header. Required for CORS requests only. - # Set to the Origin URI from which you are allowed to send a request - # using CORS. - # - # @return [SessionTokenInfo|SessionTokenMFAInfo] if the action succeed - # - # @see {https://developers.onelogin.com/api-docs/1/users/create-session-login-token Create Session Login Token documentation} - def create_session_login_token(query_params, allowed_origin='') - clean_error - prepare_token - - begin - url = url_for(SESSION_LOGIN_TOKEN_URL) - - if query_params.nil? || !query_params.has_key?('username_or_email') || !query_params.has_key?('password') || !query_params.has_key?('subdomain') - raise "username_or_email, password and subdomain are required parameters" - end - - headers = authorized_headers - if allowed_origin - headers = headers.merge({ 'Custom-Allowed-Origin-Header-1' => allowed_origin }) - end - - response = self.class.post( - url, - headers: headers, - body: query_params.to_json - ) - - if response.code == 200 - return handle_session_token_response(response) - else - @error = response.code.to_s - @error_description = extract_error_message_from_response(response) - end - rescue Exception => e - @error = '500' - @error_description = e.message - end - - nil - end - - # Verify a one-time password (OTP) value provided for multi-factor authentication (MFA). - # - # @param device_id [String] Provide the MFA device_id you are submitting for verification. - # @param state_token [String] Provide the state_token associated with the MFA device_id you are submitting for verification. - # @param otp_token [String] (Optional) Provide the OTP value for the MFA factor you are submitting for verification. - # @param allowed_origin [String] (Optional) Required for CORS requests only. Set to the Origin URI from which you are allowed to send a request using CORS. - # @param do_not_notify [String] (Optional) When verifying MFA via Protect Push, set this to true to stop additional push notifications being sent to the OneLogin Protect device. - # - # @return [SessionTokenInfo] if the action succeed - # - # @see {https://developers.onelogin.com/api-docs/1/users/verify-factor Verify Factor documentation} - def get_session_token_verified(device_id, state_token, otp_token=nil, allowed_origin='', do_not_notify=false) - clean_error - prepare_token - - begin - if device_id.nil? || device_id.to_s.empty? - @error = '400' - @error_description = "device_id is required" - @error_attribute = "device_id" - return - end - - url = url_for(GET_TOKEN_VERIFY_FACTOR) - - data = { - 'device_id'=> device_id.to_s, - 'state_token'=> state_token, - 'do_not_notify'=> do_not_notify - } - - unless otp_token.nil? || otp_token.empty? - data['otp_token'] = otp_token - end - - headers = authorized_headers - if allowed_origin - headers = headers.merge({ 'Custom-Allowed-Origin-Header-1' => allowed_origin }) - end - - response = self.class.post( - url, - headers: headers, - body: data.to_json - ) - - if response.code == 200 - return handle_session_token_response(response) - else - @error = response.code.to_s - @error_description = extract_error_message_from_response(response) - end - rescue Exception => e - @error = '500' - @error_description = e.message - end - - nil - end - - ############################### - # Onelogin Connectors Methods # - ############################### - - # Gets a list of Connector resources. - # - # @param params [Hash] Parameters to filter the result of the list - # - # @return [Array] list of Connector objects - # - # @see {https://developers.onelogin.com/api-docs/1/connectors/list-connectors List Connectors documentation} - def get_connectors(params = {}) - clean_error - prepare_token - - begin - url = url_for(GET_CONNECTORS_URL) - - connectors = [] - response = self.class.get( - url, - headers: authorized_headers, - query: params - ) - - if response.code == 200 - json_data = JSON.parse(response.body) - if !json_data.empty? - json_data.each do |data| - pp data - connectors << OneLogin::Api::Models::ConnectorBasic.new(data) - end - end - return connectors - else - @error = extract_status_code_from_response(response) - @error_description = extract_error_message_from_response(response) - end - rescue Exception => e - @error = '500' - @error_description = e.message - end - - nil - end - - ######################### - # Onelogin Apps Methods # - ######################### - - # Gets a list of OneLoginAppV1 resources. (if no limit provided, by default get 50 elements) - # - # @param params [Hash] Parameters to filter the result of the list - # - # @return [Array] list of OneLoginAppV1 objects - # - # @see {https://developers.onelogin.com/api-docs/1/apps/get-apps Get Apps documentation} - def get_apps_v1(params = {}) - clean_error - prepare_token - - begin - options = { - model: OneLogin::Api::Models::OneLoginAppV1, - headers: authorized_headers, - max_results: @max_results, - params: params - } - - return Cursor.new(self, url_for(GET_APPS_URL_V1), options) - - rescue Exception => e - @error = '500' - @error_description = e.message - end - - nil - end - - # Gets a list of OneLoginAppBasic resources. - # - # @param params [Hash] Parameters to filter the result of the list - # - # @return [Array] list of OneLoginAppBasic objects - # - # @see {https://developers.onelogin.com/api-docs/1/apps/list-apps Get Apps documentation} - def get_apps(params = {}) - clean_error - prepare_token - - begin - url = url_for(GET_APPS_URL) - - apps = [] - response = self.class.get( - url, - headers: authorized_headers, - query: params - ) - - if response.code == 200 - json_data = JSON.parse(response.body) - if !json_data.empty? - json_data.each do |data| - apps << OneLogin::Api::Models::OneLoginAppBasic.new(data) - end - end - return apps - else - @error = extract_status_code_from_response(response) - @error_description = extract_error_message_from_response(response) - end - rescue Exception => e - @error = '500' - @error_description = e.message - end - - nil - end - - # Creates an app - # - # @param app_params [Hash] App data (name, visible, policy_id, is_available, parameters, allow_assumed_signin, - # configuration, notes, description, provisioning, - # connector_id, auth_method, tab_id) - # - # @return [OneLoginApp] the created app - # - # @see {https://developers.onelogin.com/api-docs/1/apps/create-app Create App documentation} - def create_app(app_params) - clean_error - prepare_token - - begin - url = url_for(CREATE_APP_URL) - - unless app_params.has_key?('connector_id') || app_params['connector_id'].to_s.empty? - @error = '400' - @error_description = "connector_id is required" - @error_attribute = "connector_id" - return - end - - response = self.class.post( - url, - headers: authorized_headers, - body: app_params.to_json - ) - - if response.code == 201 - json_data = JSON.parse(response.body) - if json_data && json_data.has_key?('id') - return OneLogin::Api::Models::OneLoginApp.new(json_data) - end - else - @error = extract_status_code_from_response(response) - @error_description = extract_error_message_from_response(response) - @error_attribute = extract_error_attribute_from_response(response) - end - rescue Exception => e - @error = '500' - @error_description = e.message - end - - nil - end - - # Gets a OneLoginApp resource. - # - # @return [OneLoginApp] OneLoginApp object - # - # @see {https://developers.onelogin.com/api-docs/1/apps/get-app Get App documentation} - def get_app(app_id) - clean_error - prepare_token - - begin - if app_id.nil? || app_id.to_s.empty? - @error = '400' - @error_description = "app_id is required" - @error_attribute = "app_id" - return - end - - url = url_for(GET_APP_URL, app_id) - - response = self.class.get( - url, - headers: authorized_headers - ) - - if response.code == 200 - json_data = JSON.parse(response.body) - if json_data && json_data.has_key?('id') - return OneLogin::Api::Models::OneLoginApp.new(json_data) - end - else - @error = extract_status_code_from_response(response) - @error_description = extract_error_message_from_response(response) - end - rescue Exception => e - @error = '500' - @error_description = e.message - end - - nil - end - - # Updates an app - # - # @param app_id [Integer] Id of the app - # @param app_params [Hash] App data (name, visible, policy_id, is_available, parameters, allow_assumed_signin, - # configuration, notes, description, provisioning, - # connector_id, auth_method, tab_id) - # - # @return [User] the modified user - # - # @see {https://developers.onelogin.com/api-docs/1/apps/update-app Update App by ID documentation} - def update_app(app_id, app_params) - clean_error - prepare_token - - begin - if app_id.nil? || app_id.to_s.empty? - @error = '400' - @error_description = "app_id is required" - @error_attribute = "app_id" - return - end - - url = url_for(UPDATE_APP_URL, app_id) - - response = self.class.put( - url, - headers: authorized_headers, - body: app_params.to_json - ) - - if response.code == 200 - json_data = JSON.parse(response.body) - if json_data && json_data.has_key?('id') - return OneLogin::Api::Models::OneLoginApp.new(json_data) - end - else - @error = response.code.to_s - @error_description = extract_error_message_from_response(response) - @error_attribute = extract_error_attribute_from_response(response) - end - rescue Exception => e - @error = '500' - @error_description = e.message - end - - nil - end - - # Deletes an app - # - # @param app_id [Integer] Id of the app to be removed - # - # @return [Boolean] if the action succeed - # - # @see {https://developers.onelogin.com/api-docs/1/apps/delete-app Delete App by ID documentation} - def delete_app(app_id) - clean_error - prepare_token - - begin - if app_id.nil? || app_id.to_s.empty? - @error = '400' - @error_description = "app_id is required" - @error_attribute = "app_id" - return - end - - url = url_for(DELETE_APP_URL, app_id) - - response = self.class.delete( - url, - headers: authorized_headers - ) - - if response.code == 204 - return true - else - @error = response.code.to_s - @error_description = extract_error_message_from_response(response) - @error_attribute = extract_error_attribute_from_response(response) - end - rescue Exception => e - @error = '500' - @error_description = e.message - end - - false - end - - # Deletes an App Parameter - # - # @param app_id [Integer] Id of the app - # @param parameter_id [Integer] Id of the parameter to be removed - # - # @return [Boolean] if the action succeed - # - # @see {https://developers.onelogin.com/api-docs/1/apps/delete-parameter Delete an App Parameter documentation} - def delete_parameter_from_app(app_id, parameter_id) - clean_error - prepare_token - - begin - if app_id.nil? || app_id.to_s.empty? - @error = '400' - @error_description = "app_id is required" - @error_attribute = "app_id" - return - end - - if parameter_id.nil? || parameter_id.to_s.empty? - @error = '400' - @error_description = "parameter_id is required" - @error_attribute = "parameter_id" - return - end - - url = url_for(DELETE_APP_PARAMETER_URL, app_id, parameter_id) - - response = self.class.delete( - url, - headers: authorized_headers - ) - - if response.code == 204 - return true - else - @error = response.code.to_s - @error_description = extract_error_message_from_response(response) - @error_attribute = extract_error_attribute_from_response(response) - end - rescue Exception => e - @error = '500' - @error_description = e.message - end - - false - end - - ################ - # Role Methods # - ################ - - # Gets a list of Role resources. (if no limit provided, by default get 50 elements) - # - # @param params [Hash] Parameters to filter the result of the list - # - # @return [Array] list of Role objects - # - # @see {https://developers.onelogin.com/api-docs/1/roles/get-roles Get Roles documentation} - def get_roles(params = {}) - clean_error - prepare_token - - begin - options = { - model: OneLogin::Api::Models::Role, - headers: authorized_headers, - max_results: @max_results, - params: params - } - - return Cursor.new(self, url_for(GET_ROLES_URL), options) - - rescue Exception => e - @error = '500' - @error_description = e.message - end - - nil - end - - # Gets Role by ID. - # - # @param role_id [Integer] Id of the Role - # - # @return [Role] the role identified by the id - # - # @see {https://developers.onelogin.com/api-docs/1/roles/get-role-by-id Get Role by ID documentation} - def get_role(role_id) - clean_error - prepare_token - - begin - if role_id.nil? || role_id.to_s.empty? - @error = '400' - @error_description = "role_id is required" - @error_attribute = "role_id" - return - end - - url = url_for(GET_ROLE_URL, role_id) - - response = self.class.get( - url, - headers: authorized_headers - ) - - if response.code == 200 - json_data = JSON.parse(response.body) - if json_data && json_data['data'] - return OneLogin::Api::Models::Role.new(json_data['data'][0]) - end - else - @error = response.code.to_s - @error_description = extract_error_message_from_response(response) - end - rescue Exception => e - @error = '500' - @error_description = e.message - end - - nil - end - - ################# - # Event Methods # - ################# - - # List of all OneLogin event types available to the Events API. - # - # @return [Array] the list of event type - # - # @see {https://developers.onelogin.com/api-docs/1/events/event-types Get Event Types documentation} - def get_event_types - clean_error - prepare_token - - begin - options = { - model: OneLogin::Api::Models::EventType, - headers: authorized_headers, - max_results: @max_results - } - - return Cursor.new(self, url_for(GET_EVENT_TYPES_URL), options) - - rescue Exception => e - @error = '500' - @error_description = e.message - end - - nil - end - - # Gets a list of Event resources. (if no limit provided, by default get 50 elements) - # - # @param params [Hash] Parameters to filter the result of the list - # - # @return [Array] list of Event objects - # - # @see {https://developers.onelogin.com/api-docs/1/events/get-events Get Events documentation} - def get_events(params={}) - clean_error - prepare_token - - begin - options = { - model: OneLogin::Api::Models::Event, - headers: authorized_headers, - max_results: @max_results, - params: params - } - - return Cursor.new(self, url_for(GET_EVENTS_URL), options) - - rescue Exception => e - @error = '500' - @error_description = e.message - end - - nil - end - - # Gets Event by ID. - # - # @param event_id [Integer] Id of the Event - # - # @return [Event] the event identified by the id - # - # @see {https://developers.onelogin.com/api-docs/1/events/get-event-by-id Get Event by ID documentation} - def get_event(event_id) - clean_error - prepare_token - - begin - if event_id.nil? || event_id.to_s.empty? - @error = '400' - @error_description = "event_id is required" - @error_attribute = "event_id" - return - end - - url = url_for(GET_EVENT_URL, event_id) - - response = self.class.get( - url, - headers: authorized_headers - ) - - if response.code == 200 - json_data = JSON.parse(response.body) - if json_data && json_data['data'] - return OneLogin::Api::Models::Event.new(json_data['data'][0]) - end - else - @error = response.code.to_s - @error_description = extract_error_message_from_response(response) - end - rescue Exception => e - @error = '500' - @error_description = e.message - end - - nil - end - - # Create an event in the OneLogin event log. - # - # @param event_params [Hash] Event data (event_type_id, account_id, actor_system, - # actor_user_id, actor_user_name, app_id, - # assuming_acting_user_id, custom_message, - # directory_sync_run_id, group_id, group_name, - # ipaddr, otp_device_id, otp_device_name, - # policy_id, policy_name, role_id, role_name, - # user_id, user_name) - # - # @return [Boolean] the result of the operation - # - # @see {https://developers.onelogin.com/api-docs/1/events/create-event Create Event documentation} - def create_event(event_params) - clean_error - prepare_token - - begin - url = url_for(CREATE_EVENT_URL) - - response = self.class.post( - url, - headers: authorized_headers, - body: event_params.to_json - ) - - if response.code == 200 - return handle_operation_response(response) - else - @error = response.code.to_s - @error_description = extract_error_message_from_response(response) - @error_attribute = extract_error_attribute_from_response(response) - end - rescue Exception => e - @error = '500' - @error_description = e.message - end - - false - end - - ################# - # Group Methods # - ################# - - # Gets a list of Group resources (element of groups limited with the limit parameter). - # - # @return [Array] the list of groups - # - # @see {https://developers.onelogin.com/api-docs/1/groups/get-groups Get Groups documentation} - def get_groups(params = {}) - clean_error - prepare_token - - begin - options = { - model: OneLogin::Api::Models::Group, - headers: authorized_headers, - max_results: @max_results, - params: params - } - - return Cursor.new(self, url_for(GET_GROUPS_URL), options) - - rescue Exception => e - @error = '500' - @error_description = e.message - end - - nil - end - - # Gets Group by ID. - # - # @param group_id [Integer] Id of the Group - # - # @return [Group] the group identified by the id - # - # @see {https://developers.onelogin.com/api-docs/1/groups/get-group-by-id Get Group by ID documentation} - def get_group(group_id) - clean_error - prepare_token - - begin - if group_id.nil? || group_id.to_s.empty? - @error = '400' - @error_description = "group_id is required" - @error_attribute = "group_id" - return - end - - url = url_for(GET_GROUP_URL, group_id) - - response = self.class.get( - url, - headers: authorized_headers - ) - - if response.code == 200 - json_data = JSON.parse(response.body) - if json_data && json_data['data'] - return OneLogin::Api::Models::Group.new(json_data['data'][0]) - end - else - @error = response.code.to_s - @error_description = extract_error_message_from_response(response) - end - rescue Exception => e - @error = '500' - @error_description = e.message - end - - nil - end - - ########################## - # SAML Assertion Methods # - ########################## - - # Generates a SAML Assertion. - # - # @param username_or_email [String] username or email of the OneLogin user accessing the app - # @param password [String] Password of the OneLogin user accessing the app - # @param app_id [String] App ID of the app for which you want to generate a SAML token - # @param subdomain [String] subdomain of the OneLogin account related to the user/app - # @param ip_address [String] (Optional) whitelisted IP address that needs to be bypassed (some MFA scenarios) - # - # @return [SAMLEndpointResponse] object with an encoded SAMLResponse - # - # @see {https://developers.onelogin.com/api-docs/1/saml-assertions/generate-saml-assertion Generate SAML Assertion documentation} - def get_saml_assertion(username_or_email, password, app_id, subdomain, ip_address=nil) - clean_error - prepare_token - - begin - url = url_for(GET_SAML_ASSERTION_URL) - - data = { - 'username_or_email'=> username_or_email, - 'password'=> password, - 'app_id'=> app_id, - 'subdomain'=> subdomain, - } - - unless ip_address.nil? || ip_address.empty? - data['ip_address'] = ip_address - end - - response = self.class.post( - url, - headers: authorized_headers, - body: data.to_json - ) - - if response.code == 200 - return handle_saml_endpoint_response(response) - else - @error = response.code.to_s - @error_description = extract_error_message_from_response(response) - end - rescue Exception => e - @error = '500' - @error_description = e.message - end - - nil - end - - # Verify a one-time password (OTP) value provided for a second factor when multi-factor authentication (MFA) is required for SAML authentication. - # - # @param app_id [String] App ID of the app for which you want to generate a SAML token - # @param devide_id [String] Provide the MFA device_id you are submitting for verification. - # @param state_token [String] Provide the state_token associated with the MFA device_id you are submitting for verification. - # @param otp_token [String] (Optional) Provide the OTP value for the MFA factor you are submitting for verification. - # @param url_endpoint [String] (Optional) Specify an url where return the response. - # @param do_not_notify [String] (Optional) When verifying MFA via Protect Push, set this to true to stop additional push notifications being sent to the OneLogin Protect device - # - # @return [SAMLEndpointResponse] object with an encoded SAMLResponse - # - # @see {https://developers.onelogin.com/api-docs/1/saml-assertions/verify-factor Verify Factor documentation} - def get_saml_assertion_verifying(app_id, device_id, state_token, otp_token=nil, url_endpoint=nil, do_not_notify=false) - clean_error - prepare_token - - begin - if app_id.nil? || app_id.to_s.empty? - @error = '400' - @error_description = "app_id is required" - @error_attribute = "app_id" - return - end - - if device_id.nil? || device_id.to_s.empty? - @error = '400' - @error_description = "device_id is required" - @error_attribute = "device_id" - return - end - - if url_endpoint.nil? || url_endpoint.empty? - url = url_for(GET_SAML_VERIFY_FACTOR) - else - url = url_endpoint - end - - data = { - 'app_id'=> app_id, - 'device_id'=> device_id.to_s, - 'state_token'=> state_token, - 'do_not_notify'=> do_not_notify - } - - unless otp_token.nil? || otp_token.empty? - data['otp_token'] = otp_token - end - - response = self.class.post( - url, - headers: authorized_headers, - body: data.to_json - ) - - if response.code == 200 - return handle_saml_endpoint_response(response) - else - @error = response.code.to_s - @error_description = extract_error_message_from_response(response) - end - rescue Exception => e - @error = '500' - @error_description = e.message - end - - nil - end - - ############################# - # Multi-factor Auth Methods # - ############################# - - # Returns a list of authentication factors that are available for user enrollment via API. - # - # @param user_id [Integer] The id of the user. - # - # @return [Array] AuthFactor list - # - # @see {https://developers.onelogin.com/api-docs/1/multi-factor-authentication/available-factors Get Available Authentication Factors documentation} - def get_factors(user_id) - clean_error - prepare_token - - begin - if user_id.nil? || user_id.to_s.empty? - @error = '400' - @error_description = "user_id is required" - @error_attribute = "user_id" - return - end - - url = url_for(GET_FACTORS_URL, user_id) - - response = self.class.get( - url, - :headers => authorized_headers - ) - - factors = [] - if response.code == 200 - json_data = JSON.parse(response.body) - if json_data and json_data['data'] and json_data['data']['auth_factors'] - json_data['data']['auth_factors'].each do |factor_data| - factors << OneLogin::Api::Models::AuthFactor.new(factor_data) - end - end - else - @error = response.code.to_s - @error_description = extract_error_message_from_response(response) - end - return factors - rescue Exception => e - @error = '500' - @error_description = e.message - end - - nil - end - - # Enroll a user with a given authentication factor. - # - # @param user_id [Integer] The id of the user. - # @param factor_id [Integer] The identifier of the factor to enroll the user with. - # @param display_name [String] A name for the users device. - # @param number [String] The phone number of the user in E.164 format. - # - # @return [OTPDevice] MFA device - # - # @see {https://developers.onelogin.com/api-docs/1/multi-factor-authentication/enroll-factor Enroll an Authentication Factor documentation} - def enroll_factor(user_id, factor_id, display_name, number) - clean_error - prepare_token - - begin - if user_id.nil? || user_id.to_s.empty? - @error = '400' - @error_description = "user_id is required" - @error_attribute = "user_id" - return - end - - if factor_id.nil? || factor_id.to_s.empty? - @error = '400' - @error_description = "factor_id is required" - @error_attribute = "factor_id" - return - end - - url = url_for(ENROLL_FACTOR_URL, user_id) - - data = { - 'factor_id'=> factor_id.to_i, - 'display_name'=> display_name, - 'number'=> number - } - - response = self.class.post( - url, - :headers => authorized_headers, - body: data.to_json - ) - - if response.code == 200 - json_data = JSON.parse(response.body) - if json_data and json_data['data'] - return OneLogin::Api::Models::OTPDevice.new(json_data['data'][0]) - end - else - @error = response.code.to_s - @error_description = extract_error_message_from_response(response) - end - rescue Exception => e - @error = '500' - @error_description = e.message - end - - nil - end - - # Return a list of authentication factors registered to a particular user for multifactor authentication (MFA) - # - # @param user_id [Integer] The id of the user. - # - # @return [Array] OTPDevice List - # - # @see {https://developers.onelogin.com/api-docs/1/multi-factor-authentication/enrolled-factors Get Enrolled Authentication Factors documentation} - def get_enrolled_factors(user_id) - clean_error - prepare_token - - begin - if user_id.nil? || user_id.to_s.empty? - @error = '400' - @error_description = "user_id is required" - @error_attribute = "user_id" - return - end - - url = url_for(GET_ENROLLED_FACTORS_URL, user_id) - - response = self.class.get( - url, - :headers => authorized_headers - ) - - otp_devices = [] - if response.code == 200 - json_data = JSON.parse(response.body) - if json_data and json_data['data'] and json_data['data']['otp_devices'] - json_data['data']['otp_devices'].each do |otp_device_data| - otp_devices << OneLogin::Api::Models::OTPDevice.new(otp_device_data) - end - end - else - @error = response.code.to_s - @error_description = extract_error_message_from_response(response) - end - return otp_devices - rescue Exception => e - @error = '500' - @error_description = e.message - end - - nil - end - - # Triggers an SMS or Push notification containing a One-Time Password (OTP) - # that can be used to authenticate a user with the Verify Factor call. - # - # @param user_id [Integer] The id of the user. - # @param device_id [Integer] The id of the MFA device. - # - # @return [FactorEnrollmentResponse] Info with User Id, Device Id, and OTP Device - # - # @see {https://developers.onelogin.com/api-docs/1/multi-factor-authentication/activate-factor Activate an Authentication Factor documentation} - def activate_factor(user_id, device_id) - clean_error - prepare_token - - begin - if user_id.nil? || user_id.to_s.empty? - @error = '400' - @error_description = "user_id is required" - @error_attribute = "user_id" - return - end - - if device_id.nil? || device_id.to_s.empty? - @error = '400' - @error_description = "device_id is required" - @error_attribute = "device_id" - return - end - - url = url_for(ACTIVATE_FACTOR_URL, user_id, device_id) - - response = self.class.post( - url, - headers: authorized_headers - ) - - if response.code == 200 - json_data = JSON.parse(response.body) - if json_data && json_data['data'] - return OneLogin::Api::Models::FactorEnrollmentResponse.new(json_data['data'][0]) - end - else - @error = response.code.to_s - @error_description = extract_error_message_from_response(response) - end - rescue Exception => e - @error = '500' - @error_description = e.message - end - - nil - end - - # Authenticates a one-time password (OTP) code provided by a multifactor authentication (MFA) device. - # - # @param user_id [Integer] The id of the user. - # @param device_id [Integer] The id of the MFA device. - # @param otp_token [String] OTP code provided by the device or SMS message sent to user. - # When a device like OneLogin Protect that supports Push has - # been used you do not need to provide the otp_token. - # @param state_token [String] The state_token is returned after a successful request - # to Enroll a Factor or Activate a Factor. - # MUST be provided if the needs_trigger attribute from - # the proceeding calls is set to true. - # - # @return [Boolean] True if Factor is verified - # - # @see {https://developers.onelogin.com/api-docs/1/multi-factor-authentication/verify-factor Verify an Authentication Factor documentation} - def verify_factor(user_id, device_id, otp_token=nil, state_token=nil) - clean_error - prepare_token - - begin - if user_id.nil? || user_id.to_s.empty? - @error = '400' - @error_description = "user_id is required" - @error_attribute = "user_id" - return - end - - if device_id.nil? || device_id.to_s.empty? - @error = '400' - @error_description = "device_id is required" - @error_attribute = "device_id" - return - end - - - url = url_for(VERIFY_FACTOR_URL, user_id, device_id) - - data = { - 'user_id'=> user_id, - 'device_id'=> device_id - } - - unless otp_token.nil? || otp_token.empty? - data['otp_token'] = otp_token - end - - unless state_token.nil? || state_token.empty? - data['state_token'] = state_token - end - - response = self.class.post( - url, - headers: authorized_headers, - body: data.to_json - ) - - if response.code == 200 - return handle_operation_response(response) - else - @error = response.code.to_s - @error_description = extract_error_message_from_response(response) - end - rescue Exception => e - @error = '500' - @error_description = e.message - end - - false - end - - # Remove an enrolled factor from a user. - # - # @param user_id [Integer] The id of the user. - # @param device_id [Integer] The device_id of the MFA device. - # - # @return [Boolean] The result of the action - # - # @see {https://developers.onelogin.com/api-docs/1/multi-factor-authentication/remove-factor Remove a Factor documentation} - def remove_factor(user_id, device_id) - clean_error - prepare_token - - begin - - if user_id.nil? || user_id.to_s.empty? - @error = '400' - @error_description = "user_id is required" - @error_attribute = "user_id" - return - end - - if device_id.nil? || device_id.to_s.empty? - @error = '400' - @error_description = "device_id is required" - @error_attribute = "device_id" - return - end - - url = url_for(REMOVE_FACTOR_URL, user_id, device_id) - - response = self.class.delete( - url, - :headers => authorized_headers - ) - - if response.code == 200 - return true - else - @error = response.code.to_s - @error_description = extract_error_message_from_response(response) - return false - end - rescue Exception => e - @error = '500' - @error_description = e.message - end - - nil - end - - ######################## - # Invite Links Methods # - ######################## - - # Generates an invite link for a user that you have already created in your OneLogin account. - # - # @param email [String] Set to the email address of the user that you want to generate an invite link for. - # - # @return [String] the invitation link - # - # @see {https://developers.onelogin.com/api-docs/1/invite-links/generate-invite-link Generate Invite Link documentation} - def generate_invite_link(email) - clean_error - prepare_token - - begin - if email.nil? || email.to_s.empty? - @error = '400' - @error_description = "email is required" - @error_attribute = "email" - return - end - - url = url_for(GENERATE_INVITE_LINK_URL) - - data = { - 'email'=> email - } - - response = self.class.post( - url, - headers: authorized_headers, - body: data.to_json - ) - - if response.code == 200 - json_data = JSON.parse(response.body) - if json_data && json_data['data'] - return json_data['data'][0] - end - else - @error = response.code.to_s - @error_description = extract_error_message_from_response(response) - end - rescue Exception => e - @error = '500' - @error_description = e.message - end - - nil - end - - # Sends an invite link to a user that you have already created in your OneLogin account. - # - # @param email [String] Set to the email address of the user that you want to send an invite link for. - # @param personal_email [String] (Optional) If you want to send the invite email to an email other than the - # one provided in email, provide it here. The invite link will be - # sent to this address instead. - # - # @return [String] the result of the operation - # - # @see {https://developers.onelogin.com/api-docs/1/invite-links/send-invite-link Send Invite Link documentation} - def send_invite_link(email, personal_email=nil) - clean_error - prepare_token - - begin - url = url_for(SEND_INVITE_LINK_URL) - - data = { - 'email'=> email - } - - unless personal_email.nil? || personal_email.to_s.empty? - data['personal_email'] = personal_email - end - - response = self.class.post( - url, - headers: authorized_headers, - body: data.to_json - ) - - if response.code == 200 - return handle_operation_response(response) - else - @error = response.code.to_s - @error_description = extract_error_message_from_response(response) - end - rescue Exception => e - @error = '500' - @error_description = e.message - end - - false - end - - # Lists apps accessible by a OneLogin user. - # - # @param token [String] Provide your embedding token. - # @param email [String] Provide the email of the user for which you want to return a list of embeddable apps. - # - # @return [Array] the embed apps - # - # @see {https://developers.onelogin.com/api-docs/1/embed-apps/get-apps-to-embed-for-a-user Get Apps to Embed for a User documentation} - def get_embed_apps(token, email) - clean_error - - begin - response = self.class.get( - EMBED_APP_URL, - headers: { - 'User-Agent' => @user_agent - }, - query: { - token: token, - email: email - } - ) - - if response.code == 200 && !(response.body.nil? || response.body.empty?) - return retrieve_apps_from_xml(response.body) - else - @error = response.code.to_s - unless response.body.nil? || response.body.empty? - @error_description = response.body - end - end - rescue Exception => e - @error = '500' - @error_description = e.message - end - - nil - end - - def retrieve_apps_from_xml(xml_content) - doc = Nokogiri::XML(xml_content) do |config| - config.options = NOKOGIRI_OPTIONS - end - - node_list = doc.xpath("/apps/app") - attributes = ['id', 'icon', 'name', 'provisioned', 'extension_required', 'personal', 'login_id'] - apps = [] - node_list.each do |node| - app_data = {} - node.children.each do |children| - if attributes.include? children.name - app_data[children.name] = children.content - end - end - apps << OneLogin::Api::Models::EmbedApp.new(app_data) - end - - apps - end - - ##################### - # Privilege Methods # - ##################### - - # Gets a list of the Privileges created in an account. - # - # @return [Array] list of privilege objects - # - # @see {https://developers.onelogin.com/api-docs/1/privileges/list-privileges List Privileges documentation} - def get_privileges() - clean_error - prepare_token - - begin - - url = url_for(LIST_PRIVILEGES_URL) - - privileges = [] - response = self.class.get( - url, - headers: authorized_headers - ) - - if response.code == 200 - json_data = JSON.parse(response.body) - if !json_data.empty? - json_data.each do |data| - privileges << OneLogin::Api::Models::Privilege.new(data) - end - end - return privileges - else - @error = extract_status_code_from_response(response) - @error_description = extract_error_message_from_response(response) - end - rescue Exception => e - @error = '500' - @error_description = e.message - end - - nil - end - - # Creates a Privilege - # - # @param name [string] The name of the privilege. - # @param version [string] The version for the privilege schema. Set to 2018-05-18. - # @param statements [Array] A list of statements. Statement object or a dict with the keys Effect, Action and Scope - # - # @return [Privilege] the created privilege - # - # @see {https://developers.onelogin.com/api-docs/1/privileges/create-privilege Create Privilege documentation} - def create_privilege(name, version, statements) - clean_error - prepare_token - - begin - url = url_for(CREATE_PRIVILEGE_URL) - - statement_data = [] - for statement in statements - if statement.instance_of?(OneLogin::Api::Models::Statement) - statement_data << { - 'Effect' => statement.effect, - 'Action' => statement.actions, - 'Scope' => statement.scopes - } - elsif statement.instance_of?(Hash) && statement.has_key?('Effect') && statement.has_key?('Action') && statement.has_key?('Scope') - statement_data << statement - else - @error = 400.to_s - @error_description = "statements is invalid. Provide a list of statements. The statement should be an Statement object or dict with the keys Effect, Action and Scope" - return - end - end - - privilege_data = { - 'name' => name, - 'privilege' => { - 'Version'=> version, - 'Statement' => statement_data - } - } - - response = self.class.post( - url, - headers: authorized_headers, - body: privilege_data.to_json - ) - - if response.code == 201 - json_data = JSON.parse(response.body) - if json_data && json_data.has_key?('id') - return OneLogin::Api::Models::Privilege.new(json_data['id'], name, version, statements) - end - else - @error = extract_status_code_from_response(response) - @error_description = extract_error_message_from_response(response) - end - rescue Exception => e - @error = '500' - @error_description = e.message - end - - nil - end - - # Get a Privilege. - # - # @param privilege_id [string] Id of the privilege - # - # @return [Privilege] the privilege identified by the id - # - # @see {https://developers.onelogin.com/api-docs/1/privileges/get-privilege Get Privilege documentation} - def get_privilege(privilege_id) - clean_error - prepare_token - - begin - if privilege_id.nil? || privilege_id.to_s.empty? - @error = '400' - @error_description = "privilege_id is required" - @error_attribute = "privilege_id" - return - end - - url = url_for(GET_PRIVILEGE_URL, privilege_id) - - response = self.class.get( - url, - headers: authorized_headers - ) - - if response.code == 200 - json_data = JSON.parse(response.body) - if json_data && json_data.has_key?('id') - return OneLogin::Api::Models::Privilege.new(json_data) - end - else - @error = extract_status_code_from_response(response) - @error_description = extract_error_message_from_response(response) - end - rescue Exception => e - @error = '500' - @error_description = e.message - end - - nil - end - - # Updates a Privilege - # - # @param privilege_id [string] The id of the privilege to be updated. - # @param name [string] The name of the privilege. - # @param version [string] The version for the privilege schema. Set to 2018-05-18. - # @param statements [Array] A list of statements. Statement object or a dict with the keys Effect, Action and Scope - # - # - # @return [Privilege] the modified privilege - # - # @see {https://developers.onelogin.com/api-docs/1/privileges/update-privilege Update Privilege documentation} - def update_privilege(privilege_id, name, version, statements) - clean_error - prepare_token - - begin - if privilege_id.nil? || privilege_id.to_s.empty? - @error = '400' - @error_description = "privilege_id is required" - @error_attribute = "privilege_id" - return - end - - url = url_for(UPDATE_PRIVILEGE_URL, privilege_id) - - statement_data = [] - for statement in statements - if statement.instance_of?(OneLogin::Api::Models::Statement) - statement_data << { - 'Effect' => statement.effect, - 'Action' => statement.actions, - 'Scope' => statement.scopes - } - elsif statement.instance_of?(Hash) && statement.has_key?('Effect') && statement.has_key?('Action') && statement.has_key?('Scope') - statement_data << statement - else - @error = 400.to_s - @error_description = "statements is invalid. Provide a list of statements. The statement should be an Statement object or dict with the keys Effect, Action and Scope" - return - end - end - - privilege_data = { - 'name' => name, - 'privilege' => { - 'Version'=> version, - 'Statement' => statement_data - } - } - - response = self.class.put( - url, - headers: authorized_headers, - body: privilege_data.to_json - ) - - if response.code == 200 - json_data = JSON.parse(response.body) - if json_data && json_data.has_key?('id') - return OneLogin::Api::Models::Privilege.new(json_data['id'], name, version, statements) - end - else - @error = extract_status_code_from_response(response) - @error_description = extract_error_message_from_response(response) - end - rescue Exception => e - @error = '500' - @error_description = e.message - end - - nil - end - - # Deletes a Privilege - # - # @param privilege_id [string] Id of the privilege to be removed. - # - # @return [Boolean] if the action succeed - # - # @see {https://developers.onelogin.com/api-docs/1/privileges/delete-privilege Delete Privilege documentation} - def delete_privilege(privilege_id) - clean_error - prepare_token - - begin - if privilege_id.nil? || privilege_id.to_s.empty? - @error = '400' - @error_description = "privilege_id is required" - @error_attribute = "privilege_id" - return - end - - url = url_for(DELETE_PRIVILEGE_URL, privilege_id) - - response = self.class.delete( - url, - headers: authorized_headers - ) - - if response.code == 204 - return handle_operation_response(response) - else - @error = extract_status_code_from_response(response) - @error_description = extract_error_message_from_response(response) - end - rescue Exception => e - @error = '500' - @error_description = e.message - end - - false - end - - # Gets a list of the roles assigned to a privilege. - # - # @param privilege_id [string] Id of the privilege. - # - # @return [Array] list of Role Id - # - # @see {https://developers.onelogin.com/api-docs/1/privileges/get-roles Get Assigned Roles documentation} - def get_roles_assigned_to_privilege(privilege_id) - clean_error - prepare_token - - begin - if privilege_id.nil? || privilege_id.to_s.empty? - @error = '400' - @error_description = "privilege_id is required" - @error_attribute = "privilege_id" - return - end - - options = { - headers: authorized_headers, - max_results: @max_results, - container: 'roles' - } - - return Cursor.new(self, url_for(GET_ROLES_ASSIGNED_TO_PRIVILEGE_URL, privilege_id), options) - - rescue Exception => e - @error = '500' - @error_description = e.message - end - - nil - end - - # Assign one or more roles to a privilege. - # - # @param privilege_id [string] Id of the privilege. - # @param role_ids [Array] Ids of the roles to be added. - # - # @return [Boolean] if the action succeed - # - # @see {https://developers.onelogin.com/api-docs/1/privileges/assign-role Assign Roles documentation} - def assign_roles_to_privilege(privilege_id, role_ids) - clean_error - prepare_token - - begin - if privilege_id.nil? || privilege_id.to_s.empty? - @error = '400' - @error_description = "privilege_id is required" - @error_attribute = "privilege_id" - return - end - - url = url_for(ASSIGN_ROLES_TO_PRIVILEGE_URL, privilege_id) - - data = { - 'roles' => role_ids - } - - response = self.class.post( - url, - headers: authorized_headers, - body: data.to_json - ) - - if response.code == 201 - return handle_operation_response(response) - else - @error = extract_status_code_from_response(response) - @error_description = extract_error_message_from_response(response) - - end - rescue Exception => e - @error = '500' - @error_description = e.message - end - - false - end - - # Removes one role from the privilege. - # - # @param privilege_id [string] Id of the privilege. - # @param role_id [Integer] Id of the role to be removed. - # - # @return [Boolean] if the action succeed - # - # @see {https://developers.onelogin.com/api-docs/1/privileges/remove-role Remove Role documentation} - def remove_role_from_privilege(privilege_id, role_id) - clean_error - prepare_token - - begin - if privilege_id.nil? || privilege_id.to_s.empty? - @error = '400' - @error_description = "privilege_id is required" - @error_attribute = "privilege_id" - return - end - - url = url_for(REMOVE_ROLE_FROM_PRIVILEGE_URL, privilege_id, role_id) - - response = self.class.delete( - url, - headers: authorized_headers - ) - - if response.code == 204 - return true - else - @error = extract_status_code_from_response(response) - @error_description = extract_error_message_from_response(response) - end - rescue Exception => e - @error = '500' - @error_description = e.message - end - - false - end - - # Gets a list of the users assigned to a privilege. - # - # @param privilege_id [string] Id of the privilege. - # - # @return [Array] list of User Id - # - # @see {https://developers.onelogin.com/api-docs/1/privileges/get-users Get Assigned Users documentation} - def get_users_assigned_to_privilege(privilege_id) - clean_error - prepare_token - - begin - if privilege_id.nil? || privilege_id.to_s.empty? - @error = '400' - @error_description = "privilege_id is required" - @error_attribute = "privilege_id" - return - end - - options = { - headers: authorized_headers, - max_results: @max_results, - container: 'users' - } - - return Cursor.new(self, url_for(GET_USERS_ASSIGNED_TO_PRIVILEGE_URL, privilege_id), options) - - rescue Exception => e - @error = '500' - @error_description = e.message - end - - nil - end - - # Assign one or more users to a privilege. - # - # @param privilege_id [string] Id of the privilege. - # @param user_ids [Array] Ids of the users to be added. - # - # @return [Boolean] if the action succeed - # - # @see {https://developers.onelogin.com/api-docs/1/privileges/assign-users Assign Users documentation} - def assign_users_to_privilege(privilege_id, user_ids) - clean_error - prepare_token - - begin - if privilege_id.nil? || privilege_id.to_s.empty? - @error = '400' - @error_description = "privilege_id is required" - @error_attribute = "privilege_id" - return - end - - url = url_for(ASSIGN_USERS_TO_PRIVILEGE_URL, privilege_id) - - data = { - 'users' => user_ids - } - - response = self.class.post( - url, - headers: authorized_headers, - body: data.to_json - ) - - if response.code == 201 - return handle_operation_response(response) - else - @error = extract_status_code_from_response(response) - @error_description = extract_error_message_from_response(response) - end - rescue Exception => e - @error = '500' - @error_description = e.message - end - - false - end - - # Removes one user from the privilege. - # - # @param privilege_id [string] Id of the privilege. - # @param user_id [Integer] Id of the user to be removed. - # - # @return [Boolean] if the action succeed - # - # @see {https://developers.onelogin.com/api-docs/1/privileges/remove-user Remove User documentation} - def remove_user_from_privilege(privilege_id, user_id) - clean_error - prepare_token - - begin - if privilege_id.nil? || privilege_id.to_s.empty? - @error = '400' - @error_description = "privilege_id is required" - @error_attribute = "privilege_id" - return - end - - url = url_for(REMOVE_USER_FROM_PRIVILEGE_URL, privilege_id, user_id) - - response = self.class.delete( - url, - headers: authorized_headers - ) - - if response.code == 204 - return true - else - @error = extract_status_code_from_response(response) - @error_description = extract_error_message_from_response(response) - end - rescue Exception => e - @error = '500' - @error_description = e.message - end - - false - end - - end - end -end diff --git a/lib/onelogin/api/cursor.rb b/lib/onelogin/api/cursor.rb deleted file mode 100644 index 0b5d248..0000000 --- a/lib/onelogin/api/cursor.rb +++ /dev/null @@ -1,114 +0,0 @@ -require 'onelogin/api/apiexception' -require 'onelogin/api/util' - -# Cursor -# -# Used for paginating requests to the OneLogin API -# -# Returns an enumerable object -class Cursor - include Enumerable - include OneLogin::Api::Util - - # Create a new instance of the Cursor. - # - # @param url [String] The url of the API endpoint - # @param options [Hash] Configuation options - # - def initialize(client, url, options = {}) - @client = client - @url = url - @options = options - - @model = options[:model] - @headers = options[:headers] || {} - @params = options[:params] || {} - @max_results = options[:max_results] - @container = options[:container] || 'data' - - @collection = [] - @after_cursor = options.fetch(:after_cursor, nil) - end - - def each(start = 0, &proc) - return to_enum(:each, start) unless block_given? - - Array(@collection[start..-1]).each do |item| - if @model - yield(@model.new(item)) - else - yield(item) - end - end - - unless last? - start = [@collection.size, start].max - - fetch_next_page - - each(start, &proc) - end - end - - private - - def fetch_next_page - @params = @params.merge(after_cursor: @after_cursor) if @after_cursor - @client.prepare_token - - response = @client.class.get( - @url, - headers: @headers, - query: @params - ) - - json = response.parsed_response - - if json.nil? - raise OneLogin::Api::ApiException.new("Response could not be parsed", 500) - elsif !json.has_key?(@container) && json.has_key?('status') && json["status"]["error"] == true - raise OneLogin::Api::ApiException.new(extract_error_message_from_response(response), json["status"]["code"]) - elsif !json.has_key?(@container) && json.has_key?('statusCode') - raise OneLogin::Api::ApiException.new(extract_error_message_from_response(response), json["statusCode"]) - else - - results = json[@container] - if @container == "data" - results = results.flatten - end - - @collection += if results_remaining < results.size - results.slice(0, results_remaining) - else - results - end - - @after_cursor = after_cursor(json) - @last_cursor_empty = @after_cursor.nil? - end - end - - def after_cursor(json) - value = nil - if json.has_key?('pagination') - value = json['pagination'].fetch('after_cursor', nil) - elsif json.has_key?('afterCursor') - value = json['afterCursor'] - end - value - end - - def results_remaining - @max_results - @collection.size - end - - def fetch_completed? - return false unless @max_results - - @collection.size >= @max_results - end - - def last? - @last_cursor_empty || fetch_completed? - end -end diff --git a/lib/onelogin/api/models.rb b/lib/onelogin/api/models.rb deleted file mode 100644 index 11ea510..0000000 --- a/lib/onelogin/api/models.rb +++ /dev/null @@ -1,26 +0,0 @@ -require 'onelogin/api/models/app' -require 'onelogin/api/models/auth_factor' -require 'onelogin/api/models/connector_basic' -require 'onelogin/api/models/device' -require 'onelogin/api/models/event' -require 'onelogin/api/models/event_type' -require 'onelogin/api/models/factor_enrollment_response' -require 'onelogin/api/models/group' -require 'onelogin/api/models/mfa' -require 'onelogin/api/models/mfa_token' -require 'onelogin/api/models/onelogin_app_v1' -require 'onelogin/api/models/onelogin_app' -require 'onelogin/api/models/onelogin_app_basic' -require 'onelogin/api/models/onelogin_token' -require 'onelogin/api/models/otp_device' -require 'onelogin/api/models/privilege' -require 'onelogin/api/models/rate_limit' -require 'onelogin/api/models/role' -require 'onelogin/api/models/saml_endpoint_response' -require 'onelogin/api/models/session_token_info' -require 'onelogin/api/models/session_token_mfa_info' -require 'onelogin/api/models/statement' -require 'onelogin/api/models/user_data' -require 'onelogin/api/models/user_metadata' -require 'onelogin/api/models/user' -require 'onelogin/api/models/embed_app' diff --git a/lib/onelogin/api/models/app.rb b/lib/onelogin/api/models/app.rb deleted file mode 100644 index 4eeefd3..0000000 --- a/lib/onelogin/api/models/app.rb +++ /dev/null @@ -1,22 +0,0 @@ -module OneLogin - module Api - module Models - - class App - - attr_accessor :id, :name, :icon, :provisioned - attr_accessor :extension, :login_id, :personal - - def initialize(data) - @id = data['id'] - @name = data['name'] - @icon = data['icon'] - @provisioned = data['provisioned'] - @extension = data['extension'] - @login_id = data['login_id'] - @personal = data['personal'] - end - end - end - end -end diff --git a/lib/onelogin/api/models/auth_factor.rb b/lib/onelogin/api/models/auth_factor.rb deleted file mode 100644 index abacf22..0000000 --- a/lib/onelogin/api/models/auth_factor.rb +++ /dev/null @@ -1,16 +0,0 @@ -module OneLogin - module Api - module Models - - class AuthFactor - - attr_accessor :id, :name - - def initialize(data) - @id = data['factor_id'] - @name = data['name'].to_s - end - end - end - end -end \ No newline at end of file diff --git a/lib/onelogin/api/models/connector_basic.rb b/lib/onelogin/api/models/connector_basic.rb deleted file mode 100644 index 44b2b7f..0000000 --- a/lib/onelogin/api/models/connector_basic.rb +++ /dev/null @@ -1,20 +0,0 @@ -module OneLogin - module Api - module Models - - class ConnectorBasic - - attr_accessor :id, :name, :auth_method - attr_accessor :icon_url, :allows_new_parameters - - def initialize(data) - @id = data['id'] - @name = data['name'] - @icon_url = data['icon_url'] - @auth_method = data['auth_method'] - @allows_new_parameters = data['allows_new_parameters'] - end - end - end - end -end diff --git a/lib/onelogin/api/models/device.rb b/lib/onelogin/api/models/device.rb deleted file mode 100644 index b8bb7b8..0000000 --- a/lib/onelogin/api/models/device.rb +++ /dev/null @@ -1,18 +0,0 @@ -module OneLogin - module Api - module Models - - class Device - - attr_accessor :id, :type, :duo_api_hostname, :duo_sig_request - - def initialize(data) - @id = data['device_id'] - @type = data['device_type'].to_s - @duo_api_hostname = data['duo_api_hostname'] - @duo_sig_request = data['duo_sig_request'] - end - end - end - end -end diff --git a/lib/onelogin/api/models/embed_app.rb b/lib/onelogin/api/models/embed_app.rb deleted file mode 100644 index 4c6439c..0000000 --- a/lib/onelogin/api/models/embed_app.rb +++ /dev/null @@ -1,31 +0,0 @@ -module OneLogin - module Api - module Models - - class EmbedApp - - attr_accessor :id, :name, :icon, :provisioned, :extension_required, :login_id, :personal - - def initialize(data) - @data = data - - @id = data['id'].to_i - @name = data['name'].to_s - @icon = data['icon'] - @provisioned = data['provisioned'].to_i - @extension_required = truthy?('extension_required') - @login_id = data['login_id'].to_i - @personal = truthy?('personal') - end - - private - - def truthy?(attribute_name) - return false unless @data[attribute_name] - - ['yes', 'true', '1'].include? @data[attribute_name].to_s.downcase - end - end - end - end -end \ No newline at end of file diff --git a/lib/onelogin/api/models/event.rb b/lib/onelogin/api/models/event.rb deleted file mode 100644 index 99f4d9c..0000000 --- a/lib/onelogin/api/models/event.rb +++ /dev/null @@ -1,54 +0,0 @@ -module OneLogin - module Api - module Models - - class Event - - attr_accessor :id, :created_at, :account_id, :user_id, :user_name, :event_type_id, - :notes, :ipaddr, :actor_user_id, :actor_user_name, :assuming_acting_user_id, - :role_id, :role_name, :app_id, :app_name, :group_id, :group_name, :otp_device_id, - :otp_device_name, :policy_id, :policy_name, :actor_system, :custom_message, - :operation_name, :directory_sync_run_id, :directory_id, :resolution, :client_id, - :resource_type_id, :error_description, :risk_score, :risk_reasons, :risk_cookie_id, :browser_fingerprint - - def initialize(data) - @id = data['id'] - @created_at = data['created_at']? Time.iso8601(data['created_at']) : nil - @account_id = data['account_id'] - @user_id = data['user_id'] - @user_name = data['user_name'].to_s - @event_type_id = data['event_type_id'] - @notes = data['notes'].to_s - @ipaddr = data['ipaddr'].to_s - @actor_user_id = data['actor_user_id'] - @actor_user_name = data['actor_user_name'].to_s - @assuming_acting_user_id = data['assuming_acting_user_id'] - @role_id = data['role_id'] - @role_name = data['role_name'].to_s - @app_id = data['app_id'] - @app_name = data['app_name'].to_s - @group_id = data['group_id'] - @group_name = data['group_name'].to_s - @otp_device_id = data['otp_device_id'] - @otp_device_name = data['otp_device_name'].to_s - @policy_id = data['policy_id'] - @policy_name = data['policy_name'].to_s - @actor_system = data['actor_system'].to_s - @custom_message = data['custom_message'].to_s - @operation_name = data['operation_name'].to_s - @directory_sync_run_id = data['directory_sync_run_id'] - @directory_id = data['directory_id'] - @resolution = data['resolution'].to_s - @client_id = data['client_id'] - @resource_type_id = data['resource_type_id'] - @error_description = data['error_description'].to_s - @proxy_ip = data['proxy_ip'].to_s - @risk_score = data['risk_score'] - @risk_reasons = data['risk_reasons'].to_s - @risk_cookie_id = data['risk_cookie_id'] - @browser_fingerprint = data['browser_fingerprint'] - end - end - end - end -end diff --git a/lib/onelogin/api/models/event_type.rb b/lib/onelogin/api/models/event_type.rb deleted file mode 100644 index aa56d53..0000000 --- a/lib/onelogin/api/models/event_type.rb +++ /dev/null @@ -1,17 +0,0 @@ -module OneLogin - module Api - module Models - - class EventType - - attr_accessor :id, :name, :description - - def initialize(data) - @id = data['id'] - @name = data['name'].to_s - @description = data['description'].to_s - end - end - end - end -end diff --git a/lib/onelogin/api/models/factor_enrollment_response.rb b/lib/onelogin/api/models/factor_enrollment_response.rb deleted file mode 100644 index c908aba..0000000 --- a/lib/onelogin/api/models/factor_enrollment_response.rb +++ /dev/null @@ -1,22 +0,0 @@ -module OneLogin - module Api - module Models - - class FactorEnrollmentResponse - - attr_accessor :device_id, :user_id, :active, :auth_factor_name, - :type_display_name, :user_display_name, :state_token - - def initialize(data) - @device_id = data['device_id']? data['device_id'].to_i : nil - @user_id = data['id']? data['id'].to_i : nil - @active = data['active'] - @auth_factor_name = data['auth_factor_name'] - @type_display_name = data['type_display_name'] - @user_display_name = data['user_display_name'] - @state_token = data['state_token'] - end - end - end - end -end \ No newline at end of file diff --git a/lib/onelogin/api/models/group.rb b/lib/onelogin/api/models/group.rb deleted file mode 100644 index b490ad5..0000000 --- a/lib/onelogin/api/models/group.rb +++ /dev/null @@ -1,17 +0,0 @@ -module OneLogin - module Api - module Models - - class Group - - attr_accessor :id, :name, :reference - - def initialize(data) - @id = data['id'] - @name = data['name'].to_s - @reference = data['reference'].to_s - end - end - end - end -end diff --git a/lib/onelogin/api/models/mfa.rb b/lib/onelogin/api/models/mfa.rb deleted file mode 100644 index 46bba66..0000000 --- a/lib/onelogin/api/models/mfa.rb +++ /dev/null @@ -1,26 +0,0 @@ -module OneLogin - module Api - module Models - - class MFA - - attr_accessor :state_token, :callback_url, :user, :devices - - def initialize(data) - unless data['user'].empty? - @user = OneLogin::Api::Models::User.new(data['user']) # Partial info - end - @state_token = data['state_token'].to_s - @callback_url = data['callback_url'].to_s - @devices = [] - unless data['devices'].empty? - data['devices'].each do |device_data| - @devices << OneLogin::Api::Models::Device.new(device_data) - end - end - end - end - - end - end -end \ No newline at end of file diff --git a/lib/onelogin/api/models/mfa_token.rb b/lib/onelogin/api/models/mfa_token.rb deleted file mode 100644 index 5fa584e..0000000 --- a/lib/onelogin/api/models/mfa_token.rb +++ /dev/null @@ -1,18 +0,0 @@ -module OneLogin - module Api - module Models - - class MFAToken - - attr_accessor :value, :expires_at, :reusable - - def initialize(data) - @value = data['mfa_token'] - @expires_at = data['expires_at'] - @reusable = data['reusable'] - end - end - - end - end -end diff --git a/lib/onelogin/api/models/onelogin_app.rb b/lib/onelogin/api/models/onelogin_app.rb deleted file mode 100644 index 9d4ca0e..0000000 --- a/lib/onelogin/api/models/onelogin_app.rb +++ /dev/null @@ -1,62 +0,0 @@ -module OneLogin - module Api - module Models - - class OneLoginApp - - attr_accessor :name, :visible, :policy_id, :is_available, - :parameters, :allow_assumed_signin, - :configuration, :notes, :description - - - attr_reader :created_at, :updated_at, :icon, :provisioning, - :connector_id, :sso, :auth_method, :id, :tab_id - - def initialize(data) - @name = data['name'] - @visible = data['visible'] - @policy_id = data['policy_id']? data['policy_id'].to_i : nil - @parameters = data['parameters'] - @allow_assumed_signin = data['allow_assumed_signin'] - @configuration = data['configuration'] - @notes = data['notes'] - @description = data['description'] - - @created_at = data['created_at'] - @updated_at = data['updated_at'] - @icon = data['icon_url'] - @provisioning = data['provisioning'] - @connector_id = data['connector_id']? data['connector_id'].to_i : nil - @sso = data['sso'] - @auth_method = data['auth_method'] - @tab_id = data['tab_id']? data['tab_id'].to_i : nil - @id = data['id']? data['id'].to_i : nil - end - - def get_auth_method_name - auth_method_name = nil - case @auth_method - when 0 - auth_method_name = "PASSWORD" - when 1 - auth_method_name = "OPENID" - when 2 - auth_method_name = "SAML" - when 3 - auth_method_name = "API" - when 4 - auth_method_name = "GOOGLE" - when 6 - auth_method_name = "BASIC_AUTH" - when 7 - auth_method_name = "WSFED" - when 8 - auth_method_name = "OIDC" - end - - auth_method_name - end - end - end - end -end diff --git a/lib/onelogin/api/models/onelogin_app_basic.rb b/lib/onelogin/api/models/onelogin_app_basic.rb deleted file mode 100644 index 8615a42..0000000 --- a/lib/onelogin/api/models/onelogin_app_basic.rb +++ /dev/null @@ -1,51 +0,0 @@ -module OneLogin - module Api - module Models - - class OneLoginAppBasic - - attr_accessor :name, :visible, - :description - - attr_reader :created_at, :updated_at, - :connector_id, :auth_method, :id - - def initialize(data) - @id = data['id']? data['id'].to_i : nil - @name = data['name'] - @description = data['description'] - @auth_method = data['auth_method'] - @connector_id = data['connector_id']? data['connector_id'].to_i : nil - @visible = data['visible'] - @created_at = data['created_at'] - @updated_at = data['updated_at'] - - end - - def get_auth_method_name - auth_method_name = nil - case @auth_method - when 0 - auth_method_name = "PASSWORD" - when 1 - auth_method_name = "OPENID" - when 2 - auth_method_name = "SAML" - when 3 - auth_method_name = "API" - when 4 - auth_method_name = "GOOGLE" - when 6 - auth_method_name = "BASIC_AUTH" - when 7 - auth_method_name = "WSFED" - when 8 - auth_method_name = "OIDC" - end - - auth_method_name - end - end - end - end -end diff --git a/lib/onelogin/api/models/onelogin_app_v1.rb b/lib/onelogin/api/models/onelogin_app_v1.rb deleted file mode 100644 index f02f695..0000000 --- a/lib/onelogin/api/models/onelogin_app_v1.rb +++ /dev/null @@ -1,22 +0,0 @@ -module OneLogin - module Api - module Models - - class OneLoginApp - - attr_accessor :id, :connector_id, :name, :extension - attr_accessor :icon, :visible, :provisioning - - def initialize(data) - @id = data['id'] - @connector_id = data['connector_id'] - @name = data['name'] - @extension = data['extension'] - @icon = data['icon'] - @visible = data['visible'] - @provisioning = data['provisioning'] - end - end - end - end -end diff --git a/lib/onelogin/api/models/onelogin_token.rb b/lib/onelogin/api/models/onelogin_token.rb deleted file mode 100644 index 3106f3c..0000000 --- a/lib/onelogin/api/models/onelogin_token.rb +++ /dev/null @@ -1,20 +0,0 @@ -module OneLogin - module Api - module Models - - class OneLoginToken - - attr_accessor :access_token, :refresh_token, :account_id, :token_type, :created_at, :expires_in - - def initialize(data) - @access_token = data['access_token'].to_s - @refresh_token = data['refresh_token'].to_s - @account_id = data['account_id'] - @token_type = data['token_type'] - @created_at = Time.iso8601(data['created_at']) - @expires_in = data['expires_in'] - end - end - end - end -end diff --git a/lib/onelogin/api/models/otp_device.rb b/lib/onelogin/api/models/otp_device.rb deleted file mode 100644 index e043fb3..0000000 --- a/lib/onelogin/api/models/otp_device.rb +++ /dev/null @@ -1,25 +0,0 @@ -module OneLogin - module Api - module Models - - class OTPDevice - - attr_accessor :id, :active, :default, :auth_factor_name, :phone_number, - :type_display_name, :needs_trigger, :user_display_name, - :state_token - - def initialize(data) - @id = data['id']? data['id'].to_i : nil - @active = data['active'] - @default = data['default'] - @auth_factor_name = data['auth_factor_name'] - @phone_number = data['phone_number'] - @type_display_name = data['type_display_name'] - @needs_trigger = data['needs_trigger'] - @user_display_name = data['user_display_name'] - @state_token = data['state_token'] - end - end - end - end -end \ No newline at end of file diff --git a/lib/onelogin/api/models/privilege.rb b/lib/onelogin/api/models/privilege.rb deleted file mode 100644 index d2ee898..0000000 --- a/lib/onelogin/api/models/privilege.rb +++ /dev/null @@ -1,51 +0,0 @@ -require 'onelogin/api/models/statement' - -module OneLogin - module Api - module Models - - class Privilege - - attr_accessor :id, :name, :version, :statements - - def initialize(*args) - if args.length == 1 - self.from_data(args[0]) - else - self.from_values(args[0],args[1], args[2], args[3]) - end - end - - def from_data(data) - @id = data['id'] - @name = data['name'] - @version = data['privilege']['Version'] - statements_data = data['privilege']['Statement'] - @statements = [] - for statement_data in statements_data - @statements << Statement.new(statement_data) - end - end - - def from_values(id, name, version, statements) - @id = id - @name = name - @version = version - @statements = [] - for statement in statements - if statement.instance_of?(Statement) - @statements << statement - elsif statement.instance_of?(Hash) && statement.has_key?('Effect') && statement.has_key?('Action') && statement.has_key?('Scope') - @statements << Statement.new(statement['Effect'], statement['Action'], statement['Scope']) - end - end - end - - def get_valid_actions - return - Constants.VALID_ACTIONS - end - end - end - end -end diff --git a/lib/onelogin/api/models/rate_limit.rb b/lib/onelogin/api/models/rate_limit.rb deleted file mode 100644 index 10986fe..0000000 --- a/lib/onelogin/api/models/rate_limit.rb +++ /dev/null @@ -1,17 +0,0 @@ -module OneLogin - module Api - module Models - - class RateLimit - - attr_accessor :limit, :remaining, :reset - - def initialize(data) - @limit = data['X-RateLimit-Limit'] - @remaining = data['X-RateLimit-Remaining'] - @reset = data['X-RateLimit-Reset'] - end - end - end - end -end diff --git a/lib/onelogin/api/models/role.rb b/lib/onelogin/api/models/role.rb deleted file mode 100644 index a7ddeff..0000000 --- a/lib/onelogin/api/models/role.rb +++ /dev/null @@ -1,16 +0,0 @@ -module OneLogin - module Api - module Models - - class Role - - attr_accessor :id, :name - - def initialize(data) - @id = data['id'] - @name = data['name'].to_s - end - end - end - end -end diff --git a/lib/onelogin/api/models/saml_endpoint_response.rb b/lib/onelogin/api/models/saml_endpoint_response.rb deleted file mode 100644 index e8485ab..0000000 --- a/lib/onelogin/api/models/saml_endpoint_response.rb +++ /dev/null @@ -1,18 +0,0 @@ -module OneLogin - module Api - module Models - - class SAMLEndpointResponse - - attr_accessor :type, :message, :mfa, :saml_response - - def initialize(status_type, status_message) - @type = status_type - @message = status_message - @saml_response = nil - @mfa = nil - end - end - end - end -end diff --git a/lib/onelogin/api/models/session_token_info.rb b/lib/onelogin/api/models/session_token_info.rb deleted file mode 100644 index d67899e..0000000 --- a/lib/onelogin/api/models/session_token_info.rb +++ /dev/null @@ -1,21 +0,0 @@ -module OneLogin - module Api - module Models - - class SessionTokenInfo - - attr_accessor :status, :user, :return_to_url, :expires_at, :session_token - - def initialize(data) - @status = data['status'].to_s - unless data['user'].empty? - @user = OneLogin::Api::Models::User.new(data['user']) # Partial info - end - @return_to_url = data['return_to_url'].to_s - @expires_at = Time.parse(data['expires_at']) - @session_token = data['session_token'].to_s - end - end - end - end -end diff --git a/lib/onelogin/api/models/session_token_mfa_info.rb b/lib/onelogin/api/models/session_token_mfa_info.rb deleted file mode 100644 index 207bf0a..0000000 --- a/lib/onelogin/api/models/session_token_mfa_info.rb +++ /dev/null @@ -1,26 +0,0 @@ -module OneLogin - module Api - module Models - - class SessionTokenMFAInfo - - attr_accessor :user, :state_token, :callback_url, :devices - - def initialize(data) - unless data['user'].empty? - @user = OneLogin::Api::Models::User.new(data['user']) # Partial info - end - @state_token = data['state_token'].to_s - @callback_url = data['callback_url'].to_s - @devices = [] - unless data['devices'].empty? - data['devices'].each do |device_data| - @devices << OneLogin::Api::Models::Device.new(device_data) - end - end - end - end - - end - end -end diff --git a/lib/onelogin/api/models/statement.rb b/lib/onelogin/api/models/statement.rb deleted file mode 100644 index 05ffef5..0000000 --- a/lib/onelogin/api/models/statement.rb +++ /dev/null @@ -1,36 +0,0 @@ -module OneLogin - module Api - module Models - - class Statement - - attr_accessor :effect, :actions, :scopes - - def initialize(*args) - if args.length == 1 - self.from_data(args[0]) - else - self.from_values(args[0], args[1], args[2]) - end - end - - def from_data(data) - @effect = data['Effect']? data['Effect'] : "Allow" - @actions = data['Action']? data['Action'] : [] - @scopes = data['Scope']? data['Scope'] : [] - end - - def from_values(effect, actions, scopes) - @effect = effect - @actions = actions - @scopes = scopes - end - - def get_valid_actions - return - Constants.VALID_ACTIONS - end - end - end - end -end diff --git a/lib/onelogin/api/models/user.rb b/lib/onelogin/api/models/user.rb deleted file mode 100644 index 4841f57..0000000 --- a/lib/onelogin/api/models/user.rb +++ /dev/null @@ -1,135 +0,0 @@ -module OneLogin - module Api - module Models - - class User - - attr_accessor :id, :external_id, :email, :username, :firstname, :lastname, :distinguished_name, - :phone, :company, :department, :status, :state, :member_of, :samaccountname, :userprincipalname, - :group_id, :role_ids, :custom_attributes, :openid_name, :locale_code, :comment, :directory_id, - :title, :manager_ad_id, :trusted_idp_id, :manager_user_id, :activated_at, :created_at, :updated_at, - :password_changed_at, :invitation_sent_at, :invalid_login_attempts, :last_login, :locked_until - - def initialize(data) - @id = data['id'] - @external_id = data['external_id'] - @email = data['email'].to_s - @username = data['username'].to_s - @firstname = data['firstname'].to_s - @lastname = data['lastname'].to_s - @distinguished_name = data['distinguished_name'].to_s - @phone = data['phone'].to_s - @company = data['company'].to_s - @department = data['department'].to_s - @title = data['title'].to_s - @status = data['status'] - @state = data['state'] - @member_of = data['member_of'].to_s - @samaccountname = data['samaccountname'].to_s - @userprincipalname = data['userprincipalname'].to_s - @group_id = data['group_id']? data['group_id'].to_i : nil - @role_ids = data['role_id']? data['role_id'] : [] - @custom_attributes = data['custom_attributes'] ? data['custom_attributes'] : [] - @openid_name = data['openid_name'].to_s - @locale_code = data['locale_code'].to_s - @comment = data['comment'].to_s - @directory_id = data['directory_id'] - @manager_ad_id = data['manager_ad_id'] - @trusted_idp_id = data['trusted_idp_id'] - @manager_user_id = data['manager_user_id'] - @activated_at = data['activated_at']? Time.iso8601(data['activated_at']) : nil - @created_at = data['created_at']? Time.iso8601(data['created_at']) : nil - @updated_at = data['updated_at']? Time.iso8601(data['updated_at']) : nil - @password_changed_at = data['password_changed_at']? Time.iso8601(data['password_changed_at']) : nil - @invitation_sent_at = data['invitation_sent_at']? Time.iso8601(data['invitation_sent_at']) : nil - @invalid_login_attempts = data['invalid_login_attempts'] - @last_login = data['last_login']? Time.iso8601(data['last_login']) : nil - @locked_until = data['locked_until']? Time.iso8601(data['locked_until']) : nil - end - - def get_role_ids - @role_ids - end - - def get_group_id - @group_id - end - - def get_user_data - user_data = UserData.new - user_data.id = @id - user_data.external_id = @external_id - user_data.email = @email - user_data.username = @username - user_data.firstname = @firstname - user_data.lastname = @lastname - user_data.distinguished_name = @distinguished_name - user_data.phone = @phone - user_data.company = @company - user_data.department = @department - user_data.title = @title - user_data.status = @status - user_data.state = @state - user_data.member_of = @member_of - user_data.samaccountname = @samaccountname - user_data.userprincipalname = @userprincipalname - user_data.openid_name = @openid_name - user_data.locale_code = @locale_code - user_data.directory_id = @directory_id - user_data.manager_ad_id = @manager_ad_id - user_data.trusted_idp_id = @trusted_idp_id - user_data.manager_user_id = @manager_user_id - return user_data - end - - def get_user_metadata - user_metadata = UserMetadata.new - user_metadata.id = @id - user_metadata.activated_at = @activated_at - user_metadata.created_at = @created_at - user_metadata.updated_at = @updated_at - user_metadata.password_changed_at = @password_changed_at - user_metadata.invalid_login_attempts = @invalid_login_attempts - user_metadata.invitation_sent_at = @invitation_sent_at - user_metadata.last_login = @last_login - user_metadata.locked_until = @locked_until - user_metadata.comment = @comment - - return user_metadata - end - - def get_custom_attributes - @custom_attributes - end - - def get_user_params - return { - "external_id"=> self.external_id, - "email"=> self.email, - "username"=> self.username, - "firstname"=> self.firstname, - "lastname"=> self.lastname, - "distinguished_name"=> self.distinguished_name, - "phone"=> self.phone, - "company"=> self.company, - "department"=> self.department, - "title"=> self.title, - "status"=> self.status, - "state"=> self.state, - "member_of"=> self.member_of, - "samaccountname"=> self.samaccountname, - "invalid_login_attempts"=> self.invalid_login_attempts, - "userprincipalname"=> self.userprincipalname, - "group_id"=> self.group_id, - "locale_code"=> self.locale_code, - "openid_name"=> self.openid_name, - "directory_id"=> self.directory_id, - "manager_ad_id"=> self.manager_ad_id, - "trusted_idp_id"=> self.trusted_idp_id, - "manager_user_id"=> self.manager_user_id - } - end - end - end - end -end diff --git a/lib/onelogin/api/models/user_data.rb b/lib/onelogin/api/models/user_data.rb deleted file mode 100644 index 4346e29..0000000 --- a/lib/onelogin/api/models/user_data.rb +++ /dev/null @@ -1,13 +0,0 @@ -module OneLogin - module Api - module Models - - class UserData - - attr_accessor :id, :external_id, :email, :username, :firstname, :lastname, :distinguished_name, - :phone, :company, :department, :status, :state, :member_of, :samaccountname, :userprincipalname, - :title, :openid_name, :locale_code, :directory_id, :manager_ad_id, :trusted_idp_id, :manager_user_id - end - end - end -end diff --git a/lib/onelogin/api/models/user_metadata.rb b/lib/onelogin/api/models/user_metadata.rb deleted file mode 100644 index 133b6c9..0000000 --- a/lib/onelogin/api/models/user_metadata.rb +++ /dev/null @@ -1,13 +0,0 @@ -module OneLogin - module Api - module Models - - class UserMetadata - - attr_accessor :id, :activated_at, :created_at, :updated_at, :password_changed_at, - :invitation_sent_at, :invalid_login_attempts, :last_login, :locked_until, - :comment - end - end - end -end \ No newline at end of file diff --git a/lib/onelogin/api/util.rb b/lib/onelogin/api/util.rb deleted file mode 100644 index 77393f9..0000000 --- a/lib/onelogin/api/util.rb +++ /dev/null @@ -1,13 +0,0 @@ -require 'onelogin/api/util/constants' -require 'onelogin/api/util/url_builder' -require 'onelogin/api/util/parser' - -module OneLogin - module Api - module Util - include OneLogin::Api::Util::Constants - include OneLogin::Api::Util::UrlBuilder - include OneLogin::Api::Util::Parser - end - end -end \ No newline at end of file diff --git a/lib/onelogin/api/util/constants.rb b/lib/onelogin/api/util/constants.rb deleted file mode 100644 index 5c804bc..0000000 --- a/lib/onelogin/api/util/constants.rb +++ /dev/null @@ -1,177 +0,0 @@ -module OneLogin - module Api - module Util - # Constants class of the OneLogin's Ruby SDK. - # - # This class defines all the constants that will be used - # in the OneLogin's Ruby SDK. - # - module Constants - # OAuth2 Tokens URLs - TOKEN_REQUEST_URL = "https://api.%s.onelogin.com/auth/oauth2/v2/token" - TOKEN_REFRESH_URL = "https://api.%s.onelogin.com/auth/oauth2/v2/token" - TOKEN_REVOKE_URL = "https://api.%s.onelogin.com/auth/oauth2/revoke" - GET_RATE_URL = "https://api.%s.onelogin.com/auth/rate_limit" - - # User URLs - GET_USERS_URL = "https://api.%s.onelogin.com/api/1/users" - GET_USER_URL = "https://api.%s.onelogin.com/api/1/users/%s" - GET_APPS_FOR_USER_URL = "https://api.%s.onelogin.com/api/1/users/%s/apps" - GET_ROLES_FOR_USER_URL = "https://api.%s.onelogin.com/api/1/users/%s/roles" - GET_CUSTOM_ATTRIBUTES_URL = "https://api.%s.onelogin.com/api/1/users/custom_attributes" - CREATE_USER_URL = "https://api.%s.onelogin.com/api/1/users" - SESSION_LOGIN_TOKEN_URL = "https://api.%s.onelogin.com/api/1/login/auth" - GET_TOKEN_VERIFY_FACTOR = "https://api.%s.onelogin.com/api/1/login/verify_factor" - UPDATE_USER_URL = "https://api.%s.onelogin.com/api/1/users/%s" - DELETE_USER_URL = "https://api.%s.onelogin.com/api/1/users/%s" - ADD_ROLE_TO_USER_URL = "https://api.%s.onelogin.com/api/1/users/%s/add_roles" - DELETE_ROLE_TO_USER_URL = "https://api.%s.onelogin.com/api/1/users/%s/remove_roles" - SET_PW_CLEARTEXT = "https://api.%s.onelogin.com/api/1/users/set_password_clear_text/%s" - SET_PW_SALT = "https://api.%s.onelogin.com/api/1/users/set_password_using_salt/%s" - SET_CUSTOM_ATTRIBUTE_TO_USER_URL = "https://api.%s.onelogin.com/api/1/users/%s/set_custom_attributes" - SET_USER_STATE_URL = "https://api.%s.onelogin.com/api/1/users/%s/set_state" - LOG_USER_OUT_URL = "https://api.%s.onelogin.com/api/1/users/%s/logout" - LOCK_USER_URL = "https://api.%s.onelogin.com/api/1/users/%s/lock_user" - GENERATE_MFA_TOKEN_URL = "https://api.%s.onelogin.com/api/1/users/%s/mfa_token" - - # Connectors URL - GET_CONNECTORS_URL = "https://api.%s.onelogin.com/api/2/connectors" - #GET_CONNECTOR_URL = "https://api.%s.onelogin.com/api/2/connectors/%s" - - # Apps URL - - # V1 - GET_APPS_URL_V1 = "https://api.%s.onelogin.com/api/1/apps" - - # V2 - GET_APPS_URL = "https://api.%s.onelogin.com/api/2/apps" - CREATE_APP_URL = "https://api.%s.onelogin.com/api/2/apps" - GET_APP_URL = "https://api.%s.onelogin.com/api/2/apps/%s" - UPDATE_APP_URL = "https://api.%s.onelogin.com/api/2/apps/%s" - DELETE_APP_URL = "https://api.%s.onelogin.com/api/2/apps/%s" - DELETE_APP_PARAMETER_URL = "https://api.%s.onelogin.com/api/2/apps/%s/parameters/%s" - - # Role URLs - GET_ROLES_URL = "https://api.%s.onelogin.com/api/1/roles" - CREATE_ROLE_URL = "https://api.%s.onelogin.com/api/1/roles" - GET_ROLE_URL = "https://api.%s.onelogin.com/api/1/roles/%s" - - # Event URLS - GET_EVENT_TYPES_URL = "https://api.%s.onelogin.com/api/1/events/types" - GET_EVENTS_URL = "https://api.%s.onelogin.com/api/1/events" - CREATE_EVENT_URL = "https://api.%s.onelogin.com/api/1/events" - GET_EVENT_URL = "https://api.%s.onelogin.com/api/1/events/%s" - - # Group URLs - GET_GROUPS_URL = "https://api.%s.onelogin.com/api/1/groups" - CREATE_GROUP_URL = "https://api.%s.onelogin.com/api/1/groups" - GET_GROUP_URL = "https://api.%s.onelogin.com/api/1/groups/%s" - - # SAML Assertion URLs - GET_SAML_ASSERTION_URL = "https://api.%s.onelogin.com/api/1/saml_assertion" - GET_SAML_VERIFY_FACTOR = "https://api.%s.onelogin.com/api/1/saml_assertion/verify_factor" - - # Multi-Factor Authentication URLs - GET_FACTORS_URL = "https://api.%s.onelogin.com/api/1/users/%s/auth_factors" - ENROLL_FACTOR_URL = "https://api.%s.onelogin.com/api/1/users/%s/otp_devices" - GET_ENROLLED_FACTORS_URL = "https://api.%s.onelogin.com/api/1/users/%s/otp_devices" - ACTIVATE_FACTOR_URL = "https://api.%s.onelogin.com/api/1/users/%s/otp_devices/%s/trigger" - VERIFY_FACTOR_URL = "https://api.%s.onelogin.com/api/1/users/%s/otp_devices/%s/verify" - REMOVE_FACTOR_URL = "https://api.%s.onelogin.com/api/1/users/%s/otp_devices/%s" - - # Invite Link URLS - GENERATE_INVITE_LINK_URL = "https://api.%s.onelogin.com/api/1/invites/get_invite_link" - SEND_INVITE_LINK_URL = "https://api.%s.onelogin.com/api/1/invites/send_invite_link" - - # Embed Apps URL - EMBED_APP_URL = "https://api.onelogin.com/client/apps/embed2" - - # Privileges URLS - LIST_PRIVILEGES_URL = "https://api.%s.onelogin.com/api/1/privileges" - CREATE_PRIVILEGE_URL = "https://api.%s.onelogin.com/api/1/privileges" - UPDATE_PRIVILEGE_URL = "https://api.%s.onelogin.com/api/1/privileges/%s" - GET_PRIVILEGE_URL = "https://api.%s.onelogin.com/api/1/privileges/%s" - DELETE_PRIVILEGE_URL = "https://api.%s.onelogin.com/api/1/privileges/%s" - GET_ROLES_ASSIGNED_TO_PRIVILEGE_URL = "https://api.%s.onelogin.com/api/1/privileges/%s/roles" - ASSIGN_ROLES_TO_PRIVILEGE_URL = "https://api.%s.onelogin.com/api/1/privileges/%s/roles" - REMOVE_ROLE_FROM_PRIVILEGE_URL = "https://api.%s.onelogin.com/api/1/privileges/%s/roles/%s" - GET_USERS_ASSIGNED_TO_PRIVILEGE_URL = "https://api.%s.onelogin.com/api/1/privileges/%s/users" - ASSIGN_USERS_TO_PRIVILEGE_URL = "https://api.%s.onelogin.com/api/1/privileges/%s/users" - REMOVE_USER_FROM_PRIVILEGE_URL = "https://api.%s.onelogin.com/api/1/privileges/%s/users/%s" - VALID_ACTIONS = [ - "apps:List", - "apps:Get", - "apps:Create", - "apps:Update", - "apps:Delete", - "apps:ManageRoles", - "apps:ManageUsers", - "directories:List", - "directories:Get", - "directories:Create", - "directories:Update", - "directories:Delete", - "directories:SyncUsers", - "directories:RefreshSchema", - "events:List", - "events:Get", - "mappings:List", - "mappings:Get", - "mappings:Create", - "mappings:Update", - "mappings:Delete", - "mappings:ReapplyAll", - "policies:List", - "policies:user:Get", - "policies:user:Create", - "policies:user:Update", - "policies:user:Delete", - "policies:app:Get", - "policies:app:Create", - "policies:app:Update", - "policies:app:Delete", - "privileges:List", - "privileges:Get", - "privileges:Create", - "privileges:Update", - "privileges:Delete", - "privileges:ListUsers", - "privileges:ListRoles", - "privileges:ManageUsers", - "privileges:ManageRoles", - "reports:List", - "reports:Get", - "reports:Create", - "reports:Update", - "reports:Delete", - "reports:Run", - "roles:List", - "roles:Get", - "roles:Create", - "roles:Update", - "roles:Delete", - "roles:ManageUsers", - "roles:ManageApps", - "trustedidp:List", - "trustedidp:Get", - "trustedidp:Create", - "trustedidp:Update", - "trustedidp:Delete", - "users:List", - "users:Get", - "users:Create", - "users:Update", - "users:Delete", - "users:Unlock", - "users:ResetPassword", - "users:ForceLogout", - "users:Invite", - "users:ReapplyMappings", - "users:ManageRoles", - "users:ManageApps", - "users:GenerateTempMfaToken" - ] - end - end - end -end diff --git a/lib/onelogin/api/util/parser.rb b/lib/onelogin/api/util/parser.rb deleted file mode 100644 index 329c256..0000000 --- a/lib/onelogin/api/util/parser.rb +++ /dev/null @@ -1,56 +0,0 @@ -module OneLogin - module Api - module Util - module Parser - def extract_error_message_from_response(response) - message = '' - content = JSON.parse(response.body) - if content - if content.has_key?('status') - status = content['status'] - if status.has_key?('message') - if status['message'].instance_of?(Hash) - if status['message'].has_key?('description') - message = status['message']['description'] - end - else - message = status['message'] - end - elsif status.has_key?('type') - message = status['type'] - end - elsif content.has_key?('message') - message = content['message'] - elsif content.has_key?('name') - message = content['name'] - end - end - message - end - - def extract_error_attribute_from_response(response) - attribute = nil - content = JSON.parse(response.body) - if content && content.has_key?('status') - status = content['status'] - if status.has_key?('message') && status['message'].instance_of?(Hash) - if status['message'].has_key?('attribute') - attribute = status['message']['attribute'] - end - end - end - attribute - end - - def extract_status_code_from_response(response) - status_code = '' - content = JSON.parse(response.body) - if content && content.has_key?('statusCode') - status_code = content['statusCode'] - end - status_code - end - end - end - end -end \ No newline at end of file diff --git a/lib/onelogin/api/util/url_builder.rb b/lib/onelogin/api/util/url_builder.rb deleted file mode 100644 index feda097..0000000 --- a/lib/onelogin/api/util/url_builder.rb +++ /dev/null @@ -1,24 +0,0 @@ -module OneLogin - module Api - module Util - module UrlBuilder - - # Build the URL of the API endpoint - # - # @param base [String] Base of the endpoint - # @param obj_id [String, nil] Id of the referenced object - # @param extra_id [String, nil] Id of the secundary referenced object - # - def url_for(base, obj_id=nil, extra_id=nil) - if obj_id.nil? || obj_id.to_s.empty? - base % [@region] - elsif extra_id.nil? || extra_id.to_s.empty? - base % [@region, obj_id] - else - base % [@region, obj_id, extra_id] - end - end - end - end - end -end diff --git a/lib/onelogin/version.rb b/lib/onelogin/version.rb deleted file mode 100644 index 969b002..0000000 --- a/lib/onelogin/version.rb +++ /dev/null @@ -1,3 +0,0 @@ -module OneLogin - VERSION = "1.6.0" -end diff --git a/lib/openapi_client.rb b/lib/openapi_client.rb new file mode 100644 index 0000000..e89eb89 --- /dev/null +++ b/lib/openapi_client.rb @@ -0,0 +1,130 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +# Common files +require 'openapi_client/api_client' +require 'openapi_client/api_error' +require 'openapi_client/version' +require 'openapi_client/configuration' + +# Models +require 'openapi_client/models/action' +require 'openapi_client/models/activate_factor_request' +require 'openapi_client/models/add_access_token_claim_request' +require 'openapi_client/models/add_client_app_request' +require 'openapi_client/models/add_role_users200_response_inner' +require 'openapi_client/models/add_scope_request' +require 'openapi_client/models/auth_method' +require 'openapi_client/models/auth_server_configuration' +require 'openapi_client/models/client_app' +require 'openapi_client/models/condition' +require 'openapi_client/models/connector' +require 'openapi_client/models/create_authorization_server_request' +require 'openapi_client/models/create_environment_variable_request' +require 'openapi_client/models/create_roles201_response_inner' +require 'openapi_client/models/device' +require 'openapi_client/models/enroll_factor_request' +require 'openapi_client/models/envvar' +require 'openapi_client/models/error_status' +require 'openapi_client/models/error_status_errors_inner' +require 'openapi_client/models/factor_inner' +require 'openapi_client/models/factor_inner_factor_data' +require 'openapi_client/models/generate_mfa_token200_response' +require 'openapi_client/models/generate_mfa_token422_response' +require 'openapi_client/models/generate_mfa_token422_response_details' +require 'openapi_client/models/generate_mfa_token_request' +require 'openapi_client/models/generate_saml_assertion_request' +require 'openapi_client/models/generate_token200_response' +require 'openapi_client/models/generate_token400_response' +require 'openapi_client/models/generate_token_request' +require 'openapi_client/models/get_authorization_server200_response' +require 'openapi_client/models/get_available_factors200_response_inner' +require 'openapi_client/models/get_client_apps200_response_inner' +require 'openapi_client/models/get_client_apps200_response_inner_scopes_inner' +require 'openapi_client/models/get_rate_limit200_response' +require 'openapi_client/models/get_rate_limit200_response_data' +require 'openapi_client/models/get_risk_score200_response' +require 'openapi_client/models/get_risk_score400_response' +require 'openapi_client/models/get_risk_score_request' +require 'openapi_client/models/get_score_insights200_response' +require 'openapi_client/models/get_score_insights200_response_scores' +require 'openapi_client/models/get_user_apps200_response_inner' +require 'openapi_client/models/hook' +require 'openapi_client/models/hook_conditions_inner' +require 'openapi_client/models/hook_options' +require 'openapi_client/models/hook_status' +require 'openapi_client/models/id' +require 'openapi_client/models/list_access_token_claims200_response_inner' +require 'openapi_client/models/list_actions200_response_inner' +require 'openapi_client/models/list_app_users200_response_inner' +require 'openapi_client/models/list_authorization_servers200_response_inner' +require 'openapi_client/models/list_authorization_servers200_response_inner_configuration' +require 'openapi_client/models/list_condition_operators200_response_inner' +require 'openapi_client/models/list_condition_values200_response_inner' +require 'openapi_client/models/list_conditions200_response_inner' +require 'openapi_client/models/list_mapping_condition_operators200_response_inner' +require 'openapi_client/models/list_mapping_conditions200_response_inner' +require 'openapi_client/models/list_scopes200_response_inner' +require 'openapi_client/models/log' +require 'openapi_client/models/mapping' +require 'openapi_client/models/registration' +require 'openapi_client/models/remove_role_users_request' +require 'openapi_client/models/revoke_token_request' +require 'openapi_client/models/risk_device' +require 'openapi_client/models/risk_rule' +require 'openapi_client/models/risk_user' +require 'openapi_client/models/role' +require 'openapi_client/models/rule' +require 'openapi_client/models/rule_id' +require 'openapi_client/models/schema' +require 'openapi_client/models/schema1' +require 'openapi_client/models/schema1_added_by' +require 'openapi_client/models/schema_provisioning' +require 'openapi_client/models/session' +require 'openapi_client/models/set_role_apps200_response_inner' +require 'openapi_client/models/source' +require 'openapi_client/models/status' +require 'openapi_client/models/status1' +require 'openapi_client/models/status2' +require 'openapi_client/models/status2_status' +require 'openapi_client/models/track_event_request' +require 'openapi_client/models/update_authorization_server400_response' +require 'openapi_client/models/update_client_app_request' +require 'openapi_client/models/update_environment_variable_request' +require 'openapi_client/models/update_role200_response' +require 'openapi_client/models/user' +require 'openapi_client/models/verify_enrollment_request' +require 'openapi_client/models/verify_factor_request' +require 'openapi_client/models/verify_factor_saml200_response' +require 'openapi_client/models/verify_factor_saml_request' +require 'openapi_client/models/verify_factor_voice200_response_inner' + +# APIs +require 'openapi_client/api/default_api' + +module OpenapiClient + class << self + # Customize default settings for the SDK using block. + # OpenapiClient.configure do |config| + # config.username = "xxx" + # config.password = "xxx" + # end + # If no block given, return the default Configuration object. + def configure + if block_given? + yield(Configuration.default) + else + Configuration.default + end + end + end +end diff --git a/lib/openapi_client/api/default_api.rb b/lib/openapi_client/api/default_api.rb new file mode 100644 index 0000000..0ea9641 --- /dev/null +++ b/lib/openapi_client/api/default_api.rb @@ -0,0 +1,7334 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'cgi' + +module OpenapiClient + class DefaultApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # @param authorization [String] + # @param user_id [Integer] Set to the id of the user. + # @param activate_factor_request [ActivateFactorRequest] + # @param [Hash] opts the optional parameters + # @return [nil] + def activate_factor(authorization, user_id, activate_factor_request, opts = {}) + activate_factor_with_http_info(authorization, user_id, activate_factor_request, opts) + nil + end + + # @param authorization [String] + # @param user_id [Integer] Set to the id of the user. + # @param activate_factor_request [ActivateFactorRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def activate_factor_with_http_info(authorization, user_id, activate_factor_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.activate_factor ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.activate_factor" + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling DefaultApi.activate_factor" + end + # verify the required parameter 'activate_factor_request' is set + if @api_client.config.client_side_validation && activate_factor_request.nil? + fail ArgumentError, "Missing the required parameter 'activate_factor_request' when calling DefaultApi.activate_factor" + end + # resource path + local_var_path = '/api/2/mfa/users/{user_id}/verifications'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(activate_factor_request) + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.activate_factor", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#activate_factor\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param id [Integer] + # @param add_access_token_claim_request [AddAccessTokenClaimRequest] + # @param [Hash] opts the optional parameters + # @return [Id] + def add_access_token_claim(authorization, id, add_access_token_claim_request, opts = {}) + data, _status_code, _headers = add_access_token_claim_with_http_info(authorization, id, add_access_token_claim_request, opts) + data + end + + # @param authorization [String] + # @param id [Integer] + # @param add_access_token_claim_request [AddAccessTokenClaimRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(Id, Integer, Hash)>] Id data, response status code and response headers + def add_access_token_claim_with_http_info(authorization, id, add_access_token_claim_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.add_access_token_claim ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.add_access_token_claim" + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.add_access_token_claim" + end + # verify the required parameter 'add_access_token_claim_request' is set + if @api_client.config.client_side_validation && add_access_token_claim_request.nil? + fail ArgumentError, "Missing the required parameter 'add_access_token_claim_request' when calling DefaultApi.add_access_token_claim" + end + # resource path + local_var_path = '/api/2/api_authorizations/{id}/claims'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(add_access_token_claim_request) + + # return_type + return_type = opts[:debug_return_type] || 'Id' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.add_access_token_claim", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#add_access_token_claim\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param id [Integer] + # @param add_client_app_request [AddClientAppRequest] + # @param [Hash] opts the optional parameters + # @return [ClientApp] + def add_client_app(authorization, id, add_client_app_request, opts = {}) + data, _status_code, _headers = add_client_app_with_http_info(authorization, id, add_client_app_request, opts) + data + end + + # @param authorization [String] + # @param id [Integer] + # @param add_client_app_request [AddClientAppRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(ClientApp, Integer, Hash)>] ClientApp data, response status code and response headers + def add_client_app_with_http_info(authorization, id, add_client_app_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.add_client_app ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.add_client_app" + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.add_client_app" + end + # verify the required parameter 'add_client_app_request' is set + if @api_client.config.client_side_validation && add_client_app_request.nil? + fail ArgumentError, "Missing the required parameter 'add_client_app_request' when calling DefaultApi.add_client_app" + end + # resource path + local_var_path = '/api/2/api_authorizations/{id}/clients'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(add_client_app_request) + + # return_type + return_type = opts[:debug_return_type] || 'ClientApp' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.add_client_app", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#add_client_app\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param role_id [Integer] Set to the id of the role you want to return. + # @param request_body [Array] + # @param [Hash] opts the optional parameters + # @return [Array] + def add_role_admins(authorization, role_id, request_body, opts = {}) + data, _status_code, _headers = add_role_admins_with_http_info(authorization, role_id, request_body, opts) + data + end + + # @param authorization [String] + # @param role_id [Integer] Set to the id of the role you want to return. + # @param request_body [Array] + # @param [Hash] opts the optional parameters + # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers + def add_role_admins_with_http_info(authorization, role_id, request_body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.add_role_admins ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.add_role_admins" + end + # verify the required parameter 'role_id' is set + if @api_client.config.client_side_validation && role_id.nil? + fail ArgumentError, "Missing the required parameter 'role_id' when calling DefaultApi.add_role_admins" + end + # verify the required parameter 'request_body' is set + if @api_client.config.client_side_validation && request_body.nil? + fail ArgumentError, "Missing the required parameter 'request_body' when calling DefaultApi.add_role_admins" + end + # resource path + local_var_path = '/api/2/roles/{role_id}/admins'.sub('{' + 'role_id' + '}', CGI.escape(role_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body) + + # return_type + return_type = opts[:debug_return_type] || 'Array' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.add_role_admins", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#add_role_admins\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param role_id [Integer] Set to the id of the role you want to return. + # @param request_body [Array] + # @param [Hash] opts the optional parameters + # @return [Array] + def add_role_users(authorization, role_id, request_body, opts = {}) + data, _status_code, _headers = add_role_users_with_http_info(authorization, role_id, request_body, opts) + data + end + + # @param authorization [String] + # @param role_id [Integer] Set to the id of the role you want to return. + # @param request_body [Array] + # @param [Hash] opts the optional parameters + # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers + def add_role_users_with_http_info(authorization, role_id, request_body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.add_role_users ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.add_role_users" + end + # verify the required parameter 'role_id' is set + if @api_client.config.client_side_validation && role_id.nil? + fail ArgumentError, "Missing the required parameter 'role_id' when calling DefaultApi.add_role_users" + end + # verify the required parameter 'request_body' is set + if @api_client.config.client_side_validation && request_body.nil? + fail ArgumentError, "Missing the required parameter 'request_body' when calling DefaultApi.add_role_users" + end + # resource path + local_var_path = '/api/2/roles/{role_id}/users'.sub('{' + 'role_id' + '}', CGI.escape(role_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body) + + # return_type + return_type = opts[:debug_return_type] || 'Array' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.add_role_users", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#add_role_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param id [Integer] + # @param add_scope_request [AddScopeRequest] + # @param [Hash] opts the optional parameters + # @return [Id] + def add_scope(authorization, id, add_scope_request, opts = {}) + data, _status_code, _headers = add_scope_with_http_info(authorization, id, add_scope_request, opts) + data + end + + # @param authorization [String] + # @param id [Integer] + # @param add_scope_request [AddScopeRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(Id, Integer, Hash)>] Id data, response status code and response headers + def add_scope_with_http_info(authorization, id, add_scope_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.add_scope ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.add_scope" + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.add_scope" + end + # verify the required parameter 'add_scope_request' is set + if @api_client.config.client_side_validation && add_scope_request.nil? + fail ArgumentError, "Missing the required parameter 'add_scope_request' when calling DefaultApi.add_scope" + end + # resource path + local_var_path = '/api/2/api_authorizations/{id}/scopes'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(add_scope_request) + + # return_type + return_type = opts[:debug_return_type] || 'Id' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.add_scope", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#add_scope\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param request_body [Array] The request body must contain an array of User Mapping IDs in the desired order. + # @param [Hash] opts the optional parameters + # @return [Array] + def bulk_mapping_sort(authorization, request_body, opts = {}) + data, _status_code, _headers = bulk_mapping_sort_with_http_info(authorization, request_body, opts) + data + end + + # @param authorization [String] + # @param request_body [Array] The request body must contain an array of User Mapping IDs in the desired order. + # @param [Hash] opts the optional parameters + # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers + def bulk_mapping_sort_with_http_info(authorization, request_body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.bulk_mapping_sort ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.bulk_mapping_sort" + end + # verify the required parameter 'request_body' is set + if @api_client.config.client_side_validation && request_body.nil? + fail ArgumentError, "Missing the required parameter 'request_body' when calling DefaultApi.bulk_mapping_sort" + end + # resource path + local_var_path = '/api/2/apps/mappings/sort' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body) + + # return_type + return_type = opts[:debug_return_type] || 'Array' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.bulk_mapping_sort", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#bulk_mapping_sort\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param app_id [Integer] + # @param request_body [Array] The request body must contain an array of App Rule IDs in the desired order. + # @param [Hash] opts the optional parameters + # @return [Array] + def bulk_sort(authorization, app_id, request_body, opts = {}) + data, _status_code, _headers = bulk_sort_with_http_info(authorization, app_id, request_body, opts) + data + end + + # @param authorization [String] + # @param app_id [Integer] + # @param request_body [Array] The request body must contain an array of App Rule IDs in the desired order. + # @param [Hash] opts the optional parameters + # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers + def bulk_sort_with_http_info(authorization, app_id, request_body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.bulk_sort ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.bulk_sort" + end + # verify the required parameter 'app_id' is set + if @api_client.config.client_side_validation && app_id.nil? + fail ArgumentError, "Missing the required parameter 'app_id' when calling DefaultApi.bulk_sort" + end + # verify the required parameter 'request_body' is set + if @api_client.config.client_side_validation && request_body.nil? + fail ArgumentError, "Missing the required parameter 'request_body' when calling DefaultApi.bulk_sort" + end + # resource path + local_var_path = '/api/2/apps/{app_id}/rules/sort'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body) + + # return_type + return_type = opts[:debug_return_type] || 'Array' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.bulk_sort", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#bulk_sort\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param schema [Schema] + # @param [Hash] opts the optional parameters + # @return [Schema] + def create_app(authorization, schema, opts = {}) + data, _status_code, _headers = create_app_with_http_info(authorization, schema, opts) + data + end + + # @param authorization [String] + # @param schema [Schema] + # @param [Hash] opts the optional parameters + # @return [Array<(Schema, Integer, Hash)>] Schema data, response status code and response headers + def create_app_with_http_info(authorization, schema, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.create_app ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.create_app" + end + # verify the required parameter 'schema' is set + if @api_client.config.client_side_validation && schema.nil? + fail ArgumentError, "Missing the required parameter 'schema' when calling DefaultApi.create_app" + end + # resource path + local_var_path = '/api/2/apps' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(schema) + + # return_type + return_type = opts[:debug_return_type] || 'Schema' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.create_app", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#create_app\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param create_authorization_server_request [CreateAuthorizationServerRequest] + # @param [Hash] opts the optional parameters + # @return [Id] + def create_authorization_server(authorization, create_authorization_server_request, opts = {}) + data, _status_code, _headers = create_authorization_server_with_http_info(authorization, create_authorization_server_request, opts) + data + end + + # @param authorization [String] + # @param create_authorization_server_request [CreateAuthorizationServerRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(Id, Integer, Hash)>] Id data, response status code and response headers + def create_authorization_server_with_http_info(authorization, create_authorization_server_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.create_authorization_server ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.create_authorization_server" + end + # verify the required parameter 'create_authorization_server_request' is set + if @api_client.config.client_side_validation && create_authorization_server_request.nil? + fail ArgumentError, "Missing the required parameter 'create_authorization_server_request' when calling DefaultApi.create_authorization_server" + end + # resource path + local_var_path = '/api/2/api_authorizations' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(create_authorization_server_request) + + # return_type + return_type = opts[:debug_return_type] || 'Id' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.create_authorization_server", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#create_authorization_server\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param create_environment_variable_request [CreateEnvironmentVariableRequest] + # @param [Hash] opts the optional parameters + # @return [Envvar] + def create_environment_variable(authorization, create_environment_variable_request, opts = {}) + data, _status_code, _headers = create_environment_variable_with_http_info(authorization, create_environment_variable_request, opts) + data + end + + # @param authorization [String] + # @param create_environment_variable_request [CreateEnvironmentVariableRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(Envvar, Integer, Hash)>] Envvar data, response status code and response headers + def create_environment_variable_with_http_info(authorization, create_environment_variable_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.create_environment_variable ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.create_environment_variable" + end + # verify the required parameter 'create_environment_variable_request' is set + if @api_client.config.client_side_validation && create_environment_variable_request.nil? + fail ArgumentError, "Missing the required parameter 'create_environment_variable_request' when calling DefaultApi.create_environment_variable" + end + # resource path + local_var_path = '/api/2/hooks/envs' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(create_environment_variable_request) + + # return_type + return_type = opts[:debug_return_type] || 'Envvar' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.create_environment_variable", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#create_environment_variable\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param hook [Hook] + # @param [Hash] opts the optional parameters + # @return [nil] + def create_hook(authorization, hook, opts = {}) + create_hook_with_http_info(authorization, hook, opts) + nil + end + + # @param authorization [String] + # @param hook [Hook] + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def create_hook_with_http_info(authorization, hook, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.create_hook ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.create_hook" + end + # verify the required parameter 'hook' is set + if @api_client.config.client_side_validation && hook.nil? + fail ArgumentError, "Missing the required parameter 'hook' when calling DefaultApi.create_hook" + end + # resource path + local_var_path = '/api/2/hooks' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(hook) + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.create_hook", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#create_hook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param mapping [Mapping] + # @param [Hash] opts the optional parameters + # @return [Integer] + def create_mapping(authorization, mapping, opts = {}) + data, _status_code, _headers = create_mapping_with_http_info(authorization, mapping, opts) + data + end + + # @param authorization [String] + # @param mapping [Mapping] + # @param [Hash] opts the optional parameters + # @return [Array<(Integer, Integer, Hash)>] Integer data, response status code and response headers + def create_mapping_with_http_info(authorization, mapping, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.create_mapping ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.create_mapping" + end + # verify the required parameter 'mapping' is set + if @api_client.config.client_side_validation && mapping.nil? + fail ArgumentError, "Missing the required parameter 'mapping' when calling DefaultApi.create_mapping" + end + # resource path + local_var_path = '/api/2/mappings' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(mapping) + + # return_type + return_type = opts[:debug_return_type] || 'Integer' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.create_mapping", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#create_mapping\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param risk_rule [RiskRule] + # @param [Hash] opts the optional parameters + # @return [nil] + def create_risk_rule(authorization, risk_rule, opts = {}) + create_risk_rule_with_http_info(authorization, risk_rule, opts) + nil + end + + # @param authorization [String] + # @param risk_rule [RiskRule] + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def create_risk_rule_with_http_info(authorization, risk_rule, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.create_risk_rule ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.create_risk_rule" + end + # verify the required parameter 'risk_rule' is set + if @api_client.config.client_side_validation && risk_rule.nil? + fail ArgumentError, "Missing the required parameter 'risk_rule' when calling DefaultApi.create_risk_rule" + end + # resource path + local_var_path = '/api/2/risk/rules' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(risk_rule) + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.create_risk_rule", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#create_risk_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param [Hash] opts the optional parameters + # @return [Array] + def create_roles(authorization, opts = {}) + data, _status_code, _headers = create_roles_with_http_info(authorization, opts) + data + end + + # @param authorization [String] + # @param [Hash] opts the optional parameters + # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers + def create_roles_with_http_info(authorization, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.create_roles ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.create_roles" + end + # resource path + local_var_path = '/api/2/roles' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Array' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.create_roles", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#create_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param app_id [Integer] + # @param rule [Rule] + # @param [Hash] opts the optional parameters + # @return [RuleId] + def create_rule(authorization, app_id, rule, opts = {}) + data, _status_code, _headers = create_rule_with_http_info(authorization, app_id, rule, opts) + data + end + + # @param authorization [String] + # @param app_id [Integer] + # @param rule [Rule] + # @param [Hash] opts the optional parameters + # @return [Array<(RuleId, Integer, Hash)>] RuleId data, response status code and response headers + def create_rule_with_http_info(authorization, app_id, rule, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.create_rule ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.create_rule" + end + # verify the required parameter 'app_id' is set + if @api_client.config.client_side_validation && app_id.nil? + fail ArgumentError, "Missing the required parameter 'app_id' when calling DefaultApi.create_rule" + end + # verify the required parameter 'rule' is set + if @api_client.config.client_side_validation && rule.nil? + fail ArgumentError, "Missing the required parameter 'rule' when calling DefaultApi.create_rule" + end + # resource path + local_var_path = '/api/2/apps/{app_id}/rules'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(rule) + + # return_type + return_type = opts[:debug_return_type] || 'RuleId' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.create_rule", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#create_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param user [User] + # @param [Hash] opts the optional parameters + # @option opts [String] :mappings Controls how mappings will be applied to the user on creation. Defaults to async. + # @option opts [Boolean] :validate_policy Will passwords validate against the User Policy? Defaults to true. + # @return [User] + def create_user(authorization, user, opts = {}) + data, _status_code, _headers = create_user_with_http_info(authorization, user, opts) + data + end + + # @param authorization [String] + # @param user [User] + # @param [Hash] opts the optional parameters + # @option opts [String] :mappings Controls how mappings will be applied to the user on creation. Defaults to async. + # @option opts [Boolean] :validate_policy Will passwords validate against the User Policy? Defaults to true. + # @return [Array<(User, Integer, Hash)>] User data, response status code and response headers + def create_user_with_http_info(authorization, user, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.create_user ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.create_user" + end + # verify the required parameter 'user' is set + if @api_client.config.client_side_validation && user.nil? + fail ArgumentError, "Missing the required parameter 'user' when calling DefaultApi.create_user" + end + allowable_values = ["async", "sync", "disabled"] + if @api_client.config.client_side_validation && opts[:'mappings'] && !allowable_values.include?(opts[:'mappings']) + fail ArgumentError, "invalid value for \"mappings\", must be one of #{allowable_values}" + end + # resource path + local_var_path = '/api/2/users' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'mappings'] = opts[:'mappings'] if !opts[:'mappings'].nil? + query_params[:'validate_policy'] = opts[:'validate_policy'] if !opts[:'validate_policy'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(user) + + # return_type + return_type = opts[:debug_return_type] || 'User' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.create_user", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#create_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param id [Integer] + # @param claim_id [Integer] + # @param [Hash] opts the optional parameters + # @return [nil] + def delete_access_token_claim(authorization, id, claim_id, opts = {}) + delete_access_token_claim_with_http_info(authorization, id, claim_id, opts) + nil + end + + # @param authorization [String] + # @param id [Integer] + # @param claim_id [Integer] + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_access_token_claim_with_http_info(authorization, id, claim_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.delete_access_token_claim ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.delete_access_token_claim" + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.delete_access_token_claim" + end + # verify the required parameter 'claim_id' is set + if @api_client.config.client_side_validation && claim_id.nil? + fail ArgumentError, "Missing the required parameter 'claim_id' when calling DefaultApi.delete_access_token_claim" + end + # resource path + local_var_path = '/api/2/api_authorizations/{id}/claims/{claim_id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'claim_id' + '}', CGI.escape(claim_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.delete_access_token_claim", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#delete_access_token_claim\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param app_id [Integer] + # @param [Hash] opts the optional parameters + # @return [nil] + def delete_app(authorization, app_id, opts = {}) + delete_app_with_http_info(authorization, app_id, opts) + nil + end + + # @param authorization [String] + # @param app_id [Integer] + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_app_with_http_info(authorization, app_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.delete_app ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.delete_app" + end + # verify the required parameter 'app_id' is set + if @api_client.config.client_side_validation && app_id.nil? + fail ArgumentError, "Missing the required parameter 'app_id' when calling DefaultApi.delete_app" + end + # resource path + local_var_path = '/api/2/apps/{app_id}'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.delete_app", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#delete_app\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param app_id [Integer] + # @param parameter_id [Integer] + # @param [Hash] opts the optional parameters + # @return [nil] + def delete_app_parameter(authorization, app_id, parameter_id, opts = {}) + delete_app_parameter_with_http_info(authorization, app_id, parameter_id, opts) + nil + end + + # @param authorization [String] + # @param app_id [Integer] + # @param parameter_id [Integer] + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_app_parameter_with_http_info(authorization, app_id, parameter_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.delete_app_parameter ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.delete_app_parameter" + end + # verify the required parameter 'app_id' is set + if @api_client.config.client_side_validation && app_id.nil? + fail ArgumentError, "Missing the required parameter 'app_id' when calling DefaultApi.delete_app_parameter" + end + # verify the required parameter 'parameter_id' is set + if @api_client.config.client_side_validation && parameter_id.nil? + fail ArgumentError, "Missing the required parameter 'parameter_id' when calling DefaultApi.delete_app_parameter" + end + # resource path + local_var_path = '/api/2/apps/{app_id}/parameters/{parameter_id}'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'parameter_id' + '}', CGI.escape(parameter_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.delete_app_parameter", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#delete_app_parameter\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param id [Integer] + # @param [Hash] opts the optional parameters + # @return [nil] + def delete_authorization_server(authorization, id, opts = {}) + delete_authorization_server_with_http_info(authorization, id, opts) + nil + end + + # @param authorization [String] + # @param id [Integer] + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_authorization_server_with_http_info(authorization, id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.delete_authorization_server ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.delete_authorization_server" + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.delete_authorization_server" + end + # resource path + local_var_path = '/api/2/api_authorizations/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.delete_authorization_server", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#delete_authorization_server\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param envvar_id [String] Set to the id of the Hook Environment Variable that you want to fetch. + # @param [Hash] opts the optional parameters + # @return [nil] + def delete_environment_variable(authorization, envvar_id, opts = {}) + delete_environment_variable_with_http_info(authorization, envvar_id, opts) + nil + end + + # @param authorization [String] + # @param envvar_id [String] Set to the id of the Hook Environment Variable that you want to fetch. + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_environment_variable_with_http_info(authorization, envvar_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.delete_environment_variable ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.delete_environment_variable" + end + # verify the required parameter 'envvar_id' is set + if @api_client.config.client_side_validation && envvar_id.nil? + fail ArgumentError, "Missing the required parameter 'envvar_id' when calling DefaultApi.delete_environment_variable" + end + # resource path + local_var_path = '/api/2/hooks/envs/{envvar_id}'.sub('{' + 'envvar_id' + '}', CGI.escape(envvar_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.delete_environment_variable", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#delete_environment_variable\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param user_id [Integer] Set to the id of the user. + # @param device_id [Integer] Set to the device_id of the MFA device. + # @param [Hash] opts the optional parameters + # @return [nil] + def delete_factor(authorization, user_id, device_id, opts = {}) + delete_factor_with_http_info(authorization, user_id, device_id, opts) + nil + end + + # @param authorization [String] + # @param user_id [Integer] Set to the id of the user. + # @param device_id [Integer] Set to the device_id of the MFA device. + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_factor_with_http_info(authorization, user_id, device_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.delete_factor ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.delete_factor" + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling DefaultApi.delete_factor" + end + # verify the required parameter 'device_id' is set + if @api_client.config.client_side_validation && device_id.nil? + fail ArgumentError, "Missing the required parameter 'device_id' when calling DefaultApi.delete_factor" + end + # resource path + local_var_path = '/api/2/mfa/users/{user_id}/devices/{device_id}'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s)).sub('{' + 'device_id' + '}', CGI.escape(device_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.delete_factor", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#delete_factor\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param hook_id [String] Set to the id of the Hook that you want to return. + # @param [Hash] opts the optional parameters + # @return [nil] + def delete_hook(authorization, hook_id, opts = {}) + delete_hook_with_http_info(authorization, hook_id, opts) + nil + end + + # @param authorization [String] + # @param hook_id [String] Set to the id of the Hook that you want to return. + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_hook_with_http_info(authorization, hook_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.delete_hook ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.delete_hook" + end + # verify the required parameter 'hook_id' is set + if @api_client.config.client_side_validation && hook_id.nil? + fail ArgumentError, "Missing the required parameter 'hook_id' when calling DefaultApi.delete_hook" + end + # resource path + local_var_path = '/api/2/hooks/{hook_id}'.sub('{' + 'hook_id' + '}', CGI.escape(hook_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.delete_hook", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#delete_hook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param mapping_id [Integer] The id of the user mapping to locate. + # @param [Hash] opts the optional parameters + # @return [nil] + def delete_mapping(authorization, mapping_id, opts = {}) + delete_mapping_with_http_info(authorization, mapping_id, opts) + nil + end + + # @param authorization [String] + # @param mapping_id [Integer] The id of the user mapping to locate. + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_mapping_with_http_info(authorization, mapping_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.delete_mapping ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.delete_mapping" + end + # verify the required parameter 'mapping_id' is set + if @api_client.config.client_side_validation && mapping_id.nil? + fail ArgumentError, "Missing the required parameter 'mapping_id' when calling DefaultApi.delete_mapping" + end + # resource path + local_var_path = '/api/2/mappings/{mapping_id}'.sub('{' + 'mapping_id' + '}', CGI.escape(mapping_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.delete_mapping", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#delete_mapping\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param risk_rule_id [String] + # @param [Hash] opts the optional parameters + # @return [RiskRule] + def delete_risk_rule(authorization, risk_rule_id, opts = {}) + data, _status_code, _headers = delete_risk_rule_with_http_info(authorization, risk_rule_id, opts) + data + end + + # @param authorization [String] + # @param risk_rule_id [String] + # @param [Hash] opts the optional parameters + # @return [Array<(RiskRule, Integer, Hash)>] RiskRule data, response status code and response headers + def delete_risk_rule_with_http_info(authorization, risk_rule_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.delete_risk_rule ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.delete_risk_rule" + end + # verify the required parameter 'risk_rule_id' is set + if @api_client.config.client_side_validation && risk_rule_id.nil? + fail ArgumentError, "Missing the required parameter 'risk_rule_id' when calling DefaultApi.delete_risk_rule" + end + # resource path + local_var_path = '/api/2/risk/rules/{risk_rule_id}'.sub('{' + 'risk_rule_id' + '}', CGI.escape(risk_rule_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'RiskRule' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.delete_risk_rule", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#delete_risk_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param role_id [Integer] Set to the id of the role you want to return. + # @param [Hash] opts the optional parameters + # @return [nil] + def delete_role(authorization, role_id, opts = {}) + delete_role_with_http_info(authorization, role_id, opts) + nil + end + + # @param authorization [String] + # @param role_id [Integer] Set to the id of the role you want to return. + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_role_with_http_info(authorization, role_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.delete_role ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.delete_role" + end + # verify the required parameter 'role_id' is set + if @api_client.config.client_side_validation && role_id.nil? + fail ArgumentError, "Missing the required parameter 'role_id' when calling DefaultApi.delete_role" + end + # resource path + local_var_path = '/api/2/roles/{role_id}'.sub('{' + 'role_id' + '}', CGI.escape(role_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.delete_role", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#delete_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param app_id [Integer] + # @param rule_id [Integer] The id of the app rule to locate. + # @param [Hash] opts the optional parameters + # @return [nil] + def delete_rule(authorization, app_id, rule_id, opts = {}) + delete_rule_with_http_info(authorization, app_id, rule_id, opts) + nil + end + + # @param authorization [String] + # @param app_id [Integer] + # @param rule_id [Integer] The id of the app rule to locate. + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_rule_with_http_info(authorization, app_id, rule_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.delete_rule ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.delete_rule" + end + # verify the required parameter 'app_id' is set + if @api_client.config.client_side_validation && app_id.nil? + fail ArgumentError, "Missing the required parameter 'app_id' when calling DefaultApi.delete_rule" + end + # verify the required parameter 'rule_id' is set + if @api_client.config.client_side_validation && rule_id.nil? + fail ArgumentError, "Missing the required parameter 'rule_id' when calling DefaultApi.delete_rule" + end + # resource path + local_var_path = '/api/2/apps/{app_id}/rules/{rule_id}'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'rule_id' + '}', CGI.escape(rule_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.delete_rule", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#delete_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param id [Integer] + # @param scope_id [Integer] + # @param [Hash] opts the optional parameters + # @return [nil] + def delete_scope(authorization, id, scope_id, opts = {}) + delete_scope_with_http_info(authorization, id, scope_id, opts) + nil + end + + # @param authorization [String] + # @param id [Integer] + # @param scope_id [Integer] + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_scope_with_http_info(authorization, id, scope_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.delete_scope ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.delete_scope" + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.delete_scope" + end + # verify the required parameter 'scope_id' is set + if @api_client.config.client_side_validation && scope_id.nil? + fail ArgumentError, "Missing the required parameter 'scope_id' when calling DefaultApi.delete_scope" + end + # resource path + local_var_path = '/api/2/api_authorizations/{id}/scopes/{scope_id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'scope_id' + '}', CGI.escape(scope_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.delete_scope", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#delete_scope\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param user_id [Integer] Set to the id of the user that you want to return. + # @param [Hash] opts the optional parameters + # @return [nil] + def delete_user(authorization, user_id, opts = {}) + delete_user_with_http_info(authorization, user_id, opts) + nil + end + + # @param authorization [String] + # @param user_id [Integer] Set to the id of the user that you want to return. + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_user_with_http_info(authorization, user_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.delete_user ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.delete_user" + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling DefaultApi.delete_user" + end + # resource path + local_var_path = '/api/2/users/{user_id}'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.delete_user", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#delete_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param mapping_id [Integer] The id of the user mapping to locate. + # @param request_body [Array] Request body is a list of user IDs tested against the mapping conditions to verify that the mapping would be applied + # @param [Hash] opts the optional parameters + # @return [Array] + def dry_run_mapping(authorization, mapping_id, request_body, opts = {}) + data, _status_code, _headers = dry_run_mapping_with_http_info(authorization, mapping_id, request_body, opts) + data + end + + # @param authorization [String] + # @param mapping_id [Integer] The id of the user mapping to locate. + # @param request_body [Array] Request body is a list of user IDs tested against the mapping conditions to verify that the mapping would be applied + # @param [Hash] opts the optional parameters + # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers + def dry_run_mapping_with_http_info(authorization, mapping_id, request_body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.dry_run_mapping ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.dry_run_mapping" + end + # verify the required parameter 'mapping_id' is set + if @api_client.config.client_side_validation && mapping_id.nil? + fail ArgumentError, "Missing the required parameter 'mapping_id' when calling DefaultApi.dry_run_mapping" + end + # verify the required parameter 'request_body' is set + if @api_client.config.client_side_validation && request_body.nil? + fail ArgumentError, "Missing the required parameter 'request_body' when calling DefaultApi.dry_run_mapping" + end + # resource path + local_var_path = '/api/2/mappings/{mapping_id}/dryrun'.sub('{' + 'mapping_id' + '}', CGI.escape(mapping_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body) + + # return_type + return_type = opts[:debug_return_type] || 'Array' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.dry_run_mapping", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#dry_run_mapping\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param user_id [Integer] Set to the id of the user. + # @param enroll_factor_request [EnrollFactorRequest] + # @param [Hash] opts the optional parameters + # @return [Array] + def enroll_factor(authorization, user_id, enroll_factor_request, opts = {}) + data, _status_code, _headers = enroll_factor_with_http_info(authorization, user_id, enroll_factor_request, opts) + data + end + + # @param authorization [String] + # @param user_id [Integer] Set to the id of the user. + # @param enroll_factor_request [EnrollFactorRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers + def enroll_factor_with_http_info(authorization, user_id, enroll_factor_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.enroll_factor ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.enroll_factor" + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling DefaultApi.enroll_factor" + end + # verify the required parameter 'enroll_factor_request' is set + if @api_client.config.client_side_validation && enroll_factor_request.nil? + fail ArgumentError, "Missing the required parameter 'enroll_factor_request' when calling DefaultApi.enroll_factor" + end + # resource path + local_var_path = '/api/2/mfa/users/{user_id}/registrations'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(enroll_factor_request) + + # return_type + return_type = opts[:debug_return_type] || 'Array' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.enroll_factor", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#enroll_factor\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param generate_mfa_token_request [GenerateMfaTokenRequest] + # @param [Hash] opts the optional parameters + # @return [GenerateMfaToken200Response] + def generate_mfa_token(authorization, generate_mfa_token_request, opts = {}) + data, _status_code, _headers = generate_mfa_token_with_http_info(authorization, generate_mfa_token_request, opts) + data + end + + # @param authorization [String] + # @param generate_mfa_token_request [GenerateMfaTokenRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(GenerateMfaToken200Response, Integer, Hash)>] GenerateMfaToken200Response data, response status code and response headers + def generate_mfa_token_with_http_info(authorization, generate_mfa_token_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.generate_mfa_token ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.generate_mfa_token" + end + # verify the required parameter 'generate_mfa_token_request' is set + if @api_client.config.client_side_validation && generate_mfa_token_request.nil? + fail ArgumentError, "Missing the required parameter 'generate_mfa_token_request' when calling DefaultApi.generate_mfa_token" + end + # resource path + local_var_path = '/api/2/mfs/users/{user_id}/mfa_token' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(generate_mfa_token_request) + + # return_type + return_type = opts[:debug_return_type] || 'GenerateMfaToken200Response' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.generate_mfa_token", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#generate_mfa_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param generate_saml_assertion_request [GenerateSamlAssertionRequest] + # @param [Hash] opts the optional parameters + # @return [nil] + def generate_saml_assertion(authorization, generate_saml_assertion_request, opts = {}) + generate_saml_assertion_with_http_info(authorization, generate_saml_assertion_request, opts) + nil + end + + # @param authorization [String] + # @param generate_saml_assertion_request [GenerateSamlAssertionRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def generate_saml_assertion_with_http_info(authorization, generate_saml_assertion_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.generate_saml_assertion ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.generate_saml_assertion" + end + # verify the required parameter 'generate_saml_assertion_request' is set + if @api_client.config.client_side_validation && generate_saml_assertion_request.nil? + fail ArgumentError, "Missing the required parameter 'generate_saml_assertion_request' when calling DefaultApi.generate_saml_assertion" + end + # resource path + local_var_path = '/api/2/saml_assertion' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(generate_saml_assertion_request) + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.generate_saml_assertion", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#generate_saml_assertion\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param generate_token_request [GenerateTokenRequest] + # @param [Hash] opts the optional parameters + # @return [GenerateToken200Response] + def generate_token(authorization, generate_token_request, opts = {}) + data, _status_code, _headers = generate_token_with_http_info(authorization, generate_token_request, opts) + data + end + + # @param authorization [String] + # @param generate_token_request [GenerateTokenRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(GenerateToken200Response, Integer, Hash)>] GenerateToken200Response data, response status code and response headers + def generate_token_with_http_info(authorization, generate_token_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.generate_token ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.generate_token" + end + # verify the required parameter 'generate_token_request' is set + if @api_client.config.client_side_validation && generate_token_request.nil? + fail ArgumentError, "Missing the required parameter 'generate_token_request' when calling DefaultApi.generate_token" + end + # resource path + local_var_path = '/auth/oauth2/v2/token' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(generate_token_request) + + # return_type + return_type = opts[:debug_return_type] || 'GenerateToken200Response' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.generate_token", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#generate_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param app_id [Integer] + # @param [Hash] opts the optional parameters + # @return [Schema] + def get_app(authorization, app_id, opts = {}) + data, _status_code, _headers = get_app_with_http_info(authorization, app_id, opts) + data + end + + # @param authorization [String] + # @param app_id [Integer] + # @param [Hash] opts the optional parameters + # @return [Array<(Schema, Integer, Hash)>] Schema data, response status code and response headers + def get_app_with_http_info(authorization, app_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.get_app ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.get_app" + end + # verify the required parameter 'app_id' is set + if @api_client.config.client_side_validation && app_id.nil? + fail ArgumentError, "Missing the required parameter 'app_id' when calling DefaultApi.get_app" + end + # resource path + local_var_path = '/api/2/apps/{app_id}'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Schema' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.get_app", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#get_app\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param id [Integer] + # @param [Hash] opts the optional parameters + # @return [GetAuthorizationServer200Response] + def get_authorization_server(authorization, id, opts = {}) + data, _status_code, _headers = get_authorization_server_with_http_info(authorization, id, opts) + data + end + + # @param authorization [String] + # @param id [Integer] + # @param [Hash] opts the optional parameters + # @return [Array<(GetAuthorizationServer200Response, Integer, Hash)>] GetAuthorizationServer200Response data, response status code and response headers + def get_authorization_server_with_http_info(authorization, id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.get_authorization_server ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.get_authorization_server" + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.get_authorization_server" + end + # resource path + local_var_path = '/api/2/api_authorizations/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'GetAuthorizationServer200Response' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.get_authorization_server", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#get_authorization_server\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param user_id [Integer] Set to the id of the user. + # @param [Hash] opts the optional parameters + # @return [Array] + def get_available_factors(authorization, user_id, opts = {}) + data, _status_code, _headers = get_available_factors_with_http_info(authorization, user_id, opts) + data + end + + # @param authorization [String] + # @param user_id [Integer] Set to the id of the user. + # @param [Hash] opts the optional parameters + # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers + def get_available_factors_with_http_info(authorization, user_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.get_available_factors ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.get_available_factors" + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling DefaultApi.get_available_factors" + end + # resource path + local_var_path = '/api/2/mfa/users/{user_id}/factors'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Array' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.get_available_factors", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#get_available_factors\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param id [Integer] + # @param [Hash] opts the optional parameters + # @return [Array] + def get_client_apps(authorization, id, opts = {}) + data, _status_code, _headers = get_client_apps_with_http_info(authorization, id, opts) + data + end + + # @param authorization [String] + # @param id [Integer] + # @param [Hash] opts the optional parameters + # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers + def get_client_apps_with_http_info(authorization, id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.get_client_apps ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.get_client_apps" + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.get_client_apps" + end + # resource path + local_var_path = '/api/2/api_authorizations/{id}/clients'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Array' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.get_client_apps", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#get_client_apps\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param user_id [Integer] Set to the id of the user. + # @param [Hash] opts the optional parameters + # @return [Array] + def get_enrolled_factors(authorization, user_id, opts = {}) + data, _status_code, _headers = get_enrolled_factors_with_http_info(authorization, user_id, opts) + data + end + + # @param authorization [String] + # @param user_id [Integer] Set to the id of the user. + # @param [Hash] opts the optional parameters + # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers + def get_enrolled_factors_with_http_info(authorization, user_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.get_enrolled_factors ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.get_enrolled_factors" + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling DefaultApi.get_enrolled_factors" + end + # resource path + local_var_path = '/api/2/mfa/users/{user_id}/devices'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Array' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.get_enrolled_factors", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#get_enrolled_factors\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param envvar_id [String] Set to the id of the Hook Environment Variable that you want to fetch. + # @param [Hash] opts the optional parameters + # @return [Envvar] + def get_environment_variable(authorization, envvar_id, opts = {}) + data, _status_code, _headers = get_environment_variable_with_http_info(authorization, envvar_id, opts) + data + end + + # @param authorization [String] + # @param envvar_id [String] Set to the id of the Hook Environment Variable that you want to fetch. + # @param [Hash] opts the optional parameters + # @return [Array<(Envvar, Integer, Hash)>] Envvar data, response status code and response headers + def get_environment_variable_with_http_info(authorization, envvar_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.get_environment_variable ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.get_environment_variable" + end + # verify the required parameter 'envvar_id' is set + if @api_client.config.client_side_validation && envvar_id.nil? + fail ArgumentError, "Missing the required parameter 'envvar_id' when calling DefaultApi.get_environment_variable" + end + # resource path + local_var_path = '/api/2/hooks/envs/{envvar_id}'.sub('{' + 'envvar_id' + '}', CGI.escape(envvar_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Envvar' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.get_environment_variable", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#get_environment_variable\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param hook_id [String] Set to the id of the Hook that you want to return. + # @param [Hash] opts the optional parameters + # @return [Hook] + def get_hook(authorization, hook_id, opts = {}) + data, _status_code, _headers = get_hook_with_http_info(authorization, hook_id, opts) + data + end + + # @param authorization [String] + # @param hook_id [String] Set to the id of the Hook that you want to return. + # @param [Hash] opts the optional parameters + # @return [Array<(Hook, Integer, Hash)>] Hook data, response status code and response headers + def get_hook_with_http_info(authorization, hook_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.get_hook ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.get_hook" + end + # verify the required parameter 'hook_id' is set + if @api_client.config.client_side_validation && hook_id.nil? + fail ArgumentError, "Missing the required parameter 'hook_id' when calling DefaultApi.get_hook" + end + # resource path + local_var_path = '/api/2/hooks/{hook_id}'.sub('{' + 'hook_id' + '}', CGI.escape(hook_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Hook' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.get_hook", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#get_hook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param hook_id [String] Set to the id of the Hook that you want to return. + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. + # @option opts [Integer] :page The page number of results to return. + # @option opts [String] :cursor Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. + # @option opts [String] :request_id Returns logs that contain this request_id. + # @option opts [String] :correlation_id Returns logs that contain this correlation_id. + # @return [Array] + def get_logs(authorization, hook_id, opts = {}) + data, _status_code, _headers = get_logs_with_http_info(authorization, hook_id, opts) + data + end + + # @param authorization [String] + # @param hook_id [String] Set to the id of the Hook that you want to return. + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. + # @option opts [Integer] :page The page number of results to return. + # @option opts [String] :cursor Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. + # @option opts [String] :request_id Returns logs that contain this request_id. + # @option opts [String] :correlation_id Returns logs that contain this correlation_id. + # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers + def get_logs_with_http_info(authorization, hook_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.get_logs ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.get_logs" + end + # verify the required parameter 'hook_id' is set + if @api_client.config.client_side_validation && hook_id.nil? + fail ArgumentError, "Missing the required parameter 'hook_id' when calling DefaultApi.get_logs" + end + # resource path + local_var_path = '/api/2/hooks/{hook_id}/logs'.sub('{' + 'hook_id' + '}', CGI.escape(hook_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? + query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? + query_params[:'request_id'] = opts[:'request_id'] if !opts[:'request_id'].nil? + query_params[:'correlation_id'] = opts[:'correlation_id'] if !opts[:'correlation_id'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Array' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.get_logs", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#get_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param mapping_id [Integer] The id of the user mapping to locate. + # @param [Hash] opts the optional parameters + # @return [Mapping] + def get_mapping(authorization, mapping_id, opts = {}) + data, _status_code, _headers = get_mapping_with_http_info(authorization, mapping_id, opts) + data + end + + # @param authorization [String] + # @param mapping_id [Integer] The id of the user mapping to locate. + # @param [Hash] opts the optional parameters + # @return [Array<(Mapping, Integer, Hash)>] Mapping data, response status code and response headers + def get_mapping_with_http_info(authorization, mapping_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.get_mapping ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.get_mapping" + end + # verify the required parameter 'mapping_id' is set + if @api_client.config.client_side_validation && mapping_id.nil? + fail ArgumentError, "Missing the required parameter 'mapping_id' when calling DefaultApi.get_mapping" + end + # resource path + local_var_path = '/api/2/mappings/{mapping_id}'.sub('{' + 'mapping_id' + '}', CGI.escape(mapping_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Mapping' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.get_mapping", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#get_mapping\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param [Hash] opts the optional parameters + # @return [GetRateLimit200Response] + def get_rate_limit(authorization, opts = {}) + data, _status_code, _headers = get_rate_limit_with_http_info(authorization, opts) + data + end + + # @param authorization [String] + # @param [Hash] opts the optional parameters + # @return [Array<(GetRateLimit200Response, Integer, Hash)>] GetRateLimit200Response data, response status code and response headers + def get_rate_limit_with_http_info(authorization, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.get_rate_limit ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.get_rate_limit" + end + # resource path + local_var_path = '/auth/rate_limit' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'GetRateLimit200Response' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.get_rate_limit", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#get_rate_limit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param risk_rule_id [String] + # @param [Hash] opts the optional parameters + # @return [nil] + def get_risk_rule(authorization, risk_rule_id, opts = {}) + get_risk_rule_with_http_info(authorization, risk_rule_id, opts) + nil + end + + # @param authorization [String] + # @param risk_rule_id [String] + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def get_risk_rule_with_http_info(authorization, risk_rule_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.get_risk_rule ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.get_risk_rule" + end + # verify the required parameter 'risk_rule_id' is set + if @api_client.config.client_side_validation && risk_rule_id.nil? + fail ArgumentError, "Missing the required parameter 'risk_rule_id' when calling DefaultApi.get_risk_rule" + end + # resource path + local_var_path = '/api/2/risk/rules/{risk_rule_id}'.sub('{' + 'risk_rule_id' + '}', CGI.escape(risk_rule_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.get_risk_rule", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#get_risk_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param get_risk_score_request [GetRiskScoreRequest] + # @param [Hash] opts the optional parameters + # @return [GetRiskScore200Response] + def get_risk_score(authorization, get_risk_score_request, opts = {}) + data, _status_code, _headers = get_risk_score_with_http_info(authorization, get_risk_score_request, opts) + data + end + + # @param authorization [String] + # @param get_risk_score_request [GetRiskScoreRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(GetRiskScore200Response, Integer, Hash)>] GetRiskScore200Response data, response status code and response headers + def get_risk_score_with_http_info(authorization, get_risk_score_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.get_risk_score ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.get_risk_score" + end + # verify the required parameter 'get_risk_score_request' is set + if @api_client.config.client_side_validation && get_risk_score_request.nil? + fail ArgumentError, "Missing the required parameter 'get_risk_score_request' when calling DefaultApi.get_risk_score" + end + # resource path + local_var_path = '/api/2/risk/verify' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(get_risk_score_request) + + # return_type + return_type = opts[:debug_return_type] || 'GetRiskScore200Response' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.get_risk_score", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#get_risk_score\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param role_id [Integer] Set to the id of the role you want to return. + # @param [Hash] opts the optional parameters + # @return [Role] + def get_role(authorization, role_id, opts = {}) + data, _status_code, _headers = get_role_with_http_info(authorization, role_id, opts) + data + end + + # @param authorization [String] + # @param role_id [Integer] Set to the id of the role you want to return. + # @param [Hash] opts the optional parameters + # @return [Array<(Role, Integer, Hash)>] Role data, response status code and response headers + def get_role_with_http_info(authorization, role_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.get_role ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.get_role" + end + # verify the required parameter 'role_id' is set + if @api_client.config.client_side_validation && role_id.nil? + fail ArgumentError, "Missing the required parameter 'role_id' when calling DefaultApi.get_role" + end + # resource path + local_var_path = '/api/2/roles/{role_id}'.sub('{' + 'role_id' + '}', CGI.escape(role_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Role' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.get_role", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#get_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param role_id [Integer] Set to the id of the role you want to return. + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. + # @option opts [Integer] :page The page number of results to return. + # @option opts [String] :cursor Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. + # @option opts [String] :name Allows you to filter on first name, last name, username, and email address. + # @option opts [Boolean] :include_unassigned Optional. Defaults to false. Include users that aren’t assigned to the role. + # @return [Array] + def get_role_admins(authorization, role_id, opts = {}) + data, _status_code, _headers = get_role_admins_with_http_info(authorization, role_id, opts) + data + end + + # @param authorization [String] + # @param role_id [Integer] Set to the id of the role you want to return. + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. + # @option opts [Integer] :page The page number of results to return. + # @option opts [String] :cursor Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. + # @option opts [String] :name Allows you to filter on first name, last name, username, and email address. + # @option opts [Boolean] :include_unassigned Optional. Defaults to false. Include users that aren’t assigned to the role. + # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers + def get_role_admins_with_http_info(authorization, role_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.get_role_admins ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.get_role_admins" + end + # verify the required parameter 'role_id' is set + if @api_client.config.client_side_validation && role_id.nil? + fail ArgumentError, "Missing the required parameter 'role_id' when calling DefaultApi.get_role_admins" + end + # resource path + local_var_path = '/api/2/roles/{role_id}/admins'.sub('{' + 'role_id' + '}', CGI.escape(role_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? + query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? + query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil? + query_params[:'include_unassigned'] = opts[:'include_unassigned'] if !opts[:'include_unassigned'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['applcation/json', 'application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Array' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.get_role_admins", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#get_role_admins\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param role_id [Integer] Set to the id of the role you want to return. + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. + # @option opts [Integer] :page The page number of results to return. + # @option opts [String] :cursor Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. + # @option opts [Boolean] :assigned Optional. Defaults to true. Returns all apps not yet assigned to the role. + # @return [Array] + def get_role_apps(authorization, role_id, opts = {}) + data, _status_code, _headers = get_role_apps_with_http_info(authorization, role_id, opts) + data + end + + # @param authorization [String] + # @param role_id [Integer] Set to the id of the role you want to return. + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. + # @option opts [Integer] :page The page number of results to return. + # @option opts [String] :cursor Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. + # @option opts [Boolean] :assigned Optional. Defaults to true. Returns all apps not yet assigned to the role. + # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers + def get_role_apps_with_http_info(authorization, role_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.get_role_apps ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.get_role_apps" + end + # verify the required parameter 'role_id' is set + if @api_client.config.client_side_validation && role_id.nil? + fail ArgumentError, "Missing the required parameter 'role_id' when calling DefaultApi.get_role_apps" + end + # resource path + local_var_path = '/api/2/roles/{role_id}/apps'.sub('{' + 'role_id' + '}', CGI.escape(role_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? + query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? + query_params[:'assigned'] = opts[:'assigned'] if !opts[:'assigned'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['applcation/json', 'application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Array' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.get_role_apps", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#get_role_apps\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param role_id [Integer] Set to the id of the role you want to return. + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. + # @option opts [Integer] :page The page number of results to return. + # @option opts [String] :cursor Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. + # @option opts [String] :name Allows you to filter on first name, last name, username, and email address. + # @option opts [Boolean] :include_unassigned Optional. Defaults to false. Include users that aren’t assigned to the role. + # @return [Array] + def get_role_users(authorization, role_id, opts = {}) + data, _status_code, _headers = get_role_users_with_http_info(authorization, role_id, opts) + data + end + + # @param authorization [String] + # @param role_id [Integer] Set to the id of the role you want to return. + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. + # @option opts [Integer] :page The page number of results to return. + # @option opts [String] :cursor Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. + # @option opts [String] :name Allows you to filter on first name, last name, username, and email address. + # @option opts [Boolean] :include_unassigned Optional. Defaults to false. Include users that aren’t assigned to the role. + # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers + def get_role_users_with_http_info(authorization, role_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.get_role_users ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.get_role_users" + end + # verify the required parameter 'role_id' is set + if @api_client.config.client_side_validation && role_id.nil? + fail ArgumentError, "Missing the required parameter 'role_id' when calling DefaultApi.get_role_users" + end + # resource path + local_var_path = '/api/2/roles/{role_id}/users'.sub('{' + 'role_id' + '}', CGI.escape(role_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? + query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? + query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil? + query_params[:'include_unassigned'] = opts[:'include_unassigned'] if !opts[:'include_unassigned'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['applcation/json', 'application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Array' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.get_role_users", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#get_role_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param app_id [Integer] + # @param rule_id [Integer] The id of the app rule to locate. + # @param [Hash] opts the optional parameters + # @return [Rule] + def get_rule(authorization, app_id, rule_id, opts = {}) + data, _status_code, _headers = get_rule_with_http_info(authorization, app_id, rule_id, opts) + data + end + + # @param authorization [String] + # @param app_id [Integer] + # @param rule_id [Integer] The id of the app rule to locate. + # @param [Hash] opts the optional parameters + # @return [Array<(Rule, Integer, Hash)>] Rule data, response status code and response headers + def get_rule_with_http_info(authorization, app_id, rule_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.get_rule ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.get_rule" + end + # verify the required parameter 'app_id' is set + if @api_client.config.client_side_validation && app_id.nil? + fail ArgumentError, "Missing the required parameter 'app_id' when calling DefaultApi.get_rule" + end + # verify the required parameter 'rule_id' is set + if @api_client.config.client_side_validation && rule_id.nil? + fail ArgumentError, "Missing the required parameter 'rule_id' when calling DefaultApi.get_rule" + end + # resource path + local_var_path = '/api/2/apps/{app_id}/rules/{rule_id}'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'rule_id' + '}', CGI.escape(rule_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Rule' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.get_rule", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#get_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param [Hash] opts the optional parameters + # @option opts [String] :before Optional ISO8601 formatted date string. Defaults to current date. Maximum date is 90 days ago. + # @option opts [String] :after Optional ISO8601 formatted date string. Defaults to 30 days ago. Maximum date is 90 days ago. + # @return [GetScoreInsights200Response] + def get_score_insights(authorization, opts = {}) + data, _status_code, _headers = get_score_insights_with_http_info(authorization, opts) + data + end + + # @param authorization [String] + # @param [Hash] opts the optional parameters + # @option opts [String] :before Optional ISO8601 formatted date string. Defaults to current date. Maximum date is 90 days ago. + # @option opts [String] :after Optional ISO8601 formatted date string. Defaults to 30 days ago. Maximum date is 90 days ago. + # @return [Array<(GetScoreInsights200Response, Integer, Hash)>] GetScoreInsights200Response data, response status code and response headers + def get_score_insights_with_http_info(authorization, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.get_score_insights ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.get_score_insights" + end + # resource path + local_var_path = '/api/2/risk/scores' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil? + query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'GetScoreInsights200Response' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.get_score_insights", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#get_score_insights\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param user_id [Integer] Set to the id of the user that you want to return. + # @param [Hash] opts the optional parameters + # @return [User] + def get_user(authorization, user_id, opts = {}) + data, _status_code, _headers = get_user_with_http_info(authorization, user_id, opts) + data + end + + # @param authorization [String] + # @param user_id [Integer] Set to the id of the user that you want to return. + # @param [Hash] opts the optional parameters + # @return [Array<(User, Integer, Hash)>] User data, response status code and response headers + def get_user_with_http_info(authorization, user_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.get_user ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.get_user" + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling DefaultApi.get_user" + end + # resource path + local_var_path = '/api/2/users/{user_id}'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'User' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.get_user", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#get_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param user_id [Integer] Set to the id of the user that you want to return. + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :ignore_visibility Defaults to `false`. When `true` will show all apps that are assigned to a user regardless of their portal visibility setting. + # @return [Array] + def get_user_apps(authorization, user_id, opts = {}) + data, _status_code, _headers = get_user_apps_with_http_info(authorization, user_id, opts) + data + end + + # @param authorization [String] + # @param user_id [Integer] Set to the id of the user that you want to return. + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :ignore_visibility Defaults to `false`. When `true` will show all apps that are assigned to a user regardless of their portal visibility setting. + # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers + def get_user_apps_with_http_info(authorization, user_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.get_user_apps ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.get_user_apps" + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling DefaultApi.get_user_apps" + end + # resource path + local_var_path = '/api/2/users/{user_id}/apps'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'ignore_visibility'] = opts[:'ignore_visibility'] if !opts[:'ignore_visibility'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Array' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.get_user_apps", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#get_user_apps\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param id [Integer] + # @param [Hash] opts the optional parameters + # @return [Array] + def list_access_token_claims(authorization, id, opts = {}) + data, _status_code, _headers = list_access_token_claims_with_http_info(authorization, id, opts) + data + end + + # @param authorization [String] + # @param id [Integer] + # @param [Hash] opts the optional parameters + # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers + def list_access_token_claims_with_http_info(authorization, id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.list_access_token_claims ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.list_access_token_claims" + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.list_access_token_claims" + end + # resource path + local_var_path = '/api/2/api_authorizations/{id}/claims'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Array' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.list_access_token_claims", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#list_access_token_claims\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param app_id [Integer] + # @param action_value [String] The value for the selected action. + # @param [Hash] opts the optional parameters + # @return [Array] + def list_action_values(authorization, app_id, action_value, opts = {}) + data, _status_code, _headers = list_action_values_with_http_info(authorization, app_id, action_value, opts) + data + end + + # @param authorization [String] + # @param app_id [Integer] + # @param action_value [String] The value for the selected action. + # @param [Hash] opts the optional parameters + # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers + def list_action_values_with_http_info(authorization, app_id, action_value, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.list_action_values ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.list_action_values" + end + # verify the required parameter 'app_id' is set + if @api_client.config.client_side_validation && app_id.nil? + fail ArgumentError, "Missing the required parameter 'app_id' when calling DefaultApi.list_action_values" + end + # verify the required parameter 'action_value' is set + if @api_client.config.client_side_validation && action_value.nil? + fail ArgumentError, "Missing the required parameter 'action_value' when calling DefaultApi.list_action_values" + end + # resource path + local_var_path = '/api/2/apps/{app_id}/rules/actions/{actuion_value}/values'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'action_value' + '}', CGI.escape(action_value.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Array' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.list_action_values", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#list_action_values\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param app_id [Integer] + # @param [Hash] opts the optional parameters + # @return [Array] + def list_actions(authorization, app_id, opts = {}) + data, _status_code, _headers = list_actions_with_http_info(authorization, app_id, opts) + data + end + + # @param authorization [String] + # @param app_id [Integer] + # @param [Hash] opts the optional parameters + # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers + def list_actions_with_http_info(authorization, app_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.list_actions ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.list_actions" + end + # verify the required parameter 'app_id' is set + if @api_client.config.client_side_validation && app_id.nil? + fail ArgumentError, "Missing the required parameter 'app_id' when calling DefaultApi.list_actions" + end + # resource path + local_var_path = '/api/2/apps/{app_id}/rules/actions'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Array' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.list_actions", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#list_actions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param app_id [Integer] + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. + # @option opts [Integer] :page The page number of results to return. + # @option opts [String] :cursor Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. + # @return [Array] + def list_app_users(authorization, app_id, opts = {}) + data, _status_code, _headers = list_app_users_with_http_info(authorization, app_id, opts) + data + end + + # @param authorization [String] + # @param app_id [Integer] + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. + # @option opts [Integer] :page The page number of results to return. + # @option opts [String] :cursor Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. + # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers + def list_app_users_with_http_info(authorization, app_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.list_app_users ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.list_app_users" + end + # verify the required parameter 'app_id' is set + if @api_client.config.client_side_validation && app_id.nil? + fail ArgumentError, "Missing the required parameter 'app_id' when calling DefaultApi.list_app_users" + end + # resource path + local_var_path = '/api/2/apps/{app_id}/users'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? + query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Array' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.list_app_users", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#list_app_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. + # @option opts [Integer] :page The page number of results to return. + # @option opts [String] :cursor Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. + # @option opts [String] :name The name or partial name of the app to search for. When using a partial name you must append a wildcard `*` + # @option opts [Integer] :connector_id Returns all apps based off a specific connector. See List Connectors for a complete list of Connector IDs. + # @option opts [AuthMethod] :auth_method Returns all apps based of a given type. + # @return [Array] + def list_apps(authorization, opts = {}) + data, _status_code, _headers = list_apps_with_http_info(authorization, opts) + data + end + + # @param authorization [String] + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. + # @option opts [Integer] :page The page number of results to return. + # @option opts [String] :cursor Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. + # @option opts [String] :name The name or partial name of the app to search for. When using a partial name you must append a wildcard `*` + # @option opts [Integer] :connector_id Returns all apps based off a specific connector. See List Connectors for a complete list of Connector IDs. + # @option opts [AuthMethod] :auth_method Returns all apps based of a given type. + # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers + def list_apps_with_http_info(authorization, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.list_apps ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.list_apps" + end + # resource path + local_var_path = '/api/2/apps' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? + query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? + query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil? + query_params[:'connector_id'] = opts[:'connector_id'] if !opts[:'connector_id'].nil? + query_params[:'auth_method'] = opts[:'auth_method'] if !opts[:'auth_method'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Array' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.list_apps", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#list_apps\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param [Hash] opts the optional parameters + # @return [Array] + def list_authorization_servers(authorization, opts = {}) + data, _status_code, _headers = list_authorization_servers_with_http_info(authorization, opts) + data + end + + # @param authorization [String] + # @param [Hash] opts the optional parameters + # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers + def list_authorization_servers_with_http_info(authorization, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.list_authorization_servers ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.list_authorization_servers" + end + # resource path + local_var_path = '/api/2/api_authorizations' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Array' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.list_authorization_servers", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#list_authorization_servers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param app_id [Integer] + # @param condition_value [String] The value for the selected condition. + # @param [Hash] opts the optional parameters + # @return [Array] + def list_condition_operators(authorization, app_id, condition_value, opts = {}) + data, _status_code, _headers = list_condition_operators_with_http_info(authorization, app_id, condition_value, opts) + data + end + + # @param authorization [String] + # @param app_id [Integer] + # @param condition_value [String] The value for the selected condition. + # @param [Hash] opts the optional parameters + # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers + def list_condition_operators_with_http_info(authorization, app_id, condition_value, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.list_condition_operators ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.list_condition_operators" + end + # verify the required parameter 'app_id' is set + if @api_client.config.client_side_validation && app_id.nil? + fail ArgumentError, "Missing the required parameter 'app_id' when calling DefaultApi.list_condition_operators" + end + # verify the required parameter 'condition_value' is set + if @api_client.config.client_side_validation && condition_value.nil? + fail ArgumentError, "Missing the required parameter 'condition_value' when calling DefaultApi.list_condition_operators" + end + # resource path + local_var_path = '/api/2/apps/{app_id}/rules/conditions/{condition_value}/operators'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'condition_value' + '}', CGI.escape(condition_value.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Array' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.list_condition_operators", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#list_condition_operators\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param app_id [Integer] + # @param condition_value [String] The value for the selected condition. + # @param [Hash] opts the optional parameters + # @return [Array] + def list_condition_values(authorization, app_id, condition_value, opts = {}) + data, _status_code, _headers = list_condition_values_with_http_info(authorization, app_id, condition_value, opts) + data + end + + # @param authorization [String] + # @param app_id [Integer] + # @param condition_value [String] The value for the selected condition. + # @param [Hash] opts the optional parameters + # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers + def list_condition_values_with_http_info(authorization, app_id, condition_value, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.list_condition_values ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.list_condition_values" + end + # verify the required parameter 'app_id' is set + if @api_client.config.client_side_validation && app_id.nil? + fail ArgumentError, "Missing the required parameter 'app_id' when calling DefaultApi.list_condition_values" + end + # verify the required parameter 'condition_value' is set + if @api_client.config.client_side_validation && condition_value.nil? + fail ArgumentError, "Missing the required parameter 'condition_value' when calling DefaultApi.list_condition_values" + end + # resource path + local_var_path = '/api/2/apps/{app_id}/rules/conditions/{condition_value}/values'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'condition_value' + '}', CGI.escape(condition_value.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Array' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.list_condition_values", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#list_condition_values\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param app_id [Integer] + # @param [Hash] opts the optional parameters + # @return [Array] + def list_conditions(authorization, app_id, opts = {}) + data, _status_code, _headers = list_conditions_with_http_info(authorization, app_id, opts) + data + end + + # @param authorization [String] + # @param app_id [Integer] + # @param [Hash] opts the optional parameters + # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers + def list_conditions_with_http_info(authorization, app_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.list_conditions ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.list_conditions" + end + # verify the required parameter 'app_id' is set + if @api_client.config.client_side_validation && app_id.nil? + fail ArgumentError, "Missing the required parameter 'app_id' when calling DefaultApi.list_conditions" + end + # resource path + local_var_path = '/api/2/apps/{app_id}/rules/conditions'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Array' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.list_conditions", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#list_conditions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. + # @option opts [Integer] :page The page number of results to return. + # @option opts [String] :cursor Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. + # @option opts [String] :name The name or partial name of the connector to search for. When using a partial name you must append a wildcard `*` + # @option opts [AuthMethod] :auth_method Returns all connectors of a given type. + # @return [Array] + def list_connectors(authorization, opts = {}) + data, _status_code, _headers = list_connectors_with_http_info(authorization, opts) + data + end + + # @param authorization [String] + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. + # @option opts [Integer] :page The page number of results to return. + # @option opts [String] :cursor Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. + # @option opts [String] :name The name or partial name of the connector to search for. When using a partial name you must append a wildcard `*` + # @option opts [AuthMethod] :auth_method Returns all connectors of a given type. + # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers + def list_connectors_with_http_info(authorization, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.list_connectors ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.list_connectors" + end + # resource path + local_var_path = '/api/2/connectors' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? + query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? + query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil? + query_params[:'auth_method'] = opts[:'auth_method'] if !opts[:'auth_method'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Array' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.list_connectors", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#list_connectors\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. + # @option opts [Integer] :page The page number of results to return. + # @option opts [String] :cursor Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. + # @return [Array] + def list_environment_variables(authorization, opts = {}) + data, _status_code, _headers = list_environment_variables_with_http_info(authorization, opts) + data + end + + # @param authorization [String] + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. + # @option opts [Integer] :page The page number of results to return. + # @option opts [String] :cursor Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. + # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers + def list_environment_variables_with_http_info(authorization, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.list_environment_variables ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.list_environment_variables" + end + # resource path + local_var_path = '/api/2/hooks/envs' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? + query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Array' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.list_environment_variables", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#list_environment_variables\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. + # @option opts [Integer] :page The page number of results to return. + # @option opts [String] :cursor Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. + # @return [Array] + def list_hooks(authorization, opts = {}) + data, _status_code, _headers = list_hooks_with_http_info(authorization, opts) + data + end + + # @param authorization [String] + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. + # @option opts [Integer] :page The page number of results to return. + # @option opts [String] :cursor Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. + # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers + def list_hooks_with_http_info(authorization, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.list_hooks ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.list_hooks" + end + # resource path + local_var_path = '/api/2/hooks' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? + query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Array' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.list_hooks", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#list_hooks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param action_value [String] The value for the selected action. + # @param [Hash] opts the optional parameters + # @return [Array] + def list_mapping_action_values(authorization, action_value, opts = {}) + data, _status_code, _headers = list_mapping_action_values_with_http_info(authorization, action_value, opts) + data + end + + # @param authorization [String] + # @param action_value [String] The value for the selected action. + # @param [Hash] opts the optional parameters + # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers + def list_mapping_action_values_with_http_info(authorization, action_value, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.list_mapping_action_values ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.list_mapping_action_values" + end + # verify the required parameter 'action_value' is set + if @api_client.config.client_side_validation && action_value.nil? + fail ArgumentError, "Missing the required parameter 'action_value' when calling DefaultApi.list_mapping_action_values" + end + # resource path + local_var_path = '/api/2/apps/mappings/actions/{actuion_value}/values'.sub('{' + 'action_value' + '}', CGI.escape(action_value.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Array' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.list_mapping_action_values", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#list_mapping_action_values\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param [Hash] opts the optional parameters + # @return [Array] + def list_mapping_actions(authorization, opts = {}) + data, _status_code, _headers = list_mapping_actions_with_http_info(authorization, opts) + data + end + + # @param authorization [String] + # @param [Hash] opts the optional parameters + # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers + def list_mapping_actions_with_http_info(authorization, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.list_mapping_actions ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.list_mapping_actions" + end + # resource path + local_var_path = '/api/2/apps/mappings/actions' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Array' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.list_mapping_actions", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#list_mapping_actions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param condition_value [String] The value for the selected condition. + # @param [Hash] opts the optional parameters + # @return [Array] + def list_mapping_condition_operators(authorization, condition_value, opts = {}) + data, _status_code, _headers = list_mapping_condition_operators_with_http_info(authorization, condition_value, opts) + data + end + + # @param authorization [String] + # @param condition_value [String] The value for the selected condition. + # @param [Hash] opts the optional parameters + # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers + def list_mapping_condition_operators_with_http_info(authorization, condition_value, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.list_mapping_condition_operators ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.list_mapping_condition_operators" + end + # verify the required parameter 'condition_value' is set + if @api_client.config.client_side_validation && condition_value.nil? + fail ArgumentError, "Missing the required parameter 'condition_value' when calling DefaultApi.list_mapping_condition_operators" + end + # resource path + local_var_path = '/api/2/apps/mappings/conditions/{condition_value}/operators'.sub('{' + 'condition_value' + '}', CGI.escape(condition_value.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Array' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.list_mapping_condition_operators", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#list_mapping_condition_operators\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param condition_value [String] The value for the selected condition. + # @param [Hash] opts the optional parameters + # @return [Array] + def list_mapping_condition_values(authorization, condition_value, opts = {}) + data, _status_code, _headers = list_mapping_condition_values_with_http_info(authorization, condition_value, opts) + data + end + + # @param authorization [String] + # @param condition_value [String] The value for the selected condition. + # @param [Hash] opts the optional parameters + # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers + def list_mapping_condition_values_with_http_info(authorization, condition_value, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.list_mapping_condition_values ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.list_mapping_condition_values" + end + # verify the required parameter 'condition_value' is set + if @api_client.config.client_side_validation && condition_value.nil? + fail ArgumentError, "Missing the required parameter 'condition_value' when calling DefaultApi.list_mapping_condition_values" + end + # resource path + local_var_path = '/api/2/apps/mappings/conditions/{condition_value}/values'.sub('{' + 'condition_value' + '}', CGI.escape(condition_value.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Array' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.list_mapping_condition_values", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#list_mapping_condition_values\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param [Hash] opts the optional parameters + # @return [Array] + def list_mapping_conditions(authorization, opts = {}) + data, _status_code, _headers = list_mapping_conditions_with_http_info(authorization, opts) + data + end + + # @param authorization [String] + # @param [Hash] opts the optional parameters + # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers + def list_mapping_conditions_with_http_info(authorization, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.list_mapping_conditions ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.list_mapping_conditions" + end + # resource path + local_var_path = '/api/2/apps/mappings/conditions' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Array' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.list_mapping_conditions", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#list_mapping_conditions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :enabled Defaults to true. When set to `false` will return all disabled mappings. (default to true) + # @option opts [String] :has_condition Filters Mappings based on their Conditions. + # @option opts [String] :has_condition_type Filters Mappings based on their condition types. + # @option opts [String] :has_action Filters Mappings based on their Actions. + # @option opts [String] :has_action_type Filters Mappings based on their action types. + # @return [Array] + def list_mappings(authorization, opts = {}) + data, _status_code, _headers = list_mappings_with_http_info(authorization, opts) + data + end + + # @param authorization [String] + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :enabled Defaults to true. When set to `false` will return all disabled mappings. (default to true) + # @option opts [String] :has_condition Filters Mappings based on their Conditions. + # @option opts [String] :has_condition_type Filters Mappings based on their condition types. + # @option opts [String] :has_action Filters Mappings based on their Actions. + # @option opts [String] :has_action_type Filters Mappings based on their action types. + # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers + def list_mappings_with_http_info(authorization, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.list_mappings ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.list_mappings" + end + allowable_values = ["builtin", "custom", "none"] + if @api_client.config.client_side_validation && opts[:'has_condition_type'] && !allowable_values.include?(opts[:'has_condition_type']) + fail ArgumentError, "invalid value for \"has_condition_type\", must be one of #{allowable_values}" + end + allowable_values = ["builtin", "custom", "none"] + if @api_client.config.client_side_validation && opts[:'has_action_type'] && !allowable_values.include?(opts[:'has_action_type']) + fail ArgumentError, "invalid value for \"has_action_type\", must be one of #{allowable_values}" + end + # resource path + local_var_path = '/api/2/mappings' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'enabled'] = opts[:'enabled'] if !opts[:'enabled'].nil? + query_params[:'has_condition'] = opts[:'has_condition'] if !opts[:'has_condition'].nil? + query_params[:'has_condition_type'] = opts[:'has_condition_type'] if !opts[:'has_condition_type'].nil? + query_params[:'has_action'] = opts[:'has_action'] if !opts[:'has_action'].nil? + query_params[:'has_action_type'] = opts[:'has_action_type'] if !opts[:'has_action_type'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Array' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.list_mappings", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#list_mappings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param [Hash] opts the optional parameters + # @return [nil] + def list_risk_rules(authorization, opts = {}) + list_risk_rules_with_http_info(authorization, opts) + nil + end + + # @param authorization [String] + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def list_risk_rules_with_http_info(authorization, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.list_risk_rules ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.list_risk_rules" + end + # resource path + local_var_path = '/api/2/risk/rules' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.list_risk_rules", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#list_risk_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. + # @option opts [Integer] :page The page number of results to return. + # @option opts [String] :cursor Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. + # @option opts [String] :name Optional. Filters by role name. + # @option opts [String] :app_id Optional. Returns roles that contain this app name. + # @option opts [String] :fields Optional. Comma delimited list of fields to return. + # @return [Array] + def list_roles(authorization, opts = {}) + data, _status_code, _headers = list_roles_with_http_info(authorization, opts) + data + end + + # @param authorization [String] + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. + # @option opts [Integer] :page The page number of results to return. + # @option opts [String] :cursor Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. + # @option opts [String] :name Optional. Filters by role name. + # @option opts [String] :app_id Optional. Returns roles that contain this app name. + # @option opts [String] :fields Optional. Comma delimited list of fields to return. + # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers + def list_roles_with_http_info(authorization, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.list_roles ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.list_roles" + end + allowable_values = ["apps", "users", "admins"] + if @api_client.config.client_side_validation && opts[:'fields'] && !allowable_values.include?(opts[:'fields']) + fail ArgumentError, "invalid value for \"fields\", must be one of #{allowable_values}" + end + # resource path + local_var_path = '/api/2/roles' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? + query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? + query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil? + query_params[:'app_id'] = opts[:'app_id'] if !opts[:'app_id'].nil? + query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Array' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.list_roles", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#list_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param app_id [Integer] + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :enabled Defaults to true. When set to `false` will return all disabled rules. + # @option opts [String] :has_condition Filters Rules based on their Conditions. + # @option opts [String] :has_condition_type Filters Rules based on their condition types. + # @option opts [String] :has_action Filters Rules based on their Actions. + # @option opts [String] :has_action_type Filters Rules based on their action types. + # @return [Array] + def list_rules(authorization, app_id, opts = {}) + data, _status_code, _headers = list_rules_with_http_info(authorization, app_id, opts) + data + end + + # @param authorization [String] + # @param app_id [Integer] + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :enabled Defaults to true. When set to `false` will return all disabled rules. + # @option opts [String] :has_condition Filters Rules based on their Conditions. + # @option opts [String] :has_condition_type Filters Rules based on their condition types. + # @option opts [String] :has_action Filters Rules based on their Actions. + # @option opts [String] :has_action_type Filters Rules based on their action types. + # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers + def list_rules_with_http_info(authorization, app_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.list_rules ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.list_rules" + end + # verify the required parameter 'app_id' is set + if @api_client.config.client_side_validation && app_id.nil? + fail ArgumentError, "Missing the required parameter 'app_id' when calling DefaultApi.list_rules" + end + # resource path + local_var_path = '/api/2/apps/{app_id}/rules'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'enabled'] = opts[:'enabled'] if !opts[:'enabled'].nil? + query_params[:'has_condition'] = opts[:'has_condition'] if !opts[:'has_condition'].nil? + query_params[:'has_condition_type'] = opts[:'has_condition_type'] if !opts[:'has_condition_type'].nil? + query_params[:'has_action'] = opts[:'has_action'] if !opts[:'has_action'].nil? + query_params[:'has_action_type'] = opts[:'has_action_type'] if !opts[:'has_action_type'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Array' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.list_rules", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#list_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param id [Integer] + # @param [Hash] opts the optional parameters + # @return [Array] + def list_scopes(authorization, id, opts = {}) + data, _status_code, _headers = list_scopes_with_http_info(authorization, id, opts) + data + end + + # @param authorization [String] + # @param id [Integer] + # @param [Hash] opts the optional parameters + # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers + def list_scopes_with_http_info(authorization, id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.list_scopes ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.list_scopes" + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.list_scopes" + end + # resource path + local_var_path = '/api/2/api_authorizations/{id}/scopes'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Array' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.list_scopes", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#list_scopes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. + # @option opts [Integer] :page The page number of results to return. + # @option opts [String] :cursor Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. + # @option opts [String] :created_since An ISO8601 timestamp value that returns all users created after a given date & time. + # @option opts [String] :created_until An ISO8601 timestamp value that returns all users created before a given date & time. + # @option opts [String] :updated_since An ISO8601 timestamp value that returns all users updated after a given date & time. + # @option opts [String] :updated_until An ISO8601 timestamp value that returns all users updated before a given date & time. + # @option opts [String] :last_login_since An ISO8601 timestamp value that returns all users that logged in after a given date & time. + # @option opts [String] :last_login_until + # @option opts [String] :firstname The first name of the user + # @option opts [String] :lastname The last name of the user + # @option opts [String] :email The email address of the user + # @option opts [String] :username The username for the user + # @option opts [String] :samaccountname The AD login name for the user + # @option opts [String] :directory_id The ID in OneLogin of the Directory that the user belongs to + # @option opts [String] :external_id An external identifier that has been set on the user + # @option opts [String] :app_id The ID of a OneLogin Application + # @option opts [String] :user_ids A comma separated list of OneLogin User IDs + # @option opts [String] :custom_attributes_attribute_name The short name of a custom attribute. Note that the attribute name is prefixed with custom_attributes. + # @option opts [String] :fields A comma separated list user attributes to return. + # @return [Array] + def list_users(authorization, opts = {}) + data, _status_code, _headers = list_users_with_http_info(authorization, opts) + data + end + + # @param authorization [String] + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. + # @option opts [Integer] :page The page number of results to return. + # @option opts [String] :cursor Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. + # @option opts [String] :created_since An ISO8601 timestamp value that returns all users created after a given date & time. + # @option opts [String] :created_until An ISO8601 timestamp value that returns all users created before a given date & time. + # @option opts [String] :updated_since An ISO8601 timestamp value that returns all users updated after a given date & time. + # @option opts [String] :updated_until An ISO8601 timestamp value that returns all users updated before a given date & time. + # @option opts [String] :last_login_since An ISO8601 timestamp value that returns all users that logged in after a given date & time. + # @option opts [String] :last_login_until + # @option opts [String] :firstname The first name of the user + # @option opts [String] :lastname The last name of the user + # @option opts [String] :email The email address of the user + # @option opts [String] :username The username for the user + # @option opts [String] :samaccountname The AD login name for the user + # @option opts [String] :directory_id The ID in OneLogin of the Directory that the user belongs to + # @option opts [String] :external_id An external identifier that has been set on the user + # @option opts [String] :app_id The ID of a OneLogin Application + # @option opts [String] :user_ids A comma separated list of OneLogin User IDs + # @option opts [String] :custom_attributes_attribute_name The short name of a custom attribute. Note that the attribute name is prefixed with custom_attributes. + # @option opts [String] :fields A comma separated list user attributes to return. + # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers + def list_users_with_http_info(authorization, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.list_users ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.list_users" + end + # resource path + local_var_path = '/api/2/users' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? + query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? + query_params[:'created_since'] = opts[:'created_since'] if !opts[:'created_since'].nil? + query_params[:'created_until'] = opts[:'created_until'] if !opts[:'created_until'].nil? + query_params[:'updated_since'] = opts[:'updated_since'] if !opts[:'updated_since'].nil? + query_params[:'updated_until'] = opts[:'updated_until'] if !opts[:'updated_until'].nil? + query_params[:'last_login_since'] = opts[:'last_login_since'] if !opts[:'last_login_since'].nil? + query_params[:'last_login_until'] = opts[:'last_login_until'] if !opts[:'last_login_until'].nil? + query_params[:'firstname'] = opts[:'firstname'] if !opts[:'firstname'].nil? + query_params[:'lastname'] = opts[:'lastname'] if !opts[:'lastname'].nil? + query_params[:'email'] = opts[:'email'] if !opts[:'email'].nil? + query_params[:'username'] = opts[:'username'] if !opts[:'username'].nil? + query_params[:'samaccountname'] = opts[:'samaccountname'] if !opts[:'samaccountname'].nil? + query_params[:'directory_id'] = opts[:'directory_id'] if !opts[:'directory_id'].nil? + query_params[:'external_id'] = opts[:'external_id'] if !opts[:'external_id'].nil? + query_params[:'app_id'] = opts[:'app_id'] if !opts[:'app_id'].nil? + query_params[:'user_ids'] = opts[:'user_ids'] if !opts[:'user_ids'].nil? + query_params[:'custom_attributes.{attribute_name}'] = opts[:'custom_attributes_attribute_name'] if !opts[:'custom_attributes_attribute_name'].nil? + query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Array' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.list_users", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#list_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param id [Integer] + # @param client_app_id [Integer] + # @param [Hash] opts the optional parameters + # @return [nil] + def remove_client_app(authorization, id, client_app_id, opts = {}) + remove_client_app_with_http_info(authorization, id, client_app_id, opts) + nil + end + + # @param authorization [String] + # @param id [Integer] + # @param client_app_id [Integer] + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def remove_client_app_with_http_info(authorization, id, client_app_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.remove_client_app ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.remove_client_app" + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.remove_client_app" + end + # verify the required parameter 'client_app_id' is set + if @api_client.config.client_side_validation && client_app_id.nil? + fail ArgumentError, "Missing the required parameter 'client_app_id' when calling DefaultApi.remove_client_app" + end + # resource path + local_var_path = '/api/2/api_authorizations/{id}/clients/{client_app_id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'client_app_id' + '}', CGI.escape(client_app_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.remove_client_app", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#remove_client_app\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param role_id [Integer] Set to the id of the role you want to return. + # @param remove_role_users_request [RemoveRoleUsersRequest] + # @param [Hash] opts the optional parameters + # @return [nil] + def remove_role_admins(authorization, role_id, remove_role_users_request, opts = {}) + remove_role_admins_with_http_info(authorization, role_id, remove_role_users_request, opts) + nil + end + + # @param authorization [String] + # @param role_id [Integer] Set to the id of the role you want to return. + # @param remove_role_users_request [RemoveRoleUsersRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def remove_role_admins_with_http_info(authorization, role_id, remove_role_users_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.remove_role_admins ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.remove_role_admins" + end + # verify the required parameter 'role_id' is set + if @api_client.config.client_side_validation && role_id.nil? + fail ArgumentError, "Missing the required parameter 'role_id' when calling DefaultApi.remove_role_admins" + end + # verify the required parameter 'remove_role_users_request' is set + if @api_client.config.client_side_validation && remove_role_users_request.nil? + fail ArgumentError, "Missing the required parameter 'remove_role_users_request' when calling DefaultApi.remove_role_admins" + end + # resource path + local_var_path = '/api/2/roles/{role_id}/admins'.sub('{' + 'role_id' + '}', CGI.escape(role_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(remove_role_users_request) + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.remove_role_admins", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#remove_role_admins\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param role_id [Integer] Set to the id of the role you want to return. + # @param remove_role_users_request [RemoveRoleUsersRequest] + # @param [Hash] opts the optional parameters + # @return [nil] + def remove_role_users(authorization, role_id, remove_role_users_request, opts = {}) + remove_role_users_with_http_info(authorization, role_id, remove_role_users_request, opts) + nil + end + + # @param authorization [String] + # @param role_id [Integer] Set to the id of the role you want to return. + # @param remove_role_users_request [RemoveRoleUsersRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def remove_role_users_with_http_info(authorization, role_id, remove_role_users_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.remove_role_users ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.remove_role_users" + end + # verify the required parameter 'role_id' is set + if @api_client.config.client_side_validation && role_id.nil? + fail ArgumentError, "Missing the required parameter 'role_id' when calling DefaultApi.remove_role_users" + end + # verify the required parameter 'remove_role_users_request' is set + if @api_client.config.client_side_validation && remove_role_users_request.nil? + fail ArgumentError, "Missing the required parameter 'remove_role_users_request' when calling DefaultApi.remove_role_users" + end + # resource path + local_var_path = '/api/2/roles/{role_id}/users'.sub('{' + 'role_id' + '}', CGI.escape(role_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(remove_role_users_request) + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.remove_role_users", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#remove_role_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param [Hash] opts the optional parameters + # @option opts [RevokeTokenRequest] :revoke_token_request + # @return [GenerateToken400Response] + def revoke_token(authorization, opts = {}) + data, _status_code, _headers = revoke_token_with_http_info(authorization, opts) + data + end + + # @param authorization [String] + # @param [Hash] opts the optional parameters + # @option opts [RevokeTokenRequest] :revoke_token_request + # @return [Array<(GenerateToken400Response, Integer, Hash)>] GenerateToken400Response data, response status code and response headers + def revoke_token_with_http_info(authorization, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.revoke_token ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.revoke_token" + end + # resource path + local_var_path = '/auth/oauth2/revoke' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'revoke_token_request']) + + # return_type + return_type = opts[:debug_return_type] || 'GenerateToken400Response' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.revoke_token", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#revoke_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param role_id [Integer] Set to the id of the role you want to return. + # @param request_body [Array] + # @param [Hash] opts the optional parameters + # @return [Array] + def set_role_apps(authorization, role_id, request_body, opts = {}) + data, _status_code, _headers = set_role_apps_with_http_info(authorization, role_id, request_body, opts) + data + end + + # @param authorization [String] + # @param role_id [Integer] Set to the id of the role you want to return. + # @param request_body [Array] + # @param [Hash] opts the optional parameters + # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers + def set_role_apps_with_http_info(authorization, role_id, request_body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.set_role_apps ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.set_role_apps" + end + # verify the required parameter 'role_id' is set + if @api_client.config.client_side_validation && role_id.nil? + fail ArgumentError, "Missing the required parameter 'role_id' when calling DefaultApi.set_role_apps" + end + # verify the required parameter 'request_body' is set + if @api_client.config.client_side_validation && request_body.nil? + fail ArgumentError, "Missing the required parameter 'request_body' when calling DefaultApi.set_role_apps" + end + # resource path + local_var_path = '/api/2/roles/{role_id}/apps'.sub('{' + 'role_id' + '}', CGI.escape(role_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body) + + # return_type + return_type = opts[:debug_return_type] || 'Array' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.set_role_apps", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#set_role_apps\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param track_event_request [TrackEventRequest] + # @param [Hash] opts the optional parameters + # @return [nil] + def track_event(authorization, track_event_request, opts = {}) + track_event_with_http_info(authorization, track_event_request, opts) + nil + end + + # @param authorization [String] + # @param track_event_request [TrackEventRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def track_event_with_http_info(authorization, track_event_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.track_event ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.track_event" + end + # verify the required parameter 'track_event_request' is set + if @api_client.config.client_side_validation && track_event_request.nil? + fail ArgumentError, "Missing the required parameter 'track_event_request' when calling DefaultApi.track_event" + end + # resource path + local_var_path = '/api/2/risk/events' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(track_event_request) + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.track_event", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#track_event\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param id [Integer] + # @param claim_id [Integer] + # @param add_access_token_claim_request [AddAccessTokenClaimRequest] + # @param [Hash] opts the optional parameters + # @return [Id] + def update_access_token_claim(authorization, id, claim_id, add_access_token_claim_request, opts = {}) + data, _status_code, _headers = update_access_token_claim_with_http_info(authorization, id, claim_id, add_access_token_claim_request, opts) + data + end + + # @param authorization [String] + # @param id [Integer] + # @param claim_id [Integer] + # @param add_access_token_claim_request [AddAccessTokenClaimRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(Id, Integer, Hash)>] Id data, response status code and response headers + def update_access_token_claim_with_http_info(authorization, id, claim_id, add_access_token_claim_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.update_access_token_claim ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.update_access_token_claim" + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.update_access_token_claim" + end + # verify the required parameter 'claim_id' is set + if @api_client.config.client_side_validation && claim_id.nil? + fail ArgumentError, "Missing the required parameter 'claim_id' when calling DefaultApi.update_access_token_claim" + end + # verify the required parameter 'add_access_token_claim_request' is set + if @api_client.config.client_side_validation && add_access_token_claim_request.nil? + fail ArgumentError, "Missing the required parameter 'add_access_token_claim_request' when calling DefaultApi.update_access_token_claim" + end + # resource path + local_var_path = '/api/2/api_authorizations/{id}/claims/{claim_id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'claim_id' + '}', CGI.escape(claim_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(add_access_token_claim_request) + + # return_type + return_type = opts[:debug_return_type] || 'Id' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.update_access_token_claim", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#update_access_token_claim\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param app_id [Integer] + # @param schema [Schema] + # @param [Hash] opts the optional parameters + # @return [Schema] + def update_app(authorization, app_id, schema, opts = {}) + data, _status_code, _headers = update_app_with_http_info(authorization, app_id, schema, opts) + data + end + + # @param authorization [String] + # @param app_id [Integer] + # @param schema [Schema] + # @param [Hash] opts the optional parameters + # @return [Array<(Schema, Integer, Hash)>] Schema data, response status code and response headers + def update_app_with_http_info(authorization, app_id, schema, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.update_app ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.update_app" + end + # verify the required parameter 'app_id' is set + if @api_client.config.client_side_validation && app_id.nil? + fail ArgumentError, "Missing the required parameter 'app_id' when calling DefaultApi.update_app" + end + # verify the required parameter 'schema' is set + if @api_client.config.client_side_validation && schema.nil? + fail ArgumentError, "Missing the required parameter 'schema' when calling DefaultApi.update_app" + end + # resource path + local_var_path = '/api/2/apps/{app_id}'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(schema) + + # return_type + return_type = opts[:debug_return_type] || 'Schema' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.update_app", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#update_app\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param id [Integer] + # @param create_authorization_server_request [CreateAuthorizationServerRequest] + # @param [Hash] opts the optional parameters + # @return [Id] + def update_authorization_server(authorization, id, create_authorization_server_request, opts = {}) + data, _status_code, _headers = update_authorization_server_with_http_info(authorization, id, create_authorization_server_request, opts) + data + end + + # @param authorization [String] + # @param id [Integer] + # @param create_authorization_server_request [CreateAuthorizationServerRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(Id, Integer, Hash)>] Id data, response status code and response headers + def update_authorization_server_with_http_info(authorization, id, create_authorization_server_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.update_authorization_server ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.update_authorization_server" + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.update_authorization_server" + end + # verify the required parameter 'create_authorization_server_request' is set + if @api_client.config.client_side_validation && create_authorization_server_request.nil? + fail ArgumentError, "Missing the required parameter 'create_authorization_server_request' when calling DefaultApi.update_authorization_server" + end + # resource path + local_var_path = '/api/2/api_authorizations/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(create_authorization_server_request) + + # return_type + return_type = opts[:debug_return_type] || 'Id' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.update_authorization_server", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#update_authorization_server\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param id [Integer] + # @param client_app_id [Integer] + # @param update_client_app_request [UpdateClientAppRequest] + # @param [Hash] opts the optional parameters + # @return [ClientApp] + def update_client_app(authorization, id, client_app_id, update_client_app_request, opts = {}) + data, _status_code, _headers = update_client_app_with_http_info(authorization, id, client_app_id, update_client_app_request, opts) + data + end + + # @param authorization [String] + # @param id [Integer] + # @param client_app_id [Integer] + # @param update_client_app_request [UpdateClientAppRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(ClientApp, Integer, Hash)>] ClientApp data, response status code and response headers + def update_client_app_with_http_info(authorization, id, client_app_id, update_client_app_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.update_client_app ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.update_client_app" + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.update_client_app" + end + # verify the required parameter 'client_app_id' is set + if @api_client.config.client_side_validation && client_app_id.nil? + fail ArgumentError, "Missing the required parameter 'client_app_id' when calling DefaultApi.update_client_app" + end + # verify the required parameter 'update_client_app_request' is set + if @api_client.config.client_side_validation && update_client_app_request.nil? + fail ArgumentError, "Missing the required parameter 'update_client_app_request' when calling DefaultApi.update_client_app" + end + # resource path + local_var_path = '/api/2/api_authorizations/{id}/clients/{client_app_id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'client_app_id' + '}', CGI.escape(client_app_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(update_client_app_request) + + # return_type + return_type = opts[:debug_return_type] || 'ClientApp' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.update_client_app", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#update_client_app\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param envvar_id [String] Set to the id of the Hook Environment Variable that you want to fetch. + # @param update_environment_variable_request [UpdateEnvironmentVariableRequest] + # @param [Hash] opts the optional parameters + # @return [Envvar] + def update_environment_variable(authorization, envvar_id, update_environment_variable_request, opts = {}) + data, _status_code, _headers = update_environment_variable_with_http_info(authorization, envvar_id, update_environment_variable_request, opts) + data + end + + # @param authorization [String] + # @param envvar_id [String] Set to the id of the Hook Environment Variable that you want to fetch. + # @param update_environment_variable_request [UpdateEnvironmentVariableRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(Envvar, Integer, Hash)>] Envvar data, response status code and response headers + def update_environment_variable_with_http_info(authorization, envvar_id, update_environment_variable_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.update_environment_variable ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.update_environment_variable" + end + # verify the required parameter 'envvar_id' is set + if @api_client.config.client_side_validation && envvar_id.nil? + fail ArgumentError, "Missing the required parameter 'envvar_id' when calling DefaultApi.update_environment_variable" + end + # verify the required parameter 'update_environment_variable_request' is set + if @api_client.config.client_side_validation && update_environment_variable_request.nil? + fail ArgumentError, "Missing the required parameter 'update_environment_variable_request' when calling DefaultApi.update_environment_variable" + end + # resource path + local_var_path = '/api/2/hooks/envs/{envvar_id}'.sub('{' + 'envvar_id' + '}', CGI.escape(envvar_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(update_environment_variable_request) + + # return_type + return_type = opts[:debug_return_type] || 'Envvar' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.update_environment_variable", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#update_environment_variable\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param hook_id [String] Set to the id of the Hook that you want to return. + # @param hook [Hook] + # @param [Hash] opts the optional parameters + # @return [Hook] + def update_hook(authorization, hook_id, hook, opts = {}) + data, _status_code, _headers = update_hook_with_http_info(authorization, hook_id, hook, opts) + data + end + + # @param authorization [String] + # @param hook_id [String] Set to the id of the Hook that you want to return. + # @param hook [Hook] + # @param [Hash] opts the optional parameters + # @return [Array<(Hook, Integer, Hash)>] Hook data, response status code and response headers + def update_hook_with_http_info(authorization, hook_id, hook, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.update_hook ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.update_hook" + end + # verify the required parameter 'hook_id' is set + if @api_client.config.client_side_validation && hook_id.nil? + fail ArgumentError, "Missing the required parameter 'hook_id' when calling DefaultApi.update_hook" + end + # verify the required parameter 'hook' is set + if @api_client.config.client_side_validation && hook.nil? + fail ArgumentError, "Missing the required parameter 'hook' when calling DefaultApi.update_hook" + end + # resource path + local_var_path = '/api/2/hooks/{hook_id}'.sub('{' + 'hook_id' + '}', CGI.escape(hook_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(hook) + + # return_type + return_type = opts[:debug_return_type] || 'Hook' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.update_hook", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#update_hook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param mapping_id [Integer] The id of the user mapping to locate. + # @param mapping [Mapping] + # @param [Hash] opts the optional parameters + # @return [Integer] + def update_mapping(authorization, mapping_id, mapping, opts = {}) + data, _status_code, _headers = update_mapping_with_http_info(authorization, mapping_id, mapping, opts) + data + end + + # @param authorization [String] + # @param mapping_id [Integer] The id of the user mapping to locate. + # @param mapping [Mapping] + # @param [Hash] opts the optional parameters + # @return [Array<(Integer, Integer, Hash)>] Integer data, response status code and response headers + def update_mapping_with_http_info(authorization, mapping_id, mapping, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.update_mapping ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.update_mapping" + end + # verify the required parameter 'mapping_id' is set + if @api_client.config.client_side_validation && mapping_id.nil? + fail ArgumentError, "Missing the required parameter 'mapping_id' when calling DefaultApi.update_mapping" + end + # verify the required parameter 'mapping' is set + if @api_client.config.client_side_validation && mapping.nil? + fail ArgumentError, "Missing the required parameter 'mapping' when calling DefaultApi.update_mapping" + end + # resource path + local_var_path = '/api/2/mappings/{mapping_id}'.sub('{' + 'mapping_id' + '}', CGI.escape(mapping_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(mapping) + + # return_type + return_type = opts[:debug_return_type] || 'Integer' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.update_mapping", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#update_mapping\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param risk_rule_id [String] + # @param risk_rule [RiskRule] + # @param [Hash] opts the optional parameters + # @return [RiskRule] + def update_risk_rule(authorization, risk_rule_id, risk_rule, opts = {}) + data, _status_code, _headers = update_risk_rule_with_http_info(authorization, risk_rule_id, risk_rule, opts) + data + end + + # @param authorization [String] + # @param risk_rule_id [String] + # @param risk_rule [RiskRule] + # @param [Hash] opts the optional parameters + # @return [Array<(RiskRule, Integer, Hash)>] RiskRule data, response status code and response headers + def update_risk_rule_with_http_info(authorization, risk_rule_id, risk_rule, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.update_risk_rule ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.update_risk_rule" + end + # verify the required parameter 'risk_rule_id' is set + if @api_client.config.client_side_validation && risk_rule_id.nil? + fail ArgumentError, "Missing the required parameter 'risk_rule_id' when calling DefaultApi.update_risk_rule" + end + # verify the required parameter 'risk_rule' is set + if @api_client.config.client_side_validation && risk_rule.nil? + fail ArgumentError, "Missing the required parameter 'risk_rule' when calling DefaultApi.update_risk_rule" + end + # resource path + local_var_path = '/api/2/risk/rules/{risk_rule_id}'.sub('{' + 'risk_rule_id' + '}', CGI.escape(risk_rule_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(risk_rule) + + # return_type + return_type = opts[:debug_return_type] || 'RiskRule' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.update_risk_rule", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#update_risk_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param role_id [Integer] Set to the id of the role you want to return. + # @param role [Role] + # @param [Hash] opts the optional parameters + # @return [UpdateRole200Response] + def update_role(authorization, role_id, role, opts = {}) + data, _status_code, _headers = update_role_with_http_info(authorization, role_id, role, opts) + data + end + + # @param authorization [String] + # @param role_id [Integer] Set to the id of the role you want to return. + # @param role [Role] + # @param [Hash] opts the optional parameters + # @return [Array<(UpdateRole200Response, Integer, Hash)>] UpdateRole200Response data, response status code and response headers + def update_role_with_http_info(authorization, role_id, role, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.update_role ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.update_role" + end + # verify the required parameter 'role_id' is set + if @api_client.config.client_side_validation && role_id.nil? + fail ArgumentError, "Missing the required parameter 'role_id' when calling DefaultApi.update_role" + end + # verify the required parameter 'role' is set + if @api_client.config.client_side_validation && role.nil? + fail ArgumentError, "Missing the required parameter 'role' when calling DefaultApi.update_role" + end + # resource path + local_var_path = '/api/2/roles/{role_id}'.sub('{' + 'role_id' + '}', CGI.escape(role_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(role) + + # return_type + return_type = opts[:debug_return_type] || 'UpdateRole200Response' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.update_role", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#update_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param app_id [Integer] + # @param rule_id [Integer] The id of the app rule to locate. + # @param rule [Rule] + # @param [Hash] opts the optional parameters + # @return [RuleId] + def update_rule(authorization, app_id, rule_id, rule, opts = {}) + data, _status_code, _headers = update_rule_with_http_info(authorization, app_id, rule_id, rule, opts) + data + end + + # @param authorization [String] + # @param app_id [Integer] + # @param rule_id [Integer] The id of the app rule to locate. + # @param rule [Rule] + # @param [Hash] opts the optional parameters + # @return [Array<(RuleId, Integer, Hash)>] RuleId data, response status code and response headers + def update_rule_with_http_info(authorization, app_id, rule_id, rule, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.update_rule ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.update_rule" + end + # verify the required parameter 'app_id' is set + if @api_client.config.client_side_validation && app_id.nil? + fail ArgumentError, "Missing the required parameter 'app_id' when calling DefaultApi.update_rule" + end + # verify the required parameter 'rule_id' is set + if @api_client.config.client_side_validation && rule_id.nil? + fail ArgumentError, "Missing the required parameter 'rule_id' when calling DefaultApi.update_rule" + end + # verify the required parameter 'rule' is set + if @api_client.config.client_side_validation && rule.nil? + fail ArgumentError, "Missing the required parameter 'rule' when calling DefaultApi.update_rule" + end + # resource path + local_var_path = '/api/2/apps/{app_id}/rules/{rule_id}'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'rule_id' + '}', CGI.escape(rule_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(rule) + + # return_type + return_type = opts[:debug_return_type] || 'RuleId' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.update_rule", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#update_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param id [Integer] + # @param scope_id [Integer] + # @param add_scope_request [AddScopeRequest] + # @param [Hash] opts the optional parameters + # @return [Id] + def update_scope(authorization, id, scope_id, add_scope_request, opts = {}) + data, _status_code, _headers = update_scope_with_http_info(authorization, id, scope_id, add_scope_request, opts) + data + end + + # @param authorization [String] + # @param id [Integer] + # @param scope_id [Integer] + # @param add_scope_request [AddScopeRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(Id, Integer, Hash)>] Id data, response status code and response headers + def update_scope_with_http_info(authorization, id, scope_id, add_scope_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.update_scope ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.update_scope" + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.update_scope" + end + # verify the required parameter 'scope_id' is set + if @api_client.config.client_side_validation && scope_id.nil? + fail ArgumentError, "Missing the required parameter 'scope_id' when calling DefaultApi.update_scope" + end + # verify the required parameter 'add_scope_request' is set + if @api_client.config.client_side_validation && add_scope_request.nil? + fail ArgumentError, "Missing the required parameter 'add_scope_request' when calling DefaultApi.update_scope" + end + # resource path + local_var_path = '/api/2/api_authorizations/{id}/scopes/{scope_id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'scope_id' + '}', CGI.escape(scope_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(add_scope_request) + + # return_type + return_type = opts[:debug_return_type] || 'Id' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.update_scope", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#update_scope\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param user_id [Integer] Set to the id of the user that you want to return. + # @param user [User] + # @param [Hash] opts the optional parameters + # @option opts [String] :mappings Controls how mappings will be applied to the user on creation. Defaults to async. + # @option opts [Boolean] :validate_policy Will passwords validate against the User Policy? Defaults to true. + # @return [User] + def update_user(authorization, user_id, user, opts = {}) + data, _status_code, _headers = update_user_with_http_info(authorization, user_id, user, opts) + data + end + + # @param authorization [String] + # @param user_id [Integer] Set to the id of the user that you want to return. + # @param user [User] + # @param [Hash] opts the optional parameters + # @option opts [String] :mappings Controls how mappings will be applied to the user on creation. Defaults to async. + # @option opts [Boolean] :validate_policy Will passwords validate against the User Policy? Defaults to true. + # @return [Array<(User, Integer, Hash)>] User data, response status code and response headers + def update_user_with_http_info(authorization, user_id, user, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.update_user ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.update_user" + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling DefaultApi.update_user" + end + # verify the required parameter 'user' is set + if @api_client.config.client_side_validation && user.nil? + fail ArgumentError, "Missing the required parameter 'user' when calling DefaultApi.update_user" + end + allowable_values = ["async", "sync", "disabled"] + if @api_client.config.client_side_validation && opts[:'mappings'] && !allowable_values.include?(opts[:'mappings']) + fail ArgumentError, "invalid value for \"mappings\", must be one of #{allowable_values}" + end + # resource path + local_var_path = '/api/2/users/{user_id}'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'mappings'] = opts[:'mappings'] if !opts[:'mappings'].nil? + query_params[:'validate_policy'] = opts[:'validate_policy'] if !opts[:'validate_policy'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(user) + + # return_type + return_type = opts[:debug_return_type] || 'User' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.update_user", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#update_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param user_id [Integer] Set to the id of the user. + # @param registration_id [Integer] Set to the uuid of the registration. This was included in the response as part of the initial request in Enroll Factor. + # @param verify_enrollment_request [VerifyEnrollmentRequest] + # @param [Hash] opts the optional parameters + # @return [Array] + def verify_enrollment(authorization, user_id, registration_id, verify_enrollment_request, opts = {}) + data, _status_code, _headers = verify_enrollment_with_http_info(authorization, user_id, registration_id, verify_enrollment_request, opts) + data + end + + # @param authorization [String] + # @param user_id [Integer] Set to the id of the user. + # @param registration_id [Integer] Set to the uuid of the registration. This was included in the response as part of the initial request in Enroll Factor. + # @param verify_enrollment_request [VerifyEnrollmentRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers + def verify_enrollment_with_http_info(authorization, user_id, registration_id, verify_enrollment_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.verify_enrollment ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.verify_enrollment" + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling DefaultApi.verify_enrollment" + end + # verify the required parameter 'registration_id' is set + if @api_client.config.client_side_validation && registration_id.nil? + fail ArgumentError, "Missing the required parameter 'registration_id' when calling DefaultApi.verify_enrollment" + end + # verify the required parameter 'verify_enrollment_request' is set + if @api_client.config.client_side_validation && verify_enrollment_request.nil? + fail ArgumentError, "Missing the required parameter 'verify_enrollment_request' when calling DefaultApi.verify_enrollment" + end + # resource path + local_var_path = '/api/2/mfa/users/{user_id}/registrations/{registration_id}'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s)).sub('{' + 'registration_id' + '}', CGI.escape(registration_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(verify_enrollment_request) + + # return_type + return_type = opts[:debug_return_type] || 'Array' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.verify_enrollment", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#verify_enrollment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param user_id [Integer] Set to the id of the user. + # @param registration_id [Integer] Set to the uuid of the registration. This was included in the response as part of the initial request in Enroll Factor. + # @param [Hash] opts the optional parameters + # @return [Array] + def verify_enrollment_voice_protect(authorization, user_id, registration_id, opts = {}) + data, _status_code, _headers = verify_enrollment_voice_protect_with_http_info(authorization, user_id, registration_id, opts) + data + end + + # @param authorization [String] + # @param user_id [Integer] Set to the id of the user. + # @param registration_id [Integer] Set to the uuid of the registration. This was included in the response as part of the initial request in Enroll Factor. + # @param [Hash] opts the optional parameters + # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers + def verify_enrollment_voice_protect_with_http_info(authorization, user_id, registration_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.verify_enrollment_voice_protect ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.verify_enrollment_voice_protect" + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling DefaultApi.verify_enrollment_voice_protect" + end + # verify the required parameter 'registration_id' is set + if @api_client.config.client_side_validation && registration_id.nil? + fail ArgumentError, "Missing the required parameter 'registration_id' when calling DefaultApi.verify_enrollment_voice_protect" + end + # resource path + local_var_path = '/api/2/mfa/users/{user_id}/registrations/{registration_id}'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s)).sub('{' + 'registration_id' + '}', CGI.escape(registration_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Array' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.verify_enrollment_voice_protect", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#verify_enrollment_voice_protect\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param user_id [Integer] Set to the id of the user. + # @param verification_id [Integer] The verification_id is returned on activation of the factor or you can get the device_id using the Activate Factor API call. + # @param verify_factor_request [VerifyFactorRequest] + # @param [Hash] opts the optional parameters + # @return [Status2] + def verify_factor(authorization, user_id, verification_id, verify_factor_request, opts = {}) + data, _status_code, _headers = verify_factor_with_http_info(authorization, user_id, verification_id, verify_factor_request, opts) + data + end + + # @param authorization [String] + # @param user_id [Integer] Set to the id of the user. + # @param verification_id [Integer] The verification_id is returned on activation of the factor or you can get the device_id using the Activate Factor API call. + # @param verify_factor_request [VerifyFactorRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(Status2, Integer, Hash)>] Status2 data, response status code and response headers + def verify_factor_with_http_info(authorization, user_id, verification_id, verify_factor_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.verify_factor ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.verify_factor" + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling DefaultApi.verify_factor" + end + # verify the required parameter 'verification_id' is set + if @api_client.config.client_side_validation && verification_id.nil? + fail ArgumentError, "Missing the required parameter 'verification_id' when calling DefaultApi.verify_factor" + end + # verify the required parameter 'verify_factor_request' is set + if @api_client.config.client_side_validation && verify_factor_request.nil? + fail ArgumentError, "Missing the required parameter 'verify_factor_request' when calling DefaultApi.verify_factor" + end + # resource path + local_var_path = '/api/2/mfa/users/{user_id}/verifications/{verification_id}'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s)).sub('{' + 'verification_id' + '}', CGI.escape(verification_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(verify_factor_request) + + # return_type + return_type = opts[:debug_return_type] || 'Status2' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.verify_factor", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#verify_factor\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param verify_factor_saml_request [VerifyFactorSamlRequest] + # @param [Hash] opts the optional parameters + # @return [VerifyFactorSaml200Response] + def verify_factor_saml(authorization, verify_factor_saml_request, opts = {}) + data, _status_code, _headers = verify_factor_saml_with_http_info(authorization, verify_factor_saml_request, opts) + data + end + + # @param authorization [String] + # @param verify_factor_saml_request [VerifyFactorSamlRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(VerifyFactorSaml200Response, Integer, Hash)>] VerifyFactorSaml200Response data, response status code and response headers + def verify_factor_saml_with_http_info(authorization, verify_factor_saml_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.verify_factor_saml ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.verify_factor_saml" + end + # verify the required parameter 'verify_factor_saml_request' is set + if @api_client.config.client_side_validation && verify_factor_saml_request.nil? + fail ArgumentError, "Missing the required parameter 'verify_factor_saml_request' when calling DefaultApi.verify_factor_saml" + end + # resource path + local_var_path = '/api/2/saml_assertion/verify_factor' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(verify_factor_saml_request) + + # return_type + return_type = opts[:debug_return_type] || 'VerifyFactorSaml200Response' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.verify_factor_saml", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#verify_factor_saml\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param authorization [String] + # @param user_id [Integer] Set to the id of the user. + # @param verification_id [Integer] The verification_id is returned on activation of the factor or you can get the device_id using the Activate Factor API call. + # @param [Hash] opts the optional parameters + # @return [Array] + def verify_factor_voice(authorization, user_id, verification_id, opts = {}) + data, _status_code, _headers = verify_factor_voice_with_http_info(authorization, user_id, verification_id, opts) + data + end + + # @param authorization [String] + # @param user_id [Integer] Set to the id of the user. + # @param verification_id [Integer] The verification_id is returned on activation of the factor or you can get the device_id using the Activate Factor API call. + # @param [Hash] opts the optional parameters + # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers + def verify_factor_voice_with_http_info(authorization, user_id, verification_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.verify_factor_voice ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.verify_factor_voice" + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling DefaultApi.verify_factor_voice" + end + # verify the required parameter 'verification_id' is set + if @api_client.config.client_side_validation && verification_id.nil? + fail ArgumentError, "Missing the required parameter 'verification_id' when calling DefaultApi.verify_factor_voice" + end + # resource path + local_var_path = '/api/2/mfa/users/{user_id}/verifications/{verification_id}'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s)).sub('{' + 'verification_id' + '}', CGI.escape(verification_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Array' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.verify_factor_voice", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#verify_factor_voice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/openapi_client/api_client.rb b/lib/openapi_client/api_client.rb new file mode 100644 index 0000000..1126c6b --- /dev/null +++ b/lib/openapi_client/api_client.rb @@ -0,0 +1,391 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'json' +require 'logger' +require 'tempfile' +require 'time' +require 'typhoeus' + +module OpenapiClient + class ApiClient + # The Configuration object holding settings to be used in the API client. + attr_accessor :config + + # Defines the headers to be used in HTTP requests of all API calls by default. + # + # @return [Hash] + attr_accessor :default_headers + + # Initializes the ApiClient + # @option config [Configuration] Configuration for initializing the object, default to Configuration.default + def initialize(config = Configuration.default) + @config = config + @user_agent = "OpenAPI-Generator/#{VERSION}/ruby" + @default_headers = { + 'Content-Type' => 'application/json', + 'User-Agent' => @user_agent + } + end + + def self.default + @@default ||= ApiClient.new + end + + # Call an API with given options. + # + # @return [Array<(Object, Integer, Hash)>] an array of 3 elements: + # the data deserialized from response body (could be nil), response status code and response headers. + def call_api(http_method, path, opts = {}) + request = build_request(http_method, path, opts) + response = request.run + + if @config.debugging + @config.logger.debug "HTTP response body ~BEGIN~\n#{response.body}\n~END~\n" + end + + unless response.success? + if response.timed_out? + fail ApiError.new('Connection timed out') + elsif response.code == 0 + # Errors from libcurl will be made visible here + fail ApiError.new(:code => 0, + :message => response.return_message) + else + fail ApiError.new(:code => response.code, + :response_headers => response.headers, + :response_body => response.body), + response.status_message + end + end + + if opts[:return_type] + data = deserialize(response, opts[:return_type]) + else + data = nil + end + return data, response.code, response.headers + end + + # Builds the HTTP request + # + # @param [String] http_method HTTP method/verb (e.g. POST) + # @param [String] path URL path (e.g. /account/new) + # @option opts [Hash] :header_params Header parameters + # @option opts [Hash] :query_params Query parameters + # @option opts [Hash] :form_params Query parameters + # @option opts [Object] :body HTTP body (JSON/XML) + # @return [Typhoeus::Request] A Typhoeus Request + def build_request(http_method, path, opts = {}) + url = build_request_url(path, opts) + http_method = http_method.to_sym.downcase + + header_params = @default_headers.merge(opts[:header_params] || {}) + query_params = opts[:query_params] || {} + form_params = opts[:form_params] || {} + follow_location = opts[:follow_location] || true + + + # set ssl_verifyhosts option based on @config.verify_ssl_host (true/false) + _verify_ssl_host = @config.verify_ssl_host ? 2 : 0 + + req_opts = { + :method => http_method, + :headers => header_params, + :params => query_params, + :params_encoding => @config.params_encoding, + :timeout => @config.timeout, + :ssl_verifypeer => @config.verify_ssl, + :ssl_verifyhost => _verify_ssl_host, + :sslcert => @config.cert_file, + :sslkey => @config.key_file, + :verbose => @config.debugging, + :followlocation => follow_location + } + + # set custom cert, if provided + req_opts[:cainfo] = @config.ssl_ca_cert if @config.ssl_ca_cert + + if [:post, :patch, :put, :delete].include?(http_method) + req_body = build_request_body(header_params, form_params, opts[:body]) + req_opts.update :body => req_body + if @config.debugging + @config.logger.debug "HTTP request body param ~BEGIN~\n#{req_body}\n~END~\n" + end + end + + request = Typhoeus::Request.new(url, req_opts) + download_file(request) if opts[:return_type] == 'File' + request + end + + # Builds the HTTP request body + # + # @param [Hash] header_params Header parameters + # @param [Hash] form_params Query parameters + # @param [Object] body HTTP body (JSON/XML) + # @return [String] HTTP body data in the form of string + def build_request_body(header_params, form_params, body) + # http form + if header_params['Content-Type'] == 'application/x-www-form-urlencoded' || + header_params['Content-Type'] == 'multipart/form-data' + data = {} + form_params.each do |key, value| + case value + when ::File, ::Array, nil + # let typhoeus handle File, Array and nil parameters + data[key] = value + else + data[key] = value.to_s + end + end + elsif body + data = body.is_a?(String) ? body : body.to_json + else + data = nil + end + data + end + + # Save response body into a file in (the defined) temporary folder, using the filename + # from the "Content-Disposition" header if provided, otherwise a random filename. + # The response body is written to the file in chunks in order to handle files which + # size is larger than maximum Ruby String or even larger than the maximum memory a Ruby + # process can use. + # + # @see Configuration#temp_folder_path + def download_file(request) + tempfile = nil + encoding = nil + request.on_headers do |response| + content_disposition = response.headers['Content-Disposition'] + if content_disposition && content_disposition =~ /filename=/i + filename = content_disposition[/filename=['"]?([^'"\s]+)['"]?/, 1] + prefix = sanitize_filename(filename) + else + prefix = 'download-' + end + prefix = prefix + '-' unless prefix.end_with?('-') + encoding = response.body.encoding + tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding) + @tempfile = tempfile + end + request.on_body do |chunk| + chunk.force_encoding(encoding) + tempfile.write(chunk) + end + request.on_complete do |response| + if tempfile + tempfile.close + @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\ + "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\ + "will be deleted automatically with GC. It's also recommended to delete the temp file "\ + "explicitly with `tempfile.delete`" + end + end + end + + # Check if the given MIME is a JSON MIME. + # JSON MIME examples: + # application/json + # application/json; charset=UTF8 + # APPLICATION/JSON + # */* + # @param [String] mime MIME + # @return [Boolean] True if the MIME is application/json + def json_mime?(mime) + (mime == '*/*') || !(mime =~ /Application\/.*json(?!p)(;.*)?/i).nil? + end + + # Deserialize the response to the given return type. + # + # @param [Response] response HTTP response + # @param [String] return_type some examples: "User", "Array", "Hash" + def deserialize(response, return_type) + body = response.body + + # handle file downloading - return the File instance processed in request callbacks + # note that response body is empty when the file is written in chunks in request on_body callback + return @tempfile if return_type == 'File' + + return nil if body.nil? || body.empty? + + # return response body directly for String return type + return body if return_type == 'String' + + # ensuring a default content type + content_type = response.headers['Content-Type'] || 'application/json' + + fail "Content-Type is not supported: #{content_type}" unless json_mime?(content_type) + + begin + data = JSON.parse("[#{body}]", :symbolize_names => true)[0] + rescue JSON::ParserError => e + if %w(String Date Time).include?(return_type) + data = body + else + raise e + end + end + + convert_to_type data, return_type + end + + # Convert data to the given return type. + # @param [Object] data Data to be converted + # @param [String] return_type Return type + # @return [Mixed] Data in a particular type + def convert_to_type(data, return_type) + return nil if data.nil? + case return_type + when 'String' + data.to_s + when 'Integer' + data.to_i + when 'Float' + data.to_f + when 'Boolean' + data == true + when 'Time' + # parse date time (expecting ISO 8601 format) + Time.parse data + when 'Date' + # parse date time (expecting ISO 8601 format) + Date.parse data + when 'Object' + # generic object (usually a Hash), return directly + data + when /\AArray<(.+)>\z/ + # e.g. Array + sub_type = $1 + data.map { |item| convert_to_type(item, sub_type) } + when /\AHash\\z/ + # e.g. Hash + sub_type = $1 + {}.tap do |hash| + data.each { |k, v| hash[k] = convert_to_type(v, sub_type) } + end + else + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(return_type) + klass.respond_to?(:openapi_one_of) ? klass.build(data) : klass.build_from_hash(data) + end + end + + # Sanitize filename by removing path. + # e.g. ../../sun.gif becomes sun.gif + # + # @param [String] filename the filename to be sanitized + # @return [String] the sanitized filename + def sanitize_filename(filename) + filename.gsub(/.*[\/\\]/, '') + end + + def build_request_url(path, opts = {}) + # Add leading and trailing slashes to path + path = "/#{path}".gsub(/\/+/, '/') + @config.base_url(opts[:operation]) + path + end + + # Update header and query params based on authentication settings. + # + # @param [Hash] header_params Header parameters + # @param [Hash] query_params Query parameters + # @param [String] auth_names Authentication scheme name + def update_params_for_auth!(header_params, query_params, auth_names) + Array(auth_names).each do |auth_name| + auth_setting = @config.auth_settings[auth_name] + next unless auth_setting + case auth_setting[:in] + when 'header' then header_params[auth_setting[:key]] = auth_setting[:value] + when 'query' then query_params[auth_setting[:key]] = auth_setting[:value] + else fail ArgumentError, 'Authentication token must be in `query` or `header`' + end + end + end + + # Sets user agent in HTTP header + # + # @param [String] user_agent User agent (e.g. openapi-generator/ruby/1.0.0) + def user_agent=(user_agent) + @user_agent = user_agent + @default_headers['User-Agent'] = @user_agent + end + + # Return Accept header based on an array of accepts provided. + # @param [Array] accepts array for Accept + # @return [String] the Accept header (e.g. application/json) + def select_header_accept(accepts) + return nil if accepts.nil? || accepts.empty? + # use JSON when present, otherwise use all of the provided + json_accept = accepts.find { |s| json_mime?(s) } + json_accept || accepts.join(',') + end + + # Return Content-Type header based on an array of content types provided. + # @param [Array] content_types array for Content-Type + # @return [String] the Content-Type header (e.g. application/json) + def select_header_content_type(content_types) + # return nil by default + return if content_types.nil? || content_types.empty? + # use JSON when present, otherwise use the first one + json_content_type = content_types.find { |s| json_mime?(s) } + json_content_type || content_types.first + end + + # Convert object (array, hash, object, etc) to JSON string. + # @param [Object] model object to be converted into JSON string + # @return [String] JSON string representation of the object + def object_to_http_body(model) + return model if model.nil? || model.is_a?(String) + local_body = nil + if model.is_a?(Array) + local_body = model.map { |m| object_to_hash(m) } + else + local_body = object_to_hash(model) + end + local_body.to_json + end + + # Convert object(non-array) to hash. + # @param [Object] obj object to be converted into JSON string + # @return [String] JSON string representation of the object + def object_to_hash(obj) + if obj.respond_to?(:to_hash) + obj.to_hash + else + obj + end + end + + # Build parameter value according to the given collection format. + # @param [String] collection_format one of :csv, :ssv, :tsv, :pipes and :multi + def build_collection_param(param, collection_format) + case collection_format + when :csv + param.join(',') + when :ssv + param.join(' ') + when :tsv + param.join("\t") + when :pipes + param.join('|') + when :multi + # return the array directly as typhoeus will handle it as expected + param + else + fail "unknown collection format: #{collection_format.inspect}" + end + end + end +end diff --git a/lib/openapi_client/api_error.rb b/lib/openapi_client/api_error.rb new file mode 100644 index 0000000..9e722ee --- /dev/null +++ b/lib/openapi_client/api_error.rb @@ -0,0 +1,57 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +module OpenapiClient + class ApiError < StandardError + attr_reader :code, :response_headers, :response_body + + # Usage examples: + # ApiError.new + # ApiError.new("message") + # ApiError.new(:code => 500, :response_headers => {}, :response_body => "") + # ApiError.new(:code => 404, :message => "Not Found") + def initialize(arg = nil) + if arg.is_a? Hash + if arg.key?(:message) || arg.key?('message') + super(arg[:message] || arg['message']) + else + super arg + end + + arg.each do |k, v| + instance_variable_set "@#{k}", v + end + else + super arg + end + end + + # Override to_s to display a friendly error message + def to_s + message + end + + def message + if @message.nil? + msg = "Error message: the server returns an error" + else + msg = @message + end + + msg += "\nHTTP status code: #{code}" if code + msg += "\nResponse headers: #{response_headers}" if response_headers + msg += "\nResponse body: #{response_body}" if response_body + + msg + end + end +end diff --git a/lib/openapi_client/configuration.rb b/lib/openapi_client/configuration.rb new file mode 100644 index 0000000..8482027 --- /dev/null +++ b/lib/openapi_client/configuration.rb @@ -0,0 +1,282 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +module OpenapiClient + class Configuration + # Defines url scheme + attr_accessor :scheme + + # Defines url host + attr_accessor :host + + # Defines url base path + attr_accessor :base_path + + # Define server configuration index + attr_accessor :server_index + + # Define server operation configuration index + attr_accessor :server_operation_index + + # Default server variables + attr_accessor :server_variables + + # Default server operation variables + attr_accessor :server_operation_variables + + # Defines API keys used with API Key authentications. + # + # @return [Hash] key: parameter name, value: parameter value (API key) + # + # @example parameter name is "api_key", API key is "xxx" (e.g. "api_key=xxx" in query string) + # config.api_key['api_key'] = 'xxx' + attr_accessor :api_key + + # Defines API key prefixes used with API Key authentications. + # + # @return [Hash] key: parameter name, value: API key prefix + # + # @example parameter name is "Authorization", API key prefix is "Token" (e.g. "Authorization: Token xxx" in headers) + # config.api_key_prefix['api_key'] = 'Token' + attr_accessor :api_key_prefix + + # Defines the username used with HTTP basic authentication. + # + # @return [String] + attr_accessor :username + + # Defines the password used with HTTP basic authentication. + # + # @return [String] + attr_accessor :password + + # Defines the access token (Bearer) used with OAuth2. + attr_accessor :access_token + + # Set this to enable/disable debugging. When enabled (set to true), HTTP request/response + # details will be logged with `logger.debug` (see the `logger` attribute). + # Default to false. + # + # @return [true, false] + attr_accessor :debugging + + # Defines the logger used for debugging. + # Default to `Rails.logger` (when in Rails) or logging to STDOUT. + # + # @return [#debug] + attr_accessor :logger + + # Defines the temporary folder to store downloaded files + # (for API endpoints that have file response). + # Default to use `Tempfile`. + # + # @return [String] + attr_accessor :temp_folder_path + + # The time limit for HTTP request in seconds. + # Default to 0 (never times out). + attr_accessor :timeout + + # Set this to false to skip client side validation in the operation. + # Default to true. + # @return [true, false] + attr_accessor :client_side_validation + + ### TLS/SSL setting + # Set this to false to skip verifying SSL certificate when calling API from https server. + # Default to true. + # + # @note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks. + # + # @return [true, false] + attr_accessor :verify_ssl + + ### TLS/SSL setting + # Set this to false to skip verifying SSL host name + # Default to true. + # + # @note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks. + # + # @return [true, false] + attr_accessor :verify_ssl_host + + ### TLS/SSL setting + # Set this to customize the certificate file to verify the peer. + # + # @return [String] the path to the certificate file + # + # @see The `cainfo` option of Typhoeus, `--cert` option of libcurl. Related source code: + # https://github.com/typhoeus/typhoeus/blob/master/lib/typhoeus/easy_factory.rb#L145 + attr_accessor :ssl_ca_cert + + ### TLS/SSL setting + # Client certificate file (for client certificate) + attr_accessor :cert_file + + ### TLS/SSL setting + # Client private key file (for client certificate) + attr_accessor :key_file + + # Set this to customize parameters encoding of array parameter with multi collectionFormat. + # Default to nil. + # + # @see The params_encoding option of Ethon. Related source code: + # https://github.com/typhoeus/ethon/blob/master/lib/ethon/easy/queryable.rb#L96 + attr_accessor :params_encoding + + + attr_accessor :inject_format + + attr_accessor :force_ending_format + + def initialize + @scheme = 'https' + @host = 'onelogininc.onelogin.com' + @base_path = '' + @server_index = 0 + @server_operation_index = {} + @server_variables = {} + @server_operation_variables = {} + @api_key = {} + @api_key_prefix = {} + @client_side_validation = true + @verify_ssl = true + @verify_ssl_host = true + @cert_file = nil + @key_file = nil + @timeout = 0 + @params_encoding = nil + @debugging = false + @inject_format = false + @force_ending_format = false + @logger = defined?(Rails) ? Rails.logger : Logger.new(STDOUT) + + yield(self) if block_given? + end + + # The default Configuration object. + def self.default + @@default ||= Configuration.new + end + + def configure + yield(self) if block_given? + end + + def scheme=(scheme) + # remove :// from scheme + @scheme = scheme.sub(/:\/\//, '') + end + + def host=(host) + # remove http(s):// and anything after a slash + @host = host.sub(/https?:\/\//, '').split('/').first + end + + def base_path=(base_path) + # Add leading and trailing slashes to base_path + @base_path = "/#{base_path}".gsub(/\/+/, '/') + @base_path = '' if @base_path == '/' + end + + # Returns base URL for specified operation based on server settings + def base_url(operation = nil) + index = server_operation_index.fetch(operation, server_index) + return "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') if index == nil + + server_url(index, server_operation_variables.fetch(operation, server_variables), operation_server_settings[operation]) + end + + # Gets API key (with prefix if set). + # @param [String] param_name the parameter name of API key auth + def api_key_with_prefix(param_name, param_alias = nil) + key = @api_key[param_name] + key = @api_key.fetch(param_alias, key) unless param_alias.nil? + if @api_key_prefix[param_name] + "#{@api_key_prefix[param_name]} #{key}" + else + key + end + end + + # Gets Basic Auth token string + def basic_auth_token + 'Basic ' + ["#{username}:#{password}"].pack('m').delete("\r\n") + end + + # Returns Auth Settings hash for api client. + def auth_settings + { + } + end + + # Returns an array of Server setting + def server_settings + [ + { + url: "https://{subdomain}.{domain}.com", + description: "No description provided", + variables: { + subdomain: { + description: "No description provided", + default_value: "onelogininc", + }, + domain: { + description: "No description provided", + default_value: "onelogin", + } + } + } + ] + end + + def operation_server_settings + { + } + end + + # Returns URL based on server settings + # + # @param index array index of the server settings + # @param variables hash of variable and the corresponding value + def server_url(index, variables = {}, servers = nil) + servers = server_settings if servers == nil + + # check array index out of bound + if (index < 0 || index >= servers.size) + fail ArgumentError, "Invalid index #{index} when selecting the server. Must be less than #{servers.size}" + end + + server = servers[index] + url = server[:url] + + return url unless server.key? :variables + + # go through variable and assign a value + server[:variables].each do |name, variable| + if variables.key?(name) + if (!server[:variables][name].key?(:enum_values) || server[:variables][name][:enum_values].include?(variables[name])) + url.gsub! "{" + name.to_s + "}", variables[name] + else + fail ArgumentError, "The variable `#{name}` in the server URL has invalid value #{variables[name]}. Must be #{server[:variables][name][:enum_values]}." + end + else + # use default value + url.gsub! "{" + name.to_s + "}", server[:variables][name][:default_value] + end + end + + url + end + + end +end diff --git a/lib/openapi_client/models/action.rb b/lib/openapi_client/models/action.rb new file mode 100644 index 0000000..26ca8fa --- /dev/null +++ b/lib/openapi_client/models/action.rb @@ -0,0 +1,262 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class Action + # The action to apply + attr_accessor :action + + # Only applicable to provisioned and set_* actions. Items in the array will be a plain text string or valid value for the selected action. + attr_accessor :value + + # A regular expression to extract a value. Applies to provisionable, multi-selects, and string actions. + attr_accessor :expression + + # A hash containing scriptlet code that returns a value. + attr_accessor :scriplet + + # A template to construct a value. Applies to default, string, and list actions. + attr_accessor :macro + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'action' => :'action', + :'value' => :'value', + :'expression' => :'expression', + :'scriplet' => :'scriplet', + :'macro' => :'macro' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'action' => :'String', + :'value' => :'Array', + :'expression' => :'String', + :'scriplet' => :'String', + :'macro' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::Action` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::Action`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'action') + self.action = attributes[:'action'] + end + + if attributes.key?(:'value') + if (value = attributes[:'value']).is_a?(Array) + self.value = value + end + end + + if attributes.key?(:'expression') + self.expression = attributes[:'expression'] + end + + if attributes.key?(:'scriplet') + self.scriplet = attributes[:'scriplet'] + end + + if attributes.key?(:'macro') + self.macro = attributes[:'macro'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + action == o.action && + value == o.value && + expression == o.expression && + scriplet == o.scriplet && + macro == o.macro + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [action, value, expression, scriplet, macro].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/activate_factor_request.rb b/lib/openapi_client/models/activate_factor_request.rb new file mode 100644 index 0000000..6a8e56b --- /dev/null +++ b/lib/openapi_client/models/activate_factor_request.rb @@ -0,0 +1,250 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class ActivateFactorRequest + # Required. Specifies the factor to be verified. + attr_accessor :device_id + + # Optional. Sets the window of time in seconds that the factor must be verified within. + attr_accessor :expires_in + + # Optional. Only applies to Email MagicLink factor. + attr_accessor :redirect_to + + # Optional. Only applies to SMS factor. A message template that will be sent via SMS. + attr_accessor :custom_message + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'device_id' => :'device_id', + :'expires_in' => :'expires_in', + :'redirect_to' => :'redirect_to', + :'custom_message' => :'custom_message' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'device_id' => :'Integer', + :'expires_in' => :'Integer', + :'redirect_to' => :'String', + :'custom_message' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::ActivateFactorRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::ActivateFactorRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'device_id') + self.device_id = attributes[:'device_id'] + end + + if attributes.key?(:'expires_in') + self.expires_in = attributes[:'expires_in'] + end + + if attributes.key?(:'redirect_to') + self.redirect_to = attributes[:'redirect_to'] + end + + if attributes.key?(:'custom_message') + self.custom_message = attributes[:'custom_message'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + device_id == o.device_id && + expires_in == o.expires_in && + redirect_to == o.redirect_to && + custom_message == o.custom_message + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [device_id, expires_in, redirect_to, custom_message].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/add_access_token_claim_request.rb b/lib/openapi_client/models/add_access_token_claim_request.rb new file mode 100644 index 0000000..f1590b7 --- /dev/null +++ b/lib/openapi_client/models/add_access_token_claim_request.rb @@ -0,0 +1,237 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class AddAccessTokenClaimRequest + attr_accessor :name + + attr_accessor :user_attribute_mappings + + attr_accessor :user_attribute_macros + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'user_attribute_mappings' => :'user_attribute_mappings', + :'user_attribute_macros' => :'user_attribute_macros' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'name' => :'String', + :'user_attribute_mappings' => :'String', + :'user_attribute_macros' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::AddAccessTokenClaimRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::AddAccessTokenClaimRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'user_attribute_mappings') + self.user_attribute_mappings = attributes[:'user_attribute_mappings'] + end + + if attributes.key?(:'user_attribute_macros') + self.user_attribute_macros = attributes[:'user_attribute_macros'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + user_attribute_mappings == o.user_attribute_mappings && + user_attribute_macros == o.user_attribute_macros + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [name, user_attribute_mappings, user_attribute_macros].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/add_client_app_request.rb b/lib/openapi_client/models/add_client_app_request.rb new file mode 100644 index 0000000..0b4eff6 --- /dev/null +++ b/lib/openapi_client/models/add_client_app_request.rb @@ -0,0 +1,230 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class AddClientAppRequest + attr_accessor :app_id + + attr_accessor :scopes + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'app_id' => :'app_id', + :'scopes' => :'scopes' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'app_id' => :'Integer', + :'scopes' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::AddClientAppRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::AddClientAppRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'app_id') + self.app_id = attributes[:'app_id'] + end + + if attributes.key?(:'scopes') + if (value = attributes[:'scopes']).is_a?(Array) + self.scopes = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + app_id == o.app_id && + scopes == o.scopes + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [app_id, scopes].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/add_role_users200_response_inner.rb b/lib/openapi_client/models/add_role_users200_response_inner.rb new file mode 100644 index 0000000..289df7a --- /dev/null +++ b/lib/openapi_client/models/add_role_users200_response_inner.rb @@ -0,0 +1,219 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class AddRoleUsers200ResponseInner + attr_accessor :id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::AddRoleUsers200ResponseInner` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::AddRoleUsers200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/add_scope_request.rb b/lib/openapi_client/models/add_scope_request.rb new file mode 100644 index 0000000..b3fc87a --- /dev/null +++ b/lib/openapi_client/models/add_scope_request.rb @@ -0,0 +1,228 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class AddScopeRequest + attr_accessor :value + + attr_accessor :description + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'value' => :'value', + :'description' => :'description' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'value' => :'String', + :'description' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::AddScopeRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::AddScopeRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + value == o.value && + description == o.description + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [value, description].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/auth_method.rb b/lib/openapi_client/models/auth_method.rb new file mode 100644 index 0000000..2b0837f --- /dev/null +++ b/lib/openapi_client/models/auth_method.rb @@ -0,0 +1,43 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class AuthMethod + N0 = 0.freeze + N1 = 1.freeze + N2 = 2.freeze + N3 = 3.freeze + N4 = 4.freeze + N6 = 6.freeze + N7 = 7.freeze + N8 = 8.freeze + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + constantValues = AuthMethod.constants.select { |c| AuthMethod::const_get(c) == value } + raise "Invalid ENUM value #{value} for class #AuthMethod" if constantValues.empty? + value + end + end +end diff --git a/lib/openapi_client/models/auth_server_configuration.rb b/lib/openapi_client/models/auth_server_configuration.rb new file mode 100644 index 0000000..292b218 --- /dev/null +++ b/lib/openapi_client/models/auth_server_configuration.rb @@ -0,0 +1,248 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class AuthServerConfiguration + attr_accessor :audiences + + attr_accessor :refresh_token_expiration_minutes + + attr_accessor :resource_identifier + + attr_accessor :access_token_expiration_minutes + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'audiences' => :'audiences', + :'refresh_token_expiration_minutes' => :'refresh_token_expiration_minutes', + :'resource_identifier' => :'resource_identifier', + :'access_token_expiration_minutes' => :'access_token_expiration_minutes' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'audiences' => :'Array', + :'refresh_token_expiration_minutes' => :'Integer', + :'resource_identifier' => :'String', + :'access_token_expiration_minutes' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::AuthServerConfiguration` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::AuthServerConfiguration`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'audiences') + if (value = attributes[:'audiences']).is_a?(Array) + self.audiences = value + end + end + + if attributes.key?(:'refresh_token_expiration_minutes') + self.refresh_token_expiration_minutes = attributes[:'refresh_token_expiration_minutes'] + end + + if attributes.key?(:'resource_identifier') + self.resource_identifier = attributes[:'resource_identifier'] + end + + if attributes.key?(:'access_token_expiration_minutes') + self.access_token_expiration_minutes = attributes[:'access_token_expiration_minutes'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + audiences == o.audiences && + refresh_token_expiration_minutes == o.refresh_token_expiration_minutes && + resource_identifier == o.resource_identifier && + access_token_expiration_minutes == o.access_token_expiration_minutes + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [audiences, refresh_token_expiration_minutes, resource_identifier, access_token_expiration_minutes].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/client_app.rb b/lib/openapi_client/models/client_app.rb new file mode 100644 index 0000000..da4f572 --- /dev/null +++ b/lib/openapi_client/models/client_app.rb @@ -0,0 +1,228 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class ClientApp + attr_accessor :app_id + + attr_accessor :api_auth_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'app_id' => :'app_id', + :'api_auth_id' => :'api_auth_id' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'app_id' => :'Integer', + :'api_auth_id' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::ClientApp` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::ClientApp`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'app_id') + self.app_id = attributes[:'app_id'] + end + + if attributes.key?(:'api_auth_id') + self.api_auth_id = attributes[:'api_auth_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + app_id == o.app_id && + api_auth_id == o.api_auth_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [app_id, api_auth_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/condition.rb b/lib/openapi_client/models/condition.rb new file mode 100644 index 0000000..cfc0e1e --- /dev/null +++ b/lib/openapi_client/models/condition.rb @@ -0,0 +1,240 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class Condition + # The source field to check. + attr_accessor :source + + # A valid operator for the selected condition source + attr_accessor :operator + + # A plain text string or valid value for the selected condition source. + attr_accessor :value + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'source' => :'source', + :'operator' => :'operator', + :'value' => :'value' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'source' => :'String', + :'operator' => :'String', + :'value' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::Condition` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::Condition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'source') + self.source = attributes[:'source'] + end + + if attributes.key?(:'operator') + self.operator = attributes[:'operator'] + end + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + source == o.source && + operator == o.operator && + value == o.value + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [source, operator, value].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/connector.rb b/lib/openapi_client/models/connector.rb new file mode 100644 index 0000000..23968d5 --- /dev/null +++ b/lib/openapi_client/models/connector.rb @@ -0,0 +1,259 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class Connector + # The connectors unique ID in OneLogin. + attr_accessor :id + + # The name of the connector. + attr_accessor :name + + attr_accessor :auth_method + + # Indicates if apps created using this connector will be allowed to create custom parameters. + attr_accessor :allows_new_parameters + + # A link to the apps icon url. + attr_accessor :icon_url + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'name' => :'name', + :'auth_method' => :'auth_method', + :'allows_new_parameters' => :'allows_new_parameters', + :'icon_url' => :'icon_url' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'Integer', + :'name' => :'String', + :'auth_method' => :'AuthMethod', + :'allows_new_parameters' => :'Boolean', + :'icon_url' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::Connector` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::Connector`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'auth_method') + self.auth_method = attributes[:'auth_method'] + end + + if attributes.key?(:'allows_new_parameters') + self.allows_new_parameters = attributes[:'allows_new_parameters'] + end + + if attributes.key?(:'icon_url') + self.icon_url = attributes[:'icon_url'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + name == o.name && + auth_method == o.auth_method && + allows_new_parameters == o.allows_new_parameters && + icon_url == o.icon_url + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, name, auth_method, allows_new_parameters, icon_url].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/create_authorization_server_request.rb b/lib/openapi_client/models/create_authorization_server_request.rb new file mode 100644 index 0000000..abb1219 --- /dev/null +++ b/lib/openapi_client/models/create_authorization_server_request.rb @@ -0,0 +1,237 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class CreateAuthorizationServerRequest + attr_accessor :name + + attr_accessor :description + + attr_accessor :configuration + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'description' => :'description', + :'configuration' => :'configuration' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'name' => :'String', + :'description' => :'String', + :'configuration' => :'AuthServerConfiguration' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::CreateAuthorizationServerRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::CreateAuthorizationServerRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'configuration') + self.configuration = attributes[:'configuration'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + description == o.description && + configuration == o.configuration + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [name, description, configuration].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/create_environment_variable_request.rb b/lib/openapi_client/models/create_environment_variable_request.rb new file mode 100644 index 0000000..47d816f --- /dev/null +++ b/lib/openapi_client/models/create_environment_variable_request.rb @@ -0,0 +1,240 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class CreateEnvironmentVariableRequest + # The name for the environment variable that will be used to retrieve the value from a hook function. + attr_accessor :name + + # The secret value that will be encrypted at rest and injected in applicable hook functions at run time. + attr_accessor :value + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'value' => :'value' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'name' => :'String', + :'value' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::CreateEnvironmentVariableRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::CreateEnvironmentVariableRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @value.nil? + invalid_properties.push('invalid value for "value", value cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @name.nil? + return false if @value.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + value == o.value + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [name, value].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/create_roles201_response_inner.rb b/lib/openapi_client/models/create_roles201_response_inner.rb new file mode 100644 index 0000000..49ddb73 --- /dev/null +++ b/lib/openapi_client/models/create_roles201_response_inner.rb @@ -0,0 +1,219 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class CreateRoles201ResponseInner + attr_accessor :id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::CreateRoles201ResponseInner` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::CreateRoles201ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/device.rb b/lib/openapi_client/models/device.rb new file mode 100644 index 0000000..160012e --- /dev/null +++ b/lib/openapi_client/models/device.rb @@ -0,0 +1,255 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class Device + attr_accessor :device_id + + attr_accessor :user_display_name + + attr_accessor :type_display_name + + attr_accessor :auth_factor_name + + attr_accessor :default + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'device_id' => :'device_id', + :'user_display_name' => :'user_display_name', + :'type_display_name' => :'type_display_name', + :'auth_factor_name' => :'auth_factor_name', + :'default' => :'default' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'device_id' => :'String', + :'user_display_name' => :'String', + :'type_display_name' => :'String', + :'auth_factor_name' => :'String', + :'default' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::Device` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::Device`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'device_id') + self.device_id = attributes[:'device_id'] + end + + if attributes.key?(:'user_display_name') + self.user_display_name = attributes[:'user_display_name'] + end + + if attributes.key?(:'type_display_name') + self.type_display_name = attributes[:'type_display_name'] + end + + if attributes.key?(:'auth_factor_name') + self.auth_factor_name = attributes[:'auth_factor_name'] + end + + if attributes.key?(:'default') + self.default = attributes[:'default'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + device_id == o.device_id && + user_display_name == o.user_display_name && + type_display_name == o.type_display_name && + auth_factor_name == o.auth_factor_name && + default == o.default + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [device_id, user_display_name, type_display_name, auth_factor_name, default].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/enroll_factor_request.rb b/lib/openapi_client/models/enroll_factor_request.rb new file mode 100644 index 0000000..f8b5bdc --- /dev/null +++ b/lib/openapi_client/models/enroll_factor_request.rb @@ -0,0 +1,280 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class EnrollFactorRequest + # The identifier of the factor to enroll the user with. + attr_accessor :factor_id + + # A name for the users device. + attr_accessor :display_name + + # Defaults to 120. Valid values are: 120-900 seconds. + attr_accessor :expires_in + + # Defaults to false. + attr_accessor :verified + + # Redirects MagicLink success page to specified URL after 2 seconds. + attr_accessor :redirect_to + + # A message template that will be sent via SMS. Max length of the message after template items are inserted is 160 characters including the OTP code. + attr_accessor :custom_message + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'factor_id' => :'factor_id', + :'display_name' => :'display_name', + :'expires_in' => :'expires_in', + :'verified' => :'verified', + :'redirect_to' => :'redirect_to', + :'custom_message' => :'custom_message' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'factor_id' => :'Integer', + :'display_name' => :'String', + :'expires_in' => :'String', + :'verified' => :'Boolean', + :'redirect_to' => :'String', + :'custom_message' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::EnrollFactorRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::EnrollFactorRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'factor_id') + self.factor_id = attributes[:'factor_id'] + end + + if attributes.key?(:'display_name') + self.display_name = attributes[:'display_name'] + end + + if attributes.key?(:'expires_in') + self.expires_in = attributes[:'expires_in'] + end + + if attributes.key?(:'verified') + self.verified = attributes[:'verified'] + end + + if attributes.key?(:'redirect_to') + self.redirect_to = attributes[:'redirect_to'] + end + + if attributes.key?(:'custom_message') + self.custom_message = attributes[:'custom_message'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @factor_id.nil? + invalid_properties.push('invalid value for "factor_id", factor_id cannot be nil.') + end + + if @display_name.nil? + invalid_properties.push('invalid value for "display_name", display_name cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @factor_id.nil? + return false if @display_name.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + factor_id == o.factor_id && + display_name == o.display_name && + expires_in == o.expires_in && + verified == o.verified && + redirect_to == o.redirect_to && + custom_message == o.custom_message + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [factor_id, display_name, expires_in, verified, redirect_to, custom_message].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/envvar.rb b/lib/openapi_client/models/envvar.rb new file mode 100644 index 0000000..7c9e6cc --- /dev/null +++ b/lib/openapi_client/models/envvar.rb @@ -0,0 +1,250 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class Envvar + # A unique identifier for the Hook Environment Variable + attr_accessor :id + + # The name of the environment variable. + attr_accessor :name + + # The ISO8601 formatted date that the environment variable was created. + attr_accessor :created_at + + # The ISO8601 formatted date that the environment variable was last updated. + attr_accessor :updated_at + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'name' => :'name', + :'created_at' => :'created_at', + :'updated_at' => :'updated_at' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'name' => :'String', + :'created_at' => :'String', + :'updated_at' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::Envvar` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::Envvar`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + name == o.name && + created_at == o.created_at && + updated_at == o.updated_at + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, name, created_at, updated_at].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/error_status.rb b/lib/openapi_client/models/error_status.rb new file mode 100644 index 0000000..7d2c163 --- /dev/null +++ b/lib/openapi_client/models/error_status.rb @@ -0,0 +1,239 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class ErrorStatus + attr_accessor :code + + attr_accessor :message + + attr_accessor :errors + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'code' => :'code', + :'message' => :'message', + :'errors' => :'errors' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'code' => :'Integer', + :'message' => :'String', + :'errors' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::ErrorStatus` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::ErrorStatus`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'code') + self.code = attributes[:'code'] + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.key?(:'errors') + if (value = attributes[:'errors']).is_a?(Array) + self.errors = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + code == o.code && + message == o.message && + errors == o.errors + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [code, message, errors].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/error_status_errors_inner.rb b/lib/openapi_client/models/error_status_errors_inner.rb new file mode 100644 index 0000000..2517482 --- /dev/null +++ b/lib/openapi_client/models/error_status_errors_inner.rb @@ -0,0 +1,230 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class ErrorStatusErrorsInner + attr_accessor :field + + attr_accessor :message + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'field' => :'field', + :'message' => :'message' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'field' => :'String', + :'message' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::ErrorStatusErrorsInner` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::ErrorStatusErrorsInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'field') + self.field = attributes[:'field'] + end + + if attributes.key?(:'message') + if (value = attributes[:'message']).is_a?(Array) + self.message = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + field == o.field && + message == o.message + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [field, message].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/factor_inner.rb b/lib/openapi_client/models/factor_inner.rb new file mode 100644 index 0000000..573d1be --- /dev/null +++ b/lib/openapi_client/models/factor_inner.rb @@ -0,0 +1,323 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class FactorInner + # MFA device identifier. + attr_accessor :id + + # accepted : factor has been verified. pending: registered but has not been verified. + attr_accessor :status + + # True = is user's default MFA device for OneLogin. + attr_accessor :default + + # \"Official\" authentication factor name, as it appears to administrators in OneLogin. + attr_accessor :auth_factor_name + + # Authentication factor display name as it appears to users upon initial registration, as defined by admins at Settings > Authentication Factors. + attr_accessor :type_display_name + + # Authentication factor display name assigned by users when they enroll the device. + attr_accessor :user_display_name + + # A short lived token that is required to Verify the Factor. This token expires based on the expires_in parameter passed in. + attr_accessor :expires_at + + attr_accessor :factor_data + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'status' => :'status', + :'default' => :'default', + :'auth_factor_name' => :'auth_factor_name', + :'type_display_name' => :'type_display_name', + :'user_display_name' => :'user_display_name', + :'expires_at' => :'expires_at', + :'factor_data' => :'factor_data' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'status' => :'String', + :'default' => :'Boolean', + :'auth_factor_name' => :'String', + :'type_display_name' => :'String', + :'user_display_name' => :'String', + :'expires_at' => :'String', + :'factor_data' => :'FactorInnerFactorData' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::FactorInner` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::FactorInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'default') + self.default = attributes[:'default'] + end + + if attributes.key?(:'auth_factor_name') + self.auth_factor_name = attributes[:'auth_factor_name'] + end + + if attributes.key?(:'type_display_name') + self.type_display_name = attributes[:'type_display_name'] + end + + if attributes.key?(:'user_display_name') + self.user_display_name = attributes[:'user_display_name'] + end + + if attributes.key?(:'expires_at') + self.expires_at = attributes[:'expires_at'] + end + + if attributes.key?(:'factor_data') + self.factor_data = attributes[:'factor_data'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + status_validator = EnumAttributeValidator.new('String', ["pending", "accepted"]) + return false unless status_validator.valid?(@status) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] status Object to be assigned + def status=(status) + validator = EnumAttributeValidator.new('String', ["pending", "accepted"]) + unless validator.valid?(status) + fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}." + end + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + status == o.status && + default == o.default && + auth_factor_name == o.auth_factor_name && + type_display_name == o.type_display_name && + user_display_name == o.user_display_name && + expires_at == o.expires_at && + factor_data == o.factor_data + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, status, default, auth_factor_name, type_display_name, user_display_name, expires_at, factor_data].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/factor_inner_factor_data.rb b/lib/openapi_client/models/factor_inner_factor_data.rb new file mode 100644 index 0000000..e015f78 --- /dev/null +++ b/lib/openapi_client/models/factor_inner_factor_data.rb @@ -0,0 +1,231 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + # Array of factor specific properties. For example, the token or totp code for OneLogin Protect. + class FactorInnerFactorData + # The token which can be used to verify the factor registration. + attr_accessor :verification_token + + # OTP Url that can be leveraged for any authenticator that supports the key uri format. + attr_accessor :totp_url + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'verification_token' => :'verification_token', + :'totp_url' => :'totp_url' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'verification_token' => :'String', + :'totp_url' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::FactorInnerFactorData` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::FactorInnerFactorData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'verification_token') + self.verification_token = attributes[:'verification_token'] + end + + if attributes.key?(:'totp_url') + self.totp_url = attributes[:'totp_url'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + verification_token == o.verification_token && + totp_url == o.totp_url + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [verification_token, totp_url].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/generate_mfa_token200_response.rb b/lib/openapi_client/models/generate_mfa_token200_response.rb new file mode 100644 index 0000000..6e67eba --- /dev/null +++ b/lib/openapi_client/models/generate_mfa_token200_response.rb @@ -0,0 +1,250 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class GenerateMfaToken200Response + # Token can function as a temporary MFA token. It can be used to authenticate for any app when valid. + attr_accessor :mfa_token + + # true indcates the token can be used multiple times. false indicates the token is invalid after a single use + attr_accessor :reusable + + # Defines the expiration time and date for the token. Format is UTC time. + attr_accessor :expires_at + + # Defines the expiration time and date for the token. Format is UTC time. + attr_accessor :device_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'mfa_token' => :'mfa_token', + :'reusable' => :'reusable', + :'expires_at' => :'expires_at', + :'device_id' => :'device_id' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'mfa_token' => :'String', + :'reusable' => :'Boolean', + :'expires_at' => :'String', + :'device_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::GenerateMfaToken200Response` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::GenerateMfaToken200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'mfa_token') + self.mfa_token = attributes[:'mfa_token'] + end + + if attributes.key?(:'reusable') + self.reusable = attributes[:'reusable'] + end + + if attributes.key?(:'expires_at') + self.expires_at = attributes[:'expires_at'] + end + + if attributes.key?(:'device_id') + self.device_id = attributes[:'device_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + mfa_token == o.mfa_token && + reusable == o.reusable && + expires_at == o.expires_at && + device_id == o.device_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [mfa_token, reusable, expires_at, device_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/generate_mfa_token422_response.rb b/lib/openapi_client/models/generate_mfa_token422_response.rb new file mode 100644 index 0000000..6e242ad --- /dev/null +++ b/lib/openapi_client/models/generate_mfa_token422_response.rb @@ -0,0 +1,246 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class GenerateMfaToken422Response + attr_accessor :status_code + + attr_accessor :name + + attr_accessor :message + + attr_accessor :details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'status_code' => :'statusCode', + :'name' => :'name', + :'message' => :'message', + :'details' => :'details' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'status_code' => :'Integer', + :'name' => :'String', + :'message' => :'String', + :'details' => :'GenerateMfaToken422ResponseDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::GenerateMfaToken422Response` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::GenerateMfaToken422Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'status_code') + self.status_code = attributes[:'status_code'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + status_code == o.status_code && + name == o.name && + message == o.message && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [status_code, name, message, details].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/generate_mfa_token422_response_details.rb b/lib/openapi_client/models/generate_mfa_token422_response_details.rb new file mode 100644 index 0000000..e166ca8 --- /dev/null +++ b/lib/openapi_client/models/generate_mfa_token422_response_details.rb @@ -0,0 +1,221 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class GenerateMfaToken422ResponseDetails + attr_accessor :parameters + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'parameters' => :'parameters' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'parameters' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::GenerateMfaToken422ResponseDetails` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::GenerateMfaToken422ResponseDetails`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'parameters') + if (value = attributes[:'parameters']).is_a?(Array) + self.parameters = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + parameters == o.parameters + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [parameters].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/generate_mfa_token_request.rb b/lib/openapi_client/models/generate_mfa_token_request.rb new file mode 100644 index 0000000..b97e43c --- /dev/null +++ b/lib/openapi_client/models/generate_mfa_token_request.rb @@ -0,0 +1,230 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class GenerateMfaTokenRequest + # Set the duration of the token in seconds. + attr_accessor :expires_in + + # Defines if the token is reusable multiple times within the expiry window. + attr_accessor :reusable + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'expires_in' => :'expires_in', + :'reusable' => :'reusable' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'expires_in' => :'String', + :'reusable' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::GenerateMfaTokenRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::GenerateMfaTokenRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'expires_in') + self.expires_in = attributes[:'expires_in'] + end + + if attributes.key?(:'reusable') + self.reusable = attributes[:'reusable'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + expires_in == o.expires_in && + reusable == o.reusable + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [expires_in, reusable].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/generate_saml_assertion_request.rb b/lib/openapi_client/models/generate_saml_assertion_request.rb new file mode 100644 index 0000000..18c0fb2 --- /dev/null +++ b/lib/openapi_client/models/generate_saml_assertion_request.rb @@ -0,0 +1,280 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class GenerateSamlAssertionRequest + # Set this to the username or email of the OneLogin user accessing the app for which you want to generate a SAML token. + attr_accessor :username_or_email + + # Password of the OneLogin user accessing the app for which you want to generate a SAML token. + attr_accessor :password + + # App ID of the app for which you want to generate a SAML token. This is the app ID in OneLogin. + attr_accessor :app_id + + # Set to the subdomain of the OneLogin user accessing the app for which you want to generate a SAML token. + attr_accessor :subdomain + + # Whitelisted IP address, if MFA is required and you need to honor IP address whitelisting defined in MFA policies. + attr_accessor :ip_address + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'username_or_email' => :'username_or_email', + :'password' => :'password', + :'app_id' => :'app_id', + :'subdomain' => :'subdomain', + :'ip_address' => :'ip_address' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'username_or_email' => :'String', + :'password' => :'String', + :'app_id' => :'String', + :'subdomain' => :'String', + :'ip_address' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::GenerateSamlAssertionRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::GenerateSamlAssertionRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'username_or_email') + self.username_or_email = attributes[:'username_or_email'] + end + + if attributes.key?(:'password') + self.password = attributes[:'password'] + end + + if attributes.key?(:'app_id') + self.app_id = attributes[:'app_id'] + end + + if attributes.key?(:'subdomain') + self.subdomain = attributes[:'subdomain'] + end + + if attributes.key?(:'ip_address') + self.ip_address = attributes[:'ip_address'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @username_or_email.nil? + invalid_properties.push('invalid value for "username_or_email", username_or_email cannot be nil.') + end + + if @password.nil? + invalid_properties.push('invalid value for "password", password cannot be nil.') + end + + if @app_id.nil? + invalid_properties.push('invalid value for "app_id", app_id cannot be nil.') + end + + if @subdomain.nil? + invalid_properties.push('invalid value for "subdomain", subdomain cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @username_or_email.nil? + return false if @password.nil? + return false if @app_id.nil? + return false if @subdomain.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + username_or_email == o.username_or_email && + password == o.password && + app_id == o.app_id && + subdomain == o.subdomain && + ip_address == o.ip_address + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [username_or_email, password, app_id, subdomain, ip_address].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/generate_token200_response.rb b/lib/openapi_client/models/generate_token200_response.rb new file mode 100644 index 0000000..afae2d6 --- /dev/null +++ b/lib/openapi_client/models/generate_token200_response.rb @@ -0,0 +1,264 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class GenerateToken200Response + attr_accessor :access_token + + attr_accessor :created_at + + attr_accessor :expires_in + + attr_accessor :refresh_token + + attr_accessor :token_type + + attr_accessor :accountt_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'access_token' => :'access_token', + :'created_at' => :'created_at', + :'expires_in' => :'expires_in', + :'refresh_token' => :'refresh_token', + :'token_type' => :'token_type', + :'accountt_id' => :'accountt_id' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'access_token' => :'String', + :'created_at' => :'String', + :'expires_in' => :'Integer', + :'refresh_token' => :'String', + :'token_type' => :'String', + :'accountt_id' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::GenerateToken200Response` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::GenerateToken200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'access_token') + self.access_token = attributes[:'access_token'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'expires_in') + self.expires_in = attributes[:'expires_in'] + end + + if attributes.key?(:'refresh_token') + self.refresh_token = attributes[:'refresh_token'] + end + + if attributes.key?(:'token_type') + self.token_type = attributes[:'token_type'] + end + + if attributes.key?(:'accountt_id') + self.accountt_id = attributes[:'accountt_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + access_token == o.access_token && + created_at == o.created_at && + expires_in == o.expires_in && + refresh_token == o.refresh_token && + token_type == o.token_type && + accountt_id == o.accountt_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [access_token, created_at, expires_in, refresh_token, token_type, accountt_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/generate_token400_response.rb b/lib/openapi_client/models/generate_token400_response.rb new file mode 100644 index 0000000..dc9fc9b --- /dev/null +++ b/lib/openapi_client/models/generate_token400_response.rb @@ -0,0 +1,219 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class GenerateToken400Response + attr_accessor :status + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'status' => :'status' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'status' => :'Status' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::GenerateToken400Response` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::GenerateToken400Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/generate_token_request.rb b/lib/openapi_client/models/generate_token_request.rb new file mode 100644 index 0000000..3c81cf1 --- /dev/null +++ b/lib/openapi_client/models/generate_token_request.rb @@ -0,0 +1,253 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class GenerateTokenRequest + attr_accessor :grant_type + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'grant_type' => :'grant_type' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'grant_type' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::GenerateTokenRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::GenerateTokenRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'grant_type') + self.grant_type = attributes[:'grant_type'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + grant_type_validator = EnumAttributeValidator.new('String', ["client_credentials"]) + return false unless grant_type_validator.valid?(@grant_type) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] grant_type Object to be assigned + def grant_type=(grant_type) + validator = EnumAttributeValidator.new('String', ["client_credentials"]) + unless validator.valid?(grant_type) + fail ArgumentError, "invalid value for \"grant_type\", must be one of #{validator.allowable_values}." + end + @grant_type = grant_type + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + grant_type == o.grant_type + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [grant_type].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/get_authorization_server200_response.rb b/lib/openapi_client/models/get_authorization_server200_response.rb new file mode 100644 index 0000000..98679c5 --- /dev/null +++ b/lib/openapi_client/models/get_authorization_server200_response.rb @@ -0,0 +1,246 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class GetAuthorizationServer200Response + attr_accessor :configuration + + attr_accessor :id + + attr_accessor :description + + attr_accessor :name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'configuration' => :'configuration', + :'id' => :'id', + :'description' => :'description', + :'name' => :'name' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'configuration' => :'AuthServerConfiguration', + :'id' => :'Integer', + :'description' => :'String', + :'name' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::GetAuthorizationServer200Response` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::GetAuthorizationServer200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'configuration') + self.configuration = attributes[:'configuration'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + configuration == o.configuration && + id == o.id && + description == o.description && + name == o.name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [configuration, id, description, name].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/get_available_factors200_response_inner.rb b/lib/openapi_client/models/get_available_factors200_response_inner.rb new file mode 100644 index 0000000..cdb9a18 --- /dev/null +++ b/lib/openapi_client/models/get_available_factors200_response_inner.rb @@ -0,0 +1,240 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class GetAvailableFactors200ResponseInner + # Identifier for the factor which will be used for user enrollment + attr_accessor :factor_id + + # Authentication factor name, as it appears to administrators in OneLogin. + attr_accessor :name + + # Internal use only + attr_accessor :auth_factor_name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'factor_id' => :'factor_id', + :'name' => :'name', + :'auth_factor_name' => :'auth_factor_name' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'factor_id' => :'Integer', + :'name' => :'String', + :'auth_factor_name' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::GetAvailableFactors200ResponseInner` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::GetAvailableFactors200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'factor_id') + self.factor_id = attributes[:'factor_id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'auth_factor_name') + self.auth_factor_name = attributes[:'auth_factor_name'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + factor_id == o.factor_id && + name == o.name && + auth_factor_name == o.auth_factor_name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [factor_id, name, auth_factor_name].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/get_client_apps200_response_inner.rb b/lib/openapi_client/models/get_client_apps200_response_inner.rb new file mode 100644 index 0000000..cb4874f --- /dev/null +++ b/lib/openapi_client/models/get_client_apps200_response_inner.rb @@ -0,0 +1,248 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class GetClientApps200ResponseInner + attr_accessor :scopes + + attr_accessor :app_id + + attr_accessor :name + + attr_accessor :api_auth_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'scopes' => :'scopes', + :'app_id' => :'app_id', + :'name' => :'name', + :'api_auth_id' => :'api_auth_id' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'scopes' => :'Array', + :'app_id' => :'Integer', + :'name' => :'String', + :'api_auth_id' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::GetClientApps200ResponseInner` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::GetClientApps200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'scopes') + if (value = attributes[:'scopes']).is_a?(Array) + self.scopes = value + end + end + + if attributes.key?(:'app_id') + self.app_id = attributes[:'app_id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'api_auth_id') + self.api_auth_id = attributes[:'api_auth_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + scopes == o.scopes && + app_id == o.app_id && + name == o.name && + api_auth_id == o.api_auth_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [scopes, app_id, name, api_auth_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/get_client_apps200_response_inner_scopes_inner.rb b/lib/openapi_client/models/get_client_apps200_response_inner_scopes_inner.rb new file mode 100644 index 0000000..e10501c --- /dev/null +++ b/lib/openapi_client/models/get_client_apps200_response_inner_scopes_inner.rb @@ -0,0 +1,237 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class GetClientApps200ResponseInnerScopesInner + attr_accessor :description + + attr_accessor :value + + attr_accessor :id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'description' => :'description', + :'value' => :'value', + :'id' => :'id' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'description' => :'String', + :'value' => :'String', + :'id' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::GetClientApps200ResponseInnerScopesInner` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::GetClientApps200ResponseInnerScopesInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + description == o.description && + value == o.value && + id == o.id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [description, value, id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/get_rate_limit200_response.rb b/lib/openapi_client/models/get_rate_limit200_response.rb new file mode 100644 index 0000000..26429d0 --- /dev/null +++ b/lib/openapi_client/models/get_rate_limit200_response.rb @@ -0,0 +1,228 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class GetRateLimit200Response + attr_accessor :status + + attr_accessor :data + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'status' => :'status', + :'data' => :'data' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'status' => :'Status', + :'data' => :'GetRateLimit200ResponseData' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::GetRateLimit200Response` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::GetRateLimit200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + status == o.status && + data == o.data + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [status, data].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/get_rate_limit200_response_data.rb b/lib/openapi_client/models/get_rate_limit200_response_data.rb new file mode 100644 index 0000000..dc2fb62 --- /dev/null +++ b/lib/openapi_client/models/get_rate_limit200_response_data.rb @@ -0,0 +1,237 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class GetRateLimit200ResponseData + attr_accessor :x_rate_limit_limit + + attr_accessor :x_rate_limit_remaining + + attr_accessor :x_rate_limit_reset + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'x_rate_limit_limit' => :'X-RateLimit-Limit', + :'x_rate_limit_remaining' => :'X-RateLimit-Remaining', + :'x_rate_limit_reset' => :'X-RateLimit-Reset' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'x_rate_limit_limit' => :'Integer', + :'x_rate_limit_remaining' => :'Integer', + :'x_rate_limit_reset' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::GetRateLimit200ResponseData` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::GetRateLimit200ResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'x_rate_limit_limit') + self.x_rate_limit_limit = attributes[:'x_rate_limit_limit'] + end + + if attributes.key?(:'x_rate_limit_remaining') + self.x_rate_limit_remaining = attributes[:'x_rate_limit_remaining'] + end + + if attributes.key?(:'x_rate_limit_reset') + self.x_rate_limit_reset = attributes[:'x_rate_limit_reset'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + x_rate_limit_limit == o.x_rate_limit_limit && + x_rate_limit_remaining == o.x_rate_limit_remaining && + x_rate_limit_reset == o.x_rate_limit_reset + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [x_rate_limit_limit, x_rate_limit_remaining, x_rate_limit_reset].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/get_risk_score200_response.rb b/lib/openapi_client/models/get_risk_score200_response.rb new file mode 100644 index 0000000..dbfaf41 --- /dev/null +++ b/lib/openapi_client/models/get_risk_score200_response.rb @@ -0,0 +1,256 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class GetRiskScore200Response + # A risk score 0 is low risk and 100 is the highest risk level possible. + attr_accessor :score + + # Triggers are indicators of some of the key items that influenced the risk score. + attr_accessor :triggers + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'score' => :'score', + :'triggers' => :'triggers' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'score' => :'Float', + :'triggers' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::GetRiskScore200Response` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::GetRiskScore200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'score') + self.score = attributes[:'score'] + end + + if attributes.key?(:'triggers') + if (value = attributes[:'triggers']).is_a?(Array) + self.triggers = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@score.nil? && @score > 100.0 + invalid_properties.push('invalid value for "score", must be smaller than or equal to 100.0.') + end + + if !@score.nil? && @score < 0.0 + invalid_properties.push('invalid value for "score", must be greater than or equal to 0.0.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@score.nil? && @score > 100.0 + return false if !@score.nil? && @score < 0.0 + true + end + + # Custom attribute writer method with validation + # @param [Object] score Value to be assigned + def score=(score) + if !score.nil? && score > 100.0 + fail ArgumentError, 'invalid value for "score", must be smaller than or equal to 100.0.' + end + + if !score.nil? && score < 0.0 + fail ArgumentError, 'invalid value for "score", must be greater than or equal to 0.0.' + end + + @score = score + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + score == o.score && + triggers == o.triggers + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [score, triggers].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/get_risk_score400_response.rb b/lib/openapi_client/models/get_risk_score400_response.rb new file mode 100644 index 0000000..e37f9d8 --- /dev/null +++ b/lib/openapi_client/models/get_risk_score400_response.rb @@ -0,0 +1,221 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class GetRiskScore400Response + attr_accessor :messages + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'messages' => :'messages' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'messages' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::GetRiskScore400Response` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::GetRiskScore400Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'messages') + if (value = attributes[:'messages']).is_a?(Array) + self.messages = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + messages == o.messages + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [messages].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/get_risk_score_request.rb b/lib/openapi_client/models/get_risk_score_request.rb new file mode 100644 index 0000000..1b7a4c0 --- /dev/null +++ b/lib/openapi_client/models/get_risk_score_request.rb @@ -0,0 +1,291 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class GetRiskScoreRequest + # The IP address of the User's request. + attr_accessor :ip + + # The user agent of the User's request. + attr_accessor :user_agent + + attr_accessor :user + + attr_accessor :source + + attr_accessor :session + + attr_accessor :device + + # Set to the value of the __tdli_fp cookie. + attr_accessor :fp + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'ip' => :'ip', + :'user_agent' => :'user_agent', + :'user' => :'user', + :'source' => :'source', + :'session' => :'session', + :'device' => :'device', + :'fp' => :'fp' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'ip' => :'String', + :'user_agent' => :'String', + :'user' => :'RiskUser', + :'source' => :'Source', + :'session' => :'Session', + :'device' => :'RiskDevice', + :'fp' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::GetRiskScoreRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::GetRiskScoreRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'ip') + self.ip = attributes[:'ip'] + end + + if attributes.key?(:'user_agent') + self.user_agent = attributes[:'user_agent'] + end + + if attributes.key?(:'user') + self.user = attributes[:'user'] + end + + if attributes.key?(:'source') + self.source = attributes[:'source'] + end + + if attributes.key?(:'session') + self.session = attributes[:'session'] + end + + if attributes.key?(:'device') + self.device = attributes[:'device'] + end + + if attributes.key?(:'fp') + self.fp = attributes[:'fp'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @ip.nil? + invalid_properties.push('invalid value for "ip", ip cannot be nil.') + end + + if @user_agent.nil? + invalid_properties.push('invalid value for "user_agent", user_agent cannot be nil.') + end + + if @user.nil? + invalid_properties.push('invalid value for "user", user cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @ip.nil? + return false if @user_agent.nil? + return false if @user.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + ip == o.ip && + user_agent == o.user_agent && + user == o.user && + source == o.source && + session == o.session && + device == o.device && + fp == o.fp + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [ip, user_agent, user, source, session, device, fp].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/get_score_insights200_response.rb b/lib/openapi_client/models/get_score_insights200_response.rb new file mode 100644 index 0000000..7823fe1 --- /dev/null +++ b/lib/openapi_client/models/get_score_insights200_response.rb @@ -0,0 +1,228 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class GetScoreInsights200Response + attr_accessor :scores + + attr_accessor :total + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'scores' => :'scores', + :'total' => :'total' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'scores' => :'GetScoreInsights200ResponseScores', + :'total' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::GetScoreInsights200Response` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::GetScoreInsights200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'scores') + self.scores = attributes[:'scores'] + end + + if attributes.key?(:'total') + self.total = attributes[:'total'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + scores == o.scores && + total == o.total + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [scores, total].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/get_score_insights200_response_scores.rb b/lib/openapi_client/models/get_score_insights200_response_scores.rb new file mode 100644 index 0000000..c9529f4 --- /dev/null +++ b/lib/openapi_client/models/get_score_insights200_response_scores.rb @@ -0,0 +1,255 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class GetScoreInsights200ResponseScores + attr_accessor :minimal + + attr_accessor :low + + attr_accessor :medium + + attr_accessor :high + + attr_accessor :very_high + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'minimal' => :'minimal', + :'low' => :'low', + :'medium' => :'medium', + :'high' => :'high', + :'very_high' => :'very_high' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'minimal' => :'Integer', + :'low' => :'Integer', + :'medium' => :'Integer', + :'high' => :'Integer', + :'very_high' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::GetScoreInsights200ResponseScores` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::GetScoreInsights200ResponseScores`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'minimal') + self.minimal = attributes[:'minimal'] + end + + if attributes.key?(:'low') + self.low = attributes[:'low'] + end + + if attributes.key?(:'medium') + self.medium = attributes[:'medium'] + end + + if attributes.key?(:'high') + self.high = attributes[:'high'] + end + + if attributes.key?(:'very_high') + self.very_high = attributes[:'very_high'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + minimal == o.minimal && + low == o.low && + medium == o.medium && + high == o.high && + very_high == o.very_high + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [minimal, low, medium, high, very_high].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/get_user_apps200_response_inner.rb b/lib/openapi_client/models/get_user_apps200_response_inner.rb new file mode 100644 index 0000000..cab4587 --- /dev/null +++ b/lib/openapi_client/models/get_user_apps200_response_inner.rb @@ -0,0 +1,335 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class GetUserApps200ResponseInner + # The App ID + attr_accessor :id + + # A url for the icon that represents the app in the OneLogin portal + attr_accessor :icon_url + + # Boolean that indicates if the OneLogin browser extension is required to launch this app. + attr_accessor :extension + + # Unqiue identifier for this user and app combination. + attr_accessor :login_id + + # The name of the app. + attr_accessor :name + + attr_accessor :provisioning_status + + # If provisioning is enabled this indicates the state of provisioning for the given user. + attr_accessor :provisioning_state + + # Indicates if provisioning is enabled for this app. + attr_accessor :provisioning_enabled + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'icon_url' => :'icon_url', + :'extension' => :'extension', + :'login_id' => :'login_id', + :'name' => :'name', + :'provisioning_status' => :'provisioning_status', + :'provisioning_state' => :'provisioning_state', + :'provisioning_enabled' => :'provisioning_enabled' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'Integer', + :'icon_url' => :'String', + :'extension' => :'Boolean', + :'login_id' => :'Integer', + :'name' => :'String', + :'provisioning_status' => :'String', + :'provisioning_state' => :'String', + :'provisioning_enabled' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::GetUserApps200ResponseInner` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::GetUserApps200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'icon_url') + self.icon_url = attributes[:'icon_url'] + end + + if attributes.key?(:'extension') + self.extension = attributes[:'extension'] + end + + if attributes.key?(:'login_id') + self.login_id = attributes[:'login_id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'provisioning_status') + self.provisioning_status = attributes[:'provisioning_status'] + end + + if attributes.key?(:'provisioning_state') + self.provisioning_state = attributes[:'provisioning_state'] + end + + if attributes.key?(:'provisioning_enabled') + self.provisioning_enabled = attributes[:'provisioning_enabled'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + provisioning_status_validator = EnumAttributeValidator.new('String', ["enabling", "disabling", "enabling_pending_approval", "disabling_pendding_approval", "enabled", "disabled", "disabling_failed", "enabling_failed"]) + return false unless provisioning_status_validator.valid?(@provisioning_status) + provisioning_state_validator = EnumAttributeValidator.new('String', ["unknown", "provisioning", "modifying", "deleting", "provisioning_pending_approval", "deleting_pending_approval", "modifying_pending_approval", "linking", "provisioned", "deleted", "modifying_failed", "provisioning_failed", "deleting_failed", "linking_failed", "disabled", "nonexistent", "modifying_pending_approval_then_disabled"]) + return false unless provisioning_state_validator.valid?(@provisioning_state) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] provisioning_status Object to be assigned + def provisioning_status=(provisioning_status) + validator = EnumAttributeValidator.new('String', ["enabling", "disabling", "enabling_pending_approval", "disabling_pendding_approval", "enabled", "disabled", "disabling_failed", "enabling_failed"]) + unless validator.valid?(provisioning_status) + fail ArgumentError, "invalid value for \"provisioning_status\", must be one of #{validator.allowable_values}." + end + @provisioning_status = provisioning_status + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] provisioning_state Object to be assigned + def provisioning_state=(provisioning_state) + validator = EnumAttributeValidator.new('String', ["unknown", "provisioning", "modifying", "deleting", "provisioning_pending_approval", "deleting_pending_approval", "modifying_pending_approval", "linking", "provisioned", "deleted", "modifying_failed", "provisioning_failed", "deleting_failed", "linking_failed", "disabled", "nonexistent", "modifying_pending_approval_then_disabled"]) + unless validator.valid?(provisioning_state) + fail ArgumentError, "invalid value for \"provisioning_state\", must be one of #{validator.allowable_values}." + end + @provisioning_state = provisioning_state + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + icon_url == o.icon_url && + extension == o.extension && + login_id == o.login_id && + name == o.name && + provisioning_status == o.provisioning_status && + provisioning_state == o.provisioning_state && + provisioning_enabled == o.provisioning_enabled + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, icon_url, extension, login_id, name, provisioning_status, provisioning_state, provisioning_enabled].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/hook.rb b/lib/openapi_client/models/hook.rb new file mode 100644 index 0000000..2802361 --- /dev/null +++ b/lib/openapi_client/models/hook.rb @@ -0,0 +1,462 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class Hook + # The Hook unique ID in OneLogin. + attr_accessor :id + + # A string describing the type of hook. e.g. `pre-authentication` + attr_accessor :type + + # Boolean to enable or disable the hook. Disabled hooks will not run. + attr_accessor :disabled + + # The number of seconds to allow the hook function to run before before timing out. Maximum timeout varies based on the type of hook. + attr_accessor :timeout + + # Environment Variable objects that will be available via process.env.ENV_VAR_NAME in the hook code. + attr_accessor :env_vars + + # The Smart Hooks supported Node.js version to execute this hook with. + attr_accessor :runtime + + # Number of retries if execution fails. + attr_accessor :retries + + # An object containing NPM packages that are bundled with the hook function. + attr_accessor :packages + + # A base64 encoded string containing the javascript function code. + attr_accessor :function + + # The semantic version of the content that will be injected into this hook. + attr_accessor :context_version + + # String describing the state of the hook function. When a hook is ready and disabled is false it will be executed. + attr_accessor :status + + attr_accessor :options + + # An array of objects that let you limit the execution of a hook to users in specific roles. + attr_accessor :conditions + + # ISO8601 format date that they hook function was created. + attr_accessor :created_at + + # ISO8601 format date that they hook function was last updated. + attr_accessor :updated_at + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'type' => :'type', + :'disabled' => :'disabled', + :'timeout' => :'timeout', + :'env_vars' => :'env_vars', + :'runtime' => :'runtime', + :'retries' => :'retries', + :'packages' => :'packages', + :'function' => :'function', + :'context_version' => :'context_version', + :'status' => :'status', + :'options' => :'options', + :'conditions' => :'conditions', + :'created_at' => :'created_at', + :'updated_at' => :'updated_at' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'type' => :'String', + :'disabled' => :'Boolean', + :'timeout' => :'Integer', + :'env_vars' => :'Array', + :'runtime' => :'String', + :'retries' => :'Integer', + :'packages' => :'Object', + :'function' => :'String', + :'context_version' => :'String', + :'status' => :'String', + :'options' => :'HookOptions', + :'conditions' => :'Array', + :'created_at' => :'String', + :'updated_at' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::Hook` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::Hook`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'disabled') + self.disabled = attributes[:'disabled'] + else + self.disabled = true + end + + if attributes.key?(:'timeout') + self.timeout = attributes[:'timeout'] + else + self.timeout = 1 + end + + if attributes.key?(:'env_vars') + if (value = attributes[:'env_vars']).is_a?(Array) + self.env_vars = value + end + end + + if attributes.key?(:'runtime') + self.runtime = attributes[:'runtime'] + end + + if attributes.key?(:'retries') + self.retries = attributes[:'retries'] + else + self.retries = 0 + end + + if attributes.key?(:'packages') + self.packages = attributes[:'packages'] + end + + if attributes.key?(:'function') + self.function = attributes[:'function'] + end + + if attributes.key?(:'context_version') + self.context_version = attributes[:'context_version'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'options') + self.options = attributes[:'options'] + end + + if attributes.key?(:'conditions') + if (value = attributes[:'conditions']).is_a?(Array) + self.conditions = value + end + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @type.nil? + invalid_properties.push('invalid value for "type", type cannot be nil.') + end + + if @disabled.nil? + invalid_properties.push('invalid value for "disabled", disabled cannot be nil.') + end + + if @timeout.nil? + invalid_properties.push('invalid value for "timeout", timeout cannot be nil.') + end + + if @env_vars.nil? + invalid_properties.push('invalid value for "env_vars", env_vars cannot be nil.') + end + + if @runtime.nil? + invalid_properties.push('invalid value for "runtime", runtime cannot be nil.') + end + + if @retries.nil? + invalid_properties.push('invalid value for "retries", retries cannot be nil.') + end + + if @retries > 4 + invalid_properties.push('invalid value for "retries", must be smaller than or equal to 4.') + end + + if @packages.nil? + invalid_properties.push('invalid value for "packages", packages cannot be nil.') + end + + if @function.nil? + invalid_properties.push('invalid value for "function", function cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @type.nil? + return false if @disabled.nil? + return false if @timeout.nil? + return false if @env_vars.nil? + return false if @runtime.nil? + return false if @retries.nil? + return false if @retries > 4 + return false if @packages.nil? + return false if @function.nil? + status_validator = EnumAttributeValidator.new('String', ["ready", "create-queued", "create-running", "create-failed", "update-queued", "update-running", "update-failed"]) + return false unless status_validator.valid?(@status) + true + end + + # Custom attribute writer method with validation + # @param [Object] retries Value to be assigned + def retries=(retries) + if retries.nil? + fail ArgumentError, 'retries cannot be nil' + end + + if retries > 4 + fail ArgumentError, 'invalid value for "retries", must be smaller than or equal to 4.' + end + + @retries = retries + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] status Object to be assigned + def status=(status) + validator = EnumAttributeValidator.new('String', ["ready", "create-queued", "create-running", "create-failed", "update-queued", "update-running", "update-failed"]) + unless validator.valid?(status) + fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}." + end + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + type == o.type && + disabled == o.disabled && + timeout == o.timeout && + env_vars == o.env_vars && + runtime == o.runtime && + retries == o.retries && + packages == o.packages && + function == o.function && + context_version == o.context_version && + status == o.status && + options == o.options && + conditions == o.conditions && + created_at == o.created_at && + updated_at == o.updated_at + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, type, disabled, timeout, env_vars, runtime, retries, packages, function, context_version, status, options, conditions, created_at, updated_at].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/hook_conditions_inner.rb b/lib/openapi_client/models/hook_conditions_inner.rb new file mode 100644 index 0000000..597ef05 --- /dev/null +++ b/lib/openapi_client/models/hook_conditions_inner.rb @@ -0,0 +1,237 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class HookConditionsInner + attr_accessor :source + + attr_accessor :operator + + attr_accessor :value + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'source' => :'source', + :'operator' => :'operator', + :'value' => :'value' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'source' => :'String', + :'operator' => :'String', + :'value' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::HookConditionsInner` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::HookConditionsInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'source') + self.source = attributes[:'source'] + end + + if attributes.key?(:'operator') + self.operator = attributes[:'operator'] + end + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + source == o.source && + operator == o.operator && + value == o.value + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [source, operator, value].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/hook_options.rb b/lib/openapi_client/models/hook_options.rb new file mode 100644 index 0000000..b085cb2 --- /dev/null +++ b/lib/openapi_client/models/hook_options.rb @@ -0,0 +1,238 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + # A set of attributes allow control over the information that is included in the hook context. + class HookOptions + attr_accessor :risk_enabled + + attr_accessor :location_enabled + + attr_accessor :mfa_device_info_enabled + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'risk_enabled' => :'risk_enabled', + :'location_enabled' => :'location_enabled', + :'mfa_device_info_enabled' => :'mfa_device_info_enabled' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'risk_enabled' => :'Boolean', + :'location_enabled' => :'Boolean', + :'mfa_device_info_enabled' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::HookOptions` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::HookOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'risk_enabled') + self.risk_enabled = attributes[:'risk_enabled'] + end + + if attributes.key?(:'location_enabled') + self.location_enabled = attributes[:'location_enabled'] + end + + if attributes.key?(:'mfa_device_info_enabled') + self.mfa_device_info_enabled = attributes[:'mfa_device_info_enabled'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + risk_enabled == o.risk_enabled && + location_enabled == o.location_enabled && + mfa_device_info_enabled == o.mfa_device_info_enabled + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [risk_enabled, location_enabled, mfa_device_info_enabled].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/hook_status.rb b/lib/openapi_client/models/hook_status.rb new file mode 100644 index 0000000..4b968c5 --- /dev/null +++ b/lib/openapi_client/models/hook_status.rb @@ -0,0 +1,228 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class HookStatus + attr_accessor :name + + attr_accessor :message + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'message' => :'message' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'name' => :'String', + :'message' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::HookStatus` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::HookStatus`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + message == o.message + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [name, message].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/id.rb b/lib/openapi_client/models/id.rb new file mode 100644 index 0000000..8e3c791 --- /dev/null +++ b/lib/openapi_client/models/id.rb @@ -0,0 +1,219 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class Id + attr_accessor :id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::Id` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::Id`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/list_access_token_claims200_response_inner.rb b/lib/openapi_client/models/list_access_token_claims200_response_inner.rb new file mode 100644 index 0000000..264ff16 --- /dev/null +++ b/lib/openapi_client/models/list_access_token_claims200_response_inner.rb @@ -0,0 +1,293 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class ListAccessTokenClaims200ResponseInner + attr_accessor :id + + attr_accessor :label + + attr_accessor :user_attribute_mappings + + attr_accessor :user_attribute_macros + + attr_accessor :attributes_transformations + + attr_accessor :skip_if_blank + + attr_accessor :values + + attr_accessor :default_values + + attr_accessor :provisioned_entitlements + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'label' => :'label', + :'user_attribute_mappings' => :'user_attribute_mappings', + :'user_attribute_macros' => :'user_attribute_macros', + :'attributes_transformations' => :'attributes_transformations', + :'skip_if_blank' => :'skip_if_blank', + :'values' => :'values', + :'default_values' => :'default_values', + :'provisioned_entitlements' => :'provisioned_entitlements' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'Integer', + :'label' => :'String', + :'user_attribute_mappings' => :'String', + :'user_attribute_macros' => :'String', + :'attributes_transformations' => :'String', + :'skip_if_blank' => :'Boolean', + :'values' => :'Array', + :'default_values' => :'String', + :'provisioned_entitlements' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::ListAccessTokenClaims200ResponseInner` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::ListAccessTokenClaims200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'label') + self.label = attributes[:'label'] + end + + if attributes.key?(:'user_attribute_mappings') + self.user_attribute_mappings = attributes[:'user_attribute_mappings'] + end + + if attributes.key?(:'user_attribute_macros') + self.user_attribute_macros = attributes[:'user_attribute_macros'] + end + + if attributes.key?(:'attributes_transformations') + self.attributes_transformations = attributes[:'attributes_transformations'] + end + + if attributes.key?(:'skip_if_blank') + self.skip_if_blank = attributes[:'skip_if_blank'] + end + + if attributes.key?(:'values') + if (value = attributes[:'values']).is_a?(Array) + self.values = value + end + end + + if attributes.key?(:'default_values') + self.default_values = attributes[:'default_values'] + end + + if attributes.key?(:'provisioned_entitlements') + self.provisioned_entitlements = attributes[:'provisioned_entitlements'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + label == o.label && + user_attribute_mappings == o.user_attribute_mappings && + user_attribute_macros == o.user_attribute_macros && + attributes_transformations == o.attributes_transformations && + skip_if_blank == o.skip_if_blank && + values == o.values && + default_values == o.default_values && + provisioned_entitlements == o.provisioned_entitlements + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, label, user_attribute_mappings, user_attribute_macros, attributes_transformations, skip_if_blank, values, default_values, provisioned_entitlements].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/list_actions200_response_inner.rb b/lib/openapi_client/models/list_actions200_response_inner.rb new file mode 100644 index 0000000..b991d67 --- /dev/null +++ b/lib/openapi_client/models/list_actions200_response_inner.rb @@ -0,0 +1,230 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class ListActions200ResponseInner + # The name of the Action. + attr_accessor :name + + # The unique identifier of the action. This should be used when defining actions for a User Mapping. + attr_accessor :value + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'value' => :'value' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'name' => :'String', + :'value' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::ListActions200ResponseInner` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::ListActions200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + value == o.value + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [name, value].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/list_app_users200_response_inner.rb b/lib/openapi_client/models/list_app_users200_response_inner.rb new file mode 100644 index 0000000..bd6c4e3 --- /dev/null +++ b/lib/openapi_client/models/list_app_users200_response_inner.rb @@ -0,0 +1,255 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class ListAppUsers200ResponseInner + attr_accessor :firstname + + attr_accessor :id + + attr_accessor :email + + attr_accessor :lastname + + attr_accessor :username + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'firstname' => :'firstname', + :'id' => :'id', + :'email' => :'email', + :'lastname' => :'lastname', + :'username' => :'username' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'firstname' => :'String', + :'id' => :'Integer', + :'email' => :'String', + :'lastname' => :'String', + :'username' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::ListAppUsers200ResponseInner` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::ListAppUsers200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'firstname') + self.firstname = attributes[:'firstname'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'email') + self.email = attributes[:'email'] + end + + if attributes.key?(:'lastname') + self.lastname = attributes[:'lastname'] + end + + if attributes.key?(:'username') + self.username = attributes[:'username'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + firstname == o.firstname && + id == o.id && + email == o.email && + lastname == o.lastname && + username == o.username + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [firstname, id, email, lastname, username].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/list_authorization_servers200_response_inner.rb b/lib/openapi_client/models/list_authorization_servers200_response_inner.rb new file mode 100644 index 0000000..24c917d --- /dev/null +++ b/lib/openapi_client/models/list_authorization_servers200_response_inner.rb @@ -0,0 +1,246 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class ListAuthorizationServers200ResponseInner + attr_accessor :id + + attr_accessor :name + + attr_accessor :configuration + + attr_accessor :description + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'name' => :'name', + :'configuration' => :'configuration', + :'description' => :'description' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'Integer', + :'name' => :'String', + :'configuration' => :'ListAuthorizationServers200ResponseInnerConfiguration', + :'description' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::ListAuthorizationServers200ResponseInner` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::ListAuthorizationServers200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'configuration') + self.configuration = attributes[:'configuration'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + name == o.name && + configuration == o.configuration && + description == o.description + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, name, configuration, description].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/list_authorization_servers200_response_inner_configuration.rb b/lib/openapi_client/models/list_authorization_servers200_response_inner_configuration.rb new file mode 100644 index 0000000..30a10da --- /dev/null +++ b/lib/openapi_client/models/list_authorization_servers200_response_inner_configuration.rb @@ -0,0 +1,230 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class ListAuthorizationServers200ResponseInnerConfiguration + attr_accessor :resource_identifier + + attr_accessor :audiences + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'resource_identifier' => :'resource_identifier', + :'audiences' => :'audiences' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'resource_identifier' => :'String', + :'audiences' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::ListAuthorizationServers200ResponseInnerConfiguration` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::ListAuthorizationServers200ResponseInnerConfiguration`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'resource_identifier') + self.resource_identifier = attributes[:'resource_identifier'] + end + + if attributes.key?(:'audiences') + if (value = attributes[:'audiences']).is_a?(Array) + self.audiences = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + resource_identifier == o.resource_identifier && + audiences == o.audiences + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [resource_identifier, audiences].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/list_condition_operators200_response_inner.rb b/lib/openapi_client/models/list_condition_operators200_response_inner.rb new file mode 100644 index 0000000..42a3981 --- /dev/null +++ b/lib/openapi_client/models/list_condition_operators200_response_inner.rb @@ -0,0 +1,230 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class ListConditionOperators200ResponseInner + # The name or description of the operator. + attr_accessor :name + + # The condition operator value to use when creating or updating App Rules. + attr_accessor :value + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'value' => :'value' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'name' => :'String', + :'value' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::ListConditionOperators200ResponseInner` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::ListConditionOperators200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + value == o.value + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [name, value].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/list_condition_values200_response_inner.rb b/lib/openapi_client/models/list_condition_values200_response_inner.rb new file mode 100644 index 0000000..f4586f4 --- /dev/null +++ b/lib/openapi_client/models/list_condition_values200_response_inner.rb @@ -0,0 +1,228 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class ListConditionValues200ResponseInner + attr_accessor :name + + attr_accessor :value + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'value' => :'value' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'name' => :'String', + :'value' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::ListConditionValues200ResponseInner` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::ListConditionValues200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + value == o.value + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [name, value].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/list_conditions200_response_inner.rb b/lib/openapi_client/models/list_conditions200_response_inner.rb new file mode 100644 index 0000000..69e1e92 --- /dev/null +++ b/lib/openapi_client/models/list_conditions200_response_inner.rb @@ -0,0 +1,230 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class ListConditions200ResponseInner + # The name of the Condition. + attr_accessor :name + + # The unique identifier of the condition. This should be used when defining conditions for a rule. + attr_accessor :value + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'value' => :'value' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'name' => :'String', + :'value' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::ListConditions200ResponseInner` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::ListConditions200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + value == o.value + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [name, value].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/list_mapping_condition_operators200_response_inner.rb b/lib/openapi_client/models/list_mapping_condition_operators200_response_inner.rb new file mode 100644 index 0000000..5c54be3 --- /dev/null +++ b/lib/openapi_client/models/list_mapping_condition_operators200_response_inner.rb @@ -0,0 +1,230 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class ListMappingConditionOperators200ResponseInner + # The name or description of the operator. + attr_accessor :name + + # The condition operator value to use when creating or updating User Mappings. + attr_accessor :value + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'value' => :'value' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'name' => :'String', + :'value' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::ListMappingConditionOperators200ResponseInner` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::ListMappingConditionOperators200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + value == o.value + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [name, value].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/list_mapping_conditions200_response_inner.rb b/lib/openapi_client/models/list_mapping_conditions200_response_inner.rb new file mode 100644 index 0000000..885d87f --- /dev/null +++ b/lib/openapi_client/models/list_mapping_conditions200_response_inner.rb @@ -0,0 +1,230 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class ListMappingConditions200ResponseInner + # The name of the Condition. + attr_accessor :name + + # The unique identifier of the condition. This should be used when defining conditions for a User Mapping. + attr_accessor :value + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'value' => :'value' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'name' => :'String', + :'value' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::ListMappingConditions200ResponseInner` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::ListMappingConditions200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + value == o.value + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [name, value].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/list_scopes200_response_inner.rb b/lib/openapi_client/models/list_scopes200_response_inner.rb new file mode 100644 index 0000000..24ea3c4 --- /dev/null +++ b/lib/openapi_client/models/list_scopes200_response_inner.rb @@ -0,0 +1,237 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class ListScopes200ResponseInner + attr_accessor :id + + attr_accessor :value + + attr_accessor :description + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'value' => :'value', + :'description' => :'description' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'Integer', + :'value' => :'String', + :'description' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::ListScopes200ResponseInner` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::ListScopes200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + value == o.value && + description == o.description + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, value, description].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/log.rb b/lib/openapi_client/models/log.rb new file mode 100644 index 0000000..2a1d4ee --- /dev/null +++ b/lib/openapi_client/models/log.rb @@ -0,0 +1,248 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class Log + attr_accessor :request_id + + attr_accessor :correlation_id + + attr_accessor :created_at + + attr_accessor :events + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'request_id' => :'request_id', + :'correlation_id' => :'correlation_id', + :'created_at' => :'created_at', + :'events' => :'events' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'request_id' => :'String', + :'correlation_id' => :'String', + :'created_at' => :'String', + :'events' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::Log` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::Log`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'request_id') + self.request_id = attributes[:'request_id'] + end + + if attributes.key?(:'correlation_id') + self.correlation_id = attributes[:'correlation_id'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'events') + if (value = attributes[:'events']).is_a?(Array) + self.events = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + request_id == o.request_id && + correlation_id == o.correlation_id && + created_at == o.created_at && + events == o.events + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [request_id, correlation_id, created_at, events].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/mapping.rb b/lib/openapi_client/models/mapping.rb new file mode 100644 index 0000000..d1445cd --- /dev/null +++ b/lib/openapi_client/models/mapping.rb @@ -0,0 +1,342 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class Mapping + attr_accessor :id + + # The name of the mapping. + attr_accessor :name + + # Indicates if the mapping is enabled or not. + attr_accessor :enabled + + # Indicates how conditions should be matched. + attr_accessor :match + + # Indicates the order of the mapping. When `null` this will default to last position. + attr_accessor :position + + # An array of conditions that the user must meet in order for the mapping to be applied. + attr_accessor :conditions + + # An array of actions that will be applied to the users that are matched by the conditions. + attr_accessor :actions + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'name' => :'name', + :'enabled' => :'enabled', + :'match' => :'match', + :'position' => :'position', + :'conditions' => :'conditions', + :'actions' => :'actions' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'Integer', + :'name' => :'String', + :'enabled' => :'Boolean', + :'match' => :'String', + :'position' => :'Integer', + :'conditions' => :'Array', + :'actions' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::Mapping` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::Mapping`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'match') + self.match = attributes[:'match'] + end + + if attributes.key?(:'position') + self.position = attributes[:'position'] + end + + if attributes.key?(:'conditions') + if (value = attributes[:'conditions']).is_a?(Array) + self.conditions = value + end + end + + if attributes.key?(:'actions') + if (value = attributes[:'actions']).is_a?(Array) + self.actions = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @enabled.nil? + invalid_properties.push('invalid value for "enabled", enabled cannot be nil.') + end + + if @match.nil? + invalid_properties.push('invalid value for "match", match cannot be nil.') + end + + if @position.nil? + invalid_properties.push('invalid value for "position", position cannot be nil.') + end + + if @actions.nil? + invalid_properties.push('invalid value for "actions", actions cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @name.nil? + return false if @enabled.nil? + return false if @match.nil? + match_validator = EnumAttributeValidator.new('String', ["all", "any"]) + return false unless match_validator.valid?(@match) + return false if @position.nil? + return false if @actions.nil? + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] match Object to be assigned + def match=(match) + validator = EnumAttributeValidator.new('String', ["all", "any"]) + unless validator.valid?(match) + fail ArgumentError, "invalid value for \"match\", must be one of #{validator.allowable_values}." + end + @match = match + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + name == o.name && + enabled == o.enabled && + match == o.match && + position == o.position && + conditions == o.conditions && + actions == o.actions + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, name, enabled, match, position, conditions, actions].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/registration.rb b/lib/openapi_client/models/registration.rb new file mode 100644 index 0000000..5e81a52 --- /dev/null +++ b/lib/openapi_client/models/registration.rb @@ -0,0 +1,274 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class Registration + # Registration identifier. + attr_accessor :id + + # pending registration has not been completed successfully. accepted registration has successfully completed. + attr_accessor :status + + # Device id to be used with Verify the Factor. + attr_accessor :device_id + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'status' => :'status', + :'device_id' => :'device_id' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'status' => :'String', + :'device_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::Registration` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::Registration`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'device_id') + self.device_id = attributes[:'device_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + status_validator = EnumAttributeValidator.new('String', ["pending", "accepted"]) + return false unless status_validator.valid?(@status) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] status Object to be assigned + def status=(status) + validator = EnumAttributeValidator.new('String', ["pending", "accepted"]) + unless validator.valid?(status) + fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}." + end + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + status == o.status && + device_id == o.device_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, status, device_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/remove_role_users_request.rb b/lib/openapi_client/models/remove_role_users_request.rb new file mode 100644 index 0000000..6809326 --- /dev/null +++ b/lib/openapi_client/models/remove_role_users_request.rb @@ -0,0 +1,221 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class RemoveRoleUsersRequest + attr_accessor :user_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'user_id' => :'user_id' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'user_id' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::RemoveRoleUsersRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::RemoveRoleUsersRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'user_id') + if (value = attributes[:'user_id']).is_a?(Array) + self.user_id = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + user_id == o.user_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [user_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/revoke_token_request.rb b/lib/openapi_client/models/revoke_token_request.rb new file mode 100644 index 0000000..f0b781f --- /dev/null +++ b/lib/openapi_client/models/revoke_token_request.rb @@ -0,0 +1,219 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class RevokeTokenRequest + attr_accessor :access_token + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'access_token' => :'access_token' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'access_token' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::RevokeTokenRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::RevokeTokenRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'access_token') + self.access_token = attributes[:'access_token'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + access_token == o.access_token + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [access_token].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/risk_device.rb b/lib/openapi_client/models/risk_device.rb new file mode 100644 index 0000000..008e399 --- /dev/null +++ b/lib/openapi_client/models/risk_device.rb @@ -0,0 +1,221 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + # Information about the device being used. + class RiskDevice + # This device's unique identifier + attr_accessor :id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::RiskDevice` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::RiskDevice`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/risk_rule.rb b/lib/openapi_client/models/risk_rule.rb new file mode 100644 index 0000000..aaaeda5 --- /dev/null +++ b/lib/openapi_client/models/risk_rule.rb @@ -0,0 +1,325 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class RiskRule + attr_accessor :id + + # The name of this rule + attr_accessor :name + + attr_accessor :description + + # The type parameter specifies the type of rule that will be created. + attr_accessor :type + + # The target parameter that will be used when evaluating the rule against an incoming event. + attr_accessor :target + + # A list of IP addresses or country codes or names to evaluate against each event. + attr_accessor :filters + + attr_accessor :source + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'name' => :'name', + :'description' => :'description', + :'type' => :'type', + :'target' => :'target', + :'filters' => :'filters', + :'source' => :'source' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'name' => :'String', + :'description' => :'String', + :'type' => :'String', + :'target' => :'String', + :'filters' => :'Array', + :'source' => :'Source' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::RiskRule` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::RiskRule`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'target') + self.target = attributes[:'target'] + end + + if attributes.key?(:'filters') + if (value = attributes[:'filters']).is_a?(Array) + self.filters = value + end + end + + if attributes.key?(:'source') + self.source = attributes[:'source'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + type_validator = EnumAttributeValidator.new('String', ["blacklist", "whitelist"]) + return false unless type_validator.valid?(@type) + target_validator = EnumAttributeValidator.new('String', ["location.ip", "location.address.country_iso_code"]) + return false unless target_validator.valid?(@target) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] type Object to be assigned + def type=(type) + validator = EnumAttributeValidator.new('String', ["blacklist", "whitelist"]) + unless validator.valid?(type) + fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." + end + @type = type + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] target Object to be assigned + def target=(target) + validator = EnumAttributeValidator.new('String', ["location.ip", "location.address.country_iso_code"]) + unless validator.valid?(target) + fail ArgumentError, "invalid value for \"target\", must be one of #{validator.allowable_values}." + end + @target = target + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + name == o.name && + description == o.description && + type == o.type && + target == o.target && + filters == o.filters && + source == o.source + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, name, description, type, target, filters, source].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/risk_user.rb b/lib/openapi_client/models/risk_user.rb new file mode 100644 index 0000000..0cf8055 --- /dev/null +++ b/lib/openapi_client/models/risk_user.rb @@ -0,0 +1,248 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + # An Object containing User details. + class RiskUser + # A unique identifier for the user. + attr_accessor :id + + # A name for the user. + attr_accessor :name + + # Indicates if the metadata supplied in this event should be considered as trusted for the user. + attr_accessor :authenticated + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'name' => :'name', + :'authenticated' => :'authenticated' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'name' => :'String', + :'authenticated' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::RiskUser` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::RiskUser`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'authenticated') + self.authenticated = attributes[:'authenticated'] + else + self.authenticated = false + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + name == o.name && + authenticated == o.authenticated + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, name, authenticated].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/role.rb b/lib/openapi_client/models/role.rb new file mode 100644 index 0000000..a18fc3b --- /dev/null +++ b/lib/openapi_client/models/role.rb @@ -0,0 +1,266 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class Role + attr_accessor :id + + attr_accessor :name + + attr_accessor :apps + + attr_accessor :users + + attr_accessor :admins + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'name' => :'name', + :'apps' => :'apps', + :'users' => :'users', + :'admins' => :'admins' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'Integer', + :'name' => :'String', + :'apps' => :'Array', + :'users' => :'Array', + :'admins' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::Role` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::Role`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'apps') + if (value = attributes[:'apps']).is_a?(Array) + self.apps = value + end + end + + if attributes.key?(:'users') + if (value = attributes[:'users']).is_a?(Array) + self.users = value + end + end + + if attributes.key?(:'admins') + if (value = attributes[:'admins']).is_a?(Array) + self.admins = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @name.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + name == o.name && + apps == o.apps && + users == o.users && + admins == o.admins + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, name, apps, users, admins].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/rule.rb b/lib/openapi_client/models/rule.rb new file mode 100644 index 0000000..838a736 --- /dev/null +++ b/lib/openapi_client/models/rule.rb @@ -0,0 +1,317 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class Rule + attr_accessor :id + + # The name of the rule. + attr_accessor :name + + # Indicates how conditions should be matched. + attr_accessor :match + + # Indicates if the rule is enabled or not. + attr_accessor :enabled + + # Indicates the order of the rule. When `null` this will default to last position. + attr_accessor :position + + # An array of conditions that the user must meet in order for the rule to be applied. + attr_accessor :conditions + + # An array of actions that will be applied to the users that are matched by the conditions. + attr_accessor :actions + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'name' => :'name', + :'match' => :'match', + :'enabled' => :'enabled', + :'position' => :'position', + :'conditions' => :'conditions', + :'actions' => :'actions' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'Integer', + :'name' => :'String', + :'match' => :'String', + :'enabled' => :'Boolean', + :'position' => :'Integer', + :'conditions' => :'Array', + :'actions' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::Rule` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::Rule`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'match') + self.match = attributes[:'match'] + end + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'position') + self.position = attributes[:'position'] + end + + if attributes.key?(:'conditions') + if (value = attributes[:'conditions']).is_a?(Array) + self.conditions = value + end + end + + if attributes.key?(:'actions') + if (value = attributes[:'actions']).is_a?(Array) + self.actions = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + match_validator = EnumAttributeValidator.new('String', ["all", "any"]) + return false unless match_validator.valid?(@match) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] match Object to be assigned + def match=(match) + validator = EnumAttributeValidator.new('String', ["all", "any"]) + unless validator.valid?(match) + fail ArgumentError, "invalid value for \"match\", must be one of #{validator.allowable_values}." + end + @match = match + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + name == o.name && + match == o.match && + enabled == o.enabled && + position == o.position && + conditions == o.conditions && + actions == o.actions + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, name, match, enabled, position, conditions, actions].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/rule_id.rb b/lib/openapi_client/models/rule_id.rb new file mode 100644 index 0000000..891517f --- /dev/null +++ b/lib/openapi_client/models/rule_id.rb @@ -0,0 +1,219 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class RuleId + attr_accessor :id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::RuleId` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::RuleId`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/schema.rb b/lib/openapi_client/models/schema.rb new file mode 100644 index 0000000..0fb4eae --- /dev/null +++ b/lib/openapi_client/models/schema.rb @@ -0,0 +1,441 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class Schema + # Apps unique ID in OneLogin. + attr_accessor :id + + # ID of the apps underlying connector. + attr_accessor :connector_id + + # App name. + attr_accessor :name + + # Freeform description of the app. + attr_accessor :description + + # Freeform notes about the app. + attr_accessor :notes + + # The security policy assigned to the app. + attr_accessor :policy_id + + # The custom login page branding to use for this app. Applies to app initiated logins via OIDC or SAML. + attr_accessor :brand_id + + # A link to the apps icon url. + attr_accessor :icon_url + + # Indicates if the app is visible in the OneLogin portal. + attr_accessor :visible + + # An ID indicating the type of app. + attr_accessor :auth_method + + # ID of the OneLogin portal tab that the app is assigned to. + attr_accessor :tab_id + + # The date the app was created. + attr_accessor :created_at + + # The date the app was last updated. + attr_accessor :updated_at + + # List of Role IDs that are assigned to the app. On App Create or Update the entire array is replaced with the values provided. + attr_accessor :role_ids + + # Indicates whether or not administrators can access the app as a user that they have assumed control over. + attr_accessor :allow_assumed_signin + + attr_accessor :provisioning + + attr_accessor :sso + + attr_accessor :configuration + + attr_accessor :parameters + + attr_accessor :enforcement_point + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'connector_id' => :'connector_id', + :'name' => :'name', + :'description' => :'description', + :'notes' => :'notes', + :'policy_id' => :'policy_id', + :'brand_id' => :'brand_id', + :'icon_url' => :'icon_url', + :'visible' => :'visible', + :'auth_method' => :'auth_method', + :'tab_id' => :'tab_id', + :'created_at' => :'created_at', + :'updated_at' => :'updated_at', + :'role_ids' => :'role_ids', + :'allow_assumed_signin' => :'allow_assumed_signin', + :'provisioning' => :'provisioning', + :'sso' => :'sso', + :'configuration' => :'configuration', + :'parameters' => :'parameters', + :'enforcement_point' => :'enforcement_point' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'Integer', + :'connector_id' => :'Integer', + :'name' => :'String', + :'description' => :'String', + :'notes' => :'String', + :'policy_id' => :'Integer', + :'brand_id' => :'Integer', + :'icon_url' => :'String', + :'visible' => :'Boolean', + :'auth_method' => :'Integer', + :'tab_id' => :'Integer', + :'created_at' => :'String', + :'updated_at' => :'String', + :'role_ids' => :'Array', + :'allow_assumed_signin' => :'Boolean', + :'provisioning' => :'SchemaProvisioning', + :'sso' => :'Object', + :'configuration' => :'Object', + :'parameters' => :'Object', + :'enforcement_point' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::Schema` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::Schema`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'connector_id') + self.connector_id = attributes[:'connector_id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'notes') + self.notes = attributes[:'notes'] + end + + if attributes.key?(:'policy_id') + self.policy_id = attributes[:'policy_id'] + end + + if attributes.key?(:'brand_id') + self.brand_id = attributes[:'brand_id'] + end + + if attributes.key?(:'icon_url') + self.icon_url = attributes[:'icon_url'] + end + + if attributes.key?(:'visible') + self.visible = attributes[:'visible'] + end + + if attributes.key?(:'auth_method') + self.auth_method = attributes[:'auth_method'] + end + + if attributes.key?(:'tab_id') + self.tab_id = attributes[:'tab_id'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + end + + if attributes.key?(:'role_ids') + if (value = attributes[:'role_ids']).is_a?(Array) + self.role_ids = value + end + end + + if attributes.key?(:'allow_assumed_signin') + self.allow_assumed_signin = attributes[:'allow_assumed_signin'] + end + + if attributes.key?(:'provisioning') + self.provisioning = attributes[:'provisioning'] + end + + if attributes.key?(:'sso') + self.sso = attributes[:'sso'] + end + + if attributes.key?(:'configuration') + self.configuration = attributes[:'configuration'] + end + + if attributes.key?(:'parameters') + self.parameters = attributes[:'parameters'] + end + + if attributes.key?(:'enforcement_point') + self.enforcement_point = attributes[:'enforcement_point'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + auth_method_validator = EnumAttributeValidator.new('Integer', [0, 1, 2, 3, 4, 6, 7, 8]) + return false unless auth_method_validator.valid?(@auth_method) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] auth_method Object to be assigned + def auth_method=(auth_method) + validator = EnumAttributeValidator.new('Integer', [0, 1, 2, 3, 4, 6, 7, 8]) + unless validator.valid?(auth_method) + fail ArgumentError, "invalid value for \"auth_method\", must be one of #{validator.allowable_values}." + end + @auth_method = auth_method + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + connector_id == o.connector_id && + name == o.name && + description == o.description && + notes == o.notes && + policy_id == o.policy_id && + brand_id == o.brand_id && + icon_url == o.icon_url && + visible == o.visible && + auth_method == o.auth_method && + tab_id == o.tab_id && + created_at == o.created_at && + updated_at == o.updated_at && + role_ids == o.role_ids && + allow_assumed_signin == o.allow_assumed_signin && + provisioning == o.provisioning && + sso == o.sso && + configuration == o.configuration && + parameters == o.parameters && + enforcement_point == o.enforcement_point + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, connector_id, name, description, notes, policy_id, brand_id, icon_url, visible, auth_method, tab_id, created_at, updated_at, role_ids, allow_assumed_signin, provisioning, sso, configuration, parameters, enforcement_point].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/schema1.rb b/lib/openapi_client/models/schema1.rb new file mode 100644 index 0000000..bdc3f0b --- /dev/null +++ b/lib/openapi_client/models/schema1.rb @@ -0,0 +1,265 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class Schema1 + attr_accessor :id + + attr_accessor :name + + attr_accessor :username + + attr_accessor :added_by + + attr_accessor :added_at + + # Indicates if assigned to role or not. Defaults to true. + attr_accessor :assigned + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'name' => :'name', + :'username' => :'username', + :'added_by' => :'added_by', + :'added_at' => :'added_at', + :'assigned' => :'assigned' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'Integer', + :'name' => :'String', + :'username' => :'String', + :'added_by' => :'Schema1AddedBy', + :'added_at' => :'String', + :'assigned' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::Schema1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::Schema1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'username') + self.username = attributes[:'username'] + end + + if attributes.key?(:'added_by') + self.added_by = attributes[:'added_by'] + end + + if attributes.key?(:'added_at') + self.added_at = attributes[:'added_at'] + end + + if attributes.key?(:'assigned') + self.assigned = attributes[:'assigned'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + name == o.name && + username == o.username && + added_by == o.added_by && + added_at == o.added_at && + assigned == o.assigned + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, name, username, added_by, added_at, assigned].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/schema1_added_by.rb b/lib/openapi_client/models/schema1_added_by.rb new file mode 100644 index 0000000..02eb78a --- /dev/null +++ b/lib/openapi_client/models/schema1_added_by.rb @@ -0,0 +1,228 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class Schema1AddedBy + attr_accessor :id + + attr_accessor :name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'name' => :'name' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'Integer', + :'name' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::Schema1AddedBy` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::Schema1AddedBy`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + name == o.name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, name].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/schema_provisioning.rb b/lib/openapi_client/models/schema_provisioning.rb new file mode 100644 index 0000000..42586c4 --- /dev/null +++ b/lib/openapi_client/models/schema_provisioning.rb @@ -0,0 +1,220 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class SchemaProvisioning + # Indicates if provisioning is enabled for this app. + attr_accessor :enabled + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'enabled' => :'enabled' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'enabled' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::SchemaProvisioning` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::SchemaProvisioning`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + enabled == o.enabled + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [enabled].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/session.rb b/lib/openapi_client/models/session.rb new file mode 100644 index 0000000..787f1ff --- /dev/null +++ b/lib/openapi_client/models/session.rb @@ -0,0 +1,221 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + # A dictionary of extra information that provides useful context about the session, for example the session ID, or some cookie information. + class Session + # If you use a database to track sessions, you can send us the session ID. + attr_accessor :id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::Session` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::Session`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/set_role_apps200_response_inner.rb b/lib/openapi_client/models/set_role_apps200_response_inner.rb new file mode 100644 index 0000000..7c0bd1b --- /dev/null +++ b/lib/openapi_client/models/set_role_apps200_response_inner.rb @@ -0,0 +1,220 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class SetRoleApps200ResponseInner + # Apps unique ID in OneLogin. + attr_accessor :id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::SetRoleApps200ResponseInner` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::SetRoleApps200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/source.rb b/lib/openapi_client/models/source.rb new file mode 100644 index 0000000..6ac0e05 --- /dev/null +++ b/lib/openapi_client/models/source.rb @@ -0,0 +1,230 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + # Used for targeting custom rules based on a group of people, customers, accounts, or even a single user. + class Source + attr_accessor :id + + # The name of the source + attr_accessor :name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'name' => :'name' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'name' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::Source` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::Source`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + name == o.name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, name].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/status.rb b/lib/openapi_client/models/status.rb new file mode 100644 index 0000000..e4ef590 --- /dev/null +++ b/lib/openapi_client/models/status.rb @@ -0,0 +1,246 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class Status + attr_accessor :error + + attr_accessor :code + + attr_accessor :type + + attr_accessor :message + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'error' => :'error', + :'code' => :'code', + :'type' => :'type', + :'message' => :'message' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'error' => :'Boolean', + :'code' => :'Integer', + :'type' => :'String', + :'message' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::Status` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::Status`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'error') + self.error = attributes[:'error'] + end + + if attributes.key?(:'code') + self.code = attributes[:'code'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + error == o.error && + code == o.code && + type == o.type && + message == o.message + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [error, code, type, message].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/status1.rb b/lib/openapi_client/models/status1.rb new file mode 100644 index 0000000..30d8b82 --- /dev/null +++ b/lib/openapi_client/models/status1.rb @@ -0,0 +1,237 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class Status1 + attr_accessor :message + + attr_accessor :status_code + + attr_accessor :name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'message' => :'message', + :'status_code' => :'statusCode', + :'name' => :'name' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'message' => :'String', + :'status_code' => :'Integer', + :'name' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::Status1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::Status1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.key?(:'status_code') + self.status_code = attributes[:'status_code'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + message == o.message && + status_code == o.status_code && + name == o.name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [message, status_code, name].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/status2.rb b/lib/openapi_client/models/status2.rb new file mode 100644 index 0000000..ff61d38 --- /dev/null +++ b/lib/openapi_client/models/status2.rb @@ -0,0 +1,219 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class Status2 + attr_accessor :status + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'status' => :'status' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'status' => :'Status2Status' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::Status2` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::Status2`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/status2_status.rb b/lib/openapi_client/models/status2_status.rb new file mode 100644 index 0000000..c57bced --- /dev/null +++ b/lib/openapi_client/models/status2_status.rb @@ -0,0 +1,246 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class Status2Status + attr_accessor :type + + attr_accessor :code + + attr_accessor :message + + attr_accessor :error + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'code' => :'code', + :'message' => :'message', + :'error' => :'error' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'String', + :'code' => :'Integer', + :'message' => :'String', + :'error' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::Status2Status` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::Status2Status`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'code') + self.code = attributes[:'code'] + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.key?(:'error') + self.error = attributes[:'error'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type && + code == o.code && + message == o.message && + error == o.error + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [type, code, message, error].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/track_event_request.rb b/lib/openapi_client/models/track_event_request.rb new file mode 100644 index 0000000..2336a57 --- /dev/null +++ b/lib/openapi_client/models/track_event_request.rb @@ -0,0 +1,316 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class TrackEventRequest + # Verbs are used to distinguish between different types of events. + attr_accessor :verb + + # The IP address of the User's request. + attr_accessor :ip + + # The user agent of the User's request. + attr_accessor :user_agent + + attr_accessor :user + + attr_accessor :source + + attr_accessor :session + + attr_accessor :device + + # Set to the value of the __tdli_fp cookie. + attr_accessor :fp + + # Date and time of the event in IS08601 format. Useful for preloading old events. Defaults to date time this API request is received. + attr_accessor :published + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'verb' => :'verb', + :'ip' => :'ip', + :'user_agent' => :'user_agent', + :'user' => :'user', + :'source' => :'source', + :'session' => :'session', + :'device' => :'device', + :'fp' => :'fp', + :'published' => :'published' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'verb' => :'String', + :'ip' => :'String', + :'user_agent' => :'String', + :'user' => :'RiskUser', + :'source' => :'Source', + :'session' => :'Session', + :'device' => :'RiskDevice', + :'fp' => :'String', + :'published' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::TrackEventRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::TrackEventRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'verb') + self.verb = attributes[:'verb'] + end + + if attributes.key?(:'ip') + self.ip = attributes[:'ip'] + end + + if attributes.key?(:'user_agent') + self.user_agent = attributes[:'user_agent'] + end + + if attributes.key?(:'user') + self.user = attributes[:'user'] + end + + if attributes.key?(:'source') + self.source = attributes[:'source'] + end + + if attributes.key?(:'session') + self.session = attributes[:'session'] + end + + if attributes.key?(:'device') + self.device = attributes[:'device'] + end + + if attributes.key?(:'fp') + self.fp = attributes[:'fp'] + end + + if attributes.key?(:'published') + self.published = attributes[:'published'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @verb.nil? + invalid_properties.push('invalid value for "verb", verb cannot be nil.') + end + + if @ip.nil? + invalid_properties.push('invalid value for "ip", ip cannot be nil.') + end + + if @user_agent.nil? + invalid_properties.push('invalid value for "user_agent", user_agent cannot be nil.') + end + + if @user.nil? + invalid_properties.push('invalid value for "user", user cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @verb.nil? + return false if @ip.nil? + return false if @user_agent.nil? + return false if @user.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + verb == o.verb && + ip == o.ip && + user_agent == o.user_agent && + user == o.user && + source == o.source && + session == o.session && + device == o.device && + fp == o.fp && + published == o.published + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [verb, ip, user_agent, user, source, session, device, fp, published].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/update_authorization_server400_response.rb b/lib/openapi_client/models/update_authorization_server400_response.rb new file mode 100644 index 0000000..62b6b6e --- /dev/null +++ b/lib/openapi_client/models/update_authorization_server400_response.rb @@ -0,0 +1,246 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class UpdateAuthorizationServer400Response + attr_accessor :field + + attr_accessor :message + + attr_accessor :status_code + + attr_accessor :name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'field' => :'field', + :'message' => :'message', + :'status_code' => :'statusCode', + :'name' => :'name' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'field' => :'String', + :'message' => :'String', + :'status_code' => :'Integer', + :'name' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::UpdateAuthorizationServer400Response` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::UpdateAuthorizationServer400Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'field') + self.field = attributes[:'field'] + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.key?(:'status_code') + self.status_code = attributes[:'status_code'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + field == o.field && + message == o.message && + status_code == o.status_code && + name == o.name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [field, message, status_code, name].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/update_client_app_request.rb b/lib/openapi_client/models/update_client_app_request.rb new file mode 100644 index 0000000..e4b1bb6 --- /dev/null +++ b/lib/openapi_client/models/update_client_app_request.rb @@ -0,0 +1,221 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class UpdateClientAppRequest + attr_accessor :scopes + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'scopes' => :'scopes' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'scopes' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::UpdateClientAppRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::UpdateClientAppRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'scopes') + if (value = attributes[:'scopes']).is_a?(Array) + self.scopes = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + scopes == o.scopes + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [scopes].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/update_environment_variable_request.rb b/lib/openapi_client/models/update_environment_variable_request.rb new file mode 100644 index 0000000..be2c745 --- /dev/null +++ b/lib/openapi_client/models/update_environment_variable_request.rb @@ -0,0 +1,225 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class UpdateEnvironmentVariableRequest + # The secret value that will be encrypted at rest and injected in applicable hook functions at run time. + attr_accessor :value + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'value' => :'value' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'value' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::UpdateEnvironmentVariableRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::UpdateEnvironmentVariableRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @value.nil? + invalid_properties.push('invalid value for "value", value cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @value.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + value == o.value + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [value].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/update_role200_response.rb b/lib/openapi_client/models/update_role200_response.rb new file mode 100644 index 0000000..aa7c1ec --- /dev/null +++ b/lib/openapi_client/models/update_role200_response.rb @@ -0,0 +1,219 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class UpdateRole200Response + attr_accessor :id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::UpdateRole200Response` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::UpdateRole200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/user.rb b/lib/openapi_client/models/user.rb new file mode 100644 index 0000000..2b0bea2 --- /dev/null +++ b/lib/openapi_client/models/user.rb @@ -0,0 +1,615 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class User + attr_accessor :id + + # A username for the user. + attr_accessor :username + + # A valid email for the user. + attr_accessor :email + + # The user's first name. + attr_accessor :firstname + + # The user's last name. + attr_accessor :lastname + + # The user's job title. + attr_accessor :title + + # The user's department. + attr_accessor :department + + # The user's company. + attr_accessor :company + + # Free text related to the user. + attr_accessor :comment + + # The ID of the Group in OneLogin that the user is assigned to. + attr_accessor :group_id + + # A list of OneLogin Role IDs of the user + attr_accessor :role_ids + + # The E.164 format phone number for a user. + attr_accessor :phone + + attr_accessor :state + + attr_accessor :status + + # The ID of the OneLogin Directory of the user. + attr_accessor :directory_id + + # The ID of the OneLogin Trusted IDP of the user. + attr_accessor :trusted_idp_id + + # The ID of the user's manager in Active Directory. + attr_accessor :manager_ad_id + + # The OneLogin User ID for the user's manager. + attr_accessor :manager_user_id + + # The user's Active Directory username. + attr_accessor :samaccount_name + + # The user's directory membership. + attr_accessor :member_of + + # The principle name of the user. + attr_accessor :userprincipalname + + # The distinguished name of the user. + attr_accessor :distinguished_name + + # The ID of the user in an external directory. + attr_accessor :external_id + + attr_accessor :activated_at + + attr_accessor :last_login + + attr_accessor :invitation_sent_at + + attr_accessor :updated_at + + attr_accessor :preferred_locale_code + + attr_accessor :created_at + + attr_accessor :custom_attributes + + attr_accessor :invalid_login_attempts + + attr_accessor :locked_until + + attr_accessor :password_changed_at + + # The password to set for a user. + attr_accessor :password + + # Required if the password is being set. + attr_accessor :password_confirmation + + # Use this when importing a password that's already hashed. Prepend the salt value to the cleartext password value before SHA-256-encoding it + attr_accessor :password_algorithm + + # The salt value used with the password_algorithm. + attr_accessor :salt + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'username' => :'username', + :'email' => :'email', + :'firstname' => :'firstname', + :'lastname' => :'lastname', + :'title' => :'title', + :'department' => :'department', + :'company' => :'company', + :'comment' => :'comment', + :'group_id' => :'group_id', + :'role_ids' => :'role_ids', + :'phone' => :'phone', + :'state' => :'state', + :'status' => :'status', + :'directory_id' => :'directory_id', + :'trusted_idp_id' => :'trusted_idp_id', + :'manager_ad_id' => :'manager_ad_id', + :'manager_user_id' => :'manager_user_id', + :'samaccount_name' => :'samaccount_name', + :'member_of' => :'member_of', + :'userprincipalname' => :'userprincipalname', + :'distinguished_name' => :'distinguished_name', + :'external_id' => :'external_id', + :'activated_at' => :'activated_at', + :'last_login' => :'last_login', + :'invitation_sent_at' => :'invitation_sent_at', + :'updated_at' => :'updated_at', + :'preferred_locale_code' => :'preferred_locale_code', + :'created_at' => :'created_at', + :'custom_attributes' => :'custom_attributes', + :'invalid_login_attempts' => :'invalid_login_attempts', + :'locked_until' => :'locked_until', + :'password_changed_at' => :'password_changed_at', + :'password' => :'password', + :'password_confirmation' => :'password_confirmation', + :'password_algorithm' => :'password_algorithm', + :'salt' => :'salt' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'Integer', + :'username' => :'String', + :'email' => :'String', + :'firstname' => :'String', + :'lastname' => :'String', + :'title' => :'String', + :'department' => :'String', + :'company' => :'String', + :'comment' => :'String', + :'group_id' => :'Integer', + :'role_ids' => :'Array', + :'phone' => :'String', + :'state' => :'Integer', + :'status' => :'Integer', + :'directory_id' => :'Integer', + :'trusted_idp_id' => :'Integer', + :'manager_ad_id' => :'String', + :'manager_user_id' => :'String', + :'samaccount_name' => :'String', + :'member_of' => :'String', + :'userprincipalname' => :'String', + :'distinguished_name' => :'String', + :'external_id' => :'String', + :'activated_at' => :'String', + :'last_login' => :'String', + :'invitation_sent_at' => :'String', + :'updated_at' => :'String', + :'preferred_locale_code' => :'String', + :'created_at' => :'String', + :'custom_attributes' => :'Object', + :'invalid_login_attempts' => :'Integer', + :'locked_until' => :'String', + :'password_changed_at' => :'String', + :'password' => :'String', + :'password_confirmation' => :'String', + :'password_algorithm' => :'String', + :'salt' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::User` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::User`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'username') + self.username = attributes[:'username'] + end + + if attributes.key?(:'email') + self.email = attributes[:'email'] + end + + if attributes.key?(:'firstname') + self.firstname = attributes[:'firstname'] + end + + if attributes.key?(:'lastname') + self.lastname = attributes[:'lastname'] + end + + if attributes.key?(:'title') + self.title = attributes[:'title'] + end + + if attributes.key?(:'department') + self.department = attributes[:'department'] + end + + if attributes.key?(:'company') + self.company = attributes[:'company'] + end + + if attributes.key?(:'comment') + self.comment = attributes[:'comment'] + end + + if attributes.key?(:'group_id') + self.group_id = attributes[:'group_id'] + end + + if attributes.key?(:'role_ids') + if (value = attributes[:'role_ids']).is_a?(Array) + self.role_ids = value + end + end + + if attributes.key?(:'phone') + self.phone = attributes[:'phone'] + end + + if attributes.key?(:'state') + self.state = attributes[:'state'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'directory_id') + self.directory_id = attributes[:'directory_id'] + end + + if attributes.key?(:'trusted_idp_id') + self.trusted_idp_id = attributes[:'trusted_idp_id'] + end + + if attributes.key?(:'manager_ad_id') + self.manager_ad_id = attributes[:'manager_ad_id'] + end + + if attributes.key?(:'manager_user_id') + self.manager_user_id = attributes[:'manager_user_id'] + end + + if attributes.key?(:'samaccount_name') + self.samaccount_name = attributes[:'samaccount_name'] + end + + if attributes.key?(:'member_of') + self.member_of = attributes[:'member_of'] + end + + if attributes.key?(:'userprincipalname') + self.userprincipalname = attributes[:'userprincipalname'] + end + + if attributes.key?(:'distinguished_name') + self.distinguished_name = attributes[:'distinguished_name'] + end + + if attributes.key?(:'external_id') + self.external_id = attributes[:'external_id'] + end + + if attributes.key?(:'activated_at') + self.activated_at = attributes[:'activated_at'] + end + + if attributes.key?(:'last_login') + self.last_login = attributes[:'last_login'] + end + + if attributes.key?(:'invitation_sent_at') + self.invitation_sent_at = attributes[:'invitation_sent_at'] + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + end + + if attributes.key?(:'preferred_locale_code') + self.preferred_locale_code = attributes[:'preferred_locale_code'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'custom_attributes') + self.custom_attributes = attributes[:'custom_attributes'] + end + + if attributes.key?(:'invalid_login_attempts') + self.invalid_login_attempts = attributes[:'invalid_login_attempts'] + end + + if attributes.key?(:'locked_until') + self.locked_until = attributes[:'locked_until'] + end + + if attributes.key?(:'password_changed_at') + self.password_changed_at = attributes[:'password_changed_at'] + end + + if attributes.key?(:'password') + self.password = attributes[:'password'] + end + + if attributes.key?(:'password_confirmation') + self.password_confirmation = attributes[:'password_confirmation'] + end + + if attributes.key?(:'password_algorithm') + self.password_algorithm = attributes[:'password_algorithm'] + end + + if attributes.key?(:'salt') + self.salt = attributes[:'salt'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + state_validator = EnumAttributeValidator.new('Integer', [0, 1, 2, 3]) + return false unless state_validator.valid?(@state) + status_validator = EnumAttributeValidator.new('Integer', [0, 1, 2, 3, 4, 5, 7, 8]) + return false unless status_validator.valid?(@status) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] state Object to be assigned + def state=(state) + validator = EnumAttributeValidator.new('Integer', [0, 1, 2, 3]) + unless validator.valid?(state) + fail ArgumentError, "invalid value for \"state\", must be one of #{validator.allowable_values}." + end + @state = state + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] status Object to be assigned + def status=(status) + validator = EnumAttributeValidator.new('Integer', [0, 1, 2, 3, 4, 5, 7, 8]) + unless validator.valid?(status) + fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}." + end + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + username == o.username && + email == o.email && + firstname == o.firstname && + lastname == o.lastname && + title == o.title && + department == o.department && + company == o.company && + comment == o.comment && + group_id == o.group_id && + role_ids == o.role_ids && + phone == o.phone && + state == o.state && + status == o.status && + directory_id == o.directory_id && + trusted_idp_id == o.trusted_idp_id && + manager_ad_id == o.manager_ad_id && + manager_user_id == o.manager_user_id && + samaccount_name == o.samaccount_name && + member_of == o.member_of && + userprincipalname == o.userprincipalname && + distinguished_name == o.distinguished_name && + external_id == o.external_id && + activated_at == o.activated_at && + last_login == o.last_login && + invitation_sent_at == o.invitation_sent_at && + updated_at == o.updated_at && + preferred_locale_code == o.preferred_locale_code && + created_at == o.created_at && + custom_attributes == o.custom_attributes && + invalid_login_attempts == o.invalid_login_attempts && + locked_until == o.locked_until && + password_changed_at == o.password_changed_at && + password == o.password && + password_confirmation == o.password_confirmation && + password_algorithm == o.password_algorithm && + salt == o.salt + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, username, email, firstname, lastname, title, department, company, comment, group_id, role_ids, phone, state, status, directory_id, trusted_idp_id, manager_ad_id, manager_user_id, samaccount_name, member_of, userprincipalname, distinguished_name, external_id, activated_at, last_login, invitation_sent_at, updated_at, preferred_locale_code, created_at, custom_attributes, invalid_login_attempts, locked_until, password_changed_at, password, password_confirmation, password_algorithm, salt].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/verify_enrollment_request.rb b/lib/openapi_client/models/verify_enrollment_request.rb new file mode 100644 index 0000000..b857964 --- /dev/null +++ b/lib/openapi_client/models/verify_enrollment_request.rb @@ -0,0 +1,219 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class VerifyEnrollmentRequest + attr_accessor :otp + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'otp' => :'otp' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'otp' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::VerifyEnrollmentRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::VerifyEnrollmentRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'otp') + self.otp = attributes[:'otp'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + otp == o.otp + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [otp].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/verify_factor_request.rb b/lib/openapi_client/models/verify_factor_request.rb new file mode 100644 index 0000000..2d44acb --- /dev/null +++ b/lib/openapi_client/models/verify_factor_request.rb @@ -0,0 +1,230 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class VerifyFactorRequest + # OTP code provided by the device or SMS message sent to user. + attr_accessor :otp + + # ID of the specified device which has been registerd for the given user. + attr_accessor :device_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'otp' => :'otp', + :'device_id' => :'device_id' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'otp' => :'String', + :'device_id' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::VerifyFactorRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::VerifyFactorRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'otp') + self.otp = attributes[:'otp'] + end + + if attributes.key?(:'device_id') + self.device_id = attributes[:'device_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + otp == o.otp && + device_id == o.device_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [otp, device_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/verify_factor_saml200_response.rb b/lib/openapi_client/models/verify_factor_saml200_response.rb new file mode 100644 index 0000000..2be1b7f --- /dev/null +++ b/lib/openapi_client/models/verify_factor_saml200_response.rb @@ -0,0 +1,230 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class VerifyFactorSaml200Response + # Provides the SAML assertion. + attr_accessor :data + + # Plain text description describing the outcome of the response. + attr_accessor :message + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'data' => :'data', + :'message' => :'message' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'data' => :'String', + :'message' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::VerifyFactorSaml200Response` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::VerifyFactorSaml200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + message == o.message + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [data, message].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/verify_factor_saml_request.rb b/lib/openapi_client/models/verify_factor_saml_request.rb new file mode 100644 index 0000000..b2b7afb --- /dev/null +++ b/lib/openapi_client/models/verify_factor_saml_request.rb @@ -0,0 +1,275 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class VerifyFactorSamlRequest + # App ID of the app for which you want to generate a SAML token. This is the app ID in OneLogin. + attr_accessor :app_id + + # Provide the MFA device_id you are submitting for verification. The device_id is supplied by the Generate SAML Assertion API. + attr_accessor :device_id + + # state_token associated with the MFA device_id you are submitting. The state_token is supplied by the Generate SAML Assertion API. + attr_accessor :state_token + + # Provide the OTP value for the MFA factor you are submitting for verification. + attr_accessor :otp_token + + # When verifying MFA via Protect Push, set this to true to stop additional push notifications being sent to the OneLogin Protect device. + attr_accessor :do_not_notify + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'app_id' => :'app_id', + :'device_id' => :'device_id', + :'state_token' => :'state_token', + :'otp_token' => :'otp_token', + :'do_not_notify' => :'do_not_notify' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'app_id' => :'String', + :'device_id' => :'String', + :'state_token' => :'String', + :'otp_token' => :'String', + :'do_not_notify' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::VerifyFactorSamlRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::VerifyFactorSamlRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'app_id') + self.app_id = attributes[:'app_id'] + end + + if attributes.key?(:'device_id') + self.device_id = attributes[:'device_id'] + end + + if attributes.key?(:'state_token') + self.state_token = attributes[:'state_token'] + end + + if attributes.key?(:'otp_token') + self.otp_token = attributes[:'otp_token'] + end + + if attributes.key?(:'do_not_notify') + self.do_not_notify = attributes[:'do_not_notify'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @app_id.nil? + invalid_properties.push('invalid value for "app_id", app_id cannot be nil.') + end + + if @device_id.nil? + invalid_properties.push('invalid value for "device_id", device_id cannot be nil.') + end + + if @state_token.nil? + invalid_properties.push('invalid value for "state_token", state_token cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @app_id.nil? + return false if @device_id.nil? + return false if @state_token.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + app_id == o.app_id && + device_id == o.device_id && + state_token == o.state_token && + otp_token == o.otp_token && + do_not_notify == o.do_not_notify + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [app_id, device_id, state_token, otp_token, do_not_notify].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/models/verify_factor_voice200_response_inner.rb b/lib/openapi_client/models/verify_factor_voice200_response_inner.rb new file mode 100644 index 0000000..ac64bd6 --- /dev/null +++ b/lib/openapi_client/models/verify_factor_voice200_response_inner.rb @@ -0,0 +1,271 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OpenapiClient + class VerifyFactorVoice200ResponseInner + attr_accessor :id + + attr_accessor :status + + attr_accessor :device_id + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'status' => :'status', + :'device_id' => :'device_id' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'status' => :'String', + :'device_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::VerifyFactorVoice200ResponseInner` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::VerifyFactorVoice200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'device_id') + self.device_id = attributes[:'device_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + status_validator = EnumAttributeValidator.new('String', ["pending", "accepted", "rejected"]) + return false unless status_validator.valid?(@status) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] status Object to be assigned + def status=(status) + validator = EnumAttributeValidator.new('String', ["pending", "accepted", "rejected"]) + unless validator.valid?(status) + fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}." + end + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + status == o.status && + device_id == o.device_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, status, device_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/openapi_client/version.rb b/lib/openapi_client/version.rb new file mode 100644 index 0000000..70db7bd --- /dev/null +++ b/lib/openapi_client/version.rb @@ -0,0 +1,15 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +module OpenapiClient + VERSION = '1.0.0' +end diff --git a/openapi_client.gemspec b/openapi_client.gemspec new file mode 100644 index 0000000..4885f80 --- /dev/null +++ b/openapi_client.gemspec @@ -0,0 +1,38 @@ +# -*- encoding: utf-8 -*- + +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +$:.push File.expand_path("../lib", __FILE__) +require "openapi_client/version" + +Gem::Specification.new do |s| + s.name = "openapi_client" + s.version = OpenapiClient::VERSION + s.platform = Gem::Platform::RUBY + s.authors = ["OpenAPI-Generator"] + s.email = [""] + s.homepage = "https://openapi-generator.tech" + s.summary = "OneLogin API Ruby Gem" + s.description = "No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)" + s.license = "Unlicense" + s.required_ruby_version = ">= 2.4" + + s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1' + + s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0' + + s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? } + s.test_files = `find spec/*`.split("\n") + s.executables = [] + s.require_paths = ["lib"] +end diff --git a/spec/api/default_api_spec.rb b/spec/api/default_api_spec.rb new file mode 100644 index 0000000..d137dd0 --- /dev/null +++ b/spec/api/default_api_spec.rb @@ -0,0 +1,1259 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' + +# Unit tests for OpenapiClient::DefaultApi +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'DefaultApi' do + before do + # run before each test + @api_instance = OpenapiClient::DefaultApi.new + end + + after do + # run after each test + end + + describe 'test an instance of DefaultApi' do + it 'should create an instance of DefaultApi' do + expect(@api_instance).to be_instance_of(OpenapiClient::DefaultApi) + end + end + + # unit tests for activate_factor + # @param authorization + # @param user_id Set to the id of the user. + # @param activate_factor_request + # @param [Hash] opts the optional parameters + # @return [nil] + describe 'activate_factor test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for add_access_token_claim + # @param authorization + # @param id + # @param add_access_token_claim_request + # @param [Hash] opts the optional parameters + # @return [Id] + describe 'add_access_token_claim test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for add_client_app + # @param authorization + # @param id + # @param add_client_app_request + # @param [Hash] opts the optional parameters + # @return [ClientApp] + describe 'add_client_app test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for add_role_admins + # @param authorization + # @param role_id Set to the id of the role you want to return. + # @param request_body + # @param [Hash] opts the optional parameters + # @return [Array] + describe 'add_role_admins test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for add_role_users + # @param authorization + # @param role_id Set to the id of the role you want to return. + # @param request_body + # @param [Hash] opts the optional parameters + # @return [Array] + describe 'add_role_users test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for add_scope + # @param authorization + # @param id + # @param add_scope_request + # @param [Hash] opts the optional parameters + # @return [Id] + describe 'add_scope test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for bulk_mapping_sort + # @param authorization + # @param request_body The request body must contain an array of User Mapping IDs in the desired order. + # @param [Hash] opts the optional parameters + # @return [Array] + describe 'bulk_mapping_sort test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for bulk_sort + # @param authorization + # @param app_id + # @param request_body The request body must contain an array of App Rule IDs in the desired order. + # @param [Hash] opts the optional parameters + # @return [Array] + describe 'bulk_sort test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for create_app + # @param authorization + # @param schema + # @param [Hash] opts the optional parameters + # @return [Schema] + describe 'create_app test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for create_authorization_server + # @param authorization + # @param create_authorization_server_request + # @param [Hash] opts the optional parameters + # @return [Id] + describe 'create_authorization_server test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for create_environment_variable + # @param authorization + # @param create_environment_variable_request + # @param [Hash] opts the optional parameters + # @return [Envvar] + describe 'create_environment_variable test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for create_hook + # @param authorization + # @param hook + # @param [Hash] opts the optional parameters + # @return [nil] + describe 'create_hook test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for create_mapping + # @param authorization + # @param mapping + # @param [Hash] opts the optional parameters + # @return [Integer] + describe 'create_mapping test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for create_risk_rule + # @param authorization + # @param risk_rule + # @param [Hash] opts the optional parameters + # @return [nil] + describe 'create_risk_rule test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for create_roles + # @param authorization + # @param [Hash] opts the optional parameters + # @return [Array] + describe 'create_roles test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for create_rule + # @param authorization + # @param app_id + # @param rule + # @param [Hash] opts the optional parameters + # @return [RuleId] + describe 'create_rule test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for create_user + # @param authorization + # @param user + # @param [Hash] opts the optional parameters + # @option opts [String] :mappings Controls how mappings will be applied to the user on creation. Defaults to async. + # @option opts [Boolean] :validate_policy Will passwords validate against the User Policy? Defaults to true. + # @return [User] + describe 'create_user test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for delete_access_token_claim + # @param authorization + # @param id + # @param claim_id + # @param [Hash] opts the optional parameters + # @return [nil] + describe 'delete_access_token_claim test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for delete_app + # @param authorization + # @param app_id + # @param [Hash] opts the optional parameters + # @return [nil] + describe 'delete_app test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for delete_app_parameter + # @param authorization + # @param app_id + # @param parameter_id + # @param [Hash] opts the optional parameters + # @return [nil] + describe 'delete_app_parameter test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for delete_authorization_server + # @param authorization + # @param id + # @param [Hash] opts the optional parameters + # @return [nil] + describe 'delete_authorization_server test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for delete_environment_variable + # @param authorization + # @param envvar_id Set to the id of the Hook Environment Variable that you want to fetch. + # @param [Hash] opts the optional parameters + # @return [nil] + describe 'delete_environment_variable test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for delete_factor + # @param authorization + # @param user_id Set to the id of the user. + # @param device_id Set to the device_id of the MFA device. + # @param [Hash] opts the optional parameters + # @return [nil] + describe 'delete_factor test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for delete_hook + # @param authorization + # @param hook_id Set to the id of the Hook that you want to return. + # @param [Hash] opts the optional parameters + # @return [nil] + describe 'delete_hook test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for delete_mapping + # @param authorization + # @param mapping_id The id of the user mapping to locate. + # @param [Hash] opts the optional parameters + # @return [nil] + describe 'delete_mapping test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for delete_risk_rule + # @param authorization + # @param risk_rule_id + # @param [Hash] opts the optional parameters + # @return [RiskRule] + describe 'delete_risk_rule test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for delete_role + # @param authorization + # @param role_id Set to the id of the role you want to return. + # @param [Hash] opts the optional parameters + # @return [nil] + describe 'delete_role test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for delete_rule + # @param authorization + # @param app_id + # @param rule_id The id of the app rule to locate. + # @param [Hash] opts the optional parameters + # @return [nil] + describe 'delete_rule test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for delete_scope + # @param authorization + # @param id + # @param scope_id + # @param [Hash] opts the optional parameters + # @return [nil] + describe 'delete_scope test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for delete_user + # @param authorization + # @param user_id Set to the id of the user that you want to return. + # @param [Hash] opts the optional parameters + # @return [nil] + describe 'delete_user test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for dry_run_mapping + # @param authorization + # @param mapping_id The id of the user mapping to locate. + # @param request_body Request body is a list of user IDs tested against the mapping conditions to verify that the mapping would be applied + # @param [Hash] opts the optional parameters + # @return [Array] + describe 'dry_run_mapping test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for enroll_factor + # @param authorization + # @param user_id Set to the id of the user. + # @param enroll_factor_request + # @param [Hash] opts the optional parameters + # @return [Array] + describe 'enroll_factor test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for generate_mfa_token + # @param authorization + # @param generate_mfa_token_request + # @param [Hash] opts the optional parameters + # @return [GenerateMfaToken200Response] + describe 'generate_mfa_token test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for generate_saml_assertion + # @param authorization + # @param generate_saml_assertion_request + # @param [Hash] opts the optional parameters + # @return [nil] + describe 'generate_saml_assertion test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for generate_token + # @param authorization + # @param generate_token_request + # @param [Hash] opts the optional parameters + # @return [GenerateToken200Response] + describe 'generate_token test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for get_app + # @param authorization + # @param app_id + # @param [Hash] opts the optional parameters + # @return [Schema] + describe 'get_app test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for get_authorization_server + # @param authorization + # @param id + # @param [Hash] opts the optional parameters + # @return [GetAuthorizationServer200Response] + describe 'get_authorization_server test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for get_available_factors + # @param authorization + # @param user_id Set to the id of the user. + # @param [Hash] opts the optional parameters + # @return [Array] + describe 'get_available_factors test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for get_client_apps + # @param authorization + # @param id + # @param [Hash] opts the optional parameters + # @return [Array] + describe 'get_client_apps test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for get_enrolled_factors + # @param authorization + # @param user_id Set to the id of the user. + # @param [Hash] opts the optional parameters + # @return [Array] + describe 'get_enrolled_factors test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for get_environment_variable + # @param authorization + # @param envvar_id Set to the id of the Hook Environment Variable that you want to fetch. + # @param [Hash] opts the optional parameters + # @return [Envvar] + describe 'get_environment_variable test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for get_hook + # @param authorization + # @param hook_id Set to the id of the Hook that you want to return. + # @param [Hash] opts the optional parameters + # @return [Hook] + describe 'get_hook test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for get_logs + # @param authorization + # @param hook_id Set to the id of the Hook that you want to return. + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. + # @option opts [Integer] :page The page number of results to return. + # @option opts [String] :cursor Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. + # @option opts [String] :request_id Returns logs that contain this request_id. + # @option opts [String] :correlation_id Returns logs that contain this correlation_id. + # @return [Array] + describe 'get_logs test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for get_mapping + # @param authorization + # @param mapping_id The id of the user mapping to locate. + # @param [Hash] opts the optional parameters + # @return [Mapping] + describe 'get_mapping test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for get_rate_limit + # @param authorization + # @param [Hash] opts the optional parameters + # @return [GetRateLimit200Response] + describe 'get_rate_limit test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for get_risk_rule + # @param authorization + # @param risk_rule_id + # @param [Hash] opts the optional parameters + # @return [nil] + describe 'get_risk_rule test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for get_risk_score + # @param authorization + # @param get_risk_score_request + # @param [Hash] opts the optional parameters + # @return [GetRiskScore200Response] + describe 'get_risk_score test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for get_role + # @param authorization + # @param role_id Set to the id of the role you want to return. + # @param [Hash] opts the optional parameters + # @return [Role] + describe 'get_role test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for get_role_admins + # @param authorization + # @param role_id Set to the id of the role you want to return. + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. + # @option opts [Integer] :page The page number of results to return. + # @option opts [String] :cursor Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. + # @option opts [String] :name Allows you to filter on first name, last name, username, and email address. + # @option opts [Boolean] :include_unassigned Optional. Defaults to false. Include users that aren’t assigned to the role. + # @return [Array] + describe 'get_role_admins test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for get_role_apps + # @param authorization + # @param role_id Set to the id of the role you want to return. + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. + # @option opts [Integer] :page The page number of results to return. + # @option opts [String] :cursor Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. + # @option opts [Boolean] :assigned Optional. Defaults to true. Returns all apps not yet assigned to the role. + # @return [Array] + describe 'get_role_apps test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for get_role_users + # @param authorization + # @param role_id Set to the id of the role you want to return. + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. + # @option opts [Integer] :page The page number of results to return. + # @option opts [String] :cursor Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. + # @option opts [String] :name Allows you to filter on first name, last name, username, and email address. + # @option opts [Boolean] :include_unassigned Optional. Defaults to false. Include users that aren’t assigned to the role. + # @return [Array] + describe 'get_role_users test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for get_rule + # @param authorization + # @param app_id + # @param rule_id The id of the app rule to locate. + # @param [Hash] opts the optional parameters + # @return [Rule] + describe 'get_rule test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for get_score_insights + # @param authorization + # @param [Hash] opts the optional parameters + # @option opts [String] :before Optional ISO8601 formatted date string. Defaults to current date. Maximum date is 90 days ago. + # @option opts [String] :after Optional ISO8601 formatted date string. Defaults to 30 days ago. Maximum date is 90 days ago. + # @return [GetScoreInsights200Response] + describe 'get_score_insights test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for get_user + # @param authorization + # @param user_id Set to the id of the user that you want to return. + # @param [Hash] opts the optional parameters + # @return [User] + describe 'get_user test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for get_user_apps + # @param authorization + # @param user_id Set to the id of the user that you want to return. + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :ignore_visibility Defaults to `false`. When `true` will show all apps that are assigned to a user regardless of their portal visibility setting. + # @return [Array] + describe 'get_user_apps test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for list_access_token_claims + # @param authorization + # @param id + # @param [Hash] opts the optional parameters + # @return [Array] + describe 'list_access_token_claims test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for list_action_values + # @param authorization + # @param app_id + # @param action_value The value for the selected action. + # @param [Hash] opts the optional parameters + # @return [Array] + describe 'list_action_values test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for list_actions + # @param authorization + # @param app_id + # @param [Hash] opts the optional parameters + # @return [Array] + describe 'list_actions test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for list_app_users + # @param authorization + # @param app_id + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. + # @option opts [Integer] :page The page number of results to return. + # @option opts [String] :cursor Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. + # @return [Array] + describe 'list_app_users test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for list_apps + # @param authorization + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. + # @option opts [Integer] :page The page number of results to return. + # @option opts [String] :cursor Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. + # @option opts [String] :name The name or partial name of the app to search for. When using a partial name you must append a wildcard `*` + # @option opts [Integer] :connector_id Returns all apps based off a specific connector. See List Connectors for a complete list of Connector IDs. + # @option opts [AuthMethod] :auth_method Returns all apps based of a given type. + # @return [Array] + describe 'list_apps test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for list_authorization_servers + # @param authorization + # @param [Hash] opts the optional parameters + # @return [Array] + describe 'list_authorization_servers test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for list_condition_operators + # @param authorization + # @param app_id + # @param condition_value The value for the selected condition. + # @param [Hash] opts the optional parameters + # @return [Array] + describe 'list_condition_operators test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for list_condition_values + # @param authorization + # @param app_id + # @param condition_value The value for the selected condition. + # @param [Hash] opts the optional parameters + # @return [Array] + describe 'list_condition_values test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for list_conditions + # @param authorization + # @param app_id + # @param [Hash] opts the optional parameters + # @return [Array] + describe 'list_conditions test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for list_connectors + # @param authorization + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. + # @option opts [Integer] :page The page number of results to return. + # @option opts [String] :cursor Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. + # @option opts [String] :name The name or partial name of the connector to search for. When using a partial name you must append a wildcard `*` + # @option opts [AuthMethod] :auth_method Returns all connectors of a given type. + # @return [Array] + describe 'list_connectors test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for list_environment_variables + # @param authorization + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. + # @option opts [Integer] :page The page number of results to return. + # @option opts [String] :cursor Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. + # @return [Array] + describe 'list_environment_variables test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for list_hooks + # @param authorization + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. + # @option opts [Integer] :page The page number of results to return. + # @option opts [String] :cursor Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. + # @return [Array] + describe 'list_hooks test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for list_mapping_action_values + # @param authorization + # @param action_value The value for the selected action. + # @param [Hash] opts the optional parameters + # @return [Array] + describe 'list_mapping_action_values test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for list_mapping_actions + # @param authorization + # @param [Hash] opts the optional parameters + # @return [Array] + describe 'list_mapping_actions test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for list_mapping_condition_operators + # @param authorization + # @param condition_value The value for the selected condition. + # @param [Hash] opts the optional parameters + # @return [Array] + describe 'list_mapping_condition_operators test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for list_mapping_condition_values + # @param authorization + # @param condition_value The value for the selected condition. + # @param [Hash] opts the optional parameters + # @return [Array] + describe 'list_mapping_condition_values test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for list_mapping_conditions + # @param authorization + # @param [Hash] opts the optional parameters + # @return [Array] + describe 'list_mapping_conditions test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for list_mappings + # @param authorization + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :enabled Defaults to true. When set to `false` will return all disabled mappings. + # @option opts [String] :has_condition Filters Mappings based on their Conditions. + # @option opts [String] :has_condition_type Filters Mappings based on their condition types. + # @option opts [String] :has_action Filters Mappings based on their Actions. + # @option opts [String] :has_action_type Filters Mappings based on their action types. + # @return [Array] + describe 'list_mappings test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for list_risk_rules + # @param authorization + # @param [Hash] opts the optional parameters + # @return [nil] + describe 'list_risk_rules test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for list_roles + # @param authorization + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. + # @option opts [Integer] :page The page number of results to return. + # @option opts [String] :cursor Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. + # @option opts [String] :name Optional. Filters by role name. + # @option opts [String] :app_id Optional. Returns roles that contain this app name. + # @option opts [String] :fields Optional. Comma delimited list of fields to return. + # @return [Array] + describe 'list_roles test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for list_rules + # @param authorization + # @param app_id + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :enabled Defaults to true. When set to `false` will return all disabled rules. + # @option opts [String] :has_condition Filters Rules based on their Conditions. + # @option opts [String] :has_condition_type Filters Rules based on their condition types. + # @option opts [String] :has_action Filters Rules based on their Actions. + # @option opts [String] :has_action_type Filters Rules based on their action types. + # @return [Array] + describe 'list_rules test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for list_scopes + # @param authorization + # @param id + # @param [Hash] opts the optional parameters + # @return [Array] + describe 'list_scopes test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for list_users + # @param authorization + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. + # @option opts [Integer] :page The page number of results to return. + # @option opts [String] :cursor Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. + # @option opts [String] :created_since An ISO8601 timestamp value that returns all users created after a given date & time. + # @option opts [String] :created_until An ISO8601 timestamp value that returns all users created before a given date & time. + # @option opts [String] :updated_since An ISO8601 timestamp value that returns all users updated after a given date & time. + # @option opts [String] :updated_until An ISO8601 timestamp value that returns all users updated before a given date & time. + # @option opts [String] :last_login_since An ISO8601 timestamp value that returns all users that logged in after a given date & time. + # @option opts [String] :last_login_until + # @option opts [String] :firstname The first name of the user + # @option opts [String] :lastname The last name of the user + # @option opts [String] :email The email address of the user + # @option opts [String] :username The username for the user + # @option opts [String] :samaccountname The AD login name for the user + # @option opts [String] :directory_id The ID in OneLogin of the Directory that the user belongs to + # @option opts [String] :external_id An external identifier that has been set on the user + # @option opts [String] :app_id The ID of a OneLogin Application + # @option opts [String] :user_ids A comma separated list of OneLogin User IDs + # @option opts [String] :custom_attributes_attribute_name The short name of a custom attribute. Note that the attribute name is prefixed with custom_attributes. + # @option opts [String] :fields A comma separated list user attributes to return. + # @return [Array] + describe 'list_users test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for remove_client_app + # @param authorization + # @param id + # @param client_app_id + # @param [Hash] opts the optional parameters + # @return [nil] + describe 'remove_client_app test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for remove_role_admins + # @param authorization + # @param role_id Set to the id of the role you want to return. + # @param remove_role_users_request + # @param [Hash] opts the optional parameters + # @return [nil] + describe 'remove_role_admins test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for remove_role_users + # @param authorization + # @param role_id Set to the id of the role you want to return. + # @param remove_role_users_request + # @param [Hash] opts the optional parameters + # @return [nil] + describe 'remove_role_users test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for revoke_token + # @param authorization + # @param [Hash] opts the optional parameters + # @option opts [RevokeTokenRequest] :revoke_token_request + # @return [GenerateToken400Response] + describe 'revoke_token test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for set_role_apps + # @param authorization + # @param role_id Set to the id of the role you want to return. + # @param request_body + # @param [Hash] opts the optional parameters + # @return [Array] + describe 'set_role_apps test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for track_event + # @param authorization + # @param track_event_request + # @param [Hash] opts the optional parameters + # @return [nil] + describe 'track_event test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for update_access_token_claim + # @param authorization + # @param id + # @param claim_id + # @param add_access_token_claim_request + # @param [Hash] opts the optional parameters + # @return [Id] + describe 'update_access_token_claim test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for update_app + # @param authorization + # @param app_id + # @param schema + # @param [Hash] opts the optional parameters + # @return [Schema] + describe 'update_app test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for update_authorization_server + # @param authorization + # @param id + # @param create_authorization_server_request + # @param [Hash] opts the optional parameters + # @return [Id] + describe 'update_authorization_server test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for update_client_app + # @param authorization + # @param id + # @param client_app_id + # @param update_client_app_request + # @param [Hash] opts the optional parameters + # @return [ClientApp] + describe 'update_client_app test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for update_environment_variable + # @param authorization + # @param envvar_id Set to the id of the Hook Environment Variable that you want to fetch. + # @param update_environment_variable_request + # @param [Hash] opts the optional parameters + # @return [Envvar] + describe 'update_environment_variable test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for update_hook + # @param authorization + # @param hook_id Set to the id of the Hook that you want to return. + # @param hook + # @param [Hash] opts the optional parameters + # @return [Hook] + describe 'update_hook test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for update_mapping + # @param authorization + # @param mapping_id The id of the user mapping to locate. + # @param mapping + # @param [Hash] opts the optional parameters + # @return [Integer] + describe 'update_mapping test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for update_risk_rule + # @param authorization + # @param risk_rule_id + # @param risk_rule + # @param [Hash] opts the optional parameters + # @return [RiskRule] + describe 'update_risk_rule test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for update_role + # @param authorization + # @param role_id Set to the id of the role you want to return. + # @param role + # @param [Hash] opts the optional parameters + # @return [UpdateRole200Response] + describe 'update_role test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for update_rule + # @param authorization + # @param app_id + # @param rule_id The id of the app rule to locate. + # @param rule + # @param [Hash] opts the optional parameters + # @return [RuleId] + describe 'update_rule test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for update_scope + # @param authorization + # @param id + # @param scope_id + # @param add_scope_request + # @param [Hash] opts the optional parameters + # @return [Id] + describe 'update_scope test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for update_user + # @param authorization + # @param user_id Set to the id of the user that you want to return. + # @param user + # @param [Hash] opts the optional parameters + # @option opts [String] :mappings Controls how mappings will be applied to the user on creation. Defaults to async. + # @option opts [Boolean] :validate_policy Will passwords validate against the User Policy? Defaults to true. + # @return [User] + describe 'update_user test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for verify_enrollment + # @param authorization + # @param user_id Set to the id of the user. + # @param registration_id Set to the uuid of the registration. This was included in the response as part of the initial request in Enroll Factor. + # @param verify_enrollment_request + # @param [Hash] opts the optional parameters + # @return [Array] + describe 'verify_enrollment test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for verify_enrollment_voice_protect + # @param authorization + # @param user_id Set to the id of the user. + # @param registration_id Set to the uuid of the registration. This was included in the response as part of the initial request in Enroll Factor. + # @param [Hash] opts the optional parameters + # @return [Array] + describe 'verify_enrollment_voice_protect test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for verify_factor + # @param authorization + # @param user_id Set to the id of the user. + # @param verification_id The verification_id is returned on activation of the factor or you can get the device_id using the Activate Factor API call. + # @param verify_factor_request + # @param [Hash] opts the optional parameters + # @return [Status2] + describe 'verify_factor test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for verify_factor_saml + # @param authorization + # @param verify_factor_saml_request + # @param [Hash] opts the optional parameters + # @return [VerifyFactorSaml200Response] + describe 'verify_factor_saml test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for verify_factor_voice + # @param authorization + # @param user_id Set to the id of the user. + # @param verification_id The verification_id is returned on activation of the factor or you can get the device_id using the Activate Factor API call. + # @param [Hash] opts the optional parameters + # @return [Array] + describe 'verify_factor_voice test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/api_client_spec.rb b/spec/api_client_spec.rb new file mode 100644 index 0000000..3d5a408 --- /dev/null +++ b/spec/api_client_spec.rb @@ -0,0 +1,226 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' + +describe OpenapiClient::ApiClient do + context 'initialization' do + context 'URL stuff' do + context 'host' do + it 'removes http from host' do + OpenapiClient.configure { |c| c.host = 'http://example.com' } + expect(OpenapiClient::Configuration.default.host).to eq('example.com') + end + + it 'removes https from host' do + OpenapiClient.configure { |c| c.host = 'https://wookiee.com' } + expect(OpenapiClient::ApiClient.default.config.host).to eq('wookiee.com') + end + + it 'removes trailing path from host' do + OpenapiClient.configure { |c| c.host = 'hobo.com/v4' } + expect(OpenapiClient::Configuration.default.host).to eq('hobo.com') + end + end + + context 'base_path' do + it "prepends a slash to base_path" do + OpenapiClient.configure { |c| c.base_path = 'v4/dog' } + expect(OpenapiClient::Configuration.default.base_path).to eq('/v4/dog') + end + + it "doesn't prepend a slash if one is already there" do + OpenapiClient.configure { |c| c.base_path = '/v4/dog' } + expect(OpenapiClient::Configuration.default.base_path).to eq('/v4/dog') + end + + it "ends up as a blank string if nil" do + OpenapiClient.configure { |c| c.base_path = nil } + expect(OpenapiClient::Configuration.default.base_path).to eq('') + end + end + end + end + + describe 'params_encoding in #build_request' do + let(:config) { OpenapiClient::Configuration.new } + let(:api_client) { OpenapiClient::ApiClient.new(config) } + + it 'defaults to nil' do + expect(OpenapiClient::Configuration.default.params_encoding).to eq(nil) + expect(config.params_encoding).to eq(nil) + + request = api_client.build_request(:get, '/test') + expect(request.options[:params_encoding]).to eq(nil) + end + + it 'can be customized' do + config.params_encoding = :multi + request = api_client.build_request(:get, '/test') + expect(request.options[:params_encoding]).to eq(:multi) + end + end + + describe 'timeout in #build_request' do + let(:config) { OpenapiClient::Configuration.new } + let(:api_client) { OpenapiClient::ApiClient.new(config) } + + it 'defaults to 0' do + expect(OpenapiClient::Configuration.default.timeout).to eq(0) + expect(config.timeout).to eq(0) + + request = api_client.build_request(:get, '/test') + expect(request.options[:timeout]).to eq(0) + end + + it 'can be customized' do + config.timeout = 100 + request = api_client.build_request(:get, '/test') + expect(request.options[:timeout]).to eq(100) + end + end + + describe '#deserialize' do + it "handles Array" do + api_client = OpenapiClient::ApiClient.new + headers = { 'Content-Type' => 'application/json' } + response = double('response', headers: headers, body: '[12, 34]') + data = api_client.deserialize(response, 'Array') + expect(data).to be_instance_of(Array) + expect(data).to eq([12, 34]) + end + + it 'handles Array>' do + api_client = OpenapiClient::ApiClient.new + headers = { 'Content-Type' => 'application/json' } + response = double('response', headers: headers, body: '[[12, 34], [56]]') + data = api_client.deserialize(response, 'Array>') + expect(data).to be_instance_of(Array) + expect(data).to eq([[12, 34], [56]]) + end + + it 'handles Hash' do + api_client = OpenapiClient::ApiClient.new + headers = { 'Content-Type' => 'application/json' } + response = double('response', headers: headers, body: '{"message": "Hello"}') + data = api_client.deserialize(response, 'Hash') + expect(data).to be_instance_of(Hash) + expect(data).to eq(:message => 'Hello') + end + end + + describe "#object_to_hash" do + it 'ignores nils and includes empty arrays' do + # uncomment below to test object_to_hash for model + # api_client = OpenapiClient::ApiClient.new + # _model = OpenapiClient::ModelName.new + # update the model attribute below + # _model.id = 1 + # update the expected value (hash) below + # expected = {id: 1, name: '', tags: []} + # expect(api_client.object_to_hash(_model)).to eq(expected) + end + end + + describe '#build_collection_param' do + let(:param) { ['aa', 'bb', 'cc'] } + let(:api_client) { OpenapiClient::ApiClient.new } + + it 'works for csv' do + expect(api_client.build_collection_param(param, :csv)).to eq('aa,bb,cc') + end + + it 'works for ssv' do + expect(api_client.build_collection_param(param, :ssv)).to eq('aa bb cc') + end + + it 'works for tsv' do + expect(api_client.build_collection_param(param, :tsv)).to eq("aa\tbb\tcc") + end + + it 'works for pipes' do + expect(api_client.build_collection_param(param, :pipes)).to eq('aa|bb|cc') + end + + it 'works for multi' do + expect(api_client.build_collection_param(param, :multi)).to eq(['aa', 'bb', 'cc']) + end + + it 'fails for invalid collection format' do + expect { api_client.build_collection_param(param, :INVALID) }.to raise_error(RuntimeError, 'unknown collection format: :INVALID') + end + end + + describe '#json_mime?' do + let(:api_client) { OpenapiClient::ApiClient.new } + + it 'works' do + expect(api_client.json_mime?(nil)).to eq false + expect(api_client.json_mime?('')).to eq false + + expect(api_client.json_mime?('application/json')).to eq true + expect(api_client.json_mime?('application/json; charset=UTF8')).to eq true + expect(api_client.json_mime?('APPLICATION/JSON')).to eq true + + expect(api_client.json_mime?('application/xml')).to eq false + expect(api_client.json_mime?('text/plain')).to eq false + expect(api_client.json_mime?('application/jsonp')).to eq false + end + end + + describe '#select_header_accept' do + let(:api_client) { OpenapiClient::ApiClient.new } + + it 'works' do + expect(api_client.select_header_accept(nil)).to be_nil + expect(api_client.select_header_accept([])).to be_nil + + expect(api_client.select_header_accept(['application/json'])).to eq('application/json') + expect(api_client.select_header_accept(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8') + expect(api_client.select_header_accept(['APPLICATION/JSON', 'text/html'])).to eq('APPLICATION/JSON') + + expect(api_client.select_header_accept(['application/xml'])).to eq('application/xml') + expect(api_client.select_header_accept(['text/html', 'application/xml'])).to eq('text/html,application/xml') + end + end + + describe '#select_header_content_type' do + let(:api_client) { OpenapiClient::ApiClient.new } + + it 'works' do + expect(api_client.select_header_content_type(nil)).to be_nil + expect(api_client.select_header_content_type([])).to be_nil + + expect(api_client.select_header_content_type(['application/json'])).to eq('application/json') + expect(api_client.select_header_content_type(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8') + expect(api_client.select_header_content_type(['APPLICATION/JSON', 'text/html'])).to eq('APPLICATION/JSON') + expect(api_client.select_header_content_type(['application/xml'])).to eq('application/xml') + expect(api_client.select_header_content_type(['text/plain', 'application/xml'])).to eq('text/plain') + end + end + + describe '#sanitize_filename' do + let(:api_client) { OpenapiClient::ApiClient.new } + + it 'works' do + expect(api_client.sanitize_filename('sun')).to eq('sun') + expect(api_client.sanitize_filename('sun.gif')).to eq('sun.gif') + expect(api_client.sanitize_filename('../sun.gif')).to eq('sun.gif') + expect(api_client.sanitize_filename('/var/tmp/sun.gif')).to eq('sun.gif') + expect(api_client.sanitize_filename('./sun.gif')).to eq('sun.gif') + expect(api_client.sanitize_filename('..\sun.gif')).to eq('sun.gif') + expect(api_client.sanitize_filename('\var\tmp\sun.gif')).to eq('sun.gif') + expect(api_client.sanitize_filename('c:\var\tmp\sun.gif')).to eq('sun.gif') + expect(api_client.sanitize_filename('.\sun.gif')).to eq('sun.gif') + end + end +end diff --git a/spec/configuration_spec.rb b/spec/configuration_spec.rb new file mode 100644 index 0000000..eb635a8 --- /dev/null +++ b/spec/configuration_spec.rb @@ -0,0 +1,42 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' + +describe OpenapiClient::Configuration do + let(:config) { OpenapiClient::Configuration.default } + + before(:each) do + # uncomment below to setup host and base_path + # require 'URI' + # uri = URI.parse("https://onelogininc.onelogin.com") + # OpenapiClient.configure do |c| + # c.host = uri.host + # c.base_path = uri.path + # end + end + + describe '#base_url' do + it 'should have the default value' do + # uncomment below to test default value of the base path + # expect(config.base_url).to eq("https://onelogininc.onelogin.com") + end + + it 'should remove trailing slashes' do + [nil, '', '/', '//'].each do |base_path| + config.base_path = base_path + # uncomment below to test trailing slashes + # expect(config.base_url).to eq("https://onelogininc.onelogin.com") + end + end + end +end diff --git a/spec/lib/onelogin/api/client_spec.rb b/spec/lib/onelogin/api/client_spec.rb deleted file mode 100644 index 0f2412a..0000000 --- a/spec/lib/onelogin/api/client_spec.rb +++ /dev/null @@ -1,49 +0,0 @@ -require "spec_helper" - -RSpec.describe OneLogin do - - context 'with a client_id and client_secret' do - - it 'initializes the client' do - client = OneLogin::Api::Client.new( - client_id: 'blah', - client_secret: 'blah' - ) - - expect(client).not_to be nil - end - - end - - context 'with out a client_id and client_secret' do - - it 'raises an ArgumentError' do - expect{OneLogin::Api::Client.new({})}.to raise_error(ArgumentError) - end - - end - - context 'with region' do - - it 'defaults to "us"' do - client = OneLogin::Api::Client.new( - client_id: 'blah', - client_secret: 'blah' - ) - - expect(client.region).to eq("us") - end - - it 'can be set to "eu"' do - client = OneLogin::Api::Client.new( - client_id: 'blah', - client_secret: 'blah', - region: 'eu' - ) - - expect(client.region).to eq("eu") - end - - end - -end \ No newline at end of file diff --git a/spec/lib/onelogin/api/models/embed_app_spec.rb b/spec/lib/onelogin/api/models/embed_app_spec.rb deleted file mode 100644 index 7ff42a3..0000000 --- a/spec/lib/onelogin/api/models/embed_app_spec.rb +++ /dev/null @@ -1,71 +0,0 @@ -require "spec_helper" - -RSpec.describe OneLogin::Api::Models::EmbedApp do - - before(:all) do - @app_data = { - 'id'=>'1234', - 'icon'=>'https://some.img', - 'name'=>'Demo App', - 'provisioned'=>'0', - 'extension_required'=>'1', - 'personal'=>'0', - 'login_id'=>'5678' - } - end - - context 'with data retrieved from the API' do - - it 'initializes the model' do - embed_app = OneLogin::Api::Models::EmbedApp.new(@app_data) - - expect(embed_app.id).to eq(1234) - expect(embed_app.icon).to eq('https://some.img') - expect(embed_app.name).to eq('Demo App') - expect(embed_app.provisioned).to eq(0) - expect(embed_app.extension_required).to eq(true) - expect(embed_app.personal).to eq(false) - expect(embed_app.login_id).to eq(5678) - end - - end - - context 'with truthy values' do - - it 'returns true' do - embed_app = OneLogin::Api::Models::EmbedApp.new({ - 'id'=>'1234', - 'icon'=>'https://some.img', - 'name'=>'Demo App', - 'provisioned'=>'1', - 'extension_required'=>'true', - 'personal'=>'1', - 'login_id'=>'5678' - }) - - expect(embed_app.personal).to eq(true) - expect(embed_app.extension_required).to eq(true) - end - - end - - context 'with falsey values' do - - it 'returns false' do - embed_app = OneLogin::Api::Models::EmbedApp.new({ - 'id'=>'1234', - 'icon'=>'https://some.img', - 'name'=>'Demo App', - 'provisioned'=>'1', - 'extension_required'=>'false', - 'personal'=>'0', - 'login_id'=>'5678' - }) - - expect(embed_app.personal).to eq(false) - expect(embed_app.extension_required).to eq(false) - end - - end - -end \ No newline at end of file diff --git a/spec/lib/onelogin/api/models/event_spec.rb b/spec/lib/onelogin/api/models/event_spec.rb deleted file mode 100644 index e498ee2..0000000 --- a/spec/lib/onelogin/api/models/event_spec.rb +++ /dev/null @@ -1,17 +0,0 @@ -require "spec_helper" - -RSpec.describe OneLogin::Api::Models::Event do - - context 'with data retrieved from the API' do - - it 'has an app_name attribute' do - event = OneLogin::Api::Models::Event.new({ - 'app_name' => 'Sample App' - }) - - expect(event).to have_attributes(:app_name => 'Sample App') - end - - end - -end \ No newline at end of file diff --git a/spec/lib/onelogin_spec.rb b/spec/lib/onelogin_spec.rb deleted file mode 100644 index 30d02cb..0000000 --- a/spec/lib/onelogin_spec.rb +++ /dev/null @@ -1,7 +0,0 @@ -require "spec_helper" - -RSpec.describe OneLogin do - it "has a version number" do - expect(OneLogin::VERSION).not_to be nil - end -end diff --git a/spec/models/action_spec.rb b/spec/models/action_spec.rb new file mode 100644 index 0000000..76a046e --- /dev/null +++ b/spec/models/action_spec.rb @@ -0,0 +1,58 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::Action +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::Action do + let(:instance) { OpenapiClient::Action.new } + + describe 'test an instance of Action' do + it 'should create an instance of Action' do + expect(instance).to be_instance_of(OpenapiClient::Action) + end + end + describe 'test attribute "action"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "value"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "expression"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "scriplet"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "macro"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/activate_factor_request_spec.rb b/spec/models/activate_factor_request_spec.rb new file mode 100644 index 0000000..8211e15 --- /dev/null +++ b/spec/models/activate_factor_request_spec.rb @@ -0,0 +1,52 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::ActivateFactorRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::ActivateFactorRequest do + let(:instance) { OpenapiClient::ActivateFactorRequest.new } + + describe 'test an instance of ActivateFactorRequest' do + it 'should create an instance of ActivateFactorRequest' do + expect(instance).to be_instance_of(OpenapiClient::ActivateFactorRequest) + end + end + describe 'test attribute "device_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "expires_in"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "redirect_to"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "custom_message"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/add_access_token_claim_request_spec.rb b/spec/models/add_access_token_claim_request_spec.rb new file mode 100644 index 0000000..4e3db35 --- /dev/null +++ b/spec/models/add_access_token_claim_request_spec.rb @@ -0,0 +1,46 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::AddAccessTokenClaimRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::AddAccessTokenClaimRequest do + let(:instance) { OpenapiClient::AddAccessTokenClaimRequest.new } + + describe 'test an instance of AddAccessTokenClaimRequest' do + it 'should create an instance of AddAccessTokenClaimRequest' do + expect(instance).to be_instance_of(OpenapiClient::AddAccessTokenClaimRequest) + end + end + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "user_attribute_mappings"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "user_attribute_macros"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/add_client_app_request_spec.rb b/spec/models/add_client_app_request_spec.rb new file mode 100644 index 0000000..3664b51 --- /dev/null +++ b/spec/models/add_client_app_request_spec.rb @@ -0,0 +1,40 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::AddClientAppRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::AddClientAppRequest do + let(:instance) { OpenapiClient::AddClientAppRequest.new } + + describe 'test an instance of AddClientAppRequest' do + it 'should create an instance of AddClientAppRequest' do + expect(instance).to be_instance_of(OpenapiClient::AddClientAppRequest) + end + end + describe 'test attribute "app_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "scopes"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/add_role_users200_response_inner_spec.rb b/spec/models/add_role_users200_response_inner_spec.rb new file mode 100644 index 0000000..6c75a6e --- /dev/null +++ b/spec/models/add_role_users200_response_inner_spec.rb @@ -0,0 +1,34 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::AddRoleUsers200ResponseInner +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::AddRoleUsers200ResponseInner do + let(:instance) { OpenapiClient::AddRoleUsers200ResponseInner.new } + + describe 'test an instance of AddRoleUsers200ResponseInner' do + it 'should create an instance of AddRoleUsers200ResponseInner' do + expect(instance).to be_instance_of(OpenapiClient::AddRoleUsers200ResponseInner) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/add_scope_request_spec.rb b/spec/models/add_scope_request_spec.rb new file mode 100644 index 0000000..9d5b516 --- /dev/null +++ b/spec/models/add_scope_request_spec.rb @@ -0,0 +1,40 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::AddScopeRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::AddScopeRequest do + let(:instance) { OpenapiClient::AddScopeRequest.new } + + describe 'test an instance of AddScopeRequest' do + it 'should create an instance of AddScopeRequest' do + expect(instance).to be_instance_of(OpenapiClient::AddScopeRequest) + end + end + describe 'test attribute "value"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "description"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/auth_method_spec.rb b/spec/models/auth_method_spec.rb new file mode 100644 index 0000000..2894830 --- /dev/null +++ b/spec/models/auth_method_spec.rb @@ -0,0 +1,28 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::AuthMethod +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::AuthMethod do + let(:instance) { OpenapiClient::AuthMethod.new } + + describe 'test an instance of AuthMethod' do + it 'should create an instance of AuthMethod' do + expect(instance).to be_instance_of(OpenapiClient::AuthMethod) + end + end +end diff --git a/spec/models/auth_server_configuration_spec.rb b/spec/models/auth_server_configuration_spec.rb new file mode 100644 index 0000000..9248b5c --- /dev/null +++ b/spec/models/auth_server_configuration_spec.rb @@ -0,0 +1,52 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::AuthServerConfiguration +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::AuthServerConfiguration do + let(:instance) { OpenapiClient::AuthServerConfiguration.new } + + describe 'test an instance of AuthServerConfiguration' do + it 'should create an instance of AuthServerConfiguration' do + expect(instance).to be_instance_of(OpenapiClient::AuthServerConfiguration) + end + end + describe 'test attribute "audiences"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "refresh_token_expiration_minutes"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "resource_identifier"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "access_token_expiration_minutes"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/client_app_spec.rb b/spec/models/client_app_spec.rb new file mode 100644 index 0000000..c02fff6 --- /dev/null +++ b/spec/models/client_app_spec.rb @@ -0,0 +1,40 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::ClientApp +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::ClientApp do + let(:instance) { OpenapiClient::ClientApp.new } + + describe 'test an instance of ClientApp' do + it 'should create an instance of ClientApp' do + expect(instance).to be_instance_of(OpenapiClient::ClientApp) + end + end + describe 'test attribute "app_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "api_auth_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/condition_spec.rb b/spec/models/condition_spec.rb new file mode 100644 index 0000000..e3680de --- /dev/null +++ b/spec/models/condition_spec.rb @@ -0,0 +1,46 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::Condition +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::Condition do + let(:instance) { OpenapiClient::Condition.new } + + describe 'test an instance of Condition' do + it 'should create an instance of Condition' do + expect(instance).to be_instance_of(OpenapiClient::Condition) + end + end + describe 'test attribute "source"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "operator"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "value"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/connector_spec.rb b/spec/models/connector_spec.rb new file mode 100644 index 0000000..aacaa2e --- /dev/null +++ b/spec/models/connector_spec.rb @@ -0,0 +1,58 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::Connector +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::Connector do + let(:instance) { OpenapiClient::Connector.new } + + describe 'test an instance of Connector' do + it 'should create an instance of Connector' do + expect(instance).to be_instance_of(OpenapiClient::Connector) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "auth_method"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "allows_new_parameters"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "icon_url"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/create_authorization_server_request_spec.rb b/spec/models/create_authorization_server_request_spec.rb new file mode 100644 index 0000000..27b8a55 --- /dev/null +++ b/spec/models/create_authorization_server_request_spec.rb @@ -0,0 +1,46 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::CreateAuthorizationServerRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::CreateAuthorizationServerRequest do + let(:instance) { OpenapiClient::CreateAuthorizationServerRequest.new } + + describe 'test an instance of CreateAuthorizationServerRequest' do + it 'should create an instance of CreateAuthorizationServerRequest' do + expect(instance).to be_instance_of(OpenapiClient::CreateAuthorizationServerRequest) + end + end + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "description"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "configuration"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/create_environment_variable_request_spec.rb b/spec/models/create_environment_variable_request_spec.rb new file mode 100644 index 0000000..d5be2a4 --- /dev/null +++ b/spec/models/create_environment_variable_request_spec.rb @@ -0,0 +1,40 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::CreateEnvironmentVariableRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::CreateEnvironmentVariableRequest do + let(:instance) { OpenapiClient::CreateEnvironmentVariableRequest.new } + + describe 'test an instance of CreateEnvironmentVariableRequest' do + it 'should create an instance of CreateEnvironmentVariableRequest' do + expect(instance).to be_instance_of(OpenapiClient::CreateEnvironmentVariableRequest) + end + end + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "value"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/create_roles201_response_inner_spec.rb b/spec/models/create_roles201_response_inner_spec.rb new file mode 100644 index 0000000..5d9fa9f --- /dev/null +++ b/spec/models/create_roles201_response_inner_spec.rb @@ -0,0 +1,34 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::CreateRoles201ResponseInner +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::CreateRoles201ResponseInner do + let(:instance) { OpenapiClient::CreateRoles201ResponseInner.new } + + describe 'test an instance of CreateRoles201ResponseInner' do + it 'should create an instance of CreateRoles201ResponseInner' do + expect(instance).to be_instance_of(OpenapiClient::CreateRoles201ResponseInner) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/device_spec.rb b/spec/models/device_spec.rb new file mode 100644 index 0000000..398d1ed --- /dev/null +++ b/spec/models/device_spec.rb @@ -0,0 +1,58 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::Device +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::Device do + let(:instance) { OpenapiClient::Device.new } + + describe 'test an instance of Device' do + it 'should create an instance of Device' do + expect(instance).to be_instance_of(OpenapiClient::Device) + end + end + describe 'test attribute "device_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "user_display_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "type_display_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "auth_factor_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "default"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/enroll_factor_request_spec.rb b/spec/models/enroll_factor_request_spec.rb new file mode 100644 index 0000000..299dbaf --- /dev/null +++ b/spec/models/enroll_factor_request_spec.rb @@ -0,0 +1,64 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::EnrollFactorRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::EnrollFactorRequest do + let(:instance) { OpenapiClient::EnrollFactorRequest.new } + + describe 'test an instance of EnrollFactorRequest' do + it 'should create an instance of EnrollFactorRequest' do + expect(instance).to be_instance_of(OpenapiClient::EnrollFactorRequest) + end + end + describe 'test attribute "factor_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "display_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "expires_in"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "verified"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "redirect_to"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "custom_message"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/envvar_spec.rb b/spec/models/envvar_spec.rb new file mode 100644 index 0000000..63feae3 --- /dev/null +++ b/spec/models/envvar_spec.rb @@ -0,0 +1,52 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::Envvar +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::Envvar do + let(:instance) { OpenapiClient::Envvar.new } + + describe 'test an instance of Envvar' do + it 'should create an instance of Envvar' do + expect(instance).to be_instance_of(OpenapiClient::Envvar) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "created_at"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "updated_at"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/error_status_errors_inner_spec.rb b/spec/models/error_status_errors_inner_spec.rb new file mode 100644 index 0000000..3cf4ee6 --- /dev/null +++ b/spec/models/error_status_errors_inner_spec.rb @@ -0,0 +1,40 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::ErrorStatusErrorsInner +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::ErrorStatusErrorsInner do + let(:instance) { OpenapiClient::ErrorStatusErrorsInner.new } + + describe 'test an instance of ErrorStatusErrorsInner' do + it 'should create an instance of ErrorStatusErrorsInner' do + expect(instance).to be_instance_of(OpenapiClient::ErrorStatusErrorsInner) + end + end + describe 'test attribute "field"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "message"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/error_status_spec.rb b/spec/models/error_status_spec.rb new file mode 100644 index 0000000..2b26c3a --- /dev/null +++ b/spec/models/error_status_spec.rb @@ -0,0 +1,46 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::ErrorStatus +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::ErrorStatus do + let(:instance) { OpenapiClient::ErrorStatus.new } + + describe 'test an instance of ErrorStatus' do + it 'should create an instance of ErrorStatus' do + expect(instance).to be_instance_of(OpenapiClient::ErrorStatus) + end + end + describe 'test attribute "code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "message"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "errors"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/factor_inner_factor_data_spec.rb b/spec/models/factor_inner_factor_data_spec.rb new file mode 100644 index 0000000..73c667a --- /dev/null +++ b/spec/models/factor_inner_factor_data_spec.rb @@ -0,0 +1,40 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::FactorInnerFactorData +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::FactorInnerFactorData do + let(:instance) { OpenapiClient::FactorInnerFactorData.new } + + describe 'test an instance of FactorInnerFactorData' do + it 'should create an instance of FactorInnerFactorData' do + expect(instance).to be_instance_of(OpenapiClient::FactorInnerFactorData) + end + end + describe 'test attribute "verification_token"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "totp_url"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/factor_inner_spec.rb b/spec/models/factor_inner_spec.rb new file mode 100644 index 0000000..454bc3e --- /dev/null +++ b/spec/models/factor_inner_spec.rb @@ -0,0 +1,80 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::FactorInner +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::FactorInner do + let(:instance) { OpenapiClient::FactorInner.new } + + describe 'test an instance of FactorInner' do + it 'should create an instance of FactorInner' do + expect(instance).to be_instance_of(OpenapiClient::FactorInner) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["pending", "accepted"]) + # validator.allowable_values.each do |value| + # expect { instance.status = value }.not_to raise_error + # end + end + end + + describe 'test attribute "default"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "auth_factor_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "type_display_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "user_display_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "expires_at"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "factor_data"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/generate_mfa_token200_response_spec.rb b/spec/models/generate_mfa_token200_response_spec.rb new file mode 100644 index 0000000..b537a92 --- /dev/null +++ b/spec/models/generate_mfa_token200_response_spec.rb @@ -0,0 +1,52 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::GenerateMfaToken200Response +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::GenerateMfaToken200Response do + let(:instance) { OpenapiClient::GenerateMfaToken200Response.new } + + describe 'test an instance of GenerateMfaToken200Response' do + it 'should create an instance of GenerateMfaToken200Response' do + expect(instance).to be_instance_of(OpenapiClient::GenerateMfaToken200Response) + end + end + describe 'test attribute "mfa_token"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "reusable"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "expires_at"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "device_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/generate_mfa_token422_response_details_spec.rb b/spec/models/generate_mfa_token422_response_details_spec.rb new file mode 100644 index 0000000..b03a01e --- /dev/null +++ b/spec/models/generate_mfa_token422_response_details_spec.rb @@ -0,0 +1,34 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::GenerateMfaToken422ResponseDetails +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::GenerateMfaToken422ResponseDetails do + let(:instance) { OpenapiClient::GenerateMfaToken422ResponseDetails.new } + + describe 'test an instance of GenerateMfaToken422ResponseDetails' do + it 'should create an instance of GenerateMfaToken422ResponseDetails' do + expect(instance).to be_instance_of(OpenapiClient::GenerateMfaToken422ResponseDetails) + end + end + describe 'test attribute "parameters"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/generate_mfa_token422_response_spec.rb b/spec/models/generate_mfa_token422_response_spec.rb new file mode 100644 index 0000000..a021bbd --- /dev/null +++ b/spec/models/generate_mfa_token422_response_spec.rb @@ -0,0 +1,52 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::GenerateMfaToken422Response +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::GenerateMfaToken422Response do + let(:instance) { OpenapiClient::GenerateMfaToken422Response.new } + + describe 'test an instance of GenerateMfaToken422Response' do + it 'should create an instance of GenerateMfaToken422Response' do + expect(instance).to be_instance_of(OpenapiClient::GenerateMfaToken422Response) + end + end + describe 'test attribute "status_code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "message"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "details"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/generate_mfa_token_request_spec.rb b/spec/models/generate_mfa_token_request_spec.rb new file mode 100644 index 0000000..2219157 --- /dev/null +++ b/spec/models/generate_mfa_token_request_spec.rb @@ -0,0 +1,40 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::GenerateMfaTokenRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::GenerateMfaTokenRequest do + let(:instance) { OpenapiClient::GenerateMfaTokenRequest.new } + + describe 'test an instance of GenerateMfaTokenRequest' do + it 'should create an instance of GenerateMfaTokenRequest' do + expect(instance).to be_instance_of(OpenapiClient::GenerateMfaTokenRequest) + end + end + describe 'test attribute "expires_in"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "reusable"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/generate_saml_assertion_request_spec.rb b/spec/models/generate_saml_assertion_request_spec.rb new file mode 100644 index 0000000..27b6da3 --- /dev/null +++ b/spec/models/generate_saml_assertion_request_spec.rb @@ -0,0 +1,58 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::GenerateSamlAssertionRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::GenerateSamlAssertionRequest do + let(:instance) { OpenapiClient::GenerateSamlAssertionRequest.new } + + describe 'test an instance of GenerateSamlAssertionRequest' do + it 'should create an instance of GenerateSamlAssertionRequest' do + expect(instance).to be_instance_of(OpenapiClient::GenerateSamlAssertionRequest) + end + end + describe 'test attribute "username_or_email"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "password"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "app_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "subdomain"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "ip_address"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/generate_token200_response_spec.rb b/spec/models/generate_token200_response_spec.rb new file mode 100644 index 0000000..c413091 --- /dev/null +++ b/spec/models/generate_token200_response_spec.rb @@ -0,0 +1,64 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::GenerateToken200Response +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::GenerateToken200Response do + let(:instance) { OpenapiClient::GenerateToken200Response.new } + + describe 'test an instance of GenerateToken200Response' do + it 'should create an instance of GenerateToken200Response' do + expect(instance).to be_instance_of(OpenapiClient::GenerateToken200Response) + end + end + describe 'test attribute "access_token"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "created_at"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "expires_in"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "refresh_token"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "token_type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "accountt_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/generate_token400_response_spec.rb b/spec/models/generate_token400_response_spec.rb new file mode 100644 index 0000000..3430ed1 --- /dev/null +++ b/spec/models/generate_token400_response_spec.rb @@ -0,0 +1,34 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::GenerateToken400Response +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::GenerateToken400Response do + let(:instance) { OpenapiClient::GenerateToken400Response.new } + + describe 'test an instance of GenerateToken400Response' do + it 'should create an instance of GenerateToken400Response' do + expect(instance).to be_instance_of(OpenapiClient::GenerateToken400Response) + end + end + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/generate_token_request_spec.rb b/spec/models/generate_token_request_spec.rb new file mode 100644 index 0000000..eb12ccd --- /dev/null +++ b/spec/models/generate_token_request_spec.rb @@ -0,0 +1,38 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::GenerateTokenRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::GenerateTokenRequest do + let(:instance) { OpenapiClient::GenerateTokenRequest.new } + + describe 'test an instance of GenerateTokenRequest' do + it 'should create an instance of GenerateTokenRequest' do + expect(instance).to be_instance_of(OpenapiClient::GenerateTokenRequest) + end + end + describe 'test attribute "grant_type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["client_credentials"]) + # validator.allowable_values.each do |value| + # expect { instance.grant_type = value }.not_to raise_error + # end + end + end + +end diff --git a/spec/models/get_authorization_server200_response_spec.rb b/spec/models/get_authorization_server200_response_spec.rb new file mode 100644 index 0000000..1378298 --- /dev/null +++ b/spec/models/get_authorization_server200_response_spec.rb @@ -0,0 +1,52 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::GetAuthorizationServer200Response +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::GetAuthorizationServer200Response do + let(:instance) { OpenapiClient::GetAuthorizationServer200Response.new } + + describe 'test an instance of GetAuthorizationServer200Response' do + it 'should create an instance of GetAuthorizationServer200Response' do + expect(instance).to be_instance_of(OpenapiClient::GetAuthorizationServer200Response) + end + end + describe 'test attribute "configuration"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "description"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/get_available_factors200_response_inner_spec.rb b/spec/models/get_available_factors200_response_inner_spec.rb new file mode 100644 index 0000000..3c40189 --- /dev/null +++ b/spec/models/get_available_factors200_response_inner_spec.rb @@ -0,0 +1,46 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::GetAvailableFactors200ResponseInner +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::GetAvailableFactors200ResponseInner do + let(:instance) { OpenapiClient::GetAvailableFactors200ResponseInner.new } + + describe 'test an instance of GetAvailableFactors200ResponseInner' do + it 'should create an instance of GetAvailableFactors200ResponseInner' do + expect(instance).to be_instance_of(OpenapiClient::GetAvailableFactors200ResponseInner) + end + end + describe 'test attribute "factor_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "auth_factor_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/get_client_apps200_response_inner_scopes_inner_spec.rb b/spec/models/get_client_apps200_response_inner_scopes_inner_spec.rb new file mode 100644 index 0000000..c67f977 --- /dev/null +++ b/spec/models/get_client_apps200_response_inner_scopes_inner_spec.rb @@ -0,0 +1,46 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::GetClientApps200ResponseInnerScopesInner +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::GetClientApps200ResponseInnerScopesInner do + let(:instance) { OpenapiClient::GetClientApps200ResponseInnerScopesInner.new } + + describe 'test an instance of GetClientApps200ResponseInnerScopesInner' do + it 'should create an instance of GetClientApps200ResponseInnerScopesInner' do + expect(instance).to be_instance_of(OpenapiClient::GetClientApps200ResponseInnerScopesInner) + end + end + describe 'test attribute "description"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "value"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/get_client_apps200_response_inner_spec.rb b/spec/models/get_client_apps200_response_inner_spec.rb new file mode 100644 index 0000000..a811422 --- /dev/null +++ b/spec/models/get_client_apps200_response_inner_spec.rb @@ -0,0 +1,52 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::GetClientApps200ResponseInner +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::GetClientApps200ResponseInner do + let(:instance) { OpenapiClient::GetClientApps200ResponseInner.new } + + describe 'test an instance of GetClientApps200ResponseInner' do + it 'should create an instance of GetClientApps200ResponseInner' do + expect(instance).to be_instance_of(OpenapiClient::GetClientApps200ResponseInner) + end + end + describe 'test attribute "scopes"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "app_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "api_auth_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/get_rate_limit200_response_data_spec.rb b/spec/models/get_rate_limit200_response_data_spec.rb new file mode 100644 index 0000000..4f717f2 --- /dev/null +++ b/spec/models/get_rate_limit200_response_data_spec.rb @@ -0,0 +1,46 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::GetRateLimit200ResponseData +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::GetRateLimit200ResponseData do + let(:instance) { OpenapiClient::GetRateLimit200ResponseData.new } + + describe 'test an instance of GetRateLimit200ResponseData' do + it 'should create an instance of GetRateLimit200ResponseData' do + expect(instance).to be_instance_of(OpenapiClient::GetRateLimit200ResponseData) + end + end + describe 'test attribute "x_rate_limit_limit"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "x_rate_limit_remaining"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "x_rate_limit_reset"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/get_rate_limit200_response_spec.rb b/spec/models/get_rate_limit200_response_spec.rb new file mode 100644 index 0000000..4c37dc2 --- /dev/null +++ b/spec/models/get_rate_limit200_response_spec.rb @@ -0,0 +1,40 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::GetRateLimit200Response +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::GetRateLimit200Response do + let(:instance) { OpenapiClient::GetRateLimit200Response.new } + + describe 'test an instance of GetRateLimit200Response' do + it 'should create an instance of GetRateLimit200Response' do + expect(instance).to be_instance_of(OpenapiClient::GetRateLimit200Response) + end + end + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "data"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/get_risk_score200_response_spec.rb b/spec/models/get_risk_score200_response_spec.rb new file mode 100644 index 0000000..a06ac8f --- /dev/null +++ b/spec/models/get_risk_score200_response_spec.rb @@ -0,0 +1,40 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::GetRiskScore200Response +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::GetRiskScore200Response do + let(:instance) { OpenapiClient::GetRiskScore200Response.new } + + describe 'test an instance of GetRiskScore200Response' do + it 'should create an instance of GetRiskScore200Response' do + expect(instance).to be_instance_of(OpenapiClient::GetRiskScore200Response) + end + end + describe 'test attribute "score"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "triggers"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/get_risk_score400_response_spec.rb b/spec/models/get_risk_score400_response_spec.rb new file mode 100644 index 0000000..3ec3381 --- /dev/null +++ b/spec/models/get_risk_score400_response_spec.rb @@ -0,0 +1,34 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::GetRiskScore400Response +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::GetRiskScore400Response do + let(:instance) { OpenapiClient::GetRiskScore400Response.new } + + describe 'test an instance of GetRiskScore400Response' do + it 'should create an instance of GetRiskScore400Response' do + expect(instance).to be_instance_of(OpenapiClient::GetRiskScore400Response) + end + end + describe 'test attribute "messages"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/get_risk_score_request_spec.rb b/spec/models/get_risk_score_request_spec.rb new file mode 100644 index 0000000..e500fd6 --- /dev/null +++ b/spec/models/get_risk_score_request_spec.rb @@ -0,0 +1,70 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::GetRiskScoreRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::GetRiskScoreRequest do + let(:instance) { OpenapiClient::GetRiskScoreRequest.new } + + describe 'test an instance of GetRiskScoreRequest' do + it 'should create an instance of GetRiskScoreRequest' do + expect(instance).to be_instance_of(OpenapiClient::GetRiskScoreRequest) + end + end + describe 'test attribute "ip"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "user_agent"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "user"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "source"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "session"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "device"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "fp"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/get_score_insights200_response_scores_spec.rb b/spec/models/get_score_insights200_response_scores_spec.rb new file mode 100644 index 0000000..444cee7 --- /dev/null +++ b/spec/models/get_score_insights200_response_scores_spec.rb @@ -0,0 +1,58 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::GetScoreInsights200ResponseScores +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::GetScoreInsights200ResponseScores do + let(:instance) { OpenapiClient::GetScoreInsights200ResponseScores.new } + + describe 'test an instance of GetScoreInsights200ResponseScores' do + it 'should create an instance of GetScoreInsights200ResponseScores' do + expect(instance).to be_instance_of(OpenapiClient::GetScoreInsights200ResponseScores) + end + end + describe 'test attribute "minimal"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "low"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "medium"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "high"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "very_high"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/get_score_insights200_response_spec.rb b/spec/models/get_score_insights200_response_spec.rb new file mode 100644 index 0000000..5db7039 --- /dev/null +++ b/spec/models/get_score_insights200_response_spec.rb @@ -0,0 +1,40 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::GetScoreInsights200Response +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::GetScoreInsights200Response do + let(:instance) { OpenapiClient::GetScoreInsights200Response.new } + + describe 'test an instance of GetScoreInsights200Response' do + it 'should create an instance of GetScoreInsights200Response' do + expect(instance).to be_instance_of(OpenapiClient::GetScoreInsights200Response) + end + end + describe 'test attribute "scores"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "total"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/get_user_apps200_response_inner_spec.rb b/spec/models/get_user_apps200_response_inner_spec.rb new file mode 100644 index 0000000..ebb04ce --- /dev/null +++ b/spec/models/get_user_apps200_response_inner_spec.rb @@ -0,0 +1,84 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::GetUserApps200ResponseInner +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::GetUserApps200ResponseInner do + let(:instance) { OpenapiClient::GetUserApps200ResponseInner.new } + + describe 'test an instance of GetUserApps200ResponseInner' do + it 'should create an instance of GetUserApps200ResponseInner' do + expect(instance).to be_instance_of(OpenapiClient::GetUserApps200ResponseInner) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "icon_url"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "extension"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "login_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "provisioning_status"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["enabling", "disabling", "enabling_pending_approval", "disabling_pendding_approval", "enabled", "disabled", "disabling_failed", "enabling_failed"]) + # validator.allowable_values.each do |value| + # expect { instance.provisioning_status = value }.not_to raise_error + # end + end + end + + describe 'test attribute "provisioning_state"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["unknown", "provisioning", "modifying", "deleting", "provisioning_pending_approval", "deleting_pending_approval", "modifying_pending_approval", "linking", "provisioned", "deleted", "modifying_failed", "provisioning_failed", "deleting_failed", "linking_failed", "disabled", "nonexistent", "modifying_pending_approval_then_disabled"]) + # validator.allowable_values.each do |value| + # expect { instance.provisioning_state = value }.not_to raise_error + # end + end + end + + describe 'test attribute "provisioning_enabled"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/hook_conditions_inner_spec.rb b/spec/models/hook_conditions_inner_spec.rb new file mode 100644 index 0000000..5b20bea --- /dev/null +++ b/spec/models/hook_conditions_inner_spec.rb @@ -0,0 +1,46 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::HookConditionsInner +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::HookConditionsInner do + let(:instance) { OpenapiClient::HookConditionsInner.new } + + describe 'test an instance of HookConditionsInner' do + it 'should create an instance of HookConditionsInner' do + expect(instance).to be_instance_of(OpenapiClient::HookConditionsInner) + end + end + describe 'test attribute "source"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "operator"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "value"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/hook_options_spec.rb b/spec/models/hook_options_spec.rb new file mode 100644 index 0000000..f95299b --- /dev/null +++ b/spec/models/hook_options_spec.rb @@ -0,0 +1,46 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::HookOptions +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::HookOptions do + let(:instance) { OpenapiClient::HookOptions.new } + + describe 'test an instance of HookOptions' do + it 'should create an instance of HookOptions' do + expect(instance).to be_instance_of(OpenapiClient::HookOptions) + end + end + describe 'test attribute "risk_enabled"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "location_enabled"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "mfa_device_info_enabled"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/hook_spec.rb b/spec/models/hook_spec.rb new file mode 100644 index 0000000..6b2ce37 --- /dev/null +++ b/spec/models/hook_spec.rb @@ -0,0 +1,122 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::Hook +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::Hook do + let(:instance) { OpenapiClient::Hook.new } + + describe 'test an instance of Hook' do + it 'should create an instance of Hook' do + expect(instance).to be_instance_of(OpenapiClient::Hook) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "disabled"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "timeout"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "env_vars"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "runtime"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "retries"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "packages"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "function"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "context_version"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["ready", "create-queued", "create-running", "create-failed", "update-queued", "update-running", "update-failed"]) + # validator.allowable_values.each do |value| + # expect { instance.status = value }.not_to raise_error + # end + end + end + + describe 'test attribute "options"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "conditions"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "created_at"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "updated_at"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/hook_status_spec.rb b/spec/models/hook_status_spec.rb new file mode 100644 index 0000000..105fb8e --- /dev/null +++ b/spec/models/hook_status_spec.rb @@ -0,0 +1,40 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::HookStatus +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::HookStatus do + let(:instance) { OpenapiClient::HookStatus.new } + + describe 'test an instance of HookStatus' do + it 'should create an instance of HookStatus' do + expect(instance).to be_instance_of(OpenapiClient::HookStatus) + end + end + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "message"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/id_spec.rb b/spec/models/id_spec.rb new file mode 100644 index 0000000..cafc6cf --- /dev/null +++ b/spec/models/id_spec.rb @@ -0,0 +1,34 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::Id +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::Id do + let(:instance) { OpenapiClient::Id.new } + + describe 'test an instance of Id' do + it 'should create an instance of Id' do + expect(instance).to be_instance_of(OpenapiClient::Id) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/list_access_token_claims200_response_inner_spec.rb b/spec/models/list_access_token_claims200_response_inner_spec.rb new file mode 100644 index 0000000..4fbecf6 --- /dev/null +++ b/spec/models/list_access_token_claims200_response_inner_spec.rb @@ -0,0 +1,82 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::ListAccessTokenClaims200ResponseInner +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::ListAccessTokenClaims200ResponseInner do + let(:instance) { OpenapiClient::ListAccessTokenClaims200ResponseInner.new } + + describe 'test an instance of ListAccessTokenClaims200ResponseInner' do + it 'should create an instance of ListAccessTokenClaims200ResponseInner' do + expect(instance).to be_instance_of(OpenapiClient::ListAccessTokenClaims200ResponseInner) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "label"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "user_attribute_mappings"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "user_attribute_macros"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "attributes_transformations"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "skip_if_blank"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "values"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "default_values"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "provisioned_entitlements"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/list_actions200_response_inner_spec.rb b/spec/models/list_actions200_response_inner_spec.rb new file mode 100644 index 0000000..44460a7 --- /dev/null +++ b/spec/models/list_actions200_response_inner_spec.rb @@ -0,0 +1,40 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::ListActions200ResponseInner +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::ListActions200ResponseInner do + let(:instance) { OpenapiClient::ListActions200ResponseInner.new } + + describe 'test an instance of ListActions200ResponseInner' do + it 'should create an instance of ListActions200ResponseInner' do + expect(instance).to be_instance_of(OpenapiClient::ListActions200ResponseInner) + end + end + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "value"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/list_app_users200_response_inner_spec.rb b/spec/models/list_app_users200_response_inner_spec.rb new file mode 100644 index 0000000..3ce113c --- /dev/null +++ b/spec/models/list_app_users200_response_inner_spec.rb @@ -0,0 +1,58 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::ListAppUsers200ResponseInner +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::ListAppUsers200ResponseInner do + let(:instance) { OpenapiClient::ListAppUsers200ResponseInner.new } + + describe 'test an instance of ListAppUsers200ResponseInner' do + it 'should create an instance of ListAppUsers200ResponseInner' do + expect(instance).to be_instance_of(OpenapiClient::ListAppUsers200ResponseInner) + end + end + describe 'test attribute "firstname"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "email"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "lastname"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "username"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/list_authorization_servers200_response_inner_configuration_spec.rb b/spec/models/list_authorization_servers200_response_inner_configuration_spec.rb new file mode 100644 index 0000000..d9b1cbd --- /dev/null +++ b/spec/models/list_authorization_servers200_response_inner_configuration_spec.rb @@ -0,0 +1,40 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::ListAuthorizationServers200ResponseInnerConfiguration +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::ListAuthorizationServers200ResponseInnerConfiguration do + let(:instance) { OpenapiClient::ListAuthorizationServers200ResponseInnerConfiguration.new } + + describe 'test an instance of ListAuthorizationServers200ResponseInnerConfiguration' do + it 'should create an instance of ListAuthorizationServers200ResponseInnerConfiguration' do + expect(instance).to be_instance_of(OpenapiClient::ListAuthorizationServers200ResponseInnerConfiguration) + end + end + describe 'test attribute "resource_identifier"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "audiences"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/list_authorization_servers200_response_inner_spec.rb b/spec/models/list_authorization_servers200_response_inner_spec.rb new file mode 100644 index 0000000..5318cd8 --- /dev/null +++ b/spec/models/list_authorization_servers200_response_inner_spec.rb @@ -0,0 +1,52 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::ListAuthorizationServers200ResponseInner +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::ListAuthorizationServers200ResponseInner do + let(:instance) { OpenapiClient::ListAuthorizationServers200ResponseInner.new } + + describe 'test an instance of ListAuthorizationServers200ResponseInner' do + it 'should create an instance of ListAuthorizationServers200ResponseInner' do + expect(instance).to be_instance_of(OpenapiClient::ListAuthorizationServers200ResponseInner) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "configuration"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "description"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/list_condition_operators200_response_inner_spec.rb b/spec/models/list_condition_operators200_response_inner_spec.rb new file mode 100644 index 0000000..d1a5d82 --- /dev/null +++ b/spec/models/list_condition_operators200_response_inner_spec.rb @@ -0,0 +1,40 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::ListConditionOperators200ResponseInner +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::ListConditionOperators200ResponseInner do + let(:instance) { OpenapiClient::ListConditionOperators200ResponseInner.new } + + describe 'test an instance of ListConditionOperators200ResponseInner' do + it 'should create an instance of ListConditionOperators200ResponseInner' do + expect(instance).to be_instance_of(OpenapiClient::ListConditionOperators200ResponseInner) + end + end + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "value"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/list_condition_values200_response_inner_spec.rb b/spec/models/list_condition_values200_response_inner_spec.rb new file mode 100644 index 0000000..f0d51a6 --- /dev/null +++ b/spec/models/list_condition_values200_response_inner_spec.rb @@ -0,0 +1,40 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::ListConditionValues200ResponseInner +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::ListConditionValues200ResponseInner do + let(:instance) { OpenapiClient::ListConditionValues200ResponseInner.new } + + describe 'test an instance of ListConditionValues200ResponseInner' do + it 'should create an instance of ListConditionValues200ResponseInner' do + expect(instance).to be_instance_of(OpenapiClient::ListConditionValues200ResponseInner) + end + end + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "value"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/list_conditions200_response_inner_spec.rb b/spec/models/list_conditions200_response_inner_spec.rb new file mode 100644 index 0000000..c1c5709 --- /dev/null +++ b/spec/models/list_conditions200_response_inner_spec.rb @@ -0,0 +1,40 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::ListConditions200ResponseInner +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::ListConditions200ResponseInner do + let(:instance) { OpenapiClient::ListConditions200ResponseInner.new } + + describe 'test an instance of ListConditions200ResponseInner' do + it 'should create an instance of ListConditions200ResponseInner' do + expect(instance).to be_instance_of(OpenapiClient::ListConditions200ResponseInner) + end + end + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "value"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/list_mapping_condition_operators200_response_inner_spec.rb b/spec/models/list_mapping_condition_operators200_response_inner_spec.rb new file mode 100644 index 0000000..4bfc80f --- /dev/null +++ b/spec/models/list_mapping_condition_operators200_response_inner_spec.rb @@ -0,0 +1,40 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::ListMappingConditionOperators200ResponseInner +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::ListMappingConditionOperators200ResponseInner do + let(:instance) { OpenapiClient::ListMappingConditionOperators200ResponseInner.new } + + describe 'test an instance of ListMappingConditionOperators200ResponseInner' do + it 'should create an instance of ListMappingConditionOperators200ResponseInner' do + expect(instance).to be_instance_of(OpenapiClient::ListMappingConditionOperators200ResponseInner) + end + end + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "value"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/list_mapping_conditions200_response_inner_spec.rb b/spec/models/list_mapping_conditions200_response_inner_spec.rb new file mode 100644 index 0000000..8b8c392 --- /dev/null +++ b/spec/models/list_mapping_conditions200_response_inner_spec.rb @@ -0,0 +1,40 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::ListMappingConditions200ResponseInner +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::ListMappingConditions200ResponseInner do + let(:instance) { OpenapiClient::ListMappingConditions200ResponseInner.new } + + describe 'test an instance of ListMappingConditions200ResponseInner' do + it 'should create an instance of ListMappingConditions200ResponseInner' do + expect(instance).to be_instance_of(OpenapiClient::ListMappingConditions200ResponseInner) + end + end + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "value"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/list_scopes200_response_inner_spec.rb b/spec/models/list_scopes200_response_inner_spec.rb new file mode 100644 index 0000000..bc7bd65 --- /dev/null +++ b/spec/models/list_scopes200_response_inner_spec.rb @@ -0,0 +1,46 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::ListScopes200ResponseInner +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::ListScopes200ResponseInner do + let(:instance) { OpenapiClient::ListScopes200ResponseInner.new } + + describe 'test an instance of ListScopes200ResponseInner' do + it 'should create an instance of ListScopes200ResponseInner' do + expect(instance).to be_instance_of(OpenapiClient::ListScopes200ResponseInner) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "value"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "description"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/log_spec.rb b/spec/models/log_spec.rb new file mode 100644 index 0000000..d199218 --- /dev/null +++ b/spec/models/log_spec.rb @@ -0,0 +1,52 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::Log +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::Log do + let(:instance) { OpenapiClient::Log.new } + + describe 'test an instance of Log' do + it 'should create an instance of Log' do + expect(instance).to be_instance_of(OpenapiClient::Log) + end + end + describe 'test attribute "request_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "correlation_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "created_at"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "events"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/mapping_spec.rb b/spec/models/mapping_spec.rb new file mode 100644 index 0000000..331e589 --- /dev/null +++ b/spec/models/mapping_spec.rb @@ -0,0 +1,74 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::Mapping +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::Mapping do + let(:instance) { OpenapiClient::Mapping.new } + + describe 'test an instance of Mapping' do + it 'should create an instance of Mapping' do + expect(instance).to be_instance_of(OpenapiClient::Mapping) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "enabled"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "match"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["all", "any"]) + # validator.allowable_values.each do |value| + # expect { instance.match = value }.not_to raise_error + # end + end + end + + describe 'test attribute "position"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "conditions"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "actions"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/registration_spec.rb b/spec/models/registration_spec.rb new file mode 100644 index 0000000..42377a0 --- /dev/null +++ b/spec/models/registration_spec.rb @@ -0,0 +1,50 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::Registration +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::Registration do + let(:instance) { OpenapiClient::Registration.new } + + describe 'test an instance of Registration' do + it 'should create an instance of Registration' do + expect(instance).to be_instance_of(OpenapiClient::Registration) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["pending", "accepted"]) + # validator.allowable_values.each do |value| + # expect { instance.status = value }.not_to raise_error + # end + end + end + + describe 'test attribute "device_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/remove_role_users_request_spec.rb b/spec/models/remove_role_users_request_spec.rb new file mode 100644 index 0000000..a783166 --- /dev/null +++ b/spec/models/remove_role_users_request_spec.rb @@ -0,0 +1,34 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::RemoveRoleUsersRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::RemoveRoleUsersRequest do + let(:instance) { OpenapiClient::RemoveRoleUsersRequest.new } + + describe 'test an instance of RemoveRoleUsersRequest' do + it 'should create an instance of RemoveRoleUsersRequest' do + expect(instance).to be_instance_of(OpenapiClient::RemoveRoleUsersRequest) + end + end + describe 'test attribute "user_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/revoke_token_request_spec.rb b/spec/models/revoke_token_request_spec.rb new file mode 100644 index 0000000..18dcdf1 --- /dev/null +++ b/spec/models/revoke_token_request_spec.rb @@ -0,0 +1,34 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::RevokeTokenRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::RevokeTokenRequest do + let(:instance) { OpenapiClient::RevokeTokenRequest.new } + + describe 'test an instance of RevokeTokenRequest' do + it 'should create an instance of RevokeTokenRequest' do + expect(instance).to be_instance_of(OpenapiClient::RevokeTokenRequest) + end + end + describe 'test attribute "access_token"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/risk_device_spec.rb b/spec/models/risk_device_spec.rb new file mode 100644 index 0000000..494b9b0 --- /dev/null +++ b/spec/models/risk_device_spec.rb @@ -0,0 +1,34 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::RiskDevice +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::RiskDevice do + let(:instance) { OpenapiClient::RiskDevice.new } + + describe 'test an instance of RiskDevice' do + it 'should create an instance of RiskDevice' do + expect(instance).to be_instance_of(OpenapiClient::RiskDevice) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/risk_rule_spec.rb b/spec/models/risk_rule_spec.rb new file mode 100644 index 0000000..5bed3c0 --- /dev/null +++ b/spec/models/risk_rule_spec.rb @@ -0,0 +1,78 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::RiskRule +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::RiskRule do + let(:instance) { OpenapiClient::RiskRule.new } + + describe 'test an instance of RiskRule' do + it 'should create an instance of RiskRule' do + expect(instance).to be_instance_of(OpenapiClient::RiskRule) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "description"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["blacklist", "whitelist"]) + # validator.allowable_values.each do |value| + # expect { instance.type = value }.not_to raise_error + # end + end + end + + describe 'test attribute "target"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["location.ip", "location.address.country_iso_code"]) + # validator.allowable_values.each do |value| + # expect { instance.target = value }.not_to raise_error + # end + end + end + + describe 'test attribute "filters"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "source"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/risk_user_spec.rb b/spec/models/risk_user_spec.rb new file mode 100644 index 0000000..38cd2c4 --- /dev/null +++ b/spec/models/risk_user_spec.rb @@ -0,0 +1,46 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::RiskUser +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::RiskUser do + let(:instance) { OpenapiClient::RiskUser.new } + + describe 'test an instance of RiskUser' do + it 'should create an instance of RiskUser' do + expect(instance).to be_instance_of(OpenapiClient::RiskUser) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "authenticated"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/role_spec.rb b/spec/models/role_spec.rb new file mode 100644 index 0000000..275a8d2 --- /dev/null +++ b/spec/models/role_spec.rb @@ -0,0 +1,58 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::Role +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::Role do + let(:instance) { OpenapiClient::Role.new } + + describe 'test an instance of Role' do + it 'should create an instance of Role' do + expect(instance).to be_instance_of(OpenapiClient::Role) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "apps"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "users"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "admins"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/rule_id_spec.rb b/spec/models/rule_id_spec.rb new file mode 100644 index 0000000..6034625 --- /dev/null +++ b/spec/models/rule_id_spec.rb @@ -0,0 +1,34 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::RuleId +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::RuleId do + let(:instance) { OpenapiClient::RuleId.new } + + describe 'test an instance of RuleId' do + it 'should create an instance of RuleId' do + expect(instance).to be_instance_of(OpenapiClient::RuleId) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/rule_spec.rb b/spec/models/rule_spec.rb new file mode 100644 index 0000000..b5aa7d6 --- /dev/null +++ b/spec/models/rule_spec.rb @@ -0,0 +1,74 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::Rule +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::Rule do + let(:instance) { OpenapiClient::Rule.new } + + describe 'test an instance of Rule' do + it 'should create an instance of Rule' do + expect(instance).to be_instance_of(OpenapiClient::Rule) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "match"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["all", "any"]) + # validator.allowable_values.each do |value| + # expect { instance.match = value }.not_to raise_error + # end + end + end + + describe 'test attribute "enabled"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "position"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "conditions"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "actions"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/schema1_added_by_spec.rb b/spec/models/schema1_added_by_spec.rb new file mode 100644 index 0000000..ab94a41 --- /dev/null +++ b/spec/models/schema1_added_by_spec.rb @@ -0,0 +1,40 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::Schema1AddedBy +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::Schema1AddedBy do + let(:instance) { OpenapiClient::Schema1AddedBy.new } + + describe 'test an instance of Schema1AddedBy' do + it 'should create an instance of Schema1AddedBy' do + expect(instance).to be_instance_of(OpenapiClient::Schema1AddedBy) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/schema1_spec.rb b/spec/models/schema1_spec.rb new file mode 100644 index 0000000..c13316b --- /dev/null +++ b/spec/models/schema1_spec.rb @@ -0,0 +1,64 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::Schema1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::Schema1 do + let(:instance) { OpenapiClient::Schema1.new } + + describe 'test an instance of Schema1' do + it 'should create an instance of Schema1' do + expect(instance).to be_instance_of(OpenapiClient::Schema1) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "username"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "added_by"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "added_at"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "assigned"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/schema_provisioning_spec.rb b/spec/models/schema_provisioning_spec.rb new file mode 100644 index 0000000..190f247 --- /dev/null +++ b/spec/models/schema_provisioning_spec.rb @@ -0,0 +1,34 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::SchemaProvisioning +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::SchemaProvisioning do + let(:instance) { OpenapiClient::SchemaProvisioning.new } + + describe 'test an instance of SchemaProvisioning' do + it 'should create an instance of SchemaProvisioning' do + expect(instance).to be_instance_of(OpenapiClient::SchemaProvisioning) + end + end + describe 'test attribute "enabled"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/schema_spec.rb b/spec/models/schema_spec.rb new file mode 100644 index 0000000..09f1746 --- /dev/null +++ b/spec/models/schema_spec.rb @@ -0,0 +1,152 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::Schema +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::Schema do + let(:instance) { OpenapiClient::Schema.new } + + describe 'test an instance of Schema' do + it 'should create an instance of Schema' do + expect(instance).to be_instance_of(OpenapiClient::Schema) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "connector_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "description"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "notes"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "policy_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "brand_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "icon_url"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "visible"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "auth_method"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('Integer', [0, 1, 2, 3, 4, 6, 7, 8]) + # validator.allowable_values.each do |value| + # expect { instance.auth_method = value }.not_to raise_error + # end + end + end + + describe 'test attribute "tab_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "created_at"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "updated_at"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "role_ids"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "allow_assumed_signin"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "provisioning"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "sso"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "configuration"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "parameters"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "enforcement_point"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/session_spec.rb b/spec/models/session_spec.rb new file mode 100644 index 0000000..2390535 --- /dev/null +++ b/spec/models/session_spec.rb @@ -0,0 +1,34 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::Session +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::Session do + let(:instance) { OpenapiClient::Session.new } + + describe 'test an instance of Session' do + it 'should create an instance of Session' do + expect(instance).to be_instance_of(OpenapiClient::Session) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/set_role_apps200_response_inner_spec.rb b/spec/models/set_role_apps200_response_inner_spec.rb new file mode 100644 index 0000000..76943ff --- /dev/null +++ b/spec/models/set_role_apps200_response_inner_spec.rb @@ -0,0 +1,34 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::SetRoleApps200ResponseInner +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::SetRoleApps200ResponseInner do + let(:instance) { OpenapiClient::SetRoleApps200ResponseInner.new } + + describe 'test an instance of SetRoleApps200ResponseInner' do + it 'should create an instance of SetRoleApps200ResponseInner' do + expect(instance).to be_instance_of(OpenapiClient::SetRoleApps200ResponseInner) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/source_spec.rb b/spec/models/source_spec.rb new file mode 100644 index 0000000..db84eec --- /dev/null +++ b/spec/models/source_spec.rb @@ -0,0 +1,40 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::Source +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::Source do + let(:instance) { OpenapiClient::Source.new } + + describe 'test an instance of Source' do + it 'should create an instance of Source' do + expect(instance).to be_instance_of(OpenapiClient::Source) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/status1_spec.rb b/spec/models/status1_spec.rb new file mode 100644 index 0000000..baec350 --- /dev/null +++ b/spec/models/status1_spec.rb @@ -0,0 +1,46 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::Status1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::Status1 do + let(:instance) { OpenapiClient::Status1.new } + + describe 'test an instance of Status1' do + it 'should create an instance of Status1' do + expect(instance).to be_instance_of(OpenapiClient::Status1) + end + end + describe 'test attribute "message"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "status_code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/status2_spec.rb b/spec/models/status2_spec.rb new file mode 100644 index 0000000..2391f5a --- /dev/null +++ b/spec/models/status2_spec.rb @@ -0,0 +1,34 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::Status2 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::Status2 do + let(:instance) { OpenapiClient::Status2.new } + + describe 'test an instance of Status2' do + it 'should create an instance of Status2' do + expect(instance).to be_instance_of(OpenapiClient::Status2) + end + end + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/status2_status_spec.rb b/spec/models/status2_status_spec.rb new file mode 100644 index 0000000..90ff951 --- /dev/null +++ b/spec/models/status2_status_spec.rb @@ -0,0 +1,52 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::Status2Status +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::Status2Status do + let(:instance) { OpenapiClient::Status2Status.new } + + describe 'test an instance of Status2Status' do + it 'should create an instance of Status2Status' do + expect(instance).to be_instance_of(OpenapiClient::Status2Status) + end + end + describe 'test attribute "type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "message"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "error"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/status_spec.rb b/spec/models/status_spec.rb new file mode 100644 index 0000000..292dcc9 --- /dev/null +++ b/spec/models/status_spec.rb @@ -0,0 +1,52 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::Status +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::Status do + let(:instance) { OpenapiClient::Status.new } + + describe 'test an instance of Status' do + it 'should create an instance of Status' do + expect(instance).to be_instance_of(OpenapiClient::Status) + end + end + describe 'test attribute "error"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "message"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/track_event_request_spec.rb b/spec/models/track_event_request_spec.rb new file mode 100644 index 0000000..c8e5906 --- /dev/null +++ b/spec/models/track_event_request_spec.rb @@ -0,0 +1,82 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::TrackEventRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::TrackEventRequest do + let(:instance) { OpenapiClient::TrackEventRequest.new } + + describe 'test an instance of TrackEventRequest' do + it 'should create an instance of TrackEventRequest' do + expect(instance).to be_instance_of(OpenapiClient::TrackEventRequest) + end + end + describe 'test attribute "verb"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "ip"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "user_agent"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "user"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "source"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "session"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "device"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "fp"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "published"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/update_authorization_server400_response_spec.rb b/spec/models/update_authorization_server400_response_spec.rb new file mode 100644 index 0000000..b2edd9e --- /dev/null +++ b/spec/models/update_authorization_server400_response_spec.rb @@ -0,0 +1,52 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::UpdateAuthorizationServer400Response +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::UpdateAuthorizationServer400Response do + let(:instance) { OpenapiClient::UpdateAuthorizationServer400Response.new } + + describe 'test an instance of UpdateAuthorizationServer400Response' do + it 'should create an instance of UpdateAuthorizationServer400Response' do + expect(instance).to be_instance_of(OpenapiClient::UpdateAuthorizationServer400Response) + end + end + describe 'test attribute "field"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "message"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "status_code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/update_client_app_request_spec.rb b/spec/models/update_client_app_request_spec.rb new file mode 100644 index 0000000..75a1fbc --- /dev/null +++ b/spec/models/update_client_app_request_spec.rb @@ -0,0 +1,34 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::UpdateClientAppRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::UpdateClientAppRequest do + let(:instance) { OpenapiClient::UpdateClientAppRequest.new } + + describe 'test an instance of UpdateClientAppRequest' do + it 'should create an instance of UpdateClientAppRequest' do + expect(instance).to be_instance_of(OpenapiClient::UpdateClientAppRequest) + end + end + describe 'test attribute "scopes"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/update_environment_variable_request_spec.rb b/spec/models/update_environment_variable_request_spec.rb new file mode 100644 index 0000000..5a791a5 --- /dev/null +++ b/spec/models/update_environment_variable_request_spec.rb @@ -0,0 +1,34 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::UpdateEnvironmentVariableRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::UpdateEnvironmentVariableRequest do + let(:instance) { OpenapiClient::UpdateEnvironmentVariableRequest.new } + + describe 'test an instance of UpdateEnvironmentVariableRequest' do + it 'should create an instance of UpdateEnvironmentVariableRequest' do + expect(instance).to be_instance_of(OpenapiClient::UpdateEnvironmentVariableRequest) + end + end + describe 'test attribute "value"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/update_role200_response_spec.rb b/spec/models/update_role200_response_spec.rb new file mode 100644 index 0000000..eda0cc4 --- /dev/null +++ b/spec/models/update_role200_response_spec.rb @@ -0,0 +1,34 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::UpdateRole200Response +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::UpdateRole200Response do + let(:instance) { OpenapiClient::UpdateRole200Response.new } + + describe 'test an instance of UpdateRole200Response' do + it 'should create an instance of UpdateRole200Response' do + expect(instance).to be_instance_of(OpenapiClient::UpdateRole200Response) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb new file mode 100644 index 0000000..37cde63 --- /dev/null +++ b/spec/models/user_spec.rb @@ -0,0 +1,258 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::User +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::User do + let(:instance) { OpenapiClient::User.new } + + describe 'test an instance of User' do + it 'should create an instance of User' do + expect(instance).to be_instance_of(OpenapiClient::User) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "username"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "email"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "firstname"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "lastname"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "title"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "department"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "company"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "comment"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "group_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "role_ids"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "phone"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "state"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('Integer', [0, 1, 2, 3]) + # validator.allowable_values.each do |value| + # expect { instance.state = value }.not_to raise_error + # end + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('Integer', [0, 1, 2, 3, 4, 5, 7, 8]) + # validator.allowable_values.each do |value| + # expect { instance.status = value }.not_to raise_error + # end + end + end + + describe 'test attribute "directory_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "trusted_idp_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "manager_ad_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "manager_user_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "samaccount_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "member_of"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "userprincipalname"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "distinguished_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "external_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "activated_at"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "last_login"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "invitation_sent_at"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "updated_at"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "preferred_locale_code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "created_at"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "custom_attributes"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "invalid_login_attempts"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "locked_until"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "password_changed_at"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "password"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "password_confirmation"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "password_algorithm"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "salt"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/verify_enrollment_request_spec.rb b/spec/models/verify_enrollment_request_spec.rb new file mode 100644 index 0000000..1484ead --- /dev/null +++ b/spec/models/verify_enrollment_request_spec.rb @@ -0,0 +1,34 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::VerifyEnrollmentRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::VerifyEnrollmentRequest do + let(:instance) { OpenapiClient::VerifyEnrollmentRequest.new } + + describe 'test an instance of VerifyEnrollmentRequest' do + it 'should create an instance of VerifyEnrollmentRequest' do + expect(instance).to be_instance_of(OpenapiClient::VerifyEnrollmentRequest) + end + end + describe 'test attribute "otp"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/verify_factor_request_spec.rb b/spec/models/verify_factor_request_spec.rb new file mode 100644 index 0000000..ccb34f7 --- /dev/null +++ b/spec/models/verify_factor_request_spec.rb @@ -0,0 +1,40 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::VerifyFactorRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::VerifyFactorRequest do + let(:instance) { OpenapiClient::VerifyFactorRequest.new } + + describe 'test an instance of VerifyFactorRequest' do + it 'should create an instance of VerifyFactorRequest' do + expect(instance).to be_instance_of(OpenapiClient::VerifyFactorRequest) + end + end + describe 'test attribute "otp"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "device_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/verify_factor_saml200_response_spec.rb b/spec/models/verify_factor_saml200_response_spec.rb new file mode 100644 index 0000000..a37f207 --- /dev/null +++ b/spec/models/verify_factor_saml200_response_spec.rb @@ -0,0 +1,40 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::VerifyFactorSaml200Response +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::VerifyFactorSaml200Response do + let(:instance) { OpenapiClient::VerifyFactorSaml200Response.new } + + describe 'test an instance of VerifyFactorSaml200Response' do + it 'should create an instance of VerifyFactorSaml200Response' do + expect(instance).to be_instance_of(OpenapiClient::VerifyFactorSaml200Response) + end + end + describe 'test attribute "data"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "message"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/verify_factor_saml_request_spec.rb b/spec/models/verify_factor_saml_request_spec.rb new file mode 100644 index 0000000..5a617e5 --- /dev/null +++ b/spec/models/verify_factor_saml_request_spec.rb @@ -0,0 +1,58 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::VerifyFactorSamlRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::VerifyFactorSamlRequest do + let(:instance) { OpenapiClient::VerifyFactorSamlRequest.new } + + describe 'test an instance of VerifyFactorSamlRequest' do + it 'should create an instance of VerifyFactorSamlRequest' do + expect(instance).to be_instance_of(OpenapiClient::VerifyFactorSamlRequest) + end + end + describe 'test attribute "app_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "device_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "state_token"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "otp_token"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "do_not_notify"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/verify_factor_voice200_response_inner_spec.rb b/spec/models/verify_factor_voice200_response_inner_spec.rb new file mode 100644 index 0000000..b78d411 --- /dev/null +++ b/spec/models/verify_factor_voice200_response_inner_spec.rb @@ -0,0 +1,50 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::VerifyFactorVoice200ResponseInner +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::VerifyFactorVoice200ResponseInner do + let(:instance) { OpenapiClient::VerifyFactorVoice200ResponseInner.new } + + describe 'test an instance of VerifyFactorVoice200ResponseInner' do + it 'should create an instance of VerifyFactorVoice200ResponseInner' do + expect(instance).to be_instance_of(OpenapiClient::VerifyFactorVoice200ResponseInner) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["pending", "accepted", "rejected"]) + # validator.allowable_values.each do |value| + # expect { instance.status = value }.not_to raise_error + # end + end + end + + describe 'test attribute "device_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index b836733..d6ff63d 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,14 +1,111 @@ -require "bundler/setup" -require "onelogin" +=begin +#OneLogin API +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +# load the gem +require 'openapi_client' + +# The following was generated by the `rspec --init` command. Conventionally, all +# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`. +# The generated `.rspec` file contains `--require spec_helper` which will cause +# this file to always be loaded, without a need to explicitly require it in any +# files. +# +# Given that it is always loaded, you are encouraged to keep this file as +# light-weight as possible. Requiring heavyweight dependencies from this file +# will add to the boot time of your test suite on EVERY test run, even for an +# individual file that may not need all of that loaded. Instead, consider making +# a separate helper file that requires the additional dependencies and performs +# the additional setup, and require it from the spec files that actually need +# it. +# +# The `.rspec` file also contains a few flags that are not defaults but that +# users commonly want. +# +# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration RSpec.configure do |config| - # Enable flags like --only-failures and --next-failure - config.example_status_persistence_file_path = ".rspec_status" + # rspec-expectations config goes here. You can use an alternate + # assertion/expectation library such as wrong or the stdlib/minitest + # assertions if you prefer. + config.expect_with :rspec do |expectations| + # This option will default to `true` in RSpec 4. It makes the `description` + # and `failure_message` of custom matchers include text for helper methods + # defined using `chain`, e.g.: + # be_bigger_than(2).and_smaller_than(4).description + # # => "be bigger than 2 and smaller than 4" + # ...rather than: + # # => "be bigger than 2" + expectations.include_chain_clauses_in_custom_matcher_descriptions = true + end + + # rspec-mocks config goes here. You can use an alternate test double + # library (such as bogus or mocha) by changing the `mock_with` option here. + config.mock_with :rspec do |mocks| + # Prevents you from mocking or stubbing a method that does not exist on + # a real object. This is generally recommended, and will default to + # `true` in RSpec 4. + mocks.verify_partial_doubles = true + end + +# The settings below are suggested to provide a good initial experience +# with RSpec, but feel free to customize to your heart's content. +=begin + # These two settings work together to allow you to limit a spec run + # to individual examples or groups you care about by tagging them with + # `:focus` metadata. When nothing is tagged with `:focus`, all examples + # get run. + config.filter_run :focus + config.run_all_when_everything_filtered = true - # Disable RSpec exposing methods globally on `Module` and `main` + # Allows RSpec to persist some state between runs in order to support + # the `--only-failures` and `--next-failure` CLI options. We recommend + # you configure your source control system to ignore this file. + config.example_status_persistence_file_path = "spec/examples.txt" + + # Limits the available syntax to the non-monkey patched syntax that is + # recommended. For more details, see: + # - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/ + # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/ + # - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode config.disable_monkey_patching! - config.expect_with :rspec do |c| - c.syntax = :expect + # This setting enables warnings. It's recommended, but in some cases may + # be too noisy due to issues in dependencies. + config.warnings = true + + # Many RSpec users commonly either run the entire suite or an individual + # file, and it's useful to allow more verbose output when running an + # individual spec file. + if config.files_to_run.one? + # Use the documentation formatter for detailed output, + # unless a formatter has already been configured + # (e.g. via a command-line flag). + config.default_formatter = 'doc' end + + # Print the 10 slowest examples and example groups at the + # end of the spec run, to help surface which specs are running + # particularly slow. + config.profile_examples = 10 + + # Run specs in random order to surface order dependencies. If you find an + # order dependency and want to debug it, you can fix the order by providing + # the seed, which is printed after each run. + # --seed 1234 + config.order = :random + + # Seed global randomization in this process using the `--seed` CLI option. + # Setting this allows you to use `--seed` to deterministically reproduce + # test failures related to randomization by passing the same `--seed` value + # as the one that triggered the failure. + Kernel.srand config.seed +=end end From 56e2ab84a53416d92dd7e9c2e69a0b446e42ffda Mon Sep 17 00:00:00 2001 From: George Khaburzaniya Date: Thu, 11 Aug 2022 13:56:06 -0700 Subject: [PATCH 2/4] Add git repo info. --- .openapi-generator/FILES | 92 ---------------------------------------- README.md | 4 +- git_push.sh | 4 +- 3 files changed, 4 insertions(+), 96 deletions(-) diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 1020df1..8d8002b 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -1,6 +1,5 @@ .gitignore .gitlab-ci.yml -.openapi-generator-ignore .rspec .rubocop.yml .travis.yml @@ -196,97 +195,6 @@ lib/openapi_client/models/verify_factor_saml_request.rb lib/openapi_client/models/verify_factor_voice200_response_inner.rb lib/openapi_client/version.rb openapi_client.gemspec -spec/api/default_api_spec.rb spec/api_client_spec.rb spec/configuration_spec.rb -spec/models/action_spec.rb -spec/models/activate_factor_request_spec.rb -spec/models/add_access_token_claim_request_spec.rb -spec/models/add_client_app_request_spec.rb -spec/models/add_role_users200_response_inner_spec.rb -spec/models/add_scope_request_spec.rb -spec/models/auth_method_spec.rb -spec/models/auth_server_configuration_spec.rb -spec/models/client_app_spec.rb -spec/models/condition_spec.rb -spec/models/connector_spec.rb -spec/models/create_authorization_server_request_spec.rb -spec/models/create_environment_variable_request_spec.rb -spec/models/create_roles201_response_inner_spec.rb -spec/models/device_spec.rb -spec/models/enroll_factor_request_spec.rb -spec/models/envvar_spec.rb -spec/models/error_status_errors_inner_spec.rb -spec/models/error_status_spec.rb -spec/models/factor_inner_factor_data_spec.rb -spec/models/factor_inner_spec.rb -spec/models/generate_mfa_token200_response_spec.rb -spec/models/generate_mfa_token422_response_details_spec.rb -spec/models/generate_mfa_token422_response_spec.rb -spec/models/generate_mfa_token_request_spec.rb -spec/models/generate_saml_assertion_request_spec.rb -spec/models/generate_token200_response_spec.rb -spec/models/generate_token400_response_spec.rb -spec/models/generate_token_request_spec.rb -spec/models/get_authorization_server200_response_spec.rb -spec/models/get_available_factors200_response_inner_spec.rb -spec/models/get_client_apps200_response_inner_scopes_inner_spec.rb -spec/models/get_client_apps200_response_inner_spec.rb -spec/models/get_rate_limit200_response_data_spec.rb -spec/models/get_rate_limit200_response_spec.rb -spec/models/get_risk_score200_response_spec.rb -spec/models/get_risk_score400_response_spec.rb -spec/models/get_risk_score_request_spec.rb -spec/models/get_score_insights200_response_scores_spec.rb -spec/models/get_score_insights200_response_spec.rb -spec/models/get_user_apps200_response_inner_spec.rb -spec/models/hook_conditions_inner_spec.rb -spec/models/hook_options_spec.rb -spec/models/hook_spec.rb -spec/models/hook_status_spec.rb -spec/models/id_spec.rb -spec/models/list_access_token_claims200_response_inner_spec.rb -spec/models/list_actions200_response_inner_spec.rb -spec/models/list_app_users200_response_inner_spec.rb -spec/models/list_authorization_servers200_response_inner_configuration_spec.rb -spec/models/list_authorization_servers200_response_inner_spec.rb -spec/models/list_condition_operators200_response_inner_spec.rb -spec/models/list_condition_values200_response_inner_spec.rb -spec/models/list_conditions200_response_inner_spec.rb -spec/models/list_mapping_condition_operators200_response_inner_spec.rb -spec/models/list_mapping_conditions200_response_inner_spec.rb -spec/models/list_scopes200_response_inner_spec.rb -spec/models/log_spec.rb -spec/models/mapping_spec.rb -spec/models/registration_spec.rb -spec/models/remove_role_users_request_spec.rb -spec/models/revoke_token_request_spec.rb -spec/models/risk_device_spec.rb -spec/models/risk_rule_spec.rb -spec/models/risk_user_spec.rb -spec/models/role_spec.rb -spec/models/rule_id_spec.rb -spec/models/rule_spec.rb -spec/models/schema1_added_by_spec.rb -spec/models/schema1_spec.rb -spec/models/schema_provisioning_spec.rb -spec/models/schema_spec.rb -spec/models/session_spec.rb -spec/models/set_role_apps200_response_inner_spec.rb -spec/models/source_spec.rb -spec/models/status1_spec.rb -spec/models/status2_spec.rb -spec/models/status2_status_spec.rb -spec/models/status_spec.rb -spec/models/track_event_request_spec.rb -spec/models/update_authorization_server400_response_spec.rb -spec/models/update_client_app_request_spec.rb -spec/models/update_environment_variable_request_spec.rb -spec/models/update_role200_response_spec.rb -spec/models/user_spec.rb -spec/models/verify_enrollment_request_spec.rb -spec/models/verify_factor_request_spec.rb -spec/models/verify_factor_saml200_response_spec.rb -spec/models/verify_factor_saml_request_spec.rb -spec/models/verify_factor_voice200_response_inner_spec.rb spec/spec_helper.rb diff --git a/README.md b/README.md index 4ac198f..f18dd7b 100644 --- a/README.md +++ b/README.md @@ -36,9 +36,9 @@ Finally add this to the Gemfile: ### Install from Git -If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile: +If the Ruby gem is hosted at a git repository: https://github.com/onelogin/onelogin-ruby-sdk, then add the following in the Gemfile: - gem 'openapi_client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git' + gem 'openapi_client', :git => 'https://github.com/onelogin/onelogin-ruby-sdk.git' ### Include the Ruby code directly diff --git a/git_push.sh b/git_push.sh index f53a75d..5401457 100644 --- a/git_push.sh +++ b/git_push.sh @@ -14,12 +14,12 @@ if [ "$git_host" = "" ]; then fi if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" + git_user_id="onelogin" echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" + git_repo_id="onelogin-ruby-sdk" echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi From fa2aa65433769a3788f6dd2ea29757a49a4335d2 Mon Sep 17 00:00:00 2001 From: George Khaburzaniya Date: Thu, 11 Aug 2022 14:07:34 -0700 Subject: [PATCH 3/4] Use config file to get proper gemspec. --- .openapi-generator/FILES | 285 ++++-- .travis.yml | 4 +- README.md | 404 ++++---- docs/Action.md | 6 +- docs/ActivateFactorRequest.md | 6 +- docs/AddAccessTokenClaimRequest.md | 6 +- docs/AddClientAppRequest.md | 6 +- docs/AddRoleUsers200ResponseInner.md | 6 +- docs/AddScopeRequest.md | 6 +- docs/AuthMethod.md | 6 +- docs/AuthServerConfiguration.md | 6 +- docs/ClientApp.md | 6 +- docs/Condition.md | 6 +- docs/Connector.md | 6 +- docs/CreateAuthorizationServerRequest.md | 6 +- docs/CreateEnvironmentVariableRequest.md | 6 +- docs/CreateRoles201ResponseInner.md | 6 +- docs/DefaultApi.md | 886 +++++++++--------- docs/Device.md | 6 +- docs/EnrollFactorRequest.md | 6 +- docs/Envvar.md | 6 +- docs/ErrorStatus.md | 6 +- docs/ErrorStatusErrorsInner.md | 6 +- docs/FactorInner.md | 6 +- docs/FactorInnerFactorData.md | 6 +- docs/GenerateMfaToken200Response.md | 6 +- docs/GenerateMfaToken422Response.md | 6 +- docs/GenerateMfaToken422ResponseDetails.md | 6 +- docs/GenerateMfaTokenRequest.md | 6 +- docs/GenerateSamlAssertionRequest.md | 6 +- docs/GenerateToken200Response.md | 6 +- docs/GenerateToken400Response.md | 6 +- docs/GenerateTokenRequest.md | 6 +- docs/GetAuthorizationServer200Response.md | 6 +- docs/GetAvailableFactors200ResponseInner.md | 6 +- docs/GetClientApps200ResponseInner.md | 6 +- ...etClientApps200ResponseInnerScopesInner.md | 6 +- docs/GetRateLimit200Response.md | 6 +- docs/GetRateLimit200ResponseData.md | 6 +- docs/GetRiskScore200Response.md | 6 +- docs/GetRiskScore400Response.md | 6 +- docs/GetRiskScoreRequest.md | 6 +- docs/GetScoreInsights200Response.md | 6 +- docs/GetScoreInsights200ResponseScores.md | 6 +- docs/GetUserApps200ResponseInner.md | 6 +- docs/Hook.md | 6 +- docs/HookConditionsInner.md | 6 +- docs/HookOptions.md | 6 +- docs/HookStatus.md | 6 +- docs/Id.md | 6 +- docs/ListAccessTokenClaims200ResponseInner.md | 6 +- docs/ListActions200ResponseInner.md | 6 +- docs/ListAppUsers200ResponseInner.md | 6 +- ...istAuthorizationServers200ResponseInner.md | 6 +- ...ionServers200ResponseInnerConfiguration.md | 6 +- .../ListConditionOperators200ResponseInner.md | 6 +- docs/ListConditionValues200ResponseInner.md | 6 +- docs/ListConditions200ResponseInner.md | 6 +- ...ppingConditionOperators200ResponseInner.md | 6 +- docs/ListMappingConditions200ResponseInner.md | 6 +- docs/ListScopes200ResponseInner.md | 6 +- docs/Log.md | 6 +- docs/Mapping.md | 6 +- docs/Registration.md | 6 +- docs/RemoveRoleUsersRequest.md | 6 +- docs/RevokeTokenRequest.md | 6 +- docs/RiskDevice.md | 6 +- docs/RiskRule.md | 6 +- docs/RiskUser.md | 6 +- docs/Role.md | 6 +- docs/Rule.md | 6 +- docs/RuleId.md | 6 +- docs/Schema.md | 6 +- docs/Schema1.md | 6 +- docs/Schema1AddedBy.md | 6 +- docs/SchemaProvisioning.md | 6 +- docs/Session.md | 6 +- docs/SetRoleApps200ResponseInner.md | 6 +- docs/Source.md | 6 +- docs/Status.md | 6 +- docs/Status1.md | 6 +- docs/Status2.md | 6 +- docs/Status2Status.md | 6 +- docs/TrackEventRequest.md | 6 +- docs/UpdateAuthorizationServer400Response.md | 6 +- docs/UpdateClientAppRequest.md | 6 +- docs/UpdateEnvironmentVariableRequest.md | 6 +- docs/UpdateRole200Response.md | 6 +- docs/User.md | 6 +- docs/VerifyEnrollmentRequest.md | 6 +- docs/VerifyFactorRequest.md | 6 +- docs/VerifyFactorSaml200Response.md | 6 +- docs/VerifyFactorSamlRequest.md | 6 +- docs/VerifyFactorVoice200ResponseInner.md | 6 +- lib/onelogin.rb | 130 +++ .../api/default_api.rb | 2 +- .../api_client.rb | 4 +- lib/{openapi_client => onelogin}/api_error.rb | 2 +- .../configuration.rb | 2 +- .../models/action.rb | 8 +- .../models/activate_factor_request.rb | 8 +- .../models/add_access_token_claim_request.rb | 8 +- .../models/add_client_app_request.rb | 8 +- .../add_role_users200_response_inner.rb | 8 +- .../models/add_scope_request.rb | 8 +- .../models/auth_method.rb | 2 +- .../models/auth_server_configuration.rb | 8 +- .../models/client_app.rb | 8 +- .../models/condition.rb | 8 +- .../models/connector.rb | 8 +- .../create_authorization_server_request.rb | 8 +- .../create_environment_variable_request.rb | 8 +- .../models/create_roles201_response_inner.rb | 8 +- .../models/device.rb | 8 +- .../models/enroll_factor_request.rb | 8 +- .../models/envvar.rb | 8 +- .../models/error_status.rb | 8 +- .../models/error_status_errors_inner.rb | 8 +- .../models/factor_inner.rb | 8 +- .../models/factor_inner_factor_data.rb | 8 +- .../models/generate_mfa_token200_response.rb | 8 +- .../models/generate_mfa_token422_response.rb | 8 +- .../generate_mfa_token422_response_details.rb | 8 +- .../models/generate_mfa_token_request.rb | 8 +- .../models/generate_saml_assertion_request.rb | 8 +- .../models/generate_token200_response.rb | 8 +- .../models/generate_token400_response.rb | 8 +- .../models/generate_token_request.rb | 8 +- .../get_authorization_server200_response.rb | 8 +- ...get_available_factors200_response_inner.rb | 8 +- .../get_client_apps200_response_inner.rb | 8 +- ...ent_apps200_response_inner_scopes_inner.rb | 8 +- .../models/get_rate_limit200_response.rb | 8 +- .../models/get_rate_limit200_response_data.rb | 8 +- .../models/get_risk_score200_response.rb | 8 +- .../models/get_risk_score400_response.rb | 8 +- .../models/get_risk_score_request.rb | 8 +- .../models/get_score_insights200_response.rb | 8 +- .../get_score_insights200_response_scores.rb | 8 +- .../models/get_user_apps200_response_inner.rb | 8 +- .../models/hook.rb | 8 +- .../models/hook_conditions_inner.rb | 8 +- .../models/hook_options.rb | 8 +- .../models/hook_status.rb | 8 +- lib/{openapi_client => onelogin}/models/id.rb | 8 +- ...t_access_token_claims200_response_inner.rb | 8 +- .../models/list_actions200_response_inner.rb | 8 +- .../list_app_users200_response_inner.rb | 8 +- ...authorization_servers200_response_inner.rb | 8 +- ...servers200_response_inner_configuration.rb | 8 +- ...t_condition_operators200_response_inner.rb | 8 +- ...list_condition_values200_response_inner.rb | 8 +- .../list_conditions200_response_inner.rb | 8 +- ...g_condition_operators200_response_inner.rb | 8 +- ...st_mapping_conditions200_response_inner.rb | 8 +- .../models/list_scopes200_response_inner.rb | 8 +- .../models/log.rb | 8 +- .../models/mapping.rb | 8 +- .../models/registration.rb | 8 +- .../models/remove_role_users_request.rb | 8 +- .../models/revoke_token_request.rb | 8 +- .../models/risk_device.rb | 8 +- .../models/risk_rule.rb | 8 +- .../models/risk_user.rb | 8 +- .../models/role.rb | 8 +- .../models/rule.rb | 8 +- .../models/rule_id.rb | 8 +- .../models/schema.rb | 8 +- .../models/schema1.rb | 8 +- .../models/schema1_added_by.rb | 8 +- .../models/schema_provisioning.rb | 8 +- .../models/session.rb | 8 +- .../models/set_role_apps200_response_inner.rb | 8 +- .../models/source.rb | 8 +- .../models/status.rb | 8 +- .../models/status1.rb | 8 +- .../models/status2.rb | 8 +- .../models/status2_status.rb | 8 +- .../models/track_event_request.rb | 8 +- ...update_authorization_server400_response.rb | 8 +- .../models/update_client_app_request.rb | 8 +- .../update_environment_variable_request.rb | 8 +- .../models/update_role200_response.rb | 8 +- .../models/user.rb | 8 +- .../models/verify_enrollment_request.rb | 8 +- .../models/verify_factor_request.rb | 8 +- .../models/verify_factor_saml200_response.rb | 8 +- .../models/verify_factor_saml_request.rb | 8 +- .../verify_factor_voice200_response_inner.rb | 8 +- lib/{openapi_client => onelogin}/version.rb | 2 +- lib/openapi_client.rb | 130 --- onelogin.gemspec | 77 +- openapi_client.gemspec | 38 - spec/api/default_api_spec.rb | 6 +- spec/api_client_spec.rb | 58 +- spec/configuration_spec.rb | 6 +- spec/models/action_spec.rb | 8 +- spec/models/activate_factor_request_spec.rb | 8 +- .../add_access_token_claim_request_spec.rb | 8 +- spec/models/add_client_app_request_spec.rb | 8 +- .../add_role_users200_response_inner_spec.rb | 8 +- spec/models/add_scope_request_spec.rb | 8 +- spec/models/auth_method_spec.rb | 8 +- spec/models/auth_server_configuration_spec.rb | 8 +- spec/models/client_app_spec.rb | 8 +- spec/models/condition_spec.rb | 8 +- spec/models/connector_spec.rb | 8 +- ...reate_authorization_server_request_spec.rb | 8 +- ...reate_environment_variable_request_spec.rb | 8 +- .../create_roles201_response_inner_spec.rb | 8 +- spec/models/device_spec.rb | 8 +- spec/models/enroll_factor_request_spec.rb | 8 +- spec/models/envvar_spec.rb | 8 +- spec/models/error_status_errors_inner_spec.rb | 8 +- spec/models/error_status_spec.rb | 8 +- spec/models/factor_inner_factor_data_spec.rb | 8 +- spec/models/factor_inner_spec.rb | 8 +- .../generate_mfa_token200_response_spec.rb | 8 +- ...rate_mfa_token422_response_details_spec.rb | 8 +- .../generate_mfa_token422_response_spec.rb | 8 +- .../models/generate_mfa_token_request_spec.rb | 8 +- .../generate_saml_assertion_request_spec.rb | 8 +- .../models/generate_token200_response_spec.rb | 8 +- .../models/generate_token400_response_spec.rb | 8 +- spec/models/generate_token_request_spec.rb | 8 +- ...t_authorization_server200_response_spec.rb | 8 +- ...vailable_factors200_response_inner_spec.rb | 8 +- ...pps200_response_inner_scopes_inner_spec.rb | 8 +- .../get_client_apps200_response_inner_spec.rb | 8 +- .../get_rate_limit200_response_data_spec.rb | 8 +- .../models/get_rate_limit200_response_spec.rb | 8 +- .../models/get_risk_score200_response_spec.rb | 8 +- .../models/get_risk_score400_response_spec.rb | 8 +- spec/models/get_risk_score_request_spec.rb | 8 +- ..._score_insights200_response_scores_spec.rb | 8 +- .../get_score_insights200_response_spec.rb | 8 +- .../get_user_apps200_response_inner_spec.rb | 8 +- spec/models/hook_conditions_inner_spec.rb | 8 +- spec/models/hook_options_spec.rb | 8 +- spec/models/hook_spec.rb | 8 +- spec/models/hook_status_spec.rb | 8 +- spec/models/id_spec.rb | 8 +- ...ess_token_claims200_response_inner_spec.rb | 8 +- .../list_actions200_response_inner_spec.rb | 8 +- .../list_app_users200_response_inner_spec.rb | 8 +- ...rs200_response_inner_configuration_spec.rb | 8 +- ...rization_servers200_response_inner_spec.rb | 8 +- ...dition_operators200_response_inner_spec.rb | 8 +- ...condition_values200_response_inner_spec.rb | 8 +- .../list_conditions200_response_inner_spec.rb | 8 +- ...dition_operators200_response_inner_spec.rb | 8 +- ...pping_conditions200_response_inner_spec.rb | 8 +- .../list_scopes200_response_inner_spec.rb | 8 +- spec/models/log_spec.rb | 8 +- spec/models/mapping_spec.rb | 8 +- spec/models/registration_spec.rb | 8 +- spec/models/remove_role_users_request_spec.rb | 8 +- spec/models/revoke_token_request_spec.rb | 8 +- spec/models/risk_device_spec.rb | 8 +- spec/models/risk_rule_spec.rb | 8 +- spec/models/risk_user_spec.rb | 8 +- spec/models/role_spec.rb | 8 +- spec/models/rule_id_spec.rb | 8 +- spec/models/rule_spec.rb | 8 +- spec/models/schema1_added_by_spec.rb | 8 +- spec/models/schema1_spec.rb | 8 +- spec/models/schema_provisioning_spec.rb | 8 +- spec/models/schema_spec.rb | 8 +- spec/models/session_spec.rb | 8 +- .../set_role_apps200_response_inner_spec.rb | 8 +- spec/models/source_spec.rb | 8 +- spec/models/status1_spec.rb | 8 +- spec/models/status2_spec.rb | 8 +- spec/models/status2_status_spec.rb | 8 +- spec/models/status_spec.rb | 8 +- spec/models/track_event_request_spec.rb | 8 +- ...e_authorization_server400_response_spec.rb | 8 +- spec/models/update_client_app_request_spec.rb | 8 +- ...pdate_environment_variable_request_spec.rb | 8 +- spec/models/update_role200_response_spec.rb | 8 +- spec/models/user_spec.rb | 8 +- spec/models/verify_enrollment_request_spec.rb | 8 +- spec/models/verify_factor_request_spec.rb | 8 +- .../verify_factor_saml200_response_spec.rb | 8 +- .../models/verify_factor_saml_request_spec.rb | 8 +- ...ify_factor_voice200_response_inner_spec.rb | 8 +- spec/spec_helper.rb | 2 +- 287 files changed, 2029 insertions(+), 1983 deletions(-) create mode 100644 lib/onelogin.rb rename lib/{openapi_client => onelogin}/api/default_api.rb (99%) rename lib/{openapi_client => onelogin}/api_client.rb (99%) rename lib/{openapi_client => onelogin}/api_error.rb (98%) rename lib/{openapi_client => onelogin}/configuration.rb (99%) rename lib/{openapi_client => onelogin}/models/action.rb (96%) rename lib/{openapi_client => onelogin}/models/activate_factor_request.rb (96%) rename lib/{openapi_client => onelogin}/models/add_access_token_claim_request.rb (95%) rename lib/{openapi_client => onelogin}/models/add_client_app_request.rb (95%) rename lib/{openapi_client => onelogin}/models/add_role_users200_response_inner.rb (95%) rename lib/{openapi_client => onelogin}/models/add_scope_request.rb (95%) rename lib/{openapi_client => onelogin}/models/auth_method.rb (98%) rename lib/{openapi_client => onelogin}/models/auth_server_configuration.rb (96%) rename lib/{openapi_client => onelogin}/models/client_app.rb (96%) rename lib/{openapi_client => onelogin}/models/condition.rb (96%) rename lib/{openapi_client => onelogin}/models/connector.rb (96%) rename lib/{openapi_client => onelogin}/models/create_authorization_server_request.rb (95%) rename lib/{openapi_client => onelogin}/models/create_environment_variable_request.rb (95%) rename lib/{openapi_client => onelogin}/models/create_roles201_response_inner.rb (95%) rename lib/{openapi_client => onelogin}/models/device.rb (96%) rename lib/{openapi_client => onelogin}/models/enroll_factor_request.rb (96%) rename lib/{openapi_client => onelogin}/models/envvar.rb (96%) rename lib/{openapi_client => onelogin}/models/error_status.rb (96%) rename lib/{openapi_client => onelogin}/models/error_status_errors_inner.rb (95%) rename lib/{openapi_client => onelogin}/models/factor_inner.rb (97%) rename lib/{openapi_client => onelogin}/models/factor_inner_factor_data.rb (95%) rename lib/{openapi_client => onelogin}/models/generate_mfa_token200_response.rb (96%) rename lib/{openapi_client => onelogin}/models/generate_mfa_token422_response.rb (95%) rename lib/{openapi_client => onelogin}/models/generate_mfa_token422_response_details.rb (95%) rename lib/{openapi_client => onelogin}/models/generate_mfa_token_request.rb (95%) rename lib/{openapi_client => onelogin}/models/generate_saml_assertion_request.rb (96%) rename lib/{openapi_client => onelogin}/models/generate_token200_response.rb (96%) rename lib/{openapi_client => onelogin}/models/generate_token400_response.rb (95%) rename lib/{openapi_client => onelogin}/models/generate_token_request.rb (96%) rename lib/{openapi_client => onelogin}/models/get_authorization_server200_response.rb (95%) rename lib/{openapi_client => onelogin}/models/get_available_factors200_response_inner.rb (95%) rename lib/{openapi_client => onelogin}/models/get_client_apps200_response_inner.rb (95%) rename lib/{openapi_client => onelogin}/models/get_client_apps200_response_inner_scopes_inner.rb (95%) rename lib/{openapi_client => onelogin}/models/get_rate_limit200_response.rb (95%) rename lib/{openapi_client => onelogin}/models/get_rate_limit200_response_data.rb (95%) rename lib/{openapi_client => onelogin}/models/get_risk_score200_response.rb (96%) rename lib/{openapi_client => onelogin}/models/get_risk_score400_response.rb (95%) rename lib/{openapi_client => onelogin}/models/get_risk_score_request.rb (96%) rename lib/{openapi_client => onelogin}/models/get_score_insights200_response.rb (95%) rename lib/{openapi_client => onelogin}/models/get_score_insights200_response_scores.rb (95%) rename lib/{openapi_client => onelogin}/models/get_user_apps200_response_inner.rb (97%) rename lib/{openapi_client => onelogin}/models/hook.rb (98%) rename lib/{openapi_client => onelogin}/models/hook_conditions_inner.rb (95%) rename lib/{openapi_client => onelogin}/models/hook_options.rb (96%) rename lib/{openapi_client => onelogin}/models/hook_status.rb (95%) rename lib/{openapi_client => onelogin}/models/id.rb (96%) rename lib/{openapi_client => onelogin}/models/list_access_token_claims200_response_inner.rb (96%) rename lib/{openapi_client => onelogin}/models/list_actions200_response_inner.rb (95%) rename lib/{openapi_client => onelogin}/models/list_app_users200_response_inner.rb (95%) rename lib/{openapi_client => onelogin}/models/list_authorization_servers200_response_inner.rb (95%) rename lib/{openapi_client => onelogin}/models/list_authorization_servers200_response_inner_configuration.rb (94%) rename lib/{openapi_client => onelogin}/models/list_condition_operators200_response_inner.rb (95%) rename lib/{openapi_client => onelogin}/models/list_condition_values200_response_inner.rb (95%) rename lib/{openapi_client => onelogin}/models/list_conditions200_response_inner.rb (95%) rename lib/{openapi_client => onelogin}/models/list_mapping_condition_operators200_response_inner.rb (95%) rename lib/{openapi_client => onelogin}/models/list_mapping_conditions200_response_inner.rb (95%) rename lib/{openapi_client => onelogin}/models/list_scopes200_response_inner.rb (95%) rename lib/{openapi_client => onelogin}/models/log.rb (96%) rename lib/{openapi_client => onelogin}/models/mapping.rb (97%) rename lib/{openapi_client => onelogin}/models/registration.rb (96%) rename lib/{openapi_client => onelogin}/models/remove_role_users_request.rb (95%) rename lib/{openapi_client => onelogin}/models/revoke_token_request.rb (95%) rename lib/{openapi_client => onelogin}/models/risk_device.rb (95%) rename lib/{openapi_client => onelogin}/models/risk_rule.rb (97%) rename lib/{openapi_client => onelogin}/models/risk_user.rb (96%) rename lib/{openapi_client => onelogin}/models/role.rb (96%) rename lib/{openapi_client => onelogin}/models/rule.rb (97%) rename lib/{openapi_client => onelogin}/models/rule_id.rb (95%) rename lib/{openapi_client => onelogin}/models/schema.rb (98%) rename lib/{openapi_client => onelogin}/models/schema1.rb (96%) rename lib/{openapi_client => onelogin}/models/schema1_added_by.rb (95%) rename lib/{openapi_client => onelogin}/models/schema_provisioning.rb (95%) rename lib/{openapi_client => onelogin}/models/session.rb (96%) rename lib/{openapi_client => onelogin}/models/set_role_apps200_response_inner.rb (95%) rename lib/{openapi_client => onelogin}/models/source.rb (96%) rename lib/{openapi_client => onelogin}/models/status.rb (96%) rename lib/{openapi_client => onelogin}/models/status1.rb (96%) rename lib/{openapi_client => onelogin}/models/status2.rb (95%) rename lib/{openapi_client => onelogin}/models/status2_status.rb (96%) rename lib/{openapi_client => onelogin}/models/track_event_request.rb (96%) rename lib/{openapi_client => onelogin}/models/update_authorization_server400_response.rb (95%) rename lib/{openapi_client => onelogin}/models/update_client_app_request.rb (95%) rename lib/{openapi_client => onelogin}/models/update_environment_variable_request.rb (95%) rename lib/{openapi_client => onelogin}/models/update_role200_response.rb (95%) rename lib/{openapi_client => onelogin}/models/user.rb (98%) rename lib/{openapi_client => onelogin}/models/verify_enrollment_request.rb (95%) rename lib/{openapi_client => onelogin}/models/verify_factor_request.rb (95%) rename lib/{openapi_client => onelogin}/models/verify_factor_saml200_response.rb (95%) rename lib/{openapi_client => onelogin}/models/verify_factor_saml_request.rb (96%) rename lib/{openapi_client => onelogin}/models/verify_factor_voice200_response_inner.rb (96%) rename lib/{openapi_client => onelogin}/version.rb (93%) delete mode 100644 lib/openapi_client.rb delete mode 100644 openapi_client.gemspec diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 8d8002b..192317a 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -98,103 +98,194 @@ docs/VerifyFactorSaml200Response.md docs/VerifyFactorSamlRequest.md docs/VerifyFactorVoice200ResponseInner.md git_push.sh -lib/openapi_client.rb -lib/openapi_client/api/default_api.rb -lib/openapi_client/api_client.rb -lib/openapi_client/api_error.rb -lib/openapi_client/configuration.rb -lib/openapi_client/models/action.rb -lib/openapi_client/models/activate_factor_request.rb -lib/openapi_client/models/add_access_token_claim_request.rb -lib/openapi_client/models/add_client_app_request.rb -lib/openapi_client/models/add_role_users200_response_inner.rb -lib/openapi_client/models/add_scope_request.rb -lib/openapi_client/models/auth_method.rb -lib/openapi_client/models/auth_server_configuration.rb -lib/openapi_client/models/client_app.rb -lib/openapi_client/models/condition.rb -lib/openapi_client/models/connector.rb -lib/openapi_client/models/create_authorization_server_request.rb -lib/openapi_client/models/create_environment_variable_request.rb -lib/openapi_client/models/create_roles201_response_inner.rb -lib/openapi_client/models/device.rb -lib/openapi_client/models/enroll_factor_request.rb -lib/openapi_client/models/envvar.rb -lib/openapi_client/models/error_status.rb -lib/openapi_client/models/error_status_errors_inner.rb -lib/openapi_client/models/factor_inner.rb -lib/openapi_client/models/factor_inner_factor_data.rb -lib/openapi_client/models/generate_mfa_token200_response.rb -lib/openapi_client/models/generate_mfa_token422_response.rb -lib/openapi_client/models/generate_mfa_token422_response_details.rb -lib/openapi_client/models/generate_mfa_token_request.rb -lib/openapi_client/models/generate_saml_assertion_request.rb -lib/openapi_client/models/generate_token200_response.rb -lib/openapi_client/models/generate_token400_response.rb -lib/openapi_client/models/generate_token_request.rb -lib/openapi_client/models/get_authorization_server200_response.rb -lib/openapi_client/models/get_available_factors200_response_inner.rb -lib/openapi_client/models/get_client_apps200_response_inner.rb -lib/openapi_client/models/get_client_apps200_response_inner_scopes_inner.rb -lib/openapi_client/models/get_rate_limit200_response.rb -lib/openapi_client/models/get_rate_limit200_response_data.rb -lib/openapi_client/models/get_risk_score200_response.rb -lib/openapi_client/models/get_risk_score400_response.rb -lib/openapi_client/models/get_risk_score_request.rb -lib/openapi_client/models/get_score_insights200_response.rb -lib/openapi_client/models/get_score_insights200_response_scores.rb -lib/openapi_client/models/get_user_apps200_response_inner.rb -lib/openapi_client/models/hook.rb -lib/openapi_client/models/hook_conditions_inner.rb -lib/openapi_client/models/hook_options.rb -lib/openapi_client/models/hook_status.rb -lib/openapi_client/models/id.rb -lib/openapi_client/models/list_access_token_claims200_response_inner.rb -lib/openapi_client/models/list_actions200_response_inner.rb -lib/openapi_client/models/list_app_users200_response_inner.rb -lib/openapi_client/models/list_authorization_servers200_response_inner.rb -lib/openapi_client/models/list_authorization_servers200_response_inner_configuration.rb -lib/openapi_client/models/list_condition_operators200_response_inner.rb -lib/openapi_client/models/list_condition_values200_response_inner.rb -lib/openapi_client/models/list_conditions200_response_inner.rb -lib/openapi_client/models/list_mapping_condition_operators200_response_inner.rb -lib/openapi_client/models/list_mapping_conditions200_response_inner.rb -lib/openapi_client/models/list_scopes200_response_inner.rb -lib/openapi_client/models/log.rb -lib/openapi_client/models/mapping.rb -lib/openapi_client/models/registration.rb -lib/openapi_client/models/remove_role_users_request.rb -lib/openapi_client/models/revoke_token_request.rb -lib/openapi_client/models/risk_device.rb -lib/openapi_client/models/risk_rule.rb -lib/openapi_client/models/risk_user.rb -lib/openapi_client/models/role.rb -lib/openapi_client/models/rule.rb -lib/openapi_client/models/rule_id.rb -lib/openapi_client/models/schema.rb -lib/openapi_client/models/schema1.rb -lib/openapi_client/models/schema1_added_by.rb -lib/openapi_client/models/schema_provisioning.rb -lib/openapi_client/models/session.rb -lib/openapi_client/models/set_role_apps200_response_inner.rb -lib/openapi_client/models/source.rb -lib/openapi_client/models/status.rb -lib/openapi_client/models/status1.rb -lib/openapi_client/models/status2.rb -lib/openapi_client/models/status2_status.rb -lib/openapi_client/models/track_event_request.rb -lib/openapi_client/models/update_authorization_server400_response.rb -lib/openapi_client/models/update_client_app_request.rb -lib/openapi_client/models/update_environment_variable_request.rb -lib/openapi_client/models/update_role200_response.rb -lib/openapi_client/models/user.rb -lib/openapi_client/models/verify_enrollment_request.rb -lib/openapi_client/models/verify_factor_request.rb -lib/openapi_client/models/verify_factor_saml200_response.rb -lib/openapi_client/models/verify_factor_saml_request.rb -lib/openapi_client/models/verify_factor_voice200_response_inner.rb -lib/openapi_client/version.rb -openapi_client.gemspec +lib/onelogin.rb +lib/onelogin/api/default_api.rb +lib/onelogin/api_client.rb +lib/onelogin/api_error.rb +lib/onelogin/configuration.rb +lib/onelogin/models/action.rb +lib/onelogin/models/activate_factor_request.rb +lib/onelogin/models/add_access_token_claim_request.rb +lib/onelogin/models/add_client_app_request.rb +lib/onelogin/models/add_role_users200_response_inner.rb +lib/onelogin/models/add_scope_request.rb +lib/onelogin/models/auth_method.rb +lib/onelogin/models/auth_server_configuration.rb +lib/onelogin/models/client_app.rb +lib/onelogin/models/condition.rb +lib/onelogin/models/connector.rb +lib/onelogin/models/create_authorization_server_request.rb +lib/onelogin/models/create_environment_variable_request.rb +lib/onelogin/models/create_roles201_response_inner.rb +lib/onelogin/models/device.rb +lib/onelogin/models/enroll_factor_request.rb +lib/onelogin/models/envvar.rb +lib/onelogin/models/error_status.rb +lib/onelogin/models/error_status_errors_inner.rb +lib/onelogin/models/factor_inner.rb +lib/onelogin/models/factor_inner_factor_data.rb +lib/onelogin/models/generate_mfa_token200_response.rb +lib/onelogin/models/generate_mfa_token422_response.rb +lib/onelogin/models/generate_mfa_token422_response_details.rb +lib/onelogin/models/generate_mfa_token_request.rb +lib/onelogin/models/generate_saml_assertion_request.rb +lib/onelogin/models/generate_token200_response.rb +lib/onelogin/models/generate_token400_response.rb +lib/onelogin/models/generate_token_request.rb +lib/onelogin/models/get_authorization_server200_response.rb +lib/onelogin/models/get_available_factors200_response_inner.rb +lib/onelogin/models/get_client_apps200_response_inner.rb +lib/onelogin/models/get_client_apps200_response_inner_scopes_inner.rb +lib/onelogin/models/get_rate_limit200_response.rb +lib/onelogin/models/get_rate_limit200_response_data.rb +lib/onelogin/models/get_risk_score200_response.rb +lib/onelogin/models/get_risk_score400_response.rb +lib/onelogin/models/get_risk_score_request.rb +lib/onelogin/models/get_score_insights200_response.rb +lib/onelogin/models/get_score_insights200_response_scores.rb +lib/onelogin/models/get_user_apps200_response_inner.rb +lib/onelogin/models/hook.rb +lib/onelogin/models/hook_conditions_inner.rb +lib/onelogin/models/hook_options.rb +lib/onelogin/models/hook_status.rb +lib/onelogin/models/id.rb +lib/onelogin/models/list_access_token_claims200_response_inner.rb +lib/onelogin/models/list_actions200_response_inner.rb +lib/onelogin/models/list_app_users200_response_inner.rb +lib/onelogin/models/list_authorization_servers200_response_inner.rb +lib/onelogin/models/list_authorization_servers200_response_inner_configuration.rb +lib/onelogin/models/list_condition_operators200_response_inner.rb +lib/onelogin/models/list_condition_values200_response_inner.rb +lib/onelogin/models/list_conditions200_response_inner.rb +lib/onelogin/models/list_mapping_condition_operators200_response_inner.rb +lib/onelogin/models/list_mapping_conditions200_response_inner.rb +lib/onelogin/models/list_scopes200_response_inner.rb +lib/onelogin/models/log.rb +lib/onelogin/models/mapping.rb +lib/onelogin/models/registration.rb +lib/onelogin/models/remove_role_users_request.rb +lib/onelogin/models/revoke_token_request.rb +lib/onelogin/models/risk_device.rb +lib/onelogin/models/risk_rule.rb +lib/onelogin/models/risk_user.rb +lib/onelogin/models/role.rb +lib/onelogin/models/rule.rb +lib/onelogin/models/rule_id.rb +lib/onelogin/models/schema.rb +lib/onelogin/models/schema1.rb +lib/onelogin/models/schema1_added_by.rb +lib/onelogin/models/schema_provisioning.rb +lib/onelogin/models/session.rb +lib/onelogin/models/set_role_apps200_response_inner.rb +lib/onelogin/models/source.rb +lib/onelogin/models/status.rb +lib/onelogin/models/status1.rb +lib/onelogin/models/status2.rb +lib/onelogin/models/status2_status.rb +lib/onelogin/models/track_event_request.rb +lib/onelogin/models/update_authorization_server400_response.rb +lib/onelogin/models/update_client_app_request.rb +lib/onelogin/models/update_environment_variable_request.rb +lib/onelogin/models/update_role200_response.rb +lib/onelogin/models/user.rb +lib/onelogin/models/verify_enrollment_request.rb +lib/onelogin/models/verify_factor_request.rb +lib/onelogin/models/verify_factor_saml200_response.rb +lib/onelogin/models/verify_factor_saml_request.rb +lib/onelogin/models/verify_factor_voice200_response_inner.rb +lib/onelogin/version.rb +onelogin.gemspec +spec/api/default_api_spec.rb spec/api_client_spec.rb spec/configuration_spec.rb +spec/models/action_spec.rb +spec/models/activate_factor_request_spec.rb +spec/models/add_access_token_claim_request_spec.rb +spec/models/add_client_app_request_spec.rb +spec/models/add_role_users200_response_inner_spec.rb +spec/models/add_scope_request_spec.rb +spec/models/auth_method_spec.rb +spec/models/auth_server_configuration_spec.rb +spec/models/client_app_spec.rb +spec/models/condition_spec.rb +spec/models/connector_spec.rb +spec/models/create_authorization_server_request_spec.rb +spec/models/create_environment_variable_request_spec.rb +spec/models/create_roles201_response_inner_spec.rb +spec/models/device_spec.rb +spec/models/enroll_factor_request_spec.rb +spec/models/envvar_spec.rb +spec/models/error_status_errors_inner_spec.rb +spec/models/error_status_spec.rb +spec/models/factor_inner_factor_data_spec.rb +spec/models/factor_inner_spec.rb +spec/models/generate_mfa_token200_response_spec.rb +spec/models/generate_mfa_token422_response_details_spec.rb +spec/models/generate_mfa_token422_response_spec.rb +spec/models/generate_mfa_token_request_spec.rb +spec/models/generate_saml_assertion_request_spec.rb +spec/models/generate_token200_response_spec.rb +spec/models/generate_token400_response_spec.rb +spec/models/generate_token_request_spec.rb +spec/models/get_authorization_server200_response_spec.rb +spec/models/get_available_factors200_response_inner_spec.rb +spec/models/get_client_apps200_response_inner_scopes_inner_spec.rb +spec/models/get_client_apps200_response_inner_spec.rb +spec/models/get_rate_limit200_response_data_spec.rb +spec/models/get_rate_limit200_response_spec.rb +spec/models/get_risk_score200_response_spec.rb +spec/models/get_risk_score400_response_spec.rb +spec/models/get_risk_score_request_spec.rb +spec/models/get_score_insights200_response_scores_spec.rb +spec/models/get_score_insights200_response_spec.rb +spec/models/get_user_apps200_response_inner_spec.rb +spec/models/hook_conditions_inner_spec.rb +spec/models/hook_options_spec.rb +spec/models/hook_spec.rb +spec/models/hook_status_spec.rb +spec/models/id_spec.rb +spec/models/list_access_token_claims200_response_inner_spec.rb +spec/models/list_actions200_response_inner_spec.rb +spec/models/list_app_users200_response_inner_spec.rb +spec/models/list_authorization_servers200_response_inner_configuration_spec.rb +spec/models/list_authorization_servers200_response_inner_spec.rb +spec/models/list_condition_operators200_response_inner_spec.rb +spec/models/list_condition_values200_response_inner_spec.rb +spec/models/list_conditions200_response_inner_spec.rb +spec/models/list_mapping_condition_operators200_response_inner_spec.rb +spec/models/list_mapping_conditions200_response_inner_spec.rb +spec/models/list_scopes200_response_inner_spec.rb +spec/models/log_spec.rb +spec/models/mapping_spec.rb +spec/models/registration_spec.rb +spec/models/remove_role_users_request_spec.rb +spec/models/revoke_token_request_spec.rb +spec/models/risk_device_spec.rb +spec/models/risk_rule_spec.rb +spec/models/risk_user_spec.rb +spec/models/role_spec.rb +spec/models/rule_id_spec.rb +spec/models/rule_spec.rb +spec/models/schema1_added_by_spec.rb +spec/models/schema1_spec.rb +spec/models/schema_provisioning_spec.rb +spec/models/schema_spec.rb +spec/models/session_spec.rb +spec/models/set_role_apps200_response_inner_spec.rb +spec/models/source_spec.rb +spec/models/status1_spec.rb +spec/models/status2_spec.rb +spec/models/status2_status_spec.rb +spec/models/status_spec.rb +spec/models/track_event_request_spec.rb +spec/models/update_authorization_server400_response_spec.rb +spec/models/update_client_app_request_spec.rb +spec/models/update_environment_variable_request_spec.rb +spec/models/update_role200_response_spec.rb +spec/models/user_spec.rb +spec/models/verify_enrollment_request_spec.rb +spec/models/verify_factor_request_spec.rb +spec/models/verify_factor_saml200_response_spec.rb +spec/models/verify_factor_saml_request_spec.rb +spec/models/verify_factor_voice200_response_inner_spec.rb spec/spec_helper.rb diff --git a/.travis.yml b/.travis.yml index bd0f1a5..181e20f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,5 +10,5 @@ rvm: script: - bundle install --path vendor/bundle - bundle exec rspec - - gem build openapi_client.gemspec - - gem install ./openapi_client-1.0.0.gem + - gem build onelogin.gemspec + - gem install ./onelogin-1.0.0.gem diff --git a/README.md b/README.md index f18dd7b..8c1fe9d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# openapi_client +# onelogin -OpenapiClient - the Ruby gem for the OneLogin API +OneLogin - the Ruby gem for the OneLogin API No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) @@ -17,28 +17,28 @@ This SDK is automatically generated by the [OpenAPI Generator](https://openapi-g To build the Ruby code into a gem: ```shell -gem build openapi_client.gemspec +gem build onelogin.gemspec ``` Then either install the gem locally: ```shell -gem install ./openapi_client-1.0.0.gem +gem install ./onelogin-1.0.0.gem ``` -(for development, run `gem install --dev ./openapi_client-1.0.0.gem` to install the development dependencies) +(for development, run `gem install --dev ./onelogin-1.0.0.gem` to install the development dependencies) or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/). Finally add this to the Gemfile: - gem 'openapi_client', '~> 1.0.0' + gem 'onelogin', '~> 1.0.0' ### Install from Git If the Ruby gem is hosted at a git repository: https://github.com/onelogin/onelogin-ruby-sdk, then add the following in the Gemfile: - gem 'openapi_client', :git => 'https://github.com/onelogin/onelogin-ruby-sdk.git' + gem 'onelogin', :git => 'https://github.com/onelogin/onelogin-ruby-sdk.git' ### Include the Ruby code directly @@ -54,16 +54,16 @@ Please follow the [installation](#installation) procedure and then run the follo ```ruby # Load the gem -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | user_id = 56 # Integer | Set to the id of the user. -activate_factor_request = OpenapiClient::ActivateFactorRequest.new # ActivateFactorRequest | +activate_factor_request = OneLogin::ActivateFactorRequest.new # ActivateFactorRequest | begin api_instance.activate_factor(authorization, user_id, activate_factor_request) -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Exception when calling DefaultApi->activate_factor: #{e}" end @@ -75,201 +75,201 @@ All URIs are relative to *https://onelogininc.onelogin.com* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*OpenapiClient::DefaultApi* | [**activate_factor**](docs/DefaultApi.md#activate_factor) | **POST** /api/2/mfa/users/{user_id}/verifications | -*OpenapiClient::DefaultApi* | [**add_access_token_claim**](docs/DefaultApi.md#add_access_token_claim) | **POST** /api/2/api_authorizations/{id}/claims | -*OpenapiClient::DefaultApi* | [**add_client_app**](docs/DefaultApi.md#add_client_app) | **POST** /api/2/api_authorizations/{id}/clients | -*OpenapiClient::DefaultApi* | [**add_role_admins**](docs/DefaultApi.md#add_role_admins) | **POST** /api/2/roles/{role_id}/admins | -*OpenapiClient::DefaultApi* | [**add_role_users**](docs/DefaultApi.md#add_role_users) | **POST** /api/2/roles/{role_id}/users | -*OpenapiClient::DefaultApi* | [**add_scope**](docs/DefaultApi.md#add_scope) | **POST** /api/2/api_authorizations/{id}/scopes | -*OpenapiClient::DefaultApi* | [**bulk_mapping_sort**](docs/DefaultApi.md#bulk_mapping_sort) | **PUT** /api/2/apps/mappings/sort | -*OpenapiClient::DefaultApi* | [**bulk_sort**](docs/DefaultApi.md#bulk_sort) | **PUT** /api/2/apps/{app_id}/rules/sort | -*OpenapiClient::DefaultApi* | [**create_app**](docs/DefaultApi.md#create_app) | **POST** /api/2/apps | -*OpenapiClient::DefaultApi* | [**create_authorization_server**](docs/DefaultApi.md#create_authorization_server) | **POST** /api/2/api_authorizations | -*OpenapiClient::DefaultApi* | [**create_environment_variable**](docs/DefaultApi.md#create_environment_variable) | **POST** /api/2/hooks/envs | -*OpenapiClient::DefaultApi* | [**create_hook**](docs/DefaultApi.md#create_hook) | **POST** /api/2/hooks | -*OpenapiClient::DefaultApi* | [**create_mapping**](docs/DefaultApi.md#create_mapping) | **POST** /api/2/mappings | -*OpenapiClient::DefaultApi* | [**create_risk_rule**](docs/DefaultApi.md#create_risk_rule) | **POST** /api/2/risk/rules | -*OpenapiClient::DefaultApi* | [**create_roles**](docs/DefaultApi.md#create_roles) | **POST** /api/2/roles | -*OpenapiClient::DefaultApi* | [**create_rule**](docs/DefaultApi.md#create_rule) | **POST** /api/2/apps/{app_id}/rules | -*OpenapiClient::DefaultApi* | [**create_user**](docs/DefaultApi.md#create_user) | **POST** /api/2/users | -*OpenapiClient::DefaultApi* | [**delete_access_token_claim**](docs/DefaultApi.md#delete_access_token_claim) | **DELETE** /api/2/api_authorizations/{id}/claims/{claim_id} | -*OpenapiClient::DefaultApi* | [**delete_app**](docs/DefaultApi.md#delete_app) | **DELETE** /api/2/apps/{app_id} | -*OpenapiClient::DefaultApi* | [**delete_app_parameter**](docs/DefaultApi.md#delete_app_parameter) | **DELETE** /api/2/apps/{app_id}/parameters/{parameter_id} | -*OpenapiClient::DefaultApi* | [**delete_authorization_server**](docs/DefaultApi.md#delete_authorization_server) | **DELETE** /api/2/api_authorizations/{id} | -*OpenapiClient::DefaultApi* | [**delete_environment_variable**](docs/DefaultApi.md#delete_environment_variable) | **DELETE** /api/2/hooks/envs/{envvar_id} | -*OpenapiClient::DefaultApi* | [**delete_factor**](docs/DefaultApi.md#delete_factor) | **DELETE** /api/2/mfa/users/{user_id}/devices/{device_id} | -*OpenapiClient::DefaultApi* | [**delete_hook**](docs/DefaultApi.md#delete_hook) | **DELETE** /api/2/hooks/{hook_id} | -*OpenapiClient::DefaultApi* | [**delete_mapping**](docs/DefaultApi.md#delete_mapping) | **DELETE** /api/2/mappings/{mapping_id} | -*OpenapiClient::DefaultApi* | [**delete_risk_rule**](docs/DefaultApi.md#delete_risk_rule) | **DELETE** /api/2/risk/rules/{risk_rule_id} | -*OpenapiClient::DefaultApi* | [**delete_role**](docs/DefaultApi.md#delete_role) | **DELETE** /api/2/roles/{role_id} | -*OpenapiClient::DefaultApi* | [**delete_rule**](docs/DefaultApi.md#delete_rule) | **DELETE** /api/2/apps/{app_id}/rules/{rule_id} | -*OpenapiClient::DefaultApi* | [**delete_scope**](docs/DefaultApi.md#delete_scope) | **DELETE** /api/2/api_authorizations/{id}/scopes/{scope_id} | -*OpenapiClient::DefaultApi* | [**delete_user**](docs/DefaultApi.md#delete_user) | **DELETE** /api/2/users/{user_id} | -*OpenapiClient::DefaultApi* | [**dry_run_mapping**](docs/DefaultApi.md#dry_run_mapping) | **POST** /api/2/mappings/{mapping_id}/dryrun | -*OpenapiClient::DefaultApi* | [**enroll_factor**](docs/DefaultApi.md#enroll_factor) | **POST** /api/2/mfa/users/{user_id}/registrations | -*OpenapiClient::DefaultApi* | [**generate_mfa_token**](docs/DefaultApi.md#generate_mfa_token) | **POST** /api/2/mfs/users/{user_id}/mfa_token | -*OpenapiClient::DefaultApi* | [**generate_saml_assertion**](docs/DefaultApi.md#generate_saml_assertion) | **POST** /api/2/saml_assertion | -*OpenapiClient::DefaultApi* | [**generate_token**](docs/DefaultApi.md#generate_token) | **POST** /auth/oauth2/v2/token | -*OpenapiClient::DefaultApi* | [**get_app**](docs/DefaultApi.md#get_app) | **GET** /api/2/apps/{app_id} | -*OpenapiClient::DefaultApi* | [**get_authorization_server**](docs/DefaultApi.md#get_authorization_server) | **GET** /api/2/api_authorizations/{id} | -*OpenapiClient::DefaultApi* | [**get_available_factors**](docs/DefaultApi.md#get_available_factors) | **GET** /api/2/mfa/users/{user_id}/factors | -*OpenapiClient::DefaultApi* | [**get_client_apps**](docs/DefaultApi.md#get_client_apps) | **GET** /api/2/api_authorizations/{id}/clients | -*OpenapiClient::DefaultApi* | [**get_enrolled_factors**](docs/DefaultApi.md#get_enrolled_factors) | **GET** /api/2/mfa/users/{user_id}/devices | -*OpenapiClient::DefaultApi* | [**get_environment_variable**](docs/DefaultApi.md#get_environment_variable) | **GET** /api/2/hooks/envs/{envvar_id} | -*OpenapiClient::DefaultApi* | [**get_hook**](docs/DefaultApi.md#get_hook) | **GET** /api/2/hooks/{hook_id} | -*OpenapiClient::DefaultApi* | [**get_logs**](docs/DefaultApi.md#get_logs) | **GET** /api/2/hooks/{hook_id}/logs | -*OpenapiClient::DefaultApi* | [**get_mapping**](docs/DefaultApi.md#get_mapping) | **GET** /api/2/mappings/{mapping_id} | -*OpenapiClient::DefaultApi* | [**get_rate_limit**](docs/DefaultApi.md#get_rate_limit) | **GET** /auth/rate_limit | -*OpenapiClient::DefaultApi* | [**get_risk_rule**](docs/DefaultApi.md#get_risk_rule) | **GET** /api/2/risk/rules/{risk_rule_id} | -*OpenapiClient::DefaultApi* | [**get_risk_score**](docs/DefaultApi.md#get_risk_score) | **POST** /api/2/risk/verify | -*OpenapiClient::DefaultApi* | [**get_role**](docs/DefaultApi.md#get_role) | **GET** /api/2/roles/{role_id} | -*OpenapiClient::DefaultApi* | [**get_role_admins**](docs/DefaultApi.md#get_role_admins) | **GET** /api/2/roles/{role_id}/admins | -*OpenapiClient::DefaultApi* | [**get_role_apps**](docs/DefaultApi.md#get_role_apps) | **GET** /api/2/roles/{role_id}/apps | -*OpenapiClient::DefaultApi* | [**get_role_users**](docs/DefaultApi.md#get_role_users) | **GET** /api/2/roles/{role_id}/users | -*OpenapiClient::DefaultApi* | [**get_rule**](docs/DefaultApi.md#get_rule) | **GET** /api/2/apps/{app_id}/rules/{rule_id} | -*OpenapiClient::DefaultApi* | [**get_score_insights**](docs/DefaultApi.md#get_score_insights) | **GET** /api/2/risk/scores | -*OpenapiClient::DefaultApi* | [**get_user**](docs/DefaultApi.md#get_user) | **GET** /api/2/users/{user_id} | -*OpenapiClient::DefaultApi* | [**get_user_apps**](docs/DefaultApi.md#get_user_apps) | **GET** /api/2/users/{user_id}/apps | -*OpenapiClient::DefaultApi* | [**list_access_token_claims**](docs/DefaultApi.md#list_access_token_claims) | **GET** /api/2/api_authorizations/{id}/claims | -*OpenapiClient::DefaultApi* | [**list_action_values**](docs/DefaultApi.md#list_action_values) | **GET** /api/2/apps/{app_id}/rules/actions/{actuion_value}/values | -*OpenapiClient::DefaultApi* | [**list_actions**](docs/DefaultApi.md#list_actions) | **GET** /api/2/apps/{app_id}/rules/actions | -*OpenapiClient::DefaultApi* | [**list_app_users**](docs/DefaultApi.md#list_app_users) | **GET** /api/2/apps/{app_id}/users | -*OpenapiClient::DefaultApi* | [**list_apps**](docs/DefaultApi.md#list_apps) | **GET** /api/2/apps | -*OpenapiClient::DefaultApi* | [**list_authorization_servers**](docs/DefaultApi.md#list_authorization_servers) | **GET** /api/2/api_authorizations | -*OpenapiClient::DefaultApi* | [**list_condition_operators**](docs/DefaultApi.md#list_condition_operators) | **GET** /api/2/apps/{app_id}/rules/conditions/{condition_value}/operators | -*OpenapiClient::DefaultApi* | [**list_condition_values**](docs/DefaultApi.md#list_condition_values) | **GET** /api/2/apps/{app_id}/rules/conditions/{condition_value}/values | -*OpenapiClient::DefaultApi* | [**list_conditions**](docs/DefaultApi.md#list_conditions) | **GET** /api/2/apps/{app_id}/rules/conditions | -*OpenapiClient::DefaultApi* | [**list_connectors**](docs/DefaultApi.md#list_connectors) | **GET** /api/2/connectors | -*OpenapiClient::DefaultApi* | [**list_environment_variables**](docs/DefaultApi.md#list_environment_variables) | **GET** /api/2/hooks/envs | -*OpenapiClient::DefaultApi* | [**list_hooks**](docs/DefaultApi.md#list_hooks) | **GET** /api/2/hooks | -*OpenapiClient::DefaultApi* | [**list_mapping_action_values**](docs/DefaultApi.md#list_mapping_action_values) | **GET** /api/2/apps/mappings/actions/{actuion_value}/values | -*OpenapiClient::DefaultApi* | [**list_mapping_actions**](docs/DefaultApi.md#list_mapping_actions) | **GET** /api/2/apps/mappings/actions | -*OpenapiClient::DefaultApi* | [**list_mapping_condition_operators**](docs/DefaultApi.md#list_mapping_condition_operators) | **GET** /api/2/apps/mappings/conditions/{condition_value}/operators | -*OpenapiClient::DefaultApi* | [**list_mapping_condition_values**](docs/DefaultApi.md#list_mapping_condition_values) | **GET** /api/2/apps/mappings/conditions/{condition_value}/values | -*OpenapiClient::DefaultApi* | [**list_mapping_conditions**](docs/DefaultApi.md#list_mapping_conditions) | **GET** /api/2/apps/mappings/conditions | -*OpenapiClient::DefaultApi* | [**list_mappings**](docs/DefaultApi.md#list_mappings) | **GET** /api/2/mappings | -*OpenapiClient::DefaultApi* | [**list_risk_rules**](docs/DefaultApi.md#list_risk_rules) | **GET** /api/2/risk/rules | -*OpenapiClient::DefaultApi* | [**list_roles**](docs/DefaultApi.md#list_roles) | **GET** /api/2/roles | -*OpenapiClient::DefaultApi* | [**list_rules**](docs/DefaultApi.md#list_rules) | **GET** /api/2/apps/{app_id}/rules | -*OpenapiClient::DefaultApi* | [**list_scopes**](docs/DefaultApi.md#list_scopes) | **GET** /api/2/api_authorizations/{id}/scopes | -*OpenapiClient::DefaultApi* | [**list_users**](docs/DefaultApi.md#list_users) | **GET** /api/2/users | -*OpenapiClient::DefaultApi* | [**remove_client_app**](docs/DefaultApi.md#remove_client_app) | **DELETE** /api/2/api_authorizations/{id}/clients/{client_app_id} | -*OpenapiClient::DefaultApi* | [**remove_role_admins**](docs/DefaultApi.md#remove_role_admins) | **DELETE** /api/2/roles/{role_id}/admins | -*OpenapiClient::DefaultApi* | [**remove_role_users**](docs/DefaultApi.md#remove_role_users) | **DELETE** /api/2/roles/{role_id}/users | -*OpenapiClient::DefaultApi* | [**revoke_token**](docs/DefaultApi.md#revoke_token) | **POST** /auth/oauth2/revoke | -*OpenapiClient::DefaultApi* | [**set_role_apps**](docs/DefaultApi.md#set_role_apps) | **PUT** /api/2/roles/{role_id}/apps | -*OpenapiClient::DefaultApi* | [**track_event**](docs/DefaultApi.md#track_event) | **POST** /api/2/risk/events | -*OpenapiClient::DefaultApi* | [**update_access_token_claim**](docs/DefaultApi.md#update_access_token_claim) | **PUT** /api/2/api_authorizations/{id}/claims/{claim_id} | -*OpenapiClient::DefaultApi* | [**update_app**](docs/DefaultApi.md#update_app) | **PUT** /api/2/apps/{app_id} | -*OpenapiClient::DefaultApi* | [**update_authorization_server**](docs/DefaultApi.md#update_authorization_server) | **PUT** /api/2/api_authorizations/{id} | -*OpenapiClient::DefaultApi* | [**update_client_app**](docs/DefaultApi.md#update_client_app) | **PUT** /api/2/api_authorizations/{id}/clients/{client_app_id} | -*OpenapiClient::DefaultApi* | [**update_environment_variable**](docs/DefaultApi.md#update_environment_variable) | **PUT** /api/2/hooks/envs/{envvar_id} | -*OpenapiClient::DefaultApi* | [**update_hook**](docs/DefaultApi.md#update_hook) | **PUT** /api/2/hooks/{hook_id} | -*OpenapiClient::DefaultApi* | [**update_mapping**](docs/DefaultApi.md#update_mapping) | **PUT** /api/2/mappings/{mapping_id} | -*OpenapiClient::DefaultApi* | [**update_risk_rule**](docs/DefaultApi.md#update_risk_rule) | **PUT** /api/2/risk/rules/{risk_rule_id} | -*OpenapiClient::DefaultApi* | [**update_role**](docs/DefaultApi.md#update_role) | **PUT** /api/2/roles/{role_id} | -*OpenapiClient::DefaultApi* | [**update_rule**](docs/DefaultApi.md#update_rule) | **PUT** /api/2/apps/{app_id}/rules/{rule_id} | -*OpenapiClient::DefaultApi* | [**update_scope**](docs/DefaultApi.md#update_scope) | **PUT** /api/2/api_authorizations/{id}/scopes/{scope_id} | -*OpenapiClient::DefaultApi* | [**update_user**](docs/DefaultApi.md#update_user) | **PUT** /api/2/users/{user_id} | -*OpenapiClient::DefaultApi* | [**verify_enrollment**](docs/DefaultApi.md#verify_enrollment) | **PUT** /api/2/mfa/users/{user_id}/registrations/{registration_id} | -*OpenapiClient::DefaultApi* | [**verify_enrollment_voice_protect**](docs/DefaultApi.md#verify_enrollment_voice_protect) | **GET** /api/2/mfa/users/{user_id}/registrations/{registration_id} | -*OpenapiClient::DefaultApi* | [**verify_factor**](docs/DefaultApi.md#verify_factor) | **PUT** /api/2/mfa/users/{user_id}/verifications/{verification_id} | -*OpenapiClient::DefaultApi* | [**verify_factor_saml**](docs/DefaultApi.md#verify_factor_saml) | **POST** /api/2/saml_assertion/verify_factor | -*OpenapiClient::DefaultApi* | [**verify_factor_voice**](docs/DefaultApi.md#verify_factor_voice) | **GET** /api/2/mfa/users/{user_id}/verifications/{verification_id} | +*OneLogin::DefaultApi* | [**activate_factor**](docs/DefaultApi.md#activate_factor) | **POST** /api/2/mfa/users/{user_id}/verifications | +*OneLogin::DefaultApi* | [**add_access_token_claim**](docs/DefaultApi.md#add_access_token_claim) | **POST** /api/2/api_authorizations/{id}/claims | +*OneLogin::DefaultApi* | [**add_client_app**](docs/DefaultApi.md#add_client_app) | **POST** /api/2/api_authorizations/{id}/clients | +*OneLogin::DefaultApi* | [**add_role_admins**](docs/DefaultApi.md#add_role_admins) | **POST** /api/2/roles/{role_id}/admins | +*OneLogin::DefaultApi* | [**add_role_users**](docs/DefaultApi.md#add_role_users) | **POST** /api/2/roles/{role_id}/users | +*OneLogin::DefaultApi* | [**add_scope**](docs/DefaultApi.md#add_scope) | **POST** /api/2/api_authorizations/{id}/scopes | +*OneLogin::DefaultApi* | [**bulk_mapping_sort**](docs/DefaultApi.md#bulk_mapping_sort) | **PUT** /api/2/apps/mappings/sort | +*OneLogin::DefaultApi* | [**bulk_sort**](docs/DefaultApi.md#bulk_sort) | **PUT** /api/2/apps/{app_id}/rules/sort | +*OneLogin::DefaultApi* | [**create_app**](docs/DefaultApi.md#create_app) | **POST** /api/2/apps | +*OneLogin::DefaultApi* | [**create_authorization_server**](docs/DefaultApi.md#create_authorization_server) | **POST** /api/2/api_authorizations | +*OneLogin::DefaultApi* | [**create_environment_variable**](docs/DefaultApi.md#create_environment_variable) | **POST** /api/2/hooks/envs | +*OneLogin::DefaultApi* | [**create_hook**](docs/DefaultApi.md#create_hook) | **POST** /api/2/hooks | +*OneLogin::DefaultApi* | [**create_mapping**](docs/DefaultApi.md#create_mapping) | **POST** /api/2/mappings | +*OneLogin::DefaultApi* | [**create_risk_rule**](docs/DefaultApi.md#create_risk_rule) | **POST** /api/2/risk/rules | +*OneLogin::DefaultApi* | [**create_roles**](docs/DefaultApi.md#create_roles) | **POST** /api/2/roles | +*OneLogin::DefaultApi* | [**create_rule**](docs/DefaultApi.md#create_rule) | **POST** /api/2/apps/{app_id}/rules | +*OneLogin::DefaultApi* | [**create_user**](docs/DefaultApi.md#create_user) | **POST** /api/2/users | +*OneLogin::DefaultApi* | [**delete_access_token_claim**](docs/DefaultApi.md#delete_access_token_claim) | **DELETE** /api/2/api_authorizations/{id}/claims/{claim_id} | +*OneLogin::DefaultApi* | [**delete_app**](docs/DefaultApi.md#delete_app) | **DELETE** /api/2/apps/{app_id} | +*OneLogin::DefaultApi* | [**delete_app_parameter**](docs/DefaultApi.md#delete_app_parameter) | **DELETE** /api/2/apps/{app_id}/parameters/{parameter_id} | +*OneLogin::DefaultApi* | [**delete_authorization_server**](docs/DefaultApi.md#delete_authorization_server) | **DELETE** /api/2/api_authorizations/{id} | +*OneLogin::DefaultApi* | [**delete_environment_variable**](docs/DefaultApi.md#delete_environment_variable) | **DELETE** /api/2/hooks/envs/{envvar_id} | +*OneLogin::DefaultApi* | [**delete_factor**](docs/DefaultApi.md#delete_factor) | **DELETE** /api/2/mfa/users/{user_id}/devices/{device_id} | +*OneLogin::DefaultApi* | [**delete_hook**](docs/DefaultApi.md#delete_hook) | **DELETE** /api/2/hooks/{hook_id} | +*OneLogin::DefaultApi* | [**delete_mapping**](docs/DefaultApi.md#delete_mapping) | **DELETE** /api/2/mappings/{mapping_id} | +*OneLogin::DefaultApi* | [**delete_risk_rule**](docs/DefaultApi.md#delete_risk_rule) | **DELETE** /api/2/risk/rules/{risk_rule_id} | +*OneLogin::DefaultApi* | [**delete_role**](docs/DefaultApi.md#delete_role) | **DELETE** /api/2/roles/{role_id} | +*OneLogin::DefaultApi* | [**delete_rule**](docs/DefaultApi.md#delete_rule) | **DELETE** /api/2/apps/{app_id}/rules/{rule_id} | +*OneLogin::DefaultApi* | [**delete_scope**](docs/DefaultApi.md#delete_scope) | **DELETE** /api/2/api_authorizations/{id}/scopes/{scope_id} | +*OneLogin::DefaultApi* | [**delete_user**](docs/DefaultApi.md#delete_user) | **DELETE** /api/2/users/{user_id} | +*OneLogin::DefaultApi* | [**dry_run_mapping**](docs/DefaultApi.md#dry_run_mapping) | **POST** /api/2/mappings/{mapping_id}/dryrun | +*OneLogin::DefaultApi* | [**enroll_factor**](docs/DefaultApi.md#enroll_factor) | **POST** /api/2/mfa/users/{user_id}/registrations | +*OneLogin::DefaultApi* | [**generate_mfa_token**](docs/DefaultApi.md#generate_mfa_token) | **POST** /api/2/mfs/users/{user_id}/mfa_token | +*OneLogin::DefaultApi* | [**generate_saml_assertion**](docs/DefaultApi.md#generate_saml_assertion) | **POST** /api/2/saml_assertion | +*OneLogin::DefaultApi* | [**generate_token**](docs/DefaultApi.md#generate_token) | **POST** /auth/oauth2/v2/token | +*OneLogin::DefaultApi* | [**get_app**](docs/DefaultApi.md#get_app) | **GET** /api/2/apps/{app_id} | +*OneLogin::DefaultApi* | [**get_authorization_server**](docs/DefaultApi.md#get_authorization_server) | **GET** /api/2/api_authorizations/{id} | +*OneLogin::DefaultApi* | [**get_available_factors**](docs/DefaultApi.md#get_available_factors) | **GET** /api/2/mfa/users/{user_id}/factors | +*OneLogin::DefaultApi* | [**get_client_apps**](docs/DefaultApi.md#get_client_apps) | **GET** /api/2/api_authorizations/{id}/clients | +*OneLogin::DefaultApi* | [**get_enrolled_factors**](docs/DefaultApi.md#get_enrolled_factors) | **GET** /api/2/mfa/users/{user_id}/devices | +*OneLogin::DefaultApi* | [**get_environment_variable**](docs/DefaultApi.md#get_environment_variable) | **GET** /api/2/hooks/envs/{envvar_id} | +*OneLogin::DefaultApi* | [**get_hook**](docs/DefaultApi.md#get_hook) | **GET** /api/2/hooks/{hook_id} | +*OneLogin::DefaultApi* | [**get_logs**](docs/DefaultApi.md#get_logs) | **GET** /api/2/hooks/{hook_id}/logs | +*OneLogin::DefaultApi* | [**get_mapping**](docs/DefaultApi.md#get_mapping) | **GET** /api/2/mappings/{mapping_id} | +*OneLogin::DefaultApi* | [**get_rate_limit**](docs/DefaultApi.md#get_rate_limit) | **GET** /auth/rate_limit | +*OneLogin::DefaultApi* | [**get_risk_rule**](docs/DefaultApi.md#get_risk_rule) | **GET** /api/2/risk/rules/{risk_rule_id} | +*OneLogin::DefaultApi* | [**get_risk_score**](docs/DefaultApi.md#get_risk_score) | **POST** /api/2/risk/verify | +*OneLogin::DefaultApi* | [**get_role**](docs/DefaultApi.md#get_role) | **GET** /api/2/roles/{role_id} | +*OneLogin::DefaultApi* | [**get_role_admins**](docs/DefaultApi.md#get_role_admins) | **GET** /api/2/roles/{role_id}/admins | +*OneLogin::DefaultApi* | [**get_role_apps**](docs/DefaultApi.md#get_role_apps) | **GET** /api/2/roles/{role_id}/apps | +*OneLogin::DefaultApi* | [**get_role_users**](docs/DefaultApi.md#get_role_users) | **GET** /api/2/roles/{role_id}/users | +*OneLogin::DefaultApi* | [**get_rule**](docs/DefaultApi.md#get_rule) | **GET** /api/2/apps/{app_id}/rules/{rule_id} | +*OneLogin::DefaultApi* | [**get_score_insights**](docs/DefaultApi.md#get_score_insights) | **GET** /api/2/risk/scores | +*OneLogin::DefaultApi* | [**get_user**](docs/DefaultApi.md#get_user) | **GET** /api/2/users/{user_id} | +*OneLogin::DefaultApi* | [**get_user_apps**](docs/DefaultApi.md#get_user_apps) | **GET** /api/2/users/{user_id}/apps | +*OneLogin::DefaultApi* | [**list_access_token_claims**](docs/DefaultApi.md#list_access_token_claims) | **GET** /api/2/api_authorizations/{id}/claims | +*OneLogin::DefaultApi* | [**list_action_values**](docs/DefaultApi.md#list_action_values) | **GET** /api/2/apps/{app_id}/rules/actions/{actuion_value}/values | +*OneLogin::DefaultApi* | [**list_actions**](docs/DefaultApi.md#list_actions) | **GET** /api/2/apps/{app_id}/rules/actions | +*OneLogin::DefaultApi* | [**list_app_users**](docs/DefaultApi.md#list_app_users) | **GET** /api/2/apps/{app_id}/users | +*OneLogin::DefaultApi* | [**list_apps**](docs/DefaultApi.md#list_apps) | **GET** /api/2/apps | +*OneLogin::DefaultApi* | [**list_authorization_servers**](docs/DefaultApi.md#list_authorization_servers) | **GET** /api/2/api_authorizations | +*OneLogin::DefaultApi* | [**list_condition_operators**](docs/DefaultApi.md#list_condition_operators) | **GET** /api/2/apps/{app_id}/rules/conditions/{condition_value}/operators | +*OneLogin::DefaultApi* | [**list_condition_values**](docs/DefaultApi.md#list_condition_values) | **GET** /api/2/apps/{app_id}/rules/conditions/{condition_value}/values | +*OneLogin::DefaultApi* | [**list_conditions**](docs/DefaultApi.md#list_conditions) | **GET** /api/2/apps/{app_id}/rules/conditions | +*OneLogin::DefaultApi* | [**list_connectors**](docs/DefaultApi.md#list_connectors) | **GET** /api/2/connectors | +*OneLogin::DefaultApi* | [**list_environment_variables**](docs/DefaultApi.md#list_environment_variables) | **GET** /api/2/hooks/envs | +*OneLogin::DefaultApi* | [**list_hooks**](docs/DefaultApi.md#list_hooks) | **GET** /api/2/hooks | +*OneLogin::DefaultApi* | [**list_mapping_action_values**](docs/DefaultApi.md#list_mapping_action_values) | **GET** /api/2/apps/mappings/actions/{actuion_value}/values | +*OneLogin::DefaultApi* | [**list_mapping_actions**](docs/DefaultApi.md#list_mapping_actions) | **GET** /api/2/apps/mappings/actions | +*OneLogin::DefaultApi* | [**list_mapping_condition_operators**](docs/DefaultApi.md#list_mapping_condition_operators) | **GET** /api/2/apps/mappings/conditions/{condition_value}/operators | +*OneLogin::DefaultApi* | [**list_mapping_condition_values**](docs/DefaultApi.md#list_mapping_condition_values) | **GET** /api/2/apps/mappings/conditions/{condition_value}/values | +*OneLogin::DefaultApi* | [**list_mapping_conditions**](docs/DefaultApi.md#list_mapping_conditions) | **GET** /api/2/apps/mappings/conditions | +*OneLogin::DefaultApi* | [**list_mappings**](docs/DefaultApi.md#list_mappings) | **GET** /api/2/mappings | +*OneLogin::DefaultApi* | [**list_risk_rules**](docs/DefaultApi.md#list_risk_rules) | **GET** /api/2/risk/rules | +*OneLogin::DefaultApi* | [**list_roles**](docs/DefaultApi.md#list_roles) | **GET** /api/2/roles | +*OneLogin::DefaultApi* | [**list_rules**](docs/DefaultApi.md#list_rules) | **GET** /api/2/apps/{app_id}/rules | +*OneLogin::DefaultApi* | [**list_scopes**](docs/DefaultApi.md#list_scopes) | **GET** /api/2/api_authorizations/{id}/scopes | +*OneLogin::DefaultApi* | [**list_users**](docs/DefaultApi.md#list_users) | **GET** /api/2/users | +*OneLogin::DefaultApi* | [**remove_client_app**](docs/DefaultApi.md#remove_client_app) | **DELETE** /api/2/api_authorizations/{id}/clients/{client_app_id} | +*OneLogin::DefaultApi* | [**remove_role_admins**](docs/DefaultApi.md#remove_role_admins) | **DELETE** /api/2/roles/{role_id}/admins | +*OneLogin::DefaultApi* | [**remove_role_users**](docs/DefaultApi.md#remove_role_users) | **DELETE** /api/2/roles/{role_id}/users | +*OneLogin::DefaultApi* | [**revoke_token**](docs/DefaultApi.md#revoke_token) | **POST** /auth/oauth2/revoke | +*OneLogin::DefaultApi* | [**set_role_apps**](docs/DefaultApi.md#set_role_apps) | **PUT** /api/2/roles/{role_id}/apps | +*OneLogin::DefaultApi* | [**track_event**](docs/DefaultApi.md#track_event) | **POST** /api/2/risk/events | +*OneLogin::DefaultApi* | [**update_access_token_claim**](docs/DefaultApi.md#update_access_token_claim) | **PUT** /api/2/api_authorizations/{id}/claims/{claim_id} | +*OneLogin::DefaultApi* | [**update_app**](docs/DefaultApi.md#update_app) | **PUT** /api/2/apps/{app_id} | +*OneLogin::DefaultApi* | [**update_authorization_server**](docs/DefaultApi.md#update_authorization_server) | **PUT** /api/2/api_authorizations/{id} | +*OneLogin::DefaultApi* | [**update_client_app**](docs/DefaultApi.md#update_client_app) | **PUT** /api/2/api_authorizations/{id}/clients/{client_app_id} | +*OneLogin::DefaultApi* | [**update_environment_variable**](docs/DefaultApi.md#update_environment_variable) | **PUT** /api/2/hooks/envs/{envvar_id} | +*OneLogin::DefaultApi* | [**update_hook**](docs/DefaultApi.md#update_hook) | **PUT** /api/2/hooks/{hook_id} | +*OneLogin::DefaultApi* | [**update_mapping**](docs/DefaultApi.md#update_mapping) | **PUT** /api/2/mappings/{mapping_id} | +*OneLogin::DefaultApi* | [**update_risk_rule**](docs/DefaultApi.md#update_risk_rule) | **PUT** /api/2/risk/rules/{risk_rule_id} | +*OneLogin::DefaultApi* | [**update_role**](docs/DefaultApi.md#update_role) | **PUT** /api/2/roles/{role_id} | +*OneLogin::DefaultApi* | [**update_rule**](docs/DefaultApi.md#update_rule) | **PUT** /api/2/apps/{app_id}/rules/{rule_id} | +*OneLogin::DefaultApi* | [**update_scope**](docs/DefaultApi.md#update_scope) | **PUT** /api/2/api_authorizations/{id}/scopes/{scope_id} | +*OneLogin::DefaultApi* | [**update_user**](docs/DefaultApi.md#update_user) | **PUT** /api/2/users/{user_id} | +*OneLogin::DefaultApi* | [**verify_enrollment**](docs/DefaultApi.md#verify_enrollment) | **PUT** /api/2/mfa/users/{user_id}/registrations/{registration_id} | +*OneLogin::DefaultApi* | [**verify_enrollment_voice_protect**](docs/DefaultApi.md#verify_enrollment_voice_protect) | **GET** /api/2/mfa/users/{user_id}/registrations/{registration_id} | +*OneLogin::DefaultApi* | [**verify_factor**](docs/DefaultApi.md#verify_factor) | **PUT** /api/2/mfa/users/{user_id}/verifications/{verification_id} | +*OneLogin::DefaultApi* | [**verify_factor_saml**](docs/DefaultApi.md#verify_factor_saml) | **POST** /api/2/saml_assertion/verify_factor | +*OneLogin::DefaultApi* | [**verify_factor_voice**](docs/DefaultApi.md#verify_factor_voice) | **GET** /api/2/mfa/users/{user_id}/verifications/{verification_id} | ## Documentation for Models - - [OpenapiClient::Action](docs/Action.md) - - [OpenapiClient::ActivateFactorRequest](docs/ActivateFactorRequest.md) - - [OpenapiClient::AddAccessTokenClaimRequest](docs/AddAccessTokenClaimRequest.md) - - [OpenapiClient::AddClientAppRequest](docs/AddClientAppRequest.md) - - [OpenapiClient::AddRoleUsers200ResponseInner](docs/AddRoleUsers200ResponseInner.md) - - [OpenapiClient::AddScopeRequest](docs/AddScopeRequest.md) - - [OpenapiClient::AuthMethod](docs/AuthMethod.md) - - [OpenapiClient::AuthServerConfiguration](docs/AuthServerConfiguration.md) - - [OpenapiClient::ClientApp](docs/ClientApp.md) - - [OpenapiClient::Condition](docs/Condition.md) - - [OpenapiClient::Connector](docs/Connector.md) - - [OpenapiClient::CreateAuthorizationServerRequest](docs/CreateAuthorizationServerRequest.md) - - [OpenapiClient::CreateEnvironmentVariableRequest](docs/CreateEnvironmentVariableRequest.md) - - [OpenapiClient::CreateRoles201ResponseInner](docs/CreateRoles201ResponseInner.md) - - [OpenapiClient::Device](docs/Device.md) - - [OpenapiClient::EnrollFactorRequest](docs/EnrollFactorRequest.md) - - [OpenapiClient::Envvar](docs/Envvar.md) - - [OpenapiClient::ErrorStatus](docs/ErrorStatus.md) - - [OpenapiClient::ErrorStatusErrorsInner](docs/ErrorStatusErrorsInner.md) - - [OpenapiClient::FactorInner](docs/FactorInner.md) - - [OpenapiClient::FactorInnerFactorData](docs/FactorInnerFactorData.md) - - [OpenapiClient::GenerateMfaToken200Response](docs/GenerateMfaToken200Response.md) - - [OpenapiClient::GenerateMfaToken422Response](docs/GenerateMfaToken422Response.md) - - [OpenapiClient::GenerateMfaToken422ResponseDetails](docs/GenerateMfaToken422ResponseDetails.md) - - [OpenapiClient::GenerateMfaTokenRequest](docs/GenerateMfaTokenRequest.md) - - [OpenapiClient::GenerateSamlAssertionRequest](docs/GenerateSamlAssertionRequest.md) - - [OpenapiClient::GenerateToken200Response](docs/GenerateToken200Response.md) - - [OpenapiClient::GenerateToken400Response](docs/GenerateToken400Response.md) - - [OpenapiClient::GenerateTokenRequest](docs/GenerateTokenRequest.md) - - [OpenapiClient::GetAuthorizationServer200Response](docs/GetAuthorizationServer200Response.md) - - [OpenapiClient::GetAvailableFactors200ResponseInner](docs/GetAvailableFactors200ResponseInner.md) - - [OpenapiClient::GetClientApps200ResponseInner](docs/GetClientApps200ResponseInner.md) - - [OpenapiClient::GetClientApps200ResponseInnerScopesInner](docs/GetClientApps200ResponseInnerScopesInner.md) - - [OpenapiClient::GetRateLimit200Response](docs/GetRateLimit200Response.md) - - [OpenapiClient::GetRateLimit200ResponseData](docs/GetRateLimit200ResponseData.md) - - [OpenapiClient::GetRiskScore200Response](docs/GetRiskScore200Response.md) - - [OpenapiClient::GetRiskScore400Response](docs/GetRiskScore400Response.md) - - [OpenapiClient::GetRiskScoreRequest](docs/GetRiskScoreRequest.md) - - [OpenapiClient::GetScoreInsights200Response](docs/GetScoreInsights200Response.md) - - [OpenapiClient::GetScoreInsights200ResponseScores](docs/GetScoreInsights200ResponseScores.md) - - [OpenapiClient::GetUserApps200ResponseInner](docs/GetUserApps200ResponseInner.md) - - [OpenapiClient::Hook](docs/Hook.md) - - [OpenapiClient::HookConditionsInner](docs/HookConditionsInner.md) - - [OpenapiClient::HookOptions](docs/HookOptions.md) - - [OpenapiClient::HookStatus](docs/HookStatus.md) - - [OpenapiClient::Id](docs/Id.md) - - [OpenapiClient::ListAccessTokenClaims200ResponseInner](docs/ListAccessTokenClaims200ResponseInner.md) - - [OpenapiClient::ListActions200ResponseInner](docs/ListActions200ResponseInner.md) - - [OpenapiClient::ListAppUsers200ResponseInner](docs/ListAppUsers200ResponseInner.md) - - [OpenapiClient::ListAuthorizationServers200ResponseInner](docs/ListAuthorizationServers200ResponseInner.md) - - [OpenapiClient::ListAuthorizationServers200ResponseInnerConfiguration](docs/ListAuthorizationServers200ResponseInnerConfiguration.md) - - [OpenapiClient::ListConditionOperators200ResponseInner](docs/ListConditionOperators200ResponseInner.md) - - [OpenapiClient::ListConditionValues200ResponseInner](docs/ListConditionValues200ResponseInner.md) - - [OpenapiClient::ListConditions200ResponseInner](docs/ListConditions200ResponseInner.md) - - [OpenapiClient::ListMappingConditionOperators200ResponseInner](docs/ListMappingConditionOperators200ResponseInner.md) - - [OpenapiClient::ListMappingConditions200ResponseInner](docs/ListMappingConditions200ResponseInner.md) - - [OpenapiClient::ListScopes200ResponseInner](docs/ListScopes200ResponseInner.md) - - [OpenapiClient::Log](docs/Log.md) - - [OpenapiClient::Mapping](docs/Mapping.md) - - [OpenapiClient::Registration](docs/Registration.md) - - [OpenapiClient::RemoveRoleUsersRequest](docs/RemoveRoleUsersRequest.md) - - [OpenapiClient::RevokeTokenRequest](docs/RevokeTokenRequest.md) - - [OpenapiClient::RiskDevice](docs/RiskDevice.md) - - [OpenapiClient::RiskRule](docs/RiskRule.md) - - [OpenapiClient::RiskUser](docs/RiskUser.md) - - [OpenapiClient::Role](docs/Role.md) - - [OpenapiClient::Rule](docs/Rule.md) - - [OpenapiClient::RuleId](docs/RuleId.md) - - [OpenapiClient::Schema](docs/Schema.md) - - [OpenapiClient::Schema1](docs/Schema1.md) - - [OpenapiClient::Schema1AddedBy](docs/Schema1AddedBy.md) - - [OpenapiClient::SchemaProvisioning](docs/SchemaProvisioning.md) - - [OpenapiClient::Session](docs/Session.md) - - [OpenapiClient::SetRoleApps200ResponseInner](docs/SetRoleApps200ResponseInner.md) - - [OpenapiClient::Source](docs/Source.md) - - [OpenapiClient::Status](docs/Status.md) - - [OpenapiClient::Status1](docs/Status1.md) - - [OpenapiClient::Status2](docs/Status2.md) - - [OpenapiClient::Status2Status](docs/Status2Status.md) - - [OpenapiClient::TrackEventRequest](docs/TrackEventRequest.md) - - [OpenapiClient::UpdateAuthorizationServer400Response](docs/UpdateAuthorizationServer400Response.md) - - [OpenapiClient::UpdateClientAppRequest](docs/UpdateClientAppRequest.md) - - [OpenapiClient::UpdateEnvironmentVariableRequest](docs/UpdateEnvironmentVariableRequest.md) - - [OpenapiClient::UpdateRole200Response](docs/UpdateRole200Response.md) - - [OpenapiClient::User](docs/User.md) - - [OpenapiClient::VerifyEnrollmentRequest](docs/VerifyEnrollmentRequest.md) - - [OpenapiClient::VerifyFactorRequest](docs/VerifyFactorRequest.md) - - [OpenapiClient::VerifyFactorSaml200Response](docs/VerifyFactorSaml200Response.md) - - [OpenapiClient::VerifyFactorSamlRequest](docs/VerifyFactorSamlRequest.md) - - [OpenapiClient::VerifyFactorVoice200ResponseInner](docs/VerifyFactorVoice200ResponseInner.md) + - [OneLogin::Action](docs/Action.md) + - [OneLogin::ActivateFactorRequest](docs/ActivateFactorRequest.md) + - [OneLogin::AddAccessTokenClaimRequest](docs/AddAccessTokenClaimRequest.md) + - [OneLogin::AddClientAppRequest](docs/AddClientAppRequest.md) + - [OneLogin::AddRoleUsers200ResponseInner](docs/AddRoleUsers200ResponseInner.md) + - [OneLogin::AddScopeRequest](docs/AddScopeRequest.md) + - [OneLogin::AuthMethod](docs/AuthMethod.md) + - [OneLogin::AuthServerConfiguration](docs/AuthServerConfiguration.md) + - [OneLogin::ClientApp](docs/ClientApp.md) + - [OneLogin::Condition](docs/Condition.md) + - [OneLogin::Connector](docs/Connector.md) + - [OneLogin::CreateAuthorizationServerRequest](docs/CreateAuthorizationServerRequest.md) + - [OneLogin::CreateEnvironmentVariableRequest](docs/CreateEnvironmentVariableRequest.md) + - [OneLogin::CreateRoles201ResponseInner](docs/CreateRoles201ResponseInner.md) + - [OneLogin::Device](docs/Device.md) + - [OneLogin::EnrollFactorRequest](docs/EnrollFactorRequest.md) + - [OneLogin::Envvar](docs/Envvar.md) + - [OneLogin::ErrorStatus](docs/ErrorStatus.md) + - [OneLogin::ErrorStatusErrorsInner](docs/ErrorStatusErrorsInner.md) + - [OneLogin::FactorInner](docs/FactorInner.md) + - [OneLogin::FactorInnerFactorData](docs/FactorInnerFactorData.md) + - [OneLogin::GenerateMfaToken200Response](docs/GenerateMfaToken200Response.md) + - [OneLogin::GenerateMfaToken422Response](docs/GenerateMfaToken422Response.md) + - [OneLogin::GenerateMfaToken422ResponseDetails](docs/GenerateMfaToken422ResponseDetails.md) + - [OneLogin::GenerateMfaTokenRequest](docs/GenerateMfaTokenRequest.md) + - [OneLogin::GenerateSamlAssertionRequest](docs/GenerateSamlAssertionRequest.md) + - [OneLogin::GenerateToken200Response](docs/GenerateToken200Response.md) + - [OneLogin::GenerateToken400Response](docs/GenerateToken400Response.md) + - [OneLogin::GenerateTokenRequest](docs/GenerateTokenRequest.md) + - [OneLogin::GetAuthorizationServer200Response](docs/GetAuthorizationServer200Response.md) + - [OneLogin::GetAvailableFactors200ResponseInner](docs/GetAvailableFactors200ResponseInner.md) + - [OneLogin::GetClientApps200ResponseInner](docs/GetClientApps200ResponseInner.md) + - [OneLogin::GetClientApps200ResponseInnerScopesInner](docs/GetClientApps200ResponseInnerScopesInner.md) + - [OneLogin::GetRateLimit200Response](docs/GetRateLimit200Response.md) + - [OneLogin::GetRateLimit200ResponseData](docs/GetRateLimit200ResponseData.md) + - [OneLogin::GetRiskScore200Response](docs/GetRiskScore200Response.md) + - [OneLogin::GetRiskScore400Response](docs/GetRiskScore400Response.md) + - [OneLogin::GetRiskScoreRequest](docs/GetRiskScoreRequest.md) + - [OneLogin::GetScoreInsights200Response](docs/GetScoreInsights200Response.md) + - [OneLogin::GetScoreInsights200ResponseScores](docs/GetScoreInsights200ResponseScores.md) + - [OneLogin::GetUserApps200ResponseInner](docs/GetUserApps200ResponseInner.md) + - [OneLogin::Hook](docs/Hook.md) + - [OneLogin::HookConditionsInner](docs/HookConditionsInner.md) + - [OneLogin::HookOptions](docs/HookOptions.md) + - [OneLogin::HookStatus](docs/HookStatus.md) + - [OneLogin::Id](docs/Id.md) + - [OneLogin::ListAccessTokenClaims200ResponseInner](docs/ListAccessTokenClaims200ResponseInner.md) + - [OneLogin::ListActions200ResponseInner](docs/ListActions200ResponseInner.md) + - [OneLogin::ListAppUsers200ResponseInner](docs/ListAppUsers200ResponseInner.md) + - [OneLogin::ListAuthorizationServers200ResponseInner](docs/ListAuthorizationServers200ResponseInner.md) + - [OneLogin::ListAuthorizationServers200ResponseInnerConfiguration](docs/ListAuthorizationServers200ResponseInnerConfiguration.md) + - [OneLogin::ListConditionOperators200ResponseInner](docs/ListConditionOperators200ResponseInner.md) + - [OneLogin::ListConditionValues200ResponseInner](docs/ListConditionValues200ResponseInner.md) + - [OneLogin::ListConditions200ResponseInner](docs/ListConditions200ResponseInner.md) + - [OneLogin::ListMappingConditionOperators200ResponseInner](docs/ListMappingConditionOperators200ResponseInner.md) + - [OneLogin::ListMappingConditions200ResponseInner](docs/ListMappingConditions200ResponseInner.md) + - [OneLogin::ListScopes200ResponseInner](docs/ListScopes200ResponseInner.md) + - [OneLogin::Log](docs/Log.md) + - [OneLogin::Mapping](docs/Mapping.md) + - [OneLogin::Registration](docs/Registration.md) + - [OneLogin::RemoveRoleUsersRequest](docs/RemoveRoleUsersRequest.md) + - [OneLogin::RevokeTokenRequest](docs/RevokeTokenRequest.md) + - [OneLogin::RiskDevice](docs/RiskDevice.md) + - [OneLogin::RiskRule](docs/RiskRule.md) + - [OneLogin::RiskUser](docs/RiskUser.md) + - [OneLogin::Role](docs/Role.md) + - [OneLogin::Rule](docs/Rule.md) + - [OneLogin::RuleId](docs/RuleId.md) + - [OneLogin::Schema](docs/Schema.md) + - [OneLogin::Schema1](docs/Schema1.md) + - [OneLogin::Schema1AddedBy](docs/Schema1AddedBy.md) + - [OneLogin::SchemaProvisioning](docs/SchemaProvisioning.md) + - [OneLogin::Session](docs/Session.md) + - [OneLogin::SetRoleApps200ResponseInner](docs/SetRoleApps200ResponseInner.md) + - [OneLogin::Source](docs/Source.md) + - [OneLogin::Status](docs/Status.md) + - [OneLogin::Status1](docs/Status1.md) + - [OneLogin::Status2](docs/Status2.md) + - [OneLogin::Status2Status](docs/Status2Status.md) + - [OneLogin::TrackEventRequest](docs/TrackEventRequest.md) + - [OneLogin::UpdateAuthorizationServer400Response](docs/UpdateAuthorizationServer400Response.md) + - [OneLogin::UpdateClientAppRequest](docs/UpdateClientAppRequest.md) + - [OneLogin::UpdateEnvironmentVariableRequest](docs/UpdateEnvironmentVariableRequest.md) + - [OneLogin::UpdateRole200Response](docs/UpdateRole200Response.md) + - [OneLogin::User](docs/User.md) + - [OneLogin::VerifyEnrollmentRequest](docs/VerifyEnrollmentRequest.md) + - [OneLogin::VerifyFactorRequest](docs/VerifyFactorRequest.md) + - [OneLogin::VerifyFactorSaml200Response](docs/VerifyFactorSaml200Response.md) + - [OneLogin::VerifyFactorSamlRequest](docs/VerifyFactorSamlRequest.md) + - [OneLogin::VerifyFactorVoice200ResponseInner](docs/VerifyFactorVoice200ResponseInner.md) ## Documentation for Authorization diff --git a/docs/Action.md b/docs/Action.md index 5b87692..c7e09c6 100644 --- a/docs/Action.md +++ b/docs/Action.md @@ -1,4 +1,4 @@ -# OpenapiClient::Action +# OneLogin::Action ## Properties @@ -13,9 +13,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::Action.new( +instance = OneLogin::Action.new( action: null, value: null, expression: null, diff --git a/docs/ActivateFactorRequest.md b/docs/ActivateFactorRequest.md index 1493e11..10e23db 100644 --- a/docs/ActivateFactorRequest.md +++ b/docs/ActivateFactorRequest.md @@ -1,4 +1,4 @@ -# OpenapiClient::ActivateFactorRequest +# OneLogin::ActivateFactorRequest ## Properties @@ -12,9 +12,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::ActivateFactorRequest.new( +instance = OneLogin::ActivateFactorRequest.new( device_id: null, expires_in: null, redirect_to: null, diff --git a/docs/AddAccessTokenClaimRequest.md b/docs/AddAccessTokenClaimRequest.md index 5b0fbaa..a7bb640 100644 --- a/docs/AddAccessTokenClaimRequest.md +++ b/docs/AddAccessTokenClaimRequest.md @@ -1,4 +1,4 @@ -# OpenapiClient::AddAccessTokenClaimRequest +# OneLogin::AddAccessTokenClaimRequest ## Properties @@ -11,9 +11,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::AddAccessTokenClaimRequest.new( +instance = OneLogin::AddAccessTokenClaimRequest.new( name: null, user_attribute_mappings: null, user_attribute_macros: null diff --git a/docs/AddClientAppRequest.md b/docs/AddClientAppRequest.md index 6acdbdc..b94ec87 100644 --- a/docs/AddClientAppRequest.md +++ b/docs/AddClientAppRequest.md @@ -1,4 +1,4 @@ -# OpenapiClient::AddClientAppRequest +# OneLogin::AddClientAppRequest ## Properties @@ -10,9 +10,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::AddClientAppRequest.new( +instance = OneLogin::AddClientAppRequest.new( app_id: null, scopes: null ) diff --git a/docs/AddRoleUsers200ResponseInner.md b/docs/AddRoleUsers200ResponseInner.md index 2c4f3fb..6a841e3 100644 --- a/docs/AddRoleUsers200ResponseInner.md +++ b/docs/AddRoleUsers200ResponseInner.md @@ -1,4 +1,4 @@ -# OpenapiClient::AddRoleUsers200ResponseInner +# OneLogin::AddRoleUsers200ResponseInner ## Properties @@ -9,9 +9,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::AddRoleUsers200ResponseInner.new( +instance = OneLogin::AddRoleUsers200ResponseInner.new( id: null ) ``` diff --git a/docs/AddScopeRequest.md b/docs/AddScopeRequest.md index 1040f86..db9bc14 100644 --- a/docs/AddScopeRequest.md +++ b/docs/AddScopeRequest.md @@ -1,4 +1,4 @@ -# OpenapiClient::AddScopeRequest +# OneLogin::AddScopeRequest ## Properties @@ -10,9 +10,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::AddScopeRequest.new( +instance = OneLogin::AddScopeRequest.new( value: null, description: null ) diff --git a/docs/AuthMethod.md b/docs/AuthMethod.md index 814348c..8255ec8 100644 --- a/docs/AuthMethod.md +++ b/docs/AuthMethod.md @@ -1,4 +1,4 @@ -# OpenapiClient::AuthMethod +# OneLogin::AuthMethod ## Properties @@ -8,8 +8,8 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::AuthMethod.new() +instance = OneLogin::AuthMethod.new() ``` diff --git a/docs/AuthServerConfiguration.md b/docs/AuthServerConfiguration.md index 2d603cc..14bb2d6 100644 --- a/docs/AuthServerConfiguration.md +++ b/docs/AuthServerConfiguration.md @@ -1,4 +1,4 @@ -# OpenapiClient::AuthServerConfiguration +# OneLogin::AuthServerConfiguration ## Properties @@ -12,9 +12,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::AuthServerConfiguration.new( +instance = OneLogin::AuthServerConfiguration.new( audiences: null, refresh_token_expiration_minutes: null, resource_identifier: null, diff --git a/docs/ClientApp.md b/docs/ClientApp.md index eed53fe..31b6f1e 100644 --- a/docs/ClientApp.md +++ b/docs/ClientApp.md @@ -1,4 +1,4 @@ -# OpenapiClient::ClientApp +# OneLogin::ClientApp ## Properties @@ -10,9 +10,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::ClientApp.new( +instance = OneLogin::ClientApp.new( app_id: null, api_auth_id: null ) diff --git a/docs/Condition.md b/docs/Condition.md index e7ba475..460535c 100644 --- a/docs/Condition.md +++ b/docs/Condition.md @@ -1,4 +1,4 @@ -# OpenapiClient::Condition +# OneLogin::Condition ## Properties @@ -11,9 +11,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::Condition.new( +instance = OneLogin::Condition.new( source: null, operator: null, value: null diff --git a/docs/Connector.md b/docs/Connector.md index d3e688b..39e9738 100644 --- a/docs/Connector.md +++ b/docs/Connector.md @@ -1,4 +1,4 @@ -# OpenapiClient::Connector +# OneLogin::Connector ## Properties @@ -13,9 +13,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::Connector.new( +instance = OneLogin::Connector.new( id: null, name: null, auth_method: null, diff --git a/docs/CreateAuthorizationServerRequest.md b/docs/CreateAuthorizationServerRequest.md index f9102b1..4350ea1 100644 --- a/docs/CreateAuthorizationServerRequest.md +++ b/docs/CreateAuthorizationServerRequest.md @@ -1,4 +1,4 @@ -# OpenapiClient::CreateAuthorizationServerRequest +# OneLogin::CreateAuthorizationServerRequest ## Properties @@ -11,9 +11,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::CreateAuthorizationServerRequest.new( +instance = OneLogin::CreateAuthorizationServerRequest.new( name: null, description: null, configuration: null diff --git a/docs/CreateEnvironmentVariableRequest.md b/docs/CreateEnvironmentVariableRequest.md index 3734901..752d739 100644 --- a/docs/CreateEnvironmentVariableRequest.md +++ b/docs/CreateEnvironmentVariableRequest.md @@ -1,4 +1,4 @@ -# OpenapiClient::CreateEnvironmentVariableRequest +# OneLogin::CreateEnvironmentVariableRequest ## Properties @@ -10,9 +10,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::CreateEnvironmentVariableRequest.new( +instance = OneLogin::CreateEnvironmentVariableRequest.new( name: null, value: null ) diff --git a/docs/CreateRoles201ResponseInner.md b/docs/CreateRoles201ResponseInner.md index 3c492d1..02ec24c 100644 --- a/docs/CreateRoles201ResponseInner.md +++ b/docs/CreateRoles201ResponseInner.md @@ -1,4 +1,4 @@ -# OpenapiClient::CreateRoles201ResponseInner +# OneLogin::CreateRoles201ResponseInner ## Properties @@ -9,9 +9,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::CreateRoles201ResponseInner.new( +instance = OneLogin::CreateRoles201ResponseInner.new( id: null ) ``` diff --git a/docs/DefaultApi.md b/docs/DefaultApi.md index 43a34b3..6470c6e 100644 --- a/docs/DefaultApi.md +++ b/docs/DefaultApi.md @@ -1,4 +1,4 @@ -# OpenapiClient::DefaultApi +# OneLogin::DefaultApi All URIs are relative to *https://onelogininc.onelogin.com* @@ -117,17 +117,17 @@ All URIs are relative to *https://onelogininc.onelogin.com* ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | user_id = 56 # Integer | Set to the id of the user. -activate_factor_request = OpenapiClient::ActivateFactorRequest.new # ActivateFactorRequest | +activate_factor_request = OneLogin::ActivateFactorRequest.new # ActivateFactorRequest | begin api_instance.activate_factor(authorization, user_id, activate_factor_request) -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->activate_factor: #{e}" end ``` @@ -145,7 +145,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => nil -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->activate_factor_with_http_info: #{e}" end ``` @@ -182,18 +182,18 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | id = 56 # Integer | -add_access_token_claim_request = OpenapiClient::AddAccessTokenClaimRequest.new # AddAccessTokenClaimRequest | +add_access_token_claim_request = OneLogin::AddAccessTokenClaimRequest.new # AddAccessTokenClaimRequest | begin result = api_instance.add_access_token_claim(authorization, id, add_access_token_claim_request) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->add_access_token_claim: #{e}" end ``` @@ -211,7 +211,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->add_access_token_claim_with_http_info: #{e}" end ``` @@ -248,18 +248,18 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | id = 56 # Integer | -add_client_app_request = OpenapiClient::AddClientAppRequest.new # AddClientAppRequest | +add_client_app_request = OneLogin::AddClientAppRequest.new # AddClientAppRequest | begin result = api_instance.add_client_app(authorization, id, add_client_app_request) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->add_client_app: #{e}" end ``` @@ -277,7 +277,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->add_client_app_with_http_info: #{e}" end ``` @@ -314,9 +314,9 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | role_id = 56 # Integer | Set to the id of the role you want to return. request_body = [37] # Array | @@ -325,7 +325,7 @@ begin result = api_instance.add_role_admins(authorization, role_id, request_body) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->add_role_admins: #{e}" end ``` @@ -343,7 +343,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => > -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->add_role_admins_with_http_info: #{e}" end ``` @@ -380,9 +380,9 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | role_id = 56 # Integer | Set to the id of the role you want to return. request_body = [37] # Array | @@ -391,7 +391,7 @@ begin result = api_instance.add_role_users(authorization, role_id, request_body) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->add_role_users: #{e}" end ``` @@ -409,7 +409,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => > -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->add_role_users_with_http_info: #{e}" end ``` @@ -446,18 +446,18 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | id = 56 # Integer | -add_scope_request = OpenapiClient::AddScopeRequest.new # AddScopeRequest | +add_scope_request = OneLogin::AddScopeRequest.new # AddScopeRequest | begin result = api_instance.add_scope(authorization, id, add_scope_request) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->add_scope: #{e}" end ``` @@ -475,7 +475,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->add_scope_with_http_info: #{e}" end ``` @@ -512,9 +512,9 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | request_body = [37] # Array | The request body must contain an array of User Mapping IDs in the desired order. @@ -522,7 +522,7 @@ begin result = api_instance.bulk_mapping_sort(authorization, request_body) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->bulk_mapping_sort: #{e}" end ``` @@ -540,7 +540,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => Array<Integer> -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->bulk_mapping_sort_with_http_info: #{e}" end ``` @@ -576,9 +576,9 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | app_id = 56 # Integer | request_body = [37] # Array | The request body must contain an array of App Rule IDs in the desired order. @@ -587,7 +587,7 @@ begin result = api_instance.bulk_sort(authorization, app_id, request_body) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->bulk_sort: #{e}" end ``` @@ -605,7 +605,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => Array<Integer> -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->bulk_sort_with_http_info: #{e}" end ``` @@ -642,17 +642,17 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | -schema = OpenapiClient::Schema.new # Schema | +schema = OneLogin::Schema.new # Schema | begin result = api_instance.create_app(authorization, schema) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->create_app: #{e}" end ``` @@ -670,7 +670,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->create_app_with_http_info: #{e}" end ``` @@ -706,17 +706,17 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | -create_authorization_server_request = OpenapiClient::CreateAuthorizationServerRequest.new # CreateAuthorizationServerRequest | +create_authorization_server_request = OneLogin::CreateAuthorizationServerRequest.new # CreateAuthorizationServerRequest | begin result = api_instance.create_authorization_server(authorization, create_authorization_server_request) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->create_authorization_server: #{e}" end ``` @@ -734,7 +734,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->create_authorization_server_with_http_info: #{e}" end ``` @@ -770,17 +770,17 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | -create_environment_variable_request = OpenapiClient::CreateEnvironmentVariableRequest.new({name: 'name_example', value: 'value_example'}) # CreateEnvironmentVariableRequest | +create_environment_variable_request = OneLogin::CreateEnvironmentVariableRequest.new({name: 'name_example', value: 'value_example'}) # CreateEnvironmentVariableRequest | begin result = api_instance.create_environment_variable(authorization, create_environment_variable_request) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->create_environment_variable: #{e}" end ``` @@ -798,7 +798,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->create_environment_variable_with_http_info: #{e}" end ``` @@ -834,16 +834,16 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | -hook = OpenapiClient::Hook.new({type: 'type_example', disabled: false, timeout: 37, env_vars: ['env_vars_example'], runtime: 'runtime_example', retries: 37, packages: 3.56, function: 'function_example'}) # Hook | +hook = OneLogin::Hook.new({type: 'type_example', disabled: false, timeout: 37, env_vars: ['env_vars_example'], runtime: 'runtime_example', retries: 37, packages: 3.56, function: 'function_example'}) # Hook | begin api_instance.create_hook(authorization, hook) -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->create_hook: #{e}" end ``` @@ -861,7 +861,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => nil -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->create_hook_with_http_info: #{e}" end ``` @@ -897,17 +897,17 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | -mapping = OpenapiClient::Mapping.new({name: 'name_example', enabled: false, match: 'all', position: 37, actions: [OpenapiClient::Action.new]}) # Mapping | +mapping = OneLogin::Mapping.new({name: 'name_example', enabled: false, match: 'all', position: 37, actions: [OneLogin::Action.new]}) # Mapping | begin result = api_instance.create_mapping(authorization, mapping) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->create_mapping: #{e}" end ``` @@ -925,7 +925,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => Integer -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->create_mapping_with_http_info: #{e}" end ``` @@ -961,16 +961,16 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | -risk_rule = OpenapiClient::RiskRule.new # RiskRule | +risk_rule = OneLogin::RiskRule.new # RiskRule | begin api_instance.create_risk_rule(authorization, risk_rule) -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->create_risk_rule: #{e}" end ``` @@ -988,7 +988,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => nil -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->create_risk_rule_with_http_info: #{e}" end ``` @@ -1024,16 +1024,16 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | begin result = api_instance.create_roles(authorization) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->create_roles: #{e}" end ``` @@ -1051,7 +1051,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => > -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->create_roles_with_http_info: #{e}" end ``` @@ -1086,18 +1086,18 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | app_id = 56 # Integer | -rule = OpenapiClient::Rule.new # Rule | +rule = OneLogin::Rule.new # Rule | begin result = api_instance.create_rule(authorization, app_id, rule) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->create_rule: #{e}" end ``` @@ -1115,7 +1115,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->create_rule_with_http_info: #{e}" end ``` @@ -1152,11 +1152,11 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | -user = OpenapiClient::User.new # User | +user = OneLogin::User.new # User | opts = { mappings: 'async', # String | Controls how mappings will be applied to the user on creation. Defaults to async. validate_policy: true # Boolean | Will passwords validate against the User Policy? Defaults to true. @@ -1166,7 +1166,7 @@ begin result = api_instance.create_user(authorization, user, opts) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->create_user: #{e}" end ``` @@ -1184,7 +1184,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->create_user_with_http_info: #{e}" end ``` @@ -1222,9 +1222,9 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | id = 56 # Integer | claim_id = 56 # Integer | @@ -1232,7 +1232,7 @@ claim_id = 56 # Integer | begin api_instance.delete_access_token_claim(authorization, id, claim_id) -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->delete_access_token_claim: #{e}" end ``` @@ -1250,7 +1250,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => nil -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->delete_access_token_claim_with_http_info: #{e}" end ``` @@ -1287,16 +1287,16 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | app_id = 56 # Integer | begin api_instance.delete_app(authorization, app_id) -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->delete_app: #{e}" end ``` @@ -1314,7 +1314,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => nil -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->delete_app_with_http_info: #{e}" end ``` @@ -1350,9 +1350,9 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | app_id = 56 # Integer | parameter_id = 56 # Integer | @@ -1360,7 +1360,7 @@ parameter_id = 56 # Integer | begin api_instance.delete_app_parameter(authorization, app_id, parameter_id) -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->delete_app_parameter: #{e}" end ``` @@ -1378,7 +1378,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => nil -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->delete_app_parameter_with_http_info: #{e}" end ``` @@ -1415,16 +1415,16 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | id = 56 # Integer | begin api_instance.delete_authorization_server(authorization, id) -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->delete_authorization_server: #{e}" end ``` @@ -1442,7 +1442,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => nil -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->delete_authorization_server_with_http_info: #{e}" end ``` @@ -1478,16 +1478,16 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | envvar_id = 'envvar_id_example' # String | Set to the id of the Hook Environment Variable that you want to fetch. begin api_instance.delete_environment_variable(authorization, envvar_id) -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->delete_environment_variable: #{e}" end ``` @@ -1505,7 +1505,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => nil -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->delete_environment_variable_with_http_info: #{e}" end ``` @@ -1541,9 +1541,9 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | user_id = 56 # Integer | Set to the id of the user. device_id = 56 # Integer | Set to the device_id of the MFA device. @@ -1551,7 +1551,7 @@ device_id = 56 # Integer | Set to the device_id of the MFA device. begin api_instance.delete_factor(authorization, user_id, device_id) -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->delete_factor: #{e}" end ``` @@ -1569,7 +1569,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => nil -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->delete_factor_with_http_info: #{e}" end ``` @@ -1606,16 +1606,16 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | hook_id = 'hook_id_example' # String | Set to the id of the Hook that you want to return. begin api_instance.delete_hook(authorization, hook_id) -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->delete_hook: #{e}" end ``` @@ -1633,7 +1633,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => nil -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->delete_hook_with_http_info: #{e}" end ``` @@ -1669,16 +1669,16 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | mapping_id = 56 # Integer | The id of the user mapping to locate. begin api_instance.delete_mapping(authorization, mapping_id) -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->delete_mapping: #{e}" end ``` @@ -1696,7 +1696,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => nil -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->delete_mapping_with_http_info: #{e}" end ``` @@ -1732,9 +1732,9 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | risk_rule_id = 'risk_rule_id_example' # String | @@ -1742,7 +1742,7 @@ begin result = api_instance.delete_risk_rule(authorization, risk_rule_id) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->delete_risk_rule: #{e}" end ``` @@ -1760,7 +1760,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->delete_risk_rule_with_http_info: #{e}" end ``` @@ -1796,16 +1796,16 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | role_id = 56 # Integer | Set to the id of the role you want to return. begin api_instance.delete_role(authorization, role_id) -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->delete_role: #{e}" end ``` @@ -1823,7 +1823,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => nil -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->delete_role_with_http_info: #{e}" end ``` @@ -1859,9 +1859,9 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | app_id = 56 # Integer | rule_id = 56 # Integer | The id of the app rule to locate. @@ -1869,7 +1869,7 @@ rule_id = 56 # Integer | The id of the app rule to locate. begin api_instance.delete_rule(authorization, app_id, rule_id) -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->delete_rule: #{e}" end ``` @@ -1887,7 +1887,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => nil -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->delete_rule_with_http_info: #{e}" end ``` @@ -1924,9 +1924,9 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | id = 56 # Integer | scope_id = 56 # Integer | @@ -1934,7 +1934,7 @@ scope_id = 56 # Integer | begin api_instance.delete_scope(authorization, id, scope_id) -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->delete_scope: #{e}" end ``` @@ -1952,7 +1952,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => nil -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->delete_scope_with_http_info: #{e}" end ``` @@ -1989,16 +1989,16 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | user_id = 56 # Integer | Set to the id of the user that you want to return. begin api_instance.delete_user(authorization, user_id) -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->delete_user: #{e}" end ``` @@ -2016,7 +2016,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => nil -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->delete_user_with_http_info: #{e}" end ``` @@ -2052,9 +2052,9 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | mapping_id = 56 # Integer | The id of the user mapping to locate. request_body = [37] # Array | Request body is a list of user IDs tested against the mapping conditions to verify that the mapping would be applied @@ -2063,7 +2063,7 @@ begin result = api_instance.dry_run_mapping(authorization, mapping_id, request_body) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->dry_run_mapping: #{e}" end ``` @@ -2081,7 +2081,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => Array<Object> -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->dry_run_mapping_with_http_info: #{e}" end ``` @@ -2118,18 +2118,18 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | user_id = 56 # Integer | Set to the id of the user. -enroll_factor_request = OpenapiClient::EnrollFactorRequest.new({factor_id: 37, display_name: 'display_name_example'}) # EnrollFactorRequest | +enroll_factor_request = OneLogin::EnrollFactorRequest.new({factor_id: 37, display_name: 'display_name_example'}) # EnrollFactorRequest | begin result = api_instance.enroll_factor(authorization, user_id, enroll_factor_request) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->enroll_factor: #{e}" end ``` @@ -2147,7 +2147,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => Array<Array> -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->enroll_factor_with_http_info: #{e}" end ``` @@ -2184,17 +2184,17 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | -generate_mfa_token_request = OpenapiClient::GenerateMfaTokenRequest.new # GenerateMfaTokenRequest | +generate_mfa_token_request = OneLogin::GenerateMfaTokenRequest.new # GenerateMfaTokenRequest | begin result = api_instance.generate_mfa_token(authorization, generate_mfa_token_request) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->generate_mfa_token: #{e}" end ``` @@ -2212,7 +2212,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->generate_mfa_token_with_http_info: #{e}" end ``` @@ -2248,16 +2248,16 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | -generate_saml_assertion_request = OpenapiClient::GenerateSamlAssertionRequest.new({username_or_email: 'username_or_email_example', password: 'password_example', app_id: 'app_id_example', subdomain: 'subdomain_example'}) # GenerateSamlAssertionRequest | +generate_saml_assertion_request = OneLogin::GenerateSamlAssertionRequest.new({username_or_email: 'username_or_email_example', password: 'password_example', app_id: 'app_id_example', subdomain: 'subdomain_example'}) # GenerateSamlAssertionRequest | begin api_instance.generate_saml_assertion(authorization, generate_saml_assertion_request) -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->generate_saml_assertion: #{e}" end ``` @@ -2275,7 +2275,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => nil -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->generate_saml_assertion_with_http_info: #{e}" end ``` @@ -2311,17 +2311,17 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | -generate_token_request = OpenapiClient::GenerateTokenRequest.new # GenerateTokenRequest | +generate_token_request = OneLogin::GenerateTokenRequest.new # GenerateTokenRequest | begin result = api_instance.generate_token(authorization, generate_token_request) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->generate_token: #{e}" end ``` @@ -2339,7 +2339,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->generate_token_with_http_info: #{e}" end ``` @@ -2375,9 +2375,9 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | app_id = 56 # Integer | @@ -2385,7 +2385,7 @@ begin result = api_instance.get_app(authorization, app_id) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->get_app: #{e}" end ``` @@ -2403,7 +2403,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->get_app_with_http_info: #{e}" end ``` @@ -2439,9 +2439,9 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | id = 56 # Integer | @@ -2449,7 +2449,7 @@ begin result = api_instance.get_authorization_server(authorization, id) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->get_authorization_server: #{e}" end ``` @@ -2467,7 +2467,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->get_authorization_server_with_http_info: #{e}" end ``` @@ -2503,9 +2503,9 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | user_id = 56 # Integer | Set to the id of the user. @@ -2513,7 +2513,7 @@ begin result = api_instance.get_available_factors(authorization, user_id) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->get_available_factors: #{e}" end ``` @@ -2531,7 +2531,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => > -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->get_available_factors_with_http_info: #{e}" end ``` @@ -2567,9 +2567,9 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | id = 56 # Integer | @@ -2577,7 +2577,7 @@ begin result = api_instance.get_client_apps(authorization, id) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->get_client_apps: #{e}" end ``` @@ -2595,7 +2595,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => > -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->get_client_apps_with_http_info: #{e}" end ``` @@ -2631,9 +2631,9 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | user_id = 56 # Integer | Set to the id of the user. @@ -2641,7 +2641,7 @@ begin result = api_instance.get_enrolled_factors(authorization, user_id) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->get_enrolled_factors: #{e}" end ``` @@ -2659,7 +2659,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => > -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->get_enrolled_factors_with_http_info: #{e}" end ``` @@ -2695,9 +2695,9 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | envvar_id = 'envvar_id_example' # String | Set to the id of the Hook Environment Variable that you want to fetch. @@ -2705,7 +2705,7 @@ begin result = api_instance.get_environment_variable(authorization, envvar_id) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->get_environment_variable: #{e}" end ``` @@ -2723,7 +2723,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->get_environment_variable_with_http_info: #{e}" end ``` @@ -2759,9 +2759,9 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | hook_id = 'hook_id_example' # String | Set to the id of the Hook that you want to return. @@ -2769,7 +2769,7 @@ begin result = api_instance.get_hook(authorization, hook_id) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->get_hook: #{e}" end ``` @@ -2787,7 +2787,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->get_hook_with_http_info: #{e}" end ``` @@ -2823,9 +2823,9 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | hook_id = 'hook_id_example' # String | Set to the id of the Hook that you want to return. opts = { @@ -2840,7 +2840,7 @@ begin result = api_instance.get_logs(authorization, hook_id, opts) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->get_logs: #{e}" end ``` @@ -2858,7 +2858,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => > -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->get_logs_with_http_info: #{e}" end ``` @@ -2899,9 +2899,9 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | mapping_id = 56 # Integer | The id of the user mapping to locate. @@ -2909,7 +2909,7 @@ begin result = api_instance.get_mapping(authorization, mapping_id) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->get_mapping: #{e}" end ``` @@ -2927,7 +2927,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->get_mapping_with_http_info: #{e}" end ``` @@ -2963,16 +2963,16 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | begin result = api_instance.get_rate_limit(authorization) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->get_rate_limit: #{e}" end ``` @@ -2990,7 +2990,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->get_rate_limit_with_http_info: #{e}" end ``` @@ -3025,16 +3025,16 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | risk_rule_id = 'risk_rule_id_example' # String | begin api_instance.get_risk_rule(authorization, risk_rule_id) -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->get_risk_rule: #{e}" end ``` @@ -3052,7 +3052,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => nil -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->get_risk_rule_with_http_info: #{e}" end ``` @@ -3088,17 +3088,17 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | -get_risk_score_request = OpenapiClient::GetRiskScoreRequest.new({ip: 'ip_example', user_agent: 'user_agent_example', user: OpenapiClient::RiskUser.new({id: 'id_example'})}) # GetRiskScoreRequest | +get_risk_score_request = OneLogin::GetRiskScoreRequest.new({ip: 'ip_example', user_agent: 'user_agent_example', user: OneLogin::RiskUser.new({id: 'id_example'})}) # GetRiskScoreRequest | begin result = api_instance.get_risk_score(authorization, get_risk_score_request) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->get_risk_score: #{e}" end ``` @@ -3116,7 +3116,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->get_risk_score_with_http_info: #{e}" end ``` @@ -3152,9 +3152,9 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | role_id = 56 # Integer | Set to the id of the role you want to return. @@ -3162,7 +3162,7 @@ begin result = api_instance.get_role(authorization, role_id) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->get_role: #{e}" end ``` @@ -3180,7 +3180,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->get_role_with_http_info: #{e}" end ``` @@ -3216,9 +3216,9 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | role_id = 56 # Integer | Set to the id of the role you want to return. opts = { @@ -3233,7 +3233,7 @@ begin result = api_instance.get_role_admins(authorization, role_id, opts) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->get_role_admins: #{e}" end ``` @@ -3251,7 +3251,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => > -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->get_role_admins_with_http_info: #{e}" end ``` @@ -3292,9 +3292,9 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | role_id = 56 # Integer | Set to the id of the role you want to return. opts = { @@ -3308,7 +3308,7 @@ begin result = api_instance.get_role_apps(authorization, role_id, opts) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->get_role_apps: #{e}" end ``` @@ -3326,7 +3326,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => > -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->get_role_apps_with_http_info: #{e}" end ``` @@ -3366,9 +3366,9 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | role_id = 56 # Integer | Set to the id of the role you want to return. opts = { @@ -3383,7 +3383,7 @@ begin result = api_instance.get_role_users(authorization, role_id, opts) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->get_role_users: #{e}" end ``` @@ -3401,7 +3401,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => > -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->get_role_users_with_http_info: #{e}" end ``` @@ -3442,9 +3442,9 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | app_id = 56 # Integer | rule_id = 56 # Integer | The id of the app rule to locate. @@ -3453,7 +3453,7 @@ begin result = api_instance.get_rule(authorization, app_id, rule_id) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->get_rule: #{e}" end ``` @@ -3471,7 +3471,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->get_rule_with_http_info: #{e}" end ``` @@ -3508,9 +3508,9 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | opts = { before: 'before_example', # String | Optional ISO8601 formatted date string. Defaults to current date. Maximum date is 90 days ago. @@ -3521,7 +3521,7 @@ begin result = api_instance.get_score_insights(authorization, opts) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->get_score_insights: #{e}" end ``` @@ -3539,7 +3539,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->get_score_insights_with_http_info: #{e}" end ``` @@ -3576,9 +3576,9 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | user_id = 56 # Integer | Set to the id of the user that you want to return. @@ -3586,7 +3586,7 @@ begin result = api_instance.get_user(authorization, user_id) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->get_user: #{e}" end ``` @@ -3604,7 +3604,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->get_user_with_http_info: #{e}" end ``` @@ -3640,9 +3640,9 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | user_id = 56 # Integer | Set to the id of the user that you want to return. opts = { @@ -3653,7 +3653,7 @@ begin result = api_instance.get_user_apps(authorization, user_id, opts) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->get_user_apps: #{e}" end ``` @@ -3671,7 +3671,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => > -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->get_user_apps_with_http_info: #{e}" end ``` @@ -3708,9 +3708,9 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | id = 56 # Integer | @@ -3718,7 +3718,7 @@ begin result = api_instance.list_access_token_claims(authorization, id) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->list_access_token_claims: #{e}" end ``` @@ -3736,7 +3736,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => > -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->list_access_token_claims_with_http_info: #{e}" end ``` @@ -3772,9 +3772,9 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | app_id = 56 # Integer | action_value = 'action_value_example' # String | The value for the selected action. @@ -3783,7 +3783,7 @@ begin result = api_instance.list_action_values(authorization, app_id, action_value) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->list_action_values: #{e}" end ``` @@ -3801,7 +3801,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => > -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->list_action_values_with_http_info: #{e}" end ``` @@ -3838,9 +3838,9 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | app_id = 56 # Integer | @@ -3848,7 +3848,7 @@ begin result = api_instance.list_actions(authorization, app_id) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->list_actions: #{e}" end ``` @@ -3866,7 +3866,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => > -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->list_actions_with_http_info: #{e}" end ``` @@ -3902,9 +3902,9 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | app_id = 56 # Integer | opts = { @@ -3917,7 +3917,7 @@ begin result = api_instance.list_app_users(authorization, app_id, opts) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->list_app_users: #{e}" end ``` @@ -3935,7 +3935,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => > -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->list_app_users_with_http_info: #{e}" end ``` @@ -3974,9 +3974,9 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | opts = { limit: 56, # Integer | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. @@ -3984,14 +3984,14 @@ opts = { cursor: 'cursor_example', # String | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. name: 'name_example', # String | The name or partial name of the app to search for. When using a partial name you must append a wildcard `*` connector_id: 56, # Integer | Returns all apps based off a specific connector. See List Connectors for a complete list of Connector IDs. - auth_method: OpenapiClient::AuthMethod::N0 # AuthMethod | Returns all apps based of a given type. + auth_method: OneLogin::AuthMethod::N0 # AuthMethod | Returns all apps based of a given type. } begin result = api_instance.list_apps(authorization, opts) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->list_apps: #{e}" end ``` @@ -4009,7 +4009,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => > -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->list_apps_with_http_info: #{e}" end ``` @@ -4050,16 +4050,16 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | begin result = api_instance.list_authorization_servers(authorization) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->list_authorization_servers: #{e}" end ``` @@ -4077,7 +4077,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => > -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->list_authorization_servers_with_http_info: #{e}" end ``` @@ -4112,9 +4112,9 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | app_id = 56 # Integer | condition_value = 'condition_value_example' # String | The value for the selected condition. @@ -4123,7 +4123,7 @@ begin result = api_instance.list_condition_operators(authorization, app_id, condition_value) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->list_condition_operators: #{e}" end ``` @@ -4141,7 +4141,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => > -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->list_condition_operators_with_http_info: #{e}" end ``` @@ -4178,9 +4178,9 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | app_id = 56 # Integer | condition_value = 'condition_value_example' # String | The value for the selected condition. @@ -4189,7 +4189,7 @@ begin result = api_instance.list_condition_values(authorization, app_id, condition_value) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->list_condition_values: #{e}" end ``` @@ -4207,7 +4207,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => > -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->list_condition_values_with_http_info: #{e}" end ``` @@ -4244,9 +4244,9 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | app_id = 56 # Integer | @@ -4254,7 +4254,7 @@ begin result = api_instance.list_conditions(authorization, app_id) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->list_conditions: #{e}" end ``` @@ -4272,7 +4272,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => > -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->list_conditions_with_http_info: #{e}" end ``` @@ -4308,23 +4308,23 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | opts = { limit: 56, # Integer | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. page: 56, # Integer | The page number of results to return. cursor: 'cursor_example', # String | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. name: 'name_example', # String | The name or partial name of the connector to search for. When using a partial name you must append a wildcard `*` - auth_method: OpenapiClient::AuthMethod::N0 # AuthMethod | Returns all connectors of a given type. + auth_method: OneLogin::AuthMethod::N0 # AuthMethod | Returns all connectors of a given type. } begin result = api_instance.list_connectors(authorization, opts) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->list_connectors: #{e}" end ``` @@ -4342,7 +4342,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => > -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->list_connectors_with_http_info: #{e}" end ``` @@ -4382,9 +4382,9 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | opts = { limit: 56, # Integer | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. @@ -4396,7 +4396,7 @@ begin result = api_instance.list_environment_variables(authorization, opts) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->list_environment_variables: #{e}" end ``` @@ -4414,7 +4414,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => > -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->list_environment_variables_with_http_info: #{e}" end ``` @@ -4452,9 +4452,9 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | opts = { limit: 56, # Integer | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. @@ -4466,7 +4466,7 @@ begin result = api_instance.list_hooks(authorization, opts) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->list_hooks: #{e}" end ``` @@ -4484,7 +4484,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => > -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->list_hooks_with_http_info: #{e}" end ``` @@ -4522,9 +4522,9 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | action_value = 'action_value_example' # String | The value for the selected action. @@ -4532,7 +4532,7 @@ begin result = api_instance.list_mapping_action_values(authorization, action_value) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->list_mapping_action_values: #{e}" end ``` @@ -4550,7 +4550,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => > -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->list_mapping_action_values_with_http_info: #{e}" end ``` @@ -4586,16 +4586,16 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | begin result = api_instance.list_mapping_actions(authorization) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->list_mapping_actions: #{e}" end ``` @@ -4613,7 +4613,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => > -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->list_mapping_actions_with_http_info: #{e}" end ``` @@ -4648,9 +4648,9 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | condition_value = 'condition_value_example' # String | The value for the selected condition. @@ -4658,7 +4658,7 @@ begin result = api_instance.list_mapping_condition_operators(authorization, condition_value) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->list_mapping_condition_operators: #{e}" end ``` @@ -4676,7 +4676,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => > -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->list_mapping_condition_operators_with_http_info: #{e}" end ``` @@ -4712,9 +4712,9 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | condition_value = 'condition_value_example' # String | The value for the selected condition. @@ -4722,7 +4722,7 @@ begin result = api_instance.list_mapping_condition_values(authorization, condition_value) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->list_mapping_condition_values: #{e}" end ``` @@ -4740,7 +4740,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => > -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->list_mapping_condition_values_with_http_info: #{e}" end ``` @@ -4776,16 +4776,16 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | begin result = api_instance.list_mapping_conditions(authorization) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->list_mapping_conditions: #{e}" end ``` @@ -4803,7 +4803,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => > -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->list_mapping_conditions_with_http_info: #{e}" end ``` @@ -4838,9 +4838,9 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | opts = { enabled: true, # Boolean | Defaults to true. When set to `false` will return all disabled mappings. @@ -4854,7 +4854,7 @@ begin result = api_instance.list_mappings(authorization, opts) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->list_mappings: #{e}" end ``` @@ -4872,7 +4872,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => > -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->list_mappings_with_http_info: #{e}" end ``` @@ -4912,15 +4912,15 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | begin api_instance.list_risk_rules(authorization) -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->list_risk_rules: #{e}" end ``` @@ -4938,7 +4938,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => nil -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->list_risk_rules_with_http_info: #{e}" end ``` @@ -4973,9 +4973,9 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | opts = { limit: 56, # Integer | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. @@ -4990,7 +4990,7 @@ begin result = api_instance.list_roles(authorization, opts) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->list_roles: #{e}" end ``` @@ -5008,7 +5008,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => > -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->list_roles_with_http_info: #{e}" end ``` @@ -5049,9 +5049,9 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | app_id = 56 # Integer | opts = { @@ -5066,7 +5066,7 @@ begin result = api_instance.list_rules(authorization, app_id, opts) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->list_rules: #{e}" end ``` @@ -5084,7 +5084,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => > -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->list_rules_with_http_info: #{e}" end ``` @@ -5125,9 +5125,9 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | id = 56 # Integer | @@ -5135,7 +5135,7 @@ begin result = api_instance.list_scopes(authorization, id) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->list_scopes: #{e}" end ``` @@ -5153,7 +5153,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => > -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->list_scopes_with_http_info: #{e}" end ``` @@ -5189,9 +5189,9 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | opts = { limit: 56, # Integer | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. @@ -5220,7 +5220,7 @@ begin result = api_instance.list_users(authorization, opts) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->list_users: #{e}" end ``` @@ -5238,7 +5238,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => > -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->list_users_with_http_info: #{e}" end ``` @@ -5293,9 +5293,9 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | id = 56 # Integer | client_app_id = 56 # Integer | @@ -5303,7 +5303,7 @@ client_app_id = 56 # Integer | begin api_instance.remove_client_app(authorization, id, client_app_id) -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->remove_client_app: #{e}" end ``` @@ -5321,7 +5321,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => nil -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->remove_client_app_with_http_info: #{e}" end ``` @@ -5358,17 +5358,17 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | role_id = 56 # Integer | Set to the id of the role you want to return. -remove_role_users_request = OpenapiClient::RemoveRoleUsersRequest.new # RemoveRoleUsersRequest | +remove_role_users_request = OneLogin::RemoveRoleUsersRequest.new # RemoveRoleUsersRequest | begin api_instance.remove_role_admins(authorization, role_id, remove_role_users_request) -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->remove_role_admins: #{e}" end ``` @@ -5386,7 +5386,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => nil -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->remove_role_admins_with_http_info: #{e}" end ``` @@ -5423,17 +5423,17 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | role_id = 56 # Integer | Set to the id of the role you want to return. -remove_role_users_request = OpenapiClient::RemoveRoleUsersRequest.new # RemoveRoleUsersRequest | +remove_role_users_request = OneLogin::RemoveRoleUsersRequest.new # RemoveRoleUsersRequest | begin api_instance.remove_role_users(authorization, role_id, remove_role_users_request) -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->remove_role_users: #{e}" end ``` @@ -5451,7 +5451,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => nil -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->remove_role_users_with_http_info: #{e}" end ``` @@ -5488,19 +5488,19 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | opts = { - revoke_token_request: OpenapiClient::RevokeTokenRequest.new # RevokeTokenRequest | + revoke_token_request: OneLogin::RevokeTokenRequest.new # RevokeTokenRequest | } begin result = api_instance.revoke_token(authorization, opts) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->revoke_token: #{e}" end ``` @@ -5518,7 +5518,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->revoke_token_with_http_info: #{e}" end ``` @@ -5554,9 +5554,9 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | role_id = 56 # Integer | Set to the id of the role you want to return. request_body = [37] # Array | @@ -5565,7 +5565,7 @@ begin result = api_instance.set_role_apps(authorization, role_id, request_body) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->set_role_apps: #{e}" end ``` @@ -5583,7 +5583,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => > -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->set_role_apps_with_http_info: #{e}" end ``` @@ -5620,16 +5620,16 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | -track_event_request = OpenapiClient::TrackEventRequest.new({verb: 'verb_example', ip: 'ip_example', user_agent: 'user_agent_example', user: OpenapiClient::RiskUser.new({id: 'id_example'})}) # TrackEventRequest | +track_event_request = OneLogin::TrackEventRequest.new({verb: 'verb_example', ip: 'ip_example', user_agent: 'user_agent_example', user: OneLogin::RiskUser.new({id: 'id_example'})}) # TrackEventRequest | begin api_instance.track_event(authorization, track_event_request) -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->track_event: #{e}" end ``` @@ -5647,7 +5647,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => nil -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->track_event_with_http_info: #{e}" end ``` @@ -5683,19 +5683,19 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | id = 56 # Integer | claim_id = 56 # Integer | -add_access_token_claim_request = OpenapiClient::AddAccessTokenClaimRequest.new # AddAccessTokenClaimRequest | +add_access_token_claim_request = OneLogin::AddAccessTokenClaimRequest.new # AddAccessTokenClaimRequest | begin result = api_instance.update_access_token_claim(authorization, id, claim_id, add_access_token_claim_request) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->update_access_token_claim: #{e}" end ``` @@ -5713,7 +5713,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->update_access_token_claim_with_http_info: #{e}" end ``` @@ -5751,18 +5751,18 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | app_id = 56 # Integer | -schema = OpenapiClient::Schema.new # Schema | +schema = OneLogin::Schema.new # Schema | begin result = api_instance.update_app(authorization, app_id, schema) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->update_app: #{e}" end ``` @@ -5780,7 +5780,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->update_app_with_http_info: #{e}" end ``` @@ -5817,18 +5817,18 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | id = 56 # Integer | -create_authorization_server_request = OpenapiClient::CreateAuthorizationServerRequest.new # CreateAuthorizationServerRequest | +create_authorization_server_request = OneLogin::CreateAuthorizationServerRequest.new # CreateAuthorizationServerRequest | begin result = api_instance.update_authorization_server(authorization, id, create_authorization_server_request) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->update_authorization_server: #{e}" end ``` @@ -5846,7 +5846,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->update_authorization_server_with_http_info: #{e}" end ``` @@ -5883,19 +5883,19 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | id = 56 # Integer | client_app_id = 56 # Integer | -update_client_app_request = OpenapiClient::UpdateClientAppRequest.new # UpdateClientAppRequest | +update_client_app_request = OneLogin::UpdateClientAppRequest.new # UpdateClientAppRequest | begin result = api_instance.update_client_app(authorization, id, client_app_id, update_client_app_request) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->update_client_app: #{e}" end ``` @@ -5913,7 +5913,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->update_client_app_with_http_info: #{e}" end ``` @@ -5951,18 +5951,18 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | envvar_id = 'envvar_id_example' # String | Set to the id of the Hook Environment Variable that you want to fetch. -update_environment_variable_request = OpenapiClient::UpdateEnvironmentVariableRequest.new({value: 'value_example'}) # UpdateEnvironmentVariableRequest | +update_environment_variable_request = OneLogin::UpdateEnvironmentVariableRequest.new({value: 'value_example'}) # UpdateEnvironmentVariableRequest | begin result = api_instance.update_environment_variable(authorization, envvar_id, update_environment_variable_request) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->update_environment_variable: #{e}" end ``` @@ -5980,7 +5980,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->update_environment_variable_with_http_info: #{e}" end ``` @@ -6017,18 +6017,18 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | hook_id = 'hook_id_example' # String | Set to the id of the Hook that you want to return. -hook = OpenapiClient::Hook.new({type: 'type_example', disabled: false, timeout: 37, env_vars: ['env_vars_example'], runtime: 'runtime_example', retries: 37, packages: 3.56, function: 'function_example'}) # Hook | +hook = OneLogin::Hook.new({type: 'type_example', disabled: false, timeout: 37, env_vars: ['env_vars_example'], runtime: 'runtime_example', retries: 37, packages: 3.56, function: 'function_example'}) # Hook | begin result = api_instance.update_hook(authorization, hook_id, hook) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->update_hook: #{e}" end ``` @@ -6046,7 +6046,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->update_hook_with_http_info: #{e}" end ``` @@ -6083,18 +6083,18 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | mapping_id = 56 # Integer | The id of the user mapping to locate. -mapping = OpenapiClient::Mapping.new({name: 'name_example', enabled: false, match: 'all', position: 37, actions: [OpenapiClient::Action.new]}) # Mapping | +mapping = OneLogin::Mapping.new({name: 'name_example', enabled: false, match: 'all', position: 37, actions: [OneLogin::Action.new]}) # Mapping | begin result = api_instance.update_mapping(authorization, mapping_id, mapping) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->update_mapping: #{e}" end ``` @@ -6112,7 +6112,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => Integer -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->update_mapping_with_http_info: #{e}" end ``` @@ -6149,18 +6149,18 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | risk_rule_id = 'risk_rule_id_example' # String | -risk_rule = OpenapiClient::RiskRule.new # RiskRule | +risk_rule = OneLogin::RiskRule.new # RiskRule | begin result = api_instance.update_risk_rule(authorization, risk_rule_id, risk_rule) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->update_risk_rule: #{e}" end ``` @@ -6178,7 +6178,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->update_risk_rule_with_http_info: #{e}" end ``` @@ -6215,18 +6215,18 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | role_id = 56 # Integer | Set to the id of the role you want to return. -role = OpenapiClient::Role.new({name: 'name_example'}) # Role | +role = OneLogin::Role.new({name: 'name_example'}) # Role | begin result = api_instance.update_role(authorization, role_id, role) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->update_role: #{e}" end ``` @@ -6244,7 +6244,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->update_role_with_http_info: #{e}" end ``` @@ -6281,19 +6281,19 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | app_id = 56 # Integer | rule_id = 56 # Integer | The id of the app rule to locate. -rule = OpenapiClient::Rule.new # Rule | +rule = OneLogin::Rule.new # Rule | begin result = api_instance.update_rule(authorization, app_id, rule_id, rule) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->update_rule: #{e}" end ``` @@ -6311,7 +6311,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->update_rule_with_http_info: #{e}" end ``` @@ -6349,19 +6349,19 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | id = 56 # Integer | scope_id = 56 # Integer | -add_scope_request = OpenapiClient::AddScopeRequest.new # AddScopeRequest | +add_scope_request = OneLogin::AddScopeRequest.new # AddScopeRequest | begin result = api_instance.update_scope(authorization, id, scope_id, add_scope_request) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->update_scope: #{e}" end ``` @@ -6379,7 +6379,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->update_scope_with_http_info: #{e}" end ``` @@ -6417,12 +6417,12 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | user_id = 56 # Integer | Set to the id of the user that you want to return. -user = OpenapiClient::User.new # User | +user = OneLogin::User.new # User | opts = { mappings: 'async', # String | Controls how mappings will be applied to the user on creation. Defaults to async. validate_policy: true # Boolean | Will passwords validate against the User Policy? Defaults to true. @@ -6432,7 +6432,7 @@ begin result = api_instance.update_user(authorization, user_id, user, opts) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->update_user: #{e}" end ``` @@ -6450,7 +6450,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->update_user_with_http_info: #{e}" end ``` @@ -6489,19 +6489,19 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | user_id = 56 # Integer | Set to the id of the user. registration_id = 56 # Integer | Set to the uuid of the registration. This was included in the response as part of the initial request in Enroll Factor. -verify_enrollment_request = OpenapiClient::VerifyEnrollmentRequest.new # VerifyEnrollmentRequest | +verify_enrollment_request = OneLogin::VerifyEnrollmentRequest.new # VerifyEnrollmentRequest | begin result = api_instance.verify_enrollment(authorization, user_id, registration_id, verify_enrollment_request) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->verify_enrollment: #{e}" end ``` @@ -6519,7 +6519,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => > -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->verify_enrollment_with_http_info: #{e}" end ``` @@ -6557,9 +6557,9 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | user_id = 56 # Integer | Set to the id of the user. registration_id = 56 # Integer | Set to the uuid of the registration. This was included in the response as part of the initial request in Enroll Factor. @@ -6568,7 +6568,7 @@ begin result = api_instance.verify_enrollment_voice_protect(authorization, user_id, registration_id) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->verify_enrollment_voice_protect: #{e}" end ``` @@ -6586,7 +6586,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => > -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->verify_enrollment_voice_protect_with_http_info: #{e}" end ``` @@ -6623,19 +6623,19 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | user_id = 56 # Integer | Set to the id of the user. verification_id = 56 # Integer | The verification_id is returned on activation of the factor or you can get the device_id using the Activate Factor API call. -verify_factor_request = OpenapiClient::VerifyFactorRequest.new # VerifyFactorRequest | +verify_factor_request = OneLogin::VerifyFactorRequest.new # VerifyFactorRequest | begin result = api_instance.verify_factor(authorization, user_id, verification_id, verify_factor_request) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->verify_factor: #{e}" end ``` @@ -6653,7 +6653,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->verify_factor_with_http_info: #{e}" end ``` @@ -6691,17 +6691,17 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | -verify_factor_saml_request = OpenapiClient::VerifyFactorSamlRequest.new({app_id: 'app_id_example', device_id: 'device_id_example', state_token: 'state_token_example'}) # VerifyFactorSamlRequest | +verify_factor_saml_request = OneLogin::VerifyFactorSamlRequest.new({app_id: 'app_id_example', device_id: 'device_id_example', state_token: 'state_token_example'}) # VerifyFactorSamlRequest | begin result = api_instance.verify_factor_saml(authorization, verify_factor_saml_request) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->verify_factor_saml: #{e}" end ``` @@ -6719,7 +6719,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->verify_factor_saml_with_http_info: #{e}" end ``` @@ -6755,9 +6755,9 @@ No authorization required ```ruby require 'time' -require 'openapi_client' +require 'onelogin' -api_instance = OpenapiClient::DefaultApi.new +api_instance = OneLogin::DefaultApi.new authorization = 'authorization_example' # String | user_id = 56 # Integer | Set to the id of the user. verification_id = 56 # Integer | The verification_id is returned on activation of the factor or you can get the device_id using the Activate Factor API call. @@ -6766,7 +6766,7 @@ begin result = api_instance.verify_factor_voice(authorization, user_id, verification_id) p result -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->verify_factor_voice: #{e}" end ``` @@ -6784,7 +6784,7 @@ begin p status_code # => 2xx p headers # => { ... } p data # => > -rescue OpenapiClient::ApiError => e +rescue OneLogin::ApiError => e puts "Error when calling DefaultApi->verify_factor_voice_with_http_info: #{e}" end ``` diff --git a/docs/Device.md b/docs/Device.md index 292c19b..b50a699 100644 --- a/docs/Device.md +++ b/docs/Device.md @@ -1,4 +1,4 @@ -# OpenapiClient::Device +# OneLogin::Device ## Properties @@ -13,9 +13,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::Device.new( +instance = OneLogin::Device.new( device_id: null, user_display_name: null, type_display_name: null, diff --git a/docs/EnrollFactorRequest.md b/docs/EnrollFactorRequest.md index bcf0599..e2ee3af 100644 --- a/docs/EnrollFactorRequest.md +++ b/docs/EnrollFactorRequest.md @@ -1,4 +1,4 @@ -# OpenapiClient::EnrollFactorRequest +# OneLogin::EnrollFactorRequest ## Properties @@ -14,9 +14,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::EnrollFactorRequest.new( +instance = OneLogin::EnrollFactorRequest.new( factor_id: null, display_name: null, expires_in: null, diff --git a/docs/Envvar.md b/docs/Envvar.md index e2409fc..3173a7f 100644 --- a/docs/Envvar.md +++ b/docs/Envvar.md @@ -1,4 +1,4 @@ -# OpenapiClient::Envvar +# OneLogin::Envvar ## Properties @@ -12,9 +12,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::Envvar.new( +instance = OneLogin::Envvar.new( id: null, name: null, created_at: null, diff --git a/docs/ErrorStatus.md b/docs/ErrorStatus.md index 16d6569..3bf38df 100644 --- a/docs/ErrorStatus.md +++ b/docs/ErrorStatus.md @@ -1,4 +1,4 @@ -# OpenapiClient::ErrorStatus +# OneLogin::ErrorStatus ## Properties @@ -11,9 +11,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::ErrorStatus.new( +instance = OneLogin::ErrorStatus.new( code: null, message: null, errors: null diff --git a/docs/ErrorStatusErrorsInner.md b/docs/ErrorStatusErrorsInner.md index f3cd088..20c07d0 100644 --- a/docs/ErrorStatusErrorsInner.md +++ b/docs/ErrorStatusErrorsInner.md @@ -1,4 +1,4 @@ -# OpenapiClient::ErrorStatusErrorsInner +# OneLogin::ErrorStatusErrorsInner ## Properties @@ -10,9 +10,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::ErrorStatusErrorsInner.new( +instance = OneLogin::ErrorStatusErrorsInner.new( field: null, message: null ) diff --git a/docs/FactorInner.md b/docs/FactorInner.md index f711349..39a6ec1 100644 --- a/docs/FactorInner.md +++ b/docs/FactorInner.md @@ -1,4 +1,4 @@ -# OpenapiClient::FactorInner +# OneLogin::FactorInner ## Properties @@ -16,9 +16,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::FactorInner.new( +instance = OneLogin::FactorInner.new( id: null, status: null, default: null, diff --git a/docs/FactorInnerFactorData.md b/docs/FactorInnerFactorData.md index bc78696..f652c15 100644 --- a/docs/FactorInnerFactorData.md +++ b/docs/FactorInnerFactorData.md @@ -1,4 +1,4 @@ -# OpenapiClient::FactorInnerFactorData +# OneLogin::FactorInnerFactorData ## Properties @@ -10,9 +10,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::FactorInnerFactorData.new( +instance = OneLogin::FactorInnerFactorData.new( verification_token: null, totp_url: null ) diff --git a/docs/GenerateMfaToken200Response.md b/docs/GenerateMfaToken200Response.md index 0f6c778..e021db8 100644 --- a/docs/GenerateMfaToken200Response.md +++ b/docs/GenerateMfaToken200Response.md @@ -1,4 +1,4 @@ -# OpenapiClient::GenerateMfaToken200Response +# OneLogin::GenerateMfaToken200Response ## Properties @@ -12,9 +12,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::GenerateMfaToken200Response.new( +instance = OneLogin::GenerateMfaToken200Response.new( mfa_token: null, reusable: null, expires_at: null, diff --git a/docs/GenerateMfaToken422Response.md b/docs/GenerateMfaToken422Response.md index 8f14629..8fdc3c6 100644 --- a/docs/GenerateMfaToken422Response.md +++ b/docs/GenerateMfaToken422Response.md @@ -1,4 +1,4 @@ -# OpenapiClient::GenerateMfaToken422Response +# OneLogin::GenerateMfaToken422Response ## Properties @@ -12,9 +12,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::GenerateMfaToken422Response.new( +instance = OneLogin::GenerateMfaToken422Response.new( status_code: null, name: null, message: null, diff --git a/docs/GenerateMfaToken422ResponseDetails.md b/docs/GenerateMfaToken422ResponseDetails.md index 33213dd..80d59dd 100644 --- a/docs/GenerateMfaToken422ResponseDetails.md +++ b/docs/GenerateMfaToken422ResponseDetails.md @@ -1,4 +1,4 @@ -# OpenapiClient::GenerateMfaToken422ResponseDetails +# OneLogin::GenerateMfaToken422ResponseDetails ## Properties @@ -9,9 +9,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::GenerateMfaToken422ResponseDetails.new( +instance = OneLogin::GenerateMfaToken422ResponseDetails.new( parameters: null ) ``` diff --git a/docs/GenerateMfaTokenRequest.md b/docs/GenerateMfaTokenRequest.md index 767f09b..a8c3ced 100644 --- a/docs/GenerateMfaTokenRequest.md +++ b/docs/GenerateMfaTokenRequest.md @@ -1,4 +1,4 @@ -# OpenapiClient::GenerateMfaTokenRequest +# OneLogin::GenerateMfaTokenRequest ## Properties @@ -10,9 +10,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::GenerateMfaTokenRequest.new( +instance = OneLogin::GenerateMfaTokenRequest.new( expires_in: null, reusable: null ) diff --git a/docs/GenerateSamlAssertionRequest.md b/docs/GenerateSamlAssertionRequest.md index 476e9e4..52618dc 100644 --- a/docs/GenerateSamlAssertionRequest.md +++ b/docs/GenerateSamlAssertionRequest.md @@ -1,4 +1,4 @@ -# OpenapiClient::GenerateSamlAssertionRequest +# OneLogin::GenerateSamlAssertionRequest ## Properties @@ -13,9 +13,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::GenerateSamlAssertionRequest.new( +instance = OneLogin::GenerateSamlAssertionRequest.new( username_or_email: null, password: null, app_id: null, diff --git a/docs/GenerateToken200Response.md b/docs/GenerateToken200Response.md index 3147010..9f437a9 100644 --- a/docs/GenerateToken200Response.md +++ b/docs/GenerateToken200Response.md @@ -1,4 +1,4 @@ -# OpenapiClient::GenerateToken200Response +# OneLogin::GenerateToken200Response ## Properties @@ -14,9 +14,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::GenerateToken200Response.new( +instance = OneLogin::GenerateToken200Response.new( access_token: null, created_at: null, expires_in: null, diff --git a/docs/GenerateToken400Response.md b/docs/GenerateToken400Response.md index af85296..a0452f3 100644 --- a/docs/GenerateToken400Response.md +++ b/docs/GenerateToken400Response.md @@ -1,4 +1,4 @@ -# OpenapiClient::GenerateToken400Response +# OneLogin::GenerateToken400Response ## Properties @@ -9,9 +9,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::GenerateToken400Response.new( +instance = OneLogin::GenerateToken400Response.new( status: null ) ``` diff --git a/docs/GenerateTokenRequest.md b/docs/GenerateTokenRequest.md index f078e12..37a9cf6 100644 --- a/docs/GenerateTokenRequest.md +++ b/docs/GenerateTokenRequest.md @@ -1,4 +1,4 @@ -# OpenapiClient::GenerateTokenRequest +# OneLogin::GenerateTokenRequest ## Properties @@ -9,9 +9,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::GenerateTokenRequest.new( +instance = OneLogin::GenerateTokenRequest.new( grant_type: null ) ``` diff --git a/docs/GetAuthorizationServer200Response.md b/docs/GetAuthorizationServer200Response.md index dff1060..8f6f1e5 100644 --- a/docs/GetAuthorizationServer200Response.md +++ b/docs/GetAuthorizationServer200Response.md @@ -1,4 +1,4 @@ -# OpenapiClient::GetAuthorizationServer200Response +# OneLogin::GetAuthorizationServer200Response ## Properties @@ -12,9 +12,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::GetAuthorizationServer200Response.new( +instance = OneLogin::GetAuthorizationServer200Response.new( configuration: null, id: null, description: null, diff --git a/docs/GetAvailableFactors200ResponseInner.md b/docs/GetAvailableFactors200ResponseInner.md index 971f0c7..6348291 100644 --- a/docs/GetAvailableFactors200ResponseInner.md +++ b/docs/GetAvailableFactors200ResponseInner.md @@ -1,4 +1,4 @@ -# OpenapiClient::GetAvailableFactors200ResponseInner +# OneLogin::GetAvailableFactors200ResponseInner ## Properties @@ -11,9 +11,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::GetAvailableFactors200ResponseInner.new( +instance = OneLogin::GetAvailableFactors200ResponseInner.new( factor_id: null, name: null, auth_factor_name: null diff --git a/docs/GetClientApps200ResponseInner.md b/docs/GetClientApps200ResponseInner.md index 4afc4ec..d15de3a 100644 --- a/docs/GetClientApps200ResponseInner.md +++ b/docs/GetClientApps200ResponseInner.md @@ -1,4 +1,4 @@ -# OpenapiClient::GetClientApps200ResponseInner +# OneLogin::GetClientApps200ResponseInner ## Properties @@ -12,9 +12,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::GetClientApps200ResponseInner.new( +instance = OneLogin::GetClientApps200ResponseInner.new( scopes: null, app_id: null, name: null, diff --git a/docs/GetClientApps200ResponseInnerScopesInner.md b/docs/GetClientApps200ResponseInnerScopesInner.md index 24e0af8..baf6aac 100644 --- a/docs/GetClientApps200ResponseInnerScopesInner.md +++ b/docs/GetClientApps200ResponseInnerScopesInner.md @@ -1,4 +1,4 @@ -# OpenapiClient::GetClientApps200ResponseInnerScopesInner +# OneLogin::GetClientApps200ResponseInnerScopesInner ## Properties @@ -11,9 +11,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::GetClientApps200ResponseInnerScopesInner.new( +instance = OneLogin::GetClientApps200ResponseInnerScopesInner.new( description: null, value: null, id: null diff --git a/docs/GetRateLimit200Response.md b/docs/GetRateLimit200Response.md index 0a620d3..0673792 100644 --- a/docs/GetRateLimit200Response.md +++ b/docs/GetRateLimit200Response.md @@ -1,4 +1,4 @@ -# OpenapiClient::GetRateLimit200Response +# OneLogin::GetRateLimit200Response ## Properties @@ -10,9 +10,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::GetRateLimit200Response.new( +instance = OneLogin::GetRateLimit200Response.new( status: null, data: null ) diff --git a/docs/GetRateLimit200ResponseData.md b/docs/GetRateLimit200ResponseData.md index 01a69f2..ed55532 100644 --- a/docs/GetRateLimit200ResponseData.md +++ b/docs/GetRateLimit200ResponseData.md @@ -1,4 +1,4 @@ -# OpenapiClient::GetRateLimit200ResponseData +# OneLogin::GetRateLimit200ResponseData ## Properties @@ -11,9 +11,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::GetRateLimit200ResponseData.new( +instance = OneLogin::GetRateLimit200ResponseData.new( x_rate_limit_limit: null, x_rate_limit_remaining: null, x_rate_limit_reset: null diff --git a/docs/GetRiskScore200Response.md b/docs/GetRiskScore200Response.md index cd4ca03..d715e69 100644 --- a/docs/GetRiskScore200Response.md +++ b/docs/GetRiskScore200Response.md @@ -1,4 +1,4 @@ -# OpenapiClient::GetRiskScore200Response +# OneLogin::GetRiskScore200Response ## Properties @@ -10,9 +10,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::GetRiskScore200Response.new( +instance = OneLogin::GetRiskScore200Response.new( score: null, triggers: null ) diff --git a/docs/GetRiskScore400Response.md b/docs/GetRiskScore400Response.md index 6d0be51..aaee446 100644 --- a/docs/GetRiskScore400Response.md +++ b/docs/GetRiskScore400Response.md @@ -1,4 +1,4 @@ -# OpenapiClient::GetRiskScore400Response +# OneLogin::GetRiskScore400Response ## Properties @@ -9,9 +9,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::GetRiskScore400Response.new( +instance = OneLogin::GetRiskScore400Response.new( messages: null ) ``` diff --git a/docs/GetRiskScoreRequest.md b/docs/GetRiskScoreRequest.md index 81eaa27..6a9d24b 100644 --- a/docs/GetRiskScoreRequest.md +++ b/docs/GetRiskScoreRequest.md @@ -1,4 +1,4 @@ -# OpenapiClient::GetRiskScoreRequest +# OneLogin::GetRiskScoreRequest ## Properties @@ -15,9 +15,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::GetRiskScoreRequest.new( +instance = OneLogin::GetRiskScoreRequest.new( ip: null, user_agent: null, user: null, diff --git a/docs/GetScoreInsights200Response.md b/docs/GetScoreInsights200Response.md index 80f8406..d1561fd 100644 --- a/docs/GetScoreInsights200Response.md +++ b/docs/GetScoreInsights200Response.md @@ -1,4 +1,4 @@ -# OpenapiClient::GetScoreInsights200Response +# OneLogin::GetScoreInsights200Response ## Properties @@ -10,9 +10,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::GetScoreInsights200Response.new( +instance = OneLogin::GetScoreInsights200Response.new( scores: null, total: null ) diff --git a/docs/GetScoreInsights200ResponseScores.md b/docs/GetScoreInsights200ResponseScores.md index 28b26f6..e363c38 100644 --- a/docs/GetScoreInsights200ResponseScores.md +++ b/docs/GetScoreInsights200ResponseScores.md @@ -1,4 +1,4 @@ -# OpenapiClient::GetScoreInsights200ResponseScores +# OneLogin::GetScoreInsights200ResponseScores ## Properties @@ -13,9 +13,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::GetScoreInsights200ResponseScores.new( +instance = OneLogin::GetScoreInsights200ResponseScores.new( minimal: null, low: null, medium: null, diff --git a/docs/GetUserApps200ResponseInner.md b/docs/GetUserApps200ResponseInner.md index 1842195..3eba0b7 100644 --- a/docs/GetUserApps200ResponseInner.md +++ b/docs/GetUserApps200ResponseInner.md @@ -1,4 +1,4 @@ -# OpenapiClient::GetUserApps200ResponseInner +# OneLogin::GetUserApps200ResponseInner ## Properties @@ -16,9 +16,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::GetUserApps200ResponseInner.new( +instance = OneLogin::GetUserApps200ResponseInner.new( id: null, icon_url: null, extension: null, diff --git a/docs/Hook.md b/docs/Hook.md index 0d01291..8ac6d1c 100644 --- a/docs/Hook.md +++ b/docs/Hook.md @@ -1,4 +1,4 @@ -# OpenapiClient::Hook +# OneLogin::Hook ## Properties @@ -23,9 +23,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::Hook.new( +instance = OneLogin::Hook.new( id: null, type: null, disabled: null, diff --git a/docs/HookConditionsInner.md b/docs/HookConditionsInner.md index be6bb39..137132e 100644 --- a/docs/HookConditionsInner.md +++ b/docs/HookConditionsInner.md @@ -1,4 +1,4 @@ -# OpenapiClient::HookConditionsInner +# OneLogin::HookConditionsInner ## Properties @@ -11,9 +11,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::HookConditionsInner.new( +instance = OneLogin::HookConditionsInner.new( source: null, operator: null, value: null diff --git a/docs/HookOptions.md b/docs/HookOptions.md index 55da5fc..a90d52e 100644 --- a/docs/HookOptions.md +++ b/docs/HookOptions.md @@ -1,4 +1,4 @@ -# OpenapiClient::HookOptions +# OneLogin::HookOptions ## Properties @@ -11,9 +11,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::HookOptions.new( +instance = OneLogin::HookOptions.new( risk_enabled: null, location_enabled: null, mfa_device_info_enabled: null diff --git a/docs/HookStatus.md b/docs/HookStatus.md index 4f76315..17394c4 100644 --- a/docs/HookStatus.md +++ b/docs/HookStatus.md @@ -1,4 +1,4 @@ -# OpenapiClient::HookStatus +# OneLogin::HookStatus ## Properties @@ -10,9 +10,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::HookStatus.new( +instance = OneLogin::HookStatus.new( name: null, message: null ) diff --git a/docs/Id.md b/docs/Id.md index 4a59a9b..f28a3d8 100644 --- a/docs/Id.md +++ b/docs/Id.md @@ -1,4 +1,4 @@ -# OpenapiClient::Id +# OneLogin::Id ## Properties @@ -9,9 +9,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::Id.new( +instance = OneLogin::Id.new( id: null ) ``` diff --git a/docs/ListAccessTokenClaims200ResponseInner.md b/docs/ListAccessTokenClaims200ResponseInner.md index d700e23..2246b49 100644 --- a/docs/ListAccessTokenClaims200ResponseInner.md +++ b/docs/ListAccessTokenClaims200ResponseInner.md @@ -1,4 +1,4 @@ -# OpenapiClient::ListAccessTokenClaims200ResponseInner +# OneLogin::ListAccessTokenClaims200ResponseInner ## Properties @@ -17,9 +17,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::ListAccessTokenClaims200ResponseInner.new( +instance = OneLogin::ListAccessTokenClaims200ResponseInner.new( id: null, label: null, user_attribute_mappings: null, diff --git a/docs/ListActions200ResponseInner.md b/docs/ListActions200ResponseInner.md index 6d1c31a..1657205 100644 --- a/docs/ListActions200ResponseInner.md +++ b/docs/ListActions200ResponseInner.md @@ -1,4 +1,4 @@ -# OpenapiClient::ListActions200ResponseInner +# OneLogin::ListActions200ResponseInner ## Properties @@ -10,9 +10,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::ListActions200ResponseInner.new( +instance = OneLogin::ListActions200ResponseInner.new( name: null, value: null ) diff --git a/docs/ListAppUsers200ResponseInner.md b/docs/ListAppUsers200ResponseInner.md index 20563e6..df0fc68 100644 --- a/docs/ListAppUsers200ResponseInner.md +++ b/docs/ListAppUsers200ResponseInner.md @@ -1,4 +1,4 @@ -# OpenapiClient::ListAppUsers200ResponseInner +# OneLogin::ListAppUsers200ResponseInner ## Properties @@ -13,9 +13,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::ListAppUsers200ResponseInner.new( +instance = OneLogin::ListAppUsers200ResponseInner.new( firstname: null, id: null, email: null, diff --git a/docs/ListAuthorizationServers200ResponseInner.md b/docs/ListAuthorizationServers200ResponseInner.md index 5958f5b..a9e89a5 100644 --- a/docs/ListAuthorizationServers200ResponseInner.md +++ b/docs/ListAuthorizationServers200ResponseInner.md @@ -1,4 +1,4 @@ -# OpenapiClient::ListAuthorizationServers200ResponseInner +# OneLogin::ListAuthorizationServers200ResponseInner ## Properties @@ -12,9 +12,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::ListAuthorizationServers200ResponseInner.new( +instance = OneLogin::ListAuthorizationServers200ResponseInner.new( id: null, name: null, configuration: null, diff --git a/docs/ListAuthorizationServers200ResponseInnerConfiguration.md b/docs/ListAuthorizationServers200ResponseInnerConfiguration.md index 0d3a584..30632fc 100644 --- a/docs/ListAuthorizationServers200ResponseInnerConfiguration.md +++ b/docs/ListAuthorizationServers200ResponseInnerConfiguration.md @@ -1,4 +1,4 @@ -# OpenapiClient::ListAuthorizationServers200ResponseInnerConfiguration +# OneLogin::ListAuthorizationServers200ResponseInnerConfiguration ## Properties @@ -10,9 +10,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::ListAuthorizationServers200ResponseInnerConfiguration.new( +instance = OneLogin::ListAuthorizationServers200ResponseInnerConfiguration.new( resource_identifier: null, audiences: null ) diff --git a/docs/ListConditionOperators200ResponseInner.md b/docs/ListConditionOperators200ResponseInner.md index b4d0932..63c6974 100644 --- a/docs/ListConditionOperators200ResponseInner.md +++ b/docs/ListConditionOperators200ResponseInner.md @@ -1,4 +1,4 @@ -# OpenapiClient::ListConditionOperators200ResponseInner +# OneLogin::ListConditionOperators200ResponseInner ## Properties @@ -10,9 +10,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::ListConditionOperators200ResponseInner.new( +instance = OneLogin::ListConditionOperators200ResponseInner.new( name: null, value: null ) diff --git a/docs/ListConditionValues200ResponseInner.md b/docs/ListConditionValues200ResponseInner.md index 8ebfc12..87ce2a1 100644 --- a/docs/ListConditionValues200ResponseInner.md +++ b/docs/ListConditionValues200ResponseInner.md @@ -1,4 +1,4 @@ -# OpenapiClient::ListConditionValues200ResponseInner +# OneLogin::ListConditionValues200ResponseInner ## Properties @@ -10,9 +10,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::ListConditionValues200ResponseInner.new( +instance = OneLogin::ListConditionValues200ResponseInner.new( name: null, value: null ) diff --git a/docs/ListConditions200ResponseInner.md b/docs/ListConditions200ResponseInner.md index 8fb02b2..e8a908d 100644 --- a/docs/ListConditions200ResponseInner.md +++ b/docs/ListConditions200ResponseInner.md @@ -1,4 +1,4 @@ -# OpenapiClient::ListConditions200ResponseInner +# OneLogin::ListConditions200ResponseInner ## Properties @@ -10,9 +10,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::ListConditions200ResponseInner.new( +instance = OneLogin::ListConditions200ResponseInner.new( name: null, value: null ) diff --git a/docs/ListMappingConditionOperators200ResponseInner.md b/docs/ListMappingConditionOperators200ResponseInner.md index 24da1cc..10169bc 100644 --- a/docs/ListMappingConditionOperators200ResponseInner.md +++ b/docs/ListMappingConditionOperators200ResponseInner.md @@ -1,4 +1,4 @@ -# OpenapiClient::ListMappingConditionOperators200ResponseInner +# OneLogin::ListMappingConditionOperators200ResponseInner ## Properties @@ -10,9 +10,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::ListMappingConditionOperators200ResponseInner.new( +instance = OneLogin::ListMappingConditionOperators200ResponseInner.new( name: null, value: null ) diff --git a/docs/ListMappingConditions200ResponseInner.md b/docs/ListMappingConditions200ResponseInner.md index e9f5812..38b07ab 100644 --- a/docs/ListMappingConditions200ResponseInner.md +++ b/docs/ListMappingConditions200ResponseInner.md @@ -1,4 +1,4 @@ -# OpenapiClient::ListMappingConditions200ResponseInner +# OneLogin::ListMappingConditions200ResponseInner ## Properties @@ -10,9 +10,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::ListMappingConditions200ResponseInner.new( +instance = OneLogin::ListMappingConditions200ResponseInner.new( name: null, value: null ) diff --git a/docs/ListScopes200ResponseInner.md b/docs/ListScopes200ResponseInner.md index 98760f6..524e227 100644 --- a/docs/ListScopes200ResponseInner.md +++ b/docs/ListScopes200ResponseInner.md @@ -1,4 +1,4 @@ -# OpenapiClient::ListScopes200ResponseInner +# OneLogin::ListScopes200ResponseInner ## Properties @@ -11,9 +11,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::ListScopes200ResponseInner.new( +instance = OneLogin::ListScopes200ResponseInner.new( id: null, value: null, description: null diff --git a/docs/Log.md b/docs/Log.md index 424426e..6741cb1 100644 --- a/docs/Log.md +++ b/docs/Log.md @@ -1,4 +1,4 @@ -# OpenapiClient::Log +# OneLogin::Log ## Properties @@ -12,9 +12,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::Log.new( +instance = OneLogin::Log.new( request_id: null, correlation_id: null, created_at: null, diff --git a/docs/Mapping.md b/docs/Mapping.md index d96913a..22b4d6d 100644 --- a/docs/Mapping.md +++ b/docs/Mapping.md @@ -1,4 +1,4 @@ -# OpenapiClient::Mapping +# OneLogin::Mapping ## Properties @@ -15,9 +15,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::Mapping.new( +instance = OneLogin::Mapping.new( id: null, name: null, enabled: null, diff --git a/docs/Registration.md b/docs/Registration.md index 781a080..48e2cb0 100644 --- a/docs/Registration.md +++ b/docs/Registration.md @@ -1,4 +1,4 @@ -# OpenapiClient::Registration +# OneLogin::Registration ## Properties @@ -11,9 +11,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::Registration.new( +instance = OneLogin::Registration.new( id: null, status: null, device_id: null diff --git a/docs/RemoveRoleUsersRequest.md b/docs/RemoveRoleUsersRequest.md index 628bea0..b29f066 100644 --- a/docs/RemoveRoleUsersRequest.md +++ b/docs/RemoveRoleUsersRequest.md @@ -1,4 +1,4 @@ -# OpenapiClient::RemoveRoleUsersRequest +# OneLogin::RemoveRoleUsersRequest ## Properties @@ -9,9 +9,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::RemoveRoleUsersRequest.new( +instance = OneLogin::RemoveRoleUsersRequest.new( user_id: null ) ``` diff --git a/docs/RevokeTokenRequest.md b/docs/RevokeTokenRequest.md index 49d81a6..9617ca2 100644 --- a/docs/RevokeTokenRequest.md +++ b/docs/RevokeTokenRequest.md @@ -1,4 +1,4 @@ -# OpenapiClient::RevokeTokenRequest +# OneLogin::RevokeTokenRequest ## Properties @@ -9,9 +9,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::RevokeTokenRequest.new( +instance = OneLogin::RevokeTokenRequest.new( access_token: null ) ``` diff --git a/docs/RiskDevice.md b/docs/RiskDevice.md index 9877424..f7d2532 100644 --- a/docs/RiskDevice.md +++ b/docs/RiskDevice.md @@ -1,4 +1,4 @@ -# OpenapiClient::RiskDevice +# OneLogin::RiskDevice ## Properties @@ -9,9 +9,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::RiskDevice.new( +instance = OneLogin::RiskDevice.new( id: null ) ``` diff --git a/docs/RiskRule.md b/docs/RiskRule.md index 0360bae..bc1f706 100644 --- a/docs/RiskRule.md +++ b/docs/RiskRule.md @@ -1,4 +1,4 @@ -# OpenapiClient::RiskRule +# OneLogin::RiskRule ## Properties @@ -15,9 +15,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::RiskRule.new( +instance = OneLogin::RiskRule.new( id: null, name: null, description: null, diff --git a/docs/RiskUser.md b/docs/RiskUser.md index dbcaabf..ea9d00b 100644 --- a/docs/RiskUser.md +++ b/docs/RiskUser.md @@ -1,4 +1,4 @@ -# OpenapiClient::RiskUser +# OneLogin::RiskUser ## Properties @@ -11,9 +11,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::RiskUser.new( +instance = OneLogin::RiskUser.new( id: null, name: null, authenticated: null diff --git a/docs/Role.md b/docs/Role.md index efa33af..3998ea2 100644 --- a/docs/Role.md +++ b/docs/Role.md @@ -1,4 +1,4 @@ -# OpenapiClient::Role +# OneLogin::Role ## Properties @@ -13,9 +13,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::Role.new( +instance = OneLogin::Role.new( id: null, name: null, apps: null, diff --git a/docs/Rule.md b/docs/Rule.md index d25d92d..7dbce28 100644 --- a/docs/Rule.md +++ b/docs/Rule.md @@ -1,4 +1,4 @@ -# OpenapiClient::Rule +# OneLogin::Rule ## Properties @@ -15,9 +15,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::Rule.new( +instance = OneLogin::Rule.new( id: null, name: null, match: null, diff --git a/docs/RuleId.md b/docs/RuleId.md index 37bfcd5..3acce01 100644 --- a/docs/RuleId.md +++ b/docs/RuleId.md @@ -1,4 +1,4 @@ -# OpenapiClient::RuleId +# OneLogin::RuleId ## Properties @@ -9,9 +9,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::RuleId.new( +instance = OneLogin::RuleId.new( id: null ) ``` diff --git a/docs/Schema.md b/docs/Schema.md index 72eba97..283f1f4 100644 --- a/docs/Schema.md +++ b/docs/Schema.md @@ -1,4 +1,4 @@ -# OpenapiClient::Schema +# OneLogin::Schema ## Properties @@ -28,9 +28,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::Schema.new( +instance = OneLogin::Schema.new( id: null, connector_id: null, name: null, diff --git a/docs/Schema1.md b/docs/Schema1.md index 51654de..d538693 100644 --- a/docs/Schema1.md +++ b/docs/Schema1.md @@ -1,4 +1,4 @@ -# OpenapiClient::Schema1 +# OneLogin::Schema1 ## Properties @@ -14,9 +14,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::Schema1.new( +instance = OneLogin::Schema1.new( id: null, name: null, username: null, diff --git a/docs/Schema1AddedBy.md b/docs/Schema1AddedBy.md index cb01407..e229ecb 100644 --- a/docs/Schema1AddedBy.md +++ b/docs/Schema1AddedBy.md @@ -1,4 +1,4 @@ -# OpenapiClient::Schema1AddedBy +# OneLogin::Schema1AddedBy ## Properties @@ -10,9 +10,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::Schema1AddedBy.new( +instance = OneLogin::Schema1AddedBy.new( id: null, name: null ) diff --git a/docs/SchemaProvisioning.md b/docs/SchemaProvisioning.md index cd7e853..66a5b2f 100644 --- a/docs/SchemaProvisioning.md +++ b/docs/SchemaProvisioning.md @@ -1,4 +1,4 @@ -# OpenapiClient::SchemaProvisioning +# OneLogin::SchemaProvisioning ## Properties @@ -9,9 +9,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::SchemaProvisioning.new( +instance = OneLogin::SchemaProvisioning.new( enabled: null ) ``` diff --git a/docs/Session.md b/docs/Session.md index ed5fc5b..6757f5f 100644 --- a/docs/Session.md +++ b/docs/Session.md @@ -1,4 +1,4 @@ -# OpenapiClient::Session +# OneLogin::Session ## Properties @@ -9,9 +9,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::Session.new( +instance = OneLogin::Session.new( id: null ) ``` diff --git a/docs/SetRoleApps200ResponseInner.md b/docs/SetRoleApps200ResponseInner.md index 3319c02..a3b41b2 100644 --- a/docs/SetRoleApps200ResponseInner.md +++ b/docs/SetRoleApps200ResponseInner.md @@ -1,4 +1,4 @@ -# OpenapiClient::SetRoleApps200ResponseInner +# OneLogin::SetRoleApps200ResponseInner ## Properties @@ -9,9 +9,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::SetRoleApps200ResponseInner.new( +instance = OneLogin::SetRoleApps200ResponseInner.new( id: null ) ``` diff --git a/docs/Source.md b/docs/Source.md index 4a1065e..ca92cbd 100644 --- a/docs/Source.md +++ b/docs/Source.md @@ -1,4 +1,4 @@ -# OpenapiClient::Source +# OneLogin::Source ## Properties @@ -10,9 +10,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::Source.new( +instance = OneLogin::Source.new( id: null, name: null ) diff --git a/docs/Status.md b/docs/Status.md index 05d1f6d..3e4fb1d 100644 --- a/docs/Status.md +++ b/docs/Status.md @@ -1,4 +1,4 @@ -# OpenapiClient::Status +# OneLogin::Status ## Properties @@ -12,9 +12,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::Status.new( +instance = OneLogin::Status.new( error: null, code: null, type: null, diff --git a/docs/Status1.md b/docs/Status1.md index 447ca91..691aa98 100644 --- a/docs/Status1.md +++ b/docs/Status1.md @@ -1,4 +1,4 @@ -# OpenapiClient::Status1 +# OneLogin::Status1 ## Properties @@ -11,9 +11,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::Status1.new( +instance = OneLogin::Status1.new( message: null, status_code: null, name: null diff --git a/docs/Status2.md b/docs/Status2.md index 0053541..1e7dc50 100644 --- a/docs/Status2.md +++ b/docs/Status2.md @@ -1,4 +1,4 @@ -# OpenapiClient::Status2 +# OneLogin::Status2 ## Properties @@ -9,9 +9,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::Status2.new( +instance = OneLogin::Status2.new( status: null ) ``` diff --git a/docs/Status2Status.md b/docs/Status2Status.md index b312be5..bdcfc71 100644 --- a/docs/Status2Status.md +++ b/docs/Status2Status.md @@ -1,4 +1,4 @@ -# OpenapiClient::Status2Status +# OneLogin::Status2Status ## Properties @@ -12,9 +12,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::Status2Status.new( +instance = OneLogin::Status2Status.new( type: null, code: null, message: null, diff --git a/docs/TrackEventRequest.md b/docs/TrackEventRequest.md index e828492..9dffaa0 100644 --- a/docs/TrackEventRequest.md +++ b/docs/TrackEventRequest.md @@ -1,4 +1,4 @@ -# OpenapiClient::TrackEventRequest +# OneLogin::TrackEventRequest ## Properties @@ -17,9 +17,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::TrackEventRequest.new( +instance = OneLogin::TrackEventRequest.new( verb: null, ip: null, user_agent: null, diff --git a/docs/UpdateAuthorizationServer400Response.md b/docs/UpdateAuthorizationServer400Response.md index e5c171f..0b3a500 100644 --- a/docs/UpdateAuthorizationServer400Response.md +++ b/docs/UpdateAuthorizationServer400Response.md @@ -1,4 +1,4 @@ -# OpenapiClient::UpdateAuthorizationServer400Response +# OneLogin::UpdateAuthorizationServer400Response ## Properties @@ -12,9 +12,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::UpdateAuthorizationServer400Response.new( +instance = OneLogin::UpdateAuthorizationServer400Response.new( field: null, message: null, status_code: null, diff --git a/docs/UpdateClientAppRequest.md b/docs/UpdateClientAppRequest.md index 53f19a4..b02a048 100644 --- a/docs/UpdateClientAppRequest.md +++ b/docs/UpdateClientAppRequest.md @@ -1,4 +1,4 @@ -# OpenapiClient::UpdateClientAppRequest +# OneLogin::UpdateClientAppRequest ## Properties @@ -9,9 +9,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::UpdateClientAppRequest.new( +instance = OneLogin::UpdateClientAppRequest.new( scopes: null ) ``` diff --git a/docs/UpdateEnvironmentVariableRequest.md b/docs/UpdateEnvironmentVariableRequest.md index 9268b30..fa77274 100644 --- a/docs/UpdateEnvironmentVariableRequest.md +++ b/docs/UpdateEnvironmentVariableRequest.md @@ -1,4 +1,4 @@ -# OpenapiClient::UpdateEnvironmentVariableRequest +# OneLogin::UpdateEnvironmentVariableRequest ## Properties @@ -9,9 +9,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::UpdateEnvironmentVariableRequest.new( +instance = OneLogin::UpdateEnvironmentVariableRequest.new( value: null ) ``` diff --git a/docs/UpdateRole200Response.md b/docs/UpdateRole200Response.md index 569bf8b..ba1e1ab 100644 --- a/docs/UpdateRole200Response.md +++ b/docs/UpdateRole200Response.md @@ -1,4 +1,4 @@ -# OpenapiClient::UpdateRole200Response +# OneLogin::UpdateRole200Response ## Properties @@ -9,9 +9,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::UpdateRole200Response.new( +instance = OneLogin::UpdateRole200Response.new( id: null ) ``` diff --git a/docs/User.md b/docs/User.md index cbfd568..5eca056 100644 --- a/docs/User.md +++ b/docs/User.md @@ -1,4 +1,4 @@ -# OpenapiClient::User +# OneLogin::User ## Properties @@ -45,9 +45,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::User.new( +instance = OneLogin::User.new( id: null, username: null, email: null, diff --git a/docs/VerifyEnrollmentRequest.md b/docs/VerifyEnrollmentRequest.md index a93fd1d..f9c901f 100644 --- a/docs/VerifyEnrollmentRequest.md +++ b/docs/VerifyEnrollmentRequest.md @@ -1,4 +1,4 @@ -# OpenapiClient::VerifyEnrollmentRequest +# OneLogin::VerifyEnrollmentRequest ## Properties @@ -9,9 +9,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::VerifyEnrollmentRequest.new( +instance = OneLogin::VerifyEnrollmentRequest.new( otp: null ) ``` diff --git a/docs/VerifyFactorRequest.md b/docs/VerifyFactorRequest.md index dc5dd13..5e228c1 100644 --- a/docs/VerifyFactorRequest.md +++ b/docs/VerifyFactorRequest.md @@ -1,4 +1,4 @@ -# OpenapiClient::VerifyFactorRequest +# OneLogin::VerifyFactorRequest ## Properties @@ -10,9 +10,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::VerifyFactorRequest.new( +instance = OneLogin::VerifyFactorRequest.new( otp: null, device_id: null ) diff --git a/docs/VerifyFactorSaml200Response.md b/docs/VerifyFactorSaml200Response.md index 95a2b7c..c412fac 100644 --- a/docs/VerifyFactorSaml200Response.md +++ b/docs/VerifyFactorSaml200Response.md @@ -1,4 +1,4 @@ -# OpenapiClient::VerifyFactorSaml200Response +# OneLogin::VerifyFactorSaml200Response ## Properties @@ -10,9 +10,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::VerifyFactorSaml200Response.new( +instance = OneLogin::VerifyFactorSaml200Response.new( data: null, message: null ) diff --git a/docs/VerifyFactorSamlRequest.md b/docs/VerifyFactorSamlRequest.md index fb75307..53aaa92 100644 --- a/docs/VerifyFactorSamlRequest.md +++ b/docs/VerifyFactorSamlRequest.md @@ -1,4 +1,4 @@ -# OpenapiClient::VerifyFactorSamlRequest +# OneLogin::VerifyFactorSamlRequest ## Properties @@ -13,9 +13,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::VerifyFactorSamlRequest.new( +instance = OneLogin::VerifyFactorSamlRequest.new( app_id: null, device_id: null, state_token: null, diff --git a/docs/VerifyFactorVoice200ResponseInner.md b/docs/VerifyFactorVoice200ResponseInner.md index f0f0717..8bb0973 100644 --- a/docs/VerifyFactorVoice200ResponseInner.md +++ b/docs/VerifyFactorVoice200ResponseInner.md @@ -1,4 +1,4 @@ -# OpenapiClient::VerifyFactorVoice200ResponseInner +# OneLogin::VerifyFactorVoice200ResponseInner ## Properties @@ -11,9 +11,9 @@ ## Example ```ruby -require 'openapi_client' +require 'onelogin' -instance = OpenapiClient::VerifyFactorVoice200ResponseInner.new( +instance = OneLogin::VerifyFactorVoice200ResponseInner.new( id: null, status: null, device_id: null diff --git a/lib/onelogin.rb b/lib/onelogin.rb new file mode 100644 index 0000000..7487bc5 --- /dev/null +++ b/lib/onelogin.rb @@ -0,0 +1,130 @@ +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +# Common files +require 'onelogin/api_client' +require 'onelogin/api_error' +require 'onelogin/version' +require 'onelogin/configuration' + +# Models +require 'onelogin/models/action' +require 'onelogin/models/activate_factor_request' +require 'onelogin/models/add_access_token_claim_request' +require 'onelogin/models/add_client_app_request' +require 'onelogin/models/add_role_users200_response_inner' +require 'onelogin/models/add_scope_request' +require 'onelogin/models/auth_method' +require 'onelogin/models/auth_server_configuration' +require 'onelogin/models/client_app' +require 'onelogin/models/condition' +require 'onelogin/models/connector' +require 'onelogin/models/create_authorization_server_request' +require 'onelogin/models/create_environment_variable_request' +require 'onelogin/models/create_roles201_response_inner' +require 'onelogin/models/device' +require 'onelogin/models/enroll_factor_request' +require 'onelogin/models/envvar' +require 'onelogin/models/error_status' +require 'onelogin/models/error_status_errors_inner' +require 'onelogin/models/factor_inner' +require 'onelogin/models/factor_inner_factor_data' +require 'onelogin/models/generate_mfa_token200_response' +require 'onelogin/models/generate_mfa_token422_response' +require 'onelogin/models/generate_mfa_token422_response_details' +require 'onelogin/models/generate_mfa_token_request' +require 'onelogin/models/generate_saml_assertion_request' +require 'onelogin/models/generate_token200_response' +require 'onelogin/models/generate_token400_response' +require 'onelogin/models/generate_token_request' +require 'onelogin/models/get_authorization_server200_response' +require 'onelogin/models/get_available_factors200_response_inner' +require 'onelogin/models/get_client_apps200_response_inner' +require 'onelogin/models/get_client_apps200_response_inner_scopes_inner' +require 'onelogin/models/get_rate_limit200_response' +require 'onelogin/models/get_rate_limit200_response_data' +require 'onelogin/models/get_risk_score200_response' +require 'onelogin/models/get_risk_score400_response' +require 'onelogin/models/get_risk_score_request' +require 'onelogin/models/get_score_insights200_response' +require 'onelogin/models/get_score_insights200_response_scores' +require 'onelogin/models/get_user_apps200_response_inner' +require 'onelogin/models/hook' +require 'onelogin/models/hook_conditions_inner' +require 'onelogin/models/hook_options' +require 'onelogin/models/hook_status' +require 'onelogin/models/id' +require 'onelogin/models/list_access_token_claims200_response_inner' +require 'onelogin/models/list_actions200_response_inner' +require 'onelogin/models/list_app_users200_response_inner' +require 'onelogin/models/list_authorization_servers200_response_inner' +require 'onelogin/models/list_authorization_servers200_response_inner_configuration' +require 'onelogin/models/list_condition_operators200_response_inner' +require 'onelogin/models/list_condition_values200_response_inner' +require 'onelogin/models/list_conditions200_response_inner' +require 'onelogin/models/list_mapping_condition_operators200_response_inner' +require 'onelogin/models/list_mapping_conditions200_response_inner' +require 'onelogin/models/list_scopes200_response_inner' +require 'onelogin/models/log' +require 'onelogin/models/mapping' +require 'onelogin/models/registration' +require 'onelogin/models/remove_role_users_request' +require 'onelogin/models/revoke_token_request' +require 'onelogin/models/risk_device' +require 'onelogin/models/risk_rule' +require 'onelogin/models/risk_user' +require 'onelogin/models/role' +require 'onelogin/models/rule' +require 'onelogin/models/rule_id' +require 'onelogin/models/schema' +require 'onelogin/models/schema1' +require 'onelogin/models/schema1_added_by' +require 'onelogin/models/schema_provisioning' +require 'onelogin/models/session' +require 'onelogin/models/set_role_apps200_response_inner' +require 'onelogin/models/source' +require 'onelogin/models/status' +require 'onelogin/models/status1' +require 'onelogin/models/status2' +require 'onelogin/models/status2_status' +require 'onelogin/models/track_event_request' +require 'onelogin/models/update_authorization_server400_response' +require 'onelogin/models/update_client_app_request' +require 'onelogin/models/update_environment_variable_request' +require 'onelogin/models/update_role200_response' +require 'onelogin/models/user' +require 'onelogin/models/verify_enrollment_request' +require 'onelogin/models/verify_factor_request' +require 'onelogin/models/verify_factor_saml200_response' +require 'onelogin/models/verify_factor_saml_request' +require 'onelogin/models/verify_factor_voice200_response_inner' + +# APIs +require 'onelogin/api/default_api' + +module OneLogin + class << self + # Customize default settings for the SDK using block. + # OneLogin.configure do |config| + # config.username = "xxx" + # config.password = "xxx" + # end + # If no block given, return the default Configuration object. + def configure + if block_given? + yield(Configuration.default) + else + Configuration.default + end + end + end +end diff --git a/lib/openapi_client/api/default_api.rb b/lib/onelogin/api/default_api.rb similarity index 99% rename from lib/openapi_client/api/default_api.rb rename to lib/onelogin/api/default_api.rb index 0ea9641..01325cb 100644 --- a/lib/openapi_client/api/default_api.rb +++ b/lib/onelogin/api/default_api.rb @@ -12,7 +12,7 @@ require 'cgi' -module OpenapiClient +module OneLogin class DefaultApi attr_accessor :api_client diff --git a/lib/openapi_client/api_client.rb b/lib/onelogin/api_client.rb similarity index 99% rename from lib/openapi_client/api_client.rb rename to lib/onelogin/api_client.rb index 1126c6b..620e655 100644 --- a/lib/openapi_client/api_client.rb +++ b/lib/onelogin/api_client.rb @@ -17,7 +17,7 @@ require 'time' require 'typhoeus' -module OpenapiClient +module OneLogin class ApiClient # The Configuration object holding settings to be used in the API client. attr_accessor :config @@ -277,7 +277,7 @@ def convert_to_type(data, return_type) end else # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(return_type) + klass = OneLogin.const_get(return_type) klass.respond_to?(:openapi_one_of) ? klass.build(data) : klass.build_from_hash(data) end end diff --git a/lib/openapi_client/api_error.rb b/lib/onelogin/api_error.rb similarity index 98% rename from lib/openapi_client/api_error.rb rename to lib/onelogin/api_error.rb index 9e722ee..84a351f 100644 --- a/lib/openapi_client/api_error.rb +++ b/lib/onelogin/api_error.rb @@ -10,7 +10,7 @@ =end -module OpenapiClient +module OneLogin class ApiError < StandardError attr_reader :code, :response_headers, :response_body diff --git a/lib/openapi_client/configuration.rb b/lib/onelogin/configuration.rb similarity index 99% rename from lib/openapi_client/configuration.rb rename to lib/onelogin/configuration.rb index 8482027..2e9d482 100644 --- a/lib/openapi_client/configuration.rb +++ b/lib/onelogin/configuration.rb @@ -10,7 +10,7 @@ =end -module OpenapiClient +module OneLogin class Configuration # Defines url scheme attr_accessor :scheme diff --git a/lib/openapi_client/models/action.rb b/lib/onelogin/models/action.rb similarity index 96% rename from lib/openapi_client/models/action.rb rename to lib/onelogin/models/action.rb index 26ca8fa..6865dc4 100644 --- a/lib/openapi_client/models/action.rb +++ b/lib/onelogin/models/action.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class Action # The action to apply attr_accessor :action @@ -67,13 +67,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::Action` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::Action` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::Action`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::Action`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -206,7 +206,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/activate_factor_request.rb b/lib/onelogin/models/activate_factor_request.rb similarity index 96% rename from lib/openapi_client/models/activate_factor_request.rb rename to lib/onelogin/models/activate_factor_request.rb index 6a8e56b..76068e4 100644 --- a/lib/openapi_client/models/activate_factor_request.rb +++ b/lib/onelogin/models/activate_factor_request.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class ActivateFactorRequest # Required. Specifies the factor to be verified. attr_accessor :device_id @@ -62,13 +62,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::ActivateFactorRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::ActivateFactorRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::ActivateFactorRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::ActivateFactorRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -194,7 +194,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/add_access_token_claim_request.rb b/lib/onelogin/models/add_access_token_claim_request.rb similarity index 95% rename from lib/openapi_client/models/add_access_token_claim_request.rb rename to lib/onelogin/models/add_access_token_claim_request.rb index f1590b7..7697067 100644 --- a/lib/openapi_client/models/add_access_token_claim_request.rb +++ b/lib/onelogin/models/add_access_token_claim_request.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class AddAccessTokenClaimRequest attr_accessor :name @@ -54,13 +54,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::AddAccessTokenClaimRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::AddAccessTokenClaimRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::AddAccessTokenClaimRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::AddAccessTokenClaimRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -181,7 +181,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/add_client_app_request.rb b/lib/onelogin/models/add_client_app_request.rb similarity index 95% rename from lib/openapi_client/models/add_client_app_request.rb rename to lib/onelogin/models/add_client_app_request.rb index 0b4eff6..c56ac01 100644 --- a/lib/openapi_client/models/add_client_app_request.rb +++ b/lib/onelogin/models/add_client_app_request.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class AddClientAppRequest attr_accessor :app_id @@ -50,13 +50,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::AddClientAppRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::AddClientAppRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::AddClientAppRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::AddClientAppRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -174,7 +174,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/add_role_users200_response_inner.rb b/lib/onelogin/models/add_role_users200_response_inner.rb similarity index 95% rename from lib/openapi_client/models/add_role_users200_response_inner.rb rename to lib/onelogin/models/add_role_users200_response_inner.rb index 289df7a..f43f0f1 100644 --- a/lib/openapi_client/models/add_role_users200_response_inner.rb +++ b/lib/onelogin/models/add_role_users200_response_inner.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class AddRoleUsers200ResponseInner attr_accessor :id @@ -46,13 +46,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::AddRoleUsers200ResponseInner` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::AddRoleUsers200ResponseInner` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::AddRoleUsers200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::AddRoleUsers200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -163,7 +163,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/add_scope_request.rb b/lib/onelogin/models/add_scope_request.rb similarity index 95% rename from lib/openapi_client/models/add_scope_request.rb rename to lib/onelogin/models/add_scope_request.rb index b3fc87a..030ec98 100644 --- a/lib/openapi_client/models/add_scope_request.rb +++ b/lib/onelogin/models/add_scope_request.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class AddScopeRequest attr_accessor :value @@ -50,13 +50,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::AddScopeRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::AddScopeRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::AddScopeRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::AddScopeRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -172,7 +172,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/auth_method.rb b/lib/onelogin/models/auth_method.rb similarity index 98% rename from lib/openapi_client/models/auth_method.rb rename to lib/onelogin/models/auth_method.rb index 2b0837f..52d5c77 100644 --- a/lib/openapi_client/models/auth_method.rb +++ b/lib/onelogin/models/auth_method.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class AuthMethod N0 = 0.freeze N1 = 1.freeze diff --git a/lib/openapi_client/models/auth_server_configuration.rb b/lib/onelogin/models/auth_server_configuration.rb similarity index 96% rename from lib/openapi_client/models/auth_server_configuration.rb rename to lib/onelogin/models/auth_server_configuration.rb index 292b218..3bfc8a5 100644 --- a/lib/openapi_client/models/auth_server_configuration.rb +++ b/lib/onelogin/models/auth_server_configuration.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class AuthServerConfiguration attr_accessor :audiences @@ -58,13 +58,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::AuthServerConfiguration` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::AuthServerConfiguration` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::AuthServerConfiguration`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::AuthServerConfiguration`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -192,7 +192,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/client_app.rb b/lib/onelogin/models/client_app.rb similarity index 96% rename from lib/openapi_client/models/client_app.rb rename to lib/onelogin/models/client_app.rb index da4f572..312d124 100644 --- a/lib/openapi_client/models/client_app.rb +++ b/lib/onelogin/models/client_app.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class ClientApp attr_accessor :app_id @@ -50,13 +50,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::ClientApp` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::ClientApp` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::ClientApp`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::ClientApp`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -172,7 +172,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/condition.rb b/lib/onelogin/models/condition.rb similarity index 96% rename from lib/openapi_client/models/condition.rb rename to lib/onelogin/models/condition.rb index cfc0e1e..31c0ca0 100644 --- a/lib/openapi_client/models/condition.rb +++ b/lib/onelogin/models/condition.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class Condition # The source field to check. attr_accessor :source @@ -57,13 +57,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::Condition` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::Condition` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::Condition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::Condition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -184,7 +184,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/connector.rb b/lib/onelogin/models/connector.rb similarity index 96% rename from lib/openapi_client/models/connector.rb rename to lib/onelogin/models/connector.rb index 23968d5..c51708c 100644 --- a/lib/openapi_client/models/connector.rb +++ b/lib/onelogin/models/connector.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class Connector # The connectors unique ID in OneLogin. attr_accessor :id @@ -66,13 +66,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::Connector` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::Connector` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::Connector`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::Connector`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -203,7 +203,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/create_authorization_server_request.rb b/lib/onelogin/models/create_authorization_server_request.rb similarity index 95% rename from lib/openapi_client/models/create_authorization_server_request.rb rename to lib/onelogin/models/create_authorization_server_request.rb index abb1219..e7c656b 100644 --- a/lib/openapi_client/models/create_authorization_server_request.rb +++ b/lib/onelogin/models/create_authorization_server_request.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class CreateAuthorizationServerRequest attr_accessor :name @@ -54,13 +54,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::CreateAuthorizationServerRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::CreateAuthorizationServerRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::CreateAuthorizationServerRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::CreateAuthorizationServerRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -181,7 +181,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/create_environment_variable_request.rb b/lib/onelogin/models/create_environment_variable_request.rb similarity index 95% rename from lib/openapi_client/models/create_environment_variable_request.rb rename to lib/onelogin/models/create_environment_variable_request.rb index 47d816f..8c2f47a 100644 --- a/lib/openapi_client/models/create_environment_variable_request.rb +++ b/lib/onelogin/models/create_environment_variable_request.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class CreateEnvironmentVariableRequest # The name for the environment variable that will be used to retrieve the value from a hook function. attr_accessor :name @@ -52,13 +52,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::CreateEnvironmentVariableRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::CreateEnvironmentVariableRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::CreateEnvironmentVariableRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::CreateEnvironmentVariableRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -184,7 +184,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/create_roles201_response_inner.rb b/lib/onelogin/models/create_roles201_response_inner.rb similarity index 95% rename from lib/openapi_client/models/create_roles201_response_inner.rb rename to lib/onelogin/models/create_roles201_response_inner.rb index 49ddb73..acf6974 100644 --- a/lib/openapi_client/models/create_roles201_response_inner.rb +++ b/lib/onelogin/models/create_roles201_response_inner.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class CreateRoles201ResponseInner attr_accessor :id @@ -46,13 +46,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::CreateRoles201ResponseInner` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::CreateRoles201ResponseInner` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::CreateRoles201ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::CreateRoles201ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -163,7 +163,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/device.rb b/lib/onelogin/models/device.rb similarity index 96% rename from lib/openapi_client/models/device.rb rename to lib/onelogin/models/device.rb index 160012e..4b4365c 100644 --- a/lib/openapi_client/models/device.rb +++ b/lib/onelogin/models/device.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class Device attr_accessor :device_id @@ -62,13 +62,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::Device` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::Device` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::Device`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::Device`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -199,7 +199,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/enroll_factor_request.rb b/lib/onelogin/models/enroll_factor_request.rb similarity index 96% rename from lib/openapi_client/models/enroll_factor_request.rb rename to lib/onelogin/models/enroll_factor_request.rb index f8b5bdc..a0d47b1 100644 --- a/lib/openapi_client/models/enroll_factor_request.rb +++ b/lib/onelogin/models/enroll_factor_request.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class EnrollFactorRequest # The identifier of the factor to enroll the user with. attr_accessor :factor_id @@ -72,13 +72,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::EnrollFactorRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::EnrollFactorRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::EnrollFactorRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::EnrollFactorRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -224,7 +224,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/envvar.rb b/lib/onelogin/models/envvar.rb similarity index 96% rename from lib/openapi_client/models/envvar.rb rename to lib/onelogin/models/envvar.rb index 7c9e6cc..b847f27 100644 --- a/lib/openapi_client/models/envvar.rb +++ b/lib/onelogin/models/envvar.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class Envvar # A unique identifier for the Hook Environment Variable attr_accessor :id @@ -62,13 +62,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::Envvar` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::Envvar` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::Envvar`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::Envvar`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -194,7 +194,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/error_status.rb b/lib/onelogin/models/error_status.rb similarity index 96% rename from lib/openapi_client/models/error_status.rb rename to lib/onelogin/models/error_status.rb index 7d2c163..493e2f3 100644 --- a/lib/openapi_client/models/error_status.rb +++ b/lib/onelogin/models/error_status.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class ErrorStatus attr_accessor :code @@ -54,13 +54,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::ErrorStatus` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::ErrorStatus` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::ErrorStatus`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::ErrorStatus`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -183,7 +183,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/error_status_errors_inner.rb b/lib/onelogin/models/error_status_errors_inner.rb similarity index 95% rename from lib/openapi_client/models/error_status_errors_inner.rb rename to lib/onelogin/models/error_status_errors_inner.rb index 2517482..2036bb4 100644 --- a/lib/openapi_client/models/error_status_errors_inner.rb +++ b/lib/onelogin/models/error_status_errors_inner.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class ErrorStatusErrorsInner attr_accessor :field @@ -50,13 +50,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::ErrorStatusErrorsInner` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::ErrorStatusErrorsInner` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::ErrorStatusErrorsInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::ErrorStatusErrorsInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -174,7 +174,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/factor_inner.rb b/lib/onelogin/models/factor_inner.rb similarity index 97% rename from lib/openapi_client/models/factor_inner.rb rename to lib/onelogin/models/factor_inner.rb index 573d1be..7cdffe3 100644 --- a/lib/openapi_client/models/factor_inner.rb +++ b/lib/onelogin/models/factor_inner.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class FactorInner # MFA device identifier. attr_accessor :id @@ -103,13 +103,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::FactorInner` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::FactorInner` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::FactorInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::FactorInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -267,7 +267,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/factor_inner_factor_data.rb b/lib/onelogin/models/factor_inner_factor_data.rb similarity index 95% rename from lib/openapi_client/models/factor_inner_factor_data.rb rename to lib/onelogin/models/factor_inner_factor_data.rb index e015f78..e334dea 100644 --- a/lib/openapi_client/models/factor_inner_factor_data.rb +++ b/lib/onelogin/models/factor_inner_factor_data.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin # Array of factor specific properties. For example, the token or totp code for OneLogin Protect. class FactorInnerFactorData # The token which can be used to verify the factor registration. @@ -53,13 +53,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::FactorInnerFactorData` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::FactorInnerFactorData` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::FactorInnerFactorData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::FactorInnerFactorData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -175,7 +175,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/generate_mfa_token200_response.rb b/lib/onelogin/models/generate_mfa_token200_response.rb similarity index 96% rename from lib/openapi_client/models/generate_mfa_token200_response.rb rename to lib/onelogin/models/generate_mfa_token200_response.rb index 6e67eba..53121b4 100644 --- a/lib/openapi_client/models/generate_mfa_token200_response.rb +++ b/lib/onelogin/models/generate_mfa_token200_response.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class GenerateMfaToken200Response # Token can function as a temporary MFA token. It can be used to authenticate for any app when valid. attr_accessor :mfa_token @@ -62,13 +62,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::GenerateMfaToken200Response` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::GenerateMfaToken200Response` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::GenerateMfaToken200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::GenerateMfaToken200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -194,7 +194,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/generate_mfa_token422_response.rb b/lib/onelogin/models/generate_mfa_token422_response.rb similarity index 95% rename from lib/openapi_client/models/generate_mfa_token422_response.rb rename to lib/onelogin/models/generate_mfa_token422_response.rb index 6e242ad..346cda1 100644 --- a/lib/openapi_client/models/generate_mfa_token422_response.rb +++ b/lib/onelogin/models/generate_mfa_token422_response.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class GenerateMfaToken422Response attr_accessor :status_code @@ -58,13 +58,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::GenerateMfaToken422Response` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::GenerateMfaToken422Response` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::GenerateMfaToken422Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::GenerateMfaToken422Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -190,7 +190,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/generate_mfa_token422_response_details.rb b/lib/onelogin/models/generate_mfa_token422_response_details.rb similarity index 95% rename from lib/openapi_client/models/generate_mfa_token422_response_details.rb rename to lib/onelogin/models/generate_mfa_token422_response_details.rb index e166ca8..f0bde5b 100644 --- a/lib/openapi_client/models/generate_mfa_token422_response_details.rb +++ b/lib/onelogin/models/generate_mfa_token422_response_details.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class GenerateMfaToken422ResponseDetails attr_accessor :parameters @@ -46,13 +46,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::GenerateMfaToken422ResponseDetails` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::GenerateMfaToken422ResponseDetails` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::GenerateMfaToken422ResponseDetails`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::GenerateMfaToken422ResponseDetails`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -165,7 +165,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/generate_mfa_token_request.rb b/lib/onelogin/models/generate_mfa_token_request.rb similarity index 95% rename from lib/openapi_client/models/generate_mfa_token_request.rb rename to lib/onelogin/models/generate_mfa_token_request.rb index b97e43c..7c0376c 100644 --- a/lib/openapi_client/models/generate_mfa_token_request.rb +++ b/lib/onelogin/models/generate_mfa_token_request.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class GenerateMfaTokenRequest # Set the duration of the token in seconds. attr_accessor :expires_in @@ -52,13 +52,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::GenerateMfaTokenRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::GenerateMfaTokenRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::GenerateMfaTokenRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::GenerateMfaTokenRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -174,7 +174,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/generate_saml_assertion_request.rb b/lib/onelogin/models/generate_saml_assertion_request.rb similarity index 96% rename from lib/openapi_client/models/generate_saml_assertion_request.rb rename to lib/onelogin/models/generate_saml_assertion_request.rb index 18c0fb2..b289ba4 100644 --- a/lib/openapi_client/models/generate_saml_assertion_request.rb +++ b/lib/onelogin/models/generate_saml_assertion_request.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class GenerateSamlAssertionRequest # Set this to the username or email of the OneLogin user accessing the app for which you want to generate a SAML token. attr_accessor :username_or_email @@ -67,13 +67,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::GenerateSamlAssertionRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::GenerateSamlAssertionRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::GenerateSamlAssertionRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::GenerateSamlAssertionRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -224,7 +224,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/generate_token200_response.rb b/lib/onelogin/models/generate_token200_response.rb similarity index 96% rename from lib/openapi_client/models/generate_token200_response.rb rename to lib/onelogin/models/generate_token200_response.rb index afae2d6..276d578 100644 --- a/lib/openapi_client/models/generate_token200_response.rb +++ b/lib/onelogin/models/generate_token200_response.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class GenerateToken200Response attr_accessor :access_token @@ -66,13 +66,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::GenerateToken200Response` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::GenerateToken200Response` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::GenerateToken200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::GenerateToken200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -208,7 +208,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/generate_token400_response.rb b/lib/onelogin/models/generate_token400_response.rb similarity index 95% rename from lib/openapi_client/models/generate_token400_response.rb rename to lib/onelogin/models/generate_token400_response.rb index dc9fc9b..23c631e 100644 --- a/lib/openapi_client/models/generate_token400_response.rb +++ b/lib/onelogin/models/generate_token400_response.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class GenerateToken400Response attr_accessor :status @@ -46,13 +46,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::GenerateToken400Response` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::GenerateToken400Response` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::GenerateToken400Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::GenerateToken400Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -163,7 +163,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/generate_token_request.rb b/lib/onelogin/models/generate_token_request.rb similarity index 96% rename from lib/openapi_client/models/generate_token_request.rb rename to lib/onelogin/models/generate_token_request.rb index 3c81cf1..d74da8f 100644 --- a/lib/openapi_client/models/generate_token_request.rb +++ b/lib/onelogin/models/generate_token_request.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class GenerateTokenRequest attr_accessor :grant_type @@ -68,13 +68,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::GenerateTokenRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::GenerateTokenRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::GenerateTokenRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::GenerateTokenRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -197,7 +197,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/get_authorization_server200_response.rb b/lib/onelogin/models/get_authorization_server200_response.rb similarity index 95% rename from lib/openapi_client/models/get_authorization_server200_response.rb rename to lib/onelogin/models/get_authorization_server200_response.rb index 98679c5..82c7456 100644 --- a/lib/openapi_client/models/get_authorization_server200_response.rb +++ b/lib/onelogin/models/get_authorization_server200_response.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class GetAuthorizationServer200Response attr_accessor :configuration @@ -58,13 +58,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::GetAuthorizationServer200Response` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::GetAuthorizationServer200Response` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::GetAuthorizationServer200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::GetAuthorizationServer200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -190,7 +190,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/get_available_factors200_response_inner.rb b/lib/onelogin/models/get_available_factors200_response_inner.rb similarity index 95% rename from lib/openapi_client/models/get_available_factors200_response_inner.rb rename to lib/onelogin/models/get_available_factors200_response_inner.rb index cdb9a18..411c4d5 100644 --- a/lib/openapi_client/models/get_available_factors200_response_inner.rb +++ b/lib/onelogin/models/get_available_factors200_response_inner.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class GetAvailableFactors200ResponseInner # Identifier for the factor which will be used for user enrollment attr_accessor :factor_id @@ -57,13 +57,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::GetAvailableFactors200ResponseInner` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::GetAvailableFactors200ResponseInner` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::GetAvailableFactors200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::GetAvailableFactors200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -184,7 +184,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/get_client_apps200_response_inner.rb b/lib/onelogin/models/get_client_apps200_response_inner.rb similarity index 95% rename from lib/openapi_client/models/get_client_apps200_response_inner.rb rename to lib/onelogin/models/get_client_apps200_response_inner.rb index cb4874f..06891e0 100644 --- a/lib/openapi_client/models/get_client_apps200_response_inner.rb +++ b/lib/onelogin/models/get_client_apps200_response_inner.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class GetClientApps200ResponseInner attr_accessor :scopes @@ -58,13 +58,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::GetClientApps200ResponseInner` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::GetClientApps200ResponseInner` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::GetClientApps200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::GetClientApps200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -192,7 +192,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/get_client_apps200_response_inner_scopes_inner.rb b/lib/onelogin/models/get_client_apps200_response_inner_scopes_inner.rb similarity index 95% rename from lib/openapi_client/models/get_client_apps200_response_inner_scopes_inner.rb rename to lib/onelogin/models/get_client_apps200_response_inner_scopes_inner.rb index e10501c..06d2a3d 100644 --- a/lib/openapi_client/models/get_client_apps200_response_inner_scopes_inner.rb +++ b/lib/onelogin/models/get_client_apps200_response_inner_scopes_inner.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class GetClientApps200ResponseInnerScopesInner attr_accessor :description @@ -54,13 +54,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::GetClientApps200ResponseInnerScopesInner` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::GetClientApps200ResponseInnerScopesInner` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::GetClientApps200ResponseInnerScopesInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::GetClientApps200ResponseInnerScopesInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -181,7 +181,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/get_rate_limit200_response.rb b/lib/onelogin/models/get_rate_limit200_response.rb similarity index 95% rename from lib/openapi_client/models/get_rate_limit200_response.rb rename to lib/onelogin/models/get_rate_limit200_response.rb index 26429d0..69e0d3e 100644 --- a/lib/openapi_client/models/get_rate_limit200_response.rb +++ b/lib/onelogin/models/get_rate_limit200_response.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class GetRateLimit200Response attr_accessor :status @@ -50,13 +50,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::GetRateLimit200Response` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::GetRateLimit200Response` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::GetRateLimit200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::GetRateLimit200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -172,7 +172,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/get_rate_limit200_response_data.rb b/lib/onelogin/models/get_rate_limit200_response_data.rb similarity index 95% rename from lib/openapi_client/models/get_rate_limit200_response_data.rb rename to lib/onelogin/models/get_rate_limit200_response_data.rb index dc2fb62..096029b 100644 --- a/lib/openapi_client/models/get_rate_limit200_response_data.rb +++ b/lib/onelogin/models/get_rate_limit200_response_data.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class GetRateLimit200ResponseData attr_accessor :x_rate_limit_limit @@ -54,13 +54,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::GetRateLimit200ResponseData` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::GetRateLimit200ResponseData` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::GetRateLimit200ResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::GetRateLimit200ResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -181,7 +181,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/get_risk_score200_response.rb b/lib/onelogin/models/get_risk_score200_response.rb similarity index 96% rename from lib/openapi_client/models/get_risk_score200_response.rb rename to lib/onelogin/models/get_risk_score200_response.rb index dbfaf41..ae69bff 100644 --- a/lib/openapi_client/models/get_risk_score200_response.rb +++ b/lib/onelogin/models/get_risk_score200_response.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class GetRiskScore200Response # A risk score 0 is low risk and 100 is the highest risk level possible. attr_accessor :score @@ -52,13 +52,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::GetRiskScore200Response` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::GetRiskScore200Response` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::GetRiskScore200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::GetRiskScore200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -200,7 +200,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/get_risk_score400_response.rb b/lib/onelogin/models/get_risk_score400_response.rb similarity index 95% rename from lib/openapi_client/models/get_risk_score400_response.rb rename to lib/onelogin/models/get_risk_score400_response.rb index e37f9d8..a4ec147 100644 --- a/lib/openapi_client/models/get_risk_score400_response.rb +++ b/lib/onelogin/models/get_risk_score400_response.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class GetRiskScore400Response attr_accessor :messages @@ -46,13 +46,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::GetRiskScore400Response` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::GetRiskScore400Response` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::GetRiskScore400Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::GetRiskScore400Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -165,7 +165,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/get_risk_score_request.rb b/lib/onelogin/models/get_risk_score_request.rb similarity index 96% rename from lib/openapi_client/models/get_risk_score_request.rb rename to lib/onelogin/models/get_risk_score_request.rb index 1b7a4c0..5e3ab61 100644 --- a/lib/openapi_client/models/get_risk_score_request.rb +++ b/lib/onelogin/models/get_risk_score_request.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class GetRiskScoreRequest # The IP address of the User's request. attr_accessor :ip @@ -73,13 +73,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::GetRiskScoreRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::GetRiskScoreRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::GetRiskScoreRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::GetRiskScoreRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -235,7 +235,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/get_score_insights200_response.rb b/lib/onelogin/models/get_score_insights200_response.rb similarity index 95% rename from lib/openapi_client/models/get_score_insights200_response.rb rename to lib/onelogin/models/get_score_insights200_response.rb index 7823fe1..8eb7682 100644 --- a/lib/openapi_client/models/get_score_insights200_response.rb +++ b/lib/onelogin/models/get_score_insights200_response.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class GetScoreInsights200Response attr_accessor :scores @@ -50,13 +50,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::GetScoreInsights200Response` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::GetScoreInsights200Response` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::GetScoreInsights200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::GetScoreInsights200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -172,7 +172,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/get_score_insights200_response_scores.rb b/lib/onelogin/models/get_score_insights200_response_scores.rb similarity index 95% rename from lib/openapi_client/models/get_score_insights200_response_scores.rb rename to lib/onelogin/models/get_score_insights200_response_scores.rb index c9529f4..d7cdfcd 100644 --- a/lib/openapi_client/models/get_score_insights200_response_scores.rb +++ b/lib/onelogin/models/get_score_insights200_response_scores.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class GetScoreInsights200ResponseScores attr_accessor :minimal @@ -62,13 +62,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::GetScoreInsights200ResponseScores` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::GetScoreInsights200ResponseScores` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::GetScoreInsights200ResponseScores`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::GetScoreInsights200ResponseScores`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -199,7 +199,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/get_user_apps200_response_inner.rb b/lib/onelogin/models/get_user_apps200_response_inner.rb similarity index 97% rename from lib/openapi_client/models/get_user_apps200_response_inner.rb rename to lib/onelogin/models/get_user_apps200_response_inner.rb index cab4587..375c072 100644 --- a/lib/openapi_client/models/get_user_apps200_response_inner.rb +++ b/lib/onelogin/models/get_user_apps200_response_inner.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class GetUserApps200ResponseInner # The App ID attr_accessor :id @@ -103,13 +103,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::GetUserApps200ResponseInner` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::GetUserApps200ResponseInner` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::GetUserApps200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::GetUserApps200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -279,7 +279,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/hook.rb b/lib/onelogin/models/hook.rb similarity index 98% rename from lib/openapi_client/models/hook.rb rename to lib/onelogin/models/hook.rb index 2802361..9cc6db6 100644 --- a/lib/openapi_client/models/hook.rb +++ b/lib/onelogin/models/hook.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class Hook # The Hook unique ID in OneLogin. attr_accessor :id @@ -138,13 +138,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::Hook` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::Hook` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::Hook`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::Hook`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -406,7 +406,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/hook_conditions_inner.rb b/lib/onelogin/models/hook_conditions_inner.rb similarity index 95% rename from lib/openapi_client/models/hook_conditions_inner.rb rename to lib/onelogin/models/hook_conditions_inner.rb index 597ef05..d27548f 100644 --- a/lib/openapi_client/models/hook_conditions_inner.rb +++ b/lib/onelogin/models/hook_conditions_inner.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class HookConditionsInner attr_accessor :source @@ -54,13 +54,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::HookConditionsInner` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::HookConditionsInner` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::HookConditionsInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::HookConditionsInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -181,7 +181,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/hook_options.rb b/lib/onelogin/models/hook_options.rb similarity index 96% rename from lib/openapi_client/models/hook_options.rb rename to lib/onelogin/models/hook_options.rb index b085cb2..3b5d686 100644 --- a/lib/openapi_client/models/hook_options.rb +++ b/lib/onelogin/models/hook_options.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin # A set of attributes allow control over the information that is included in the hook context. class HookOptions attr_accessor :risk_enabled @@ -55,13 +55,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::HookOptions` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::HookOptions` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::HookOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::HookOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -182,7 +182,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/hook_status.rb b/lib/onelogin/models/hook_status.rb similarity index 95% rename from lib/openapi_client/models/hook_status.rb rename to lib/onelogin/models/hook_status.rb index 4b968c5..4dd6d4d 100644 --- a/lib/openapi_client/models/hook_status.rb +++ b/lib/onelogin/models/hook_status.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class HookStatus attr_accessor :name @@ -50,13 +50,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::HookStatus` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::HookStatus` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::HookStatus`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::HookStatus`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -172,7 +172,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/id.rb b/lib/onelogin/models/id.rb similarity index 96% rename from lib/openapi_client/models/id.rb rename to lib/onelogin/models/id.rb index 8e3c791..da3aa7c 100644 --- a/lib/openapi_client/models/id.rb +++ b/lib/onelogin/models/id.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class Id attr_accessor :id @@ -46,13 +46,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::Id` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::Id` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::Id`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::Id`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -163,7 +163,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/list_access_token_claims200_response_inner.rb b/lib/onelogin/models/list_access_token_claims200_response_inner.rb similarity index 96% rename from lib/openapi_client/models/list_access_token_claims200_response_inner.rb rename to lib/onelogin/models/list_access_token_claims200_response_inner.rb index 264ff16..be122f2 100644 --- a/lib/openapi_client/models/list_access_token_claims200_response_inner.rb +++ b/lib/onelogin/models/list_access_token_claims200_response_inner.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class ListAccessTokenClaims200ResponseInner attr_accessor :id @@ -78,13 +78,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::ListAccessTokenClaims200ResponseInner` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::ListAccessTokenClaims200ResponseInner` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::ListAccessTokenClaims200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::ListAccessTokenClaims200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -237,7 +237,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/list_actions200_response_inner.rb b/lib/onelogin/models/list_actions200_response_inner.rb similarity index 95% rename from lib/openapi_client/models/list_actions200_response_inner.rb rename to lib/onelogin/models/list_actions200_response_inner.rb index b991d67..4620162 100644 --- a/lib/openapi_client/models/list_actions200_response_inner.rb +++ b/lib/onelogin/models/list_actions200_response_inner.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class ListActions200ResponseInner # The name of the Action. attr_accessor :name @@ -52,13 +52,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::ListActions200ResponseInner` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::ListActions200ResponseInner` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::ListActions200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::ListActions200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -174,7 +174,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/list_app_users200_response_inner.rb b/lib/onelogin/models/list_app_users200_response_inner.rb similarity index 95% rename from lib/openapi_client/models/list_app_users200_response_inner.rb rename to lib/onelogin/models/list_app_users200_response_inner.rb index bd6c4e3..de37d0d 100644 --- a/lib/openapi_client/models/list_app_users200_response_inner.rb +++ b/lib/onelogin/models/list_app_users200_response_inner.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class ListAppUsers200ResponseInner attr_accessor :firstname @@ -62,13 +62,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::ListAppUsers200ResponseInner` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::ListAppUsers200ResponseInner` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::ListAppUsers200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::ListAppUsers200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -199,7 +199,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/list_authorization_servers200_response_inner.rb b/lib/onelogin/models/list_authorization_servers200_response_inner.rb similarity index 95% rename from lib/openapi_client/models/list_authorization_servers200_response_inner.rb rename to lib/onelogin/models/list_authorization_servers200_response_inner.rb index 24c917d..e776e42 100644 --- a/lib/openapi_client/models/list_authorization_servers200_response_inner.rb +++ b/lib/onelogin/models/list_authorization_servers200_response_inner.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class ListAuthorizationServers200ResponseInner attr_accessor :id @@ -58,13 +58,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::ListAuthorizationServers200ResponseInner` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::ListAuthorizationServers200ResponseInner` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::ListAuthorizationServers200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::ListAuthorizationServers200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -190,7 +190,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/list_authorization_servers200_response_inner_configuration.rb b/lib/onelogin/models/list_authorization_servers200_response_inner_configuration.rb similarity index 94% rename from lib/openapi_client/models/list_authorization_servers200_response_inner_configuration.rb rename to lib/onelogin/models/list_authorization_servers200_response_inner_configuration.rb index 30a10da..6facdc6 100644 --- a/lib/openapi_client/models/list_authorization_servers200_response_inner_configuration.rb +++ b/lib/onelogin/models/list_authorization_servers200_response_inner_configuration.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class ListAuthorizationServers200ResponseInnerConfiguration attr_accessor :resource_identifier @@ -50,13 +50,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::ListAuthorizationServers200ResponseInnerConfiguration` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::ListAuthorizationServers200ResponseInnerConfiguration` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::ListAuthorizationServers200ResponseInnerConfiguration`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::ListAuthorizationServers200ResponseInnerConfiguration`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -174,7 +174,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/list_condition_operators200_response_inner.rb b/lib/onelogin/models/list_condition_operators200_response_inner.rb similarity index 95% rename from lib/openapi_client/models/list_condition_operators200_response_inner.rb rename to lib/onelogin/models/list_condition_operators200_response_inner.rb index 42a3981..00cb088 100644 --- a/lib/openapi_client/models/list_condition_operators200_response_inner.rb +++ b/lib/onelogin/models/list_condition_operators200_response_inner.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class ListConditionOperators200ResponseInner # The name or description of the operator. attr_accessor :name @@ -52,13 +52,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::ListConditionOperators200ResponseInner` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::ListConditionOperators200ResponseInner` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::ListConditionOperators200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::ListConditionOperators200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -174,7 +174,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/list_condition_values200_response_inner.rb b/lib/onelogin/models/list_condition_values200_response_inner.rb similarity index 95% rename from lib/openapi_client/models/list_condition_values200_response_inner.rb rename to lib/onelogin/models/list_condition_values200_response_inner.rb index f4586f4..14a9e5f 100644 --- a/lib/openapi_client/models/list_condition_values200_response_inner.rb +++ b/lib/onelogin/models/list_condition_values200_response_inner.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class ListConditionValues200ResponseInner attr_accessor :name @@ -50,13 +50,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::ListConditionValues200ResponseInner` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::ListConditionValues200ResponseInner` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::ListConditionValues200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::ListConditionValues200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -172,7 +172,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/list_conditions200_response_inner.rb b/lib/onelogin/models/list_conditions200_response_inner.rb similarity index 95% rename from lib/openapi_client/models/list_conditions200_response_inner.rb rename to lib/onelogin/models/list_conditions200_response_inner.rb index 69e1e92..f5e84c7 100644 --- a/lib/openapi_client/models/list_conditions200_response_inner.rb +++ b/lib/onelogin/models/list_conditions200_response_inner.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class ListConditions200ResponseInner # The name of the Condition. attr_accessor :name @@ -52,13 +52,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::ListConditions200ResponseInner` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::ListConditions200ResponseInner` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::ListConditions200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::ListConditions200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -174,7 +174,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/list_mapping_condition_operators200_response_inner.rb b/lib/onelogin/models/list_mapping_condition_operators200_response_inner.rb similarity index 95% rename from lib/openapi_client/models/list_mapping_condition_operators200_response_inner.rb rename to lib/onelogin/models/list_mapping_condition_operators200_response_inner.rb index 5c54be3..bf914aa 100644 --- a/lib/openapi_client/models/list_mapping_condition_operators200_response_inner.rb +++ b/lib/onelogin/models/list_mapping_condition_operators200_response_inner.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class ListMappingConditionOperators200ResponseInner # The name or description of the operator. attr_accessor :name @@ -52,13 +52,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::ListMappingConditionOperators200ResponseInner` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::ListMappingConditionOperators200ResponseInner` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::ListMappingConditionOperators200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::ListMappingConditionOperators200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -174,7 +174,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/list_mapping_conditions200_response_inner.rb b/lib/onelogin/models/list_mapping_conditions200_response_inner.rb similarity index 95% rename from lib/openapi_client/models/list_mapping_conditions200_response_inner.rb rename to lib/onelogin/models/list_mapping_conditions200_response_inner.rb index 885d87f..c29c74d 100644 --- a/lib/openapi_client/models/list_mapping_conditions200_response_inner.rb +++ b/lib/onelogin/models/list_mapping_conditions200_response_inner.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class ListMappingConditions200ResponseInner # The name of the Condition. attr_accessor :name @@ -52,13 +52,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::ListMappingConditions200ResponseInner` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::ListMappingConditions200ResponseInner` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::ListMappingConditions200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::ListMappingConditions200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -174,7 +174,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/list_scopes200_response_inner.rb b/lib/onelogin/models/list_scopes200_response_inner.rb similarity index 95% rename from lib/openapi_client/models/list_scopes200_response_inner.rb rename to lib/onelogin/models/list_scopes200_response_inner.rb index 24ea3c4..a53898d 100644 --- a/lib/openapi_client/models/list_scopes200_response_inner.rb +++ b/lib/onelogin/models/list_scopes200_response_inner.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class ListScopes200ResponseInner attr_accessor :id @@ -54,13 +54,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::ListScopes200ResponseInner` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::ListScopes200ResponseInner` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::ListScopes200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::ListScopes200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -181,7 +181,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/log.rb b/lib/onelogin/models/log.rb similarity index 96% rename from lib/openapi_client/models/log.rb rename to lib/onelogin/models/log.rb index 2a1d4ee..e5a2ac2 100644 --- a/lib/openapi_client/models/log.rb +++ b/lib/onelogin/models/log.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class Log attr_accessor :request_id @@ -58,13 +58,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::Log` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::Log` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::Log`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::Log`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -192,7 +192,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/mapping.rb b/lib/onelogin/models/mapping.rb similarity index 97% rename from lib/openapi_client/models/mapping.rb rename to lib/onelogin/models/mapping.rb index d1445cd..6cc2db2 100644 --- a/lib/openapi_client/models/mapping.rb +++ b/lib/onelogin/models/mapping.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class Mapping attr_accessor :id @@ -98,13 +98,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::Mapping` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::Mapping` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::Mapping`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::Mapping`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -286,7 +286,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/registration.rb b/lib/onelogin/models/registration.rb similarity index 96% rename from lib/openapi_client/models/registration.rb rename to lib/onelogin/models/registration.rb index 5e81a52..5fb5606 100644 --- a/lib/openapi_client/models/registration.rb +++ b/lib/onelogin/models/registration.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class Registration # Registration identifier. attr_accessor :id @@ -79,13 +79,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::Registration` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::Registration` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::Registration`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::Registration`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -218,7 +218,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/remove_role_users_request.rb b/lib/onelogin/models/remove_role_users_request.rb similarity index 95% rename from lib/openapi_client/models/remove_role_users_request.rb rename to lib/onelogin/models/remove_role_users_request.rb index 6809326..b538968 100644 --- a/lib/openapi_client/models/remove_role_users_request.rb +++ b/lib/onelogin/models/remove_role_users_request.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class RemoveRoleUsersRequest attr_accessor :user_id @@ -46,13 +46,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::RemoveRoleUsersRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::RemoveRoleUsersRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::RemoveRoleUsersRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::RemoveRoleUsersRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -165,7 +165,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/revoke_token_request.rb b/lib/onelogin/models/revoke_token_request.rb similarity index 95% rename from lib/openapi_client/models/revoke_token_request.rb rename to lib/onelogin/models/revoke_token_request.rb index f0b781f..8c60d62 100644 --- a/lib/openapi_client/models/revoke_token_request.rb +++ b/lib/onelogin/models/revoke_token_request.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class RevokeTokenRequest attr_accessor :access_token @@ -46,13 +46,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::RevokeTokenRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::RevokeTokenRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::RevokeTokenRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::RevokeTokenRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -163,7 +163,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/risk_device.rb b/lib/onelogin/models/risk_device.rb similarity index 95% rename from lib/openapi_client/models/risk_device.rb rename to lib/onelogin/models/risk_device.rb index 008e399..f437e74 100644 --- a/lib/openapi_client/models/risk_device.rb +++ b/lib/onelogin/models/risk_device.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin # Information about the device being used. class RiskDevice # This device's unique identifier @@ -48,13 +48,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::RiskDevice` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::RiskDevice` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::RiskDevice`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::RiskDevice`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -165,7 +165,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/risk_rule.rb b/lib/onelogin/models/risk_rule.rb similarity index 97% rename from lib/openapi_client/models/risk_rule.rb rename to lib/onelogin/models/risk_rule.rb index aaaeda5..d4f09af 100644 --- a/lib/openapi_client/models/risk_rule.rb +++ b/lib/onelogin/models/risk_rule.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class RiskRule attr_accessor :id @@ -96,13 +96,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::RiskRule` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::RiskRule` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::RiskRule`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::RiskRule`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -269,7 +269,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/risk_user.rb b/lib/onelogin/models/risk_user.rb similarity index 96% rename from lib/openapi_client/models/risk_user.rb rename to lib/onelogin/models/risk_user.rb index 0cf8055..7a89ac1 100644 --- a/lib/openapi_client/models/risk_user.rb +++ b/lib/onelogin/models/risk_user.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin # An Object containing User details. class RiskUser # A unique identifier for the user. @@ -58,13 +58,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::RiskUser` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::RiskUser` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::RiskUser`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::RiskUser`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -192,7 +192,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/role.rb b/lib/onelogin/models/role.rb similarity index 96% rename from lib/openapi_client/models/role.rb rename to lib/onelogin/models/role.rb index a18fc3b..9fa6dab 100644 --- a/lib/openapi_client/models/role.rb +++ b/lib/onelogin/models/role.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class Role attr_accessor :id @@ -62,13 +62,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::Role` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::Role` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::Role`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::Role`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -210,7 +210,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/rule.rb b/lib/onelogin/models/rule.rb similarity index 97% rename from lib/openapi_client/models/rule.rb rename to lib/onelogin/models/rule.rb index 838a736..b6bcd51 100644 --- a/lib/openapi_client/models/rule.rb +++ b/lib/onelogin/models/rule.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class Rule attr_accessor :id @@ -98,13 +98,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::Rule` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::Rule` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::Rule`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::Rule`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -261,7 +261,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/rule_id.rb b/lib/onelogin/models/rule_id.rb similarity index 95% rename from lib/openapi_client/models/rule_id.rb rename to lib/onelogin/models/rule_id.rb index 891517f..58e9549 100644 --- a/lib/openapi_client/models/rule_id.rb +++ b/lib/onelogin/models/rule_id.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class RuleId attr_accessor :id @@ -46,13 +46,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::RuleId` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::RuleId` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::RuleId`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::RuleId`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -163,7 +163,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/schema.rb b/lib/onelogin/models/schema.rb similarity index 98% rename from lib/openapi_client/models/schema.rb rename to lib/onelogin/models/schema.rb index 0fb4eae..c4fb31e 100644 --- a/lib/openapi_client/models/schema.rb +++ b/lib/onelogin/models/schema.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class Schema # Apps unique ID in OneLogin. attr_accessor :id @@ -159,13 +159,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::Schema` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::Schema` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::Schema`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::Schema`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -385,7 +385,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/schema1.rb b/lib/onelogin/models/schema1.rb similarity index 96% rename from lib/openapi_client/models/schema1.rb rename to lib/onelogin/models/schema1.rb index bdc3f0b..60aa5d3 100644 --- a/lib/openapi_client/models/schema1.rb +++ b/lib/onelogin/models/schema1.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class Schema1 attr_accessor :id @@ -67,13 +67,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::Schema1` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::Schema1` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::Schema1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::Schema1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -209,7 +209,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/schema1_added_by.rb b/lib/onelogin/models/schema1_added_by.rb similarity index 95% rename from lib/openapi_client/models/schema1_added_by.rb rename to lib/onelogin/models/schema1_added_by.rb index 02eb78a..d42897a 100644 --- a/lib/openapi_client/models/schema1_added_by.rb +++ b/lib/onelogin/models/schema1_added_by.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class Schema1AddedBy attr_accessor :id @@ -50,13 +50,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::Schema1AddedBy` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::Schema1AddedBy` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::Schema1AddedBy`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::Schema1AddedBy`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -172,7 +172,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/schema_provisioning.rb b/lib/onelogin/models/schema_provisioning.rb similarity index 95% rename from lib/openapi_client/models/schema_provisioning.rb rename to lib/onelogin/models/schema_provisioning.rb index 42586c4..43670ad 100644 --- a/lib/openapi_client/models/schema_provisioning.rb +++ b/lib/onelogin/models/schema_provisioning.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class SchemaProvisioning # Indicates if provisioning is enabled for this app. attr_accessor :enabled @@ -47,13 +47,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::SchemaProvisioning` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::SchemaProvisioning` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::SchemaProvisioning`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::SchemaProvisioning`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -164,7 +164,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/session.rb b/lib/onelogin/models/session.rb similarity index 96% rename from lib/openapi_client/models/session.rb rename to lib/onelogin/models/session.rb index 787f1ff..b0c0808 100644 --- a/lib/openapi_client/models/session.rb +++ b/lib/onelogin/models/session.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin # A dictionary of extra information that provides useful context about the session, for example the session ID, or some cookie information. class Session # If you use a database to track sessions, you can send us the session ID. @@ -48,13 +48,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::Session` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::Session` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::Session`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::Session`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -165,7 +165,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/set_role_apps200_response_inner.rb b/lib/onelogin/models/set_role_apps200_response_inner.rb similarity index 95% rename from lib/openapi_client/models/set_role_apps200_response_inner.rb rename to lib/onelogin/models/set_role_apps200_response_inner.rb index 7c0bd1b..54d9fd3 100644 --- a/lib/openapi_client/models/set_role_apps200_response_inner.rb +++ b/lib/onelogin/models/set_role_apps200_response_inner.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class SetRoleApps200ResponseInner # Apps unique ID in OneLogin. attr_accessor :id @@ -47,13 +47,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::SetRoleApps200ResponseInner` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::SetRoleApps200ResponseInner` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::SetRoleApps200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::SetRoleApps200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -164,7 +164,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/source.rb b/lib/onelogin/models/source.rb similarity index 96% rename from lib/openapi_client/models/source.rb rename to lib/onelogin/models/source.rb index 6ac0e05..e1a29b9 100644 --- a/lib/openapi_client/models/source.rb +++ b/lib/onelogin/models/source.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin # Used for targeting custom rules based on a group of people, customers, accounts, or even a single user. class Source attr_accessor :id @@ -52,13 +52,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::Source` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::Source` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::Source`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::Source`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -174,7 +174,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/status.rb b/lib/onelogin/models/status.rb similarity index 96% rename from lib/openapi_client/models/status.rb rename to lib/onelogin/models/status.rb index e4ef590..99e5af0 100644 --- a/lib/openapi_client/models/status.rb +++ b/lib/onelogin/models/status.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class Status attr_accessor :error @@ -58,13 +58,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::Status` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::Status` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::Status`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::Status`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -190,7 +190,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/status1.rb b/lib/onelogin/models/status1.rb similarity index 96% rename from lib/openapi_client/models/status1.rb rename to lib/onelogin/models/status1.rb index 30d8b82..a40345b 100644 --- a/lib/openapi_client/models/status1.rb +++ b/lib/onelogin/models/status1.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class Status1 attr_accessor :message @@ -54,13 +54,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::Status1` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::Status1` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::Status1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::Status1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -181,7 +181,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/status2.rb b/lib/onelogin/models/status2.rb similarity index 95% rename from lib/openapi_client/models/status2.rb rename to lib/onelogin/models/status2.rb index ff61d38..807a8fc 100644 --- a/lib/openapi_client/models/status2.rb +++ b/lib/onelogin/models/status2.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class Status2 attr_accessor :status @@ -46,13 +46,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::Status2` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::Status2` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::Status2`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::Status2`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -163,7 +163,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/status2_status.rb b/lib/onelogin/models/status2_status.rb similarity index 96% rename from lib/openapi_client/models/status2_status.rb rename to lib/onelogin/models/status2_status.rb index c57bced..57de977 100644 --- a/lib/openapi_client/models/status2_status.rb +++ b/lib/onelogin/models/status2_status.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class Status2Status attr_accessor :type @@ -58,13 +58,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::Status2Status` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::Status2Status` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::Status2Status`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::Status2Status`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -190,7 +190,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/track_event_request.rb b/lib/onelogin/models/track_event_request.rb similarity index 96% rename from lib/openapi_client/models/track_event_request.rb rename to lib/onelogin/models/track_event_request.rb index 2336a57..b88c447 100644 --- a/lib/openapi_client/models/track_event_request.rb +++ b/lib/onelogin/models/track_event_request.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class TrackEventRequest # Verbs are used to distinguish between different types of events. attr_accessor :verb @@ -83,13 +83,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::TrackEventRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::TrackEventRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::TrackEventRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::TrackEventRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -260,7 +260,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/update_authorization_server400_response.rb b/lib/onelogin/models/update_authorization_server400_response.rb similarity index 95% rename from lib/openapi_client/models/update_authorization_server400_response.rb rename to lib/onelogin/models/update_authorization_server400_response.rb index 62b6b6e..6a29c7c 100644 --- a/lib/openapi_client/models/update_authorization_server400_response.rb +++ b/lib/onelogin/models/update_authorization_server400_response.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class UpdateAuthorizationServer400Response attr_accessor :field @@ -58,13 +58,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::UpdateAuthorizationServer400Response` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::UpdateAuthorizationServer400Response` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::UpdateAuthorizationServer400Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::UpdateAuthorizationServer400Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -190,7 +190,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/update_client_app_request.rb b/lib/onelogin/models/update_client_app_request.rb similarity index 95% rename from lib/openapi_client/models/update_client_app_request.rb rename to lib/onelogin/models/update_client_app_request.rb index e4b1bb6..f7f2211 100644 --- a/lib/openapi_client/models/update_client_app_request.rb +++ b/lib/onelogin/models/update_client_app_request.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class UpdateClientAppRequest attr_accessor :scopes @@ -46,13 +46,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::UpdateClientAppRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::UpdateClientAppRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::UpdateClientAppRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::UpdateClientAppRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -165,7 +165,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/update_environment_variable_request.rb b/lib/onelogin/models/update_environment_variable_request.rb similarity index 95% rename from lib/openapi_client/models/update_environment_variable_request.rb rename to lib/onelogin/models/update_environment_variable_request.rb index be2c745..05a7ef9 100644 --- a/lib/openapi_client/models/update_environment_variable_request.rb +++ b/lib/onelogin/models/update_environment_variable_request.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class UpdateEnvironmentVariableRequest # The secret value that will be encrypted at rest and injected in applicable hook functions at run time. attr_accessor :value @@ -47,13 +47,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::UpdateEnvironmentVariableRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::UpdateEnvironmentVariableRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::UpdateEnvironmentVariableRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::UpdateEnvironmentVariableRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -169,7 +169,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/update_role200_response.rb b/lib/onelogin/models/update_role200_response.rb similarity index 95% rename from lib/openapi_client/models/update_role200_response.rb rename to lib/onelogin/models/update_role200_response.rb index aa7c1ec..992fa4c 100644 --- a/lib/openapi_client/models/update_role200_response.rb +++ b/lib/onelogin/models/update_role200_response.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class UpdateRole200Response attr_accessor :id @@ -46,13 +46,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::UpdateRole200Response` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::UpdateRole200Response` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::UpdateRole200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::UpdateRole200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -163,7 +163,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/user.rb b/lib/onelogin/models/user.rb similarity index 98% rename from lib/openapi_client/models/user.rb rename to lib/onelogin/models/user.rb index 2b0bea2..fe0f7ab 100644 --- a/lib/openapi_client/models/user.rb +++ b/lib/onelogin/models/user.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class User attr_accessor :id @@ -236,13 +236,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::User` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::User` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::User`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::User`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -559,7 +559,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/verify_enrollment_request.rb b/lib/onelogin/models/verify_enrollment_request.rb similarity index 95% rename from lib/openapi_client/models/verify_enrollment_request.rb rename to lib/onelogin/models/verify_enrollment_request.rb index b857964..afc8c5a 100644 --- a/lib/openapi_client/models/verify_enrollment_request.rb +++ b/lib/onelogin/models/verify_enrollment_request.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class VerifyEnrollmentRequest attr_accessor :otp @@ -46,13 +46,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::VerifyEnrollmentRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::VerifyEnrollmentRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::VerifyEnrollmentRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::VerifyEnrollmentRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -163,7 +163,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/verify_factor_request.rb b/lib/onelogin/models/verify_factor_request.rb similarity index 95% rename from lib/openapi_client/models/verify_factor_request.rb rename to lib/onelogin/models/verify_factor_request.rb index 2d44acb..e50769b 100644 --- a/lib/openapi_client/models/verify_factor_request.rb +++ b/lib/onelogin/models/verify_factor_request.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class VerifyFactorRequest # OTP code provided by the device or SMS message sent to user. attr_accessor :otp @@ -52,13 +52,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::VerifyFactorRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::VerifyFactorRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::VerifyFactorRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::VerifyFactorRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -174,7 +174,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/verify_factor_saml200_response.rb b/lib/onelogin/models/verify_factor_saml200_response.rb similarity index 95% rename from lib/openapi_client/models/verify_factor_saml200_response.rb rename to lib/onelogin/models/verify_factor_saml200_response.rb index 2be1b7f..de4ffd2 100644 --- a/lib/openapi_client/models/verify_factor_saml200_response.rb +++ b/lib/onelogin/models/verify_factor_saml200_response.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class VerifyFactorSaml200Response # Provides the SAML assertion. attr_accessor :data @@ -52,13 +52,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::VerifyFactorSaml200Response` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::VerifyFactorSaml200Response` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::VerifyFactorSaml200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::VerifyFactorSaml200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -174,7 +174,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/verify_factor_saml_request.rb b/lib/onelogin/models/verify_factor_saml_request.rb similarity index 96% rename from lib/openapi_client/models/verify_factor_saml_request.rb rename to lib/onelogin/models/verify_factor_saml_request.rb index b2b7afb..11c6fc6 100644 --- a/lib/openapi_client/models/verify_factor_saml_request.rb +++ b/lib/onelogin/models/verify_factor_saml_request.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class VerifyFactorSamlRequest # App ID of the app for which you want to generate a SAML token. This is the app ID in OneLogin. attr_accessor :app_id @@ -67,13 +67,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::VerifyFactorSamlRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::VerifyFactorSamlRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::VerifyFactorSamlRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::VerifyFactorSamlRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -219,7 +219,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/verify_factor_voice200_response_inner.rb b/lib/onelogin/models/verify_factor_voice200_response_inner.rb similarity index 96% rename from lib/openapi_client/models/verify_factor_voice200_response_inner.rb rename to lib/onelogin/models/verify_factor_voice200_response_inner.rb index ac64bd6..7844630 100644 --- a/lib/openapi_client/models/verify_factor_voice200_response_inner.rb +++ b/lib/onelogin/models/verify_factor_voice200_response_inner.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module OpenapiClient +module OneLogin class VerifyFactorVoice200ResponseInner attr_accessor :id @@ -76,13 +76,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::VerifyFactorVoice200ResponseInner` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OneLogin::VerifyFactorVoice200ResponseInner` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::VerifyFactorVoice200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OneLogin::VerifyFactorVoice200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -215,7 +215,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = OpenapiClient.const_get(type) + klass = OneLogin.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/version.rb b/lib/onelogin/version.rb similarity index 93% rename from lib/openapi_client/version.rb rename to lib/onelogin/version.rb index 70db7bd..6a75711 100644 --- a/lib/openapi_client/version.rb +++ b/lib/onelogin/version.rb @@ -10,6 +10,6 @@ =end -module OpenapiClient +module OneLogin VERSION = '1.0.0' end diff --git a/lib/openapi_client.rb b/lib/openapi_client.rb deleted file mode 100644 index e89eb89..0000000 --- a/lib/openapi_client.rb +++ /dev/null @@ -1,130 +0,0 @@ -=begin -#OneLogin API - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 3.0.0-alpha.1 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 - -=end - -# Common files -require 'openapi_client/api_client' -require 'openapi_client/api_error' -require 'openapi_client/version' -require 'openapi_client/configuration' - -# Models -require 'openapi_client/models/action' -require 'openapi_client/models/activate_factor_request' -require 'openapi_client/models/add_access_token_claim_request' -require 'openapi_client/models/add_client_app_request' -require 'openapi_client/models/add_role_users200_response_inner' -require 'openapi_client/models/add_scope_request' -require 'openapi_client/models/auth_method' -require 'openapi_client/models/auth_server_configuration' -require 'openapi_client/models/client_app' -require 'openapi_client/models/condition' -require 'openapi_client/models/connector' -require 'openapi_client/models/create_authorization_server_request' -require 'openapi_client/models/create_environment_variable_request' -require 'openapi_client/models/create_roles201_response_inner' -require 'openapi_client/models/device' -require 'openapi_client/models/enroll_factor_request' -require 'openapi_client/models/envvar' -require 'openapi_client/models/error_status' -require 'openapi_client/models/error_status_errors_inner' -require 'openapi_client/models/factor_inner' -require 'openapi_client/models/factor_inner_factor_data' -require 'openapi_client/models/generate_mfa_token200_response' -require 'openapi_client/models/generate_mfa_token422_response' -require 'openapi_client/models/generate_mfa_token422_response_details' -require 'openapi_client/models/generate_mfa_token_request' -require 'openapi_client/models/generate_saml_assertion_request' -require 'openapi_client/models/generate_token200_response' -require 'openapi_client/models/generate_token400_response' -require 'openapi_client/models/generate_token_request' -require 'openapi_client/models/get_authorization_server200_response' -require 'openapi_client/models/get_available_factors200_response_inner' -require 'openapi_client/models/get_client_apps200_response_inner' -require 'openapi_client/models/get_client_apps200_response_inner_scopes_inner' -require 'openapi_client/models/get_rate_limit200_response' -require 'openapi_client/models/get_rate_limit200_response_data' -require 'openapi_client/models/get_risk_score200_response' -require 'openapi_client/models/get_risk_score400_response' -require 'openapi_client/models/get_risk_score_request' -require 'openapi_client/models/get_score_insights200_response' -require 'openapi_client/models/get_score_insights200_response_scores' -require 'openapi_client/models/get_user_apps200_response_inner' -require 'openapi_client/models/hook' -require 'openapi_client/models/hook_conditions_inner' -require 'openapi_client/models/hook_options' -require 'openapi_client/models/hook_status' -require 'openapi_client/models/id' -require 'openapi_client/models/list_access_token_claims200_response_inner' -require 'openapi_client/models/list_actions200_response_inner' -require 'openapi_client/models/list_app_users200_response_inner' -require 'openapi_client/models/list_authorization_servers200_response_inner' -require 'openapi_client/models/list_authorization_servers200_response_inner_configuration' -require 'openapi_client/models/list_condition_operators200_response_inner' -require 'openapi_client/models/list_condition_values200_response_inner' -require 'openapi_client/models/list_conditions200_response_inner' -require 'openapi_client/models/list_mapping_condition_operators200_response_inner' -require 'openapi_client/models/list_mapping_conditions200_response_inner' -require 'openapi_client/models/list_scopes200_response_inner' -require 'openapi_client/models/log' -require 'openapi_client/models/mapping' -require 'openapi_client/models/registration' -require 'openapi_client/models/remove_role_users_request' -require 'openapi_client/models/revoke_token_request' -require 'openapi_client/models/risk_device' -require 'openapi_client/models/risk_rule' -require 'openapi_client/models/risk_user' -require 'openapi_client/models/role' -require 'openapi_client/models/rule' -require 'openapi_client/models/rule_id' -require 'openapi_client/models/schema' -require 'openapi_client/models/schema1' -require 'openapi_client/models/schema1_added_by' -require 'openapi_client/models/schema_provisioning' -require 'openapi_client/models/session' -require 'openapi_client/models/set_role_apps200_response_inner' -require 'openapi_client/models/source' -require 'openapi_client/models/status' -require 'openapi_client/models/status1' -require 'openapi_client/models/status2' -require 'openapi_client/models/status2_status' -require 'openapi_client/models/track_event_request' -require 'openapi_client/models/update_authorization_server400_response' -require 'openapi_client/models/update_client_app_request' -require 'openapi_client/models/update_environment_variable_request' -require 'openapi_client/models/update_role200_response' -require 'openapi_client/models/user' -require 'openapi_client/models/verify_enrollment_request' -require 'openapi_client/models/verify_factor_request' -require 'openapi_client/models/verify_factor_saml200_response' -require 'openapi_client/models/verify_factor_saml_request' -require 'openapi_client/models/verify_factor_voice200_response_inner' - -# APIs -require 'openapi_client/api/default_api' - -module OpenapiClient - class << self - # Customize default settings for the SDK using block. - # OpenapiClient.configure do |config| - # config.username = "xxx" - # config.password = "xxx" - # end - # If no block given, return the default Configuration object. - def configure - if block_given? - yield(Configuration.default) - else - Configuration.default - end - end - end -end diff --git a/onelogin.gemspec b/onelogin.gemspec index 015d770..54c06e7 100644 --- a/onelogin.gemspec +++ b/onelogin.gemspec @@ -1,45 +1,38 @@ -# coding: utf-8 -lib = File.expand_path("../lib", __FILE__) -$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) +# -*- encoding: utf-8 -*- + +=begin +#OneLogin API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 3.0.0-alpha.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +$:.push File.expand_path("../lib", __FILE__) require "onelogin/version" -Gem::Specification.new do |spec| - spec.name = "onelogin" - spec.version = OneLogin::VERSION - spec.platform = Gem::Platform::RUBY - spec.authors = ["OneLogin"] - spec.email = ["support@onelogin.com"] - spec.license = 'MIT' - spec.homepage = "https://github.com/onelogin/onelogin-ruby-sdk" - spec.rubyforge_project = %q{http://www.rubygems.org/gems/onelogin-ruby-sdk} - spec.summary = %q{OneLogin's Ruby SDK.} - spec.description = %q{OneLogin's Ruby SDK. Use this API client to interact with OneLogin's platform} - spec.extra_rdoc_files = [ - "LICENSE", - "README.md" - ] - - # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host' - # to allow pushing to a single host or delete this section to allow pushing to any host. - if spec.respond_to?(:metadata) - spec.metadata['allowed_push_host'] = "https://rubygems.org" - else - raise "RubyGems 2.0 or newer is required to protect against " \ - "public gem pushes." - end - - spec.files = `git ls-files -z`.split("\x0").reject do |f| - f.match(%r{^(test|spec|features)/}) - end - spec.bindir = "exe" - spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } - spec.require_paths = ["lib"] - spec.required_ruby_version = '>= 1.9.3' - - spec.add_runtime_dependency('httparty', '>=0.13.7') - spec.add_runtime_dependency('nokogiri', '>=1.6.3.1') - - spec.add_development_dependency "bundler" - spec.add_development_dependency "rake", "~> 10.0" - spec.add_development_dependency "rspec", "~> 3.0" +Gem::Specification.new do |s| + s.name = "onelogin" + s.version = OneLogin::VERSION + s.platform = Gem::Platform::RUBY + s.authors = ["Onelogin DevEx"] + s.email = ["support@onelogin.com"] + s.homepage = "https://github.com/onelogin/onelogin-ruby-sdk" + s.summary = "OneLogin's Ruby SDK." + s.description = "OneLogin's Ruby SDK. Use this API client to interact with OneLogin's platform" + s.license = "MIT" + s.required_ruby_version = ">= 2.4" + + s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1' + + s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0' + + s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? } + s.test_files = `find spec/*`.split("\n") + s.executables = [] + s.require_paths = ["lib"] end diff --git a/openapi_client.gemspec b/openapi_client.gemspec deleted file mode 100644 index 4885f80..0000000 --- a/openapi_client.gemspec +++ /dev/null @@ -1,38 +0,0 @@ -# -*- encoding: utf-8 -*- - -=begin -#OneLogin API - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 3.0.0-alpha.1 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 - -=end - -$:.push File.expand_path("../lib", __FILE__) -require "openapi_client/version" - -Gem::Specification.new do |s| - s.name = "openapi_client" - s.version = OpenapiClient::VERSION - s.platform = Gem::Platform::RUBY - s.authors = ["OpenAPI-Generator"] - s.email = [""] - s.homepage = "https://openapi-generator.tech" - s.summary = "OneLogin API Ruby Gem" - s.description = "No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)" - s.license = "Unlicense" - s.required_ruby_version = ">= 2.4" - - s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1' - - s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0' - - s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? } - s.test_files = `find spec/*`.split("\n") - s.executables = [] - s.require_paths = ["lib"] -end diff --git a/spec/api/default_api_spec.rb b/spec/api/default_api_spec.rb index d137dd0..f6cc1cb 100644 --- a/spec/api/default_api_spec.rb +++ b/spec/api/default_api_spec.rb @@ -13,13 +13,13 @@ require 'spec_helper' require 'json' -# Unit tests for OpenapiClient::DefaultApi +# Unit tests for OneLogin::DefaultApi # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe 'DefaultApi' do before do # run before each test - @api_instance = OpenapiClient::DefaultApi.new + @api_instance = OneLogin::DefaultApi.new end after do @@ -28,7 +28,7 @@ describe 'test an instance of DefaultApi' do it 'should create an instance of DefaultApi' do - expect(@api_instance).to be_instance_of(OpenapiClient::DefaultApi) + expect(@api_instance).to be_instance_of(OneLogin::DefaultApi) end end diff --git a/spec/api_client_spec.rb b/spec/api_client_spec.rb index 3d5a408..ad6ac52 100644 --- a/spec/api_client_spec.rb +++ b/spec/api_client_spec.rb @@ -12,51 +12,51 @@ require 'spec_helper' -describe OpenapiClient::ApiClient do +describe OneLogin::ApiClient do context 'initialization' do context 'URL stuff' do context 'host' do it 'removes http from host' do - OpenapiClient.configure { |c| c.host = 'http://example.com' } - expect(OpenapiClient::Configuration.default.host).to eq('example.com') + OneLogin.configure { |c| c.host = 'http://example.com' } + expect(OneLogin::Configuration.default.host).to eq('example.com') end it 'removes https from host' do - OpenapiClient.configure { |c| c.host = 'https://wookiee.com' } - expect(OpenapiClient::ApiClient.default.config.host).to eq('wookiee.com') + OneLogin.configure { |c| c.host = 'https://wookiee.com' } + expect(OneLogin::ApiClient.default.config.host).to eq('wookiee.com') end it 'removes trailing path from host' do - OpenapiClient.configure { |c| c.host = 'hobo.com/v4' } - expect(OpenapiClient::Configuration.default.host).to eq('hobo.com') + OneLogin.configure { |c| c.host = 'hobo.com/v4' } + expect(OneLogin::Configuration.default.host).to eq('hobo.com') end end context 'base_path' do it "prepends a slash to base_path" do - OpenapiClient.configure { |c| c.base_path = 'v4/dog' } - expect(OpenapiClient::Configuration.default.base_path).to eq('/v4/dog') + OneLogin.configure { |c| c.base_path = 'v4/dog' } + expect(OneLogin::Configuration.default.base_path).to eq('/v4/dog') end it "doesn't prepend a slash if one is already there" do - OpenapiClient.configure { |c| c.base_path = '/v4/dog' } - expect(OpenapiClient::Configuration.default.base_path).to eq('/v4/dog') + OneLogin.configure { |c| c.base_path = '/v4/dog' } + expect(OneLogin::Configuration.default.base_path).to eq('/v4/dog') end it "ends up as a blank string if nil" do - OpenapiClient.configure { |c| c.base_path = nil } - expect(OpenapiClient::Configuration.default.base_path).to eq('') + OneLogin.configure { |c| c.base_path = nil } + expect(OneLogin::Configuration.default.base_path).to eq('') end end end end describe 'params_encoding in #build_request' do - let(:config) { OpenapiClient::Configuration.new } - let(:api_client) { OpenapiClient::ApiClient.new(config) } + let(:config) { OneLogin::Configuration.new } + let(:api_client) { OneLogin::ApiClient.new(config) } it 'defaults to nil' do - expect(OpenapiClient::Configuration.default.params_encoding).to eq(nil) + expect(OneLogin::Configuration.default.params_encoding).to eq(nil) expect(config.params_encoding).to eq(nil) request = api_client.build_request(:get, '/test') @@ -71,11 +71,11 @@ end describe 'timeout in #build_request' do - let(:config) { OpenapiClient::Configuration.new } - let(:api_client) { OpenapiClient::ApiClient.new(config) } + let(:config) { OneLogin::Configuration.new } + let(:api_client) { OneLogin::ApiClient.new(config) } it 'defaults to 0' do - expect(OpenapiClient::Configuration.default.timeout).to eq(0) + expect(OneLogin::Configuration.default.timeout).to eq(0) expect(config.timeout).to eq(0) request = api_client.build_request(:get, '/test') @@ -91,7 +91,7 @@ describe '#deserialize' do it "handles Array" do - api_client = OpenapiClient::ApiClient.new + api_client = OneLogin::ApiClient.new headers = { 'Content-Type' => 'application/json' } response = double('response', headers: headers, body: '[12, 34]') data = api_client.deserialize(response, 'Array') @@ -100,7 +100,7 @@ end it 'handles Array>' do - api_client = OpenapiClient::ApiClient.new + api_client = OneLogin::ApiClient.new headers = { 'Content-Type' => 'application/json' } response = double('response', headers: headers, body: '[[12, 34], [56]]') data = api_client.deserialize(response, 'Array>') @@ -109,7 +109,7 @@ end it 'handles Hash' do - api_client = OpenapiClient::ApiClient.new + api_client = OneLogin::ApiClient.new headers = { 'Content-Type' => 'application/json' } response = double('response', headers: headers, body: '{"message": "Hello"}') data = api_client.deserialize(response, 'Hash') @@ -121,8 +121,8 @@ describe "#object_to_hash" do it 'ignores nils and includes empty arrays' do # uncomment below to test object_to_hash for model - # api_client = OpenapiClient::ApiClient.new - # _model = OpenapiClient::ModelName.new + # api_client = OneLogin::ApiClient.new + # _model = OneLogin::ModelName.new # update the model attribute below # _model.id = 1 # update the expected value (hash) below @@ -133,7 +133,7 @@ describe '#build_collection_param' do let(:param) { ['aa', 'bb', 'cc'] } - let(:api_client) { OpenapiClient::ApiClient.new } + let(:api_client) { OneLogin::ApiClient.new } it 'works for csv' do expect(api_client.build_collection_param(param, :csv)).to eq('aa,bb,cc') @@ -161,7 +161,7 @@ end describe '#json_mime?' do - let(:api_client) { OpenapiClient::ApiClient.new } + let(:api_client) { OneLogin::ApiClient.new } it 'works' do expect(api_client.json_mime?(nil)).to eq false @@ -178,7 +178,7 @@ end describe '#select_header_accept' do - let(:api_client) { OpenapiClient::ApiClient.new } + let(:api_client) { OneLogin::ApiClient.new } it 'works' do expect(api_client.select_header_accept(nil)).to be_nil @@ -194,7 +194,7 @@ end describe '#select_header_content_type' do - let(:api_client) { OpenapiClient::ApiClient.new } + let(:api_client) { OneLogin::ApiClient.new } it 'works' do expect(api_client.select_header_content_type(nil)).to be_nil @@ -209,7 +209,7 @@ end describe '#sanitize_filename' do - let(:api_client) { OpenapiClient::ApiClient.new } + let(:api_client) { OneLogin::ApiClient.new } it 'works' do expect(api_client.sanitize_filename('sun')).to eq('sun') diff --git a/spec/configuration_spec.rb b/spec/configuration_spec.rb index eb635a8..67068b5 100644 --- a/spec/configuration_spec.rb +++ b/spec/configuration_spec.rb @@ -12,14 +12,14 @@ require 'spec_helper' -describe OpenapiClient::Configuration do - let(:config) { OpenapiClient::Configuration.default } +describe OneLogin::Configuration do + let(:config) { OneLogin::Configuration.default } before(:each) do # uncomment below to setup host and base_path # require 'URI' # uri = URI.parse("https://onelogininc.onelogin.com") - # OpenapiClient.configure do |c| + # OneLogin.configure do |c| # c.host = uri.host # c.base_path = uri.path # end diff --git a/spec/models/action_spec.rb b/spec/models/action_spec.rb index 76a046e..92ca5db 100644 --- a/spec/models/action_spec.rb +++ b/spec/models/action_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::Action +# Unit tests for OneLogin::Action # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::Action do - let(:instance) { OpenapiClient::Action.new } +describe OneLogin::Action do + let(:instance) { OneLogin::Action.new } describe 'test an instance of Action' do it 'should create an instance of Action' do - expect(instance).to be_instance_of(OpenapiClient::Action) + expect(instance).to be_instance_of(OneLogin::Action) end end describe 'test attribute "action"' do diff --git a/spec/models/activate_factor_request_spec.rb b/spec/models/activate_factor_request_spec.rb index 8211e15..25017e8 100644 --- a/spec/models/activate_factor_request_spec.rb +++ b/spec/models/activate_factor_request_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::ActivateFactorRequest +# Unit tests for OneLogin::ActivateFactorRequest # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::ActivateFactorRequest do - let(:instance) { OpenapiClient::ActivateFactorRequest.new } +describe OneLogin::ActivateFactorRequest do + let(:instance) { OneLogin::ActivateFactorRequest.new } describe 'test an instance of ActivateFactorRequest' do it 'should create an instance of ActivateFactorRequest' do - expect(instance).to be_instance_of(OpenapiClient::ActivateFactorRequest) + expect(instance).to be_instance_of(OneLogin::ActivateFactorRequest) end end describe 'test attribute "device_id"' do diff --git a/spec/models/add_access_token_claim_request_spec.rb b/spec/models/add_access_token_claim_request_spec.rb index 4e3db35..f64cf04 100644 --- a/spec/models/add_access_token_claim_request_spec.rb +++ b/spec/models/add_access_token_claim_request_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::AddAccessTokenClaimRequest +# Unit tests for OneLogin::AddAccessTokenClaimRequest # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::AddAccessTokenClaimRequest do - let(:instance) { OpenapiClient::AddAccessTokenClaimRequest.new } +describe OneLogin::AddAccessTokenClaimRequest do + let(:instance) { OneLogin::AddAccessTokenClaimRequest.new } describe 'test an instance of AddAccessTokenClaimRequest' do it 'should create an instance of AddAccessTokenClaimRequest' do - expect(instance).to be_instance_of(OpenapiClient::AddAccessTokenClaimRequest) + expect(instance).to be_instance_of(OneLogin::AddAccessTokenClaimRequest) end end describe 'test attribute "name"' do diff --git a/spec/models/add_client_app_request_spec.rb b/spec/models/add_client_app_request_spec.rb index 3664b51..b1c290e 100644 --- a/spec/models/add_client_app_request_spec.rb +++ b/spec/models/add_client_app_request_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::AddClientAppRequest +# Unit tests for OneLogin::AddClientAppRequest # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::AddClientAppRequest do - let(:instance) { OpenapiClient::AddClientAppRequest.new } +describe OneLogin::AddClientAppRequest do + let(:instance) { OneLogin::AddClientAppRequest.new } describe 'test an instance of AddClientAppRequest' do it 'should create an instance of AddClientAppRequest' do - expect(instance).to be_instance_of(OpenapiClient::AddClientAppRequest) + expect(instance).to be_instance_of(OneLogin::AddClientAppRequest) end end describe 'test attribute "app_id"' do diff --git a/spec/models/add_role_users200_response_inner_spec.rb b/spec/models/add_role_users200_response_inner_spec.rb index 6c75a6e..574b3ec 100644 --- a/spec/models/add_role_users200_response_inner_spec.rb +++ b/spec/models/add_role_users200_response_inner_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::AddRoleUsers200ResponseInner +# Unit tests for OneLogin::AddRoleUsers200ResponseInner # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::AddRoleUsers200ResponseInner do - let(:instance) { OpenapiClient::AddRoleUsers200ResponseInner.new } +describe OneLogin::AddRoleUsers200ResponseInner do + let(:instance) { OneLogin::AddRoleUsers200ResponseInner.new } describe 'test an instance of AddRoleUsers200ResponseInner' do it 'should create an instance of AddRoleUsers200ResponseInner' do - expect(instance).to be_instance_of(OpenapiClient::AddRoleUsers200ResponseInner) + expect(instance).to be_instance_of(OneLogin::AddRoleUsers200ResponseInner) end end describe 'test attribute "id"' do diff --git a/spec/models/add_scope_request_spec.rb b/spec/models/add_scope_request_spec.rb index 9d5b516..25f6d95 100644 --- a/spec/models/add_scope_request_spec.rb +++ b/spec/models/add_scope_request_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::AddScopeRequest +# Unit tests for OneLogin::AddScopeRequest # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::AddScopeRequest do - let(:instance) { OpenapiClient::AddScopeRequest.new } +describe OneLogin::AddScopeRequest do + let(:instance) { OneLogin::AddScopeRequest.new } describe 'test an instance of AddScopeRequest' do it 'should create an instance of AddScopeRequest' do - expect(instance).to be_instance_of(OpenapiClient::AddScopeRequest) + expect(instance).to be_instance_of(OneLogin::AddScopeRequest) end end describe 'test attribute "value"' do diff --git a/spec/models/auth_method_spec.rb b/spec/models/auth_method_spec.rb index 2894830..a2e98ec 100644 --- a/spec/models/auth_method_spec.rb +++ b/spec/models/auth_method_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::AuthMethod +# Unit tests for OneLogin::AuthMethod # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::AuthMethod do - let(:instance) { OpenapiClient::AuthMethod.new } +describe OneLogin::AuthMethod do + let(:instance) { OneLogin::AuthMethod.new } describe 'test an instance of AuthMethod' do it 'should create an instance of AuthMethod' do - expect(instance).to be_instance_of(OpenapiClient::AuthMethod) + expect(instance).to be_instance_of(OneLogin::AuthMethod) end end end diff --git a/spec/models/auth_server_configuration_spec.rb b/spec/models/auth_server_configuration_spec.rb index 9248b5c..e1f379a 100644 --- a/spec/models/auth_server_configuration_spec.rb +++ b/spec/models/auth_server_configuration_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::AuthServerConfiguration +# Unit tests for OneLogin::AuthServerConfiguration # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::AuthServerConfiguration do - let(:instance) { OpenapiClient::AuthServerConfiguration.new } +describe OneLogin::AuthServerConfiguration do + let(:instance) { OneLogin::AuthServerConfiguration.new } describe 'test an instance of AuthServerConfiguration' do it 'should create an instance of AuthServerConfiguration' do - expect(instance).to be_instance_of(OpenapiClient::AuthServerConfiguration) + expect(instance).to be_instance_of(OneLogin::AuthServerConfiguration) end end describe 'test attribute "audiences"' do diff --git a/spec/models/client_app_spec.rb b/spec/models/client_app_spec.rb index c02fff6..798d4e9 100644 --- a/spec/models/client_app_spec.rb +++ b/spec/models/client_app_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::ClientApp +# Unit tests for OneLogin::ClientApp # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::ClientApp do - let(:instance) { OpenapiClient::ClientApp.new } +describe OneLogin::ClientApp do + let(:instance) { OneLogin::ClientApp.new } describe 'test an instance of ClientApp' do it 'should create an instance of ClientApp' do - expect(instance).to be_instance_of(OpenapiClient::ClientApp) + expect(instance).to be_instance_of(OneLogin::ClientApp) end end describe 'test attribute "app_id"' do diff --git a/spec/models/condition_spec.rb b/spec/models/condition_spec.rb index e3680de..b87c7fe 100644 --- a/spec/models/condition_spec.rb +++ b/spec/models/condition_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::Condition +# Unit tests for OneLogin::Condition # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::Condition do - let(:instance) { OpenapiClient::Condition.new } +describe OneLogin::Condition do + let(:instance) { OneLogin::Condition.new } describe 'test an instance of Condition' do it 'should create an instance of Condition' do - expect(instance).to be_instance_of(OpenapiClient::Condition) + expect(instance).to be_instance_of(OneLogin::Condition) end end describe 'test attribute "source"' do diff --git a/spec/models/connector_spec.rb b/spec/models/connector_spec.rb index aacaa2e..72f1933 100644 --- a/spec/models/connector_spec.rb +++ b/spec/models/connector_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::Connector +# Unit tests for OneLogin::Connector # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::Connector do - let(:instance) { OpenapiClient::Connector.new } +describe OneLogin::Connector do + let(:instance) { OneLogin::Connector.new } describe 'test an instance of Connector' do it 'should create an instance of Connector' do - expect(instance).to be_instance_of(OpenapiClient::Connector) + expect(instance).to be_instance_of(OneLogin::Connector) end end describe 'test attribute "id"' do diff --git a/spec/models/create_authorization_server_request_spec.rb b/spec/models/create_authorization_server_request_spec.rb index 27b8a55..f04470e 100644 --- a/spec/models/create_authorization_server_request_spec.rb +++ b/spec/models/create_authorization_server_request_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::CreateAuthorizationServerRequest +# Unit tests for OneLogin::CreateAuthorizationServerRequest # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::CreateAuthorizationServerRequest do - let(:instance) { OpenapiClient::CreateAuthorizationServerRequest.new } +describe OneLogin::CreateAuthorizationServerRequest do + let(:instance) { OneLogin::CreateAuthorizationServerRequest.new } describe 'test an instance of CreateAuthorizationServerRequest' do it 'should create an instance of CreateAuthorizationServerRequest' do - expect(instance).to be_instance_of(OpenapiClient::CreateAuthorizationServerRequest) + expect(instance).to be_instance_of(OneLogin::CreateAuthorizationServerRequest) end end describe 'test attribute "name"' do diff --git a/spec/models/create_environment_variable_request_spec.rb b/spec/models/create_environment_variable_request_spec.rb index d5be2a4..207ee1d 100644 --- a/spec/models/create_environment_variable_request_spec.rb +++ b/spec/models/create_environment_variable_request_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::CreateEnvironmentVariableRequest +# Unit tests for OneLogin::CreateEnvironmentVariableRequest # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::CreateEnvironmentVariableRequest do - let(:instance) { OpenapiClient::CreateEnvironmentVariableRequest.new } +describe OneLogin::CreateEnvironmentVariableRequest do + let(:instance) { OneLogin::CreateEnvironmentVariableRequest.new } describe 'test an instance of CreateEnvironmentVariableRequest' do it 'should create an instance of CreateEnvironmentVariableRequest' do - expect(instance).to be_instance_of(OpenapiClient::CreateEnvironmentVariableRequest) + expect(instance).to be_instance_of(OneLogin::CreateEnvironmentVariableRequest) end end describe 'test attribute "name"' do diff --git a/spec/models/create_roles201_response_inner_spec.rb b/spec/models/create_roles201_response_inner_spec.rb index 5d9fa9f..3bd940e 100644 --- a/spec/models/create_roles201_response_inner_spec.rb +++ b/spec/models/create_roles201_response_inner_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::CreateRoles201ResponseInner +# Unit tests for OneLogin::CreateRoles201ResponseInner # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::CreateRoles201ResponseInner do - let(:instance) { OpenapiClient::CreateRoles201ResponseInner.new } +describe OneLogin::CreateRoles201ResponseInner do + let(:instance) { OneLogin::CreateRoles201ResponseInner.new } describe 'test an instance of CreateRoles201ResponseInner' do it 'should create an instance of CreateRoles201ResponseInner' do - expect(instance).to be_instance_of(OpenapiClient::CreateRoles201ResponseInner) + expect(instance).to be_instance_of(OneLogin::CreateRoles201ResponseInner) end end describe 'test attribute "id"' do diff --git a/spec/models/device_spec.rb b/spec/models/device_spec.rb index 398d1ed..40c26e9 100644 --- a/spec/models/device_spec.rb +++ b/spec/models/device_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::Device +# Unit tests for OneLogin::Device # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::Device do - let(:instance) { OpenapiClient::Device.new } +describe OneLogin::Device do + let(:instance) { OneLogin::Device.new } describe 'test an instance of Device' do it 'should create an instance of Device' do - expect(instance).to be_instance_of(OpenapiClient::Device) + expect(instance).to be_instance_of(OneLogin::Device) end end describe 'test attribute "device_id"' do diff --git a/spec/models/enroll_factor_request_spec.rb b/spec/models/enroll_factor_request_spec.rb index 299dbaf..94977ef 100644 --- a/spec/models/enroll_factor_request_spec.rb +++ b/spec/models/enroll_factor_request_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::EnrollFactorRequest +# Unit tests for OneLogin::EnrollFactorRequest # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::EnrollFactorRequest do - let(:instance) { OpenapiClient::EnrollFactorRequest.new } +describe OneLogin::EnrollFactorRequest do + let(:instance) { OneLogin::EnrollFactorRequest.new } describe 'test an instance of EnrollFactorRequest' do it 'should create an instance of EnrollFactorRequest' do - expect(instance).to be_instance_of(OpenapiClient::EnrollFactorRequest) + expect(instance).to be_instance_of(OneLogin::EnrollFactorRequest) end end describe 'test attribute "factor_id"' do diff --git a/spec/models/envvar_spec.rb b/spec/models/envvar_spec.rb index 63feae3..724e8bf 100644 --- a/spec/models/envvar_spec.rb +++ b/spec/models/envvar_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::Envvar +# Unit tests for OneLogin::Envvar # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::Envvar do - let(:instance) { OpenapiClient::Envvar.new } +describe OneLogin::Envvar do + let(:instance) { OneLogin::Envvar.new } describe 'test an instance of Envvar' do it 'should create an instance of Envvar' do - expect(instance).to be_instance_of(OpenapiClient::Envvar) + expect(instance).to be_instance_of(OneLogin::Envvar) end end describe 'test attribute "id"' do diff --git a/spec/models/error_status_errors_inner_spec.rb b/spec/models/error_status_errors_inner_spec.rb index 3cf4ee6..317de08 100644 --- a/spec/models/error_status_errors_inner_spec.rb +++ b/spec/models/error_status_errors_inner_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::ErrorStatusErrorsInner +# Unit tests for OneLogin::ErrorStatusErrorsInner # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::ErrorStatusErrorsInner do - let(:instance) { OpenapiClient::ErrorStatusErrorsInner.new } +describe OneLogin::ErrorStatusErrorsInner do + let(:instance) { OneLogin::ErrorStatusErrorsInner.new } describe 'test an instance of ErrorStatusErrorsInner' do it 'should create an instance of ErrorStatusErrorsInner' do - expect(instance).to be_instance_of(OpenapiClient::ErrorStatusErrorsInner) + expect(instance).to be_instance_of(OneLogin::ErrorStatusErrorsInner) end end describe 'test attribute "field"' do diff --git a/spec/models/error_status_spec.rb b/spec/models/error_status_spec.rb index 2b26c3a..718c76f 100644 --- a/spec/models/error_status_spec.rb +++ b/spec/models/error_status_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::ErrorStatus +# Unit tests for OneLogin::ErrorStatus # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::ErrorStatus do - let(:instance) { OpenapiClient::ErrorStatus.new } +describe OneLogin::ErrorStatus do + let(:instance) { OneLogin::ErrorStatus.new } describe 'test an instance of ErrorStatus' do it 'should create an instance of ErrorStatus' do - expect(instance).to be_instance_of(OpenapiClient::ErrorStatus) + expect(instance).to be_instance_of(OneLogin::ErrorStatus) end end describe 'test attribute "code"' do diff --git a/spec/models/factor_inner_factor_data_spec.rb b/spec/models/factor_inner_factor_data_spec.rb index 73c667a..6e4678a 100644 --- a/spec/models/factor_inner_factor_data_spec.rb +++ b/spec/models/factor_inner_factor_data_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::FactorInnerFactorData +# Unit tests for OneLogin::FactorInnerFactorData # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::FactorInnerFactorData do - let(:instance) { OpenapiClient::FactorInnerFactorData.new } +describe OneLogin::FactorInnerFactorData do + let(:instance) { OneLogin::FactorInnerFactorData.new } describe 'test an instance of FactorInnerFactorData' do it 'should create an instance of FactorInnerFactorData' do - expect(instance).to be_instance_of(OpenapiClient::FactorInnerFactorData) + expect(instance).to be_instance_of(OneLogin::FactorInnerFactorData) end end describe 'test attribute "verification_token"' do diff --git a/spec/models/factor_inner_spec.rb b/spec/models/factor_inner_spec.rb index 454bc3e..aa62fd2 100644 --- a/spec/models/factor_inner_spec.rb +++ b/spec/models/factor_inner_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::FactorInner +# Unit tests for OneLogin::FactorInner # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::FactorInner do - let(:instance) { OpenapiClient::FactorInner.new } +describe OneLogin::FactorInner do + let(:instance) { OneLogin::FactorInner.new } describe 'test an instance of FactorInner' do it 'should create an instance of FactorInner' do - expect(instance).to be_instance_of(OpenapiClient::FactorInner) + expect(instance).to be_instance_of(OneLogin::FactorInner) end end describe 'test attribute "id"' do diff --git a/spec/models/generate_mfa_token200_response_spec.rb b/spec/models/generate_mfa_token200_response_spec.rb index b537a92..1859271 100644 --- a/spec/models/generate_mfa_token200_response_spec.rb +++ b/spec/models/generate_mfa_token200_response_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::GenerateMfaToken200Response +# Unit tests for OneLogin::GenerateMfaToken200Response # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::GenerateMfaToken200Response do - let(:instance) { OpenapiClient::GenerateMfaToken200Response.new } +describe OneLogin::GenerateMfaToken200Response do + let(:instance) { OneLogin::GenerateMfaToken200Response.new } describe 'test an instance of GenerateMfaToken200Response' do it 'should create an instance of GenerateMfaToken200Response' do - expect(instance).to be_instance_of(OpenapiClient::GenerateMfaToken200Response) + expect(instance).to be_instance_of(OneLogin::GenerateMfaToken200Response) end end describe 'test attribute "mfa_token"' do diff --git a/spec/models/generate_mfa_token422_response_details_spec.rb b/spec/models/generate_mfa_token422_response_details_spec.rb index b03a01e..1a39370 100644 --- a/spec/models/generate_mfa_token422_response_details_spec.rb +++ b/spec/models/generate_mfa_token422_response_details_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::GenerateMfaToken422ResponseDetails +# Unit tests for OneLogin::GenerateMfaToken422ResponseDetails # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::GenerateMfaToken422ResponseDetails do - let(:instance) { OpenapiClient::GenerateMfaToken422ResponseDetails.new } +describe OneLogin::GenerateMfaToken422ResponseDetails do + let(:instance) { OneLogin::GenerateMfaToken422ResponseDetails.new } describe 'test an instance of GenerateMfaToken422ResponseDetails' do it 'should create an instance of GenerateMfaToken422ResponseDetails' do - expect(instance).to be_instance_of(OpenapiClient::GenerateMfaToken422ResponseDetails) + expect(instance).to be_instance_of(OneLogin::GenerateMfaToken422ResponseDetails) end end describe 'test attribute "parameters"' do diff --git a/spec/models/generate_mfa_token422_response_spec.rb b/spec/models/generate_mfa_token422_response_spec.rb index a021bbd..d778dec 100644 --- a/spec/models/generate_mfa_token422_response_spec.rb +++ b/spec/models/generate_mfa_token422_response_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::GenerateMfaToken422Response +# Unit tests for OneLogin::GenerateMfaToken422Response # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::GenerateMfaToken422Response do - let(:instance) { OpenapiClient::GenerateMfaToken422Response.new } +describe OneLogin::GenerateMfaToken422Response do + let(:instance) { OneLogin::GenerateMfaToken422Response.new } describe 'test an instance of GenerateMfaToken422Response' do it 'should create an instance of GenerateMfaToken422Response' do - expect(instance).to be_instance_of(OpenapiClient::GenerateMfaToken422Response) + expect(instance).to be_instance_of(OneLogin::GenerateMfaToken422Response) end end describe 'test attribute "status_code"' do diff --git a/spec/models/generate_mfa_token_request_spec.rb b/spec/models/generate_mfa_token_request_spec.rb index 2219157..2f478f0 100644 --- a/spec/models/generate_mfa_token_request_spec.rb +++ b/spec/models/generate_mfa_token_request_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::GenerateMfaTokenRequest +# Unit tests for OneLogin::GenerateMfaTokenRequest # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::GenerateMfaTokenRequest do - let(:instance) { OpenapiClient::GenerateMfaTokenRequest.new } +describe OneLogin::GenerateMfaTokenRequest do + let(:instance) { OneLogin::GenerateMfaTokenRequest.new } describe 'test an instance of GenerateMfaTokenRequest' do it 'should create an instance of GenerateMfaTokenRequest' do - expect(instance).to be_instance_of(OpenapiClient::GenerateMfaTokenRequest) + expect(instance).to be_instance_of(OneLogin::GenerateMfaTokenRequest) end end describe 'test attribute "expires_in"' do diff --git a/spec/models/generate_saml_assertion_request_spec.rb b/spec/models/generate_saml_assertion_request_spec.rb index 27b6da3..42af941 100644 --- a/spec/models/generate_saml_assertion_request_spec.rb +++ b/spec/models/generate_saml_assertion_request_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::GenerateSamlAssertionRequest +# Unit tests for OneLogin::GenerateSamlAssertionRequest # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::GenerateSamlAssertionRequest do - let(:instance) { OpenapiClient::GenerateSamlAssertionRequest.new } +describe OneLogin::GenerateSamlAssertionRequest do + let(:instance) { OneLogin::GenerateSamlAssertionRequest.new } describe 'test an instance of GenerateSamlAssertionRequest' do it 'should create an instance of GenerateSamlAssertionRequest' do - expect(instance).to be_instance_of(OpenapiClient::GenerateSamlAssertionRequest) + expect(instance).to be_instance_of(OneLogin::GenerateSamlAssertionRequest) end end describe 'test attribute "username_or_email"' do diff --git a/spec/models/generate_token200_response_spec.rb b/spec/models/generate_token200_response_spec.rb index c413091..d2b2c02 100644 --- a/spec/models/generate_token200_response_spec.rb +++ b/spec/models/generate_token200_response_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::GenerateToken200Response +# Unit tests for OneLogin::GenerateToken200Response # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::GenerateToken200Response do - let(:instance) { OpenapiClient::GenerateToken200Response.new } +describe OneLogin::GenerateToken200Response do + let(:instance) { OneLogin::GenerateToken200Response.new } describe 'test an instance of GenerateToken200Response' do it 'should create an instance of GenerateToken200Response' do - expect(instance).to be_instance_of(OpenapiClient::GenerateToken200Response) + expect(instance).to be_instance_of(OneLogin::GenerateToken200Response) end end describe 'test attribute "access_token"' do diff --git a/spec/models/generate_token400_response_spec.rb b/spec/models/generate_token400_response_spec.rb index 3430ed1..98bf991 100644 --- a/spec/models/generate_token400_response_spec.rb +++ b/spec/models/generate_token400_response_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::GenerateToken400Response +# Unit tests for OneLogin::GenerateToken400Response # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::GenerateToken400Response do - let(:instance) { OpenapiClient::GenerateToken400Response.new } +describe OneLogin::GenerateToken400Response do + let(:instance) { OneLogin::GenerateToken400Response.new } describe 'test an instance of GenerateToken400Response' do it 'should create an instance of GenerateToken400Response' do - expect(instance).to be_instance_of(OpenapiClient::GenerateToken400Response) + expect(instance).to be_instance_of(OneLogin::GenerateToken400Response) end end describe 'test attribute "status"' do diff --git a/spec/models/generate_token_request_spec.rb b/spec/models/generate_token_request_spec.rb index eb12ccd..1422d61 100644 --- a/spec/models/generate_token_request_spec.rb +++ b/spec/models/generate_token_request_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::GenerateTokenRequest +# Unit tests for OneLogin::GenerateTokenRequest # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::GenerateTokenRequest do - let(:instance) { OpenapiClient::GenerateTokenRequest.new } +describe OneLogin::GenerateTokenRequest do + let(:instance) { OneLogin::GenerateTokenRequest.new } describe 'test an instance of GenerateTokenRequest' do it 'should create an instance of GenerateTokenRequest' do - expect(instance).to be_instance_of(OpenapiClient::GenerateTokenRequest) + expect(instance).to be_instance_of(OneLogin::GenerateTokenRequest) end end describe 'test attribute "grant_type"' do diff --git a/spec/models/get_authorization_server200_response_spec.rb b/spec/models/get_authorization_server200_response_spec.rb index 1378298..8830204 100644 --- a/spec/models/get_authorization_server200_response_spec.rb +++ b/spec/models/get_authorization_server200_response_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::GetAuthorizationServer200Response +# Unit tests for OneLogin::GetAuthorizationServer200Response # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::GetAuthorizationServer200Response do - let(:instance) { OpenapiClient::GetAuthorizationServer200Response.new } +describe OneLogin::GetAuthorizationServer200Response do + let(:instance) { OneLogin::GetAuthorizationServer200Response.new } describe 'test an instance of GetAuthorizationServer200Response' do it 'should create an instance of GetAuthorizationServer200Response' do - expect(instance).to be_instance_of(OpenapiClient::GetAuthorizationServer200Response) + expect(instance).to be_instance_of(OneLogin::GetAuthorizationServer200Response) end end describe 'test attribute "configuration"' do diff --git a/spec/models/get_available_factors200_response_inner_spec.rb b/spec/models/get_available_factors200_response_inner_spec.rb index 3c40189..1d6b1c4 100644 --- a/spec/models/get_available_factors200_response_inner_spec.rb +++ b/spec/models/get_available_factors200_response_inner_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::GetAvailableFactors200ResponseInner +# Unit tests for OneLogin::GetAvailableFactors200ResponseInner # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::GetAvailableFactors200ResponseInner do - let(:instance) { OpenapiClient::GetAvailableFactors200ResponseInner.new } +describe OneLogin::GetAvailableFactors200ResponseInner do + let(:instance) { OneLogin::GetAvailableFactors200ResponseInner.new } describe 'test an instance of GetAvailableFactors200ResponseInner' do it 'should create an instance of GetAvailableFactors200ResponseInner' do - expect(instance).to be_instance_of(OpenapiClient::GetAvailableFactors200ResponseInner) + expect(instance).to be_instance_of(OneLogin::GetAvailableFactors200ResponseInner) end end describe 'test attribute "factor_id"' do diff --git a/spec/models/get_client_apps200_response_inner_scopes_inner_spec.rb b/spec/models/get_client_apps200_response_inner_scopes_inner_spec.rb index c67f977..e277d7e 100644 --- a/spec/models/get_client_apps200_response_inner_scopes_inner_spec.rb +++ b/spec/models/get_client_apps200_response_inner_scopes_inner_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::GetClientApps200ResponseInnerScopesInner +# Unit tests for OneLogin::GetClientApps200ResponseInnerScopesInner # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::GetClientApps200ResponseInnerScopesInner do - let(:instance) { OpenapiClient::GetClientApps200ResponseInnerScopesInner.new } +describe OneLogin::GetClientApps200ResponseInnerScopesInner do + let(:instance) { OneLogin::GetClientApps200ResponseInnerScopesInner.new } describe 'test an instance of GetClientApps200ResponseInnerScopesInner' do it 'should create an instance of GetClientApps200ResponseInnerScopesInner' do - expect(instance).to be_instance_of(OpenapiClient::GetClientApps200ResponseInnerScopesInner) + expect(instance).to be_instance_of(OneLogin::GetClientApps200ResponseInnerScopesInner) end end describe 'test attribute "description"' do diff --git a/spec/models/get_client_apps200_response_inner_spec.rb b/spec/models/get_client_apps200_response_inner_spec.rb index a811422..c344396 100644 --- a/spec/models/get_client_apps200_response_inner_spec.rb +++ b/spec/models/get_client_apps200_response_inner_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::GetClientApps200ResponseInner +# Unit tests for OneLogin::GetClientApps200ResponseInner # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::GetClientApps200ResponseInner do - let(:instance) { OpenapiClient::GetClientApps200ResponseInner.new } +describe OneLogin::GetClientApps200ResponseInner do + let(:instance) { OneLogin::GetClientApps200ResponseInner.new } describe 'test an instance of GetClientApps200ResponseInner' do it 'should create an instance of GetClientApps200ResponseInner' do - expect(instance).to be_instance_of(OpenapiClient::GetClientApps200ResponseInner) + expect(instance).to be_instance_of(OneLogin::GetClientApps200ResponseInner) end end describe 'test attribute "scopes"' do diff --git a/spec/models/get_rate_limit200_response_data_spec.rb b/spec/models/get_rate_limit200_response_data_spec.rb index 4f717f2..f5db6d5 100644 --- a/spec/models/get_rate_limit200_response_data_spec.rb +++ b/spec/models/get_rate_limit200_response_data_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::GetRateLimit200ResponseData +# Unit tests for OneLogin::GetRateLimit200ResponseData # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::GetRateLimit200ResponseData do - let(:instance) { OpenapiClient::GetRateLimit200ResponseData.new } +describe OneLogin::GetRateLimit200ResponseData do + let(:instance) { OneLogin::GetRateLimit200ResponseData.new } describe 'test an instance of GetRateLimit200ResponseData' do it 'should create an instance of GetRateLimit200ResponseData' do - expect(instance).to be_instance_of(OpenapiClient::GetRateLimit200ResponseData) + expect(instance).to be_instance_of(OneLogin::GetRateLimit200ResponseData) end end describe 'test attribute "x_rate_limit_limit"' do diff --git a/spec/models/get_rate_limit200_response_spec.rb b/spec/models/get_rate_limit200_response_spec.rb index 4c37dc2..dd32a3e 100644 --- a/spec/models/get_rate_limit200_response_spec.rb +++ b/spec/models/get_rate_limit200_response_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::GetRateLimit200Response +# Unit tests for OneLogin::GetRateLimit200Response # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::GetRateLimit200Response do - let(:instance) { OpenapiClient::GetRateLimit200Response.new } +describe OneLogin::GetRateLimit200Response do + let(:instance) { OneLogin::GetRateLimit200Response.new } describe 'test an instance of GetRateLimit200Response' do it 'should create an instance of GetRateLimit200Response' do - expect(instance).to be_instance_of(OpenapiClient::GetRateLimit200Response) + expect(instance).to be_instance_of(OneLogin::GetRateLimit200Response) end end describe 'test attribute "status"' do diff --git a/spec/models/get_risk_score200_response_spec.rb b/spec/models/get_risk_score200_response_spec.rb index a06ac8f..38a41cf 100644 --- a/spec/models/get_risk_score200_response_spec.rb +++ b/spec/models/get_risk_score200_response_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::GetRiskScore200Response +# Unit tests for OneLogin::GetRiskScore200Response # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::GetRiskScore200Response do - let(:instance) { OpenapiClient::GetRiskScore200Response.new } +describe OneLogin::GetRiskScore200Response do + let(:instance) { OneLogin::GetRiskScore200Response.new } describe 'test an instance of GetRiskScore200Response' do it 'should create an instance of GetRiskScore200Response' do - expect(instance).to be_instance_of(OpenapiClient::GetRiskScore200Response) + expect(instance).to be_instance_of(OneLogin::GetRiskScore200Response) end end describe 'test attribute "score"' do diff --git a/spec/models/get_risk_score400_response_spec.rb b/spec/models/get_risk_score400_response_spec.rb index 3ec3381..22e58db 100644 --- a/spec/models/get_risk_score400_response_spec.rb +++ b/spec/models/get_risk_score400_response_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::GetRiskScore400Response +# Unit tests for OneLogin::GetRiskScore400Response # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::GetRiskScore400Response do - let(:instance) { OpenapiClient::GetRiskScore400Response.new } +describe OneLogin::GetRiskScore400Response do + let(:instance) { OneLogin::GetRiskScore400Response.new } describe 'test an instance of GetRiskScore400Response' do it 'should create an instance of GetRiskScore400Response' do - expect(instance).to be_instance_of(OpenapiClient::GetRiskScore400Response) + expect(instance).to be_instance_of(OneLogin::GetRiskScore400Response) end end describe 'test attribute "messages"' do diff --git a/spec/models/get_risk_score_request_spec.rb b/spec/models/get_risk_score_request_spec.rb index e500fd6..20e94eb 100644 --- a/spec/models/get_risk_score_request_spec.rb +++ b/spec/models/get_risk_score_request_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::GetRiskScoreRequest +# Unit tests for OneLogin::GetRiskScoreRequest # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::GetRiskScoreRequest do - let(:instance) { OpenapiClient::GetRiskScoreRequest.new } +describe OneLogin::GetRiskScoreRequest do + let(:instance) { OneLogin::GetRiskScoreRequest.new } describe 'test an instance of GetRiskScoreRequest' do it 'should create an instance of GetRiskScoreRequest' do - expect(instance).to be_instance_of(OpenapiClient::GetRiskScoreRequest) + expect(instance).to be_instance_of(OneLogin::GetRiskScoreRequest) end end describe 'test attribute "ip"' do diff --git a/spec/models/get_score_insights200_response_scores_spec.rb b/spec/models/get_score_insights200_response_scores_spec.rb index 444cee7..53a46c7 100644 --- a/spec/models/get_score_insights200_response_scores_spec.rb +++ b/spec/models/get_score_insights200_response_scores_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::GetScoreInsights200ResponseScores +# Unit tests for OneLogin::GetScoreInsights200ResponseScores # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::GetScoreInsights200ResponseScores do - let(:instance) { OpenapiClient::GetScoreInsights200ResponseScores.new } +describe OneLogin::GetScoreInsights200ResponseScores do + let(:instance) { OneLogin::GetScoreInsights200ResponseScores.new } describe 'test an instance of GetScoreInsights200ResponseScores' do it 'should create an instance of GetScoreInsights200ResponseScores' do - expect(instance).to be_instance_of(OpenapiClient::GetScoreInsights200ResponseScores) + expect(instance).to be_instance_of(OneLogin::GetScoreInsights200ResponseScores) end end describe 'test attribute "minimal"' do diff --git a/spec/models/get_score_insights200_response_spec.rb b/spec/models/get_score_insights200_response_spec.rb index 5db7039..3990692 100644 --- a/spec/models/get_score_insights200_response_spec.rb +++ b/spec/models/get_score_insights200_response_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::GetScoreInsights200Response +# Unit tests for OneLogin::GetScoreInsights200Response # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::GetScoreInsights200Response do - let(:instance) { OpenapiClient::GetScoreInsights200Response.new } +describe OneLogin::GetScoreInsights200Response do + let(:instance) { OneLogin::GetScoreInsights200Response.new } describe 'test an instance of GetScoreInsights200Response' do it 'should create an instance of GetScoreInsights200Response' do - expect(instance).to be_instance_of(OpenapiClient::GetScoreInsights200Response) + expect(instance).to be_instance_of(OneLogin::GetScoreInsights200Response) end end describe 'test attribute "scores"' do diff --git a/spec/models/get_user_apps200_response_inner_spec.rb b/spec/models/get_user_apps200_response_inner_spec.rb index ebb04ce..41f591a 100644 --- a/spec/models/get_user_apps200_response_inner_spec.rb +++ b/spec/models/get_user_apps200_response_inner_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::GetUserApps200ResponseInner +# Unit tests for OneLogin::GetUserApps200ResponseInner # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::GetUserApps200ResponseInner do - let(:instance) { OpenapiClient::GetUserApps200ResponseInner.new } +describe OneLogin::GetUserApps200ResponseInner do + let(:instance) { OneLogin::GetUserApps200ResponseInner.new } describe 'test an instance of GetUserApps200ResponseInner' do it 'should create an instance of GetUserApps200ResponseInner' do - expect(instance).to be_instance_of(OpenapiClient::GetUserApps200ResponseInner) + expect(instance).to be_instance_of(OneLogin::GetUserApps200ResponseInner) end end describe 'test attribute "id"' do diff --git a/spec/models/hook_conditions_inner_spec.rb b/spec/models/hook_conditions_inner_spec.rb index 5b20bea..8aad508 100644 --- a/spec/models/hook_conditions_inner_spec.rb +++ b/spec/models/hook_conditions_inner_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::HookConditionsInner +# Unit tests for OneLogin::HookConditionsInner # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::HookConditionsInner do - let(:instance) { OpenapiClient::HookConditionsInner.new } +describe OneLogin::HookConditionsInner do + let(:instance) { OneLogin::HookConditionsInner.new } describe 'test an instance of HookConditionsInner' do it 'should create an instance of HookConditionsInner' do - expect(instance).to be_instance_of(OpenapiClient::HookConditionsInner) + expect(instance).to be_instance_of(OneLogin::HookConditionsInner) end end describe 'test attribute "source"' do diff --git a/spec/models/hook_options_spec.rb b/spec/models/hook_options_spec.rb index f95299b..23252bf 100644 --- a/spec/models/hook_options_spec.rb +++ b/spec/models/hook_options_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::HookOptions +# Unit tests for OneLogin::HookOptions # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::HookOptions do - let(:instance) { OpenapiClient::HookOptions.new } +describe OneLogin::HookOptions do + let(:instance) { OneLogin::HookOptions.new } describe 'test an instance of HookOptions' do it 'should create an instance of HookOptions' do - expect(instance).to be_instance_of(OpenapiClient::HookOptions) + expect(instance).to be_instance_of(OneLogin::HookOptions) end end describe 'test attribute "risk_enabled"' do diff --git a/spec/models/hook_spec.rb b/spec/models/hook_spec.rb index 6b2ce37..65477a4 100644 --- a/spec/models/hook_spec.rb +++ b/spec/models/hook_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::Hook +# Unit tests for OneLogin::Hook # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::Hook do - let(:instance) { OpenapiClient::Hook.new } +describe OneLogin::Hook do + let(:instance) { OneLogin::Hook.new } describe 'test an instance of Hook' do it 'should create an instance of Hook' do - expect(instance).to be_instance_of(OpenapiClient::Hook) + expect(instance).to be_instance_of(OneLogin::Hook) end end describe 'test attribute "id"' do diff --git a/spec/models/hook_status_spec.rb b/spec/models/hook_status_spec.rb index 105fb8e..eaec5a3 100644 --- a/spec/models/hook_status_spec.rb +++ b/spec/models/hook_status_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::HookStatus +# Unit tests for OneLogin::HookStatus # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::HookStatus do - let(:instance) { OpenapiClient::HookStatus.new } +describe OneLogin::HookStatus do + let(:instance) { OneLogin::HookStatus.new } describe 'test an instance of HookStatus' do it 'should create an instance of HookStatus' do - expect(instance).to be_instance_of(OpenapiClient::HookStatus) + expect(instance).to be_instance_of(OneLogin::HookStatus) end end describe 'test attribute "name"' do diff --git a/spec/models/id_spec.rb b/spec/models/id_spec.rb index cafc6cf..91a0cae 100644 --- a/spec/models/id_spec.rb +++ b/spec/models/id_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::Id +# Unit tests for OneLogin::Id # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::Id do - let(:instance) { OpenapiClient::Id.new } +describe OneLogin::Id do + let(:instance) { OneLogin::Id.new } describe 'test an instance of Id' do it 'should create an instance of Id' do - expect(instance).to be_instance_of(OpenapiClient::Id) + expect(instance).to be_instance_of(OneLogin::Id) end end describe 'test attribute "id"' do diff --git a/spec/models/list_access_token_claims200_response_inner_spec.rb b/spec/models/list_access_token_claims200_response_inner_spec.rb index 4fbecf6..1b6fd6e 100644 --- a/spec/models/list_access_token_claims200_response_inner_spec.rb +++ b/spec/models/list_access_token_claims200_response_inner_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::ListAccessTokenClaims200ResponseInner +# Unit tests for OneLogin::ListAccessTokenClaims200ResponseInner # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::ListAccessTokenClaims200ResponseInner do - let(:instance) { OpenapiClient::ListAccessTokenClaims200ResponseInner.new } +describe OneLogin::ListAccessTokenClaims200ResponseInner do + let(:instance) { OneLogin::ListAccessTokenClaims200ResponseInner.new } describe 'test an instance of ListAccessTokenClaims200ResponseInner' do it 'should create an instance of ListAccessTokenClaims200ResponseInner' do - expect(instance).to be_instance_of(OpenapiClient::ListAccessTokenClaims200ResponseInner) + expect(instance).to be_instance_of(OneLogin::ListAccessTokenClaims200ResponseInner) end end describe 'test attribute "id"' do diff --git a/spec/models/list_actions200_response_inner_spec.rb b/spec/models/list_actions200_response_inner_spec.rb index 44460a7..ab29c44 100644 --- a/spec/models/list_actions200_response_inner_spec.rb +++ b/spec/models/list_actions200_response_inner_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::ListActions200ResponseInner +# Unit tests for OneLogin::ListActions200ResponseInner # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::ListActions200ResponseInner do - let(:instance) { OpenapiClient::ListActions200ResponseInner.new } +describe OneLogin::ListActions200ResponseInner do + let(:instance) { OneLogin::ListActions200ResponseInner.new } describe 'test an instance of ListActions200ResponseInner' do it 'should create an instance of ListActions200ResponseInner' do - expect(instance).to be_instance_of(OpenapiClient::ListActions200ResponseInner) + expect(instance).to be_instance_of(OneLogin::ListActions200ResponseInner) end end describe 'test attribute "name"' do diff --git a/spec/models/list_app_users200_response_inner_spec.rb b/spec/models/list_app_users200_response_inner_spec.rb index 3ce113c..38b5300 100644 --- a/spec/models/list_app_users200_response_inner_spec.rb +++ b/spec/models/list_app_users200_response_inner_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::ListAppUsers200ResponseInner +# Unit tests for OneLogin::ListAppUsers200ResponseInner # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::ListAppUsers200ResponseInner do - let(:instance) { OpenapiClient::ListAppUsers200ResponseInner.new } +describe OneLogin::ListAppUsers200ResponseInner do + let(:instance) { OneLogin::ListAppUsers200ResponseInner.new } describe 'test an instance of ListAppUsers200ResponseInner' do it 'should create an instance of ListAppUsers200ResponseInner' do - expect(instance).to be_instance_of(OpenapiClient::ListAppUsers200ResponseInner) + expect(instance).to be_instance_of(OneLogin::ListAppUsers200ResponseInner) end end describe 'test attribute "firstname"' do diff --git a/spec/models/list_authorization_servers200_response_inner_configuration_spec.rb b/spec/models/list_authorization_servers200_response_inner_configuration_spec.rb index d9b1cbd..5f7edcd 100644 --- a/spec/models/list_authorization_servers200_response_inner_configuration_spec.rb +++ b/spec/models/list_authorization_servers200_response_inner_configuration_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::ListAuthorizationServers200ResponseInnerConfiguration +# Unit tests for OneLogin::ListAuthorizationServers200ResponseInnerConfiguration # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::ListAuthorizationServers200ResponseInnerConfiguration do - let(:instance) { OpenapiClient::ListAuthorizationServers200ResponseInnerConfiguration.new } +describe OneLogin::ListAuthorizationServers200ResponseInnerConfiguration do + let(:instance) { OneLogin::ListAuthorizationServers200ResponseInnerConfiguration.new } describe 'test an instance of ListAuthorizationServers200ResponseInnerConfiguration' do it 'should create an instance of ListAuthorizationServers200ResponseInnerConfiguration' do - expect(instance).to be_instance_of(OpenapiClient::ListAuthorizationServers200ResponseInnerConfiguration) + expect(instance).to be_instance_of(OneLogin::ListAuthorizationServers200ResponseInnerConfiguration) end end describe 'test attribute "resource_identifier"' do diff --git a/spec/models/list_authorization_servers200_response_inner_spec.rb b/spec/models/list_authorization_servers200_response_inner_spec.rb index 5318cd8..f495d8a 100644 --- a/spec/models/list_authorization_servers200_response_inner_spec.rb +++ b/spec/models/list_authorization_servers200_response_inner_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::ListAuthorizationServers200ResponseInner +# Unit tests for OneLogin::ListAuthorizationServers200ResponseInner # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::ListAuthorizationServers200ResponseInner do - let(:instance) { OpenapiClient::ListAuthorizationServers200ResponseInner.new } +describe OneLogin::ListAuthorizationServers200ResponseInner do + let(:instance) { OneLogin::ListAuthorizationServers200ResponseInner.new } describe 'test an instance of ListAuthorizationServers200ResponseInner' do it 'should create an instance of ListAuthorizationServers200ResponseInner' do - expect(instance).to be_instance_of(OpenapiClient::ListAuthorizationServers200ResponseInner) + expect(instance).to be_instance_of(OneLogin::ListAuthorizationServers200ResponseInner) end end describe 'test attribute "id"' do diff --git a/spec/models/list_condition_operators200_response_inner_spec.rb b/spec/models/list_condition_operators200_response_inner_spec.rb index d1a5d82..b4cbdb5 100644 --- a/spec/models/list_condition_operators200_response_inner_spec.rb +++ b/spec/models/list_condition_operators200_response_inner_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::ListConditionOperators200ResponseInner +# Unit tests for OneLogin::ListConditionOperators200ResponseInner # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::ListConditionOperators200ResponseInner do - let(:instance) { OpenapiClient::ListConditionOperators200ResponseInner.new } +describe OneLogin::ListConditionOperators200ResponseInner do + let(:instance) { OneLogin::ListConditionOperators200ResponseInner.new } describe 'test an instance of ListConditionOperators200ResponseInner' do it 'should create an instance of ListConditionOperators200ResponseInner' do - expect(instance).to be_instance_of(OpenapiClient::ListConditionOperators200ResponseInner) + expect(instance).to be_instance_of(OneLogin::ListConditionOperators200ResponseInner) end end describe 'test attribute "name"' do diff --git a/spec/models/list_condition_values200_response_inner_spec.rb b/spec/models/list_condition_values200_response_inner_spec.rb index f0d51a6..3fcfcea 100644 --- a/spec/models/list_condition_values200_response_inner_spec.rb +++ b/spec/models/list_condition_values200_response_inner_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::ListConditionValues200ResponseInner +# Unit tests for OneLogin::ListConditionValues200ResponseInner # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::ListConditionValues200ResponseInner do - let(:instance) { OpenapiClient::ListConditionValues200ResponseInner.new } +describe OneLogin::ListConditionValues200ResponseInner do + let(:instance) { OneLogin::ListConditionValues200ResponseInner.new } describe 'test an instance of ListConditionValues200ResponseInner' do it 'should create an instance of ListConditionValues200ResponseInner' do - expect(instance).to be_instance_of(OpenapiClient::ListConditionValues200ResponseInner) + expect(instance).to be_instance_of(OneLogin::ListConditionValues200ResponseInner) end end describe 'test attribute "name"' do diff --git a/spec/models/list_conditions200_response_inner_spec.rb b/spec/models/list_conditions200_response_inner_spec.rb index c1c5709..d977d6e 100644 --- a/spec/models/list_conditions200_response_inner_spec.rb +++ b/spec/models/list_conditions200_response_inner_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::ListConditions200ResponseInner +# Unit tests for OneLogin::ListConditions200ResponseInner # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::ListConditions200ResponseInner do - let(:instance) { OpenapiClient::ListConditions200ResponseInner.new } +describe OneLogin::ListConditions200ResponseInner do + let(:instance) { OneLogin::ListConditions200ResponseInner.new } describe 'test an instance of ListConditions200ResponseInner' do it 'should create an instance of ListConditions200ResponseInner' do - expect(instance).to be_instance_of(OpenapiClient::ListConditions200ResponseInner) + expect(instance).to be_instance_of(OneLogin::ListConditions200ResponseInner) end end describe 'test attribute "name"' do diff --git a/spec/models/list_mapping_condition_operators200_response_inner_spec.rb b/spec/models/list_mapping_condition_operators200_response_inner_spec.rb index 4bfc80f..611f60b 100644 --- a/spec/models/list_mapping_condition_operators200_response_inner_spec.rb +++ b/spec/models/list_mapping_condition_operators200_response_inner_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::ListMappingConditionOperators200ResponseInner +# Unit tests for OneLogin::ListMappingConditionOperators200ResponseInner # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::ListMappingConditionOperators200ResponseInner do - let(:instance) { OpenapiClient::ListMappingConditionOperators200ResponseInner.new } +describe OneLogin::ListMappingConditionOperators200ResponseInner do + let(:instance) { OneLogin::ListMappingConditionOperators200ResponseInner.new } describe 'test an instance of ListMappingConditionOperators200ResponseInner' do it 'should create an instance of ListMappingConditionOperators200ResponseInner' do - expect(instance).to be_instance_of(OpenapiClient::ListMappingConditionOperators200ResponseInner) + expect(instance).to be_instance_of(OneLogin::ListMappingConditionOperators200ResponseInner) end end describe 'test attribute "name"' do diff --git a/spec/models/list_mapping_conditions200_response_inner_spec.rb b/spec/models/list_mapping_conditions200_response_inner_spec.rb index 8b8c392..d92e541 100644 --- a/spec/models/list_mapping_conditions200_response_inner_spec.rb +++ b/spec/models/list_mapping_conditions200_response_inner_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::ListMappingConditions200ResponseInner +# Unit tests for OneLogin::ListMappingConditions200ResponseInner # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::ListMappingConditions200ResponseInner do - let(:instance) { OpenapiClient::ListMappingConditions200ResponseInner.new } +describe OneLogin::ListMappingConditions200ResponseInner do + let(:instance) { OneLogin::ListMappingConditions200ResponseInner.new } describe 'test an instance of ListMappingConditions200ResponseInner' do it 'should create an instance of ListMappingConditions200ResponseInner' do - expect(instance).to be_instance_of(OpenapiClient::ListMappingConditions200ResponseInner) + expect(instance).to be_instance_of(OneLogin::ListMappingConditions200ResponseInner) end end describe 'test attribute "name"' do diff --git a/spec/models/list_scopes200_response_inner_spec.rb b/spec/models/list_scopes200_response_inner_spec.rb index bc7bd65..1768224 100644 --- a/spec/models/list_scopes200_response_inner_spec.rb +++ b/spec/models/list_scopes200_response_inner_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::ListScopes200ResponseInner +# Unit tests for OneLogin::ListScopes200ResponseInner # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::ListScopes200ResponseInner do - let(:instance) { OpenapiClient::ListScopes200ResponseInner.new } +describe OneLogin::ListScopes200ResponseInner do + let(:instance) { OneLogin::ListScopes200ResponseInner.new } describe 'test an instance of ListScopes200ResponseInner' do it 'should create an instance of ListScopes200ResponseInner' do - expect(instance).to be_instance_of(OpenapiClient::ListScopes200ResponseInner) + expect(instance).to be_instance_of(OneLogin::ListScopes200ResponseInner) end end describe 'test attribute "id"' do diff --git a/spec/models/log_spec.rb b/spec/models/log_spec.rb index d199218..fca7b58 100644 --- a/spec/models/log_spec.rb +++ b/spec/models/log_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::Log +# Unit tests for OneLogin::Log # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::Log do - let(:instance) { OpenapiClient::Log.new } +describe OneLogin::Log do + let(:instance) { OneLogin::Log.new } describe 'test an instance of Log' do it 'should create an instance of Log' do - expect(instance).to be_instance_of(OpenapiClient::Log) + expect(instance).to be_instance_of(OneLogin::Log) end end describe 'test attribute "request_id"' do diff --git a/spec/models/mapping_spec.rb b/spec/models/mapping_spec.rb index 331e589..d6a3811 100644 --- a/spec/models/mapping_spec.rb +++ b/spec/models/mapping_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::Mapping +# Unit tests for OneLogin::Mapping # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::Mapping do - let(:instance) { OpenapiClient::Mapping.new } +describe OneLogin::Mapping do + let(:instance) { OneLogin::Mapping.new } describe 'test an instance of Mapping' do it 'should create an instance of Mapping' do - expect(instance).to be_instance_of(OpenapiClient::Mapping) + expect(instance).to be_instance_of(OneLogin::Mapping) end end describe 'test attribute "id"' do diff --git a/spec/models/registration_spec.rb b/spec/models/registration_spec.rb index 42377a0..952bdb7 100644 --- a/spec/models/registration_spec.rb +++ b/spec/models/registration_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::Registration +# Unit tests for OneLogin::Registration # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::Registration do - let(:instance) { OpenapiClient::Registration.new } +describe OneLogin::Registration do + let(:instance) { OneLogin::Registration.new } describe 'test an instance of Registration' do it 'should create an instance of Registration' do - expect(instance).to be_instance_of(OpenapiClient::Registration) + expect(instance).to be_instance_of(OneLogin::Registration) end end describe 'test attribute "id"' do diff --git a/spec/models/remove_role_users_request_spec.rb b/spec/models/remove_role_users_request_spec.rb index a783166..4164bfb 100644 --- a/spec/models/remove_role_users_request_spec.rb +++ b/spec/models/remove_role_users_request_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::RemoveRoleUsersRequest +# Unit tests for OneLogin::RemoveRoleUsersRequest # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::RemoveRoleUsersRequest do - let(:instance) { OpenapiClient::RemoveRoleUsersRequest.new } +describe OneLogin::RemoveRoleUsersRequest do + let(:instance) { OneLogin::RemoveRoleUsersRequest.new } describe 'test an instance of RemoveRoleUsersRequest' do it 'should create an instance of RemoveRoleUsersRequest' do - expect(instance).to be_instance_of(OpenapiClient::RemoveRoleUsersRequest) + expect(instance).to be_instance_of(OneLogin::RemoveRoleUsersRequest) end end describe 'test attribute "user_id"' do diff --git a/spec/models/revoke_token_request_spec.rb b/spec/models/revoke_token_request_spec.rb index 18dcdf1..0010071 100644 --- a/spec/models/revoke_token_request_spec.rb +++ b/spec/models/revoke_token_request_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::RevokeTokenRequest +# Unit tests for OneLogin::RevokeTokenRequest # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::RevokeTokenRequest do - let(:instance) { OpenapiClient::RevokeTokenRequest.new } +describe OneLogin::RevokeTokenRequest do + let(:instance) { OneLogin::RevokeTokenRequest.new } describe 'test an instance of RevokeTokenRequest' do it 'should create an instance of RevokeTokenRequest' do - expect(instance).to be_instance_of(OpenapiClient::RevokeTokenRequest) + expect(instance).to be_instance_of(OneLogin::RevokeTokenRequest) end end describe 'test attribute "access_token"' do diff --git a/spec/models/risk_device_spec.rb b/spec/models/risk_device_spec.rb index 494b9b0..8c852b9 100644 --- a/spec/models/risk_device_spec.rb +++ b/spec/models/risk_device_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::RiskDevice +# Unit tests for OneLogin::RiskDevice # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::RiskDevice do - let(:instance) { OpenapiClient::RiskDevice.new } +describe OneLogin::RiskDevice do + let(:instance) { OneLogin::RiskDevice.new } describe 'test an instance of RiskDevice' do it 'should create an instance of RiskDevice' do - expect(instance).to be_instance_of(OpenapiClient::RiskDevice) + expect(instance).to be_instance_of(OneLogin::RiskDevice) end end describe 'test attribute "id"' do diff --git a/spec/models/risk_rule_spec.rb b/spec/models/risk_rule_spec.rb index 5bed3c0..414ffaa 100644 --- a/spec/models/risk_rule_spec.rb +++ b/spec/models/risk_rule_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::RiskRule +# Unit tests for OneLogin::RiskRule # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::RiskRule do - let(:instance) { OpenapiClient::RiskRule.new } +describe OneLogin::RiskRule do + let(:instance) { OneLogin::RiskRule.new } describe 'test an instance of RiskRule' do it 'should create an instance of RiskRule' do - expect(instance).to be_instance_of(OpenapiClient::RiskRule) + expect(instance).to be_instance_of(OneLogin::RiskRule) end end describe 'test attribute "id"' do diff --git a/spec/models/risk_user_spec.rb b/spec/models/risk_user_spec.rb index 38cd2c4..3c7738e 100644 --- a/spec/models/risk_user_spec.rb +++ b/spec/models/risk_user_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::RiskUser +# Unit tests for OneLogin::RiskUser # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::RiskUser do - let(:instance) { OpenapiClient::RiskUser.new } +describe OneLogin::RiskUser do + let(:instance) { OneLogin::RiskUser.new } describe 'test an instance of RiskUser' do it 'should create an instance of RiskUser' do - expect(instance).to be_instance_of(OpenapiClient::RiskUser) + expect(instance).to be_instance_of(OneLogin::RiskUser) end end describe 'test attribute "id"' do diff --git a/spec/models/role_spec.rb b/spec/models/role_spec.rb index 275a8d2..c925e0f 100644 --- a/spec/models/role_spec.rb +++ b/spec/models/role_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::Role +# Unit tests for OneLogin::Role # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::Role do - let(:instance) { OpenapiClient::Role.new } +describe OneLogin::Role do + let(:instance) { OneLogin::Role.new } describe 'test an instance of Role' do it 'should create an instance of Role' do - expect(instance).to be_instance_of(OpenapiClient::Role) + expect(instance).to be_instance_of(OneLogin::Role) end end describe 'test attribute "id"' do diff --git a/spec/models/rule_id_spec.rb b/spec/models/rule_id_spec.rb index 6034625..4dee94e 100644 --- a/spec/models/rule_id_spec.rb +++ b/spec/models/rule_id_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::RuleId +# Unit tests for OneLogin::RuleId # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::RuleId do - let(:instance) { OpenapiClient::RuleId.new } +describe OneLogin::RuleId do + let(:instance) { OneLogin::RuleId.new } describe 'test an instance of RuleId' do it 'should create an instance of RuleId' do - expect(instance).to be_instance_of(OpenapiClient::RuleId) + expect(instance).to be_instance_of(OneLogin::RuleId) end end describe 'test attribute "id"' do diff --git a/spec/models/rule_spec.rb b/spec/models/rule_spec.rb index b5aa7d6..31e932e 100644 --- a/spec/models/rule_spec.rb +++ b/spec/models/rule_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::Rule +# Unit tests for OneLogin::Rule # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::Rule do - let(:instance) { OpenapiClient::Rule.new } +describe OneLogin::Rule do + let(:instance) { OneLogin::Rule.new } describe 'test an instance of Rule' do it 'should create an instance of Rule' do - expect(instance).to be_instance_of(OpenapiClient::Rule) + expect(instance).to be_instance_of(OneLogin::Rule) end end describe 'test attribute "id"' do diff --git a/spec/models/schema1_added_by_spec.rb b/spec/models/schema1_added_by_spec.rb index ab94a41..3f72aec 100644 --- a/spec/models/schema1_added_by_spec.rb +++ b/spec/models/schema1_added_by_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::Schema1AddedBy +# Unit tests for OneLogin::Schema1AddedBy # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::Schema1AddedBy do - let(:instance) { OpenapiClient::Schema1AddedBy.new } +describe OneLogin::Schema1AddedBy do + let(:instance) { OneLogin::Schema1AddedBy.new } describe 'test an instance of Schema1AddedBy' do it 'should create an instance of Schema1AddedBy' do - expect(instance).to be_instance_of(OpenapiClient::Schema1AddedBy) + expect(instance).to be_instance_of(OneLogin::Schema1AddedBy) end end describe 'test attribute "id"' do diff --git a/spec/models/schema1_spec.rb b/spec/models/schema1_spec.rb index c13316b..15010a4 100644 --- a/spec/models/schema1_spec.rb +++ b/spec/models/schema1_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::Schema1 +# Unit tests for OneLogin::Schema1 # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::Schema1 do - let(:instance) { OpenapiClient::Schema1.new } +describe OneLogin::Schema1 do + let(:instance) { OneLogin::Schema1.new } describe 'test an instance of Schema1' do it 'should create an instance of Schema1' do - expect(instance).to be_instance_of(OpenapiClient::Schema1) + expect(instance).to be_instance_of(OneLogin::Schema1) end end describe 'test attribute "id"' do diff --git a/spec/models/schema_provisioning_spec.rb b/spec/models/schema_provisioning_spec.rb index 190f247..ad6b75c 100644 --- a/spec/models/schema_provisioning_spec.rb +++ b/spec/models/schema_provisioning_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::SchemaProvisioning +# Unit tests for OneLogin::SchemaProvisioning # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::SchemaProvisioning do - let(:instance) { OpenapiClient::SchemaProvisioning.new } +describe OneLogin::SchemaProvisioning do + let(:instance) { OneLogin::SchemaProvisioning.new } describe 'test an instance of SchemaProvisioning' do it 'should create an instance of SchemaProvisioning' do - expect(instance).to be_instance_of(OpenapiClient::SchemaProvisioning) + expect(instance).to be_instance_of(OneLogin::SchemaProvisioning) end end describe 'test attribute "enabled"' do diff --git a/spec/models/schema_spec.rb b/spec/models/schema_spec.rb index 09f1746..efb9e97 100644 --- a/spec/models/schema_spec.rb +++ b/spec/models/schema_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::Schema +# Unit tests for OneLogin::Schema # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::Schema do - let(:instance) { OpenapiClient::Schema.new } +describe OneLogin::Schema do + let(:instance) { OneLogin::Schema.new } describe 'test an instance of Schema' do it 'should create an instance of Schema' do - expect(instance).to be_instance_of(OpenapiClient::Schema) + expect(instance).to be_instance_of(OneLogin::Schema) end end describe 'test attribute "id"' do diff --git a/spec/models/session_spec.rb b/spec/models/session_spec.rb index 2390535..35e4595 100644 --- a/spec/models/session_spec.rb +++ b/spec/models/session_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::Session +# Unit tests for OneLogin::Session # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::Session do - let(:instance) { OpenapiClient::Session.new } +describe OneLogin::Session do + let(:instance) { OneLogin::Session.new } describe 'test an instance of Session' do it 'should create an instance of Session' do - expect(instance).to be_instance_of(OpenapiClient::Session) + expect(instance).to be_instance_of(OneLogin::Session) end end describe 'test attribute "id"' do diff --git a/spec/models/set_role_apps200_response_inner_spec.rb b/spec/models/set_role_apps200_response_inner_spec.rb index 76943ff..8d58ed6 100644 --- a/spec/models/set_role_apps200_response_inner_spec.rb +++ b/spec/models/set_role_apps200_response_inner_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::SetRoleApps200ResponseInner +# Unit tests for OneLogin::SetRoleApps200ResponseInner # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::SetRoleApps200ResponseInner do - let(:instance) { OpenapiClient::SetRoleApps200ResponseInner.new } +describe OneLogin::SetRoleApps200ResponseInner do + let(:instance) { OneLogin::SetRoleApps200ResponseInner.new } describe 'test an instance of SetRoleApps200ResponseInner' do it 'should create an instance of SetRoleApps200ResponseInner' do - expect(instance).to be_instance_of(OpenapiClient::SetRoleApps200ResponseInner) + expect(instance).to be_instance_of(OneLogin::SetRoleApps200ResponseInner) end end describe 'test attribute "id"' do diff --git a/spec/models/source_spec.rb b/spec/models/source_spec.rb index db84eec..8f70159 100644 --- a/spec/models/source_spec.rb +++ b/spec/models/source_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::Source +# Unit tests for OneLogin::Source # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::Source do - let(:instance) { OpenapiClient::Source.new } +describe OneLogin::Source do + let(:instance) { OneLogin::Source.new } describe 'test an instance of Source' do it 'should create an instance of Source' do - expect(instance).to be_instance_of(OpenapiClient::Source) + expect(instance).to be_instance_of(OneLogin::Source) end end describe 'test attribute "id"' do diff --git a/spec/models/status1_spec.rb b/spec/models/status1_spec.rb index baec350..198e34e 100644 --- a/spec/models/status1_spec.rb +++ b/spec/models/status1_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::Status1 +# Unit tests for OneLogin::Status1 # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::Status1 do - let(:instance) { OpenapiClient::Status1.new } +describe OneLogin::Status1 do + let(:instance) { OneLogin::Status1.new } describe 'test an instance of Status1' do it 'should create an instance of Status1' do - expect(instance).to be_instance_of(OpenapiClient::Status1) + expect(instance).to be_instance_of(OneLogin::Status1) end end describe 'test attribute "message"' do diff --git a/spec/models/status2_spec.rb b/spec/models/status2_spec.rb index 2391f5a..31e5f90 100644 --- a/spec/models/status2_spec.rb +++ b/spec/models/status2_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::Status2 +# Unit tests for OneLogin::Status2 # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::Status2 do - let(:instance) { OpenapiClient::Status2.new } +describe OneLogin::Status2 do + let(:instance) { OneLogin::Status2.new } describe 'test an instance of Status2' do it 'should create an instance of Status2' do - expect(instance).to be_instance_of(OpenapiClient::Status2) + expect(instance).to be_instance_of(OneLogin::Status2) end end describe 'test attribute "status"' do diff --git a/spec/models/status2_status_spec.rb b/spec/models/status2_status_spec.rb index 90ff951..ce52e76 100644 --- a/spec/models/status2_status_spec.rb +++ b/spec/models/status2_status_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::Status2Status +# Unit tests for OneLogin::Status2Status # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::Status2Status do - let(:instance) { OpenapiClient::Status2Status.new } +describe OneLogin::Status2Status do + let(:instance) { OneLogin::Status2Status.new } describe 'test an instance of Status2Status' do it 'should create an instance of Status2Status' do - expect(instance).to be_instance_of(OpenapiClient::Status2Status) + expect(instance).to be_instance_of(OneLogin::Status2Status) end end describe 'test attribute "type"' do diff --git a/spec/models/status_spec.rb b/spec/models/status_spec.rb index 292dcc9..26452b3 100644 --- a/spec/models/status_spec.rb +++ b/spec/models/status_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::Status +# Unit tests for OneLogin::Status # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::Status do - let(:instance) { OpenapiClient::Status.new } +describe OneLogin::Status do + let(:instance) { OneLogin::Status.new } describe 'test an instance of Status' do it 'should create an instance of Status' do - expect(instance).to be_instance_of(OpenapiClient::Status) + expect(instance).to be_instance_of(OneLogin::Status) end end describe 'test attribute "error"' do diff --git a/spec/models/track_event_request_spec.rb b/spec/models/track_event_request_spec.rb index c8e5906..4514625 100644 --- a/spec/models/track_event_request_spec.rb +++ b/spec/models/track_event_request_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::TrackEventRequest +# Unit tests for OneLogin::TrackEventRequest # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::TrackEventRequest do - let(:instance) { OpenapiClient::TrackEventRequest.new } +describe OneLogin::TrackEventRequest do + let(:instance) { OneLogin::TrackEventRequest.new } describe 'test an instance of TrackEventRequest' do it 'should create an instance of TrackEventRequest' do - expect(instance).to be_instance_of(OpenapiClient::TrackEventRequest) + expect(instance).to be_instance_of(OneLogin::TrackEventRequest) end end describe 'test attribute "verb"' do diff --git a/spec/models/update_authorization_server400_response_spec.rb b/spec/models/update_authorization_server400_response_spec.rb index b2edd9e..08963f1 100644 --- a/spec/models/update_authorization_server400_response_spec.rb +++ b/spec/models/update_authorization_server400_response_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::UpdateAuthorizationServer400Response +# Unit tests for OneLogin::UpdateAuthorizationServer400Response # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::UpdateAuthorizationServer400Response do - let(:instance) { OpenapiClient::UpdateAuthorizationServer400Response.new } +describe OneLogin::UpdateAuthorizationServer400Response do + let(:instance) { OneLogin::UpdateAuthorizationServer400Response.new } describe 'test an instance of UpdateAuthorizationServer400Response' do it 'should create an instance of UpdateAuthorizationServer400Response' do - expect(instance).to be_instance_of(OpenapiClient::UpdateAuthorizationServer400Response) + expect(instance).to be_instance_of(OneLogin::UpdateAuthorizationServer400Response) end end describe 'test attribute "field"' do diff --git a/spec/models/update_client_app_request_spec.rb b/spec/models/update_client_app_request_spec.rb index 75a1fbc..6075bcd 100644 --- a/spec/models/update_client_app_request_spec.rb +++ b/spec/models/update_client_app_request_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::UpdateClientAppRequest +# Unit tests for OneLogin::UpdateClientAppRequest # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::UpdateClientAppRequest do - let(:instance) { OpenapiClient::UpdateClientAppRequest.new } +describe OneLogin::UpdateClientAppRequest do + let(:instance) { OneLogin::UpdateClientAppRequest.new } describe 'test an instance of UpdateClientAppRequest' do it 'should create an instance of UpdateClientAppRequest' do - expect(instance).to be_instance_of(OpenapiClient::UpdateClientAppRequest) + expect(instance).to be_instance_of(OneLogin::UpdateClientAppRequest) end end describe 'test attribute "scopes"' do diff --git a/spec/models/update_environment_variable_request_spec.rb b/spec/models/update_environment_variable_request_spec.rb index 5a791a5..2294b90 100644 --- a/spec/models/update_environment_variable_request_spec.rb +++ b/spec/models/update_environment_variable_request_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::UpdateEnvironmentVariableRequest +# Unit tests for OneLogin::UpdateEnvironmentVariableRequest # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::UpdateEnvironmentVariableRequest do - let(:instance) { OpenapiClient::UpdateEnvironmentVariableRequest.new } +describe OneLogin::UpdateEnvironmentVariableRequest do + let(:instance) { OneLogin::UpdateEnvironmentVariableRequest.new } describe 'test an instance of UpdateEnvironmentVariableRequest' do it 'should create an instance of UpdateEnvironmentVariableRequest' do - expect(instance).to be_instance_of(OpenapiClient::UpdateEnvironmentVariableRequest) + expect(instance).to be_instance_of(OneLogin::UpdateEnvironmentVariableRequest) end end describe 'test attribute "value"' do diff --git a/spec/models/update_role200_response_spec.rb b/spec/models/update_role200_response_spec.rb index eda0cc4..b91e45a 100644 --- a/spec/models/update_role200_response_spec.rb +++ b/spec/models/update_role200_response_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::UpdateRole200Response +# Unit tests for OneLogin::UpdateRole200Response # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::UpdateRole200Response do - let(:instance) { OpenapiClient::UpdateRole200Response.new } +describe OneLogin::UpdateRole200Response do + let(:instance) { OneLogin::UpdateRole200Response.new } describe 'test an instance of UpdateRole200Response' do it 'should create an instance of UpdateRole200Response' do - expect(instance).to be_instance_of(OpenapiClient::UpdateRole200Response) + expect(instance).to be_instance_of(OneLogin::UpdateRole200Response) end end describe 'test attribute "id"' do diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 37cde63..fc0cc2b 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::User +# Unit tests for OneLogin::User # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::User do - let(:instance) { OpenapiClient::User.new } +describe OneLogin::User do + let(:instance) { OneLogin::User.new } describe 'test an instance of User' do it 'should create an instance of User' do - expect(instance).to be_instance_of(OpenapiClient::User) + expect(instance).to be_instance_of(OneLogin::User) end end describe 'test attribute "id"' do diff --git a/spec/models/verify_enrollment_request_spec.rb b/spec/models/verify_enrollment_request_spec.rb index 1484ead..3da0c11 100644 --- a/spec/models/verify_enrollment_request_spec.rb +++ b/spec/models/verify_enrollment_request_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::VerifyEnrollmentRequest +# Unit tests for OneLogin::VerifyEnrollmentRequest # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::VerifyEnrollmentRequest do - let(:instance) { OpenapiClient::VerifyEnrollmentRequest.new } +describe OneLogin::VerifyEnrollmentRequest do + let(:instance) { OneLogin::VerifyEnrollmentRequest.new } describe 'test an instance of VerifyEnrollmentRequest' do it 'should create an instance of VerifyEnrollmentRequest' do - expect(instance).to be_instance_of(OpenapiClient::VerifyEnrollmentRequest) + expect(instance).to be_instance_of(OneLogin::VerifyEnrollmentRequest) end end describe 'test attribute "otp"' do diff --git a/spec/models/verify_factor_request_spec.rb b/spec/models/verify_factor_request_spec.rb index ccb34f7..7844488 100644 --- a/spec/models/verify_factor_request_spec.rb +++ b/spec/models/verify_factor_request_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::VerifyFactorRequest +# Unit tests for OneLogin::VerifyFactorRequest # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::VerifyFactorRequest do - let(:instance) { OpenapiClient::VerifyFactorRequest.new } +describe OneLogin::VerifyFactorRequest do + let(:instance) { OneLogin::VerifyFactorRequest.new } describe 'test an instance of VerifyFactorRequest' do it 'should create an instance of VerifyFactorRequest' do - expect(instance).to be_instance_of(OpenapiClient::VerifyFactorRequest) + expect(instance).to be_instance_of(OneLogin::VerifyFactorRequest) end end describe 'test attribute "otp"' do diff --git a/spec/models/verify_factor_saml200_response_spec.rb b/spec/models/verify_factor_saml200_response_spec.rb index a37f207..45b4b80 100644 --- a/spec/models/verify_factor_saml200_response_spec.rb +++ b/spec/models/verify_factor_saml200_response_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::VerifyFactorSaml200Response +# Unit tests for OneLogin::VerifyFactorSaml200Response # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::VerifyFactorSaml200Response do - let(:instance) { OpenapiClient::VerifyFactorSaml200Response.new } +describe OneLogin::VerifyFactorSaml200Response do + let(:instance) { OneLogin::VerifyFactorSaml200Response.new } describe 'test an instance of VerifyFactorSaml200Response' do it 'should create an instance of VerifyFactorSaml200Response' do - expect(instance).to be_instance_of(OpenapiClient::VerifyFactorSaml200Response) + expect(instance).to be_instance_of(OneLogin::VerifyFactorSaml200Response) end end describe 'test attribute "data"' do diff --git a/spec/models/verify_factor_saml_request_spec.rb b/spec/models/verify_factor_saml_request_spec.rb index 5a617e5..206729b 100644 --- a/spec/models/verify_factor_saml_request_spec.rb +++ b/spec/models/verify_factor_saml_request_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::VerifyFactorSamlRequest +# Unit tests for OneLogin::VerifyFactorSamlRequest # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::VerifyFactorSamlRequest do - let(:instance) { OpenapiClient::VerifyFactorSamlRequest.new } +describe OneLogin::VerifyFactorSamlRequest do + let(:instance) { OneLogin::VerifyFactorSamlRequest.new } describe 'test an instance of VerifyFactorSamlRequest' do it 'should create an instance of VerifyFactorSamlRequest' do - expect(instance).to be_instance_of(OpenapiClient::VerifyFactorSamlRequest) + expect(instance).to be_instance_of(OneLogin::VerifyFactorSamlRequest) end end describe 'test attribute "app_id"' do diff --git a/spec/models/verify_factor_voice200_response_inner_spec.rb b/spec/models/verify_factor_voice200_response_inner_spec.rb index b78d411..23e9b80 100644 --- a/spec/models/verify_factor_voice200_response_inner_spec.rb +++ b/spec/models/verify_factor_voice200_response_inner_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OpenapiClient::VerifyFactorVoice200ResponseInner +# Unit tests for OneLogin::VerifyFactorVoice200ResponseInner # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OpenapiClient::VerifyFactorVoice200ResponseInner do - let(:instance) { OpenapiClient::VerifyFactorVoice200ResponseInner.new } +describe OneLogin::VerifyFactorVoice200ResponseInner do + let(:instance) { OneLogin::VerifyFactorVoice200ResponseInner.new } describe 'test an instance of VerifyFactorVoice200ResponseInner' do it 'should create an instance of VerifyFactorVoice200ResponseInner' do - expect(instance).to be_instance_of(OpenapiClient::VerifyFactorVoice200ResponseInner) + expect(instance).to be_instance_of(OneLogin::VerifyFactorVoice200ResponseInner) end end describe 'test attribute "id"' do diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index d6ff63d..b4a5307 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -11,7 +11,7 @@ =end # load the gem -require 'openapi_client' +require 'onelogin' # The following was generated by the `rspec --init` command. Conventionally, all # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`. From d5f4b7e61b23e92bc2a1cabf1858fccfd36385d6 Mon Sep 17 00:00:00 2001 From: George Khaburzaniya Date: Thu, 11 Aug 2022 14:09:59 -0700 Subject: [PATCH 4/4] Update version in version.rb --- lib/onelogin/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/onelogin/version.rb b/lib/onelogin/version.rb index 6a75711..4117e2d 100644 --- a/lib/onelogin/version.rb +++ b/lib/onelogin/version.rb @@ -11,5 +11,5 @@ =end module OneLogin - VERSION = '1.0.0' + VERSION = '3.0.0-alpha.1' end