passbase 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +15 -5
- data/README.md +8 -8
- data/docs/Cursor.md +8 -7
- data/docs/Identity.md +24 -21
- data/docs/IdentityApi.md +155 -71
- data/docs/IdentityOwner.md +12 -11
- data/docs/IdentityResource.md +10 -9
- data/docs/PaginatedIdentities.md +10 -9
- data/docs/PaginatedResources.md +10 -9
- data/docs/ProjectApi.md +29 -12
- data/docs/ProjectSettings.md +18 -17
- data/docs/ProjectSettingsCustomizations.md +12 -11
- data/docs/ProjectSettingsVerificationSteps.md +10 -9
- data/docs/Resource.md +18 -17
- data/docs/ResourceFile.md +14 -13
- data/docs/ResourceInput.md +16 -15
- data/docs/User.md +12 -11
- data/docs/WatchlistResponse.md +16 -15
- data/lib/passbase.rb +1 -1
- data/lib/passbase/api/identity_api.rb +21 -16
- data/lib/passbase/api/project_api.rb +5 -4
- data/lib/passbase/api_client.rb +42 -51
- data/lib/passbase/api_error.rb +1 -1
- data/lib/passbase/configuration.rb +42 -13
- data/lib/passbase/models/cursor.rb +18 -8
- data/lib/passbase/models/identity.rb +29 -9
- data/lib/passbase/models/identity_owner.rb +18 -8
- data/lib/passbase/models/identity_resource.rb +18 -8
- data/lib/passbase/models/paginated_identities.rb +18 -8
- data/lib/passbase/models/paginated_resources.rb +18 -8
- data/lib/passbase/models/project_settings.rb +18 -8
- data/lib/passbase/models/project_settings_customizations.rb +18 -8
- data/lib/passbase/models/project_settings_verification_steps.rb +18 -8
- data/lib/passbase/models/resource.rb +18 -8
- data/lib/passbase/models/resource_file.rb +18 -8
- data/lib/passbase/models/resource_input.rb +18 -8
- data/lib/passbase/models/user.rb +18 -8
- data/lib/passbase/models/watchlist_response.rb +18 -8
- data/lib/passbase/version.rb +3 -3
- data/passbase.gemspec +4 -4
- data/spec/api/identity_api_spec.rb +1 -1
- data/spec/api/project_api_spec.rb +1 -1
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +4 -4
- data/spec/models/cursor_spec.rb +4 -11
- data/spec/models/identity_owner_spec.rb +4 -11
- data/spec/models/identity_resource_spec.rb +4 -11
- data/spec/models/identity_spec.rb +11 -12
- data/spec/models/paginated_identities_spec.rb +4 -11
- data/spec/models/paginated_resources_spec.rb +4 -11
- data/spec/models/project_settings_customizations_spec.rb +4 -11
- data/spec/models/project_settings_spec.rb +5 -12
- data/spec/models/project_settings_verification_steps_spec.rb +4 -11
- data/spec/models/resource_file_spec.rb +4 -11
- data/spec/models/resource_input_spec.rb +4 -11
- data/spec/models/resource_spec.rb +5 -12
- data/spec/models/user_spec.rb +4 -11
- data/spec/models/watchlist_response_spec.rb +4 -11
- data/spec/spec_helper.rb +1 -1
- data/vendor/bundle/ruby/2.7.0/bin/htmldiff +1 -1
- data/vendor/bundle/ruby/2.7.0/bin/ldiff +1 -1
- data/vendor/bundle/ruby/2.7.0/cache/faraday-1.4.2.gem +0 -0
- data/vendor/bundle/ruby/2.7.0/cache/faraday-em_http-1.0.0.gem +0 -0
- data/vendor/bundle/ruby/2.7.0/cache/faraday-em_synchrony-1.0.0.gem +0 -0
- data/vendor/bundle/ruby/2.7.0/cache/faraday-excon-1.1.0.gem +0 -0
- data/vendor/bundle/ruby/2.7.0/cache/faraday-net_http-1.0.1.gem +0 -0
- data/vendor/bundle/ruby/2.7.0/cache/faraday-net_http_persistent-1.1.0.gem +0 -0
- data/vendor/bundle/ruby/2.7.0/cache/ruby2_keywords-0.0.4.gem +0 -0
- data/vendor/bundle/ruby/2.7.0/extensions/x86_64-linux/2.7.0/byebug-11.1.3/byebug/byebug.so +0 -0
- data/vendor/bundle/ruby/2.7.0/extensions/x86_64-linux/{2.7.0-static → 2.7.0}/byebug-11.1.3/gem.build_complete +0 -0
- data/vendor/bundle/ruby/2.7.0/extensions/x86_64-linux/{2.7.0-static → 2.7.0}/byebug-11.1.3/gem_make.out +2 -2
- data/vendor/bundle/ruby/2.7.0/extensions/x86_64-linux/{2.7.0-static → 2.7.0}/jaro_winkler-1.5.4/gem.build_complete +0 -0
- data/vendor/bundle/ruby/2.7.0/extensions/x86_64-linux/2.7.0/jaro_winkler-1.5.4/gem_make.out +67 -0
- data/vendor/bundle/ruby/2.7.0/extensions/x86_64-linux/2.7.0/jaro_winkler-1.5.4/jaro_winkler/jaro_winkler_ext.so +0 -0
- data/vendor/bundle/ruby/2.7.0/extensions/x86_64-linux/{2.7.0-static → 2.7.0}/psych-3.2.0/gem.build_complete +0 -0
- data/vendor/bundle/ruby/2.7.0/extensions/x86_64-linux/{2.7.0-static → 2.7.0}/psych-3.2.0/gem_make.out +2 -2
- data/vendor/bundle/ruby/2.7.0/extensions/x86_64-linux/2.7.0/psych-3.2.0/mkmf.log +196 -0
- data/vendor/bundle/ruby/2.7.0/extensions/x86_64-linux/2.7.0/psych-3.2.0/psych.so +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/byebug-11.1.3/ext/byebug/Makefile +13 -13
- data/vendor/bundle/ruby/2.7.0/gems/byebug-11.1.3/ext/byebug/breakpoint.o +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/byebug-11.1.3/ext/byebug/byebug.o +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/byebug-11.1.3/ext/byebug/byebug.so +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/byebug-11.1.3/ext/byebug/context.o +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/byebug-11.1.3/ext/byebug/locker.o +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/byebug-11.1.3/ext/byebug/threads.o +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/byebug-11.1.3/lib/byebug/byebug.so +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/CHANGELOG.md +104 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/LICENSE.md +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/README.md +1 -2
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/Rakefile +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/examples/client_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/examples/client_test.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/lib/faraday.rb +55 -41
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/lib/faraday/adapter.rb +0 -8
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/lib/faraday/adapter/httpclient.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/lib/faraday/adapter/patron.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/lib/faraday/adapter/rack.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/lib/faraday/adapter/test.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/lib/faraday/adapter/typhoeus.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/lib/faraday/adapter_registry.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/lib/faraday/autoload.rb +0 -5
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/lib/faraday/connection.rb +8 -1
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/lib/faraday/dependency_loader.rb +1 -3
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/lib/faraday/encoders/flat_params_encoder.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/lib/faraday/encoders/nested_params_encoder.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/lib/faraday/error.rb +12 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/lib/faraday/file_part.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/lib/faraday/logging/formatter.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/faraday-1.4.2/lib/faraday/methods.rb +6 -0
- data/vendor/bundle/ruby/2.7.0/gems/faraday-1.4.2/lib/faraday/middleware.rb +31 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/lib/faraday/middleware_registry.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/lib/faraday/options.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/lib/faraday/options/connection_options.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/lib/faraday/options/env.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/lib/faraday/options/proxy_options.rb +4 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/lib/faraday/options/request_options.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/lib/faraday/options/ssl_options.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/lib/faraday/param_part.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/lib/faraday/parameters.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/lib/faraday/rack_builder.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/lib/faraday/request.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/lib/faraday/request/authorization.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/lib/faraday/request/basic_authentication.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/lib/faraday/request/instrumentation.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/lib/faraday/request/multipart.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/lib/faraday/request/retry.rb +2 -2
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/lib/faraday/request/token_authentication.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/lib/faraday/request/url_encoded.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/lib/faraday/response.rb +0 -6
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/lib/faraday/response/logger.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/lib/faraday/response/raise_error.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/lib/faraday/utils.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/lib/faraday/utils/headers.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/lib/faraday/utils/params_hash.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/faraday-1.4.2/lib/faraday/version.rb +5 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/spec/external_adapters/faraday_specs_setup.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/spec/faraday/adapter/em_http_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/spec/faraday/adapter/em_synchrony_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/spec/faraday/adapter/excon_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/spec/faraday/adapter/httpclient_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/spec/faraday/adapter/net_http_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/spec/faraday/adapter/patron_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/spec/faraday/adapter/rack_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/spec/faraday/adapter/test_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/spec/faraday/adapter/typhoeus_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/spec/faraday/adapter_registry_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/spec/faraday/adapter_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/spec/faraday/composite_read_io_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/spec/faraday/connection_spec.rb +38 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/spec/faraday/error_spec.rb +15 -0
- data/vendor/bundle/ruby/2.7.0/gems/faraday-1.4.2/spec/faraday/middleware_spec.rb +52 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/spec/faraday/options/env_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/spec/faraday/options/options_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/spec/faraday/options/proxy_options_spec.rb +7 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/spec/faraday/options/request_options_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/spec/faraday/params_encoders/flat_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/spec/faraday/params_encoders/nested_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/spec/faraday/rack_builder_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/spec/faraday/request/authorization_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/spec/faraday/request/instrumentation_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/spec/faraday/request/multipart_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/spec/faraday/request/retry_spec.rb +1 -1
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/spec/faraday/request/url_encoded_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/spec/faraday/request_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/spec/faraday/response/logger_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/spec/faraday/response/middleware_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/spec/faraday/response/raise_error_spec.rb +30 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/spec/faraday/response_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/spec/faraday/utils/headers_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/spec/faraday/utils_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/spec/faraday_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/spec/spec_helper.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/spec/support/disabling_stub.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/spec/support/fake_safe_buffer.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/spec/support/helper_methods.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/spec/support/shared_examples/adapter.rb +2 -1
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/spec/support/shared_examples/params_encoder.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/spec/support/shared_examples/request_method.rb +36 -8
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/spec/support/streaming_response_checker.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-1.4.2}/spec/support/webmock_rack_app.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/faraday-em_http-1.0.0/LICENSE.md +21 -0
- data/vendor/bundle/ruby/2.7.0/gems/faraday-em_http-1.0.0/README.md +61 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-em_http-1.0.0}/lib/faraday/adapter/em_http.rb +22 -19
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-em_http-1.0.0}/lib/faraday/adapter/em_http_ssl_patch.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/faraday-em_http-1.0.0/lib/faraday/em_http.rb +11 -0
- data/vendor/bundle/ruby/2.7.0/gems/faraday-em_http-1.0.0/lib/faraday/em_http/version.rb +7 -0
- data/vendor/bundle/ruby/2.7.0/gems/faraday-em_synchrony-1.0.0/LICENSE.md +21 -0
- data/vendor/bundle/ruby/2.7.0/gems/faraday-em_synchrony-1.0.0/README.md +65 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-em_synchrony-1.0.0}/lib/faraday/adapter/em_synchrony.rb +16 -13
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-em_synchrony-1.0.0}/lib/faraday/adapter/em_synchrony/parallel_manager.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/faraday-em_synchrony-1.0.0/lib/faraday/em_synchrony.rb +12 -0
- data/vendor/bundle/ruby/2.7.0/gems/faraday-em_synchrony-1.0.0/lib/faraday/em_synchrony/version.rb +7 -0
- data/vendor/bundle/ruby/2.7.0/gems/faraday-excon-1.1.0/LICENSE.md +21 -0
- data/vendor/bundle/ruby/2.7.0/gems/faraday-excon-1.1.0/README.md +61 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-excon-1.1.0}/lib/faraday/adapter/excon.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/faraday-excon-1.1.0/lib/faraday/excon.rb +11 -0
- data/vendor/bundle/ruby/2.7.0/gems/faraday-excon-1.1.0/lib/faraday/excon/version.rb +7 -0
- data/vendor/bundle/ruby/2.7.0/gems/faraday-net_http-1.0.1/LICENSE.md +21 -0
- data/vendor/bundle/ruby/2.7.0/gems/faraday-net_http-1.0.1/README.md +57 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-net_http-1.0.1}/lib/faraday/adapter/net_http.rb +21 -27
- data/vendor/bundle/ruby/2.7.0/gems/faraday-net_http-1.0.1/lib/faraday/net_http.rb +10 -0
- data/vendor/bundle/ruby/2.7.0/gems/faraday-net_http-1.0.1/lib/faraday/net_http/version.rb +7 -0
- data/vendor/bundle/ruby/2.7.0/gems/faraday-net_http_persistent-1.1.0/LICENSE.md +21 -0
- data/vendor/bundle/ruby/2.7.0/gems/faraday-net_http_persistent-1.1.0/README.md +73 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.1.0 → faraday-net_http_persistent-1.1.0}/lib/faraday/adapter/net_http_persistent.rb +11 -11
- data/vendor/bundle/ruby/2.7.0/gems/faraday-net_http_persistent-1.1.0/lib/faraday/net_http_persistent.rb +17 -0
- data/vendor/bundle/ruby/2.7.0/gems/faraday-net_http_persistent-1.1.0/lib/faraday/net_http_persistent/version.rb +7 -0
- data/vendor/bundle/ruby/2.7.0/gems/jaro_winkler-1.5.4/ext/jaro_winkler/Makefile +14 -14
- data/vendor/bundle/ruby/2.7.0/gems/jaro_winkler-1.5.4/ext/jaro_winkler/adj_matrix.o +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/jaro_winkler-1.5.4/ext/jaro_winkler/codepoints.o +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/jaro_winkler-1.5.4/ext/jaro_winkler/jaro.o +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/jaro_winkler-1.5.4/ext/jaro_winkler/jaro_winkler.o +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/jaro_winkler-1.5.4/ext/jaro_winkler/jaro_winkler_ext.so +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/jaro_winkler-1.5.4/lib/jaro_winkler/jaro_winkler_ext.so +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/psych-3.2.0/ext/psych/Makefile +14 -14
- data/vendor/bundle/ruby/2.7.0/gems/psych-3.2.0/ext/psych/api.o +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/psych-3.2.0/ext/psych/dumper.o +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/psych-3.2.0/ext/psych/emitter.o +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/psych-3.2.0/ext/psych/loader.o +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/psych-3.2.0/ext/psych/parser.o +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/psych-3.2.0/ext/psych/psych.o +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/psych-3.2.0/ext/psych/psych_emitter.o +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/psych-3.2.0/ext/psych/psych_parser.o +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/psych-3.2.0/ext/psych/psych_to_ruby.o +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/psych-3.2.0/ext/psych/psych_yaml_tree.o +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/psych-3.2.0/ext/psych/reader.o +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/psych-3.2.0/ext/psych/scanner.o +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/psych-3.2.0/ext/psych/writer.o +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/ruby2_keywords-0.0.4/LICENSE +22 -0
- data/vendor/bundle/ruby/2.7.0/gems/{ruby2_keywords-0.0.2 → ruby2_keywords-0.0.4}/README.md +18 -2
- data/vendor/bundle/ruby/2.7.0/gems/ruby2_keywords-0.0.4/lib/ruby2_keywords.rb +57 -0
- data/vendor/bundle/ruby/2.7.0/specifications/ast-2.4.1.gemspec +2 -2
- data/vendor/bundle/ruby/2.7.0/specifications/byebug-11.1.3.gemspec +2 -2
- data/vendor/bundle/ruby/2.7.0/specifications/coderay-1.1.3.gemspec +2 -2
- data/vendor/bundle/ruby/2.7.0/specifications/diff-lcs-1.4.4.gemspec +2 -2
- data/vendor/bundle/ruby/2.7.0/specifications/{faraday-1.1.0.gemspec → faraday-1.4.2.gemspec} +0 -0
- data/vendor/bundle/ruby/2.7.0/specifications/faraday-em_http-1.0.0.gemspec +52 -0
- data/vendor/bundle/ruby/2.7.0/specifications/faraday-em_synchrony-1.0.0.gemspec +56 -0
- data/vendor/bundle/ruby/2.7.0/specifications/faraday-excon-1.1.0.gemspec +52 -0
- data/vendor/bundle/ruby/2.7.0/specifications/faraday-net_http-1.0.1.gemspec +50 -0
- data/vendor/bundle/ruby/2.7.0/specifications/faraday-net_http_persistent-1.1.0.gemspec +48 -0
- data/vendor/bundle/ruby/2.7.0/specifications/jaro_winkler-1.5.4.gemspec +2 -2
- data/vendor/bundle/ruby/2.7.0/specifications/method_source-1.0.0.gemspec +2 -2
- data/vendor/bundle/ruby/2.7.0/specifications/multipart-post-2.1.1.gemspec +2 -2
- data/vendor/bundle/ruby/2.7.0/specifications/parallel-1.19.2.gemspec +2 -2
- data/vendor/bundle/ruby/2.7.0/specifications/parser-2.7.1.4.gemspec +2 -2
- data/vendor/bundle/ruby/2.7.0/specifications/pry-0.13.1.gemspec +2 -2
- data/vendor/bundle/ruby/2.7.0/specifications/pry-byebug-3.9.0.gemspec +2 -2
- data/vendor/bundle/ruby/2.7.0/specifications/psych-3.2.0.gemspec +2 -2
- data/vendor/bundle/ruby/2.7.0/specifications/rainbow-3.0.0.gemspec +2 -2
- data/vendor/bundle/ruby/2.7.0/specifications/rake-13.0.1.gemspec +2 -2
- data/vendor/bundle/ruby/2.7.0/specifications/rspec-3.9.0.gemspec +2 -2
- data/vendor/bundle/ruby/2.7.0/specifications/rspec-core-3.9.2.gemspec +2 -2
- data/vendor/bundle/ruby/2.7.0/specifications/rspec-expectations-3.9.2.gemspec +2 -2
- data/vendor/bundle/ruby/2.7.0/specifications/rspec-mocks-3.9.1.gemspec +2 -2
- data/vendor/bundle/ruby/2.7.0/specifications/rspec-support-3.9.3.gemspec +2 -2
- data/vendor/bundle/ruby/2.7.0/specifications/rubocop-0.66.0.gemspec +2 -2
- data/vendor/bundle/ruby/2.7.0/specifications/ruby-progressbar-1.10.1.gemspec +2 -2
- data/vendor/bundle/ruby/2.7.0/specifications/{ruby2_keywords-0.0.2.gemspec → ruby2_keywords-0.0.4.gemspec} +7 -6
- data/vendor/bundle/ruby/2.7.0/specifications/unicode-display_width-1.5.0.gemspec +2 -2
- data/walkthrough.md +1 -1
- metadata +171 -134
- data/vendor/bundle/ruby/2.7.0/cache/faraday-1.1.0.gem +0 -0
- data/vendor/bundle/ruby/2.7.0/cache/ruby2_keywords-0.0.2.gem +0 -0
- data/vendor/bundle/ruby/2.7.0/extensions/x86_64-linux/2.7.0-static/byebug-11.1.3/byebug/byebug.so +0 -0
- data/vendor/bundle/ruby/2.7.0/extensions/x86_64-linux/2.7.0-static/jaro_winkler-1.5.4/gem_make.out +0 -64
- data/vendor/bundle/ruby/2.7.0/extensions/x86_64-linux/2.7.0-static/jaro_winkler-1.5.4/jaro_winkler/jaro_winkler_ext.so +0 -0
- data/vendor/bundle/ruby/2.7.0/extensions/x86_64-linux/2.7.0-static/psych-3.2.0/mkmf.log +0 -197
- data/vendor/bundle/ruby/2.7.0/extensions/x86_64-linux/2.7.0-static/psych-3.2.0/psych.so +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/faraday-1.1.0/lib/faraday/middleware.rb +0 -21
- data/vendor/bundle/ruby/2.7.0/gems/faraday-1.1.0/spec/faraday/adapter/net_http_persistent_spec.rb +0 -57
- data/vendor/bundle/ruby/2.7.0/gems/faraday-1.1.0/spec/faraday/middleware_spec.rb +0 -26
- data/vendor/bundle/ruby/2.7.0/gems/ruby2_keywords-0.0.2/lib/ruby2_keywords.rb +0 -23
- data/vendor/bundle/ruby/2.7.0/gems/ruby2_keywords-0.0.2/ruby2_keywords.gemspec +0 -16
data/docs/WatchlistResponse.md
CHANGED
@@ -2,24 +2,25 @@
|
|
2
2
|
|
3
3
|
## Properties
|
4
4
|
|
5
|
-
Name | Type | Description | Notes
|
6
|
-
|
7
|
-
**clean** | **Boolean** | Indicates whether the authentication watchlist check is clean or not | [optional]
|
8
|
-
**listings** | **Object** | Watchlist check findings | [optional]
|
9
|
-
**media** | **Array<Object>** | List of media entries, with the date, title, and url parameters | [optional]
|
10
|
-
**sources** | **Array<String>** | Array of listing sources (eg. sanction lists) | [optional]
|
11
|
-
**types** | **Array<String>** | What kind of alert or warning is associated with the entity (eg. sanction, pep, warning) | [optional]
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **clean** | **Boolean** | Indicates whether the authentication watchlist check is clean or not | [optional] |
|
8
|
+
| **listings** | **Object** | Watchlist check findings | [optional] |
|
9
|
+
| **media** | **Array<Object>** | List of media entries, with the date, title, and url parameters | [optional] |
|
10
|
+
| **sources** | **Array<String>** | Array of listing sources (eg. sanction lists) | [optional] |
|
11
|
+
| **types** | **Array<String>** | What kind of alert or warning is associated with the entity (eg. sanction, pep, warning) | [optional] |
|
12
12
|
|
13
|
-
##
|
13
|
+
## Example
|
14
14
|
|
15
15
|
```ruby
|
16
|
-
require '
|
16
|
+
require 'passbase'
|
17
17
|
|
18
|
-
instance = Passbase::WatchlistResponse.new(
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
18
|
+
instance = Passbase::WatchlistResponse.new(
|
19
|
+
clean: false,
|
20
|
+
listings: {"finanstilsynet":{"url":"https://www.finanstilsynet.dk","name":"Denmark Finanstilsynet Foreign Regulators Warnings","aml_types":["warning"],"listing_started_utc":"2020-02-17T00:00:00Z"},"...":{}},
|
21
|
+
media: [{"url":"http://www.macnn.com/searchcatnext/tag/Puccini/2","title":"(no title)"}],
|
22
|
+
sources: ["african-development-bank","..."],
|
23
|
+
types: ["adverse-media","..."]
|
24
|
+
)
|
23
25
|
```
|
24
26
|
|
25
|
-
|
data/lib/passbase.rb
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.
|
9
|
+
OpenAPI Generator version: 5.2.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -57,15 +57,16 @@ module Passbase
|
|
57
57
|
form_params = opts[:form_params] || {}
|
58
58
|
|
59
59
|
# http body (model)
|
60
|
-
post_body = opts[:
|
60
|
+
post_body = opts[:debug_body]
|
61
61
|
|
62
62
|
# return_type
|
63
|
-
return_type = opts[:
|
63
|
+
return_type = opts[:debug_return_type] || 'Identity'
|
64
64
|
|
65
65
|
# auth_names
|
66
|
-
auth_names = opts[:
|
66
|
+
auth_names = opts[:debug_auth_names] || ['SecretApiKey']
|
67
67
|
|
68
68
|
new_options = opts.merge(
|
69
|
+
:operation => :"IdentityApi.get_identity_by_id",
|
69
70
|
:header_params => header_params,
|
70
71
|
:query_params => query_params,
|
71
72
|
:form_params => form_params,
|
@@ -125,15 +126,16 @@ module Passbase
|
|
125
126
|
form_params = opts[:form_params] || {}
|
126
127
|
|
127
128
|
# http body (model)
|
128
|
-
post_body = opts[:
|
129
|
+
post_body = opts[:debug_body]
|
129
130
|
|
130
131
|
# return_type
|
131
|
-
return_type = opts[:
|
132
|
+
return_type = opts[:debug_return_type] || 'Resource'
|
132
133
|
|
133
134
|
# auth_names
|
134
|
-
auth_names = opts[:
|
135
|
+
auth_names = opts[:debug_auth_names] || ['SecretApiKey']
|
135
136
|
|
136
137
|
new_options = opts.merge(
|
138
|
+
:operation => :"IdentityApi.get_identity_resource_by_id",
|
137
139
|
:header_params => header_params,
|
138
140
|
:query_params => query_params,
|
139
141
|
:form_params => form_params,
|
@@ -199,15 +201,16 @@ module Passbase
|
|
199
201
|
form_params = opts[:form_params] || {}
|
200
202
|
|
201
203
|
# http body (model)
|
202
|
-
post_body = opts[:
|
204
|
+
post_body = opts[:debug_body]
|
203
205
|
|
204
206
|
# return_type
|
205
|
-
return_type = opts[:
|
207
|
+
return_type = opts[:debug_return_type] || 'ResourceFile'
|
206
208
|
|
207
209
|
# auth_names
|
208
|
-
auth_names = opts[:
|
210
|
+
auth_names = opts[:debug_auth_names] || ['SecretApiKey']
|
209
211
|
|
210
212
|
new_options = opts.merge(
|
213
|
+
:operation => :"IdentityApi.get_identity_resource_file_by_id",
|
211
214
|
:header_params => header_params,
|
212
215
|
:query_params => query_params,
|
213
216
|
:form_params => form_params,
|
@@ -261,15 +264,16 @@ module Passbase
|
|
261
264
|
form_params = opts[:form_params] || {}
|
262
265
|
|
263
266
|
# http body (model)
|
264
|
-
post_body = opts[:
|
267
|
+
post_body = opts[:debug_body]
|
265
268
|
|
266
269
|
# return_type
|
267
|
-
return_type = opts[:
|
270
|
+
return_type = opts[:debug_return_type] || 'PaginatedIdentities'
|
268
271
|
|
269
272
|
# auth_names
|
270
|
-
auth_names = opts[:
|
273
|
+
auth_names = opts[:debug_auth_names] || ['SecretApiKey']
|
271
274
|
|
272
275
|
new_options = opts.merge(
|
276
|
+
:operation => :"IdentityApi.list_identities",
|
273
277
|
:header_params => header_params,
|
274
278
|
:query_params => query_params,
|
275
279
|
:form_params => form_params,
|
@@ -329,15 +333,16 @@ module Passbase
|
|
329
333
|
form_params = opts[:form_params] || {}
|
330
334
|
|
331
335
|
# http body (model)
|
332
|
-
post_body = opts[:
|
336
|
+
post_body = opts[:debug_body]
|
333
337
|
|
334
338
|
# return_type
|
335
|
-
return_type = opts[:
|
339
|
+
return_type = opts[:debug_return_type] || 'PaginatedResources'
|
336
340
|
|
337
341
|
# auth_names
|
338
|
-
auth_names = opts[:
|
342
|
+
auth_names = opts[:debug_auth_names] || ['SecretApiKey']
|
339
343
|
|
340
344
|
new_options = opts.merge(
|
345
|
+
:operation => :"IdentityApi.list_identity_resources",
|
341
346
|
:header_params => header_params,
|
342
347
|
:query_params => query_params,
|
343
348
|
:form_params => form_params,
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.
|
9
|
+
OpenAPI Generator version: 5.2.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -51,15 +51,16 @@ module Passbase
|
|
51
51
|
form_params = opts[:form_params] || {}
|
52
52
|
|
53
53
|
# http body (model)
|
54
|
-
post_body = opts[:
|
54
|
+
post_body = opts[:debug_body]
|
55
55
|
|
56
56
|
# return_type
|
57
|
-
return_type = opts[:
|
57
|
+
return_type = opts[:debug_return_type] || 'ProjectSettings'
|
58
58
|
|
59
59
|
# auth_names
|
60
|
-
auth_names = opts[:
|
60
|
+
auth_names = opts[:debug_auth_names] || ['SecretApiKey']
|
61
61
|
|
62
62
|
new_options = opts.merge(
|
63
|
+
:operation => :"ProjectApi.get_settings",
|
63
64
|
:header_params => header_params,
|
64
65
|
:query_params => query_params,
|
65
66
|
:form_params => form_params,
|
data/lib/passbase/api_client.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
=begin
|
2
2
|
#Verification API
|
3
3
|
|
4
|
-
## Introduction <span class=\"subtext\"> Welcome to the Passbase Verifications API docs. This documentation will help you understand our models and the Verification API with its endpoints. Based on this you can build your own system (i.e. verification) and hook it up to Passbase. In case of feedback or questions you can reach us under this email address: [developer@passbase.com](mailto:developer@passbase.com). </span> A User submits a video selfie and valid identifying __Resources__ during a __Verification__ guided by the Passbase client-side integration. Once all the necessary __Resources__ are submitted, __Data points__ are extracted, digitized, and authenticated. These Data points then becomes part of the User's __Identity__. The User then consents to share __Resources__ and/or __Data points__ from their Identity with you. This information is passed to you and can be used to make decisions about a User (e.g. activate account). This table below explains our terminology further. | Term | Description | |-----------------------------------------|-------------| | [Identity](#tag/identity_model) | A set of Data points and Resources related to and owned by one single User. This data can be accessed by you through a Verification. | | Data points | Any data about a User extracted from a Resource (E.g. Passport Number, or Age). | | [Resource](#tag/resource_model) | A source document used to generate the Data points for a User (E.g. Passport). | | [User](#tag/user_model) | The owner of an email address associated with an Identity. | | Verification | A transaction through which a User consents to share Data points with you. If the Data points you request are not already available in the User's Identity, the Passbase client will ask the User to submit the necessary Resource required to extract them. | | Re-authentication (login) | A transaction through which a User can certify the ownership of Personal data previously shared through an Authentication. | # Authentication <span class=\"subtext\"> There are two forms of authentication for the API: <br/>• API Key <br/>• Bearer JWT Token </span>
|
4
|
+
## Introduction <span class=\"subtext\"> Welcome to the Passbase Verifications API docs. This documentation will help you understand our models and the Verification API with its endpoints. Based on this you can build your own system (i.e. verification) and hook it up to Passbase. In case of feedback or questions you can reach us under this email address: [developer@passbase.com](mailto:developer@passbase.com). </span> A User submits a video selfie and valid identifying __Resources__ during a __Verification__ guided by the Passbase client-side integration. Once all the necessary __Resources__ are submitted, __Data points__ are extracted, digitized, and authenticated. These Data points then becomes part of the User's __Identity__. The User then consents to share __Resources__ and/or __Data points__ from their Identity with you. This information is passed to you and can be used to make decisions about a User (e.g. activate account). This table below explains our terminology further. | Term | Description | |-----------------------------------------|-------------| | [Identity](#tag/identity_model) | A set of Data points and Resources related to and owned by one single User. This data can be accessed by you through a Verification. | | Data points | Any data about a User extracted from a Resource (E.g. Passport Number, or Age). | | [Resource](#tag/resource_model) | A source document used to generate the Data points for a User (E.g. Passport). | | [User](#tag/user_model) | The owner of an email address associated with an Identity. | | Verification | A transaction through which a User consents to share Data points with you. If the Data points you request are not already available in the User's Identity, the Passbase client will ask the User to submit the necessary Resource required to extract them. | | Re-authentication (login) | A transaction through which a User can certify the ownership of Personal data previously shared through an Authentication. | # Authentication <span class=\"subtext\"> There are two forms of authentication for the API: <br/>• API Key <br/>• Bearer JWT Token </span>
|
5
5
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.
|
9
|
+
OpenAPI Generator version: 5.2.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -14,6 +14,7 @@ require 'date'
|
|
14
14
|
require 'json'
|
15
15
|
require 'logger'
|
16
16
|
require 'tempfile'
|
17
|
+
require 'time'
|
17
18
|
require 'faraday'
|
18
19
|
|
19
20
|
module Passbase
|
@@ -30,7 +31,7 @@ module Passbase
|
|
30
31
|
# @option config [Configuration] Configuration for initializing the object, default to Configuration.default
|
31
32
|
def initialize(config = Configuration.default)
|
32
33
|
@config = config
|
33
|
-
@user_agent = "passbase/ruby@1.
|
34
|
+
@user_agent = "passbase/ruby@1.3.0"
|
34
35
|
@default_headers = {
|
35
36
|
'Content-Type' => 'application/json',
|
36
37
|
'User-Agent' => @user_agent
|
@@ -106,7 +107,7 @@ module Passbase
|
|
106
107
|
# @option opts [Object] :body HTTP body (JSON/XML)
|
107
108
|
# @return [Typhoeus::Request] A Typhoeus Request
|
108
109
|
def build_request(http_method, path, request, opts = {})
|
109
|
-
url = build_request_url(path)
|
110
|
+
url = build_request_url(path, opts)
|
110
111
|
http_method = http_method.to_sym.downcase
|
111
112
|
|
112
113
|
header_params = @default_headers.merge(opts[:header_params] || {})
|
@@ -171,6 +172,15 @@ module Passbase
|
|
171
172
|
data
|
172
173
|
end
|
173
174
|
|
175
|
+
def download_file(request)
|
176
|
+
@stream = []
|
177
|
+
|
178
|
+
# handle streaming Responses
|
179
|
+
request.options.on_data = Proc.new do |chunk, overall_received_bytes|
|
180
|
+
@stream << chunk
|
181
|
+
end
|
182
|
+
end
|
183
|
+
|
174
184
|
# Check if the given MIME is a JSON MIME.
|
175
185
|
# JSON MIME examples:
|
176
186
|
# application/json
|
@@ -192,7 +202,25 @@ module Passbase
|
|
192
202
|
|
193
203
|
# handle file downloading - return the File instance processed in request callbacks
|
194
204
|
# note that response body is empty when the file is written in chunks in request on_body callback
|
195
|
-
|
205
|
+
if return_type == 'File'
|
206
|
+
content_disposition = response.headers['Content-Disposition']
|
207
|
+
if content_disposition && content_disposition =~ /filename=/i
|
208
|
+
filename = content_disposition[/filename=['"]?([^'"\s]+)['"]?/, 1]
|
209
|
+
prefix = sanitize_filename(filename)
|
210
|
+
else
|
211
|
+
prefix = 'download-'
|
212
|
+
end
|
213
|
+
prefix = prefix + '-' unless prefix.end_with?('-')
|
214
|
+
encoding = body.encoding
|
215
|
+
@tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding)
|
216
|
+
@tempfile.write(@stream.join.force_encoding(encoding))
|
217
|
+
@tempfile.close
|
218
|
+
@config.logger.info "Temp file written to #{@tempfile.path}, please copy the file to a proper folder "\
|
219
|
+
"with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
|
220
|
+
"will be deleted automatically with GC. It's also recommended to delete the temp file "\
|
221
|
+
"explicitly with `tempfile.delete`"
|
222
|
+
return @tempfile
|
223
|
+
end
|
196
224
|
|
197
225
|
return nil if body.nil? || body.empty?
|
198
226
|
|
@@ -207,7 +235,7 @@ module Passbase
|
|
207
235
|
begin
|
208
236
|
data = JSON.parse("[#{body}]", :symbolize_names => true)[0]
|
209
237
|
rescue JSON::ParserError => e
|
210
|
-
if %w(String Date
|
238
|
+
if %w(String Date Time).include?(return_type)
|
211
239
|
data = body
|
212
240
|
else
|
213
241
|
raise e
|
@@ -232,9 +260,9 @@ module Passbase
|
|
232
260
|
data.to_f
|
233
261
|
when 'Boolean'
|
234
262
|
data == true
|
235
|
-
when '
|
263
|
+
when 'Time'
|
236
264
|
# parse date time (expecting ISO 8601 format)
|
237
|
-
|
265
|
+
Time.parse data
|
238
266
|
when 'Date'
|
239
267
|
# parse date time (expecting ISO 8601 format)
|
240
268
|
Date.parse data
|
@@ -252,46 +280,9 @@ module Passbase
|
|
252
280
|
data.each { |k, v| hash[k] = convert_to_type(v, sub_type) }
|
253
281
|
end
|
254
282
|
else
|
255
|
-
# models
|
256
|
-
Passbase.const_get(return_type)
|
257
|
-
|
258
|
-
end
|
259
|
-
|
260
|
-
# Save response body into a file in (the defined) temporary folder, using the filename
|
261
|
-
# from the "Content-Disposition" header if provided, otherwise a random filename.
|
262
|
-
# The response body is written to the file in chunks in order to handle files which
|
263
|
-
# size is larger than maximum Ruby String or even larger than the maximum memory a Ruby
|
264
|
-
# process can use.
|
265
|
-
#
|
266
|
-
# @see Configuration#temp_folder_path
|
267
|
-
def download_file(request)
|
268
|
-
tempfile = nil
|
269
|
-
encoding = nil
|
270
|
-
request.on_headers do |response|
|
271
|
-
content_disposition = response.headers['Content-Disposition']
|
272
|
-
if content_disposition && content_disposition =~ /filename=/i
|
273
|
-
filename = content_disposition[/filename=['"]?([^'"\s]+)['"]?/, 1]
|
274
|
-
prefix = sanitize_filename(filename)
|
275
|
-
else
|
276
|
-
prefix = 'download-'
|
277
|
-
end
|
278
|
-
prefix = prefix + '-' unless prefix.end_with?('-')
|
279
|
-
encoding = response.body.encoding
|
280
|
-
tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding)
|
281
|
-
@tempfile = tempfile
|
282
|
-
end
|
283
|
-
request.on_body do |chunk|
|
284
|
-
chunk.force_encoding(encoding)
|
285
|
-
tempfile.write(chunk)
|
286
|
-
end
|
287
|
-
request.on_complete do |response|
|
288
|
-
if tempfile
|
289
|
-
tempfile.close
|
290
|
-
@config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
|
291
|
-
"with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
|
292
|
-
"will be deleted automatically with GC. It's also recommended to delete the temp file "\
|
293
|
-
"explicitly with `tempfile.delete`"
|
294
|
-
end
|
283
|
+
# models (e.g. Pet) or oneOf
|
284
|
+
klass = Passbase.const_get(return_type)
|
285
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(data) : klass.build_from_hash(data)
|
295
286
|
end
|
296
287
|
end
|
297
288
|
|
@@ -304,10 +295,10 @@ module Passbase
|
|
304
295
|
filename.gsub(/.*[\/\\]/, '')
|
305
296
|
end
|
306
297
|
|
307
|
-
def build_request_url(path)
|
298
|
+
def build_request_url(path, opts = {})
|
308
299
|
# Add leading and trailing slashes to path
|
309
300
|
path = "/#{path}".gsub(/\/+/, '/')
|
310
|
-
@config.base_url + path
|
301
|
+
@config.base_url(opts[:operation]) + path
|
311
302
|
end
|
312
303
|
|
313
304
|
# Update hearder and query params based on authentication settings.
|
@@ -322,7 +313,7 @@ module Passbase
|
|
322
313
|
case auth_setting[:in]
|
323
314
|
when 'header' then header_params[auth_setting[:key]] = auth_setting[:value]
|
324
315
|
when 'query' then query_params[auth_setting[:key]] = auth_setting[:value]
|
325
|
-
else fail ArgumentError, 'Authentication token must be in `query`
|
316
|
+
else fail ArgumentError, 'Authentication token must be in `query` or `header`'
|
326
317
|
end
|
327
318
|
end
|
328
319
|
end
|
data/lib/passbase/api_error.rb
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.
|
9
|
+
OpenAPI Generator version: 5.2.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -21,6 +21,18 @@ module Passbase
|
|
21
21
|
# Defines url base path
|
22
22
|
attr_accessor :base_path
|
23
23
|
|
24
|
+
# Define server configuration index
|
25
|
+
attr_accessor :server_index
|
26
|
+
|
27
|
+
# Define server operation configuration index
|
28
|
+
attr_accessor :server_operation_index
|
29
|
+
|
30
|
+
# Default server variables
|
31
|
+
attr_accessor :server_variables
|
32
|
+
|
33
|
+
# Default server operation variables
|
34
|
+
attr_accessor :server_operation_variables
|
35
|
+
|
24
36
|
# Defines API keys used with API Key authentications.
|
25
37
|
#
|
26
38
|
# @return [Hash] key: parameter name, value: parameter value (API key)
|
@@ -123,7 +135,11 @@ module Passbase
|
|
123
135
|
def initialize
|
124
136
|
@scheme = 'https'
|
125
137
|
@host = 'api.passbase.com'
|
126
|
-
@base_path = '/verification/
|
138
|
+
@base_path = '/verification/v2'
|
139
|
+
@server_index = 0
|
140
|
+
@server_operation_index = {}
|
141
|
+
@server_variables = {}
|
142
|
+
@server_operation_variables = {}
|
127
143
|
@api_key = {}
|
128
144
|
@api_key_prefix = {}
|
129
145
|
@timeout = 0
|
@@ -166,17 +182,23 @@ module Passbase
|
|
166
182
|
@base_path = '' if @base_path == '/'
|
167
183
|
end
|
168
184
|
|
169
|
-
|
170
|
-
|
185
|
+
# Returns base URL for specified operation based on server settings
|
186
|
+
def base_url(operation = nil)
|
187
|
+
index = server_operation_index.fetch(operation, server_index)
|
188
|
+
return "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') if index == nil
|
189
|
+
|
190
|
+
server_url(index, server_operation_variables.fetch(operation, server_variables), operation_server_settings[operation])
|
171
191
|
end
|
172
192
|
|
173
193
|
# Gets API key (with prefix if set).
|
174
194
|
# @param [String] param_name the parameter name of API key auth
|
175
|
-
def api_key_with_prefix(param_name)
|
195
|
+
def api_key_with_prefix(param_name, param_alias = nil)
|
196
|
+
key = @api_key[param_name]
|
197
|
+
key = @api_key.fetch(param_alias, key) unless param_alias.nil?
|
176
198
|
if @api_key_prefix[param_name]
|
177
|
-
"#{@api_key_prefix[param_name]} #{
|
199
|
+
"#{@api_key_prefix[param_name]} #{key}"
|
178
200
|
else
|
179
|
-
|
201
|
+
key
|
180
202
|
end
|
181
203
|
end
|
182
204
|
|
@@ -201,14 +223,14 @@ module Passbase
|
|
201
223
|
type: 'api_key',
|
202
224
|
in: 'header',
|
203
225
|
key: 'X-API-KEY',
|
204
|
-
value: api_key_with_prefix('
|
226
|
+
value: api_key_with_prefix('PublishableApiKey')
|
205
227
|
},
|
206
228
|
'SecretApiKey' =>
|
207
229
|
{
|
208
230
|
type: 'api_key',
|
209
231
|
in: 'header',
|
210
232
|
key: 'X-API-KEY',
|
211
|
-
value: api_key_with_prefix('
|
233
|
+
value: api_key_with_prefix('SecretApiKey')
|
212
234
|
},
|
213
235
|
}
|
214
236
|
end
|
@@ -217,18 +239,23 @@ module Passbase
|
|
217
239
|
def server_settings
|
218
240
|
[
|
219
241
|
{
|
220
|
-
url: "https://api.passbase.com/verification/
|
242
|
+
url: "https://api.passbase.com/verification/v2",
|
221
243
|
description: "No description provided",
|
222
244
|
}
|
223
245
|
]
|
224
246
|
end
|
225
247
|
|
248
|
+
def operation_server_settings
|
249
|
+
{
|
250
|
+
}
|
251
|
+
end
|
252
|
+
|
226
253
|
# Returns URL based on server settings
|
227
254
|
#
|
228
255
|
# @param index array index of the server settings
|
229
256
|
# @param variables hash of variable and the corresponding value
|
230
|
-
def server_url(index, variables = {})
|
231
|
-
servers = server_settings
|
257
|
+
def server_url(index, variables = {}, servers = nil)
|
258
|
+
servers = server_settings if servers == nil
|
232
259
|
|
233
260
|
# check array index out of bound
|
234
261
|
if (index < 0 || index >= servers.size)
|
@@ -238,10 +265,12 @@ module Passbase
|
|
238
265
|
server = servers[index]
|
239
266
|
url = server[:url]
|
240
267
|
|
268
|
+
return url unless server.key? :variables
|
269
|
+
|
241
270
|
# go through variable and assign a value
|
242
271
|
server[:variables].each do |name, variable|
|
243
272
|
if variables.key?(name)
|
244
|
-
if (server[:variables][name][:enum_values].include?
|
273
|
+
if (!server[:variables][name].key?(:enum_values) || server[:variables][name][:enum_values].include?(variables[name]))
|
245
274
|
url.gsub! "{" + name.to_s + "}", variables[name]
|
246
275
|
else
|
247
276
|
fail ArgumentError, "The variable `#{name}` in the server URL has invalid value #{variables[name]}. Must be #{server[:variables][name][:enum_values]}."
|