onfido-python 3.4.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 +18 -5
- onfido/api/default_api.py +611 -416
- onfido/api_client.py +38 -11
- onfido/configuration.py +14 -3
- onfido/models/__init__.py +17 -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 +11 -3
- onfido/models/watchlist_enhanced_properties_records_inner.py +164 -0
- onfido/models/watchlist_enhanced_properties_records_inner_address_inner.py +111 -0
- onfido/models/{consent_item.py → watchlist_enhanced_properties_records_inner_alias_inner.py} +11 -18
- onfido/models/watchlist_enhanced_properties_records_inner_associate_inner.py +104 -0
- onfido/models/watchlist_enhanced_properties_records_inner_attribute_inner.py +102 -0
- onfido/models/watchlist_enhanced_properties_records_inner_event_inner.py +113 -0
- onfido/models/watchlist_enhanced_properties_records_inner_event_inner_source.py +107 -0
- onfido/models/watchlist_enhanced_properties_records_inner_source_inner.py +106 -0
- 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.4.0.dist-info → onfido_python-4.0.0.dist-info}/METADATA +3 -3
- {onfido_python-3.4.0.dist-info → onfido_python-4.0.0.dist-info}/RECORD +90 -77
- {onfido_python-3.4.0.dist-info → onfido_python-4.0.0.dist-info}/WHEEL +1 -1
- {onfido_python-3.4.0.dist-info → onfido_python-4.0.0.dist-info}/LICENSE +0 -0
- {onfido_python-3.4.0.dist-info → onfido_python-4.0.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,102 @@
|
|
|
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 pydantic import BaseModel, ConfigDict, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class WatchlistEnhancedPropertiesRecordsInnerAttributeInner(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
WatchlistEnhancedPropertiesRecordsInnerAttributeInner
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
attribute_type: Optional[StrictStr] = None
|
|
30
|
+
attribute_value: Optional[StrictStr] = None
|
|
31
|
+
additional_properties: Dict[str, Any] = {}
|
|
32
|
+
__properties: ClassVar[List[str]] = ["attribute_type", "attribute_value"]
|
|
33
|
+
|
|
34
|
+
model_config = ConfigDict(
|
|
35
|
+
populate_by_name=True,
|
|
36
|
+
validate_assignment=True,
|
|
37
|
+
protected_namespaces=(),
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def to_str(self) -> str:
|
|
42
|
+
"""Returns the string representation of the model using alias"""
|
|
43
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
44
|
+
|
|
45
|
+
def to_json(self) -> str:
|
|
46
|
+
"""Returns the JSON representation of the model using alias"""
|
|
47
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
48
|
+
return json.dumps(self.to_dict())
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
+
"""Create an instance of WatchlistEnhancedPropertiesRecordsInnerAttributeInner from a JSON string"""
|
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
|
54
|
+
|
|
55
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
56
|
+
"""Return the dictionary representation of the model using alias.
|
|
57
|
+
|
|
58
|
+
This has the following differences from calling pydantic's
|
|
59
|
+
`self.model_dump(by_alias=True)`:
|
|
60
|
+
|
|
61
|
+
* `None` is only added to the output dict for nullable fields that
|
|
62
|
+
were set at model initialization. Other fields with value `None`
|
|
63
|
+
are ignored.
|
|
64
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
65
|
+
"""
|
|
66
|
+
excluded_fields: Set[str] = set([
|
|
67
|
+
"additional_properties",
|
|
68
|
+
])
|
|
69
|
+
|
|
70
|
+
_dict = self.model_dump(
|
|
71
|
+
by_alias=True,
|
|
72
|
+
exclude=excluded_fields,
|
|
73
|
+
exclude_none=True,
|
|
74
|
+
)
|
|
75
|
+
# puts key-value pairs in additional_properties in the top level
|
|
76
|
+
if self.additional_properties is not None:
|
|
77
|
+
for _key, _value in self.additional_properties.items():
|
|
78
|
+
_dict[_key] = _value
|
|
79
|
+
|
|
80
|
+
return _dict
|
|
81
|
+
|
|
82
|
+
@classmethod
|
|
83
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
84
|
+
"""Create an instance of WatchlistEnhancedPropertiesRecordsInnerAttributeInner from a dict"""
|
|
85
|
+
if obj is None:
|
|
86
|
+
return None
|
|
87
|
+
|
|
88
|
+
if not isinstance(obj, dict):
|
|
89
|
+
return cls.model_validate(obj)
|
|
90
|
+
|
|
91
|
+
_obj = cls.model_validate({
|
|
92
|
+
"attribute_type": obj.get("attribute_type"),
|
|
93
|
+
"attribute_value": obj.get("attribute_value")
|
|
94
|
+
})
|
|
95
|
+
# store additional fields in additional_properties
|
|
96
|
+
for _key in obj.keys():
|
|
97
|
+
if _key not in cls.__properties:
|
|
98
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
99
|
+
|
|
100
|
+
return _obj
|
|
101
|
+
|
|
102
|
+
|
|
@@ -0,0 +1,113 @@
|
|
|
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 date
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from onfido.models.watchlist_enhanced_properties_records_inner_event_inner_source import WatchlistEnhancedPropertiesRecordsInnerEventInnerSource
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class WatchlistEnhancedPropertiesRecordsInnerEventInner(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
WatchlistEnhancedPropertiesRecordsInnerEventInner
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
category: Optional[StrictStr] = None
|
|
32
|
+
event_date: Optional[date] = None
|
|
33
|
+
event_description: Optional[StrictStr] = None
|
|
34
|
+
source: Optional[WatchlistEnhancedPropertiesRecordsInnerEventInnerSource] = None
|
|
35
|
+
sub_category: Optional[StrictStr] = None
|
|
36
|
+
additional_properties: Dict[str, Any] = {}
|
|
37
|
+
__properties: ClassVar[List[str]] = ["category", "event_date", "event_description", "source", "sub_category"]
|
|
38
|
+
|
|
39
|
+
model_config = ConfigDict(
|
|
40
|
+
populate_by_name=True,
|
|
41
|
+
validate_assignment=True,
|
|
42
|
+
protected_namespaces=(),
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def to_str(self) -> str:
|
|
47
|
+
"""Returns the string representation of the model using alias"""
|
|
48
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
49
|
+
|
|
50
|
+
def to_json(self) -> str:
|
|
51
|
+
"""Returns the JSON representation of the model using alias"""
|
|
52
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
53
|
+
return json.dumps(self.to_dict())
|
|
54
|
+
|
|
55
|
+
@classmethod
|
|
56
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
57
|
+
"""Create an instance of WatchlistEnhancedPropertiesRecordsInnerEventInner from a JSON string"""
|
|
58
|
+
return cls.from_dict(json.loads(json_str))
|
|
59
|
+
|
|
60
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
61
|
+
"""Return the dictionary representation of the model using alias.
|
|
62
|
+
|
|
63
|
+
This has the following differences from calling pydantic's
|
|
64
|
+
`self.model_dump(by_alias=True)`:
|
|
65
|
+
|
|
66
|
+
* `None` is only added to the output dict for nullable fields that
|
|
67
|
+
were set at model initialization. Other fields with value `None`
|
|
68
|
+
are ignored.
|
|
69
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
70
|
+
"""
|
|
71
|
+
excluded_fields: Set[str] = set([
|
|
72
|
+
"additional_properties",
|
|
73
|
+
])
|
|
74
|
+
|
|
75
|
+
_dict = self.model_dump(
|
|
76
|
+
by_alias=True,
|
|
77
|
+
exclude=excluded_fields,
|
|
78
|
+
exclude_none=True,
|
|
79
|
+
)
|
|
80
|
+
# override the default output from pydantic by calling `to_dict()` of source
|
|
81
|
+
if self.source:
|
|
82
|
+
_dict['source'] = self.source.to_dict()
|
|
83
|
+
# puts key-value pairs in additional_properties in the top level
|
|
84
|
+
if self.additional_properties is not None:
|
|
85
|
+
for _key, _value in self.additional_properties.items():
|
|
86
|
+
_dict[_key] = _value
|
|
87
|
+
|
|
88
|
+
return _dict
|
|
89
|
+
|
|
90
|
+
@classmethod
|
|
91
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
92
|
+
"""Create an instance of WatchlistEnhancedPropertiesRecordsInnerEventInner 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
|
+
"category": obj.get("category"),
|
|
101
|
+
"event_date": obj.get("event_date"),
|
|
102
|
+
"event_description": obj.get("event_description"),
|
|
103
|
+
"source": WatchlistEnhancedPropertiesRecordsInnerEventInnerSource.from_dict(obj["source"]) if obj.get("source") is not None else None,
|
|
104
|
+
"sub_category": obj.get("sub_category")
|
|
105
|
+
})
|
|
106
|
+
# store additional fields in additional_properties
|
|
107
|
+
for _key in obj.keys():
|
|
108
|
+
if _key not in cls.__properties:
|
|
109
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
110
|
+
|
|
111
|
+
return _obj
|
|
112
|
+
|
|
113
|
+
|
|
@@ -0,0 +1,107 @@
|
|
|
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 date
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class WatchlistEnhancedPropertiesRecordsInnerEventInnerSource(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
WatchlistEnhancedPropertiesRecordsInnerEventInnerSource
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
source_date: Optional[date] = None
|
|
31
|
+
source_format: Optional[StrictStr] = None
|
|
32
|
+
source_name: Optional[StrictStr] = None
|
|
33
|
+
source_url: Optional[StrictStr] = None
|
|
34
|
+
additional_properties: Dict[str, Any] = {}
|
|
35
|
+
__properties: ClassVar[List[str]] = ["source_date", "source_format", "source_name", "source_url"]
|
|
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 WatchlistEnhancedPropertiesRecordsInnerEventInnerSource 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
|
+
return _dict
|
|
84
|
+
|
|
85
|
+
@classmethod
|
|
86
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
87
|
+
"""Create an instance of WatchlistEnhancedPropertiesRecordsInnerEventInnerSource from a dict"""
|
|
88
|
+
if obj is None:
|
|
89
|
+
return None
|
|
90
|
+
|
|
91
|
+
if not isinstance(obj, dict):
|
|
92
|
+
return cls.model_validate(obj)
|
|
93
|
+
|
|
94
|
+
_obj = cls.model_validate({
|
|
95
|
+
"source_date": obj.get("source_date"),
|
|
96
|
+
"source_format": obj.get("source_format"),
|
|
97
|
+
"source_name": obj.get("source_name"),
|
|
98
|
+
"source_url": obj.get("source_url")
|
|
99
|
+
})
|
|
100
|
+
# store additional fields in additional_properties
|
|
101
|
+
for _key in obj.keys():
|
|
102
|
+
if _key not in cls.__properties:
|
|
103
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
104
|
+
|
|
105
|
+
return _obj
|
|
106
|
+
|
|
107
|
+
|
|
@@ -0,0 +1,106 @@
|
|
|
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 pydantic import BaseModel, ConfigDict, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class WatchlistEnhancedPropertiesRecordsInnerSourceInner(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
WatchlistEnhancedPropertiesRecordsInnerSourceInner
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
source_headline: Optional[StrictStr] = None
|
|
30
|
+
source_name: Optional[StrictStr] = None
|
|
31
|
+
source_url: Optional[StrictStr] = None
|
|
32
|
+
source_format: Optional[StrictStr] = None
|
|
33
|
+
additional_properties: Dict[str, Any] = {}
|
|
34
|
+
__properties: ClassVar[List[str]] = ["source_headline", "source_name", "source_url", "source_format"]
|
|
35
|
+
|
|
36
|
+
model_config = ConfigDict(
|
|
37
|
+
populate_by_name=True,
|
|
38
|
+
validate_assignment=True,
|
|
39
|
+
protected_namespaces=(),
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def to_str(self) -> str:
|
|
44
|
+
"""Returns the string representation of the model using alias"""
|
|
45
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
46
|
+
|
|
47
|
+
def to_json(self) -> str:
|
|
48
|
+
"""Returns the JSON representation of the model using alias"""
|
|
49
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
50
|
+
return json.dumps(self.to_dict())
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
54
|
+
"""Create an instance of WatchlistEnhancedPropertiesRecordsInnerSourceInner from a JSON string"""
|
|
55
|
+
return cls.from_dict(json.loads(json_str))
|
|
56
|
+
|
|
57
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
58
|
+
"""Return the dictionary representation of the model using alias.
|
|
59
|
+
|
|
60
|
+
This has the following differences from calling pydantic's
|
|
61
|
+
`self.model_dump(by_alias=True)`:
|
|
62
|
+
|
|
63
|
+
* `None` is only added to the output dict for nullable fields that
|
|
64
|
+
were set at model initialization. Other fields with value `None`
|
|
65
|
+
are ignored.
|
|
66
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
67
|
+
"""
|
|
68
|
+
excluded_fields: Set[str] = set([
|
|
69
|
+
"additional_properties",
|
|
70
|
+
])
|
|
71
|
+
|
|
72
|
+
_dict = self.model_dump(
|
|
73
|
+
by_alias=True,
|
|
74
|
+
exclude=excluded_fields,
|
|
75
|
+
exclude_none=True,
|
|
76
|
+
)
|
|
77
|
+
# puts key-value pairs in additional_properties in the top level
|
|
78
|
+
if self.additional_properties is not None:
|
|
79
|
+
for _key, _value in self.additional_properties.items():
|
|
80
|
+
_dict[_key] = _value
|
|
81
|
+
|
|
82
|
+
return _dict
|
|
83
|
+
|
|
84
|
+
@classmethod
|
|
85
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
86
|
+
"""Create an instance of WatchlistEnhancedPropertiesRecordsInnerSourceInner from a dict"""
|
|
87
|
+
if obj is None:
|
|
88
|
+
return None
|
|
89
|
+
|
|
90
|
+
if not isinstance(obj, dict):
|
|
91
|
+
return cls.model_validate(obj)
|
|
92
|
+
|
|
93
|
+
_obj = cls.model_validate({
|
|
94
|
+
"source_headline": obj.get("source_headline"),
|
|
95
|
+
"source_name": obj.get("source_name"),
|
|
96
|
+
"source_url": obj.get("source_url"),
|
|
97
|
+
"source_format": obj.get("source_format")
|
|
98
|
+
})
|
|
99
|
+
# store additional fields in additional_properties
|
|
100
|
+
for _key in obj.keys():
|
|
101
|
+
if _key not in cls.__properties:
|
|
102
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
103
|
+
|
|
104
|
+
return _obj
|
|
105
|
+
|
|
106
|
+
|
|
@@ -92,9 +92,9 @@ class WatchlistEnhancedReport(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 WatchlistMonitorMatchesList(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:
|
|
@@ -75,9 +75,9 @@ class WatchlistMonitorsList(BaseModel):
|
|
|
75
75
|
# override the default output from pydantic by calling `to_dict()` of each item in monitors (list)
|
|
76
76
|
_items = []
|
|
77
77
|
if self.monitors:
|
|
78
|
-
for
|
|
79
|
-
if
|
|
80
|
-
_items.append(
|
|
78
|
+
for _item_monitors in self.monitors:
|
|
79
|
+
if _item_monitors:
|
|
80
|
+
_items.append(_item_monitors.to_dict())
|
|
81
81
|
_dict['monitors'] = _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 WatchlistPepsOnlyReport(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 WatchlistSanctionsOnlyReport(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 WatchlistStandardReport(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:
|
|
@@ -0,0 +1,54 @@
|
|
|
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 WebhookEventObjectStatus(str, Enum):
|
|
22
|
+
"""
|
|
23
|
+
The current state of the object, if available.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
"""
|
|
27
|
+
allowed enum values
|
|
28
|
+
"""
|
|
29
|
+
PROCESSING = 'processing'
|
|
30
|
+
AWAITING_INPUT = 'awaiting_input'
|
|
31
|
+
AWAITING_CLIENT_INPUT = 'awaiting_client_input'
|
|
32
|
+
APPROVED = 'approved'
|
|
33
|
+
DECLINED = 'declined'
|
|
34
|
+
REVIEW = 'review'
|
|
35
|
+
ABANDONED = 'abandoned'
|
|
36
|
+
ERROR = 'error'
|
|
37
|
+
STARTED = 'started'
|
|
38
|
+
CANCELLED = 'cancelled'
|
|
39
|
+
COMPLETED = 'completed'
|
|
40
|
+
AWAITING_DATA = 'awaiting_data'
|
|
41
|
+
AWAITING_APPROVAL = 'awaiting_approval'
|
|
42
|
+
COMPLETE = 'complete'
|
|
43
|
+
WITHDRAWN = 'withdrawn'
|
|
44
|
+
IN_PROGRESS = 'in_progress'
|
|
45
|
+
AWAITING_APPLICANT = 'awaiting_applicant'
|
|
46
|
+
PAUSED = 'paused'
|
|
47
|
+
REOPENED = 'reopened'
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_json(cls, json_str: str) -> Self:
|
|
51
|
+
"""Create an instance of WebhookEventObjectStatus from a JSON string"""
|
|
52
|
+
return cls(json.loads(json_str))
|
|
53
|
+
|
|
54
|
+
|
|
@@ -17,9 +17,11 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
-
from pydantic import BaseModel, ConfigDict, Field
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
22
|
from onfido.models.webhook_event_payload_object import WebhookEventPayloadObject
|
|
23
|
+
from onfido.models.webhook_event_payload_resource import WebhookEventPayloadResource
|
|
24
|
+
from onfido.models.webhook_event_resource_type import WebhookEventResourceType
|
|
23
25
|
from onfido.models.webhook_event_type import WebhookEventType
|
|
24
26
|
from typing import Optional, Set
|
|
25
27
|
from typing_extensions import Self
|
|
@@ -28,10 +30,10 @@ class WebhookEventPayload(BaseModel):
|
|
|
28
30
|
"""
|
|
29
31
|
WebhookEventPayload
|
|
30
32
|
""" # noqa: E501
|
|
31
|
-
resource_type:
|
|
33
|
+
resource_type: WebhookEventResourceType = Field(description="Indicates the resource affected by this event.")
|
|
32
34
|
action: Optional[WebhookEventType] = Field(default=None, description="The event that triggered this webhook.")
|
|
33
35
|
object: Optional[WebhookEventPayloadObject] = None
|
|
34
|
-
resource: Optional[
|
|
36
|
+
resource: Optional[WebhookEventPayloadResource] = None
|
|
35
37
|
additional_properties: Dict[str, Any] = {}
|
|
36
38
|
__properties: ClassVar[List[str]] = ["resource_type", "action", "object", "resource"]
|
|
37
39
|
|
|
@@ -79,6 +81,9 @@ class WebhookEventPayload(BaseModel):
|
|
|
79
81
|
# override the default output from pydantic by calling `to_dict()` of object
|
|
80
82
|
if self.object:
|
|
81
83
|
_dict['object'] = self.object.to_dict()
|
|
84
|
+
# override the default output from pydantic by calling `to_dict()` of resource
|
|
85
|
+
if self.resource:
|
|
86
|
+
_dict['resource'] = self.resource.to_dict()
|
|
82
87
|
# puts key-value pairs in additional_properties in the top level
|
|
83
88
|
if self.additional_properties is not None:
|
|
84
89
|
for _key, _value in self.additional_properties.items():
|
|
@@ -99,7 +104,7 @@ class WebhookEventPayload(BaseModel):
|
|
|
99
104
|
"resource_type": obj.get("resource_type"),
|
|
100
105
|
"action": obj.get("action"),
|
|
101
106
|
"object": WebhookEventPayloadObject.from_dict(obj["object"]) if obj.get("object") is not None else None,
|
|
102
|
-
"resource": obj.get("resource")
|
|
107
|
+
"resource": WebhookEventPayloadResource.from_dict(obj["resource"]) if obj.get("resource") is not None else None
|
|
103
108
|
})
|
|
104
109
|
# store additional fields in additional_properties
|
|
105
110
|
for _key in obj.keys():
|
|
@@ -20,6 +20,7 @@ import json
|
|
|
20
20
|
from datetime import datetime
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from onfido.models.webhook_event_object_status import WebhookEventObjectStatus
|
|
23
24
|
from typing import Optional, Set
|
|
24
25
|
from typing_extensions import Self
|
|
25
26
|
|
|
@@ -28,7 +29,7 @@ class WebhookEventPayloadObject(BaseModel):
|
|
|
28
29
|
The object affected by this event.
|
|
29
30
|
""" # noqa: E501
|
|
30
31
|
id: StrictStr = Field(description="The unique identifier of the resource.")
|
|
31
|
-
status: Optional[
|
|
32
|
+
status: Optional[WebhookEventObjectStatus] = None
|
|
32
33
|
started_at_iso8601: Optional[datetime] = Field(default=None, description="The date and time when the operation was started, if available.")
|
|
33
34
|
completed_at_iso8601: Optional[datetime] = Field(default=None, description="The date and time when the operation was completed, if available.")
|
|
34
35
|
href: StrictStr = Field(description="The uri of the resource.")
|