onfido 0.15.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/LICENSE +2 -1
- data/README.md +18 -32
- data/lib/onfido.rb +0 -1
- data/lib/onfido/api.rb +0 -4
- data/lib/onfido/configuration.rb +2 -3
- data/lib/onfido/resource.rb +1 -5
- data/lib/onfido/resources/address.rb +1 -1
- data/lib/onfido/resources/applicant.rb +6 -6
- data/lib/onfido/resources/check.rb +9 -19
- data/lib/onfido/resources/document.rb +11 -11
- data/lib/onfido/resources/live_photo.rb +9 -14
- data/lib/onfido/resources/live_video.rb +5 -8
- data/lib/onfido/resources/report.rb +8 -9
- data/lib/onfido/resources/sdk_token.rb +3 -5
- data/lib/onfido/resources/webhook.rb +7 -9
- data/lib/onfido/version.rb +1 -1
- data/onfido.gemspec +6 -6
- data/spec/integrations/address_spec.rb +1 -0
- data/spec/integrations/applicant_spec.rb +18 -36
- data/spec/integrations/check_spec.rb +13 -67
- data/spec/integrations/document_spec.rb +16 -17
- data/spec/integrations/exceptions_spec.rb +12 -13
- data/spec/integrations/live_photo_spec.rb +12 -13
- data/spec/integrations/live_video_spec.rb +7 -10
- data/spec/integrations/report_spec.rb +11 -13
- data/spec/integrations/sdk_token_spec.rb +5 -5
- data/spec/integrations/webhook_spec.rb +26 -18
- data/spec/onfido/resource_spec.rb +6 -12
- data/spec/onfido_spec.rb +3 -11
- data/spec/support/fake_onfido_api.rb +44 -78
- data/spec/support/fixtures/applicant.json +21 -42
- data/spec/support/fixtures/check.json +4 -4
- data/spec/support/fixtures/checks.json +4 -4
- data/spec/support/fixtures/document.json +2 -2
- data/spec/support/fixtures/documents.json +8 -8
- data/spec/support/fixtures/live_photo.json +3 -3
- data/spec/support/fixtures/live_photos.json +6 -6
- data/spec/support/fixtures/live_video.json +3 -3
- data/spec/support/fixtures/live_videos.json +4 -4
- data/spec/support/fixtures/report.json +4 -4
- data/spec/support/fixtures/reports.json +8 -8
- data/spec/support/fixtures/webhook.json +6 -5
- data/spec/support/fixtures/webhooks.json +17 -12
- metadata +9 -22
- data/lib/onfido/resources/report_type_group.rb +0 -11
- data/spec/integrations/report_type_group_spec.rb +0 -19
- data/spec/support/fixtures/check_with_expanded_reports.json +0 -30
- data/spec/support/fixtures/checks_with_expanded_reports.json +0 -34
- data/spec/support/fixtures/report_type_group.json +0 -25
- data/spec/support/fixtures/report_type_groups.json +0 -30
@@ -1,44 +1,23 @@
|
|
1
1
|
{
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
"
|
14
|
-
"
|
15
|
-
"
|
16
|
-
"
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
"town":"London",
|
24
|
-
"state":"",
|
25
|
-
"postcode":"SW4 6EH",
|
26
|
-
"country":"GBR",
|
27
|
-
"start_date":"",
|
28
|
-
"end_date":""
|
29
|
-
},
|
30
|
-
{
|
31
|
-
"flat_number":"1",
|
32
|
-
"building_number":"10",
|
33
|
-
"building_name":"Great Building",
|
34
|
-
"street":"Old Street",
|
35
|
-
"sub_street":"Sub Street",
|
36
|
-
"town":"London",
|
37
|
-
"state":"",
|
38
|
-
"postcode":"SW1 4NG",
|
39
|
-
"country":"GBR",
|
40
|
-
"start_date":"",
|
41
|
-
"end_date":""
|
42
|
-
}
|
43
|
-
]
|
2
|
+
"id":"61f659cb-c90b-4067-808a-6136b5c01351",
|
3
|
+
"created_at":"2015-04-10T13:16:01Z",
|
4
|
+
"title":"Mr",
|
5
|
+
"first_name":"Chandler",
|
6
|
+
"middle_name":"Muriel",
|
7
|
+
"last_name":"Bing",
|
8
|
+
"email":"chandler_bing_6@friends.com",
|
9
|
+
"dob":"1968-04-08",
|
10
|
+
"href":"/v3/applicants/61f659cb-c90b-4067-808a-6136b5c01351",
|
11
|
+
"id_numbers":[],
|
12
|
+
"address": {
|
13
|
+
"flat_number":"4",
|
14
|
+
"building_number":"100",
|
15
|
+
"building_name":"Awesome Building",
|
16
|
+
"street":"Main Street",
|
17
|
+
"sub_street":"A sub street",
|
18
|
+
"town":"London",
|
19
|
+
"state":"",
|
20
|
+
"postcode":"SW4 6EH",
|
21
|
+
"country":"GBR"
|
22
|
+
}
|
44
23
|
}
|
@@ -1,11 +1,11 @@
|
|
1
1
|
{
|
2
2
|
"id": "8546921-123123-123123",
|
3
|
-
"created_at": "
|
4
|
-
"href": "/
|
5
|
-
"
|
3
|
+
"created_at": "2019-05-23T13:50:33Z",
|
4
|
+
"href": "/v3/checks/8546921-123123-123123",
|
5
|
+
"applicant_provides_data": "false",
|
6
6
|
"status": "pending",
|
7
7
|
"result": "pending",
|
8
|
-
"
|
8
|
+
"report_ids": [
|
9
9
|
"1030303-123123-375629",
|
10
10
|
"1030303-123123-456789"
|
11
11
|
]
|
@@ -2,12 +2,12 @@
|
|
2
2
|
"checks": [
|
3
3
|
{
|
4
4
|
"id": "8546921-123123-123123",
|
5
|
-
"created_at": "
|
6
|
-
"href": "/
|
7
|
-
"
|
5
|
+
"created_at": "2019-11-23T13:50:33Z",
|
6
|
+
"href": "/v3/checks/8546921-123123-123123",
|
7
|
+
"applicant_provides_data": "false",
|
8
8
|
"status": "pending",
|
9
9
|
"result": "pending",
|
10
|
-
"
|
10
|
+
"report_ids": [
|
11
11
|
"1030303-123123-375629",
|
12
12
|
"1030303-123123-456789"
|
13
13
|
]
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"id": "7568415-123123-123123",
|
3
|
-
"created_at": "
|
4
|
-
"href": "/
|
3
|
+
"created_at": "2019-11-23 13:50:33Z",
|
4
|
+
"href": "/v3/documents/7568415-123123-123123",
|
5
5
|
"file_name": "passport.jpg",
|
6
6
|
"file_type": "png",
|
7
7
|
"file_size": 282870,
|
@@ -2,22 +2,22 @@
|
|
2
2
|
"documents": [
|
3
3
|
{
|
4
4
|
"id": "7568415-123123-123123",
|
5
|
-
"created_at": "
|
6
|
-
"href": "/
|
5
|
+
"created_at": "2019-11-23 13:50:33Z",
|
6
|
+
"href": "/v3/documents/7568415-123123-123123",
|
7
7
|
"file_name": "passport.jpg",
|
8
8
|
"file_type": "png",
|
9
9
|
"file_size": 282870,
|
10
|
-
"type": "passport"
|
11
|
-
"side": "back"
|
10
|
+
"type": "passport"
|
12
11
|
},
|
13
12
|
{
|
14
13
|
"id": "121122-123123-123123",
|
15
|
-
"created_at": "
|
16
|
-
"href": "/
|
17
|
-
"file_name": "
|
14
|
+
"created_at": "2019-11-23 13:50:40Z",
|
15
|
+
"href": "/v3/documents/7568415-123123-123123",
|
16
|
+
"file_name": "driving_licence.png",
|
18
17
|
"file_type": "png",
|
19
18
|
"file_size": 282870,
|
20
|
-
"type": "
|
19
|
+
"type": "driving_licence",
|
20
|
+
"side": "front"
|
21
21
|
}
|
22
22
|
]
|
23
23
|
}
|
@@ -1,9 +1,9 @@
|
|
1
1
|
{
|
2
2
|
"id": "3538c8f6-fdce-4745-9d34-fc246bc05aa1",
|
3
|
-
"created_at": "
|
3
|
+
"created_at": "2019-11-23 13:50:33Z",
|
4
4
|
"file_name": "onfido_captured_image.jpg",
|
5
5
|
"file_type": "image/jpeg",
|
6
6
|
"file_size": 47544,
|
7
|
-
"href": "/
|
8
|
-
"download_href": "/
|
7
|
+
"href": "/v3/live_photos/3538c8f6-fdce-4745-9d34-fc246bc05aa1",
|
8
|
+
"download_href": "/v3/live_photos/3538c8f6-fdce-4745-9d34-fc246bc05aa1/download"
|
9
9
|
}
|
@@ -2,21 +2,21 @@
|
|
2
2
|
"live_photos": [
|
3
3
|
{
|
4
4
|
"id": "3538c8f6-fdce-4745-9d34-fc246bc05aa1",
|
5
|
-
"created_at": "
|
5
|
+
"created_at": "2019-11-23 13:50:33Z",
|
6
6
|
"file_name": "onfido_captured_image.jpg",
|
7
7
|
"file_type": "image/jpeg",
|
8
8
|
"file_size": 47544,
|
9
|
-
"href": "/
|
10
|
-
"download_href": "/
|
9
|
+
"href": "/v3/live_photos/3538c8f6-fdce-4745-9d34-fc246bc05aa1",
|
10
|
+
"download_href": "/v3/live_photos/3538c8f6-fdce-4745-9d34-fc246bc05aa1/download"
|
11
11
|
},
|
12
12
|
{
|
13
13
|
"id": "5134c12a-555a-1234-5e12-9d34fcbc11ba",
|
14
|
-
"created_at": "
|
14
|
+
"created_at": "2019-11-23 13:50:33Z",
|
15
15
|
"file_name": "onfido_captured_image.jpg",
|
16
16
|
"file_type": "image/jpeg",
|
17
17
|
"file_size": 47544,
|
18
|
-
"href": "/
|
19
|
-
"download_href": "/
|
18
|
+
"href": "/v3/live_photos/5134c12a-555a-1234-5e12-9d34fcbc11ba",
|
19
|
+
"download_href": "/v3/live_photos/5134c12a-555a-1234-5e12-9d34fcbc11ba/download"
|
20
20
|
}
|
21
21
|
]
|
22
22
|
}
|
@@ -14,10 +14,10 @@
|
|
14
14
|
]
|
15
15
|
}
|
16
16
|
],
|
17
|
-
"created_at" : "
|
17
|
+
"created_at" : "2019-11-29T09:00:39Z",
|
18
18
|
"file_name" : "output-29-05-2018_11_00_24.mov",
|
19
19
|
"file_type" : "video/quicktime",
|
20
20
|
"file_size" : 3348421,
|
21
|
-
"href" : "/
|
22
|
-
"download_href" : "/
|
21
|
+
"href" : "/v3/live_videos/c9701e9b-83aa-442f-995b-20320ee8fb01",
|
22
|
+
"download_href" : "/v3/live_videos/c9701e9b-83aa-442f-995b-20320ee8fb01/download"
|
23
23
|
}
|
@@ -15,12 +15,12 @@
|
|
15
15
|
"type": "recite"
|
16
16
|
}
|
17
17
|
],
|
18
|
-
"created_at": "
|
19
|
-
"download_href": "/
|
20
|
-
"file_name": "output-29-
|
18
|
+
"created_at": "2019-11-29T09:00:39Z",
|
19
|
+
"download_href": "/v3/live_videos/c9701e9b-83aa-442f-995b-20320ee8fb01/download",
|
20
|
+
"file_name": "output-29-11-2019_11_00_24.mov",
|
21
21
|
"file_size": 3348421,
|
22
22
|
"file_type": "video/quicktime",
|
23
|
-
"href": "/
|
23
|
+
"href": "/v3/live_videos/c9701e9b-83aa-442f-995b-20320ee8fb01",
|
24
24
|
"id": "c9701e9b-83aa-442f-995b-20320ee8fb01"
|
25
25
|
}
|
26
26
|
]
|
@@ -1,10 +1,10 @@
|
|
1
1
|
{
|
2
2
|
"id": "6951786-123123-422221",
|
3
|
-
"name": "
|
4
|
-
"created_at": "
|
5
|
-
"status": "
|
3
|
+
"name": "document",
|
4
|
+
"created_at": "2019-11-23T13:50:45Z",
|
5
|
+
"status": "in_progress",
|
6
6
|
"result": "pending",
|
7
|
-
"href": "/
|
7
|
+
"href": "/v3/reports/6951786-123123-422221",
|
8
8
|
"breakdown": {},
|
9
9
|
"properties": {}
|
10
10
|
}
|
@@ -2,21 +2,21 @@
|
|
2
2
|
"reports": [
|
3
3
|
{
|
4
4
|
"id": "6951786-123123-422221",
|
5
|
-
"name": "
|
6
|
-
"created_at": "
|
7
|
-
"status": "
|
5
|
+
"name": "document",
|
6
|
+
"created_at": "2019-11-23T13:50:45Z",
|
7
|
+
"status": "in_progress",
|
8
8
|
"result": "pending",
|
9
|
-
"href": "/
|
9
|
+
"href": "/v3/reports/6951786-123123-422221",
|
10
10
|
"breakdown": {},
|
11
11
|
"properties": {}
|
12
12
|
},
|
13
13
|
{
|
14
14
|
"id": "6951786-123123-316712",
|
15
|
-
"name": "
|
16
|
-
"created_at": "
|
17
|
-
"status": "
|
15
|
+
"name": "facial_similarity_photo",
|
16
|
+
"created_at": "2019-11-23T13:50:45Z",
|
17
|
+
"status": "in_progress",
|
18
18
|
"result": "pending",
|
19
|
-
"href": "/
|
19
|
+
"href": "/v3/reports/6951786-123123-316712",
|
20
20
|
"breakdown": {},
|
21
21
|
"properties": {}
|
22
22
|
}
|
@@ -3,11 +3,12 @@
|
|
3
3
|
"url": "https://webhookendpoint.url",
|
4
4
|
"token": "yV85IsmuYwmjQGlZ",
|
5
5
|
"enabled": true,
|
6
|
-
"href": "/
|
6
|
+
"href": "/v3/webhooks/fcb73186-0733-4f6f-9c57-d9d5ef979443",
|
7
|
+
"environments": [
|
8
|
+
"live"
|
9
|
+
],
|
7
10
|
"events": [
|
8
|
-
"report
|
9
|
-
"
|
10
|
-
"check completion",
|
11
|
-
"check in progress"
|
11
|
+
"report.completed",
|
12
|
+
"check.completed"
|
12
13
|
]
|
13
14
|
}
|
@@ -2,24 +2,29 @@
|
|
2
2
|
"webhooks": [
|
3
3
|
{
|
4
4
|
"id": "dd0a89e4-d44e-417a-aec4-01137d01ae59",
|
5
|
-
"url": "https://demo.com",
|
6
|
-
"
|
7
|
-
"
|
8
|
-
[
|
9
|
-
"
|
5
|
+
"url": "https://demo.com",
|
6
|
+
"enabled":false,
|
7
|
+
"href": "/v3/webhooks/dd0a89e4-d44e-417a-aec4-01137d01ae59",
|
8
|
+
"environments": [
|
9
|
+
"live"
|
10
|
+
],
|
11
|
+
"events": [
|
12
|
+
"report.completed",
|
13
|
+
"report.withdrawn",
|
14
|
+
"check.completed"
|
10
15
|
]
|
11
16
|
},
|
12
17
|
{
|
13
18
|
"id": "bfc727a8-f7bf-4073-b123-ed70a70f58e5",
|
14
19
|
"url": "https://demo2.com",
|
15
20
|
"enabled": true,
|
16
|
-
"href": "/
|
17
|
-
"
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
21
|
+
"href": "/v3/webhooks/bfc727a8-f7bf-4073-b123-ed70a70f58e5",
|
22
|
+
"environments": [
|
23
|
+
"live"
|
24
|
+
],
|
25
|
+
"events": [
|
26
|
+
"report.completed",
|
27
|
+
"check.completed"
|
23
28
|
]
|
24
29
|
}
|
25
30
|
]
|
metadata
CHANGED
@@ -1,15 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: onfido
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
8
|
-
- Grey Baker
|
7
|
+
- Onfido
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2020-01-13 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: bundler
|
@@ -137,12 +136,11 @@ dependencies:
|
|
137
136
|
- - "~>"
|
138
137
|
- !ruby/object:Gem::Version
|
139
138
|
version: '2.0'
|
140
|
-
description: A thin wrapper for Onfido's API. This gem supports
|
141
|
-
|
142
|
-
|
139
|
+
description: A thin wrapper for Onfido's API. This gem only supports v3 of the Onfido
|
140
|
+
API. Refer to Onfido's API documentation for details of the expected requests and
|
141
|
+
responses.
|
143
142
|
email:
|
144
|
-
-
|
145
|
-
- grey@gocardless.com
|
143
|
+
- engineering@onfido.com
|
146
144
|
executables: []
|
147
145
|
extensions: []
|
148
146
|
extra_rdoc_files: []
|
@@ -172,7 +170,6 @@ files:
|
|
172
170
|
- lib/onfido/resources/live_photo.rb
|
173
171
|
- lib/onfido/resources/live_video.rb
|
174
172
|
- lib/onfido/resources/report.rb
|
175
|
-
- lib/onfido/resources/report_type_group.rb
|
176
173
|
- lib/onfido/resources/sdk_token.rb
|
177
174
|
- lib/onfido/resources/webhook.rb
|
178
175
|
- lib/onfido/version.rb
|
@@ -185,7 +182,6 @@ files:
|
|
185
182
|
- spec/integrations/live_photo_spec.rb
|
186
183
|
- spec/integrations/live_video_spec.rb
|
187
184
|
- spec/integrations/report_spec.rb
|
188
|
-
- spec/integrations/report_type_group_spec.rb
|
189
185
|
- spec/integrations/sdk_token_spec.rb
|
190
186
|
- spec/integrations/webhook_spec.rb
|
191
187
|
- spec/onfido/api_spec.rb
|
@@ -200,9 +196,7 @@ files:
|
|
200
196
|
- spec/support/fixtures/applicant.json
|
201
197
|
- spec/support/fixtures/applicants.json
|
202
198
|
- spec/support/fixtures/check.json
|
203
|
-
- spec/support/fixtures/check_with_expanded_reports.json
|
204
199
|
- spec/support/fixtures/checks.json
|
205
|
-
- spec/support/fixtures/checks_with_expanded_reports.json
|
206
200
|
- spec/support/fixtures/document.json
|
207
201
|
- spec/support/fixtures/documents.json
|
208
202
|
- spec/support/fixtures/live_photo.json
|
@@ -211,14 +205,12 @@ files:
|
|
211
205
|
- spec/support/fixtures/live_videos.json
|
212
206
|
- spec/support/fixtures/not_scheduled_for_deletion_error.json
|
213
207
|
- spec/support/fixtures/report.json
|
214
|
-
- spec/support/fixtures/report_type_group.json
|
215
|
-
- spec/support/fixtures/report_type_groups.json
|
216
208
|
- spec/support/fixtures/reports.json
|
217
209
|
- spec/support/fixtures/sdk_token.json
|
218
210
|
- spec/support/fixtures/unexpected_error_format.json
|
219
211
|
- spec/support/fixtures/webhook.json
|
220
212
|
- spec/support/fixtures/webhooks.json
|
221
|
-
homepage: http://github.com/
|
213
|
+
homepage: http://github.com/onfido/onfido-ruby
|
222
214
|
licenses:
|
223
215
|
- MIT
|
224
216
|
metadata: {}
|
@@ -237,7 +229,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
237
229
|
- !ruby/object:Gem::Version
|
238
230
|
version: '0'
|
239
231
|
requirements: []
|
240
|
-
rubygems_version: 3.0.
|
232
|
+
rubygems_version: 3.0.3
|
241
233
|
signing_key:
|
242
234
|
specification_version: 4
|
243
235
|
summary: A wrapper for Onfido API
|
@@ -250,7 +242,6 @@ test_files:
|
|
250
242
|
- spec/integrations/live_photo_spec.rb
|
251
243
|
- spec/integrations/live_video_spec.rb
|
252
244
|
- spec/integrations/report_spec.rb
|
253
|
-
- spec/integrations/report_type_group_spec.rb
|
254
245
|
- spec/integrations/sdk_token_spec.rb
|
255
246
|
- spec/integrations/webhook_spec.rb
|
256
247
|
- spec/onfido/api_spec.rb
|
@@ -265,9 +256,7 @@ test_files:
|
|
265
256
|
- spec/support/fixtures/applicant.json
|
266
257
|
- spec/support/fixtures/applicants.json
|
267
258
|
- spec/support/fixtures/check.json
|
268
|
-
- spec/support/fixtures/check_with_expanded_reports.json
|
269
259
|
- spec/support/fixtures/checks.json
|
270
|
-
- spec/support/fixtures/checks_with_expanded_reports.json
|
271
260
|
- spec/support/fixtures/document.json
|
272
261
|
- spec/support/fixtures/documents.json
|
273
262
|
- spec/support/fixtures/live_photo.json
|
@@ -276,8 +265,6 @@ test_files:
|
|
276
265
|
- spec/support/fixtures/live_videos.json
|
277
266
|
- spec/support/fixtures/not_scheduled_for_deletion_error.json
|
278
267
|
- spec/support/fixtures/report.json
|
279
|
-
- spec/support/fixtures/report_type_group.json
|
280
|
-
- spec/support/fixtures/report_type_groups.json
|
281
268
|
- spec/support/fixtures/reports.json
|
282
269
|
- spec/support/fixtures/sdk_token.json
|
283
270
|
- spec/support/fixtures/unexpected_error_format.json
|