@@ -14,77 +14,107 @@ class AuthenticityCheckList(GenAuthenticityCheckList):
14
14
@property
15
15
def uv_luminescence_checks (self ) -> Optional [SecurityFeatureChecks ]:
16
16
result = self .__result_by_type (AuthenticityResultType .UV_LUMINESCENCE )
17
- return SecurityFeatureChecks .from_dict (result .to_dict ())
17
+ if result :
18
+ return SecurityFeatureChecks .from_json (result .to_json ())
19
+ return None
18
20
19
21
@property
20
22
def ir_b900_checks (self ) -> Optional [SecurityFeatureChecks ]:
21
23
result = self .__result_by_type (AuthenticityResultType .IR_B900 )
22
- return SecurityFeatureChecks .from_dict (result .to_dict ())
24
+ if result :
25
+ return SecurityFeatureChecks .from_json (result .to_json ())
26
+ return None
23
27
24
28
@property
25
29
def image_pattern_checks (self ) -> Optional [IdentChecks ]:
26
30
result = self .__result_by_type (AuthenticityResultType .IMAGE_PATTERN )
27
- return IdentChecks .from_dict (result .to_dict ())
31
+ if result :
32
+ return IdentChecks .from_json (result .to_json ())
33
+ return None
28
34
29
35
@property
30
36
def axial_protection_checks (self ) -> Optional [SecurityFeatureChecks ]:
31
37
result = self .__result_by_type (AuthenticityResultType .AXIAL_PROTECTION )
32
- return SecurityFeatureChecks .from_dict (result .to_dict ())
38
+ if result :
39
+ return SecurityFeatureChecks .from_json (result .to_json ())
40
+ return None
33
41
34
42
@property
35
43
def uv_fiber_checks (self ) -> Optional [FiberChecks ]:
36
44
result = self .__result_by_type (AuthenticityResultType .UV_FIBERS )
37
- return FiberChecks .from_dict (result .to_dict ())
45
+ if result :
46
+ return FiberChecks .from_json (result .to_json ())
47
+ return None
38
48
39
49
@property
40
50
def ir_visibility_checks (self ) -> Optional [IdentChecks ]:
41
51
result = self .__result_by_type (AuthenticityResultType .IR_VISIBILITY )
42
- return IdentChecks .from_dict (result .to_dict ())
52
+ if result :
53
+ return IdentChecks .from_json (result .to_json ())
54
+ return None
43
55
44
56
@property
45
57
def ocr_security_text_checks (self ) -> Optional [OCRSecurityTextChecks ]:
46
58
result = self .__result_by_type (AuthenticityResultType .OCR_SECURITY_TEXT )
47
- return OCRSecurityTextChecks .from_dict (result .to_dict ())
59
+ if result :
60
+ return OCRSecurityTextChecks .from_json (result .to_json ())
61
+ return None
48
62
49
63
@property
50
64
def ipi_checks (self ) -> Optional [ImageIdentChecks ]:
51
65
result = self .__result_by_type (AuthenticityResultType .IPI )
52
- return ImageIdentChecks .from_dict (result .to_dict ())
66
+ if result :
67
+ return ImageIdentChecks .from_json (result .to_json ())
68
+ return None
53
69
54
70
@property
55
71
def embed_image_checks (self ) -> Optional [SecurityFeatureChecks ]:
56
72
result = self .__result_by_type (AuthenticityResultType .PHOTO_EMBED_TYPE )
57
- return SecurityFeatureChecks .from_dict (result .to_dict ())
73
+ if result :
74
+ return SecurityFeatureChecks .from_json (result .to_json ())
75
+ return None
58
76
59
77
@property
60
78
def holograms_checks (self ) -> Optional [SecurityFeatureChecks ]:
61
79
result = self .__result_by_type (AuthenticityResultType .HOLOGRAMS )
62
- return SecurityFeatureChecks .from_dict (result .to_dict ())
80
+ if result :
81
+ return SecurityFeatureChecks .from_json (result .to_json ())
82
+ return None
63
83
64
84
@property
65
85
def photo_area_checks (self ) -> Optional [SecurityFeatureChecks ]:
66
86
result = self .__result_by_type (AuthenticityResultType .PHOTO_AREA )
67
- return SecurityFeatureChecks .from_dict (result .to_dict ())
87
+ if result :
88
+ return SecurityFeatureChecks .from_json (result .to_json ())
89
+ return None
68
90
69
91
@property
70
92
def portrait_comparison_checks (self ) -> Optional [IdentChecks ]:
71
93
result = self .__result_by_type (AuthenticityResultType .PORTRAIT_COMPARISON )
72
- return IdentChecks .from_dict (result .to_dict ())
94
+ if result :
95
+ return IdentChecks .from_json (result .to_json ())
96
+ return None
73
97
74
98
@property
75
99
def barcode_format_checks (self ) -> Optional [SecurityFeatureChecks ]:
76
100
result = self .__result_by_type (AuthenticityResultType .BARCODE_FORMAT_CHECK )
77
- return SecurityFeatureChecks .from_dict (result .to_dict ())
101
+ if result :
102
+ return SecurityFeatureChecks .from_json (result .to_json ())
103
+ return None
78
104
79
105
@property
80
106
def kinegram_checks (self ) -> Optional [IdentChecks ]:
81
107
result = self .__result_by_type (AuthenticityResultType .KINEGRAM )
82
- return IdentChecks .from_dict (result .to_dict ())
108
+ if result :
109
+ return IdentChecks .from_json (result .to_json ())
110
+ return None
83
111
84
112
@property
85
113
def letter_screen_checks (self ) -> Optional [IdentChecks ]:
86
114
result = self .__result_by_type (AuthenticityResultType .LETTER_SCREEN )
87
- return IdentChecks .from_dict (result .to_dict ())
115
+ if result :
116
+ return IdentChecks .from_json (result .to_json ())
117
+ return None
88
118
89
119
def __result_by_type (self , authenticity_type : int ) -> Optional [AuthenticityCheckResult ]:
90
120
for result in self .list :
0 commit comments