def METHOD_NAME(self, request, pk=None):
    if request.stream.method == "PUT":
        destination = self.queryset.filter(user=request.user).filter(pk=pk).first()
    elif request.stream.method == "PATCH":
        destination = get_object_or_404(self.queryset.filter(user=request.user), pk=pk)
    serializer = self.write_serializer_class(
        destination, data={"media": "sms", "settings": request.data}, context={"request": request}
    )
    if serializer.is_valid():
        serializer.save(user=request.user)
        response_serializer = self.serializer_class(serializer.instance)
        return Response(response_serializer.data, status=status.HTTP_201_CREATED)
    response_serializer = self.serializer_class(
        data={"user": request.user.pk, "phone_number": serializer.data["settings"]["phone_number"]}
    )
    return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)