flask-webhook/flask_demo_api/usecase/get_gender.py

14 lines
418 B
Python
Raw Permalink Normal View History

2024-04-22 04:00:23 +03:00
from flask_demo_api.protocols.models import GenderResponse, PeopleRequest
from flask_demo_api.protocols.repository import RepositoryGateway
class GetGender:
def __init__(
self,
repository: RepositoryGateway,
) -> None:
self.__repository = repository
def __call__(self, request: PeopleRequest) -> GenderResponse | None:
return self.__repository.get_gender(people=request)