Module: DilisensePepClient
- Defined in:
- lib/dilisense_pep_client.rb,
lib/dilisense_pep_client/client.rb,
lib/dilisense_pep_client/errors.rb,
lib/dilisense_pep_client/metrics.rb,
lib/dilisense_pep_client/version.rb,
lib/dilisense_pep_client/audit_logger.rb,
lib/dilisense_pep_client/configuration.rb,
lib/dilisense_pep_client/circuit_breaker.rb
Overview
Main module for the Dilisense PEP/Sanctions screening Ruby client Provides a simple interface for screening individuals and entities against PEP (Politically Exposed Persons) and sanctions lists
Defined Under Namespace
Classes: APIError, AuditLogger, AuthenticationError, CircuitBreaker, CircuitBreakerError, Client, ComplianceError, Configuration, ConfigurationError, DataProcessingError, Error, ErrorFactory, Metrics, MetricsRegistry, NetworkError, RateLimitError, TimeoutError, ValidationError
Constant Summary collapse
- VERSION =
"0.1.1"
Class Method Summary collapse
-
.check_entity(names: nil, search_all: nil, fuzzy_search: nil) ⇒ Array<Hash>
Convenience method to screen an entity/company Delegates to the client’s check_entity method.
-
.check_individual(names: nil, search_all: nil, dob: nil, gender: nil, fuzzy_search: nil, includes: nil) ⇒ Array<Hash>
Convenience method to screen an individual Delegates to the client’s check_individual method.
-
.client ⇒ Client
Get or create the API client instance Uses singleton pattern to reuse the same client.
-
.configuration ⇒ Configuration
Access the configuration object Returns the configuration instance which holds all settings.
-
.configure {|config| ... } ⇒ Object
Configure the gem with a block This is the main way to set up the gem with your API key and preferences.
-
.reset! ⇒ nil
Reset the gem to its initial state Clears configuration and client instance Useful for testing or reconfiguration.
Class Method Details
.check_entity(names: nil, search_all: nil, fuzzy_search: nil) ⇒ Array<Hash>
Convenience method to screen an entity/company Delegates to the client’s check_entity method
93 94 95 |
# File 'lib/dilisense_pep_client.rb', line 93 def check_entity(names: nil, search_all: nil, fuzzy_search: nil) client.check_entity(names: names, search_all: search_all, fuzzy_search: fuzzy_search) end |
.check_individual(names: nil, search_all: nil, dob: nil, gender: nil, fuzzy_search: nil, includes: nil) ⇒ Array<Hash>
Convenience method to screen an individual Delegates to the client’s check_individual method
79 80 81 |
# File 'lib/dilisense_pep_client.rb', line 79 def check_individual(names: nil, search_all: nil, dob: nil, gender: nil, fuzzy_search: nil, includes: nil) client.check_individual(names: names, search_all: search_all, dob: dob, gender: gender, fuzzy_search: fuzzy_search, includes: includes) end |
.client ⇒ Client
Get or create the API client instance Uses singleton pattern to reuse the same client
58 59 60 |
# File 'lib/dilisense_pep_client.rb', line 58 def client @client ||= Client.new end |
.configuration ⇒ Configuration
Access the configuration object Returns the configuration instance which holds all settings
35 36 37 |
# File 'lib/dilisense_pep_client.rb', line 35 def configuration @configuration ||= Configuration.new end |
.configure {|config| ... } ⇒ Object
Configure the gem with a block This is the main way to set up the gem with your API key and preferences
50 51 52 |
# File 'lib/dilisense_pep_client.rb', line 50 def configure yield(configuration) end |
.reset! ⇒ nil
Reset the gem to its initial state Clears configuration and client instance Useful for testing or reconfiguration
102 103 104 105 |
# File 'lib/dilisense_pep_client.rb', line 102 def reset! @configuration = nil @client = nil end |