sc-apimatic-sdk 0.0.1
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 +7 -0
- data/LICENSE +28 -0
- data/README.md +166 -0
- data/bin/console +15 -0
- data/lib/socure_risk_os_api/api_helper.rb +10 -0
- data/lib/socure_risk_os_api/apis/base_api.rb +67 -0
- data/lib/socure_risk_os_api/apis/evaluation_api.rb +318 -0
- data/lib/socure_risk_os_api/apis/feedback_api.rb +102 -0
- data/lib/socure_risk_os_api/apis/reason_codes_api.rb +61 -0
- data/lib/socure_risk_os_api/client.rb +85 -0
- data/lib/socure_risk_os_api/configuration.rb +179 -0
- data/lib/socure_risk_os_api/exceptions/api_exception.rb +21 -0
- data/lib/socure_risk_os_api/exceptions/error_exception.rb +80 -0
- data/lib/socure_risk_os_api/http/api_response.rb +19 -0
- data/lib/socure_risk_os_api/http/auth/oauth_2.rb +53 -0
- data/lib/socure_risk_os_api/http/http_call_back.rb +10 -0
- data/lib/socure_risk_os_api/http/http_method_enum.rb +10 -0
- data/lib/socure_risk_os_api/http/http_request.rb +10 -0
- data/lib/socure_risk_os_api/http/http_response.rb +10 -0
- data/lib/socure_risk_os_api/http/proxy_settings.rb +22 -0
- data/lib/socure_risk_os_api/logging/configuration/api_logging_configuration.rb +186 -0
- data/lib/socure_risk_os_api/logging/sdk_logger.rb +17 -0
- data/lib/socure_risk_os_api/models/account.rb +206 -0
- data/lib/socure_risk_os_api/models/account1.rb +203 -0
- data/lib/socure_risk_os_api/models/account_inquiry.rb +36 -0
- data/lib/socure_risk_os_api/models/account_snapshot.rb +106 -0
- data/lib/socure_risk_os_api/models/account_view.rb +116 -0
- data/lib/socure_risk_os_api/models/actions.rb +88 -0
- data/lib/socure_risk_os_api/models/additional_context.rb +235 -0
- data/lib/socure_risk_os_api/models/additional_individual.rb +270 -0
- data/lib/socure_risk_os_api/models/address.rb +159 -0
- data/lib/socure_risk_os_api/models/address1.rb +144 -0
- data/lib/socure_risk_os_api/models/advanced_prefill.rb +168 -0
- data/lib/socure_risk_os_api/models/age_assurance.rb +163 -0
- data/lib/socure_risk_os_api/models/amount.rb +95 -0
- data/lib/socure_risk_os_api/models/api_evaluation_monitoring_request.rb +96 -0
- data/lib/socure_risk_os_api/models/api_evaluation_monitoring_response.rb +84 -0
- data/lib/socure_risk_os_api/models/api_feedback_request.rb +153 -0
- data/lib/socure_risk_os_api/models/api_reason_codes_response.rb +85 -0
- data/lib/socure_risk_os_api/models/attachment.rb +95 -0
- data/lib/socure_risk_os_api/models/bank_account_verification.rb +167 -0
- data/lib/socure_risk_os_api/models/base_model.rb +110 -0
- data/lib/socure_risk_os_api/models/business.rb +224 -0
- data/lib/socure_risk_os_api/models/business_onboarding.rb +167 -0
- data/lib/socure_risk_os_api/models/channel.rb +45 -0
- data/lib/socure_risk_os_api/models/channel1.rb +44 -0
- data/lib/socure_risk_os_api/models/code.rb +68 -0
- data/lib/socure_risk_os_api/models/consumer_onboarding.rb +167 -0
- data/lib/socure_risk_os_api/models/consumer_onboarding_patch.rb +178 -0
- data/lib/socure_risk_os_api/models/crypto_address.rb +105 -0
- data/lib/socure_risk_os_api/models/data.rb +106 -0
- data/lib/socure_risk_os_api/models/data1.rb +166 -0
- data/lib/socure_risk_os_api/models/data10.rb +166 -0
- data/lib/socure_risk_os_api/models/data2.rb +145 -0
- data/lib/socure_risk_os_api/models/data3.rb +160 -0
- data/lib/socure_risk_os_api/models/data4.rb +157 -0
- data/lib/socure_risk_os_api/models/data5.rb +154 -0
- data/lib/socure_risk_os_api/models/data6.rb +174 -0
- data/lib/socure_risk_os_api/models/data7.rb +205 -0
- data/lib/socure_risk_os_api/models/data8.rb +115 -0
- data/lib/socure_risk_os_api/models/data9.rb +130 -0
- data/lib/socure_risk_os_api/models/data_enrichment.rb +182 -0
- data/lib/socure_risk_os_api/models/decision.rb +47 -0
- data/lib/socure_risk_os_api/models/decision1.rb +48 -0
- data/lib/socure_risk_os_api/models/destination.rb +136 -0
- data/lib/socure_risk_os_api/models/device.rb +339 -0
- data/lib/socure_risk_os_api/models/disclosure_purpose.rb +29 -0
- data/lib/socure_risk_os_api/models/document_verification_config.rb +195 -0
- data/lib/socure_risk_os_api/models/docv.rb +98 -0
- data/lib/socure_risk_os_api/models/environment_name.rb +37 -0
- data/lib/socure_risk_os_api/models/eval_response_with_out_socure_data.rb +413 -0
- data/lib/socure_risk_os_api/models/eval_source.rb +38 -0
- data/lib/socure_risk_os_api/models/event_category.rb +45 -0
- data/lib/socure_risk_os_api/models/event_category1.rb +45 -0
- data/lib/socure_risk_os_api/models/event_category2.rb +57 -0
- data/lib/socure_risk_os_api/models/event_details.rb +96 -0
- data/lib/socure_risk_os_api/models/formation.rb +138 -0
- data/lib/socure_risk_os_api/models/fraud_feedback_import_response.rb +73 -0
- data/lib/socure_risk_os_api/models/fraud_feedback_response.rb +73 -0
- data/lib/socure_risk_os_api/models/fraud_label.rb +37 -0
- data/lib/socure_risk_os_api/models/gender.rb +40 -0
- data/lib/socure_risk_os_api/models/generic_passthrough.rb +169 -0
- data/lib/socure_risk_os_api/models/individual.rb +281 -0
- data/lib/socure_risk_os_api/models/individual1.rb +292 -0
- data/lib/socure_risk_os_api/models/individual3.rb +206 -0
- data/lib/socure_risk_os_api/models/individual4.rb +182 -0
- data/lib/socure_risk_os_api/models/individual5.rb +297 -0
- data/lib/socure_risk_os_api/models/individual6.rb +148 -0
- data/lib/socure_risk_os_api/models/input.rb +86 -0
- data/lib/socure_risk_os_api/models/inquiry.rb +36 -0
- data/lib/socure_risk_os_api/models/invalid_arg.rb +85 -0
- data/lib/socure_risk_os_api/models/language.rb +247 -0
- data/lib/socure_risk_os_api/models/login_and_authentication.rb +167 -0
- data/lib/socure_risk_os_api/models/method.rb +37 -0
- data/lib/socure_risk_os_api/models/monitoring_status.rb +37 -0
- data/lib/socure_risk_os_api/models/operation.rb +38 -0
- data/lib/socure_risk_os_api/models/otp.rb +95 -0
- data/lib/socure_risk_os_api/models/otp1.rb +98 -0
- data/lib/socure_risk_os_api/models/payment_screening.rb +167 -0
- data/lib/socure_risk_os_api/models/payment_screening_business.rb +155 -0
- data/lib/socure_risk_os_api/models/payment_screening_individual.rb +254 -0
- data/lib/socure_risk_os_api/models/payment_screening_instrument.rb +105 -0
- data/lib/socure_risk_os_api/models/product.rb +76 -0
- data/lib/socure_risk_os_api/models/reason_code.rb +149 -0
- data/lib/socure_risk_os_api/models/redirect.rb +118 -0
- data/lib/socure_risk_os_api/models/response.rb +77 -0
- data/lib/socure_risk_os_api/models/source.rb +146 -0
- data/lib/socure_risk_os_api/models/status.rb +40 -0
- data/lib/socure_risk_os_api/models/status1.rb +40 -0
- data/lib/socure_risk_os_api/models/transaction_details.rb +97 -0
- data/lib/socure_risk_os_api/models/trust_and_safety.rb +167 -0
- data/lib/socure_risk_os_api/models/type.rb +36 -0
- data/lib/socure_risk_os_api/models/type1.rb +36 -0
- data/lib/socure_risk_os_api/models/type2.rb +36 -0
- data/lib/socure_risk_os_api/models/update_decision.rb +156 -0
- data/lib/socure_risk_os_api/models/update_status.rb +169 -0
- data/lib/socure_risk_os_api/models/workforce_verification.rb +167 -0
- data/lib/socure_risk_os_api/utilities/date_time_helper.rb +11 -0
- data/lib/socure_risk_os_api/utilities/file_wrapper.rb +28 -0
- data/lib/socure_risk_os_api/utilities/union_type_lookup.rb +69 -0
- data/lib/socure_risk_os_api.rb +143 -0
- metadata +205 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: ab6a432c6e20b00e6c5ebcacc6bae222bec22a9d6d0c3a9c434f71858ab41b45
|
|
4
|
+
data.tar.gz: eaa14e3e014d31fe9236d45188b506d5248cf83160b0ee656b31efd03e71fa0f
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 763b18143158f91cc7db22d22b82bc66da69f8a55052bb9e1525064100dd3eb5977159bf242a7e2504af1cbba1a2e7338cd74224e1c43f18c8d180c3c917ddf8
|
|
7
|
+
data.tar.gz: c78c208a22b14255badadd2dc3d54ba47366365a8c977dad66bee1445ecfcc6db16a8ccbb6ef269a199e35773079f90521fcfb59afa79ba93fe54df9de125417
|
data/LICENSE
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
License:
|
|
2
|
+
========
|
|
3
|
+
The MIT License (MIT)
|
|
4
|
+
http://opensource.org/licenses/MIT
|
|
5
|
+
|
|
6
|
+
Copyright (c) 2014 - 2026 APIMATIC Limited
|
|
7
|
+
|
|
8
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
10
|
+
in the Software without restriction, including without limitation the rights
|
|
11
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
13
|
+
furnished to do so, subject to the following conditions:
|
|
14
|
+
|
|
15
|
+
The above copyright notice and this permission notice shall be included in
|
|
16
|
+
all copies or substantial portions of the Software.
|
|
17
|
+
|
|
18
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
24
|
+
THE SOFTWARE.
|
|
25
|
+
|
|
26
|
+
Trade Mark:
|
|
27
|
+
==========
|
|
28
|
+
APIMATIC is a trade mark for APIMATIC Limited
|
data/README.md
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
|
|
2
|
+
# Getting Started with Socure RiskOS™ API
|
|
3
|
+
|
|
4
|
+
## Introduction
|
|
5
|
+
|
|
6
|
+
*RiskOS™ documentation site is Socure confidential and proprietary information, and is only intended for viewing by authorized persons.*
|
|
7
|
+
|
|
8
|
+
The Socure RiskOS™ APIs provide a unified API framework for risk evaluation. They use predictable, resource-oriented URLs, accept JSON-formatted request bodies, return JSON-formatted responses, and follow standard HTTP methods, status codes, and authentication practices.
|
|
9
|
+
|
|
10
|
+
You can test RiskOS™ APIs in the **Sandbox environment**, which allows you to simulate requests without impacting live data. The request endpoint determines whether the request is directed to the Sandbox or Production (live) environment.
|
|
11
|
+
|
|
12
|
+
## Install the Package
|
|
13
|
+
|
|
14
|
+
Install the gem from the command line:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
gem install sc-apimatic-sdk -v 0.0.1
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Or add the gem to your Gemfile and run `bundle`:
|
|
21
|
+
|
|
22
|
+
```ruby
|
|
23
|
+
gem 'sc-apimatic-sdk', '0.0.1'
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
For additional gem details, see the [RubyGems page for the sc-apimatic-sdk gem](https://rubygems.org/gems/sc-apimatic-sdk/versions/0.0.1).
|
|
27
|
+
|
|
28
|
+
## IRB Console Usage
|
|
29
|
+
|
|
30
|
+
You can explore the SDK interactively using IRB in two ways
|
|
31
|
+
|
|
32
|
+
### 1. Use IRB with Installed Gem
|
|
33
|
+
|
|
34
|
+
Open your system terminal (Command Prompt, Git Bash or macOS Terminal) and type the following command to start the irb console.
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
irb
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Now you can load the SDK in the IRB
|
|
41
|
+
|
|
42
|
+
```ruby
|
|
43
|
+
require 'socure_risk_os_api'
|
|
44
|
+
include SocureRiskOsApi
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### 2. Use IRB within SDK
|
|
48
|
+
|
|
49
|
+
Open your system terminal (Command Prompt, Git Bash or macOS Terminal) and navigate to the root folder of SDK.
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
cd path/to/socure_risk_os_api
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Now you can start the preconfigured irb console by running the following command
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
ruby bin/console
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
**_Note:_** This automatically loads the SDK from lib/
|
|
62
|
+
|
|
63
|
+
## Initialize the API Client
|
|
64
|
+
|
|
65
|
+
**_Note:_** Documentation for the client can be found [here.](https://www.github.com/sdks-io/sc-apimatic-ruby-sdk/tree/0.0.1/doc/client.md)
|
|
66
|
+
|
|
67
|
+
The following parameters are configurable for the API Client:
|
|
68
|
+
|
|
69
|
+
| Parameter | Type | Description |
|
|
70
|
+
| --- | --- | --- |
|
|
71
|
+
| environment | [`Environment`](https://www.github.com/sdks-io/sc-apimatic-ruby-sdk/tree/0.0.1/README.md#environments) | The API environment. <br> **Default: `Environment.PRODUCTION`** |
|
|
72
|
+
| connection | `Faraday::Connection` | The Faraday connection object passed by the SDK user for making requests |
|
|
73
|
+
| adapter | `Faraday::Adapter` | The Faraday adapter object passed by the SDK user for performing http requests |
|
|
74
|
+
| timeout | `Float` | The value to use for connection timeout. <br> **Default: 30** |
|
|
75
|
+
| max_retries | `Integer` | The number of times to retry an endpoint call if it fails. <br> **Default: 0** |
|
|
76
|
+
| retry_interval | `Float` | Pause in seconds between retries. <br> **Default: 1** |
|
|
77
|
+
| backoff_factor | `Float` | The amount to multiply each successive retry's interval amount by in order to provide backoff. <br> **Default: 2** |
|
|
78
|
+
| retry_statuses | `Array` | A list of HTTP statuses to retry. <br> **Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** |
|
|
79
|
+
| retry_methods | `Array` | A list of HTTP methods to retry. <br> **Default: %i[get put]** |
|
|
80
|
+
| http_callback | `HttpCallBack` | The Http CallBack allows defining callables for pre and post API calls. |
|
|
81
|
+
| proxy_settings | [`ProxySettings`](https://www.github.com/sdks-io/sc-apimatic-ruby-sdk/tree/0.0.1/doc/proxy-settings.md) | Optional proxy configuration to route HTTP requests through a proxy server. |
|
|
82
|
+
| logging_configuration | [`LoggingConfiguration`](https://www.github.com/sdks-io/sc-apimatic-ruby-sdk/tree/0.0.1/doc/logging-configuration.md) | The SDK logging configuration for API calls |
|
|
83
|
+
| bearer_auth_credentials | [`BearerAuthCredentials`](https://www.github.com/sdks-io/sc-apimatic-ruby-sdk/tree/0.0.1/doc/auth/oauth-2-bearer-token.md) | The credential object for OAuth 2 Bearer token |
|
|
84
|
+
|
|
85
|
+
The API client can be initialized as follows:
|
|
86
|
+
|
|
87
|
+
### Code-Based Client Initialization
|
|
88
|
+
|
|
89
|
+
```ruby
|
|
90
|
+
require 'socure_risk_os_api'
|
|
91
|
+
include SocureRiskOsApi
|
|
92
|
+
|
|
93
|
+
client = Client.new(
|
|
94
|
+
bearer_auth_credentials: BearerAuthCredentials.new(
|
|
95
|
+
access_token: 'AccessToken'
|
|
96
|
+
),
|
|
97
|
+
environment: Environment::PRODUCTION,
|
|
98
|
+
logging_configuration: LoggingConfiguration.new(
|
|
99
|
+
log_level: Logger::INFO,
|
|
100
|
+
request_logging_config: RequestLoggingConfiguration.new(
|
|
101
|
+
log_body: true
|
|
102
|
+
),
|
|
103
|
+
response_logging_config: ResponseLoggingConfiguration.new(
|
|
104
|
+
log_headers: true
|
|
105
|
+
)
|
|
106
|
+
)
|
|
107
|
+
)
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Environment-Based Client Initialization
|
|
111
|
+
|
|
112
|
+
```ruby
|
|
113
|
+
require 'socure_risk_os_api'
|
|
114
|
+
include SocureRiskOsApi
|
|
115
|
+
|
|
116
|
+
# Create client from environment
|
|
117
|
+
client = Client.from_env
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
See the [`Environment-Based Client Initialization`](https://www.github.com/sdks-io/sc-apimatic-ruby-sdk/tree/0.0.1/doc/environment-based-client-initialization.md) section for details.
|
|
121
|
+
|
|
122
|
+
## Environments
|
|
123
|
+
|
|
124
|
+
The SDK can be configured to use a different environment for making API calls. Available environments are:
|
|
125
|
+
|
|
126
|
+
### Fields
|
|
127
|
+
|
|
128
|
+
| Name | Description |
|
|
129
|
+
| --- | --- |
|
|
130
|
+
| PRODUCTION | **Default** Production server (versioned) |
|
|
131
|
+
| ENVIRONMENT2 | Sandbox server (for testing and development, versioned) |
|
|
132
|
+
|
|
133
|
+
## Authorization
|
|
134
|
+
|
|
135
|
+
This API uses the following authentication schemes.
|
|
136
|
+
|
|
137
|
+
* [`BearerAuth (OAuth 2 Bearer token)`](https://www.github.com/sdks-io/sc-apimatic-ruby-sdk/tree/0.0.1/doc/auth/oauth-2-bearer-token.md)
|
|
138
|
+
|
|
139
|
+
## List of APIs
|
|
140
|
+
|
|
141
|
+
* [Reason Codes](https://www.github.com/sdks-io/sc-apimatic-ruby-sdk/tree/0.0.1/doc/controllers/reason-codes.md)
|
|
142
|
+
* [Evaluation](https://www.github.com/sdks-io/sc-apimatic-ruby-sdk/tree/0.0.1/doc/controllers/evaluation.md)
|
|
143
|
+
* [Feedback](https://www.github.com/sdks-io/sc-apimatic-ruby-sdk/tree/0.0.1/doc/controllers/feedback.md)
|
|
144
|
+
|
|
145
|
+
## SDK Infrastructure
|
|
146
|
+
|
|
147
|
+
### Configuration
|
|
148
|
+
|
|
149
|
+
* [ProxySettings](https://www.github.com/sdks-io/sc-apimatic-ruby-sdk/tree/0.0.1/doc/proxy-settings.md)
|
|
150
|
+
* [Environment-Based Client Initialization](https://www.github.com/sdks-io/sc-apimatic-ruby-sdk/tree/0.0.1/doc/environment-based-client-initialization.md)
|
|
151
|
+
* [AbstractLogger](https://www.github.com/sdks-io/sc-apimatic-ruby-sdk/tree/0.0.1/doc/abstract-logger.md)
|
|
152
|
+
* [LoggingConfiguration](https://www.github.com/sdks-io/sc-apimatic-ruby-sdk/tree/0.0.1/doc/logging-configuration.md)
|
|
153
|
+
* [RequestLoggingConfiguration](https://www.github.com/sdks-io/sc-apimatic-ruby-sdk/tree/0.0.1/doc/request-logging-configuration.md)
|
|
154
|
+
* [ResponseLoggingConfiguration](https://www.github.com/sdks-io/sc-apimatic-ruby-sdk/tree/0.0.1/doc/response-logging-configuration.md)
|
|
155
|
+
|
|
156
|
+
### HTTP
|
|
157
|
+
|
|
158
|
+
* [HttpResponse](https://www.github.com/sdks-io/sc-apimatic-ruby-sdk/tree/0.0.1/doc/http-response.md)
|
|
159
|
+
* [HttpRequest](https://www.github.com/sdks-io/sc-apimatic-ruby-sdk/tree/0.0.1/doc/http-request.md)
|
|
160
|
+
|
|
161
|
+
### Utilities
|
|
162
|
+
|
|
163
|
+
* [ApiResponse](https://www.github.com/sdks-io/sc-apimatic-ruby-sdk/tree/0.0.1/doc/api-response.md)
|
|
164
|
+
* [ApiHelper](https://www.github.com/sdks-io/sc-apimatic-ruby-sdk/tree/0.0.1/doc/api-helper.md)
|
|
165
|
+
* [DateTimeHelper](https://www.github.com/sdks-io/sc-apimatic-ruby-sdk/tree/0.0.1/doc/date-time-helper.md)
|
|
166
|
+
|
data/bin/console
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
# Load the lib folder into Ruby's load path
|
|
4
|
+
$LOAD_PATH.unshift(File.expand_path('../lib', __dir__))
|
|
5
|
+
|
|
6
|
+
# Require the gem
|
|
7
|
+
require 'socure_risk_os_api'
|
|
8
|
+
|
|
9
|
+
puts 'SocureRiskOsApi SDK loaded!'
|
|
10
|
+
puts 'You can now create a client with: client = SocureRiskOsApi::Client.new'
|
|
11
|
+
puts 'Or use from_env: client = SocureRiskOsApi::Client.from_env'
|
|
12
|
+
|
|
13
|
+
# Start an interactive IRB session
|
|
14
|
+
require 'irb'
|
|
15
|
+
IRB.start
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# socure_risk_os_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC
|
|
4
|
+
# v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module SocureRiskOsApi
|
|
7
|
+
# BaseApi.
|
|
8
|
+
class BaseApi
|
|
9
|
+
include CoreLibrary
|
|
10
|
+
attr_accessor :config, :http_call_back
|
|
11
|
+
|
|
12
|
+
def self.user_agent
|
|
13
|
+
'Ruby-SDK/0.0.1 (OS: {os-info}, Engine: {engine}/{engine-version})'
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def self.user_agent_parameters
|
|
17
|
+
{
|
|
18
|
+
'{engine}' => { 'value' => RUBY_ENGINE, 'encode' => false },
|
|
19
|
+
'{engine-version}' => { 'value' => RUBY_ENGINE_VERSION, 'encode' => false },
|
|
20
|
+
'{os-info}' => { 'value' => RUBY_PLATFORM, 'encode' => false }
|
|
21
|
+
}
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
GLOBAL_ERRORS = {
|
|
25
|
+
'default' => ErrorCase.new
|
|
26
|
+
.error_message('HTTP response not OK.')
|
|
27
|
+
.exception_type(APIException)
|
|
28
|
+
}.freeze
|
|
29
|
+
|
|
30
|
+
# Initialization constructor.
|
|
31
|
+
# @param [GlobalConfiguration] global_configuration The instance of GlobalConfiguration.
|
|
32
|
+
def initialize(global_configuration)
|
|
33
|
+
@global_configuration = global_configuration
|
|
34
|
+
@config = @global_configuration.client_configuration
|
|
35
|
+
@http_call_back = @config.http_callback
|
|
36
|
+
@api_call = ApiCall.new(@global_configuration)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Creates a new instance of the request builder.
|
|
40
|
+
# @param [String] http_method The HTTP method to use in the request.
|
|
41
|
+
# @param [String] path The endpoint path to use in the request.
|
|
42
|
+
# @param [String] server The server to extract the base uri for the request.
|
|
43
|
+
# @return [RequestBuilder] The instance of RequestBuilder.
|
|
44
|
+
def new_request_builder(http_method, path, server)
|
|
45
|
+
RequestBuilder.new
|
|
46
|
+
.http_method(http_method)
|
|
47
|
+
.path(path)
|
|
48
|
+
.server(server)
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Creates a new instance of the response handler.
|
|
52
|
+
# @return [ResponseHandler] The instance of ResponseHandler.
|
|
53
|
+
def new_response_handler
|
|
54
|
+
ResponseHandler.new
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Creates a new instance of the parameter.
|
|
58
|
+
# @param [String|optional] key The key of the parameter.
|
|
59
|
+
# @param [Object] value The value of the parameter.
|
|
60
|
+
# @return [Parameter] The instance of Parameter.
|
|
61
|
+
def new_parameter(value, key: nil)
|
|
62
|
+
Parameter.new
|
|
63
|
+
.key(key)
|
|
64
|
+
.value(value)
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
# socure_risk_os_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC
|
|
4
|
+
# v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module SocureRiskOsApi
|
|
7
|
+
# EvaluationApi
|
|
8
|
+
class EvaluationApi < BaseApi
|
|
9
|
+
# Submit a new evaluation in RiskOS™. Select the evaluation type below to
|
|
10
|
+
# view the corresponding request schema.
|
|
11
|
+
# @param [ConsumerOnboarding | AdvancedPrefill | GenericPassthrough |
|
|
12
|
+
# TrustAndSafety | BankAccountVerification | BusinessOnboarding |
|
|
13
|
+
# LoginAndAuthentication | WorkforceVerification | PaymentScreening |
|
|
14
|
+
# AgeAssurance] body Required parameter: TODO: type description here
|
|
15
|
+
# @param [String] x_api_version Optional parameter: This header is optional.
|
|
16
|
+
# If omitted, requests use the current default version, `2025-01-01.orion`.
|
|
17
|
+
# Set this header to pin your integration to a specific API version.
|
|
18
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
19
|
+
def post_evaluation(body,
|
|
20
|
+
x_api_version: nil)
|
|
21
|
+
@api_call
|
|
22
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
23
|
+
'/api/evaluation',
|
|
24
|
+
Server::DEFAULT)
|
|
25
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
26
|
+
.body_param(new_parameter(body)
|
|
27
|
+
.is_required(true)
|
|
28
|
+
.validator(proc do |value|
|
|
29
|
+
UnionTypeLookUp.get(:PostEvaluationBody)
|
|
30
|
+
.validate(value)
|
|
31
|
+
end))
|
|
32
|
+
.header_param(new_parameter(x_api_version, key: 'X-API-Version'))
|
|
33
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
34
|
+
.body_serializer(APIHelper.method(:json_serialize))
|
|
35
|
+
.auth(Single.new('BearerAuth')))
|
|
36
|
+
.response(new_response_handler
|
|
37
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
38
|
+
.deserialize_into(EvalResponseWithOutSocureData.method(:from_hash))
|
|
39
|
+
.is_api_response(true)
|
|
40
|
+
.local_error('400',
|
|
41
|
+
'Bad Request – The request was invalid or cannot be otherwise'\
|
|
42
|
+
' served.',
|
|
43
|
+
ErrorException)
|
|
44
|
+
.local_error('401',
|
|
45
|
+
'Unauthorized – No valid API key provided.',
|
|
46
|
+
ErrorException)
|
|
47
|
+
.local_error('403',
|
|
48
|
+
'Forbidden – IP address was rejected.',
|
|
49
|
+
ErrorException)
|
|
50
|
+
.local_error('404',
|
|
51
|
+
'Not Found – The requested resource does not exist.',
|
|
52
|
+
ErrorException)
|
|
53
|
+
.local_error('413',
|
|
54
|
+
'Payload Too Large – The `customer_metadata` object exceeds the'\
|
|
55
|
+
' maximum allowed size.',
|
|
56
|
+
ErrorException)
|
|
57
|
+
.local_error('429',
|
|
58
|
+
'Too Many Requests – The rate limit for this API has been'\
|
|
59
|
+
' exceeded.',
|
|
60
|
+
ErrorException)
|
|
61
|
+
.local_error('500',
|
|
62
|
+
'Internal Server Error – An unexpected condition occurred on'\
|
|
63
|
+
' the server.',
|
|
64
|
+
ErrorException))
|
|
65
|
+
.execute
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Enable or disable daily watchlist monitoring for an existing evaluation.
|
|
69
|
+
# Monitored entities are checked automatically for additions, modifications,
|
|
70
|
+
# or removals across specified lists.
|
|
71
|
+
# @param [ApiEvaluationMonitoringRequest] body Required parameter: TODO:
|
|
72
|
+
# type description here
|
|
73
|
+
# @param [String] x_api_version Optional parameter: This header is optional.
|
|
74
|
+
# If omitted, requests use the current default version, `2025-01-01.orion`.
|
|
75
|
+
# Set this header to pin your integration to a specific API version.
|
|
76
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
77
|
+
def watchlist_monitoring(body,
|
|
78
|
+
x_api_version: nil)
|
|
79
|
+
@api_call
|
|
80
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
81
|
+
'/api/evaluation/monitoring',
|
|
82
|
+
Server::DEFAULT)
|
|
83
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
84
|
+
.body_param(new_parameter(body)
|
|
85
|
+
.is_required(true))
|
|
86
|
+
.header_param(new_parameter(x_api_version, key: 'X-API-Version'))
|
|
87
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
88
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
|
89
|
+
.auth(Single.new('BearerAuth')))
|
|
90
|
+
.response(new_response_handler
|
|
91
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
92
|
+
.deserialize_into(ApiEvaluationMonitoringResponse.method(:from_hash))
|
|
93
|
+
.is_api_response(true)
|
|
94
|
+
.local_error('400',
|
|
95
|
+
'Bad Request - The request was unacceptable.',
|
|
96
|
+
APIException)
|
|
97
|
+
.local_error('401',
|
|
98
|
+
'Unauthorized - An invalid API key was provided.',
|
|
99
|
+
APIException)
|
|
100
|
+
.local_error('403',
|
|
101
|
+
'Forbidden - The client does not have permission to access this'\
|
|
102
|
+
' resource.',
|
|
103
|
+
APIException)
|
|
104
|
+
.local_error('404',
|
|
105
|
+
'Not Found - The requested resource does not exist.',
|
|
106
|
+
APIException)
|
|
107
|
+
.local_error('500',
|
|
108
|
+
'Internal Server Error – Unexpected server issue.',
|
|
109
|
+
APIException))
|
|
110
|
+
.execute
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Update risk data or metadata for a paused evaluation identified by
|
|
114
|
+
# `eval_id`. Partial updates are supported — omitted fields remain
|
|
115
|
+
# unchanged. Completed evaluations are immutable.
|
|
116
|
+
# @param [UUID | String] eval_id Required parameter: The system-generated
|
|
117
|
+
# unique ID for the evaluation. Capture this value from the initial `POST`
|
|
118
|
+
# `/api/evaluation` response.
|
|
119
|
+
# @param [ConsumerOnboardingPatch | TrustAndSafety | BankAccountVerification
|
|
120
|
+
# | BusinessOnboarding | LoginAndAuthentication] body Required parameter:
|
|
121
|
+
# TODO: type description here
|
|
122
|
+
# @param [String] x_api_version Optional parameter: This header is optional.
|
|
123
|
+
# If omitted, requests use the current default version, `2025-01-01.orion`.
|
|
124
|
+
# Set this header to pin your integration to a specific API version.
|
|
125
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
126
|
+
def patch_evaluation(eval_id,
|
|
127
|
+
body,
|
|
128
|
+
x_api_version: nil)
|
|
129
|
+
@api_call
|
|
130
|
+
.request(new_request_builder(HttpMethodEnum::PATCH,
|
|
131
|
+
'/api/evaluation/{eval_id}',
|
|
132
|
+
Server::DEFAULT)
|
|
133
|
+
.template_param(new_parameter(eval_id, key: 'eval_id')
|
|
134
|
+
.is_required(true)
|
|
135
|
+
.should_encode(true))
|
|
136
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
137
|
+
.body_param(new_parameter(body)
|
|
138
|
+
.is_required(true)
|
|
139
|
+
.validator(proc do |value|
|
|
140
|
+
UnionTypeLookUp.get(:EvaluationPatchRequest)
|
|
141
|
+
.validate(value)
|
|
142
|
+
end))
|
|
143
|
+
.header_param(new_parameter(x_api_version, key: 'X-API-Version'))
|
|
144
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
145
|
+
.body_serializer(APIHelper.method(:json_serialize))
|
|
146
|
+
.auth(Single.new('BearerAuth')))
|
|
147
|
+
.response(new_response_handler
|
|
148
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
149
|
+
.deserialize_into(EvalResponseWithOutSocureData.method(:from_hash))
|
|
150
|
+
.is_api_response(true)
|
|
151
|
+
.local_error('400',
|
|
152
|
+
'Bad Request - The request was unacceptable.',
|
|
153
|
+
APIException)
|
|
154
|
+
.local_error('401',
|
|
155
|
+
'Unauthorized - An invalid API key was provided.',
|
|
156
|
+
APIException)
|
|
157
|
+
.local_error('404',
|
|
158
|
+
'Not Found - The requested resource does not exist.',
|
|
159
|
+
APIException)
|
|
160
|
+
.local_error('413',
|
|
161
|
+
'Payload Too Large - The `customer_metadata` object exceeds the'\
|
|
162
|
+
' maximum allowed size.',
|
|
163
|
+
APIException)
|
|
164
|
+
.local_error('500',
|
|
165
|
+
'500 Internal Server Error – Unexpected server issue.',
|
|
166
|
+
APIException))
|
|
167
|
+
.execute
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# Retrieves evaluation data for a workflow by providing the unique
|
|
171
|
+
# `eval_id`.
|
|
172
|
+
# @param [UUID | String] eval_id Required parameter: The system-generated
|
|
173
|
+
# unique ID for the evaluation. Capture this value from the initial `POST`
|
|
174
|
+
# `/api/evaluation` response.
|
|
175
|
+
# @param [String] x_api_version Optional parameter: This header is optional.
|
|
176
|
+
# If omitted, requests use the current default version, `2025-01-01.orion`.
|
|
177
|
+
# Set this header to pin your integration to a specific API version.
|
|
178
|
+
# @param [TrueClass | FalseClass] include_input Optional parameter: Set to
|
|
179
|
+
# `true` to include the original input data and any transformed data in the
|
|
180
|
+
# response under the `input` field.
|
|
181
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
182
|
+
def get_evaluation(eval_id,
|
|
183
|
+
x_api_version: nil,
|
|
184
|
+
include_input: false)
|
|
185
|
+
@api_call
|
|
186
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
187
|
+
'/api/evaluation/{eval_id}',
|
|
188
|
+
Server::DEFAULT)
|
|
189
|
+
.template_param(new_parameter(eval_id, key: 'eval_id')
|
|
190
|
+
.is_required(true)
|
|
191
|
+
.should_encode(true))
|
|
192
|
+
.header_param(new_parameter(x_api_version, key: 'X-API-Version'))
|
|
193
|
+
.query_param(new_parameter(include_input, key: 'include_input'))
|
|
194
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
195
|
+
.auth(Single.new('BearerAuth')))
|
|
196
|
+
.response(new_response_handler
|
|
197
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
198
|
+
.deserialize_into(EvalResponseWithOutSocureData.method(:from_hash))
|
|
199
|
+
.is_api_response(true)
|
|
200
|
+
.local_error('400',
|
|
201
|
+
'Bad Request - The request was unacceptable.',
|
|
202
|
+
APIException)
|
|
203
|
+
.local_error('401',
|
|
204
|
+
'Unauthorized - An invalid API key was provided.',
|
|
205
|
+
APIException)
|
|
206
|
+
.local_error('404',
|
|
207
|
+
'Not Found - The requested resource does not exist.',
|
|
208
|
+
APIException)
|
|
209
|
+
.local_error('429',
|
|
210
|
+
'Too Many Requests - The rate limit for this API has been'\
|
|
211
|
+
' exceeded.',
|
|
212
|
+
APIException)
|
|
213
|
+
.local_error('500',
|
|
214
|
+
'Internal Server Error – An unexpected condition occurred on'\
|
|
215
|
+
' the server.',
|
|
216
|
+
APIException))
|
|
217
|
+
.execute
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
# Retrieve a ZIP archive of documents associated with an evaluation,
|
|
221
|
+
# including user-uploaded identity documents and reviewer-added case
|
|
222
|
+
# attachments.
|
|
223
|
+
# @param [UUID | String] eval_id Required parameter: The system-generated
|
|
224
|
+
# unique ID for the evaluation. Capture this value from the initial `POST`
|
|
225
|
+
# `/api/evaluation` response.
|
|
226
|
+
# @param [String] x_api_version Optional parameter: This header is optional.
|
|
227
|
+
# If omitted, requests use the current default version, `2025-01-01.orion`.
|
|
228
|
+
# Set this header to pin your integration to a specific API version.
|
|
229
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
230
|
+
def download_evaluation_documents(eval_id,
|
|
231
|
+
x_api_version: nil)
|
|
232
|
+
@api_call
|
|
233
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
234
|
+
'/api/evaluation/{eval_id}/documents',
|
|
235
|
+
Server::DEFAULT)
|
|
236
|
+
.template_param(new_parameter(eval_id, key: 'eval_id')
|
|
237
|
+
.is_required(true)
|
|
238
|
+
.should_encode(true))
|
|
239
|
+
.header_param(new_parameter(x_api_version, key: 'X-API-Version'))
|
|
240
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
241
|
+
.auth(Single.new('BearerAuth')))
|
|
242
|
+
.response(new_response_handler
|
|
243
|
+
.deserializer(APIHelper.method(:dynamic_deserializer))
|
|
244
|
+
.is_api_response(true)
|
|
245
|
+
.local_error('400',
|
|
246
|
+
'Bad Request - The request was unacceptable.',
|
|
247
|
+
APIException)
|
|
248
|
+
.local_error('401',
|
|
249
|
+
'Unauthorized - An invalid API key was provided.',
|
|
250
|
+
APIException)
|
|
251
|
+
.local_error('403',
|
|
252
|
+
'Forbidden - The client does not have permission to access this'\
|
|
253
|
+
' resource.',
|
|
254
|
+
APIException)
|
|
255
|
+
.local_error('404',
|
|
256
|
+
'Not Found - The requested resource does not exist.',
|
|
257
|
+
APIException)
|
|
258
|
+
.local_error('500',
|
|
259
|
+
'Internal Server Error – An unexpected condition occurred on'\
|
|
260
|
+
' the server.',
|
|
261
|
+
APIException))
|
|
262
|
+
.execute
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
# Updates evaluation metadata, including `decision`, `status`, and
|
|
266
|
+
# `sub_status`, and optionally adds notes or a base64-encoded attachment.
|
|
267
|
+
# @param [UUID | String] eval_id Required parameter: The system-generated
|
|
268
|
+
# unique ID for the evaluation. Capture this value from the initial `POST`
|
|
269
|
+
# `/api/evaluation` response.
|
|
270
|
+
# @param [UpdateDecision | UpdateStatus] body Required parameter: TODO: type
|
|
271
|
+
# description here
|
|
272
|
+
# @param [String] x_api_version Optional parameter: This header is optional.
|
|
273
|
+
# If omitted, requests use the current default version, `2025-01-01.orion`.
|
|
274
|
+
# Set this header to pin your integration to a specific API version.
|
|
275
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
276
|
+
def update_evaluation_state(eval_id,
|
|
277
|
+
body,
|
|
278
|
+
x_api_version: nil)
|
|
279
|
+
@api_call
|
|
280
|
+
.request(new_request_builder(HttpMethodEnum::PUT,
|
|
281
|
+
'/api/evaluation/{eval_id}/state',
|
|
282
|
+
Server::DEFAULT)
|
|
283
|
+
.template_param(new_parameter(eval_id, key: 'eval_id')
|
|
284
|
+
.is_required(true)
|
|
285
|
+
.should_encode(true))
|
|
286
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
287
|
+
.body_param(new_parameter(body)
|
|
288
|
+
.is_required(true)
|
|
289
|
+
.validator(proc do |value|
|
|
290
|
+
UnionTypeLookUp.get(:UpdateEvaluationStateBody)
|
|
291
|
+
.validate(value)
|
|
292
|
+
end))
|
|
293
|
+
.header_param(new_parameter(x_api_version, key: 'X-API-Version'))
|
|
294
|
+
.body_serializer(APIHelper.method(:json_serialize))
|
|
295
|
+
.auth(Single.new('BearerAuth')))
|
|
296
|
+
.response(new_response_handler
|
|
297
|
+
.is_response_void(true)
|
|
298
|
+
.is_api_response(true)
|
|
299
|
+
.local_error('400',
|
|
300
|
+
'Bad Request - The request was unacceptable.',
|
|
301
|
+
APIException)
|
|
302
|
+
.local_error('401',
|
|
303
|
+
'Unauthorized - An invalid API key was provided.',
|
|
304
|
+
APIException)
|
|
305
|
+
.local_error('403',
|
|
306
|
+
'Forbidden - IP Address was rejected.',
|
|
307
|
+
APIException)
|
|
308
|
+
.local_error('404',
|
|
309
|
+
'Not Found - The requested resource does not exist.',
|
|
310
|
+
APIException)
|
|
311
|
+
.local_error('500',
|
|
312
|
+
'Internal Server Error – An unexpected condition occurred on'\
|
|
313
|
+
' the server.',
|
|
314
|
+
APIException))
|
|
315
|
+
.execute
|
|
316
|
+
end
|
|
317
|
+
end
|
|
318
|
+
end
|