smile-identity-core 2.2.3 → 2.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +12 -0
- data/.github/workflows/release.yml +1 -1
- data/.rubocop.yml +181 -8
- data/CHANGELOG.md +72 -56
- data/Gemfile.lock +4 -2
- data/README.md +7 -7
- data/examples/aml_check.rb +3 -2
- data/examples/biometric_kyc.rb +7 -7
- data/examples/business_verification.rb +3 -3
- data/examples/document_verification.rb +9 -9
- data/examples/enhanced_document_verification.rb +9 -9
- data/examples/enhanced_kyc.rb +4 -4
- data/examples/example-project/README.md +1 -1
- data/examples/example-project/smart_bank.rb +26 -25
- data/examples/get_web_token.rb +2 -2
- data/examples/smart_selfie_authentication.rb +6 -6
- data/lib/smile-identity-core/aml_check.rb +5 -3
- data/lib/smile-identity-core/business_verification.rb +2 -2
- data/lib/smile-identity-core/constants/env.rb +4 -4
- data/lib/smile-identity-core/id_api.rb +11 -11
- data/lib/smile-identity-core/signature.rb +1 -1
- data/lib/smile-identity-core/utilities.rb +4 -6
- data/lib/smile-identity-core/validations.rb +2 -2
- data/lib/smile-identity-core/version.rb +1 -1
- data/lib/smile-identity-core/web_api.rb +45 -45
- data/smile-identity-core.gemspec +12 -11
- metadata +10 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f2afcbbd6545c88d03ff0b594301cecbadde5254f80596f1ea0eb0618b503675
|
4
|
+
data.tar.gz: f61285ea5a4a1bd2100c9a7595df42f99e6d45a83bb937669fdb7850b08c2742
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c907e4c87b263502515cdf0481a74efa8610017d3205b3e5fcd026521ad511c2b6831b23d24485aa6fad62388cd5a207fe77b9530c77ecc0f8d75b33160e5bb
|
7
|
+
data.tar.gz: 696a8eb8bb44d8cb2aec5f97b4f5ecf51789f1310d85e62bdb0f99542d3242fd78980b21740871af592bf7e8616aeafa0c3f6daa40550607f22404a16342de23
|
data/.rubocop.yml
CHANGED
@@ -1,9 +1,149 @@
|
|
1
|
+
---
|
2
|
+
|
1
3
|
require:
|
2
|
-
|
3
|
-
|
4
|
+
- rubocop-rake
|
5
|
+
- rubocop-rspec
|
4
6
|
|
5
7
|
AllCops:
|
6
|
-
TargetRubyVersion: 2.
|
8
|
+
TargetRubyVersion: 2.6
|
9
|
+
NewCops: enable
|
10
|
+
|
11
|
+
Bundler/DuplicatedGem:
|
12
|
+
Enabled: true
|
13
|
+
|
14
|
+
Bundler/GemFilename:
|
15
|
+
Enabled: true
|
16
|
+
|
17
|
+
Layout/ArgumentAlignment:
|
18
|
+
Enabled: true
|
19
|
+
EnforcedStyle: with_fixed_indentation
|
20
|
+
|
21
|
+
Layout/ArrayAlignment:
|
22
|
+
Enabled: true
|
23
|
+
|
24
|
+
Layout/AssignmentIndentation:
|
25
|
+
Enabled: true
|
26
|
+
|
27
|
+
Layout/BlockAlignment:
|
28
|
+
Enabled: true
|
29
|
+
|
30
|
+
Layout/CaseIndentation:
|
31
|
+
Enabled: true
|
32
|
+
|
33
|
+
Layout/ConditionPosition:
|
34
|
+
Enabled: true
|
35
|
+
|
36
|
+
Layout/ElseAlignment:
|
37
|
+
Enabled: true
|
38
|
+
|
39
|
+
Layout/EmptyLineAfterGuardClause:
|
40
|
+
Enabled: true
|
41
|
+
|
42
|
+
Layout/EmptyLineAfterMagicComment:
|
43
|
+
Enabled: true
|
44
|
+
|
45
|
+
Layout/EmptyLinesAroundBlockBody:
|
46
|
+
Enabled: true
|
47
|
+
|
48
|
+
Layout/EmptyLinesAroundClassBody:
|
49
|
+
Enabled: true
|
50
|
+
|
51
|
+
Layout/EmptyLinesAroundModuleBody:
|
52
|
+
Enabled: true
|
53
|
+
|
54
|
+
Layout/EndAlignment:
|
55
|
+
Enabled: true
|
56
|
+
|
57
|
+
Layout/EndOfLine:
|
58
|
+
Enabled: true
|
59
|
+
|
60
|
+
Layout/ExtraSpacing:
|
61
|
+
Enabled: true
|
62
|
+
ForceEqualSignAlignment: false
|
63
|
+
AllowForAlignment: false
|
64
|
+
|
65
|
+
Layout/FirstArgumentIndentation:
|
66
|
+
Enabled: true
|
67
|
+
EnforcedStyle: consistent
|
68
|
+
|
69
|
+
Layout/FirstArrayElementIndentation:
|
70
|
+
Enabled: true
|
71
|
+
EnforcedStyle: consistent
|
72
|
+
|
73
|
+
Layout/FirstHashElementIndentation:
|
74
|
+
Enabled: true
|
75
|
+
EnforcedStyle: consistent
|
76
|
+
|
77
|
+
Layout/HashAlignment:
|
78
|
+
Enabled: true
|
79
|
+
|
80
|
+
Layout/IndentationConsistency:
|
81
|
+
Enabled: true
|
82
|
+
|
83
|
+
Layout/IndentationStyle:
|
84
|
+
Enabled: true
|
85
|
+
|
86
|
+
Layout/IndentationWidth:
|
87
|
+
Enabled: true
|
88
|
+
|
89
|
+
Layout/LeadingEmptyLines:
|
90
|
+
Enabled: true
|
91
|
+
|
92
|
+
Layout/MultilineBlockLayout:
|
93
|
+
Enabled: true
|
94
|
+
|
95
|
+
Layout/MultilineMethodCallIndentation:
|
96
|
+
Enabled: true
|
97
|
+
EnforcedStyle: indented
|
98
|
+
|
99
|
+
Layout/MultilineOperationIndentation:
|
100
|
+
Enabled: true
|
101
|
+
EnforcedStyle: indented
|
102
|
+
|
103
|
+
Layout/ParameterAlignment:
|
104
|
+
Enabled: true
|
105
|
+
|
106
|
+
Layout/SpaceAfterComma:
|
107
|
+
Enabled: true
|
108
|
+
|
109
|
+
Layout/SpaceAroundKeyword:
|
110
|
+
Enabled: true
|
111
|
+
|
112
|
+
Layout/SpaceAroundOperators:
|
113
|
+
Enabled: true
|
114
|
+
|
115
|
+
Layout/SpaceBeforeBlockBraces:
|
116
|
+
Enabled: true
|
117
|
+
|
118
|
+
Layout/SpaceBeforeFirstArg:
|
119
|
+
Enabled: true
|
120
|
+
|
121
|
+
Layout/SpaceInsideBlockBraces:
|
122
|
+
Enabled: true
|
123
|
+
|
124
|
+
Layout/SpaceInsideParens:
|
125
|
+
Enabled: true
|
126
|
+
|
127
|
+
Layout/TrailingEmptyLines:
|
128
|
+
Enabled: true
|
129
|
+
|
130
|
+
Layout/TrailingWhitespace:
|
131
|
+
Enabled: true
|
132
|
+
|
133
|
+
Lint/AmbiguousAssignment:
|
134
|
+
Enabled: true
|
135
|
+
|
136
|
+
Lint/AmbiguousBlockAssociation:
|
137
|
+
Enabled: true
|
138
|
+
|
139
|
+
Lint/AmbiguousOperator:
|
140
|
+
Enabled: true
|
141
|
+
|
142
|
+
Lint/AmbiguousRange:
|
143
|
+
Enabled: true
|
144
|
+
|
145
|
+
Lint/DuplicateElsifCondition:
|
146
|
+
Enabled: true
|
7
147
|
|
8
148
|
Metrics/AbcSize:
|
9
149
|
Max: 30
|
@@ -24,7 +164,8 @@ Naming/FileName:
|
|
24
164
|
Enabled: false
|
25
165
|
|
26
166
|
RSpec/ExampleLength:
|
27
|
-
Enabled:
|
167
|
+
Enabled: true
|
168
|
+
Max: 150
|
28
169
|
|
29
170
|
RSpec/FilePath:
|
30
171
|
Enabled: false
|
@@ -33,13 +174,45 @@ RSpec/InstanceVariable:
|
|
33
174
|
Enabled: false
|
34
175
|
|
35
176
|
RSpec/MultipleExpectations:
|
36
|
-
Enabled:
|
177
|
+
Enabled: true
|
178
|
+
Max: 10
|
37
179
|
|
38
180
|
RSpec/MultipleMemoizedHelpers:
|
39
181
|
Enabled: false
|
40
|
-
|
182
|
+
|
41
183
|
RSpec/NestedGroups:
|
42
|
-
Enabled:
|
184
|
+
Enabled: true
|
185
|
+
Max: 4
|
43
186
|
|
44
|
-
RSpec/
|
187
|
+
RSpec/NoExpectationExample:
|
45
188
|
Enabled: false
|
189
|
+
|
190
|
+
Style/RedundantBegin:
|
191
|
+
Enabled: true
|
192
|
+
|
193
|
+
Style/RedundantCondition:
|
194
|
+
Enabled: true
|
195
|
+
|
196
|
+
Style/RedundantInterpolation:
|
197
|
+
Enabled: true
|
198
|
+
|
199
|
+
Style/RedundantParentheses:
|
200
|
+
Enabled: true
|
201
|
+
|
202
|
+
Style/RedundantReturn:
|
203
|
+
Enabled: true
|
204
|
+
|
205
|
+
Style/StringLiterals:
|
206
|
+
Enabled: true
|
207
|
+
|
208
|
+
Style/TrailingCommaInArguments:
|
209
|
+
Enabled: true
|
210
|
+
EnforcedStyleForMultiline: comma
|
211
|
+
|
212
|
+
Style/TrailingCommaInArrayLiteral:
|
213
|
+
Enabled: true
|
214
|
+
EnforcedStyleForMultiline: comma
|
215
|
+
|
216
|
+
Style/TrailingCommaInHashLiteral:
|
217
|
+
Enabled: true
|
218
|
+
EnforcedStyleForMultiline: comma
|
data/CHANGELOG.md
CHANGED
@@ -1,125 +1,141 @@
|
|
1
1
|
# Changelog
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
|
4
|
-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.
|
4
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
5
5
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
6
|
|
7
|
-
## [2.2.3] - 2023-10-20
|
8
|
-
## Added
|
9
|
-
- Adds support for Enhanced Document Verification
|
10
|
-
|
11
7
|
## [Unreleased]
|
8
|
+
## [2.2.5] - 2024-06-11
|
9
|
+
### Fixed
|
10
|
+
- No changes, fixed deployment issue
|
11
|
+
|
12
|
+
## [2.2.4] - 2024-06-10
|
13
|
+
### Added
|
14
|
+
- Enhanced `strict_match` functionality in AML
|
15
|
+
|
16
|
+
### Changed
|
17
|
+
- Linted the project with internal RuboCop rules
|
18
|
+
|
19
|
+
### Fixed
|
20
|
+
- Removed support for Ruby 2.5 in RuboCop configuration and the gemspec file
|
21
|
+
|
22
|
+
## [2.2.3] - 2023-10-20
|
23
|
+
### Added
|
24
|
+
- Support for Enhanced Document Verification
|
12
25
|
|
13
26
|
## [2.2.2] - 2023-10-05
|
14
27
|
### Changed
|
15
|
-
- Lint project. Enforce
|
28
|
+
- Lint project. Enforce RuboCop rules via GitHub action
|
16
29
|
|
17
|
-
|
18
|
-
Support Ruby 3.2
|
30
|
+
### Added
|
31
|
+
- Support for Ruby 3.2
|
19
32
|
|
20
33
|
## [2.2.1] - 2023-08-31
|
21
34
|
### Changed
|
22
|
-
-
|
35
|
+
- Removed the validation of `id_type` and `id_number` for Document Verification jobs
|
23
36
|
|
24
37
|
## [2.2.0] - 2023-04-05
|
25
38
|
### Added
|
26
|
-
-
|
39
|
+
- Support for AML check
|
40
|
+
|
27
41
|
### Changed
|
28
|
-
-
|
42
|
+
- Fixed business verification docstrings
|
29
43
|
|
30
44
|
## [2.1.2] - 2023-03-09
|
31
45
|
### Changed
|
32
|
-
-
|
46
|
+
- Fixed `get_web_token` by ensuring signature merges into request_params
|
33
47
|
|
34
48
|
## [2.1.1] - 2022-12-13
|
35
49
|
### Added
|
36
|
-
-
|
50
|
+
- UPDATE_PHOTO and COMPARE_USER_INFO to JobType
|
51
|
+
|
37
52
|
### Changed
|
38
|
-
-
|
53
|
+
- Fixed incorrect constant values for JobType SMART_SELFIE_AUTHENTICATION and SMART_SELFIE_REGISTRATION
|
39
54
|
|
40
|
-
|
41
|
-
|
55
|
+
## [2.1.0] - 2022-10-28
|
56
|
+
### Changed
|
42
57
|
- Moved Business verification to IDApi
|
43
58
|
|
44
|
-
|
59
|
+
## [2.0.0] - 2022-10-24
|
45
60
|
### Added
|
46
|
-
-
|
47
|
-
-
|
48
|
-
-
|
61
|
+
- Support for Ruby 3.1
|
62
|
+
- "Examples" folder in documentation
|
63
|
+
- Business Verification product
|
49
64
|
|
50
65
|
### Changed
|
51
|
-
-
|
52
|
-
-
|
53
|
-
-
|
54
|
-
-
|
66
|
+
- Transition from TravisCI to GitHub Actions
|
67
|
+
- Enforced the use of signature on all API calls
|
68
|
+
- Added helper constants SMILE_IDENTITY_CORE::ENV, SMILE_IDENTITY_CORE::ImageType, SMILE_IDENTITY_CORE::JobType
|
69
|
+
- Fixed invalid links in gemspec
|
55
70
|
|
56
71
|
### Removed
|
57
|
-
-
|
58
|
-
-
|
59
|
-
|
72
|
+
- Support for Ruby 2.5.1
|
73
|
+
- `sec_key` as an authentication method
|
74
|
+
|
60
75
|
## [1.2.1] - 2021-12-02
|
61
76
|
### Changed
|
62
|
-
-
|
63
|
-
-
|
77
|
+
- Reverted changes to version SmileIdentityCore.version_as_hash
|
78
|
+
- Used hardcoded apiVersion
|
64
79
|
|
65
80
|
## [1.2.0] - 2021-10-08
|
66
81
|
### Added
|
67
|
-
-
|
82
|
+
- Signature option for signing requests
|
68
83
|
|
69
84
|
## [1.1.0] - 2021-09-29
|
70
|
-
|
71
|
-
-
|
85
|
+
### Added
|
86
|
+
- Version information from SmileIdentityCore.version_as_hash
|
87
|
+
- Changed URLs for both test and production environments
|
72
88
|
|
73
89
|
## [1.0.2] - 2020-01-16
|
74
|
-
|
90
|
+
### Added
|
91
|
+
- {"success":true,"smile_job_id":"job_id"} to the response when polling job status
|
75
92
|
|
76
93
|
## [1.0.1] - 2019-10-24
|
77
|
-
|
78
|
-
|
79
|
-
|
94
|
+
### Updated
|
95
|
+
- Removed first_name and last_name validations from ID information in Web API
|
96
|
+
- Added country, id_number, and id_type validations for ID information in ID API
|
80
97
|
|
81
98
|
## [1.0.0] - 2019-10-11
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
99
|
+
### Updated
|
100
|
+
- Amended the success response when job status is false to be a JSON String containing {"success":true,"smile_job_id":"job_id"}
|
101
|
+
- Added the ID API Class
|
102
|
+
- Added the ability to query ID API from the Web API class
|
103
|
+
- Updated the documentation
|
87
104
|
|
88
105
|
## [0.2.3] - 2019-09-17
|
89
106
|
### Changed
|
90
|
-
- Lenient
|
107
|
+
- Lenient decoding of the API key
|
91
108
|
|
92
109
|
## [0.2.2] - 2019-09-17
|
93
110
|
### Added
|
94
|
-
-
|
111
|
+
- Language to the package information
|
95
112
|
|
96
113
|
## [0.2.1] - 2019-09-05
|
97
|
-
|
98
114
|
### Added
|
99
|
-
-
|
100
|
-
-
|
101
|
-
-
|
115
|
+
- Support for additional formats as inputs
|
116
|
+
- Usage of the signature class in the Web API class
|
117
|
+
- Utilities class with a public `get_job_status` method on WebApi
|
102
118
|
|
103
119
|
### Updated
|
104
|
-
-
|
105
|
-
-
|
120
|
+
- Readme updates
|
121
|
+
- Updated some error messages
|
106
122
|
|
107
123
|
### Fixed
|
108
|
-
-
|
109
|
-
-
|
110
|
-
-
|
124
|
+
- Issue with the loss of optional_callback
|
125
|
+
- Ensured allowance for nil inputs or empty hashes for options and id_info
|
126
|
+
- Confirmation of signature when querying job status
|
111
127
|
|
112
128
|
## [0.2.0] - 2019-08-14
|
113
129
|
### Added
|
114
|
-
-
|
130
|
+
- Return_history and image_links features
|
115
131
|
|
116
132
|
### Removed
|
117
|
-
-
|
133
|
+
- Two parameters: optional_callback and return_job_status in the submit_job function in favor of an options hash
|
118
134
|
|
119
135
|
## [0.1.1] - 2019-07-23
|
120
136
|
### Added
|
121
|
-
-
|
137
|
+
- Additional package configurations
|
122
138
|
|
123
139
|
## [0.1.0] - 2019-07-19
|
124
140
|
### Added
|
125
|
-
- The first release version of Web
|
141
|
+
- The first release version of Web API
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
smile-identity-core (2.2.
|
4
|
+
smile-identity-core (2.2.5)
|
5
5
|
rubyzip (~> 1.2, >= 1.2.3)
|
6
6
|
typhoeus (~> 1.0, >= 1.0.1)
|
7
7
|
|
@@ -21,7 +21,8 @@ GEM
|
|
21
21
|
rainbow (3.1.1)
|
22
22
|
rake (12.3.3)
|
23
23
|
regexp_parser (2.6.0)
|
24
|
-
rexml (3.2.
|
24
|
+
rexml (3.2.8)
|
25
|
+
strscan (>= 3.0.9)
|
25
26
|
rspec (3.8.0)
|
26
27
|
rspec-core (~> 3.8.0)
|
27
28
|
rspec-expectations (~> 3.8.0)
|
@@ -59,6 +60,7 @@ GEM
|
|
59
60
|
simplecov_json_formatter (~> 0.1)
|
60
61
|
simplecov-html (0.12.3)
|
61
62
|
simplecov_json_formatter (0.1.4)
|
63
|
+
strscan (3.1.0)
|
62
64
|
typhoeus (1.4.0)
|
63
65
|
ethon (>= 0.9.0)
|
64
66
|
unicode-display_width (2.3.0)
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Smile Identity provides the best solutions for real time Digital KYC, identity verification, user onboarding, and user authentication across Africa. Our server side libraries make it easy to integrate us on the server-side. Since the library is server-side, you will be required to pass the images (if required) to the library.
|
4
4
|
|
5
|
-
If you haven’t already, [sign up for a free Smile Identity account](https://
|
5
|
+
If you haven’t already, [sign up for a free Smile Identity account](https://usesmileid.com/talk-to-an-expert/), which comes with Sandbox access.
|
6
6
|
|
7
7
|
Please see [CHANGELOG.md](CHANGELOG.md) for release versions and changes.
|
8
8
|
|
@@ -12,12 +12,12 @@ The library exposes four classes namely; the WebApi class, the IDApi class, the
|
|
12
12
|
|
13
13
|
The WebApi class has the following public methods:
|
14
14
|
|
15
|
-
- `submit_job` - handles submission of any of Smile Identity products that requires an image i.e. [Biometric KYC](https://docs.
|
16
|
-
- `get_web_token` - handles generation of web token, if you are using the [Hosted Web Integration](https://docs.
|
15
|
+
- `submit_job` - handles submission of any of Smile Identity products that requires an image i.e. [Biometric KYC](https://docs.usesmileid.com/products/biometric-kyc), [Document Verification](https://docs.usesmileid.com/products/document-verification), [SmartSelfieTM Authentication](https://docs.usesmileid.com/products/biometric-authentication) and [Business Verification](https://docs.usesmileid.com/products/for-businesses-kyb/business-verification).
|
16
|
+
- `get_web_token` - handles generation of web token, if you are using the [Hosted Web Integration](https://docs.usesmileid.com/web-mobile-web/web-integration-beta).
|
17
17
|
|
18
18
|
The IDApi class has the following public method:
|
19
19
|
|
20
|
-
- `submit_job` - handles submission of [Enhanced KYC](https://docs.
|
20
|
+
- `submit_job` - handles submission of [Enhanced KYC](https://docs.usesmileid.com/products/identity-lookup) and [Basic KYC](https://docs.usesmileid.com/products/id-verification).
|
21
21
|
|
22
22
|
The Signature class has the following public methods:
|
23
23
|
|
@@ -26,7 +26,7 @@ The Signature class has the following public methods:
|
|
26
26
|
|
27
27
|
The Utilities Class allows you as the Partner to have access to our general Utility functions to gain access to your data. It has the following public methods:
|
28
28
|
|
29
|
-
- `get_job_status` - retrieve information & results of a job. Read more on job status in the [Smile Identity documentation](https://docs.
|
29
|
+
- `get_job_status` - retrieve information & results of a job. Read more on job status in the [Smile Identity documentation](https://docs.usesmileid.com/further-reading/job-status).
|
30
30
|
|
31
31
|
## Installation
|
32
32
|
|
@@ -52,13 +52,13 @@ gem install smile-identity-core
|
|
52
52
|
|
53
53
|
## Documentation
|
54
54
|
|
55
|
-
For extensive instructions on usage of the library and sample codes, please refer to the official Smile Identity [documentation](https://docs.
|
55
|
+
For extensive instructions on usage of the library and sample codes, please refer to the official Smile Identity [documentation](https://docs.usesmileid.com/server-to-server/ruby).
|
56
56
|
|
57
57
|
Before that, you should take a look at the examples in the [examples](/examples) folder.
|
58
58
|
|
59
59
|
## Getting Help
|
60
60
|
|
61
|
-
For usage questions, the best resource is [our official documentation](https://docs.
|
61
|
+
For usage questions, the best resource is [our official documentation](https://docs.usesmileid.com). However, if you require further assistance, you can file a [support ticket via our portal](https://portal.usesmileid.com/partner/support/tickets) or visit the [contact us page](https://portal.usesmileid.com/partner/support/tickets) on our website.
|
62
62
|
|
63
63
|
## Contributing
|
64
64
|
|
data/examples/aml_check.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
require 'smile-identity-core'
|
4
4
|
require 'securerandom'
|
5
|
-
# See https://docs.
|
5
|
+
# See https://docs.usesmileid.com/products/for-individuals-kyc/aml-check for
|
6
6
|
# more information on business verification
|
7
7
|
|
8
8
|
# Initialize
|
@@ -18,7 +18,8 @@ request_params = {
|
|
18
18
|
full_name: 'John Leo Doe',
|
19
19
|
countries: ['US'],
|
20
20
|
birth_year: '1984', # yyyy
|
21
|
-
search_existing_user: false
|
21
|
+
search_existing_user: false,
|
22
|
+
strict_match: true, # optional - default is true
|
22
23
|
}
|
23
24
|
|
24
25
|
# Submit the job
|
data/examples/biometric_kyc.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
require 'smile-identity-core'
|
4
4
|
|
5
|
-
# See https://docs.
|
5
|
+
# See https://docs.usesmileid.com/server-to-server/ruby/products/biometric-kyc for
|
6
6
|
# how to setup and retrieve configuation values for the WebApi class.
|
7
7
|
|
8
8
|
# Initialize
|
@@ -17,7 +17,7 @@ connection = SmileIdentityCore::WebApi.new(partner_id, default_callback, api_key
|
|
17
17
|
partner_params = {
|
18
18
|
user_id: '<put your unique ID for the user here>',
|
19
19
|
job_id: '<put your unique job ID here>',
|
20
|
-
job_type: 1
|
20
|
+
job_type: 1,
|
21
21
|
}
|
22
22
|
|
23
23
|
# Create image list
|
@@ -29,13 +29,13 @@ partner_params = {
|
|
29
29
|
image_details = [
|
30
30
|
{
|
31
31
|
image_type_id: '<0 | 2>',
|
32
|
-
image: '<full path to selfie image or base64image string>'
|
32
|
+
image: '<full path to selfie image or base64image string>',
|
33
33
|
},
|
34
34
|
{ # Not required if you don't require proof of life (note photo of
|
35
35
|
# photo check will still be performed on the uploaded selfie)
|
36
36
|
image_type_id: '<4 | 6>',
|
37
|
-
image: '<full path to liveness image or base64 image string>'
|
38
|
-
}
|
37
|
+
image: '<full path to liveness image or base64 image string>',
|
38
|
+
},
|
39
39
|
]
|
40
40
|
|
41
41
|
# Create ID number info
|
@@ -46,7 +46,7 @@ id_info = {
|
|
46
46
|
id_type: '<id type>',
|
47
47
|
id_number: '<valid id number>',
|
48
48
|
dob: '<date of birth>', # yyyy-mm-dd
|
49
|
-
entered: 'true' # must be a string
|
49
|
+
entered: 'true', # must be a string
|
50
50
|
}
|
51
51
|
|
52
52
|
# Set options for the job
|
@@ -60,7 +60,7 @@ options = {
|
|
60
60
|
# Set to true to receive links to the selfie and the photo
|
61
61
|
# it was compared to. You must set return_job_status to true to use this flag.
|
62
62
|
return_image_links: '<true | false>',
|
63
|
-
signature: true
|
63
|
+
signature: true,
|
64
64
|
}
|
65
65
|
|
66
66
|
# Submit the job
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
require 'smile-identity-core'
|
4
4
|
require 'securerandom'
|
5
|
-
# See https://docs.
|
5
|
+
# See https://docs.usesmileid.com/products/for-businesses-kyb/business-verification for
|
6
6
|
# more information on business verification
|
7
7
|
|
8
8
|
# Initialize
|
@@ -17,7 +17,7 @@ connection = SmileIdentityCore::IDApi.new(partner_id, default_callback, api_key,
|
|
17
17
|
partner_params = {
|
18
18
|
job_id: '<put your unique job ID here>',
|
19
19
|
user_id: '<put your unique ID for the user here>',
|
20
|
-
job_type: SmileIdentityCore::JobType::BUSINESS_VERIFICATION
|
20
|
+
job_type: SmileIdentityCore::JobType::BUSINESS_VERIFICATION,
|
21
21
|
}
|
22
22
|
|
23
23
|
# Create ID info
|
@@ -35,7 +35,7 @@ id_info = {
|
|
35
35
|
# Postal address of business. Only Required for BUSINESS_REGISTRATION in Kenya
|
36
36
|
postal_address: '<postal address>',
|
37
37
|
# Postal code of business. Only Required for BUSINESS_REGISTRATION in Kenya
|
38
|
-
postal_code: '<postal code>'
|
38
|
+
postal_code: '<postal code>',
|
39
39
|
}
|
40
40
|
|
41
41
|
# Set the options for the job
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
require 'smile-identity-core'
|
4
4
|
|
5
|
-
# See https://docs.
|
5
|
+
# See https://docs.usesmileid.com/server-to-server/ruby/products/document-verification for
|
6
6
|
# how to setup and retrieve configuation values for the WebApi class.
|
7
7
|
|
8
8
|
# Initialize
|
@@ -17,7 +17,7 @@ connection = SmileIdentityCore::WebApi.new(partner_id, default_callback, api_key
|
|
17
17
|
partner_params = {
|
18
18
|
user_id: '<put your unique ID for the user here>',
|
19
19
|
job_id: '<put your unique job ID here>',
|
20
|
-
job_type: 6
|
20
|
+
job_type: 6,
|
21
21
|
}
|
22
22
|
|
23
23
|
# Create image list
|
@@ -33,27 +33,27 @@ partner_params = {
|
|
33
33
|
image_details = [
|
34
34
|
{
|
35
35
|
image_type_id: '<0 | 2>',
|
36
|
-
image: '<full path to selfie image or base64image string>'
|
36
|
+
image: '<full path to selfie image or base64image string>',
|
37
37
|
},
|
38
38
|
{ # Not required if you don't require proof of life (note photo of photo check
|
39
39
|
# will still be performed on the uploaded selfie)
|
40
40
|
image_type_id: '<4 | 6>',
|
41
|
-
image: '<full path to liveness image or base64 image string>'
|
41
|
+
image: '<full path to liveness image or base64 image string>',
|
42
42
|
},
|
43
43
|
{
|
44
44
|
image_type_id: '<1 | 3>',
|
45
|
-
image: '<full path to front of id document image or base64image string>'
|
45
|
+
image: '<full path to front of id document image or base64image string>',
|
46
46
|
},
|
47
47
|
{ # Optional, only use if you're uploading the back of the id document image
|
48
48
|
image_type_id: '<5 | 7>',
|
49
|
-
image: '<full path to back of id document image or base64image string>'
|
50
|
-
}
|
49
|
+
image: '<full path to back of id document image or base64image string>',
|
50
|
+
},
|
51
51
|
]
|
52
52
|
|
53
53
|
# The ID Document Information
|
54
54
|
id_info = {
|
55
55
|
country: '<2-letter country code>', # The country where ID document was issued
|
56
|
-
id_type: '<id type>' # The ID document type
|
56
|
+
id_type: '<id type>', # The ID document type
|
57
57
|
}
|
58
58
|
|
59
59
|
# Set options for the job
|
@@ -67,7 +67,7 @@ options = {
|
|
67
67
|
# Set to true to receive links to the selfie and the photo it was compared to.
|
68
68
|
# You must set return_job_status to true to use this flag.
|
69
69
|
return_image_links: '<true |false>',
|
70
|
-
signature: true
|
70
|
+
signature: true,
|
71
71
|
}
|
72
72
|
|
73
73
|
# Submit the job
|