Skip to content

Commit 9ef5111

Browse files
adding face catpure resource
1 parent 781b605 commit 9ef5111

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

yoti_python_sdk/doc_scan/session/retrieve/face_capture_response.py

+30-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
class FaceCaptureResponse(ResourceResponse):
66
"""
7-
Represents a Face Capture resource for a given session
7+
Represents a Face Capture resource for a given session.
88
"""
99

1010
def __init__(self, data=None):
@@ -26,3 +26,32 @@ def image(self):
2626
@property
2727
def tasks(self):
2828
return self._data.get("tasks") or []
29+
30+
31+
class FaceCaptureResource(object):
32+
"""
33+
Represents a Face Capture resource object.
34+
"""
35+
36+
def __init__(self, session_id=None, payload=None):
37+
self.__session_id = session_id
38+
self.__payload = payload
39+
40+
@property
41+
def session_id(self):
42+
return self.__session_id
43+
44+
@property
45+
def payload(self):
46+
return self.__payload
47+
48+
@classmethod
49+
def build(cls, session_id, face_capture_response):
50+
return cls(
51+
session_id=session_id,
52+
payload={
53+
"image": face_capture_response.image,
54+
"tasks": face_capture_response.tasks,
55+
"source": face_capture_response.source,
56+
}
57+
)

0 commit comments

Comments
 (0)