@@ -14,77 +14,107 @@ class AuthenticityCheckList(GenAuthenticityCheckList):
1414 @property
1515 def uv_luminescence_checks (self ) -> Optional [SecurityFeatureChecks ]:
1616 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
1820
1921 @property
2022 def ir_b900_checks (self ) -> Optional [SecurityFeatureChecks ]:
2123 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
2327
2428 @property
2529 def image_pattern_checks (self ) -> Optional [IdentChecks ]:
2630 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
2834
2935 @property
3036 def axial_protection_checks (self ) -> Optional [SecurityFeatureChecks ]:
3137 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
3341
3442 @property
3543 def uv_fiber_checks (self ) -> Optional [FiberChecks ]:
3644 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
3848
3949 @property
4050 def ir_visibility_checks (self ) -> Optional [IdentChecks ]:
4151 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
4355
4456 @property
4557 def ocr_security_text_checks (self ) -> Optional [OCRSecurityTextChecks ]:
4658 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
4862
4963 @property
5064 def ipi_checks (self ) -> Optional [ImageIdentChecks ]:
5165 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
5369
5470 @property
5571 def embed_image_checks (self ) -> Optional [SecurityFeatureChecks ]:
5672 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
5876
5977 @property
6078 def holograms_checks (self ) -> Optional [SecurityFeatureChecks ]:
6179 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
6383
6484 @property
6585 def photo_area_checks (self ) -> Optional [SecurityFeatureChecks ]:
6686 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
6890
6991 @property
7092 def portrait_comparison_checks (self ) -> Optional [IdentChecks ]:
7193 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
7397
7498 @property
7599 def barcode_format_checks (self ) -> Optional [SecurityFeatureChecks ]:
76100 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
78104
79105 @property
80106 def kinegram_checks (self ) -> Optional [IdentChecks ]:
81107 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
83111
84112 @property
85113 def letter_screen_checks (self ) -> Optional [IdentChecks ]:
86114 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
88118
89119 def __result_by_type (self , authenticity_type : int ) -> Optional [AuthenticityCheckResult ]:
90120 for result in self .list :
0 commit comments