Skip to content

Commit

Permalink
docs in config
Browse files Browse the repository at this point in the history
  • Loading branch information
rogelioLpz committed May 27, 2022
1 parent eb25cb8 commit f5c06dc
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
42 changes: 42 additions & 0 deletions cuenca/resources/curp_validations.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,48 @@ class CurpValidation(Creatable, Retrievable):
renapo_curp_match: bool
renapo_full_match: bool

class Config:
fields = {
'names': {'description': 'Official name from Renapo'},
'first_surname': {'description': 'Official surname from Renapo'},
'second_surname': {'description': 'Official surname from Renapo'},
'state_of_birth': {'description': 'In format ISO 3166 Alpha-2'},
'nationality': {'description': 'In format ISO 3166 Alpha-2'},
'manual_curp': {'description': 'curp provided in request'},
'calculated_curp': {
'description': 'Calculated curp based on request data'
},
'validated_curp': {
'description': 'Curp validated in Renapo, null if not exists'
},
'renapo_curp_match': {
'description': 'True if curp exists and is valid'
},
'renapo_full_match': {
'description': 'True if all fields provided match the response from RENAPO. '
'Accents in names are ignored'
},
}
schema_extra = {
"example": {
"id": "CV-123",
"created_at": "2019-08-24T14:15:22Z",
"names": "Guillermo",
"first_surname": "Gonzales",
"second_surname": "Camarena",
"date_of_birth": "1965-04-18",
"country_of_birth": "MX",
"state_of_birth": "VZ",
"gender": "male",
"nationality": "MX",
"manual_curp": None,
"calculated_curp": "GOCG650418HVZNML08",
"validated_curp": "GOCG650418HVZNML08",
"renapo_curp_match": True,
"renapo_full_match": True,
}
}

@classmethod
def create(
cls,
Expand Down
2 changes: 1 addition & 1 deletion cuenca/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__version__ = '0.10.0.dev0'
__version__ = '0.10.0.dev1'
CLIENT_VERSION = __version__
API_VERSION = '2020-03-19'

0 comments on commit f5c06dc

Please sign in to comment.