-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2447f60
commit 7975a15
Showing
3 changed files
with
42 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import datetime as dt | ||
from typing import ClassVar, cast | ||
|
||
from cuenca_validations.types import QuestionnaireRequest | ||
|
||
from ..http import Session, session as global_session | ||
from .base import Creatable, Retrievable | ||
|
||
|
||
class Questionnaires(Creatable, Retrievable): | ||
_resource: ClassVar = 'questionnaires' | ||
|
||
created_at: dt.datetime | ||
|
||
class Config: | ||
schema_extra = { | ||
'example': { | ||
'user_id': 'US234i23jh23h4h23', | ||
'token': '3223j23ij23ij3', | ||
'alert_id': 'ALewifjwiejf', | ||
} | ||
} | ||
|
||
@classmethod | ||
def create( | ||
cls, | ||
user_id: str, | ||
token: str, | ||
alert_id: str, | ||
*, | ||
session: Session = global_session, | ||
) -> 'Questionnaires': | ||
req = QuestionnaireRequest( | ||
user_id=user_id, | ||
token=token, | ||
alert_id=alert_id, | ||
) | ||
return cast( | ||
'Questionnaires', cls._create(session=session, **req.dict()) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
__version__ = '0.15.9' | ||
__version__ = '0.15.11.dev0' | ||
CLIENT_VERSION = __version__ | ||
API_VERSION = '2020-03-19' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
requests==2.27.1 | ||
cuenca-validations==0.11.19 | ||
cuenca-validations==0.11.23.dev0 | ||
dataclasses>=0.7;python_version<"3.7" |