onfido-python 5.0.0__py3-none-any.whl → 5.2.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 +8 -4
- onfido/api/default_api.py +262 -0
- onfido/api_client.py +1 -1
- onfido/configuration.py +1 -1
- onfido/models/__init__.py +7 -3
- onfido/models/applicant_consent.py +111 -0
- onfido/models/check_builder.py +8 -2
- onfido/models/check_request.py +8 -2
- onfido/models/device_intelligence_breakdown.py +7 -1
- onfido/models/device_intelligence_breakdown_breakdown.py +3 -3
- onfido/models/{device_intelligence_breakdown_breakdown_device.py → device_intelligence_breakdown_device.py} +6 -6
- onfido/models/{device_intelligence_breakdown_breakdown_device_breakdown.py → device_intelligence_breakdown_device_breakdown.py} +4 -4
- onfido/models/device_intelligence_breakdown_properties_device.py +3 -3
- onfido/models/device_intelligence_properties.py +116 -0
- onfido/models/device_intelligence_report.py +8 -2
- onfido/models/document_properties.py +9 -5
- onfido/models/{document_properties_driving_licence_information.py → document_properties_driving_licence_information_item.py} +4 -4
- onfido/models/document_with_driver_verification_report_all_of_properties.py +9 -5
- onfido/models/report_configuration.py +119 -0
- onfido/models/report_configuration_facial_similarity.py +110 -0
- onfido/models/webhook.py +11 -1
- onfido/models/webhook_builder.py +11 -1
- onfido/models/webhook_shared.py +12 -2
- onfido/models/webhook_updater.py +11 -1
- {onfido_python-5.0.0.dist-info → onfido_python-5.2.0.dist-info}/METADATA +3 -2
- {onfido_python-5.0.0.dist-info → onfido_python-5.2.0.dist-info}/RECORD +29 -25
- {onfido_python-5.0.0.dist-info → onfido_python-5.2.0.dist-info}/WHEEL +1 -1
- {onfido_python-5.0.0.dist-info → onfido_python-5.2.0.dist-info/licenses}/LICENSE +0 -0
- {onfido_python-5.0.0.dist-info → onfido_python-5.2.0.dist-info}/top_level.txt +0 -0
onfido/__init__.py
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
""" # noqa: E501
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
__version__ = "5.
|
|
17
|
+
__version__ = "5.2.0"
|
|
18
18
|
|
|
19
19
|
# import apis into sdk package
|
|
20
20
|
from onfido.api.default_api import DefaultApi
|
|
@@ -37,6 +37,7 @@ from onfido.models.address_shared import AddressShared
|
|
|
37
37
|
from onfido.models.addresses_list import AddressesList
|
|
38
38
|
from onfido.models.applicant import Applicant
|
|
39
39
|
from onfido.models.applicant_builder import ApplicantBuilder
|
|
40
|
+
from onfido.models.applicant_consent import ApplicantConsent
|
|
40
41
|
from onfido.models.applicant_consent_builder import ApplicantConsentBuilder
|
|
41
42
|
from onfido.models.applicant_consent_name import ApplicantConsentName
|
|
42
43
|
from onfido.models.applicant_create import ApplicantCreate
|
|
@@ -58,12 +59,13 @@ from onfido.models.complete_task_data_builder import CompleteTaskDataBuilder
|
|
|
58
59
|
from onfido.models.country_codes import CountryCodes
|
|
59
60
|
from onfido.models.device_intelligence_breakdown import DeviceIntelligenceBreakdown
|
|
60
61
|
from onfido.models.device_intelligence_breakdown_breakdown import DeviceIntelligenceBreakdownBreakdown
|
|
61
|
-
from onfido.models.
|
|
62
|
-
from onfido.models.
|
|
62
|
+
from onfido.models.device_intelligence_breakdown_device import DeviceIntelligenceBreakdownDevice
|
|
63
|
+
from onfido.models.device_intelligence_breakdown_device_breakdown import DeviceIntelligenceBreakdownDeviceBreakdown
|
|
63
64
|
from onfido.models.device_intelligence_breakdown_properties import DeviceIntelligenceBreakdownProperties
|
|
64
65
|
from onfido.models.device_intelligence_breakdown_properties_device import DeviceIntelligenceBreakdownPropertiesDevice
|
|
65
66
|
from onfido.models.device_intelligence_breakdown_properties_geolocation import DeviceIntelligenceBreakdownPropertiesGeolocation
|
|
66
67
|
from onfido.models.device_intelligence_breakdown_properties_ip import DeviceIntelligenceBreakdownPropertiesIp
|
|
68
|
+
from onfido.models.device_intelligence_properties import DeviceIntelligenceProperties
|
|
67
69
|
from onfido.models.device_intelligence_report import DeviceIntelligenceReport
|
|
68
70
|
from onfido.models.document import Document
|
|
69
71
|
from onfido.models.document_breakdown import DocumentBreakdown
|
|
@@ -109,7 +111,7 @@ from onfido.models.document_properties_address_lines import DocumentPropertiesAd
|
|
|
109
111
|
from onfido.models.document_properties_barcode_inner import DocumentPropertiesBarcodeInner
|
|
110
112
|
from onfido.models.document_properties_document_classification import DocumentPropertiesDocumentClassification
|
|
111
113
|
from onfido.models.document_properties_document_numbers_inner import DocumentPropertiesDocumentNumbersInner
|
|
112
|
-
from onfido.models.
|
|
114
|
+
from onfido.models.document_properties_driving_licence_information_item import DocumentPropertiesDrivingLicenceInformationItem
|
|
113
115
|
from onfido.models.document_properties_extracted_data import DocumentPropertiesExtractedData
|
|
114
116
|
from onfido.models.document_properties_nfc import DocumentPropertiesNfc
|
|
115
117
|
from onfido.models.document_report import DocumentReport
|
|
@@ -240,6 +242,8 @@ from onfido.models.proof_of_address_report import ProofOfAddressReport
|
|
|
240
242
|
from onfido.models.repeat_attempts_list import RepeatAttemptsList
|
|
241
243
|
from onfido.models.repeat_attempts_list_repeat_attempts_inner import RepeatAttemptsListRepeatAttemptsInner
|
|
242
244
|
from onfido.models.report import Report
|
|
245
|
+
from onfido.models.report_configuration import ReportConfiguration
|
|
246
|
+
from onfido.models.report_configuration_facial_similarity import ReportConfigurationFacialSimilarity
|
|
243
247
|
from onfido.models.report_document import ReportDocument
|
|
244
248
|
from onfido.models.report_name import ReportName
|
|
245
249
|
from onfido.models.report_result import ReportResult
|
onfido/api/default_api.py
CHANGED
|
@@ -23,6 +23,7 @@ from typing_extensions import Annotated
|
|
|
23
23
|
from onfido.models.addresses_list import AddressesList
|
|
24
24
|
from onfido.models.applicant import Applicant
|
|
25
25
|
from onfido.models.applicant_builder import ApplicantBuilder
|
|
26
|
+
from onfido.models.applicant_consent import ApplicantConsent
|
|
26
27
|
from onfido.models.applicant_updater import ApplicantUpdater
|
|
27
28
|
from onfido.models.applicants_list import ApplicantsList
|
|
28
29
|
from onfido.models.check import Check
|
|
@@ -7293,6 +7294,267 @@ class DefaultApi:
|
|
|
7293
7294
|
|
|
7294
7295
|
|
|
7295
7296
|
|
|
7297
|
+
@validate_call
|
|
7298
|
+
def find_applicant_consents(
|
|
7299
|
+
self,
|
|
7300
|
+
applicant_id: StrictStr,
|
|
7301
|
+
_request_timeout: Union[
|
|
7302
|
+
None,
|
|
7303
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
7304
|
+
Tuple[
|
|
7305
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
7306
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
7307
|
+
]
|
|
7308
|
+
] = None,
|
|
7309
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
7310
|
+
_content_type: Optional[StrictStr] = None,
|
|
7311
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
7312
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
7313
|
+
) -> List[ApplicantConsent]:
|
|
7314
|
+
"""Retrieve Applicant Consents
|
|
7315
|
+
|
|
7316
|
+
Retrieves consents for single applicant.
|
|
7317
|
+
|
|
7318
|
+
:param applicant_id: (required)
|
|
7319
|
+
:type applicant_id: str
|
|
7320
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
7321
|
+
number provided, it will be total request
|
|
7322
|
+
timeout. It can also be a pair (tuple) of
|
|
7323
|
+
(connection, read) timeouts.
|
|
7324
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
7325
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
7326
|
+
request; this effectively ignores the
|
|
7327
|
+
authentication in the spec for a single request.
|
|
7328
|
+
:type _request_auth: dict, optional
|
|
7329
|
+
:param _content_type: force content-type for the request.
|
|
7330
|
+
:type _content_type: str, Optional
|
|
7331
|
+
:param _headers: set to override the headers for a single
|
|
7332
|
+
request; this effectively ignores the headers
|
|
7333
|
+
in the spec for a single request.
|
|
7334
|
+
:type _headers: dict, optional
|
|
7335
|
+
:param _host_index: set to override the host_index for a single
|
|
7336
|
+
request; this effectively ignores the host_index
|
|
7337
|
+
in the spec for a single request.
|
|
7338
|
+
:type _host_index: int, optional
|
|
7339
|
+
:return: Returns the result object.
|
|
7340
|
+
""" # noqa: E501
|
|
7341
|
+
|
|
7342
|
+
_param = self._find_applicant_consents_serialize(
|
|
7343
|
+
applicant_id=applicant_id,
|
|
7344
|
+
_request_auth=_request_auth,
|
|
7345
|
+
_content_type=_content_type,
|
|
7346
|
+
_headers=_headers,
|
|
7347
|
+
_host_index=_host_index
|
|
7348
|
+
)
|
|
7349
|
+
|
|
7350
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
7351
|
+
'200': "List[ApplicantConsent]",
|
|
7352
|
+
}
|
|
7353
|
+
response_data = self.api_client.call_api(
|
|
7354
|
+
*_param,
|
|
7355
|
+
_request_timeout=_request_timeout
|
|
7356
|
+
)
|
|
7357
|
+
response_data.read()
|
|
7358
|
+
return self.api_client.response_deserialize(
|
|
7359
|
+
response_data=response_data,
|
|
7360
|
+
response_types_map=_response_types_map,
|
|
7361
|
+
).data
|
|
7362
|
+
|
|
7363
|
+
|
|
7364
|
+
@validate_call
|
|
7365
|
+
def find_applicant_consents_with_http_info(
|
|
7366
|
+
self,
|
|
7367
|
+
applicant_id: StrictStr,
|
|
7368
|
+
_request_timeout: Union[
|
|
7369
|
+
None,
|
|
7370
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
7371
|
+
Tuple[
|
|
7372
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
7373
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
7374
|
+
]
|
|
7375
|
+
] = None,
|
|
7376
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
7377
|
+
_content_type: Optional[StrictStr] = None,
|
|
7378
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
7379
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
7380
|
+
) -> ApiResponse[List[ApplicantConsent]]:
|
|
7381
|
+
"""Retrieve Applicant Consents
|
|
7382
|
+
|
|
7383
|
+
Retrieves consents for single applicant.
|
|
7384
|
+
|
|
7385
|
+
:param applicant_id: (required)
|
|
7386
|
+
:type applicant_id: str
|
|
7387
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
7388
|
+
number provided, it will be total request
|
|
7389
|
+
timeout. It can also be a pair (tuple) of
|
|
7390
|
+
(connection, read) timeouts.
|
|
7391
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
7392
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
7393
|
+
request; this effectively ignores the
|
|
7394
|
+
authentication in the spec for a single request.
|
|
7395
|
+
:type _request_auth: dict, optional
|
|
7396
|
+
:param _content_type: force content-type for the request.
|
|
7397
|
+
:type _content_type: str, Optional
|
|
7398
|
+
:param _headers: set to override the headers for a single
|
|
7399
|
+
request; this effectively ignores the headers
|
|
7400
|
+
in the spec for a single request.
|
|
7401
|
+
:type _headers: dict, optional
|
|
7402
|
+
:param _host_index: set to override the host_index for a single
|
|
7403
|
+
request; this effectively ignores the host_index
|
|
7404
|
+
in the spec for a single request.
|
|
7405
|
+
:type _host_index: int, optional
|
|
7406
|
+
:return: Returns the result object.
|
|
7407
|
+
""" # noqa: E501
|
|
7408
|
+
|
|
7409
|
+
_param = self._find_applicant_consents_serialize(
|
|
7410
|
+
applicant_id=applicant_id,
|
|
7411
|
+
_request_auth=_request_auth,
|
|
7412
|
+
_content_type=_content_type,
|
|
7413
|
+
_headers=_headers,
|
|
7414
|
+
_host_index=_host_index
|
|
7415
|
+
)
|
|
7416
|
+
|
|
7417
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
7418
|
+
'200': "List[ApplicantConsent]",
|
|
7419
|
+
}
|
|
7420
|
+
response_data = self.api_client.call_api(
|
|
7421
|
+
*_param,
|
|
7422
|
+
_request_timeout=_request_timeout
|
|
7423
|
+
)
|
|
7424
|
+
response_data.read()
|
|
7425
|
+
return self.api_client.response_deserialize(
|
|
7426
|
+
response_data=response_data,
|
|
7427
|
+
response_types_map=_response_types_map,
|
|
7428
|
+
)
|
|
7429
|
+
|
|
7430
|
+
|
|
7431
|
+
@validate_call
|
|
7432
|
+
def find_applicant_consents_without_preload_content(
|
|
7433
|
+
self,
|
|
7434
|
+
applicant_id: StrictStr,
|
|
7435
|
+
_request_timeout: Union[
|
|
7436
|
+
None,
|
|
7437
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
7438
|
+
Tuple[
|
|
7439
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
7440
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
7441
|
+
]
|
|
7442
|
+
] = None,
|
|
7443
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
7444
|
+
_content_type: Optional[StrictStr] = None,
|
|
7445
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
7446
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
7447
|
+
) -> RESTResponseType:
|
|
7448
|
+
"""Retrieve Applicant Consents
|
|
7449
|
+
|
|
7450
|
+
Retrieves consents for single applicant.
|
|
7451
|
+
|
|
7452
|
+
:param applicant_id: (required)
|
|
7453
|
+
:type applicant_id: str
|
|
7454
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
7455
|
+
number provided, it will be total request
|
|
7456
|
+
timeout. It can also be a pair (tuple) of
|
|
7457
|
+
(connection, read) timeouts.
|
|
7458
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
7459
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
7460
|
+
request; this effectively ignores the
|
|
7461
|
+
authentication in the spec for a single request.
|
|
7462
|
+
:type _request_auth: dict, optional
|
|
7463
|
+
:param _content_type: force content-type for the request.
|
|
7464
|
+
:type _content_type: str, Optional
|
|
7465
|
+
:param _headers: set to override the headers for a single
|
|
7466
|
+
request; this effectively ignores the headers
|
|
7467
|
+
in the spec for a single request.
|
|
7468
|
+
:type _headers: dict, optional
|
|
7469
|
+
:param _host_index: set to override the host_index for a single
|
|
7470
|
+
request; this effectively ignores the host_index
|
|
7471
|
+
in the spec for a single request.
|
|
7472
|
+
:type _host_index: int, optional
|
|
7473
|
+
:return: Returns the result object.
|
|
7474
|
+
""" # noqa: E501
|
|
7475
|
+
|
|
7476
|
+
_param = self._find_applicant_consents_serialize(
|
|
7477
|
+
applicant_id=applicant_id,
|
|
7478
|
+
_request_auth=_request_auth,
|
|
7479
|
+
_content_type=_content_type,
|
|
7480
|
+
_headers=_headers,
|
|
7481
|
+
_host_index=_host_index
|
|
7482
|
+
)
|
|
7483
|
+
|
|
7484
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
7485
|
+
'200': "List[ApplicantConsent]",
|
|
7486
|
+
}
|
|
7487
|
+
response_data = self.api_client.call_api(
|
|
7488
|
+
*_param,
|
|
7489
|
+
_request_timeout=_request_timeout
|
|
7490
|
+
)
|
|
7491
|
+
return response_data.response
|
|
7492
|
+
|
|
7493
|
+
|
|
7494
|
+
def _find_applicant_consents_serialize(
|
|
7495
|
+
self,
|
|
7496
|
+
applicant_id,
|
|
7497
|
+
_request_auth,
|
|
7498
|
+
_content_type,
|
|
7499
|
+
_headers,
|
|
7500
|
+
_host_index,
|
|
7501
|
+
) -> RequestSerialized:
|
|
7502
|
+
|
|
7503
|
+
_host = None
|
|
7504
|
+
|
|
7505
|
+
_collection_formats: Dict[str, str] = {
|
|
7506
|
+
}
|
|
7507
|
+
|
|
7508
|
+
_path_params: Dict[str, str] = {}
|
|
7509
|
+
_query_params: List[Tuple[str, str]] = []
|
|
7510
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
7511
|
+
_form_params: List[Tuple[str, str]] = []
|
|
7512
|
+
_files: Dict[
|
|
7513
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
7514
|
+
] = {}
|
|
7515
|
+
_body_params: Optional[bytes] = None
|
|
7516
|
+
|
|
7517
|
+
# process the path parameters
|
|
7518
|
+
if applicant_id is not None:
|
|
7519
|
+
_path_params['applicant_id'] = applicant_id
|
|
7520
|
+
# process the query parameters
|
|
7521
|
+
# process the header parameters
|
|
7522
|
+
# process the form parameters
|
|
7523
|
+
# process the body parameter
|
|
7524
|
+
|
|
7525
|
+
|
|
7526
|
+
# set the HTTP header `Accept`
|
|
7527
|
+
if 'Accept' not in _header_params:
|
|
7528
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
7529
|
+
[
|
|
7530
|
+
'application/json'
|
|
7531
|
+
]
|
|
7532
|
+
)
|
|
7533
|
+
|
|
7534
|
+
|
|
7535
|
+
# authentication setting
|
|
7536
|
+
_auth_settings: List[str] = [
|
|
7537
|
+
'Token'
|
|
7538
|
+
]
|
|
7539
|
+
|
|
7540
|
+
return self.api_client.param_serialize(
|
|
7541
|
+
method='GET',
|
|
7542
|
+
resource_path='/applicants/{applicant_id}/consents',
|
|
7543
|
+
path_params=_path_params,
|
|
7544
|
+
query_params=_query_params,
|
|
7545
|
+
header_params=_header_params,
|
|
7546
|
+
body=_body_params,
|
|
7547
|
+
post_params=_form_params,
|
|
7548
|
+
files=_files,
|
|
7549
|
+
auth_settings=_auth_settings,
|
|
7550
|
+
collection_formats=_collection_formats,
|
|
7551
|
+
_host=_host,
|
|
7552
|
+
_request_auth=_request_auth
|
|
7553
|
+
)
|
|
7554
|
+
|
|
7555
|
+
|
|
7556
|
+
|
|
7557
|
+
|
|
7296
7558
|
@validate_call
|
|
7297
7559
|
def find_check(
|
|
7298
7560
|
self,
|
onfido/api_client.py
CHANGED
|
@@ -90,7 +90,7 @@ class ApiClient:
|
|
|
90
90
|
self.default_headers[header_name] = header_value
|
|
91
91
|
self.cookie = cookie
|
|
92
92
|
# Set default User-Agent.
|
|
93
|
-
self.user_agent = 'onfido-python/5.
|
|
93
|
+
self.user_agent = 'onfido-python/5.2.0'
|
|
94
94
|
self.client_side_validation = configuration.client_side_validation
|
|
95
95
|
|
|
96
96
|
def __enter__(self):
|
onfido/configuration.py
CHANGED
|
@@ -501,7 +501,7 @@ conf = onfido.Configuration(
|
|
|
501
501
|
"OS: {env}\n"\
|
|
502
502
|
"Python Version: {pyversion}\n"\
|
|
503
503
|
"Version of the API: v3.6\n"\
|
|
504
|
-
"SDK Package Version: 5.
|
|
504
|
+
"SDK Package Version: 5.2.0".\
|
|
505
505
|
format(env=sys.platform, pyversion=sys.version)
|
|
506
506
|
|
|
507
507
|
def get_host_settings(self) -> List[HostSetting]:
|
onfido/models/__init__.py
CHANGED
|
@@ -20,6 +20,7 @@ from onfido.models.address_shared import AddressShared
|
|
|
20
20
|
from onfido.models.addresses_list import AddressesList
|
|
21
21
|
from onfido.models.applicant import Applicant
|
|
22
22
|
from onfido.models.applicant_builder import ApplicantBuilder
|
|
23
|
+
from onfido.models.applicant_consent import ApplicantConsent
|
|
23
24
|
from onfido.models.applicant_consent_builder import ApplicantConsentBuilder
|
|
24
25
|
from onfido.models.applicant_consent_name import ApplicantConsentName
|
|
25
26
|
from onfido.models.applicant_create import ApplicantCreate
|
|
@@ -41,12 +42,13 @@ from onfido.models.complete_task_data_builder import CompleteTaskDataBuilder
|
|
|
41
42
|
from onfido.models.country_codes import CountryCodes
|
|
42
43
|
from onfido.models.device_intelligence_breakdown import DeviceIntelligenceBreakdown
|
|
43
44
|
from onfido.models.device_intelligence_breakdown_breakdown import DeviceIntelligenceBreakdownBreakdown
|
|
44
|
-
from onfido.models.
|
|
45
|
-
from onfido.models.
|
|
45
|
+
from onfido.models.device_intelligence_breakdown_device import DeviceIntelligenceBreakdownDevice
|
|
46
|
+
from onfido.models.device_intelligence_breakdown_device_breakdown import DeviceIntelligenceBreakdownDeviceBreakdown
|
|
46
47
|
from onfido.models.device_intelligence_breakdown_properties import DeviceIntelligenceBreakdownProperties
|
|
47
48
|
from onfido.models.device_intelligence_breakdown_properties_device import DeviceIntelligenceBreakdownPropertiesDevice
|
|
48
49
|
from onfido.models.device_intelligence_breakdown_properties_geolocation import DeviceIntelligenceBreakdownPropertiesGeolocation
|
|
49
50
|
from onfido.models.device_intelligence_breakdown_properties_ip import DeviceIntelligenceBreakdownPropertiesIp
|
|
51
|
+
from onfido.models.device_intelligence_properties import DeviceIntelligenceProperties
|
|
50
52
|
from onfido.models.device_intelligence_report import DeviceIntelligenceReport
|
|
51
53
|
from onfido.models.document import Document
|
|
52
54
|
from onfido.models.document_breakdown import DocumentBreakdown
|
|
@@ -92,7 +94,7 @@ from onfido.models.document_properties_address_lines import DocumentPropertiesAd
|
|
|
92
94
|
from onfido.models.document_properties_barcode_inner import DocumentPropertiesBarcodeInner
|
|
93
95
|
from onfido.models.document_properties_document_classification import DocumentPropertiesDocumentClassification
|
|
94
96
|
from onfido.models.document_properties_document_numbers_inner import DocumentPropertiesDocumentNumbersInner
|
|
95
|
-
from onfido.models.
|
|
97
|
+
from onfido.models.document_properties_driving_licence_information_item import DocumentPropertiesDrivingLicenceInformationItem
|
|
96
98
|
from onfido.models.document_properties_extracted_data import DocumentPropertiesExtractedData
|
|
97
99
|
from onfido.models.document_properties_nfc import DocumentPropertiesNfc
|
|
98
100
|
from onfido.models.document_report import DocumentReport
|
|
@@ -223,6 +225,8 @@ from onfido.models.proof_of_address_report import ProofOfAddressReport
|
|
|
223
225
|
from onfido.models.repeat_attempts_list import RepeatAttemptsList
|
|
224
226
|
from onfido.models.repeat_attempts_list_repeat_attempts_inner import RepeatAttemptsListRepeatAttemptsInner
|
|
225
227
|
from onfido.models.report import Report
|
|
228
|
+
from onfido.models.report_configuration import ReportConfiguration
|
|
229
|
+
from onfido.models.report_configuration_facial_similarity import ReportConfigurationFacialSimilarity
|
|
226
230
|
from onfido.models.report_document import ReportDocument
|
|
227
231
|
from onfido.models.report_name import ReportName
|
|
228
232
|
from onfido.models.report_result import ReportResult
|
|
@@ -0,0 +1,111 @@
|
|
|
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 pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from datetime import datetime
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from onfido.models.applicant_consent_name import ApplicantConsentName
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class ApplicantConsent(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
ApplicantConsent
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
name: ApplicantConsentName
|
|
32
|
+
granted: StrictBool
|
|
33
|
+
granted_at: Optional[datetime] = Field(description="The date and time when this applicant consent was granted, if not granted the value is nil.")
|
|
34
|
+
additional_properties: Dict[str, Any] = {}
|
|
35
|
+
__properties: ClassVar[List[str]] = ["name", "granted", "granted_at"]
|
|
36
|
+
|
|
37
|
+
model_config = ConfigDict(
|
|
38
|
+
populate_by_name=True,
|
|
39
|
+
validate_assignment=True,
|
|
40
|
+
protected_namespaces=(),
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def to_str(self) -> str:
|
|
45
|
+
"""Returns the string representation of the model using alias"""
|
|
46
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
47
|
+
|
|
48
|
+
def to_json(self) -> str:
|
|
49
|
+
"""Returns the JSON representation of the model using alias"""
|
|
50
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
51
|
+
return json.dumps(self.to_dict())
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
55
|
+
"""Create an instance of ApplicantConsent from a JSON string"""
|
|
56
|
+
return cls.from_dict(json.loads(json_str))
|
|
57
|
+
|
|
58
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
59
|
+
"""Return the dictionary representation of the model using alias.
|
|
60
|
+
|
|
61
|
+
This has the following differences from calling pydantic's
|
|
62
|
+
`self.model_dump(by_alias=True)`:
|
|
63
|
+
|
|
64
|
+
* `None` is only added to the output dict for nullable fields that
|
|
65
|
+
were set at model initialization. Other fields with value `None`
|
|
66
|
+
are ignored.
|
|
67
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
68
|
+
"""
|
|
69
|
+
excluded_fields: Set[str] = set([
|
|
70
|
+
"additional_properties",
|
|
71
|
+
])
|
|
72
|
+
|
|
73
|
+
_dict = self.model_dump(
|
|
74
|
+
by_alias=True,
|
|
75
|
+
exclude=excluded_fields,
|
|
76
|
+
exclude_none=True,
|
|
77
|
+
)
|
|
78
|
+
# puts key-value pairs in additional_properties in the top level
|
|
79
|
+
if self.additional_properties is not None:
|
|
80
|
+
for _key, _value in self.additional_properties.items():
|
|
81
|
+
_dict[_key] = _value
|
|
82
|
+
|
|
83
|
+
# set to None if granted_at (nullable) is None
|
|
84
|
+
# and model_fields_set contains the field
|
|
85
|
+
if self.granted_at is None and "granted_at" in self.model_fields_set:
|
|
86
|
+
_dict['granted_at'] = None
|
|
87
|
+
|
|
88
|
+
return _dict
|
|
89
|
+
|
|
90
|
+
@classmethod
|
|
91
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
92
|
+
"""Create an instance of ApplicantConsent from a dict"""
|
|
93
|
+
if obj is None:
|
|
94
|
+
return None
|
|
95
|
+
|
|
96
|
+
if not isinstance(obj, dict):
|
|
97
|
+
return cls.model_validate(obj)
|
|
98
|
+
|
|
99
|
+
_obj = cls.model_validate({
|
|
100
|
+
"name": obj.get("name"),
|
|
101
|
+
"granted": obj.get("granted"),
|
|
102
|
+
"granted_at": obj.get("granted_at")
|
|
103
|
+
})
|
|
104
|
+
# store additional fields in additional_properties
|
|
105
|
+
for _key in obj.keys():
|
|
106
|
+
if _key not in cls.__properties:
|
|
107
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
108
|
+
|
|
109
|
+
return _obj
|
|
110
|
+
|
|
111
|
+
|
onfido/models/check_builder.py
CHANGED
|
@@ -19,6 +19,7 @@ import json
|
|
|
19
19
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from onfido.models.report_configuration import ReportConfiguration
|
|
22
23
|
from onfido.models.report_name import ReportName
|
|
23
24
|
from onfido.models.us_driving_licence_builder import UsDrivingLicenceBuilder
|
|
24
25
|
from typing import Optional, Set
|
|
@@ -41,8 +42,9 @@ class CheckBuilder(BaseModel):
|
|
|
41
42
|
sub_result: Optional[StrictStr] = Field(default=None, description="Triggers responses for particular sub-results for sandbox Document reports.")
|
|
42
43
|
consider: Optional[List[ReportName]] = Field(default=None, description="Array of names of particular reports to return consider as their results. This is a feature available in sandbox testing")
|
|
43
44
|
us_driving_licence: Optional[UsDrivingLicenceBuilder] = None
|
|
45
|
+
report_configuration: Optional[ReportConfiguration] = None
|
|
44
46
|
additional_properties: Dict[str, Any] = {}
|
|
45
|
-
__properties: ClassVar[List[str]] = ["webhook_ids", "applicant_id", "applicant_provides_data", "tags", "redirect_uri", "privacy_notices_read_consent_given", "report_names", "document_ids", "asynchronous", "suppress_form_emails", "sub_result", "consider", "us_driving_licence"]
|
|
47
|
+
__properties: ClassVar[List[str]] = ["webhook_ids", "applicant_id", "applicant_provides_data", "tags", "redirect_uri", "privacy_notices_read_consent_given", "report_names", "document_ids", "asynchronous", "suppress_form_emails", "sub_result", "consider", "us_driving_licence", "report_configuration"]
|
|
46
48
|
|
|
47
49
|
model_config = ConfigDict(
|
|
48
50
|
populate_by_name=True,
|
|
@@ -88,6 +90,9 @@ class CheckBuilder(BaseModel):
|
|
|
88
90
|
# override the default output from pydantic by calling `to_dict()` of us_driving_licence
|
|
89
91
|
if self.us_driving_licence:
|
|
90
92
|
_dict['us_driving_licence'] = self.us_driving_licence.to_dict()
|
|
93
|
+
# override the default output from pydantic by calling `to_dict()` of report_configuration
|
|
94
|
+
if self.report_configuration:
|
|
95
|
+
_dict['report_configuration'] = self.report_configuration.to_dict()
|
|
91
96
|
# puts key-value pairs in additional_properties in the top level
|
|
92
97
|
if self.additional_properties is not None:
|
|
93
98
|
for _key, _value in self.additional_properties.items():
|
|
@@ -117,7 +122,8 @@ class CheckBuilder(BaseModel):
|
|
|
117
122
|
"suppress_form_emails": obj.get("suppress_form_emails"),
|
|
118
123
|
"sub_result": obj.get("sub_result"),
|
|
119
124
|
"consider": obj.get("consider"),
|
|
120
|
-
"us_driving_licence": UsDrivingLicenceBuilder.from_dict(obj["us_driving_licence"]) if obj.get("us_driving_licence") is not None else None
|
|
125
|
+
"us_driving_licence": UsDrivingLicenceBuilder.from_dict(obj["us_driving_licence"]) if obj.get("us_driving_licence") is not None else None,
|
|
126
|
+
"report_configuration": ReportConfiguration.from_dict(obj["report_configuration"]) if obj.get("report_configuration") is not None else None
|
|
121
127
|
})
|
|
122
128
|
# store additional fields in additional_properties
|
|
123
129
|
for _key in obj.keys():
|
onfido/models/check_request.py
CHANGED
|
@@ -19,6 +19,7 @@ import json
|
|
|
19
19
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from onfido.models.report_configuration import ReportConfiguration
|
|
22
23
|
from onfido.models.report_name import ReportName
|
|
23
24
|
from onfido.models.us_driving_licence_builder import UsDrivingLicenceBuilder
|
|
24
25
|
from typing import Optional, Set
|
|
@@ -36,8 +37,9 @@ class CheckRequest(BaseModel):
|
|
|
36
37
|
sub_result: Optional[StrictStr] = Field(default=None, description="Triggers responses for particular sub-results for sandbox Document reports.")
|
|
37
38
|
consider: Optional[List[ReportName]] = Field(default=None, description="Array of names of particular reports to return consider as their results. This is a feature available in sandbox testing")
|
|
38
39
|
us_driving_licence: Optional[UsDrivingLicenceBuilder] = None
|
|
40
|
+
report_configuration: Optional[ReportConfiguration] = None
|
|
39
41
|
additional_properties: Dict[str, Any] = {}
|
|
40
|
-
__properties: ClassVar[List[str]] = ["report_names", "document_ids", "applicant_provides_data", "asynchronous", "suppress_form_emails", "sub_result", "consider", "us_driving_licence"]
|
|
42
|
+
__properties: ClassVar[List[str]] = ["report_names", "document_ids", "applicant_provides_data", "asynchronous", "suppress_form_emails", "sub_result", "consider", "us_driving_licence", "report_configuration"]
|
|
41
43
|
|
|
42
44
|
model_config = ConfigDict(
|
|
43
45
|
populate_by_name=True,
|
|
@@ -83,6 +85,9 @@ class CheckRequest(BaseModel):
|
|
|
83
85
|
# override the default output from pydantic by calling `to_dict()` of us_driving_licence
|
|
84
86
|
if self.us_driving_licence:
|
|
85
87
|
_dict['us_driving_licence'] = self.us_driving_licence.to_dict()
|
|
88
|
+
# override the default output from pydantic by calling `to_dict()` of report_configuration
|
|
89
|
+
if self.report_configuration:
|
|
90
|
+
_dict['report_configuration'] = self.report_configuration.to_dict()
|
|
86
91
|
# puts key-value pairs in additional_properties in the top level
|
|
87
92
|
if self.additional_properties is not None:
|
|
88
93
|
for _key, _value in self.additional_properties.items():
|
|
@@ -107,7 +112,8 @@ class CheckRequest(BaseModel):
|
|
|
107
112
|
"suppress_form_emails": obj.get("suppress_form_emails"),
|
|
108
113
|
"sub_result": obj.get("sub_result"),
|
|
109
114
|
"consider": obj.get("consider"),
|
|
110
|
-
"us_driving_licence": UsDrivingLicenceBuilder.from_dict(obj["us_driving_licence"]) if obj.get("us_driving_licence") is not None else None
|
|
115
|
+
"us_driving_licence": UsDrivingLicenceBuilder.from_dict(obj["us_driving_licence"]) if obj.get("us_driving_licence") is not None else None,
|
|
116
|
+
"report_configuration": ReportConfiguration.from_dict(obj["report_configuration"]) if obj.get("report_configuration") is not None else None
|
|
111
117
|
})
|
|
112
118
|
# store additional fields in additional_properties
|
|
113
119
|
for _key in obj.keys():
|
|
@@ -20,6 +20,7 @@ import json
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
22
|
from onfido.models.device_intelligence_breakdown_breakdown import DeviceIntelligenceBreakdownBreakdown
|
|
23
|
+
from onfido.models.device_intelligence_breakdown_device import DeviceIntelligenceBreakdownDevice
|
|
23
24
|
from onfido.models.device_intelligence_breakdown_properties import DeviceIntelligenceBreakdownProperties
|
|
24
25
|
from typing import Optional, Set
|
|
25
26
|
from typing_extensions import Self
|
|
@@ -28,10 +29,11 @@ class DeviceIntelligenceBreakdown(BaseModel):
|
|
|
28
29
|
"""
|
|
29
30
|
DeviceIntelligenceBreakdown
|
|
30
31
|
""" # noqa: E501
|
|
32
|
+
device: Optional[DeviceIntelligenceBreakdownDevice] = None
|
|
31
33
|
breakdown: Optional[DeviceIntelligenceBreakdownBreakdown] = None
|
|
32
34
|
properties: Optional[DeviceIntelligenceBreakdownProperties] = None
|
|
33
35
|
additional_properties: Dict[str, Any] = {}
|
|
34
|
-
__properties: ClassVar[List[str]] = ["breakdown", "properties"]
|
|
36
|
+
__properties: ClassVar[List[str]] = ["device", "breakdown", "properties"]
|
|
35
37
|
|
|
36
38
|
model_config = ConfigDict(
|
|
37
39
|
populate_by_name=True,
|
|
@@ -74,6 +76,9 @@ class DeviceIntelligenceBreakdown(BaseModel):
|
|
|
74
76
|
exclude=excluded_fields,
|
|
75
77
|
exclude_none=True,
|
|
76
78
|
)
|
|
79
|
+
# override the default output from pydantic by calling `to_dict()` of device
|
|
80
|
+
if self.device:
|
|
81
|
+
_dict['device'] = self.device.to_dict()
|
|
77
82
|
# override the default output from pydantic by calling `to_dict()` of breakdown
|
|
78
83
|
if self.breakdown:
|
|
79
84
|
_dict['breakdown'] = self.breakdown.to_dict()
|
|
@@ -97,6 +102,7 @@ class DeviceIntelligenceBreakdown(BaseModel):
|
|
|
97
102
|
return cls.model_validate(obj)
|
|
98
103
|
|
|
99
104
|
_obj = cls.model_validate({
|
|
105
|
+
"device": DeviceIntelligenceBreakdownDevice.from_dict(obj["device"]) if obj.get("device") is not None else None,
|
|
100
106
|
"breakdown": DeviceIntelligenceBreakdownBreakdown.from_dict(obj["breakdown"]) if obj.get("breakdown") is not None else None,
|
|
101
107
|
"properties": DeviceIntelligenceBreakdownProperties.from_dict(obj["properties"]) if obj.get("properties") is not None else None
|
|
102
108
|
})
|
|
@@ -19,7 +19,7 @@ import json
|
|
|
19
19
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
-
from onfido.models.
|
|
22
|
+
from onfido.models.device_intelligence_breakdown_device import DeviceIntelligenceBreakdownDevice
|
|
23
23
|
from typing import Optional, Set
|
|
24
24
|
from typing_extensions import Self
|
|
25
25
|
|
|
@@ -27,7 +27,7 @@ class DeviceIntelligenceBreakdownBreakdown(BaseModel):
|
|
|
27
27
|
"""
|
|
28
28
|
DeviceIntelligenceBreakdownBreakdown
|
|
29
29
|
""" # noqa: E501
|
|
30
|
-
device: Optional[
|
|
30
|
+
device: Optional[DeviceIntelligenceBreakdownDevice] = None
|
|
31
31
|
additional_properties: Dict[str, Any] = {}
|
|
32
32
|
__properties: ClassVar[List[str]] = ["device"]
|
|
33
33
|
|
|
@@ -92,7 +92,7 @@ class DeviceIntelligenceBreakdownBreakdown(BaseModel):
|
|
|
92
92
|
return cls.model_validate(obj)
|
|
93
93
|
|
|
94
94
|
_obj = cls.model_validate({
|
|
95
|
-
"device":
|
|
95
|
+
"device": DeviceIntelligenceBreakdownDevice.from_dict(obj["device"]) if obj.get("device") is not None else None
|
|
96
96
|
})
|
|
97
97
|
# store additional fields in additional_properties
|
|
98
98
|
for _key in obj.keys():
|