onfido-python 3.5.0__py3-none-any.whl → 4.0.0__py3-none-any.whl
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.
- onfido/__init__.py +10 -5
- onfido/api/default_api.py +611 -416
- onfido/api_client.py +38 -11
- onfido/configuration.py +14 -3
- onfido/models/__init__.py +9 -4
- onfido/models/addresses_list.py +3 -3
- onfido/models/applicant.py +3 -3
- onfido/models/applicant_builder.py +12 -8
- onfido/models/{consents_builder.py → applicant_consent_builder.py} +11 -6
- onfido/models/applicant_consent_name.py +38 -0
- onfido/models/applicant_request.py +10 -6
- onfido/models/applicant_shared.py +3 -3
- onfido/models/applicant_updater.py +12 -8
- onfido/models/applicants_list.py +3 -3
- onfido/models/check.py +10 -13
- onfido/models/check_builder.py +3 -1
- onfido/models/check_response.py +7 -13
- onfido/models/check_shared.py +4 -2
- onfido/models/check_status.py +41 -0
- onfido/models/checks_list.py +3 -3
- onfido/models/device_intelligence_breakdown_properties_device.py +1 -9
- onfido/models/device_intelligence_breakdown_properties_ip.py +2 -8
- onfido/models/device_intelligence_report.py +3 -3
- onfido/models/document.py +2 -1
- onfido/models/document_properties.py +6 -6
- onfido/models/document_report.py +3 -3
- onfido/models/document_shared.py +2 -1
- onfido/models/document_types.py +5 -0
- onfido/models/document_video_report.py +3 -3
- onfido/models/document_video_with_address_information_report.py +3 -3
- onfido/models/document_with_address_information_report.py +3 -3
- onfido/models/document_with_driver_verification_report.py +3 -3
- onfido/models/document_with_driver_verification_report_all_of_properties.py +9 -9
- onfido/models/document_with_driving_licence_information_report.py +3 -3
- onfido/models/documents_list.py +3 -3
- onfido/models/facial_similarity_motion_report.py +3 -3
- onfido/models/facial_similarity_photo_fully_auto_report.py +3 -3
- onfido/models/facial_similarity_photo_report.py +3 -3
- onfido/models/facial_similarity_video_report.py +3 -3
- onfido/models/id_photos_list.py +3 -3
- onfido/models/identity_enhanced_properties.py +3 -3
- onfido/models/identity_enhanced_report.py +3 -3
- onfido/models/india_pan_report.py +3 -3
- onfido/models/known_faces_properties.py +3 -3
- onfido/models/known_faces_report.py +3 -3
- onfido/models/live_photos_list.py +3 -3
- onfido/models/live_videos_list.py +3 -3
- onfido/models/motion_captures_list.py +3 -3
- onfido/models/proof_of_address_report.py +3 -3
- onfido/models/repeat_attempts_list.py +3 -3
- onfido/models/report_shared.py +3 -3
- onfido/models/reports_list.py +3 -3
- onfido/models/task_item.py +11 -2
- onfido/models/us_driving_licence_report.py +3 -3
- onfido/models/watchlist_aml_report.py +3 -3
- onfido/models/watchlist_enhanced_properties.py +3 -3
- onfido/models/watchlist_enhanced_properties_records_inner.py +18 -18
- onfido/models/watchlist_enhanced_report.py +3 -3
- onfido/models/watchlist_monitor_matches_list.py +3 -3
- onfido/models/watchlist_monitors_list.py +3 -3
- onfido/models/watchlist_peps_only_report.py +3 -3
- onfido/models/watchlist_sanctions_only_report.py +3 -3
- onfido/models/watchlist_standard_report.py +3 -3
- onfido/models/webhook_event_object_status.py +54 -0
- onfido/models/webhook_event_payload.py +9 -4
- onfido/models/webhook_event_payload_object.py +2 -1
- onfido/models/webhook_event_payload_resource.py +158 -0
- onfido/models/webhook_event_resource_type.py +41 -0
- onfido/models/webhook_resend.py +3 -3
- onfido/models/webhooks_list.py +3 -3
- onfido/models/workflow_run.py +9 -18
- onfido/models/workflow_run_builder.py +3 -3
- onfido/models/{workflow_run_response_error.py → workflow_run_error.py} +4 -4
- onfido/models/{workflow_run_shared_link.py → workflow_run_link.py} +24 -4
- onfido/models/workflow_run_response.py +6 -15
- onfido/models/workflow_run_shared.py +3 -3
- onfido/models/workflow_run_status.py +43 -0
- onfido/rest.py +1 -1
- {onfido_python-3.5.0.dist-info → onfido_python-4.0.0.dist-info}/METADATA +3 -3
- {onfido_python-3.5.0.dist-info → onfido_python-4.0.0.dist-info}/RECORD +83 -78
- {onfido_python-3.5.0.dist-info → onfido_python-4.0.0.dist-info}/WHEEL +1 -1
- onfido/models/consent_item.py +0 -109
- {onfido_python-3.5.0.dist-info → onfido_python-4.0.0.dist-info}/LICENSE +0 -0
- {onfido_python-3.5.0.dist-info → onfido_python-4.0.0.dist-info}/top_level.txt +0 -0
onfido/models/check_response.py
CHANGED
|
@@ -30,24 +30,16 @@ class CheckResponse(BaseModel):
|
|
|
30
30
|
id: StrictStr = Field(description="The unique identifier for the check.")
|
|
31
31
|
created_at: Optional[datetime] = Field(default=None, description="The date and time when this check was created.")
|
|
32
32
|
href: Optional[StrictStr] = Field(default=None, description="The uri of this resource.")
|
|
33
|
-
status: Optional[StrictStr] =
|
|
33
|
+
status: Optional[StrictStr] = None
|
|
34
34
|
result: Optional[StrictStr] = Field(default=None, description="The overall result of the check, based on the results of the constituent reports.")
|
|
35
35
|
form_uri: Optional[StrictStr] = Field(default=None, description="A link to the applicant form, if `applicant_provides_data` is `true`.")
|
|
36
36
|
results_uri: Optional[StrictStr] = Field(default=None, description="A link to the corresponding results page on the Onfido dashboard.")
|
|
37
37
|
report_ids: Optional[List[StrictStr]] = Field(default=None, description="An array of report ids.")
|
|
38
38
|
sandbox: Optional[StrictBool] = Field(default=None, description="Indicates whether the object was created in the sandbox or not.")
|
|
39
|
+
paused: Optional[StrictBool] = None
|
|
40
|
+
version: Optional[StrictStr] = None
|
|
39
41
|
additional_properties: Dict[str, Any] = {}
|
|
40
|
-
__properties: ClassVar[List[str]] = ["id", "created_at", "href", "status", "result", "form_uri", "results_uri", "report_ids", "sandbox"]
|
|
41
|
-
|
|
42
|
-
@field_validator('status')
|
|
43
|
-
def status_validate_enum(cls, value):
|
|
44
|
-
"""Validates the enum"""
|
|
45
|
-
if value is None:
|
|
46
|
-
return value
|
|
47
|
-
|
|
48
|
-
if value not in set(['in_progress', 'awaiting_applicant', 'complete', 'withdrawn', 'paused', 'reopened']):
|
|
49
|
-
raise ValueError("must be one of enum values ('in_progress', 'awaiting_applicant', 'complete', 'withdrawn', 'paused', 'reopened')")
|
|
50
|
-
return value
|
|
42
|
+
__properties: ClassVar[List[str]] = ["id", "created_at", "href", "status", "result", "form_uri", "results_uri", "report_ids", "sandbox", "paused", "version"]
|
|
51
43
|
|
|
52
44
|
@field_validator('result')
|
|
53
45
|
def result_validate_enum(cls, value):
|
|
@@ -125,7 +117,9 @@ class CheckResponse(BaseModel):
|
|
|
125
117
|
"form_uri": obj.get("form_uri"),
|
|
126
118
|
"results_uri": obj.get("results_uri"),
|
|
127
119
|
"report_ids": obj.get("report_ids"),
|
|
128
|
-
"sandbox": obj.get("sandbox")
|
|
120
|
+
"sandbox": obj.get("sandbox"),
|
|
121
|
+
"paused": obj.get("paused"),
|
|
122
|
+
"version": obj.get("version")
|
|
129
123
|
})
|
|
130
124
|
# store additional fields in additional_properties
|
|
131
125
|
for _key in obj.keys():
|
onfido/models/check_shared.py
CHANGED
|
@@ -31,8 +31,9 @@ class CheckShared(BaseModel):
|
|
|
31
31
|
applicant_provides_data: Optional[StrictBool] = Field(default=None, description="Send an applicant form to applicant to complete to proceed with check. Defaults to false. ")
|
|
32
32
|
tags: Optional[List[StrictStr]] = Field(default=None, description="Array of tags being assigned to this check.")
|
|
33
33
|
redirect_uri: Optional[StrictStr] = Field(default=None, description="For checks where `applicant_provides_data` is `true`, redirect to this URI when the applicant has submitted their data.")
|
|
34
|
+
privacy_notices_read_consent_given: Optional[StrictBool] = None
|
|
34
35
|
additional_properties: Dict[str, Any] = {}
|
|
35
|
-
__properties: ClassVar[List[str]] = ["webhook_ids", "applicant_id", "applicant_provides_data", "tags", "redirect_uri"]
|
|
36
|
+
__properties: ClassVar[List[str]] = ["webhook_ids", "applicant_id", "applicant_provides_data", "tags", "redirect_uri", "privacy_notices_read_consent_given"]
|
|
36
37
|
|
|
37
38
|
model_config = ConfigDict(
|
|
38
39
|
populate_by_name=True,
|
|
@@ -96,7 +97,8 @@ class CheckShared(BaseModel):
|
|
|
96
97
|
"applicant_id": obj.get("applicant_id"),
|
|
97
98
|
"applicant_provides_data": obj.get("applicant_provides_data"),
|
|
98
99
|
"tags": obj.get("tags"),
|
|
99
|
-
"redirect_uri": obj.get("redirect_uri")
|
|
100
|
+
"redirect_uri": obj.get("redirect_uri"),
|
|
101
|
+
"privacy_notices_read_consent_given": obj.get("privacy_notices_read_consent_given")
|
|
100
102
|
})
|
|
101
103
|
# store additional fields in additional_properties
|
|
102
104
|
for _key in obj.keys():
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Onfido API v3.6
|
|
5
|
+
|
|
6
|
+
The Onfido API (v3.6)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: v3.6
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import json
|
|
17
|
+
from enum import Enum
|
|
18
|
+
from typing_extensions import Self
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class CheckStatus(str, Enum):
|
|
22
|
+
"""
|
|
23
|
+
The current state of the check in the checking process.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
"""
|
|
27
|
+
allowed enum values
|
|
28
|
+
"""
|
|
29
|
+
IN_PROGRESS = 'in_progress'
|
|
30
|
+
AWAITING_APPLICANT = 'awaiting_applicant'
|
|
31
|
+
COMPLETE = 'complete'
|
|
32
|
+
WITHDRAWN = 'withdrawn'
|
|
33
|
+
PAUSED = 'paused'
|
|
34
|
+
REOPENED = 'reopened'
|
|
35
|
+
|
|
36
|
+
@classmethod
|
|
37
|
+
def from_json(cls, json_str: str) -> Self:
|
|
38
|
+
"""Create an instance of CheckStatus from a JSON string"""
|
|
39
|
+
return cls(json.loads(json_str))
|
|
40
|
+
|
|
41
|
+
|
onfido/models/checks_list.py
CHANGED
|
@@ -75,9 +75,9 @@ class ChecksList(BaseModel):
|
|
|
75
75
|
# override the default output from pydantic by calling `to_dict()` of each item in checks (list)
|
|
76
76
|
_items = []
|
|
77
77
|
if self.checks:
|
|
78
|
-
for
|
|
79
|
-
if
|
|
80
|
-
_items.append(
|
|
78
|
+
for _item_checks in self.checks:
|
|
79
|
+
if _item_checks:
|
|
80
|
+
_items.append(_item_checks.to_dict())
|
|
81
81
|
_dict['checks'] = _items
|
|
82
82
|
# puts key-value pairs in additional_properties in the top level
|
|
83
83
|
if self.additional_properties is not None:
|
|
@@ -35,17 +35,13 @@ class DeviceIntelligenceBreakdownPropertiesDevice(BaseModel):
|
|
|
35
35
|
emulator: Optional[StrictBool] = Field(default=None, description="Whether the device is an emulator.")
|
|
36
36
|
randomized_device: Optional[StrictBool] = Field(default=None, description="Whether the device is providing false randomized device and network information.")
|
|
37
37
|
fake_network_request: Optional[StrictBool] = Field(default=None, description="Whether device is using stolen security tokens to send the network information.")
|
|
38
|
-
true_os: Optional[StrictStr] = Field(default=None, description="The true operating system of the device.")
|
|
39
|
-
os_anomaly: Optional[StrictStr] = Field(default=None, description="The likelihood of an operating system anomaly between the true OS and the OS sent by the device.")
|
|
40
|
-
rooted: Optional[StrictBool] = Field(default=None, description="Whether the device is rooted.")
|
|
41
|
-
remote_software: Optional[StrictBool] = Field(default=None, description="Whether the device is controlled via remote software.")
|
|
42
38
|
ip_reputation: Optional[StrictStr] = Field(default=None, description="Whether there is highly suspicious traffic related to the IP address. The risk depends on the overall ratio of clear checks on a given IP.")
|
|
43
39
|
device_fingerprint_reuse: Optional[StrictInt] = Field(default=None, description="The number of times the device was used to create a report for a new applicant. A value greater than 1 indicates potential device reuse.")
|
|
44
40
|
single_device_used: Optional[StrictBool] = Field(default=None, description="Whether the document or biometric media were uploaded from a single device.")
|
|
45
41
|
document_capture: Optional[StrictStr] = Field(default=None, description="Whether the document media were live captured from the device camera.")
|
|
46
42
|
biometric_capture: Optional[StrictStr] = Field(default=None, description="Whether the biometric media were live captured from the device camera.")
|
|
47
43
|
additional_properties: Dict[str, Any] = {}
|
|
48
|
-
__properties: ClassVar[List[str]] = ["sdk_version", "sdk_source", "authentication_type", "raw_model", "os", "browser", "emulator", "randomized_device", "fake_network_request", "
|
|
44
|
+
__properties: ClassVar[List[str]] = ["sdk_version", "sdk_source", "authentication_type", "raw_model", "os", "browser", "emulator", "randomized_device", "fake_network_request", "ip_reputation", "device_fingerprint_reuse", "single_device_used", "document_capture", "biometric_capture"]
|
|
49
45
|
|
|
50
46
|
@field_validator('sdk_source')
|
|
51
47
|
def sdk_source_validate_enum(cls, value):
|
|
@@ -169,10 +165,6 @@ class DeviceIntelligenceBreakdownPropertiesDevice(BaseModel):
|
|
|
169
165
|
"emulator": obj.get("emulator"),
|
|
170
166
|
"randomized_device": obj.get("randomized_device"),
|
|
171
167
|
"fake_network_request": obj.get("fake_network_request"),
|
|
172
|
-
"true_os": obj.get("true_os"),
|
|
173
|
-
"os_anomaly": obj.get("os_anomaly"),
|
|
174
|
-
"rooted": obj.get("rooted"),
|
|
175
|
-
"remote_software": obj.get("remote_software"),
|
|
176
168
|
"ip_reputation": obj.get("ip_reputation"),
|
|
177
169
|
"device_fingerprint_reuse": obj.get("device_fingerprint_reuse"),
|
|
178
170
|
"single_device_used": obj.get("single_device_used"),
|
|
@@ -27,11 +27,8 @@ class DeviceIntelligenceBreakdownPropertiesIp(BaseModel):
|
|
|
27
27
|
DeviceIntelligenceBreakdownPropertiesIp
|
|
28
28
|
""" # noqa: E501
|
|
29
29
|
address: Optional[StrictStr] = Field(default=None, description="The IP address that uploaded the media.")
|
|
30
|
-
vpn_detection: Optional[StrictStr] = Field(default=None, description="The likelihood of the network connection being a VPN.")
|
|
31
|
-
proxy_detection: Optional[StrictStr] = Field(default=None, description="The likelihood of the network connection being a Proxy.")
|
|
32
|
-
type: Optional[StrictStr] = Field(default=None, description="The type of organization that owns this IP address.")
|
|
33
30
|
additional_properties: Dict[str, Any] = {}
|
|
34
|
-
__properties: ClassVar[List[str]] = ["address"
|
|
31
|
+
__properties: ClassVar[List[str]] = ["address"]
|
|
35
32
|
|
|
36
33
|
model_config = ConfigDict(
|
|
37
34
|
populate_by_name=True,
|
|
@@ -91,10 +88,7 @@ class DeviceIntelligenceBreakdownPropertiesIp(BaseModel):
|
|
|
91
88
|
return cls.model_validate(obj)
|
|
92
89
|
|
|
93
90
|
_obj = cls.model_validate({
|
|
94
|
-
"address": obj.get("address")
|
|
95
|
-
"vpn_detection": obj.get("vpn_detection"),
|
|
96
|
-
"proxy_detection": obj.get("proxy_detection"),
|
|
97
|
-
"type": obj.get("type")
|
|
91
|
+
"address": obj.get("address")
|
|
98
92
|
})
|
|
99
93
|
# store additional fields in additional_properties
|
|
100
94
|
for _key in obj.keys():
|
|
@@ -90,9 +90,9 @@ class DeviceIntelligenceReport(BaseModel):
|
|
|
90
90
|
# override the default output from pydantic by calling `to_dict()` of each item in documents (list)
|
|
91
91
|
_items = []
|
|
92
92
|
if self.documents:
|
|
93
|
-
for
|
|
94
|
-
if
|
|
95
|
-
_items.append(
|
|
93
|
+
for _item_documents in self.documents:
|
|
94
|
+
if _item_documents:
|
|
95
|
+
_items.append(_item_documents.to_dict())
|
|
96
96
|
_dict['documents'] = _items
|
|
97
97
|
# override the default output from pydantic by calling `to_dict()` of breakdown
|
|
98
98
|
if self.breakdown:
|
onfido/models/document.py
CHANGED
|
@@ -21,6 +21,7 @@ from datetime import datetime
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
|
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
23
|
from onfido.models.country_codes import CountryCodes
|
|
24
|
+
from onfido.models.document_types import DocumentTypes
|
|
24
25
|
from typing import Optional, Set
|
|
25
26
|
from typing_extensions import Self
|
|
26
27
|
|
|
@@ -29,7 +30,7 @@ class Document(BaseModel):
|
|
|
29
30
|
Document
|
|
30
31
|
""" # noqa: E501
|
|
31
32
|
file_type: Optional[StrictStr] = Field(default=None, description="The file type of the uploaded file")
|
|
32
|
-
type: Optional[
|
|
33
|
+
type: Optional[DocumentTypes] = Field(default=None, description="The type of document")
|
|
33
34
|
side: Optional[StrictStr] = Field(default=None, description="The side of the document, if applicable. The possible values are front and back")
|
|
34
35
|
issuing_country: Optional[CountryCodes] = Field(default=None, description="The issuing country of the document, a 3-letter ISO code.")
|
|
35
36
|
applicant_id: Optional[StrictStr] = Field(default=None, description="The ID of the applicant whose document is being uploaded.")
|
|
@@ -156,9 +156,9 @@ class DocumentProperties(BaseModel):
|
|
|
156
156
|
# override the default output from pydantic by calling `to_dict()` of each item in document_numbers (list)
|
|
157
157
|
_items = []
|
|
158
158
|
if self.document_numbers:
|
|
159
|
-
for
|
|
160
|
-
if
|
|
161
|
-
_items.append(
|
|
159
|
+
for _item_document_numbers in self.document_numbers:
|
|
160
|
+
if _item_document_numbers:
|
|
161
|
+
_items.append(_item_document_numbers.to_dict())
|
|
162
162
|
_dict['document_numbers'] = _items
|
|
163
163
|
# override the default output from pydantic by calling `to_dict()` of address_lines
|
|
164
164
|
if self.address_lines:
|
|
@@ -166,9 +166,9 @@ class DocumentProperties(BaseModel):
|
|
|
166
166
|
# override the default output from pydantic by calling `to_dict()` of each item in barcode (list)
|
|
167
167
|
_items = []
|
|
168
168
|
if self.barcode:
|
|
169
|
-
for
|
|
170
|
-
if
|
|
171
|
-
_items.append(
|
|
169
|
+
for _item_barcode in self.barcode:
|
|
170
|
+
if _item_barcode:
|
|
171
|
+
_items.append(_item_barcode.to_dict())
|
|
172
172
|
_dict['barcode'] = _items
|
|
173
173
|
# override the default output from pydantic by calling `to_dict()` of nfc
|
|
174
174
|
if self.nfc:
|
onfido/models/document_report.py
CHANGED
|
@@ -92,9 +92,9 @@ class DocumentReport(BaseModel):
|
|
|
92
92
|
# override the default output from pydantic by calling `to_dict()` of each item in documents (list)
|
|
93
93
|
_items = []
|
|
94
94
|
if self.documents:
|
|
95
|
-
for
|
|
96
|
-
if
|
|
97
|
-
_items.append(
|
|
95
|
+
for _item_documents in self.documents:
|
|
96
|
+
if _item_documents:
|
|
97
|
+
_items.append(_item_documents.to_dict())
|
|
98
98
|
_dict['documents'] = _items
|
|
99
99
|
# override the default output from pydantic by calling `to_dict()` of breakdown
|
|
100
100
|
if self.breakdown:
|
onfido/models/document_shared.py
CHANGED
|
@@ -20,6 +20,7 @@ import json
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
22
|
from onfido.models.country_codes import CountryCodes
|
|
23
|
+
from onfido.models.document_types import DocumentTypes
|
|
23
24
|
from typing import Optional, Set
|
|
24
25
|
from typing_extensions import Self
|
|
25
26
|
|
|
@@ -28,7 +29,7 @@ class DocumentShared(BaseModel):
|
|
|
28
29
|
DocumentShared
|
|
29
30
|
""" # noqa: E501
|
|
30
31
|
file_type: Optional[StrictStr] = Field(default=None, description="The file type of the uploaded file")
|
|
31
|
-
type: Optional[
|
|
32
|
+
type: Optional[DocumentTypes] = Field(default=None, description="The type of document")
|
|
32
33
|
side: Optional[StrictStr] = Field(default=None, description="The side of the document, if applicable. The possible values are front and back")
|
|
33
34
|
issuing_country: Optional[CountryCodes] = Field(default=None, description="The issuing country of the document, a 3-letter ISO code.")
|
|
34
35
|
applicant_id: Optional[StrictStr] = Field(default=None, description="The ID of the applicant whose document is being uploaded.")
|
onfido/models/document_types.py
CHANGED
|
@@ -51,6 +51,11 @@ class DocumentTypes(str, Enum):
|
|
|
51
51
|
PROFESSIONAL_QUALIFICATION_CARD = 'professional_qualification_card'
|
|
52
52
|
CONSULAR_ID = 'consular_id'
|
|
53
53
|
INTERNATIONAL_DRIVING_LICENCE = 'international_driving_licence'
|
|
54
|
+
HOME_OFFICE_LETTER = 'home_office_letter'
|
|
55
|
+
BIRTH_CERTIFICATE = 'birth_certificate'
|
|
56
|
+
VEHICLE_REGISTRATION_CERTIFICATE = 'vehicle_registration_certificate'
|
|
57
|
+
FORM_FOR_AFFIXING_THE_VISA = 'form_for_affixing_the_visa'
|
|
58
|
+
IDENTIFICATION_NUMBER_DOCUMENT = 'identification_number_document'
|
|
54
59
|
|
|
55
60
|
@classmethod
|
|
56
61
|
def from_json(cls, json_str: str) -> Self:
|
|
@@ -92,9 +92,9 @@ class DocumentVideoReport(BaseModel):
|
|
|
92
92
|
# override the default output from pydantic by calling `to_dict()` of each item in documents (list)
|
|
93
93
|
_items = []
|
|
94
94
|
if self.documents:
|
|
95
|
-
for
|
|
96
|
-
if
|
|
97
|
-
_items.append(
|
|
95
|
+
for _item_documents in self.documents:
|
|
96
|
+
if _item_documents:
|
|
97
|
+
_items.append(_item_documents.to_dict())
|
|
98
98
|
_dict['documents'] = _items
|
|
99
99
|
# override the default output from pydantic by calling `to_dict()` of breakdown
|
|
100
100
|
if self.breakdown:
|
|
@@ -92,9 +92,9 @@ class DocumentVideoWithAddressInformationReport(BaseModel):
|
|
|
92
92
|
# override the default output from pydantic by calling `to_dict()` of each item in documents (list)
|
|
93
93
|
_items = []
|
|
94
94
|
if self.documents:
|
|
95
|
-
for
|
|
96
|
-
if
|
|
97
|
-
_items.append(
|
|
95
|
+
for _item_documents in self.documents:
|
|
96
|
+
if _item_documents:
|
|
97
|
+
_items.append(_item_documents.to_dict())
|
|
98
98
|
_dict['documents'] = _items
|
|
99
99
|
# override the default output from pydantic by calling `to_dict()` of breakdown
|
|
100
100
|
if self.breakdown:
|
|
@@ -92,9 +92,9 @@ class DocumentWithAddressInformationReport(BaseModel):
|
|
|
92
92
|
# override the default output from pydantic by calling `to_dict()` of each item in documents (list)
|
|
93
93
|
_items = []
|
|
94
94
|
if self.documents:
|
|
95
|
-
for
|
|
96
|
-
if
|
|
97
|
-
_items.append(
|
|
95
|
+
for _item_documents in self.documents:
|
|
96
|
+
if _item_documents:
|
|
97
|
+
_items.append(_item_documents.to_dict())
|
|
98
98
|
_dict['documents'] = _items
|
|
99
99
|
# override the default output from pydantic by calling `to_dict()` of breakdown
|
|
100
100
|
if self.breakdown:
|
|
@@ -92,9 +92,9 @@ class DocumentWithDriverVerificationReport(BaseModel):
|
|
|
92
92
|
# override the default output from pydantic by calling `to_dict()` of each item in documents (list)
|
|
93
93
|
_items = []
|
|
94
94
|
if self.documents:
|
|
95
|
-
for
|
|
96
|
-
if
|
|
97
|
-
_items.append(
|
|
95
|
+
for _item_documents in self.documents:
|
|
96
|
+
if _item_documents:
|
|
97
|
+
_items.append(_item_documents.to_dict())
|
|
98
98
|
_dict['documents'] = _items
|
|
99
99
|
# override the default output from pydantic by calling `to_dict()` of breakdown
|
|
100
100
|
if self.breakdown:
|
|
@@ -164,9 +164,9 @@ class DocumentWithDriverVerificationReportAllOfProperties(BaseModel):
|
|
|
164
164
|
# override the default output from pydantic by calling `to_dict()` of each item in document_numbers (list)
|
|
165
165
|
_items = []
|
|
166
166
|
if self.document_numbers:
|
|
167
|
-
for
|
|
168
|
-
if
|
|
169
|
-
_items.append(
|
|
167
|
+
for _item_document_numbers in self.document_numbers:
|
|
168
|
+
if _item_document_numbers:
|
|
169
|
+
_items.append(_item_document_numbers.to_dict())
|
|
170
170
|
_dict['document_numbers'] = _items
|
|
171
171
|
# override the default output from pydantic by calling `to_dict()` of address_lines
|
|
172
172
|
if self.address_lines:
|
|
@@ -174,9 +174,9 @@ class DocumentWithDriverVerificationReportAllOfProperties(BaseModel):
|
|
|
174
174
|
# override the default output from pydantic by calling `to_dict()` of each item in barcode (list)
|
|
175
175
|
_items = []
|
|
176
176
|
if self.barcode:
|
|
177
|
-
for
|
|
178
|
-
if
|
|
179
|
-
_items.append(
|
|
177
|
+
for _item_barcode in self.barcode:
|
|
178
|
+
if _item_barcode:
|
|
179
|
+
_items.append(_item_barcode.to_dict())
|
|
180
180
|
_dict['barcode'] = _items
|
|
181
181
|
# override the default output from pydantic by calling `to_dict()` of nfc
|
|
182
182
|
if self.nfc:
|
|
@@ -193,9 +193,9 @@ class DocumentWithDriverVerificationReportAllOfProperties(BaseModel):
|
|
|
193
193
|
# override the default output from pydantic by calling `to_dict()` of each item in vehicle_class_details (list)
|
|
194
194
|
_items = []
|
|
195
195
|
if self.vehicle_class_details:
|
|
196
|
-
for
|
|
197
|
-
if
|
|
198
|
-
_items.append(
|
|
196
|
+
for _item_vehicle_class_details in self.vehicle_class_details:
|
|
197
|
+
if _item_vehicle_class_details:
|
|
198
|
+
_items.append(_item_vehicle_class_details.to_dict())
|
|
199
199
|
_dict['vehicle_class_details'] = _items
|
|
200
200
|
# override the default output from pydantic by calling `to_dict()` of passenger_vehicle
|
|
201
201
|
if self.passenger_vehicle:
|
|
@@ -92,9 +92,9 @@ class DocumentWithDrivingLicenceInformationReport(BaseModel):
|
|
|
92
92
|
# override the default output from pydantic by calling `to_dict()` of each item in documents (list)
|
|
93
93
|
_items = []
|
|
94
94
|
if self.documents:
|
|
95
|
-
for
|
|
96
|
-
if
|
|
97
|
-
_items.append(
|
|
95
|
+
for _item_documents in self.documents:
|
|
96
|
+
if _item_documents:
|
|
97
|
+
_items.append(_item_documents.to_dict())
|
|
98
98
|
_dict['documents'] = _items
|
|
99
99
|
# override the default output from pydantic by calling `to_dict()` of breakdown
|
|
100
100
|
if self.breakdown:
|
onfido/models/documents_list.py
CHANGED
|
@@ -75,9 +75,9 @@ class DocumentsList(BaseModel):
|
|
|
75
75
|
# override the default output from pydantic by calling `to_dict()` of each item in documents (list)
|
|
76
76
|
_items = []
|
|
77
77
|
if self.documents:
|
|
78
|
-
for
|
|
79
|
-
if
|
|
80
|
-
_items.append(
|
|
78
|
+
for _item_documents in self.documents:
|
|
79
|
+
if _item_documents:
|
|
80
|
+
_items.append(_item_documents.to_dict())
|
|
81
81
|
_dict['documents'] = _items
|
|
82
82
|
# puts key-value pairs in additional_properties in the top level
|
|
83
83
|
if self.additional_properties is not None:
|
|
@@ -92,9 +92,9 @@ class FacialSimilarityMotionReport(BaseModel):
|
|
|
92
92
|
# override the default output from pydantic by calling `to_dict()` of each item in documents (list)
|
|
93
93
|
_items = []
|
|
94
94
|
if self.documents:
|
|
95
|
-
for
|
|
96
|
-
if
|
|
97
|
-
_items.append(
|
|
95
|
+
for _item_documents in self.documents:
|
|
96
|
+
if _item_documents:
|
|
97
|
+
_items.append(_item_documents.to_dict())
|
|
98
98
|
_dict['documents'] = _items
|
|
99
99
|
# override the default output from pydantic by calling `to_dict()` of breakdown
|
|
100
100
|
if self.breakdown:
|
|
@@ -92,9 +92,9 @@ class FacialSimilarityPhotoFullyAutoReport(BaseModel):
|
|
|
92
92
|
# override the default output from pydantic by calling `to_dict()` of each item in documents (list)
|
|
93
93
|
_items = []
|
|
94
94
|
if self.documents:
|
|
95
|
-
for
|
|
96
|
-
if
|
|
97
|
-
_items.append(
|
|
95
|
+
for _item_documents in self.documents:
|
|
96
|
+
if _item_documents:
|
|
97
|
+
_items.append(_item_documents.to_dict())
|
|
98
98
|
_dict['documents'] = _items
|
|
99
99
|
# override the default output from pydantic by calling `to_dict()` of breakdown
|
|
100
100
|
if self.breakdown:
|
|
@@ -92,9 +92,9 @@ class FacialSimilarityPhotoReport(BaseModel):
|
|
|
92
92
|
# override the default output from pydantic by calling `to_dict()` of each item in documents (list)
|
|
93
93
|
_items = []
|
|
94
94
|
if self.documents:
|
|
95
|
-
for
|
|
96
|
-
if
|
|
97
|
-
_items.append(
|
|
95
|
+
for _item_documents in self.documents:
|
|
96
|
+
if _item_documents:
|
|
97
|
+
_items.append(_item_documents.to_dict())
|
|
98
98
|
_dict['documents'] = _items
|
|
99
99
|
# override the default output from pydantic by calling `to_dict()` of breakdown
|
|
100
100
|
if self.breakdown:
|
|
@@ -92,9 +92,9 @@ class FacialSimilarityVideoReport(BaseModel):
|
|
|
92
92
|
# override the default output from pydantic by calling `to_dict()` of each item in documents (list)
|
|
93
93
|
_items = []
|
|
94
94
|
if self.documents:
|
|
95
|
-
for
|
|
96
|
-
if
|
|
97
|
-
_items.append(
|
|
95
|
+
for _item_documents in self.documents:
|
|
96
|
+
if _item_documents:
|
|
97
|
+
_items.append(_item_documents.to_dict())
|
|
98
98
|
_dict['documents'] = _items
|
|
99
99
|
# override the default output from pydantic by calling `to_dict()` of breakdown
|
|
100
100
|
if self.breakdown:
|
onfido/models/id_photos_list.py
CHANGED
|
@@ -75,9 +75,9 @@ class IdPhotosList(BaseModel):
|
|
|
75
75
|
# override the default output from pydantic by calling `to_dict()` of each item in id_photos (list)
|
|
76
76
|
_items = []
|
|
77
77
|
if self.id_photos:
|
|
78
|
-
for
|
|
79
|
-
if
|
|
80
|
-
_items.append(
|
|
78
|
+
for _item_id_photos in self.id_photos:
|
|
79
|
+
if _item_id_photos:
|
|
80
|
+
_items.append(_item_id_photos.to_dict())
|
|
81
81
|
_dict['id_photos'] = _items
|
|
82
82
|
# puts key-value pairs in additional_properties in the top level
|
|
83
83
|
if self.additional_properties is not None:
|
|
@@ -76,9 +76,9 @@ class IdentityEnhancedProperties(BaseModel):
|
|
|
76
76
|
# override the default output from pydantic by calling `to_dict()` of each item in matched_addresses (list)
|
|
77
77
|
_items = []
|
|
78
78
|
if self.matched_addresses:
|
|
79
|
-
for
|
|
80
|
-
if
|
|
81
|
-
_items.append(
|
|
79
|
+
for _item_matched_addresses in self.matched_addresses:
|
|
80
|
+
if _item_matched_addresses:
|
|
81
|
+
_items.append(_item_matched_addresses.to_dict())
|
|
82
82
|
_dict['matched_addresses'] = _items
|
|
83
83
|
# puts key-value pairs in additional_properties in the top level
|
|
84
84
|
if self.additional_properties is not None:
|
|
@@ -92,9 +92,9 @@ class IdentityEnhancedReport(BaseModel):
|
|
|
92
92
|
# override the default output from pydantic by calling `to_dict()` of each item in documents (list)
|
|
93
93
|
_items = []
|
|
94
94
|
if self.documents:
|
|
95
|
-
for
|
|
96
|
-
if
|
|
97
|
-
_items.append(
|
|
95
|
+
for _item_documents in self.documents:
|
|
96
|
+
if _item_documents:
|
|
97
|
+
_items.append(_item_documents.to_dict())
|
|
98
98
|
_dict['documents'] = _items
|
|
99
99
|
# override the default output from pydantic by calling `to_dict()` of breakdown
|
|
100
100
|
if self.breakdown:
|
|
@@ -92,9 +92,9 @@ class IndiaPanReport(BaseModel):
|
|
|
92
92
|
# override the default output from pydantic by calling `to_dict()` of each item in documents (list)
|
|
93
93
|
_items = []
|
|
94
94
|
if self.documents:
|
|
95
|
-
for
|
|
96
|
-
if
|
|
97
|
-
_items.append(
|
|
95
|
+
for _item_documents in self.documents:
|
|
96
|
+
if _item_documents:
|
|
97
|
+
_items.append(_item_documents.to_dict())
|
|
98
98
|
_dict['documents'] = _items
|
|
99
99
|
# override the default output from pydantic by calling `to_dict()` of breakdown
|
|
100
100
|
if self.breakdown:
|
|
@@ -75,9 +75,9 @@ class KnownFacesProperties(BaseModel):
|
|
|
75
75
|
# override the default output from pydantic by calling `to_dict()` of each item in matches (list)
|
|
76
76
|
_items = []
|
|
77
77
|
if self.matches:
|
|
78
|
-
for
|
|
79
|
-
if
|
|
80
|
-
_items.append(
|
|
78
|
+
for _item_matches in self.matches:
|
|
79
|
+
if _item_matches:
|
|
80
|
+
_items.append(_item_matches.to_dict())
|
|
81
81
|
_dict['matches'] = _items
|
|
82
82
|
# puts key-value pairs in additional_properties in the top level
|
|
83
83
|
if self.additional_properties is not None:
|
|
@@ -92,9 +92,9 @@ class KnownFacesReport(BaseModel):
|
|
|
92
92
|
# override the default output from pydantic by calling `to_dict()` of each item in documents (list)
|
|
93
93
|
_items = []
|
|
94
94
|
if self.documents:
|
|
95
|
-
for
|
|
96
|
-
if
|
|
97
|
-
_items.append(
|
|
95
|
+
for _item_documents in self.documents:
|
|
96
|
+
if _item_documents:
|
|
97
|
+
_items.append(_item_documents.to_dict())
|
|
98
98
|
_dict['documents'] = _items
|
|
99
99
|
# override the default output from pydantic by calling `to_dict()` of breakdown
|
|
100
100
|
if self.breakdown:
|
|
@@ -75,9 +75,9 @@ class LivePhotosList(BaseModel):
|
|
|
75
75
|
# override the default output from pydantic by calling `to_dict()` of each item in live_photos (list)
|
|
76
76
|
_items = []
|
|
77
77
|
if self.live_photos:
|
|
78
|
-
for
|
|
79
|
-
if
|
|
80
|
-
_items.append(
|
|
78
|
+
for _item_live_photos in self.live_photos:
|
|
79
|
+
if _item_live_photos:
|
|
80
|
+
_items.append(_item_live_photos.to_dict())
|
|
81
81
|
_dict['live_photos'] = _items
|
|
82
82
|
# puts key-value pairs in additional_properties in the top level
|
|
83
83
|
if self.additional_properties is not None:
|
|
@@ -75,9 +75,9 @@ class LiveVideosList(BaseModel):
|
|
|
75
75
|
# override the default output from pydantic by calling `to_dict()` of each item in live_videos (list)
|
|
76
76
|
_items = []
|
|
77
77
|
if self.live_videos:
|
|
78
|
-
for
|
|
79
|
-
if
|
|
80
|
-
_items.append(
|
|
78
|
+
for _item_live_videos in self.live_videos:
|
|
79
|
+
if _item_live_videos:
|
|
80
|
+
_items.append(_item_live_videos.to_dict())
|
|
81
81
|
_dict['live_videos'] = _items
|
|
82
82
|
# puts key-value pairs in additional_properties in the top level
|
|
83
83
|
if self.additional_properties is not None:
|
|
@@ -75,9 +75,9 @@ class MotionCapturesList(BaseModel):
|
|
|
75
75
|
# override the default output from pydantic by calling `to_dict()` of each item in motion_captures (list)
|
|
76
76
|
_items = []
|
|
77
77
|
if self.motion_captures:
|
|
78
|
-
for
|
|
79
|
-
if
|
|
80
|
-
_items.append(
|
|
78
|
+
for _item_motion_captures in self.motion_captures:
|
|
79
|
+
if _item_motion_captures:
|
|
80
|
+
_items.append(_item_motion_captures.to_dict())
|
|
81
81
|
_dict['motion_captures'] = _items
|
|
82
82
|
# puts key-value pairs in additional_properties in the top level
|
|
83
83
|
if self.additional_properties is not None:
|
|
@@ -92,9 +92,9 @@ class ProofOfAddressReport(BaseModel):
|
|
|
92
92
|
# override the default output from pydantic by calling `to_dict()` of each item in documents (list)
|
|
93
93
|
_items = []
|
|
94
94
|
if self.documents:
|
|
95
|
-
for
|
|
96
|
-
if
|
|
97
|
-
_items.append(
|
|
95
|
+
for _item_documents in self.documents:
|
|
96
|
+
if _item_documents:
|
|
97
|
+
_items.append(_item_documents.to_dict())
|
|
98
98
|
_dict['documents'] = _items
|
|
99
99
|
# override the default output from pydantic by calling `to_dict()` of breakdown
|
|
100
100
|
if self.breakdown:
|
|
@@ -80,9 +80,9 @@ class RepeatAttemptsList(BaseModel):
|
|
|
80
80
|
# override the default output from pydantic by calling `to_dict()` of each item in repeat_attempts (list)
|
|
81
81
|
_items = []
|
|
82
82
|
if self.repeat_attempts:
|
|
83
|
-
for
|
|
84
|
-
if
|
|
85
|
-
_items.append(
|
|
83
|
+
for _item_repeat_attempts in self.repeat_attempts:
|
|
84
|
+
if _item_repeat_attempts:
|
|
85
|
+
_items.append(_item_repeat_attempts.to_dict())
|
|
86
86
|
_dict['repeat_attempts'] = _items
|
|
87
87
|
# puts key-value pairs in additional_properties in the top level
|
|
88
88
|
if self.additional_properties is not None:
|