onfido 6.2.0 → 6.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/CHANGELOG.md +6 -0
- data/README.md +1 -1
- data/lib/onfido/api/default_api.rb +413 -0
- data/lib/onfido/api_client.rb +6 -2
- data/lib/onfido/models/biometric_token.rb +265 -0
- data/lib/onfido/models/biometric_token_data.rb +317 -0
- data/lib/onfido/models/biometric_token_response.rb +237 -0
- data/lib/onfido/models/biometric_token_updater.rb +262 -0
- data/lib/onfido/models/biometric_tokens_response.rb +239 -0
- data/lib/onfido/models/document_types.rb +3 -1
- data/lib/onfido/models/invalidated_biometric_token_response.rb +237 -0
- data/lib/onfido/models/invalidated_biometric_token_summary.rb +238 -0
- data/lib/onfido/models/invalidated_biometric_token_summary_deleted_items.rb +239 -0
- data/lib/onfido/models/invalidated_biometric_tokens_response.rb +237 -0
- data/lib/onfido/models/updated_biometric_token_response.rb +237 -0
- data/lib/onfido/models/watchlist_mesh_added_mentions.rb +247 -0
- data/lib/onfido/models/watchlist_mesh_alert_risk.rb +323 -0
- data/lib/onfido/models/watchlist_mesh_alert_risk1.rb +316 -0
- data/lib/onfido/models/watchlist_mesh_associate.rb +231 -0
- data/lib/onfido/models/watchlist_mesh_date_value.rb +231 -0
- data/lib/onfido/models/watchlist_mesh_field.rb +241 -0
- data/lib/onfido/models/watchlist_mesh_image.rb +231 -0
- data/lib/onfido/models/watchlist_mesh_lists.rb +309 -0
- data/lib/onfido/models/watchlist_mesh_media.rb +261 -0
- data/lib/onfido/models/watchlist_mesh_name.rb +231 -0
- data/lib/onfido/models/watchlist_mesh_pep.rb +369 -0
- data/lib/onfido/models/watchlist_mesh_person.rb +283 -0
- data/lib/onfido/models/watchlist_mesh_profile.rb +273 -0
- data/lib/onfido/models/watchlist_mesh_risk_decision.rb +43 -0
- data/lib/onfido/models/watchlist_mesh_risk_detail.rb +255 -0
- data/lib/onfido/models/watchlist_mesh_risk_indicators.rb +271 -0
- data/lib/onfido/models/watchlist_mesh_sanctions.rb +309 -0
- data/lib/onfido/models/webhook.rb +11 -1
- data/lib/onfido/models/webhook_builder.rb +11 -1
- data/lib/onfido/models/webhook_create.rb +11 -1
- data/lib/onfido/models/webhook_response.rb +11 -1
- data/lib/onfido/models/webhook_update.rb +11 -1
- data/lib/onfido/models/webhook_updater.rb +11 -1
- data/lib/onfido/version.rb +1 -1
- data/lib/onfido.rb +27 -0
- data/spec/integrations/biometric_token_spec.rb +122 -0
- data/spec/integrations/document_spec.rb +8 -1
- data/spec/integrations/media/nfc_data.json +11768 -0
- data/spec/integrations/watchlist_alert_risk_spec.rb +66 -0
- data/spec/shared_contexts/with_document.rb +0 -1
- data/spec/spec_helper.rb +6 -7
- metadata +55 -22
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e12865830296f564d8b260c71944db655a54ea3e936d49e884604c1dac5f5004
|
|
4
|
+
data.tar.gz: 7924185844e0d402651d07fb9dfb05cb82564d1aa73dfc511629ca64cc41f36f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 874496bd9bab433e899eef7f4d688853c67fc907ac1fbee6059788a905a6b0090d84ab07b990fe24c77e498f1f0a590899aa5f6638ecf4945c0d0ec93fef4e3f
|
|
7
|
+
data.tar.gz: 613aa1333a9c2314a9adf1d30e112e94280d04f45e13d5339a4de2bbde351d2971d3816e8b6a5c38c572d376906af2e0386ea34614b774e9c92746213d0aa3dd
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v6.2.0 21st May 2026
|
|
4
|
+
|
|
5
|
+
- Release based on Onfido OpenAPI spec version [v6.1.0](https://github.com/onfido/onfido-openapi-spec/releases/tag/v6.1.0):
|
|
6
|
+
- Add Oauth2ClientCredentials support
|
|
7
|
+
- Fix ruby oauth token exchange url
|
|
8
|
+
|
|
3
9
|
## v6.1.0 6th May 2026
|
|
4
10
|
|
|
5
11
|
- Release based on Onfido OpenAPI spec version [v6.0.1](https://github.com/onfido/onfido-openapi-spec/releases/tag/v6.0.1):
|
data/README.md
CHANGED
|
@@ -14,7 +14,7 @@ This version uses Onfido API v3.6. Refer to our [API versioning guide](https://d
|
|
|
14
14
|
### Installation
|
|
15
15
|
|
|
16
16
|
```ruby
|
|
17
|
-
gem 'onfido', '~> 6.
|
|
17
|
+
gem 'onfido', '~> 6.3.0'
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
Configure with your API token, region and optional timeout (default value is 30):
|
|
@@ -2176,6 +2176,75 @@ module Onfido
|
|
|
2176
2176
|
return data, status_code, headers
|
|
2177
2177
|
end
|
|
2178
2178
|
|
|
2179
|
+
# Retrieve biometric token
|
|
2180
|
+
# Returns a biometric token's details.
|
|
2181
|
+
# @param user_id [String] Customer user ID that owns the biometric token.
|
|
2182
|
+
# @param token_uuid [String] Biometric token UUID.
|
|
2183
|
+
# @param [Hash] opts the optional parameters
|
|
2184
|
+
# @return [BiometricTokenResponse]
|
|
2185
|
+
def find_biometric_token(user_id, token_uuid, opts = {})
|
|
2186
|
+
data, _status_code, _headers = find_biometric_token_with_http_info(user_id, token_uuid, opts)
|
|
2187
|
+
data
|
|
2188
|
+
end
|
|
2189
|
+
|
|
2190
|
+
# Retrieve biometric token
|
|
2191
|
+
# Returns a biometric token's details.
|
|
2192
|
+
# @param user_id [String] Customer user ID that owns the biometric token.
|
|
2193
|
+
# @param token_uuid [String] Biometric token UUID.
|
|
2194
|
+
# @param [Hash] opts the optional parameters
|
|
2195
|
+
# @return [Array<(BiometricTokenResponse, Integer, Hash)>] BiometricTokenResponse data, response status code and response headers
|
|
2196
|
+
def find_biometric_token_with_http_info(user_id, token_uuid, opts = {})
|
|
2197
|
+
if @api_client.config.debugging
|
|
2198
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.find_biometric_token ...'
|
|
2199
|
+
end
|
|
2200
|
+
# verify the required parameter 'user_id' is set
|
|
2201
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
|
2202
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling DefaultApi.find_biometric_token"
|
|
2203
|
+
end
|
|
2204
|
+
# verify the required parameter 'token_uuid' is set
|
|
2205
|
+
if @api_client.config.client_side_validation && token_uuid.nil?
|
|
2206
|
+
fail ArgumentError, "Missing the required parameter 'token_uuid' when calling DefaultApi.find_biometric_token"
|
|
2207
|
+
end
|
|
2208
|
+
# resource path
|
|
2209
|
+
local_var_path = '/biometric_tokens/{user_id}/{token_uuid}'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s)).sub('{' + 'token_uuid' + '}', CGI.escape(token_uuid.to_s))
|
|
2210
|
+
|
|
2211
|
+
# query parameters
|
|
2212
|
+
query_params = opts[:query_params] || {}
|
|
2213
|
+
|
|
2214
|
+
# header parameters
|
|
2215
|
+
header_params = opts[:header_params] || {}
|
|
2216
|
+
# HTTP header 'Accept' (if needed)
|
|
2217
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2218
|
+
|
|
2219
|
+
# form parameters
|
|
2220
|
+
form_params = opts[:form_params] || {}
|
|
2221
|
+
|
|
2222
|
+
# http body (model)
|
|
2223
|
+
post_body = opts[:debug_body]
|
|
2224
|
+
|
|
2225
|
+
# return_type
|
|
2226
|
+
return_type = opts[:debug_return_type] || 'BiometricTokenResponse'
|
|
2227
|
+
|
|
2228
|
+
# auth_names
|
|
2229
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2ClientCredentials', 'Token']
|
|
2230
|
+
|
|
2231
|
+
new_options = opts.merge(
|
|
2232
|
+
:operation => :"DefaultApi.find_biometric_token",
|
|
2233
|
+
:header_params => header_params,
|
|
2234
|
+
:query_params => query_params,
|
|
2235
|
+
:form_params => form_params,
|
|
2236
|
+
:body => post_body,
|
|
2237
|
+
:auth_names => auth_names,
|
|
2238
|
+
:return_type => return_type
|
|
2239
|
+
)
|
|
2240
|
+
|
|
2241
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2242
|
+
if @api_client.config.debugging
|
|
2243
|
+
@api_client.config.logger.debug "API called: DefaultApi#find_biometric_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2244
|
+
end
|
|
2245
|
+
return data, status_code, headers
|
|
2246
|
+
end
|
|
2247
|
+
|
|
2179
2248
|
# Retrieve a Check
|
|
2180
2249
|
# Retrieves a single check. Returns a check object.
|
|
2181
2250
|
# @param check_id [String]
|
|
@@ -3207,6 +3276,138 @@ module Onfido
|
|
|
3207
3276
|
return data, status_code, headers
|
|
3208
3277
|
end
|
|
3209
3278
|
|
|
3279
|
+
# Invalidate biometric token
|
|
3280
|
+
# Invalidates a biometric token.
|
|
3281
|
+
# @param user_id [String] Customer user ID that owns the biometric token.
|
|
3282
|
+
# @param token_uuid [String] Biometric token UUID.
|
|
3283
|
+
# @param [Hash] opts the optional parameters
|
|
3284
|
+
# @return [InvalidatedBiometricTokenResponse]
|
|
3285
|
+
def invalidate_biometric_token(user_id, token_uuid, opts = {})
|
|
3286
|
+
data, _status_code, _headers = invalidate_biometric_token_with_http_info(user_id, token_uuid, opts)
|
|
3287
|
+
data
|
|
3288
|
+
end
|
|
3289
|
+
|
|
3290
|
+
# Invalidate biometric token
|
|
3291
|
+
# Invalidates a biometric token.
|
|
3292
|
+
# @param user_id [String] Customer user ID that owns the biometric token.
|
|
3293
|
+
# @param token_uuid [String] Biometric token UUID.
|
|
3294
|
+
# @param [Hash] opts the optional parameters
|
|
3295
|
+
# @return [Array<(InvalidatedBiometricTokenResponse, Integer, Hash)>] InvalidatedBiometricTokenResponse data, response status code and response headers
|
|
3296
|
+
def invalidate_biometric_token_with_http_info(user_id, token_uuid, opts = {})
|
|
3297
|
+
if @api_client.config.debugging
|
|
3298
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.invalidate_biometric_token ...'
|
|
3299
|
+
end
|
|
3300
|
+
# verify the required parameter 'user_id' is set
|
|
3301
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
|
3302
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling DefaultApi.invalidate_biometric_token"
|
|
3303
|
+
end
|
|
3304
|
+
# verify the required parameter 'token_uuid' is set
|
|
3305
|
+
if @api_client.config.client_side_validation && token_uuid.nil?
|
|
3306
|
+
fail ArgumentError, "Missing the required parameter 'token_uuid' when calling DefaultApi.invalidate_biometric_token"
|
|
3307
|
+
end
|
|
3308
|
+
# resource path
|
|
3309
|
+
local_var_path = '/biometric_tokens/{user_id}/{token_uuid}'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s)).sub('{' + 'token_uuid' + '}', CGI.escape(token_uuid.to_s))
|
|
3310
|
+
|
|
3311
|
+
# query parameters
|
|
3312
|
+
query_params = opts[:query_params] || {}
|
|
3313
|
+
|
|
3314
|
+
# header parameters
|
|
3315
|
+
header_params = opts[:header_params] || {}
|
|
3316
|
+
# HTTP header 'Accept' (if needed)
|
|
3317
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3318
|
+
|
|
3319
|
+
# form parameters
|
|
3320
|
+
form_params = opts[:form_params] || {}
|
|
3321
|
+
|
|
3322
|
+
# http body (model)
|
|
3323
|
+
post_body = opts[:debug_body]
|
|
3324
|
+
|
|
3325
|
+
# return_type
|
|
3326
|
+
return_type = opts[:debug_return_type] || 'InvalidatedBiometricTokenResponse'
|
|
3327
|
+
|
|
3328
|
+
# auth_names
|
|
3329
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2ClientCredentials', 'Token']
|
|
3330
|
+
|
|
3331
|
+
new_options = opts.merge(
|
|
3332
|
+
:operation => :"DefaultApi.invalidate_biometric_token",
|
|
3333
|
+
:header_params => header_params,
|
|
3334
|
+
:query_params => query_params,
|
|
3335
|
+
:form_params => form_params,
|
|
3336
|
+
:body => post_body,
|
|
3337
|
+
:auth_names => auth_names,
|
|
3338
|
+
:return_type => return_type
|
|
3339
|
+
)
|
|
3340
|
+
|
|
3341
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
3342
|
+
if @api_client.config.debugging
|
|
3343
|
+
@api_client.config.logger.debug "API called: DefaultApi#invalidate_biometric_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3344
|
+
end
|
|
3345
|
+
return data, status_code, headers
|
|
3346
|
+
end
|
|
3347
|
+
|
|
3348
|
+
# Invalidate biometric tokens
|
|
3349
|
+
# Invalidates every biometric token associated with the supplied customer user ID.
|
|
3350
|
+
# @param user_id [String] Customer user ID whose biometric tokens will be invalidated.
|
|
3351
|
+
# @param [Hash] opts the optional parameters
|
|
3352
|
+
# @return [InvalidatedBiometricTokensResponse]
|
|
3353
|
+
def invalidate_biometric_tokens(user_id, opts = {})
|
|
3354
|
+
data, _status_code, _headers = invalidate_biometric_tokens_with_http_info(user_id, opts)
|
|
3355
|
+
data
|
|
3356
|
+
end
|
|
3357
|
+
|
|
3358
|
+
# Invalidate biometric tokens
|
|
3359
|
+
# Invalidates every biometric token associated with the supplied customer user ID.
|
|
3360
|
+
# @param user_id [String] Customer user ID whose biometric tokens will be invalidated.
|
|
3361
|
+
# @param [Hash] opts the optional parameters
|
|
3362
|
+
# @return [Array<(InvalidatedBiometricTokensResponse, Integer, Hash)>] InvalidatedBiometricTokensResponse data, response status code and response headers
|
|
3363
|
+
def invalidate_biometric_tokens_with_http_info(user_id, opts = {})
|
|
3364
|
+
if @api_client.config.debugging
|
|
3365
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.invalidate_biometric_tokens ...'
|
|
3366
|
+
end
|
|
3367
|
+
# verify the required parameter 'user_id' is set
|
|
3368
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
|
3369
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling DefaultApi.invalidate_biometric_tokens"
|
|
3370
|
+
end
|
|
3371
|
+
# resource path
|
|
3372
|
+
local_var_path = '/biometric_tokens/{user_id}'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
|
|
3373
|
+
|
|
3374
|
+
# query parameters
|
|
3375
|
+
query_params = opts[:query_params] || {}
|
|
3376
|
+
|
|
3377
|
+
# header parameters
|
|
3378
|
+
header_params = opts[:header_params] || {}
|
|
3379
|
+
# HTTP header 'Accept' (if needed)
|
|
3380
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3381
|
+
|
|
3382
|
+
# form parameters
|
|
3383
|
+
form_params = opts[:form_params] || {}
|
|
3384
|
+
|
|
3385
|
+
# http body (model)
|
|
3386
|
+
post_body = opts[:debug_body]
|
|
3387
|
+
|
|
3388
|
+
# return_type
|
|
3389
|
+
return_type = opts[:debug_return_type] || 'InvalidatedBiometricTokensResponse'
|
|
3390
|
+
|
|
3391
|
+
# auth_names
|
|
3392
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2ClientCredentials', 'Token']
|
|
3393
|
+
|
|
3394
|
+
new_options = opts.merge(
|
|
3395
|
+
:operation => :"DefaultApi.invalidate_biometric_tokens",
|
|
3396
|
+
:header_params => header_params,
|
|
3397
|
+
:query_params => query_params,
|
|
3398
|
+
:form_params => form_params,
|
|
3399
|
+
:body => post_body,
|
|
3400
|
+
:auth_names => auth_names,
|
|
3401
|
+
:return_type => return_type
|
|
3402
|
+
)
|
|
3403
|
+
|
|
3404
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
3405
|
+
if @api_client.config.debugging
|
|
3406
|
+
@api_client.config.logger.debug "API called: DefaultApi#invalidate_biometric_tokens\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3407
|
+
end
|
|
3408
|
+
return data, status_code, headers
|
|
3409
|
+
end
|
|
3410
|
+
|
|
3210
3411
|
# List Applicants
|
|
3211
3412
|
# Lists all applicants you've created, sorted by creation date in descending order.
|
|
3212
3413
|
# @param [Hash] opts the optional parameters
|
|
@@ -3273,6 +3474,69 @@ module Onfido
|
|
|
3273
3474
|
return data, status_code, headers
|
|
3274
3475
|
end
|
|
3275
3476
|
|
|
3477
|
+
# List biometric tokens
|
|
3478
|
+
# Returns the biometric tokens associated with the supplied customer user ID.
|
|
3479
|
+
# @param user_id [String] Customer user ID that owns the biometric tokens.
|
|
3480
|
+
# @param [Hash] opts the optional parameters
|
|
3481
|
+
# @return [BiometricTokensResponse]
|
|
3482
|
+
def list_biometric_tokens(user_id, opts = {})
|
|
3483
|
+
data, _status_code, _headers = list_biometric_tokens_with_http_info(user_id, opts)
|
|
3484
|
+
data
|
|
3485
|
+
end
|
|
3486
|
+
|
|
3487
|
+
# List biometric tokens
|
|
3488
|
+
# Returns the biometric tokens associated with the supplied customer user ID.
|
|
3489
|
+
# @param user_id [String] Customer user ID that owns the biometric tokens.
|
|
3490
|
+
# @param [Hash] opts the optional parameters
|
|
3491
|
+
# @return [Array<(BiometricTokensResponse, Integer, Hash)>] BiometricTokensResponse data, response status code and response headers
|
|
3492
|
+
def list_biometric_tokens_with_http_info(user_id, opts = {})
|
|
3493
|
+
if @api_client.config.debugging
|
|
3494
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.list_biometric_tokens ...'
|
|
3495
|
+
end
|
|
3496
|
+
# verify the required parameter 'user_id' is set
|
|
3497
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
|
3498
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling DefaultApi.list_biometric_tokens"
|
|
3499
|
+
end
|
|
3500
|
+
# resource path
|
|
3501
|
+
local_var_path = '/biometric_tokens/{user_id}'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
|
|
3502
|
+
|
|
3503
|
+
# query parameters
|
|
3504
|
+
query_params = opts[:query_params] || {}
|
|
3505
|
+
|
|
3506
|
+
# header parameters
|
|
3507
|
+
header_params = opts[:header_params] || {}
|
|
3508
|
+
# HTTP header 'Accept' (if needed)
|
|
3509
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3510
|
+
|
|
3511
|
+
# form parameters
|
|
3512
|
+
form_params = opts[:form_params] || {}
|
|
3513
|
+
|
|
3514
|
+
# http body (model)
|
|
3515
|
+
post_body = opts[:debug_body]
|
|
3516
|
+
|
|
3517
|
+
# return_type
|
|
3518
|
+
return_type = opts[:debug_return_type] || 'BiometricTokensResponse'
|
|
3519
|
+
|
|
3520
|
+
# auth_names
|
|
3521
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2ClientCredentials', 'Token']
|
|
3522
|
+
|
|
3523
|
+
new_options = opts.merge(
|
|
3524
|
+
:operation => :"DefaultApi.list_biometric_tokens",
|
|
3525
|
+
:header_params => header_params,
|
|
3526
|
+
:query_params => query_params,
|
|
3527
|
+
:form_params => form_params,
|
|
3528
|
+
:body => post_body,
|
|
3529
|
+
:auth_names => auth_names,
|
|
3530
|
+
:return_type => return_type
|
|
3531
|
+
)
|
|
3532
|
+
|
|
3533
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
3534
|
+
if @api_client.config.debugging
|
|
3535
|
+
@api_client.config.logger.debug "API called: DefaultApi#list_biometric_tokens\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3536
|
+
end
|
|
3537
|
+
return data, status_code, headers
|
|
3538
|
+
end
|
|
3539
|
+
|
|
3276
3540
|
# Retrieve Checks
|
|
3277
3541
|
# Retrieves a single check. Returns a check object.
|
|
3278
3542
|
# @param applicant_id [String]
|
|
@@ -3974,6 +4238,75 @@ module Onfido
|
|
|
3974
4238
|
return data, status_code, headers
|
|
3975
4239
|
end
|
|
3976
4240
|
|
|
4241
|
+
# Retrieve watchlist mesh alert risks
|
|
4242
|
+
# Retrieves the detailed risks associated with a watchlist mesh alert.
|
|
4243
|
+
# @param alert_id [String] The unique identifier of the alert whose risks you want to retrieve.
|
|
4244
|
+
# @param [Hash] opts the optional parameters
|
|
4245
|
+
# @option opts [Integer] :page The page of results to retrieve. (default to 1)
|
|
4246
|
+
# @option opts [Integer] :per_page The number of risks to return per page. (default to 25)
|
|
4247
|
+
# @return [Array<WatchlistMeshAlertRisk>]
|
|
4248
|
+
def list_watchlist_mesh_alert_risks(alert_id, opts = {})
|
|
4249
|
+
data, _status_code, _headers = list_watchlist_mesh_alert_risks_with_http_info(alert_id, opts)
|
|
4250
|
+
data
|
|
4251
|
+
end
|
|
4252
|
+
|
|
4253
|
+
# Retrieve watchlist mesh alert risks
|
|
4254
|
+
# Retrieves the detailed risks associated with a watchlist mesh alert.
|
|
4255
|
+
# @param alert_id [String] The unique identifier of the alert whose risks you want to retrieve.
|
|
4256
|
+
# @param [Hash] opts the optional parameters
|
|
4257
|
+
# @option opts [Integer] :page The page of results to retrieve. (default to 1)
|
|
4258
|
+
# @option opts [Integer] :per_page The number of risks to return per page. (default to 25)
|
|
4259
|
+
# @return [Array<(Array<WatchlistMeshAlertRisk>, Integer, Hash)>] Array<WatchlistMeshAlertRisk> data, response status code and response headers
|
|
4260
|
+
def list_watchlist_mesh_alert_risks_with_http_info(alert_id, opts = {})
|
|
4261
|
+
if @api_client.config.debugging
|
|
4262
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.list_watchlist_mesh_alert_risks ...'
|
|
4263
|
+
end
|
|
4264
|
+
# verify the required parameter 'alert_id' is set
|
|
4265
|
+
if @api_client.config.client_side_validation && alert_id.nil?
|
|
4266
|
+
fail ArgumentError, "Missing the required parameter 'alert_id' when calling DefaultApi.list_watchlist_mesh_alert_risks"
|
|
4267
|
+
end
|
|
4268
|
+
# resource path
|
|
4269
|
+
local_var_path = '/complyadvantage_watchlists/alerts/{alert_id}/risks'.sub('{' + 'alert_id' + '}', CGI.escape(alert_id.to_s))
|
|
4270
|
+
|
|
4271
|
+
# query parameters
|
|
4272
|
+
query_params = opts[:query_params] || {}
|
|
4273
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
4274
|
+
query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
|
|
4275
|
+
|
|
4276
|
+
# header parameters
|
|
4277
|
+
header_params = opts[:header_params] || {}
|
|
4278
|
+
# HTTP header 'Accept' (if needed)
|
|
4279
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
4280
|
+
|
|
4281
|
+
# form parameters
|
|
4282
|
+
form_params = opts[:form_params] || {}
|
|
4283
|
+
|
|
4284
|
+
# http body (model)
|
|
4285
|
+
post_body = opts[:debug_body]
|
|
4286
|
+
|
|
4287
|
+
# return_type
|
|
4288
|
+
return_type = opts[:debug_return_type] || 'Array<WatchlistMeshAlertRisk>'
|
|
4289
|
+
|
|
4290
|
+
# auth_names
|
|
4291
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2ClientCredentials', 'Token']
|
|
4292
|
+
|
|
4293
|
+
new_options = opts.merge(
|
|
4294
|
+
:operation => :"DefaultApi.list_watchlist_mesh_alert_risks",
|
|
4295
|
+
:header_params => header_params,
|
|
4296
|
+
:query_params => query_params,
|
|
4297
|
+
:form_params => form_params,
|
|
4298
|
+
:body => post_body,
|
|
4299
|
+
:auth_names => auth_names,
|
|
4300
|
+
:return_type => return_type
|
|
4301
|
+
)
|
|
4302
|
+
|
|
4303
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
4304
|
+
if @api_client.config.debugging
|
|
4305
|
+
@api_client.config.logger.debug "API called: DefaultApi#list_watchlist_mesh_alert_risks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
4306
|
+
end
|
|
4307
|
+
return data, status_code, headers
|
|
4308
|
+
end
|
|
4309
|
+
|
|
3977
4310
|
# List matches (BETA)
|
|
3978
4311
|
# List match IDs on this monitor, as well as their enabled/disabled status
|
|
3979
4312
|
# @param monitor_id [String]
|
|
@@ -4699,6 +5032,86 @@ module Onfido
|
|
|
4699
5032
|
return data, status_code, headers
|
|
4700
5033
|
end
|
|
4701
5034
|
|
|
5035
|
+
# Update biometric token
|
|
5036
|
+
# Updates a biometric token's status.
|
|
5037
|
+
# @param user_id [String] Customer user ID that owns the biometric token.
|
|
5038
|
+
# @param token_uuid [String] Biometric token UUID.
|
|
5039
|
+
# @param biometric_token_updater [BiometricTokenUpdater] Biometric token update payload.
|
|
5040
|
+
# @param [Hash] opts the optional parameters
|
|
5041
|
+
# @return [UpdatedBiometricTokenResponse]
|
|
5042
|
+
def update_biometric_token(user_id, token_uuid, biometric_token_updater, opts = {})
|
|
5043
|
+
data, _status_code, _headers = update_biometric_token_with_http_info(user_id, token_uuid, biometric_token_updater, opts)
|
|
5044
|
+
data
|
|
5045
|
+
end
|
|
5046
|
+
|
|
5047
|
+
# Update biometric token
|
|
5048
|
+
# Updates a biometric token's status.
|
|
5049
|
+
# @param user_id [String] Customer user ID that owns the biometric token.
|
|
5050
|
+
# @param token_uuid [String] Biometric token UUID.
|
|
5051
|
+
# @param biometric_token_updater [BiometricTokenUpdater] Biometric token update payload.
|
|
5052
|
+
# @param [Hash] opts the optional parameters
|
|
5053
|
+
# @return [Array<(UpdatedBiometricTokenResponse, Integer, Hash)>] UpdatedBiometricTokenResponse data, response status code and response headers
|
|
5054
|
+
def update_biometric_token_with_http_info(user_id, token_uuid, biometric_token_updater, opts = {})
|
|
5055
|
+
if @api_client.config.debugging
|
|
5056
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.update_biometric_token ...'
|
|
5057
|
+
end
|
|
5058
|
+
# verify the required parameter 'user_id' is set
|
|
5059
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
|
5060
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling DefaultApi.update_biometric_token"
|
|
5061
|
+
end
|
|
5062
|
+
# verify the required parameter 'token_uuid' is set
|
|
5063
|
+
if @api_client.config.client_side_validation && token_uuid.nil?
|
|
5064
|
+
fail ArgumentError, "Missing the required parameter 'token_uuid' when calling DefaultApi.update_biometric_token"
|
|
5065
|
+
end
|
|
5066
|
+
# verify the required parameter 'biometric_token_updater' is set
|
|
5067
|
+
if @api_client.config.client_side_validation && biometric_token_updater.nil?
|
|
5068
|
+
fail ArgumentError, "Missing the required parameter 'biometric_token_updater' when calling DefaultApi.update_biometric_token"
|
|
5069
|
+
end
|
|
5070
|
+
# resource path
|
|
5071
|
+
local_var_path = '/biometric_tokens/{user_id}/{token_uuid}'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s)).sub('{' + 'token_uuid' + '}', CGI.escape(token_uuid.to_s))
|
|
5072
|
+
|
|
5073
|
+
# query parameters
|
|
5074
|
+
query_params = opts[:query_params] || {}
|
|
5075
|
+
|
|
5076
|
+
# header parameters
|
|
5077
|
+
header_params = opts[:header_params] || {}
|
|
5078
|
+
# HTTP header 'Accept' (if needed)
|
|
5079
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
5080
|
+
# HTTP header 'Content-Type'
|
|
5081
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
5082
|
+
if !content_type.nil?
|
|
5083
|
+
header_params['Content-Type'] = content_type
|
|
5084
|
+
end
|
|
5085
|
+
|
|
5086
|
+
# form parameters
|
|
5087
|
+
form_params = opts[:form_params] || {}
|
|
5088
|
+
|
|
5089
|
+
# http body (model)
|
|
5090
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(biometric_token_updater)
|
|
5091
|
+
|
|
5092
|
+
# return_type
|
|
5093
|
+
return_type = opts[:debug_return_type] || 'UpdatedBiometricTokenResponse'
|
|
5094
|
+
|
|
5095
|
+
# auth_names
|
|
5096
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2ClientCredentials', 'Token']
|
|
5097
|
+
|
|
5098
|
+
new_options = opts.merge(
|
|
5099
|
+
:operation => :"DefaultApi.update_biometric_token",
|
|
5100
|
+
:header_params => header_params,
|
|
5101
|
+
:query_params => query_params,
|
|
5102
|
+
:form_params => form_params,
|
|
5103
|
+
:body => post_body,
|
|
5104
|
+
:auth_names => auth_names,
|
|
5105
|
+
:return_type => return_type
|
|
5106
|
+
)
|
|
5107
|
+
|
|
5108
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
5109
|
+
if @api_client.config.debugging
|
|
5110
|
+
@api_client.config.logger.debug "API called: DefaultApi#update_biometric_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
5111
|
+
end
|
|
5112
|
+
return data, status_code, headers
|
|
5113
|
+
end
|
|
5114
|
+
|
|
4702
5115
|
# Update passkey
|
|
4703
5116
|
# Updates a passkey's state.
|
|
4704
5117
|
# @param username [String] Username that owns the passkey.
|
data/lib/onfido/api_client.rb
CHANGED
|
@@ -35,7 +35,7 @@ module Onfido
|
|
|
35
35
|
# @option config [Configuration] Configuration for initializing the object, default to Configuration.default
|
|
36
36
|
def initialize(config = Configuration.default)
|
|
37
37
|
@config = config
|
|
38
|
-
@user_agent = "onfido-ruby/6.
|
|
38
|
+
@user_agent = "onfido-ruby/6.3.0"
|
|
39
39
|
@default_headers = {
|
|
40
40
|
'Content-Type' => 'application/json',
|
|
41
41
|
'User-Agent' => @user_agent
|
|
@@ -142,7 +142,11 @@ module Onfido
|
|
|
142
142
|
form_params.each do |key, value|
|
|
143
143
|
case value
|
|
144
144
|
when ::File, ::Tempfile
|
|
145
|
-
|
|
145
|
+
mime = Marcel::MimeType.for(Pathname.new(value.path))
|
|
146
|
+
if mime == 'application/octet-stream'
|
|
147
|
+
mime = Marcel::MimeType.for(extension: File.extname(value.path).delete_prefix('.')) || mime
|
|
148
|
+
end
|
|
149
|
+
data[key] = Faraday::FilePart.new(value.path, mime)
|
|
146
150
|
when ::Array, nil
|
|
147
151
|
# let Faraday handle Array and nil parameters
|
|
148
152
|
data[key] = value
|