@@ -31,6 +31,48 @@ class CurpValidation(Creatable, Retrievable):
3131 renapo_curp_match : bool
3232 renapo_full_match : bool
3333
34+ class Config :
35+ fields = {
36+ 'names' : {'description' : 'Official name from Renapo' },
37+ 'first_surname' : {'description' : 'Official surname from Renapo' },
38+ 'second_surname' : {'description' : 'Official surname from Renapo' },
39+ 'state_of_birth' : {'description' : 'In format ISO 3166 Alpha-2' },
40+ 'nationality' : {'description' : 'In format ISO 3166 Alpha-2' },
41+ 'manual_curp' : {'description' : 'curp provided in request' },
42+ 'calculated_curp' : {
43+ 'description' : 'Calculated curp based on request data'
44+ },
45+ 'validated_curp' : {
46+ 'description' : 'Curp validated in Renapo, null if not exists'
47+ },
48+ 'renapo_curp_match' : {
49+ 'description' : 'True if curp exists and is valid'
50+ },
51+ 'renapo_full_match' : {
52+ 'description' : 'True if all fields provided match the response from RENAPO. '
53+ 'Accents in names are ignored'
54+ },
55+ }
56+ schema_extra = {
57+ "example" : {
58+ "id" : "CV-123" ,
59+ "created_at" : "2019-08-24T14:15:22Z" ,
60+ "names" : "Guillermo" ,
61+ "first_surname" : "Gonzales" ,
62+ "second_surname" : "Camarena" ,
63+ "date_of_birth" : "1965-04-18" ,
64+ "country_of_birth" : "MX" ,
65+ "state_of_birth" : "VZ" ,
66+ "gender" : "male" ,
67+ "nationality" : "MX" ,
68+ "manual_curp" : None ,
69+ "calculated_curp" : "GOCG650418HVZNML08" ,
70+ "validated_curp" : "GOCG650418HVZNML08" ,
71+ "renapo_curp_match" : True ,
72+ "renapo_full_match" : True ,
73+ }
74+ }
75+
3476 @classmethod
3577 def create (
3678 cls ,
0 commit comments