@@ -44,53 +44,104 @@ def __init__(self, profile_attributes):
44
44
45
45
@property
46
46
def date_of_birth (self ):
47
+ """date_of_birth represents the user's date of birth as a string.
48
+ Will be changed to return a datetime in v3.0.0.
49
+ Will be None if not provided by Yoti.
50
+ :return: Attribute(str)
51
+ """
47
52
return self .get_attribute (config .ATTRIBUTE_DATE_OF_BIRTH )
48
53
49
54
@property
50
55
def family_name (self ):
56
+ """family_name represents the user's family name. This will be None if not provided by Yoti.
57
+ :return: Attribute(str)
58
+ """
51
59
return self .get_attribute (config .ATTRIBUTE_FAMILY_NAME )
52
60
61
+ @property
62
+ def given_names (self ):
63
+ """given_names represents the user's given names. This will be None if not provided by Yoti.
64
+ :return: Attribute(str)
65
+ """
66
+ return self .get_attribute (config .ATTRIBUTE_GIVEN_NAMES )
67
+
53
68
@property
54
69
def full_name (self ):
70
+ """full_name represents the user's full name.
71
+ If family_name and given_names are present, the value will be equal to the string 'given_names + " " + family_name'.
72
+ Will be None if not provided by Yoti.
73
+ :return: Attribute(str)
74
+ """
55
75
return self .get_attribute (config .ATTRIBUTE_FULL_NAME )
56
76
57
77
@property
58
78
def gender (self ):
79
+ """gender corresponds to the gender in the registered document.
80
+ The value will be one of the strings "MALE", "FEMALE", "TRANSGENDER" or "OTHER".
81
+ Will be None if not provided by Yoti.
82
+ :return: Attribute(str)
83
+ """
59
84
return self .get_attribute (config .ATTRIBUTE_GENDER )
60
85
61
- @property
62
- def given_names (self ):
63
- return self .get_attribute (config .ATTRIBUTE_GIVEN_NAMES )
64
-
65
86
@property
66
87
def nationality (self ):
88
+ """nationality corresponds to the nationality in the passport.
89
+ The value is an ISO-3166-1 alpha-3 code with ICAO9303 (passport) extensions.
90
+ Will be None if not provided by Yoti.
91
+ :return: Attribute(str)
92
+ """
67
93
return self .get_attribute (config .ATTRIBUTE_NATIONALITY )
68
94
69
95
@property
70
96
def email_address (self ):
97
+ """email_address represents the user's email address. This will be None if not provided by Yoti.
98
+ :return: Attribute(str)
99
+ """
71
100
return self .get_attribute (config .ATTRIBUTE_EMAIL_ADDRESS )
72
101
73
102
@property
74
103
def phone_number (self ):
104
+ """phone_number represents the user's mobile phone number. This will be None if not provided by Yoti.
105
+ :return: Attribute(str)
106
+ """
75
107
return self .get_attribute (config .ATTRIBUTE_PHONE_NUMBER )
76
108
77
109
@property
78
110
def postal_address (self ):
111
+ """postal_address represents the user's address. This will be None if not provided by Yoti.
112
+ :return: Attribute(str)
113
+ """
79
114
return self .get_attribute (config .ATTRIBUTE_POSTAL_ADDRESS )
80
115
81
116
@property
82
117
def selfie (self ):
118
+ """selfie is a photograph of the user. Will be None if not provided by Yoti.
119
+ :return: Attribute(image)
120
+ """
83
121
return self .get_attribute (config .ATTRIBUTE_SELFIE )
84
122
85
123
@property
86
124
def structured_postal_address (self ):
125
+ """structured_postal_address represents the user's address represented as an OrderedDict.
126
+ This will be None if not provided by Yoti.
127
+ :return: Attribute(OrderedDict)
128
+ """
87
129
return self .get_attribute (config .ATTRIBUTE_STRUCTURED_POSTAL_ADDRESS )
88
130
89
131
@property
90
132
def document_images (self ):
133
+ """document_images returns a tuple of document images cropped from the image in the capture page.
134
+ There can be multiple images as per the number of regions in the capture in this attribute.
135
+ Will be None if not provided by Yoti.
136
+ :return: Attribute(tuple(image))
137
+ """
91
138
return self .get_attribute (config .ATTRIBUTE_DOCUMENT_IMAGES )
92
139
93
140
def get_attribute (self , attribute_name ):
141
+ """retrieves an attribute based on its name
142
+ :param attribute_name:
143
+ :return: Attribute
144
+ """
94
145
if attribute_name in self .attributes :
95
146
return self .attributes .get (attribute_name )
96
147
else :
0 commit comments