def get(self, request, id):
        """
        Get User
        @param request:
        @type request:
        @param _id:
        @type _id:
        @return:
        @rtype:
        """
        request = DjangoRequest(request)
        response = DjangoRestResponse()
        address_repository = DjangoAddressRepository()
        request_serializer_manager = DjangoSerializerManager(
            DjangoGetAddressSerializer)
        response_serializer_manager = DjangoSerializerManager(
            DjangoAddressSerializer)
        in_memory_event_bus = InMemoryEventBus()

        user_get_api = AddressFinderController(request, response,
                                               address_repository,
                                               request_serializer_manager,
                                               response_serializer_manager,
                                               in_memory_event_bus)

        response = user_get_api(id)
        return response
    def post(self, request):
        """
        POST VERB
        @param request: request
        @type request: Request
        @return: Response
        @rtype: Response
        """

        request = DjangoRequest(request)
        response = DjangoRestResponse()
        phone_repository = PhoneRepository()
        unit_of_work = DjangoUnitOfWork()
        phone_serializer_manager = SerializerManager(PhoneSerializer)
        in_memory_message_bus = InMemoryMessageBus()

        create_user_controller = CreatePhoneController(
            request,
            response,
            phone_serializer_manager,
            phone_repository,
            unit_of_work,
            in_memory_message_bus)

        response = create_user_controller()
        return response
    def post(self, request):
        request = DjangoRequest(request)
        response = DjangoRestResponse()
        user_repository = DjangoAddressRepository()
        unit_of_work = DjangoUnitOfWork()
        address_serializer_manager = DjangoSerializerManager(
            DjangoAddressSerializer)
        in_memory_event_bus = InMemoryEventBus()

        create_user_controller = CreateAddressController(
            request, response, address_serializer_manager, user_repository,
            unit_of_work, in_memory_event_bus)
        response = create_user_controller()
        return response
    def post(self, request):
        request = DjangoRequest(request)
        response = RestResponse()
        person_repository = PersonRepository()
        unit_of_work = UnitOfWork()
        person_serializer_manager = SerializerManager(PersonSerializer)
        in_memory_event_bus = InMemoryEventBus()

        person_creator_controller = PersonCreatorController(
            request, response, person_serializer_manager, person_repository,
            unit_of_work, in_memory_event_bus)

        response = person_creator_controller()
        return response
    def get(self, request, id):
        request = DjangoRequest(request)
        response = DjangoRestResponse()
        phone_repository = PhoneRepository()
        request_serializer_manager = SerializerManager(GetPhoneSerializer)
        response_serializer_manager = SerializerManager(PhoneSerializer)
        in_memory_message_bus = InMemoryMessageBus()

        get_phone_controller = GetPhoneController(
            request,
            response,
            phone_repository,
            request_serializer_manager,
            response_serializer_manager,
            in_memory_message_bus)

        response = get_phone_controller(id)
        return response
 def delete(self, request, _id):
     """
     Delete user api
     @param request:
     @type request:
     @param _id:
     @type _id:
     @return:
     @rtype:
     """
     request = DjangoRequest(request)
     response = DjangoRestResponse()
     user_repository = DjangoUserRepository()
     request_serializer_manager = DjangoSerializerManager(
         DjangoGetUserSerializer)
     delete_user_api = DeleteUserApi(request, response,
                                     request_serializer_manager,
                                     user_repository)
     response = delete_user_api(_id)
     return response
    def get(self, request, id):
        """
        Get User
        @param request:
        @type request:
        @param _id:
        @type _id:
        @return:
        @rtype:
        """
        request = DjangoRequest(request)
        response = RestResponse()
        address_repository = PersonRepository()
        request_serializer_manager = SerializerManager(GetPersonSerializer)
        response_serializer_manager = SerializerManager(PersonSerializer)

        person_finder_controller = PersonFinderController(
            request, response, address_repository, request_serializer_manager,
            response_serializer_manager)

        response = person_finder_controller(id)
        return response
 def get(self, request, _id: str = None):
     """
     Get User
     @param request:
     @type request:
     @param _id:
     @type _id:
     @return:
     @rtype:
     """
     request = DjangoRequest(request)
     response = DjangoRestResponse()
     user_repository = DjangoUserRepository()
     request_serializer_manager = DjangoSerializerManager(
         DjangoGetUserSerializer)
     response_serializer_manager = DjangoSerializerManager(
         DjangoUserSerializer)
     user_get_api = GetUserApi(request, response, user_repository,
                               request_serializer_manager,
                               response_serializer_manager)
     response = user_get_api(_id)
     return response
 def put(self, request, _id: str = None):
     """
     Update User
     @param request: request
     @type request: response
     @param _id: user id
     @type _id: int
     @return: post response
     @rtype: Response
     """
     request = DjangoRequest(request)
     response = DjangoRestResponse()
     user_repository = DjangoUserRepository()
     unit_of_work = DjangoUnitOfWork()
     password_creator = DjangoPasswordCreator()
     user_serializer_manager = DjangoSerializerManager(
         DjangoCreateUserSerializer)
     update_user_api = UpdateUserApi(request, response,
                                     user_serializer_manager,
                                     user_repository, password_creator,
                                     unit_of_work)
     response = update_user_api()
     return response