Skip to content

Commit 932d6be

Browse files
committed
Verification docs
1 parent b31f85e commit 932d6be

File tree

4 files changed

+28
-2
lines changed

4 files changed

+28
-2
lines changed

cuenca/resources/user_events.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,24 @@
11
from typing import ClassVar
22

33
from .identity_events import IdentityEvent
4+
from .users import User
45

56

67
class UserEvent(IdentityEvent):
78
_resource: ClassVar = 'user_events'
89

910
user_id: str
1011
platform_id: str
12+
13+
class Config:
14+
schema_extra = {
15+
"example": {
16+
"id": "UE-123",
17+
"created_at": "2022-05-24T14:15:22Z",
18+
"identity_id": "ID-123",
19+
"type": "created",
20+
"user_id": "US-123",
21+
"platform_id": "PT-123",
22+
"new_model": User.schema().get('example'),
23+
}
24+
}

cuenca/resources/verifications.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,18 @@ class Verification(Creatable, Updateable):
2121
created_at: dt.datetime
2222
deactivated_at: Optional[dt.datetime]
2323

24+
class Config:
25+
fields = {'recipient': {'description': 'Phone or email to validate'}}
26+
schema_extra = {
27+
"example": {
28+
"id": "VE-123",
29+
"recipient": "user@example.com",
30+
"type": "email",
31+
"created_at": "2022-05-24T14:15:22Z",
32+
"deactivated_at": None,
33+
}
34+
}
35+
2436
@classmethod
2537
def create(
2638
cls,

cuenca/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
__version__ = '0.10.0.dev3'
1+
__version__ = '0.10.0.dev4'
22
CLIENT_VERSION = __version__
33
API_VERSION = '2020-03-19'

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
requests==2.27.1
2-
cuenca-validations==0.10.7.dev3
2+
cuenca-validations==0.10.7.dev4
33
dataclasses>=0.7;python_version<"3.7"

0 commit comments

Comments
 (0)