didit-sdk 1.0.1 → 2.0.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 +26 -0
- data/lib/didit/resources/address_validation.rb +2 -2
- data/lib/didit/resources/analytics.rb +29 -0
- data/lib/didit/resources/bank.rb +15 -6
- data/lib/didit/resources/database_validation.rb +65 -0
- data/lib/didit/resources/email.rb +22 -2
- data/lib/didit/resources/id_verification.rb +14 -13
- data/lib/didit/resources/id_wallets.rb +84 -0
- data/lib/didit/resources/ip.rb +2 -2
- data/lib/didit/resources/kyb.rb +14 -7
- data/lib/didit/resources/phone.rb +28 -2
- data/lib/didit/resources/pricing.rb +4 -2
- data/lib/didit/resources/sessions.rb +463 -33
- data/lib/didit/resources/transactions.rb +7 -2
- data/lib/didit/resources/travel_rule.rb +96 -0
- data/lib/didit/resources/users.rb +25 -6
- data/lib/didit/resources/wallet_screening.rb +5 -6
- data/lib/didit/resources/webhooks.rb +8 -1
- data/lib/didit/types/aml.rb +19 -0
- data/lib/didit/types/components.rb +908 -28
- data/lib/didit/types/email.rb +28 -0
- data/lib/didit/types/kyb.rb +80 -5
- data/lib/didit/types/phone.rb +38 -0
- data/lib/didit/types/sessions.rb +476 -5
- data/lib/didit/types/travel_rule.rb +7 -0
- data/lib/didit/types/wallet_screening.rb +13 -6
- data/lib/didit/types.rb +121 -0
- data/lib/didit/version.rb +1 -1
- data/sig/didit/resources/analytics.rbs +1 -0
- data/sig/didit/resources/bank.rbs +1 -1
- data/sig/didit/resources/database_validation.rbs +1 -1
- data/sig/didit/resources/email.rbs +1 -1
- data/sig/didit/resources/id_wallets.rbs +2 -0
- data/sig/didit/resources/phone.rbs +1 -1
- data/sig/didit/resources/sessions.rbs +14 -5
- data/sig/didit/resources/transactions.rbs +1 -1
- data/sig/didit/resources/travel_rule.rbs +5 -0
- data/sig/didit/resources/users.rbs +1 -1
- data/sig/didit/resources/wallet_screening.rbs +1 -1
- data/sig/didit/resources/webhooks.rbs +1 -1
- data/sig/didit/types/aml.rbs +18 -0
- data/sig/didit/types/bank.rbs +1 -1
- data/sig/didit/types/components.rbs +780 -4
- data/sig/didit/types/database_validation.rbs +1 -1
- data/sig/didit/types/email.rbs +22 -1
- data/sig/didit/types/id_wallets.rbs +4 -0
- data/sig/didit/types/kyb.rbs +75 -5
- data/sig/didit/types/phone.rbs +29 -1
- data/sig/didit/types/sessions.rbs +462 -2
- data/sig/didit/types/travel_rule.rbs +9 -0
- data/sig/didit/types/users.rbs +1 -1
- data/sig/didit/types/wallet_screening.rbs +5 -1
- data/sig/didit/types/webhooks.rbs +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4f456e6d9dae5c6bb1258bd56b8359818c0ed75f8ea803cdca04e372647a8d11
|
|
4
|
+
data.tar.gz: 8d84c88d4872ef9f8aa65f30052a56c74d91e73ef1f01e51c7d5fb9840ad65e5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ba9f922bfd7028e4ec6c212f28a40e2b5e70c298d502b0db6a2d2b2c262a645fb91eff39014e684498f472be218dc02f648be2fd526163e5edd1c8dce5dab105
|
|
7
|
+
data.tar.gz: 6561f989fff74b23837a595cee9b91747b19701ee94f1ddee01b2cde3ba7f358dc1ae1f2eff1cec2d870347c64816f036de5637e511252122c9ccecfab3bd133
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.0.0](https://github.com/didit-protocol/sdk-ruby/compare/v1.0.1...v2.0.0) (2026-11-05)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### ⚠ BREAKING CHANGES
|
|
7
|
+
|
|
8
|
+
* **spec:** the API spec sync changes the SDK surface.
|
|
9
|
+
- `sessions.retrieve_decision` (`GET /v3/session/{sessionId}/decision/`): response 200 `signatures[].confirmation.channel`: can now be null
|
|
10
|
+
- `sessions.retrieve_decision` (`GET /v3/session/{sessionId}/decision/`): response 200 `registry_checks[].company.registry_data`: can now be null
|
|
11
|
+
- `sessions.retrieve_decision` (`GET /v3/session/{sessionId}/decision/`): response 200 `registry_checks[].ownership_structure`: can now be null
|
|
12
|
+
- `email.assess_risk` (`POST /v3/email/risk/`): response 200 `email.email_intelligence.reason_codes[]`: type changed from string to object
|
|
13
|
+
- `kyb.select` (`POST /v3/kyb/select/`): response 200 `kyb_registry.registry_data`: can now be null
|
|
14
|
+
- `kyb.list_shareholders` (`POST /v3/kyb/shareholders/`): response 200 `kyb_registry.registry_data`: can now be null
|
|
15
|
+
- `kyb.list_ubos` (`POST /v3/kyb/ubo/`): response 200 `kyb_registry.registry_data`: can now be null
|
|
16
|
+
- `phone.assess_risk` (`POST /v3/phone/risk/`): response 200 `phone.phone_intelligence.reason_codes[]`: type changed from string to object
|
|
17
|
+
- `sessions.import_shared` (`POST /v3/session/import-shared/`): response 201 `signatures[].confirmation.channel`: can now be null
|
|
18
|
+
- `sessions.import_shared` (`POST /v3/session/import-shared/`): response 201 `registry_checks[].company.registry_data`: can now be null
|
|
19
|
+
- `sessions.import_shared` (`POST /v3/session/import-shared/`): response 201 `registry_checks[].ownership_structure`: can now be null
|
|
20
|
+
- `sessions.signatures.validate` (`POST /v3/session/{sessionId}/signatures/{nodeId}/validate/`): response 200 `signatures[].confirmation.channel`: can now be null
|
|
21
|
+
|
|
22
|
+
### API Spec Updates
|
|
23
|
+
|
|
24
|
+
* **spec:** sync API spec 2026-11-04 ([5299349](https://github.com/didit-protocol/sdk-ruby/commit/529934919db87731a0d4f4eec5d51e8fd627cac0))
|
|
25
|
+
* **spec:** sync API spec 2026-11-04 ([7282245](https://github.com/didit-protocol/sdk-ruby/commit/72822454ca1e4b130fe37d403ef6958ac4701433))
|
|
26
|
+
* **spec:** sync API spec 2026-11-05 ([ced5cdf](https://github.com/didit-protocol/sdk-ruby/commit/ced5cdf2388483c754c2d0ecc137be3fa4c15421))
|
|
27
|
+
* **spec:** sync API spec 2026-11-05 ([d0444ca](https://github.com/didit-protocol/sdk-ruby/commit/d0444caa414fe0cd5404e4241d9e57081adcb07e))
|
|
28
|
+
|
|
3
29
|
## [1.0.1](https://github.com/didit-protocol/sdk-ruby/compare/v1.0.0...v1.0.1) (2026-10-29)
|
|
4
30
|
|
|
5
31
|
|
|
@@ -28,8 +28,8 @@ module Didit
|
|
|
28
28
|
# **Authentication.** Send your application's API key in `x-api-key`. Missing or invalid credentials return
|
|
29
29
|
# `403` - this API never returns `401`.
|
|
30
30
|
#
|
|
31
|
-
# **Rate limit.** Shared write budget of 300 requests per minute per API key across
|
|
32
|
-
#
|
|
31
|
+
# **Rate limit.** Shared write budget of 300 requests per minute per API key across POST/PATCH/DELETE endpoints
|
|
32
|
+
# (transaction creates and event ingestion have a separate budget of 600).
|
|
33
33
|
#
|
|
34
34
|
# +POST /v3/address-validation/+
|
|
35
35
|
#
|
|
@@ -82,6 +82,35 @@ module Didit
|
|
|
82
82
|
request_options: request_options
|
|
83
83
|
)
|
|
84
84
|
end
|
|
85
|
+
|
|
86
|
+
# Get today's verifications by hour
|
|
87
|
+
#
|
|
88
|
+
# Today's user verification (KYC) sessions, from local midnight in `tz`, counted per local hour they were
|
|
89
|
+
# created in, next to the same hours of the same weekday one week before, and split by the outcome each one
|
|
90
|
+
# holds now: approved, in review or declined. This is the volume card of the Business Console's Home.
|
|
91
|
+
#
|
|
92
|
+
# `total` is today so far. `previous_total_so_far` counts the comparison day only up to the same local time, so
|
|
93
|
+
# a change between them compares the same part of both days. The hours still to come today are `0`. A day on
|
|
94
|
+
# which the clocks change has 23 or 25 hours: the missing hour stays `0` and the repeated hour holds both.
|
|
95
|
+
#
|
|
96
|
+
# +GET /v3/organization/{organization_id}/application/{application_id}/analytics/today/+
|
|
97
|
+
#
|
|
98
|
+
# @param tz [String] IANA time zone whose midnight starts today, for example `Europe/Madrid` or
|
|
99
|
+
# `America/Mexico_City`. Omit it for UTC.
|
|
100
|
+
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
101
|
+
# @return [Didit::Types::ApplicationAnalyticsToday]
|
|
102
|
+
def retrieve_today(tz: OMIT, request_options: nil)
|
|
103
|
+
@client.request(
|
|
104
|
+
:get,
|
|
105
|
+
"/v3/organization/{organization_id}/application/{application_id}/analytics/today/",
|
|
106
|
+
query: {
|
|
107
|
+
"tz" => tz
|
|
108
|
+
},
|
|
109
|
+
scope: :application,
|
|
110
|
+
response: Types::ApplicationAnalyticsToday,
|
|
111
|
+
request_options: request_options
|
|
112
|
+
)
|
|
113
|
+
end
|
|
85
114
|
end
|
|
86
115
|
end
|
|
87
116
|
end
|
data/lib/didit/resources/bank.rb
CHANGED
|
@@ -7,6 +7,10 @@ module Didit
|
|
|
7
7
|
class Bank < Didit::Resource
|
|
8
8
|
# Check a bank account
|
|
9
9
|
#
|
|
10
|
+
# **Not available in production yet.** Bank Verification is switched off in production, so until it is switched
|
|
11
|
+
# on this endpoint answers `404` with `bank_verification_not_available`. Do not build on it yet. The rest of
|
|
12
|
+
# this description is what the endpoint does once it is available.
|
|
13
|
+
#
|
|
10
14
|
# Check that a bank account belongs to the person or company you name, before you send money to it. No session
|
|
11
15
|
# and no sign-in: send the name and the account, read the result. It is the [account
|
|
12
16
|
# check](/core-technology/bank-verification/account-check) of the Bank Verification step, run from your backend.
|
|
@@ -26,10 +30,10 @@ module Didit
|
|
|
26
30
|
# **Every request is a new check.** There is no idempotency key and no endpoint to read a check back, so a
|
|
27
31
|
# retried request runs, and is billed, again. Store the response.
|
|
28
32
|
#
|
|
29
|
-
# **Sandbox.**
|
|
30
|
-
# the account number, choose the answer: `0001` a `close_match` with a
|
|
31
|
-
# without one, `0003` and `0006` a `no_match`, `0004` `cannot_verify`,
|
|
32
|
-
# other ending is a `match`.
|
|
33
|
+
# **Sandbox.** Where Bank Verification is available, a sandbox key calls no bank and is charged nothing. The
|
|
34
|
+
# last 4 characters of the IBAN, else of the account number, choose the answer: `0001` a `close_match` with a
|
|
35
|
+
# `holder_name`, `0002` a `close_match` without one, `0003` and `0006` a `no_match`, `0004` `cannot_verify`,
|
|
36
|
+
# `0005` a `503` and `0009` a `400`. Any other ending is a `match`.
|
|
33
37
|
#
|
|
34
38
|
# **API keys.** A scoped API key needs write access to sessions.
|
|
35
39
|
#
|
|
@@ -44,9 +48,13 @@ module Didit
|
|
|
44
48
|
# @param holder [Hash] The name the account is checked against. Send exactly one of `full_name` and
|
|
45
49
|
# `business_name`.
|
|
46
50
|
# @param vendor_data [String, nil] Your own reference for this check, returned unchanged.
|
|
51
|
+
# @param consent [Boolean] Set to `true` when the account holder has explicitly consented to this check.
|
|
52
|
+
# Required in the countries whose account check needs that consent: without it the check is refused with a `400`
|
|
53
|
+
# whose `field` is `consent` and whose `reason` is `required`, and nothing is billed. Elsewhere it is optional,
|
|
54
|
+
# and Didit records it with the check's charge when you send it.
|
|
47
55
|
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
48
56
|
# @return [Didit::Types::BankAccountCheckResponse]
|
|
49
|
-
def account_check(country:, account:, holder:, vendor_data: OMIT, request_options: nil)
|
|
57
|
+
def account_check(country:, account:, holder:, vendor_data: OMIT, consent: OMIT, request_options: nil)
|
|
50
58
|
@client.request(
|
|
51
59
|
:post,
|
|
52
60
|
"/v3/bank/account-check/",
|
|
@@ -54,7 +62,8 @@ module Didit
|
|
|
54
62
|
"country" => country,
|
|
55
63
|
"account" => account,
|
|
56
64
|
"holder" => holder,
|
|
57
|
-
"vendor_data" => vendor_data
|
|
65
|
+
"vendor_data" => vendor_data,
|
|
66
|
+
"consent" => consent
|
|
58
67
|
},
|
|
59
68
|
response: Types::BankAccountCheckResponse,
|
|
60
69
|
request_options: request_options
|
|
@@ -156,6 +156,39 @@ module Didit
|
|
|
156
156
|
# (A/B/C) in `mex_ine_vigencia`.
|
|
157
157
|
# @param bvn [String] Nigerian Bank Verification Number.
|
|
158
158
|
# @param bank_card_number [String] Bank card number (CHN bank-card verification).
|
|
159
|
+
# @param company_registration_number [String] Company registration number as issued by the companies register:
|
|
160
|
+
# the CNPJ in Brazil (e.g. `11222333000181`), the registration number in South Africa (e.g. `1936/007721/06`).
|
|
161
|
+
# Required by the company registry and company directors services (`bra_company_registry`,
|
|
162
|
+
# `bra_company_directors`, `zaf_company_registry`, `zaf_company_directors`).
|
|
163
|
+
# @param company_name [String] Registered company name, cross-checked against the register entry. Optional for
|
|
164
|
+
# `zaf_company_registry`.
|
|
165
|
+
# @param initials [String] The person's initials as printed on the document. Required by `zaf_drivers_license`;
|
|
166
|
+
# accepted by `zaf_bank_account_holder`.
|
|
167
|
+
# @param licence_number [String] Driving licence number as printed on the card, for `zaf_drivers_license`. When
|
|
168
|
+
# omitted, `document_number` is used.
|
|
169
|
+
# @param refugee_file_number [String] Refugee file number issued by South Africa's Department of Home Affairs.
|
|
170
|
+
# Required by `zaf_refugee`.
|
|
171
|
+
# @param bank_name [String] Name of the bank that holds the account. Required by `zaf_bank_account_holder`.
|
|
172
|
+
# @param bank_account_number [String] Bank account number. Required by `zaf_bank_account_holder`; accepted by
|
|
173
|
+
# `zaf_fraud_prevention`.
|
|
174
|
+
# @param account_type [String] Bank account type for `zaf_bank_account_holder`: `current`, `savings`,
|
|
175
|
+
# `transmission`, `subscriptionShare` or `notKnown`, case-insensitive. Any other value returns `400`. Omit it
|
|
176
|
+
# when you do not know the type: the account-type cross-check is then reported as not confirmed.
|
|
177
|
+
# @param phone_number [String] Contact mobile number, for the services that cross-check contactability
|
|
178
|
+
# (`zaf_bank_account_holder`, `zaf_fraud_prevention`, `zaf_refugee`).
|
|
179
|
+
# @param right_thumb [String] Base64-encoded right thumb fingerprint for `zaf_dha_fingerprint_match`, with
|
|
180
|
+
# `left_thumb` or on its own.
|
|
181
|
+
# @param left_thumb [String] Base64-encoded left thumb fingerprint for `zaf_dha_fingerprint_match`, with
|
|
182
|
+
# `right_thumb` or on its own.
|
|
183
|
+
# @param score_level [Integer] Minimum biometric score level for `zaf_criminal_face_screening`. Defaults to `3`.
|
|
184
|
+
# @param max_matches [Integer] Maximum number of candidate matches `zaf_criminal_face_screening` returns.
|
|
185
|
+
# Defaults to `1`.
|
|
186
|
+
# @param vehicle_register_number [String] Vehicle register number. Required, with `vehicle_licence_plate` and
|
|
187
|
+
# `vin`, by `zaf_vehicle_ownership`.
|
|
188
|
+
# @param vehicle_licence_plate [String] Vehicle licence plate number. Required, with `vehicle_register_number`
|
|
189
|
+
# and `vin`, by `zaf_vehicle_ownership`.
|
|
190
|
+
# @param vin [String] Vehicle Identification Number (VIN or chassis number). Required, with
|
|
191
|
+
# `vehicle_register_number` and `vehicle_licence_plate`, by `zaf_vehicle_ownership`.
|
|
159
192
|
# @param ssn [String] Social Security Number (USA).
|
|
160
193
|
# @param phone [String] Phone number for phone-verification services.
|
|
161
194
|
# @param landline [String] Landline number for phone-verification services.
|
|
@@ -232,6 +265,22 @@ module Didit
|
|
|
232
265
|
emission_number: OMIT,
|
|
233
266
|
bvn: OMIT,
|
|
234
267
|
bank_card_number: OMIT,
|
|
268
|
+
company_registration_number: OMIT,
|
|
269
|
+
company_name: OMIT,
|
|
270
|
+
initials: OMIT,
|
|
271
|
+
licence_number: OMIT,
|
|
272
|
+
refugee_file_number: OMIT,
|
|
273
|
+
bank_name: OMIT,
|
|
274
|
+
bank_account_number: OMIT,
|
|
275
|
+
account_type: OMIT,
|
|
276
|
+
phone_number: OMIT,
|
|
277
|
+
right_thumb: OMIT,
|
|
278
|
+
left_thumb: OMIT,
|
|
279
|
+
score_level: OMIT,
|
|
280
|
+
max_matches: OMIT,
|
|
281
|
+
vehicle_register_number: OMIT,
|
|
282
|
+
vehicle_licence_plate: OMIT,
|
|
283
|
+
vin: OMIT,
|
|
235
284
|
ssn: OMIT,
|
|
236
285
|
phone: OMIT,
|
|
237
286
|
landline: OMIT,
|
|
@@ -304,6 +353,22 @@ module Didit
|
|
|
304
353
|
"emission_number" => emission_number,
|
|
305
354
|
"bvn" => bvn,
|
|
306
355
|
"bank_card_number" => bank_card_number,
|
|
356
|
+
"company_registration_number" => company_registration_number,
|
|
357
|
+
"company_name" => company_name,
|
|
358
|
+
"initials" => initials,
|
|
359
|
+
"licence_number" => licence_number,
|
|
360
|
+
"refugee_file_number" => refugee_file_number,
|
|
361
|
+
"bank_name" => bank_name,
|
|
362
|
+
"bank_account_number" => bank_account_number,
|
|
363
|
+
"account_type" => account_type,
|
|
364
|
+
"phone_number" => phone_number,
|
|
365
|
+
"right_thumb" => right_thumb,
|
|
366
|
+
"left_thumb" => left_thumb,
|
|
367
|
+
"score_level" => score_level,
|
|
368
|
+
"max_matches" => max_matches,
|
|
369
|
+
"vehicle_register_number" => vehicle_register_number,
|
|
370
|
+
"vehicle_licence_plate" => vehicle_licence_plate,
|
|
371
|
+
"vin" => vin,
|
|
307
372
|
"ssn" => ssn,
|
|
308
373
|
"phone" => phone,
|
|
309
374
|
"landline" => landline,
|
|
@@ -26,8 +26,8 @@ module Didit
|
|
|
26
26
|
# **Authentication.** Send your application's API key in `x-api-key`. Missing or invalid credentials return
|
|
27
27
|
# `403` - this API never returns `401`.
|
|
28
28
|
#
|
|
29
|
-
# **Rate limit.** Shared write budget of 300 requests per minute per API key across
|
|
30
|
-
#
|
|
29
|
+
# **Rate limit.** Shared write budget of 300 requests per minute per API key across POST/PATCH/DELETE endpoints
|
|
30
|
+
# (transaction creates and event ingestion have a separate budget of 600).
|
|
31
31
|
#
|
|
32
32
|
# **Social footprint.** Set `enable_social` to `true` to add a `email_social` block: the online platforms this
|
|
33
33
|
# address is registered on, with per-category counts and any profile details available. `profiles_registered: 0`
|
|
@@ -143,6 +143,18 @@ module Didit
|
|
|
143
143
|
# @param disposable_email_action [String] What to do when the domain belongs to a disposable/temporary-mail
|
|
144
144
|
# provider (`email.is_disposable`). `DECLINE` flips the final `status` to `Declined`; `NO_ACTION` records the
|
|
145
145
|
# risk in `email.warnings`.
|
|
146
|
+
# @param enable_enrichment [Boolean] When `true`, also run email intelligence on the address: a risk score and
|
|
147
|
+
# its breach history. Billed as one `email_intelligence_api` unit per request ($0.05 at list price) in addition
|
|
148
|
+
# to this endpoint's own price. The request returns `403` when your balance cannot cover it.
|
|
149
|
+
# @param email_intelligence_score_action [String] Action when the email intelligence risk score is above the
|
|
150
|
+
# threshold. `DECLINE` flips the final `status` to `Declined`; `NO_ACTION` records the signal without declining.
|
|
151
|
+
# Only takes effect when `enable_enrichment` is `true`.
|
|
152
|
+
# @param recent_email_breach_action [String] Action when the address appears in a recent known data breach.
|
|
153
|
+
# `DECLINE` flips the final `status` to `Declined`; `NO_ACTION` records the signal without declining. Only takes
|
|
154
|
+
# effect when `enable_enrichment` is `true`.
|
|
155
|
+
# @param frequent_email_breach_action [String] Action when the address appears in many known data breaches.
|
|
156
|
+
# `DECLINE` flips the final `status` to `Declined`; `NO_ACTION` records the signal without declining. Only takes
|
|
157
|
+
# effect when `enable_enrichment` is `true`.
|
|
146
158
|
# @param enable_social [Boolean] When true, also look up the social footprint of the address - the email,
|
|
147
159
|
# social, professional, e-commerce and entertainment platforms it is registered on. Billed as one `email_social`
|
|
148
160
|
# unit per request in addition to this endpoint's own price.
|
|
@@ -157,6 +169,10 @@ module Didit
|
|
|
157
169
|
duplicated_email_action: OMIT,
|
|
158
170
|
breached_email_action: OMIT,
|
|
159
171
|
disposable_email_action: OMIT,
|
|
172
|
+
enable_enrichment: OMIT,
|
|
173
|
+
email_intelligence_score_action: OMIT,
|
|
174
|
+
recent_email_breach_action: OMIT,
|
|
175
|
+
frequent_email_breach_action: OMIT,
|
|
160
176
|
enable_social: OMIT,
|
|
161
177
|
email_no_social_presence_action: OMIT,
|
|
162
178
|
request_options: nil
|
|
@@ -170,6 +186,10 @@ module Didit
|
|
|
170
186
|
"duplicated_email_action" => duplicated_email_action,
|
|
171
187
|
"breached_email_action" => breached_email_action,
|
|
172
188
|
"disposable_email_action" => disposable_email_action,
|
|
189
|
+
"enable_enrichment" => enable_enrichment,
|
|
190
|
+
"email_intelligence_score_action" => email_intelligence_score_action,
|
|
191
|
+
"recent_email_breach_action" => recent_email_breach_action,
|
|
192
|
+
"frequent_email_breach_action" => frequent_email_breach_action,
|
|
173
193
|
"enable_social" => enable_social,
|
|
174
194
|
"email_no_social_presence_action" => email_no_social_presence_action
|
|
175
195
|
},
|
|
@@ -23,19 +23,20 @@ module Didit
|
|
|
23
23
|
# hard-failure risks always decline: `DOCUMENT_EXPIRED`, `SCREEN_CAPTURE_DETECTED`, `PRINTED_COPY_DETECTED`,
|
|
24
24
|
# `PORTRAIT_MANIPULATION_DETECTED`, `PUBLIC_DOCUMENT_IMAGE_DETECTED`, plus extraction failures
|
|
25
25
|
# (`NAME_NOT_DETECTED`, `DATE_OF_BIRTH_NOT_DETECTED`, `DOCUMENT_NUMBER_NOT_DETECTED`).
|
|
26
|
-
# (`PORTRAIT_IMAGE_NOT_DETECTED`, `
|
|
27
|
-
#
|
|
28
|
-
#
|
|
29
|
-
#
|
|
30
|
-
#
|
|
31
|
-
#
|
|
32
|
-
#
|
|
33
|
-
#
|
|
34
|
-
#
|
|
35
|
-
#
|
|
36
|
-
#
|
|
37
|
-
#
|
|
38
|
-
#
|
|
26
|
+
# (`PORTRAIT_IMAGE_NOT_DETECTED`, `INVALID_DATE`, and `MRZ_NOT_DETECTED` exist in workflow sessions but are
|
|
27
|
+
# never produced by this standalone endpoint. `COULD_NOT_DETECT_DOCUMENT_TYPE` is returned here when the front
|
|
28
|
+
# image does not match a known official document design with high confidence, and declines the request.) Three
|
|
29
|
+
# risk groups are configurable per request via `invalid_mrz_action`, `inconsistent_data_action`, and
|
|
30
|
+
# `expiration_date_not_detected_action` (`DECLINE` or `NO_ACTION`). All other warnings (e.g.
|
|
31
|
+
# `POSSIBLE_DUPLICATED_USER`) are informational and never decline on their own. When
|
|
32
|
+
# `perform_document_liveness=true` (the default) and the forgery check returns no usable score - the provider
|
|
33
|
+
# failed, answered non-200, or answered HTTP 200 with `status="ERR"` - the call returns `200` with `status: "In
|
|
34
|
+
# Review"` and a `DOCUMENT_LIVENESS_NOT_COMPUTED` warning (`log_type: "warning"`) instead of `Approved`: a check
|
|
35
|
+
# that did not run is not evidence that the document is genuine. This escalation is not configurable and never
|
|
36
|
+
# overrides a `Declined`; with `perform_document_liveness=false` the check is skipped and the status follows the
|
|
37
|
+
# remaining warnings as before. A document that cannot be processed at all returns `400` with `{"error":
|
|
38
|
+
# "COULD_NOT_RECOGNIZE_DOCUMENT"}`; a readable but problematic document returns `200` with `status: "Declined"`
|
|
39
|
+
# - always inspect `id_verification.status` and `id_verification.warnings`, not just the HTTP code.
|
|
39
40
|
#
|
|
40
41
|
# **Billing.** Each `200` response consumes one ID Verification API credit (paid from your plan credit or top-up
|
|
41
42
|
# balance). When the organization's balance cannot cover the call, the endpoint returns `403` with the
|
|
@@ -757,6 +757,61 @@ module Didit
|
|
|
757
757
|
)
|
|
758
758
|
end
|
|
759
759
|
|
|
760
|
+
# Start Google Wallet verification
|
|
761
|
+
#
|
|
762
|
+
# Start a Google Wallet sign-in (Google Wallet (ID pass) and US state issuers (mobile driving licence); USA,
|
|
763
|
+
# GBR, BRA, SGP, TWN) without any workflow. Billed once, only when the identity is verified. The response
|
|
764
|
+
# carries next_action.type=request_digital_credential with a request Didit signed for your application, usable
|
|
765
|
+
# only from origin. In a user gesture there, pass next_action.digital_credentials.request to
|
|
766
|
+
# navigator.credentials.get({digital: ...}) (or to Android Credential Manager as GetDigitalCredentialOption
|
|
767
|
+
# requestJson), then POST what the wallet returns to
|
|
768
|
+
# /v3/id-verification/wallets/verifications/{request_id}/response/. The browser offers its own QR code when the
|
|
769
|
+
# wallet is on another device. Sandbox applications get a deterministic simulation (simulated: true) that never
|
|
770
|
+
# contacts the provider.
|
|
771
|
+
#
|
|
772
|
+
# +POST /v3/id-verification/wallets/google-wallet/+
|
|
773
|
+
#
|
|
774
|
+
# @param country [String] ISO 3166-1 alpha-3 country of the Google Wallet identity. * `USA` - USA * `GBR` - GBR
|
|
775
|
+
# * `BRA` - BRA * `SGP` - SGP * `TWN` - TWN
|
|
776
|
+
# @param origin [String] Where your page or app will ask the wallet: the https origin of your page (its host
|
|
777
|
+
# must be in the application's allowed_return_hosts, or be its white-label domain), e.g.
|
|
778
|
+
# https://app.example.com, or android:apk-key-hash:<base64 SHA-256 of your app's signing certificate, no
|
|
779
|
+
# padding>. The wallet refuses the request anywhere else.
|
|
780
|
+
# @param vendor_data [String, nil] Your own reference for this verification (e.g. your user id). Returned in
|
|
781
|
+
# results and webhooks.
|
|
782
|
+
# @param metadata [Hash, nil] Optional JSON object stored with the verification and returned in results and
|
|
783
|
+
# webhooks.
|
|
784
|
+
# @param sandbox_scenario [String] Sandbox applications only: the simulated outcome - 'wallet_cancelled',
|
|
785
|
+
# 'wallet_timeout' or 'wallet_provider_error'; any other scenario (or none) verifies. Rejected on live
|
|
786
|
+
# applications. The full catalog is available at GET /v1/sandbox/scenarios/.
|
|
787
|
+
# @param idempotency_key [String] sent as the Idempotency-Key header
|
|
788
|
+
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
789
|
+
# @return [Didit::Types::DigitalIdWalletApiWalletVerificationResponse]
|
|
790
|
+
def start_google_wallet(
|
|
791
|
+
country:,
|
|
792
|
+
origin:,
|
|
793
|
+
vendor_data: OMIT,
|
|
794
|
+
metadata: OMIT,
|
|
795
|
+
sandbox_scenario: OMIT,
|
|
796
|
+
idempotency_key: OMIT,
|
|
797
|
+
request_options: nil
|
|
798
|
+
)
|
|
799
|
+
@client.request(
|
|
800
|
+
:post,
|
|
801
|
+
"/v3/id-verification/wallets/google-wallet/",
|
|
802
|
+
body: {
|
|
803
|
+
"country" => country,
|
|
804
|
+
"origin" => origin,
|
|
805
|
+
"vendor_data" => vendor_data,
|
|
806
|
+
"metadata" => metadata,
|
|
807
|
+
"sandbox_scenario" => sandbox_scenario
|
|
808
|
+
},
|
|
809
|
+
headers: { "Idempotency-Key" => idempotency_key },
|
|
810
|
+
response: Types::DigitalIdWalletApiWalletVerificationResponse,
|
|
811
|
+
request_options: request_options
|
|
812
|
+
)
|
|
813
|
+
end
|
|
814
|
+
|
|
760
815
|
# Start gov.br verification
|
|
761
816
|
#
|
|
762
817
|
# Start a gov.br sign-in (Governo Federal do Brasil; BRA) without any workflow. Billed once, only when the
|
|
@@ -1463,6 +1518,35 @@ module Didit
|
|
|
1463
1518
|
request_options: request_options
|
|
1464
1519
|
)
|
|
1465
1520
|
end
|
|
1521
|
+
|
|
1522
|
+
# Submit a wallet response
|
|
1523
|
+
#
|
|
1524
|
+
# Digital Credentials API wallets (Google Wallet): send what the wallet returned to your page or app for a
|
|
1525
|
+
# verification whose next_action is request_digital_credential. Didit decrypts it, checks the issuer's signature
|
|
1526
|
+
# against the trusted issuer roots, every returned value against its signed digest, and the device signature
|
|
1527
|
+
# over your origin and this request, then decides the verification: verified (billed once) or declined with the
|
|
1528
|
+
# error code. Single use: a second submit returns the decided verification.
|
|
1529
|
+
#
|
|
1530
|
+
# +POST /v3/id-verification/wallets/verifications/{request_id}/response/+
|
|
1531
|
+
#
|
|
1532
|
+
# @param request_id [String] The request_id the start endpoint returned.
|
|
1533
|
+
# @param response [Hash] Exactly what the wallet returned: {protocol, data} of the DigitalCredential from
|
|
1534
|
+
# navigator.credentials.get, or the parsed credentialJson of Android's DigitalCredential. Encrypted to Didit; do
|
|
1535
|
+
# not alter it.
|
|
1536
|
+
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
1537
|
+
# @return [Didit::Types::DigitalIdWalletApiWalletVerificationResponse]
|
|
1538
|
+
def submit_verification_response(request_id, response:, request_options: nil)
|
|
1539
|
+
@client.request(
|
|
1540
|
+
:post,
|
|
1541
|
+
"/v3/id-verification/wallets/verifications/{request_id}/response/",
|
|
1542
|
+
path_params: { "request_id" => request_id },
|
|
1543
|
+
body: {
|
|
1544
|
+
"response" => response
|
|
1545
|
+
},
|
|
1546
|
+
response: Types::DigitalIdWalletApiWalletVerificationResponse,
|
|
1547
|
+
request_options: request_options
|
|
1548
|
+
)
|
|
1549
|
+
end
|
|
1466
1550
|
end
|
|
1467
1551
|
end
|
|
1468
1552
|
end
|
data/lib/didit/resources/ip.rb
CHANGED
|
@@ -25,8 +25,8 @@ module Didit
|
|
|
25
25
|
# **Authentication.** Send your application's API key in `x-api-key`. Missing or invalid credentials return
|
|
26
26
|
# `403` - this API never returns `401`.
|
|
27
27
|
#
|
|
28
|
-
# **Rate limit.** Shared write budget of 300 requests per minute per API key across
|
|
29
|
-
#
|
|
28
|
+
# **Rate limit.** Shared write budget of 300 requests per minute per API key across POST/PATCH/DELETE endpoints
|
|
29
|
+
# (transaction creates and event ingestion have a separate budget of 600).
|
|
30
30
|
#
|
|
31
31
|
# +POST /v3/ip/risk/+
|
|
32
32
|
#
|
data/lib/didit/resources/kyb.rb
CHANGED
|
@@ -11,8 +11,10 @@ module Didit
|
|
|
11
11
|
# ownership bands) of one candidate returned by `POST /v3/kyb/search/`.
|
|
12
12
|
#
|
|
13
13
|
# **Pairing with search.** Pass the candidate's `kyb_response_id` exactly as returned by a search of the same
|
|
14
|
-
# application.
|
|
15
|
-
# registry
|
|
14
|
+
# application. Search at the tier you intend to buy (`tier` on `POST /v3/kyb/search/`), because the search runs
|
|
15
|
+
# on the registry chain that serves that tier and an empty Lite search is not proof that the registry does not
|
|
16
|
+
# hold the company. When the country's ownership data lives at another registry, Didit re-finds the company
|
|
17
|
+
# there by registration number, at no extra cost.
|
|
16
18
|
#
|
|
17
19
|
# **Billing.** Billed at the country's Shareholders price - see [KYB registry
|
|
18
20
|
# pricing](/getting-started/kyb-registry-pricing). When the registry holds no shareholder record for the company
|
|
@@ -32,7 +34,8 @@ module Didit
|
|
|
32
34
|
# +POST /v3/kyb/shareholders/+
|
|
33
35
|
#
|
|
34
36
|
# @param kyb_response_id [String] Candidate handle from `POST /v3/kyb/search/`
|
|
35
|
-
# (`kyb_registry.companies[].kyb_response_id`). Ephemeral
|
|
37
|
+
# (`kyb_registry.companies[].kyb_response_id`). Ephemeral: use it shortly after the search that produced it.
|
|
38
|
+
# Handles can be long, so store and send the value exactly as returned, without trimming or assuming a length.
|
|
36
39
|
# @param vendor_data [String] Your identifier for this company; echoed back and stored with the business
|
|
37
40
|
# session.
|
|
38
41
|
# @param metadata [Hash, nil] Free-form JSON stored with the business session and echoed back.
|
|
@@ -68,8 +71,10 @@ module Didit
|
|
|
68
71
|
# by `POST /v3/kyb/search/`.
|
|
69
72
|
#
|
|
70
73
|
# **Pairing with search.** Pass the candidate's `kyb_response_id` exactly as returned by a search of the same
|
|
71
|
-
# application.
|
|
72
|
-
# registry
|
|
74
|
+
# application. Search at the tier you intend to buy (`tier` on `POST /v3/kyb/search/`), because the search runs
|
|
75
|
+
# on the registry chain that serves that tier and an empty Lite search is not proof that the registry does not
|
|
76
|
+
# hold the company. When the country's ownership data lives at another registry, Didit re-finds the company
|
|
77
|
+
# there by registration number, at no extra cost.
|
|
73
78
|
#
|
|
74
79
|
# **Billing.** Billed at the country's UBO price - see [KYB registry
|
|
75
80
|
# pricing](/getting-started/kyb-registry-pricing). The tier delivered is the highest the country and the
|
|
@@ -89,7 +94,8 @@ module Didit
|
|
|
89
94
|
# +POST /v3/kyb/ubo/+
|
|
90
95
|
#
|
|
91
96
|
# @param kyb_response_id [String] Candidate handle from `POST /v3/kyb/search/`
|
|
92
|
-
# (`kyb_registry.companies[].kyb_response_id`). Ephemeral
|
|
97
|
+
# (`kyb_registry.companies[].kyb_response_id`). Ephemeral: use it shortly after the search that produced it.
|
|
98
|
+
# Handles can be long, so store and send the value exactly as returned, without trimming or assuming a length.
|
|
93
99
|
# @param vendor_data [String] Your identifier for this company; echoed back and stored with the business
|
|
94
100
|
# session.
|
|
95
101
|
# @param metadata [Hash, nil] Free-form JSON stored with the business session and echoed back.
|
|
@@ -229,7 +235,8 @@ module Didit
|
|
|
229
235
|
# +POST /v3/kyb/select/+
|
|
230
236
|
#
|
|
231
237
|
# @param kyb_response_id [String] Candidate handle from `POST /v3/kyb/search/`
|
|
232
|
-
# (`kyb_registry.companies[].kyb_response_id`). Ephemeral
|
|
238
|
+
# (`kyb_registry.companies[].kyb_response_id`). Ephemeral: use it shortly after the search that produced it.
|
|
239
|
+
# Handles can be long, so store and send the value exactly as returned, without trimming or assuming a length.
|
|
233
240
|
# @param vendor_data [String] Your identifier for this company; echoed back and stored with the business
|
|
234
241
|
# session.
|
|
235
242
|
# @param metadata [Hash, nil] Free-form JSON stored with the business session and echoed back.
|
|
@@ -27,8 +27,8 @@ module Didit
|
|
|
27
27
|
# **Authentication.** Send your application's API key in `x-api-key`. Missing or invalid credentials return
|
|
28
28
|
# `403` - this API never returns `401`.
|
|
29
29
|
#
|
|
30
|
-
# **Rate limit.** Shared write budget of 300 requests per minute per API key across
|
|
31
|
-
#
|
|
30
|
+
# **Rate limit.** Shared write budget of 300 requests per minute per API key across POST/PATCH/DELETE endpoints
|
|
31
|
+
# (transaction creates and event ingestion have a separate budget of 600).
|
|
32
32
|
#
|
|
33
33
|
# **Social footprint.** Set `enable_social` to `true` to add a `phone_social` block: the online platforms this
|
|
34
34
|
# number is registered on, with per-category counts and any profile details available. `profiles_registered: 0`
|
|
@@ -143,6 +143,22 @@ module Didit
|
|
|
143
143
|
# @param voip_number_action [String] What to do when the carrier lookup reports a virtual line type - `voip`,
|
|
144
144
|
# `isp`, or `vpn` (`phone.is_virtual`). `DECLINE` flips the final `status` to `Declined`; `NO_ACTION` records
|
|
145
145
|
# the risk in `phone.warnings`.
|
|
146
|
+
# @param enable_enrichment [Boolean] When `true`, also run phone intelligence on the number: a risk score, the
|
|
147
|
+
# line type, whether it was recently ported and a trust index. Billed as one `phone_intelligence_api` unit per
|
|
148
|
+
# request ($0.05 at list price) in addition to this endpoint's own price. The request returns `403` when your
|
|
149
|
+
# balance cannot cover it.
|
|
150
|
+
# @param phone_intelligence_score_action [String] Action when the phone intelligence risk score is above the
|
|
151
|
+
# threshold. `DECLINE` flips the final `status` to `Declined`; `NO_ACTION` records the signal without declining.
|
|
152
|
+
# Only takes effect when `enable_enrichment` is `true`.
|
|
153
|
+
# @param phone_type_risk_action [String] Action when the number is a high-risk line type. `DECLINE` flips the
|
|
154
|
+
# final `status` to `Declined`; `NO_ACTION` records the signal without declining. Only takes effect when
|
|
155
|
+
# `enable_enrichment` is `true`.
|
|
156
|
+
# @param recent_port_action [String] Action when the number was ported to another carrier recently. `DECLINE`
|
|
157
|
+
# flips the final `status` to `Declined`; `NO_ACTION` records the signal without declining. Only takes effect
|
|
158
|
+
# when `enable_enrichment` is `true`.
|
|
159
|
+
# @param low_phone_trust_action [String] Action when the phone intelligence trust index is at or below the
|
|
160
|
+
# threshold. `DECLINE` flips the final `status` to `Declined`; `NO_ACTION` records the signal without declining.
|
|
161
|
+
# Only takes effect when `enable_enrichment` is `true`.
|
|
146
162
|
# @param enable_social [Boolean] When true, also look up the social footprint of the number - the messaging,
|
|
147
163
|
# social, e-commerce and professional platforms it is registered on. Billed as one `phone_social` unit per
|
|
148
164
|
# request in addition to this endpoint's own price.
|
|
@@ -157,6 +173,11 @@ module Didit
|
|
|
157
173
|
duplicated_phone_number_action: OMIT,
|
|
158
174
|
disposable_number_action: OMIT,
|
|
159
175
|
voip_number_action: OMIT,
|
|
176
|
+
enable_enrichment: OMIT,
|
|
177
|
+
phone_intelligence_score_action: OMIT,
|
|
178
|
+
phone_type_risk_action: OMIT,
|
|
179
|
+
recent_port_action: OMIT,
|
|
180
|
+
low_phone_trust_action: OMIT,
|
|
160
181
|
enable_social: OMIT,
|
|
161
182
|
phone_no_social_presence_action: OMIT,
|
|
162
183
|
request_options: nil
|
|
@@ -170,6 +191,11 @@ module Didit
|
|
|
170
191
|
"duplicated_phone_number_action" => duplicated_phone_number_action,
|
|
171
192
|
"disposable_number_action" => disposable_number_action,
|
|
172
193
|
"voip_number_action" => voip_number_action,
|
|
194
|
+
"enable_enrichment" => enable_enrichment,
|
|
195
|
+
"phone_intelligence_score_action" => phone_intelligence_score_action,
|
|
196
|
+
"phone_type_risk_action" => phone_type_risk_action,
|
|
197
|
+
"recent_port_action" => recent_port_action,
|
|
198
|
+
"low_phone_trust_action" => low_phone_trust_action,
|
|
173
199
|
"enable_social" => enable_social,
|
|
174
200
|
"phone_no_social_presence_action" => phone_no_social_presence_action
|
|
175
201
|
},
|
|
@@ -8,8 +8,10 @@ module Didit
|
|
|
8
8
|
# Get bank verification prices (public, unauthenticated)
|
|
9
9
|
#
|
|
10
10
|
# Returns the list price of each Bank Verification method in every country: bank sign-in with its balance and
|
|
11
|
-
# transactions add-ons, and the account check.
|
|
12
|
-
#
|
|
11
|
+
# transactions add-ons, and the account check. Bank Verification is not enabled in production yet, so a bank
|
|
12
|
+
# step is refused on production workflows until it is; treat these prices as a list price, not as an offer you
|
|
13
|
+
# can buy today. Use it to quote a bank step before you build a workflow, or to show bank prices in your own
|
|
14
|
+
# product.
|
|
13
15
|
#
|
|
14
16
|
# Public: send no auth header. The response contains no organization data and is the same for every caller. It
|
|
15
17
|
# is cached publicly for one hour and carries an `ETag`, so send `If-None-Match` to get a `304 Not Modified`
|