def METHOD_NAME(self, params):
    invitation = Invitation.objects.get(pk=params["id"])
    if "permission" in params:
        invitation.permission = params["permission"]
    if "status" in params:
        invitation.status = params["status"]
    invitation.save()
    return {"message": f"Invitation {params['id']} successfully updated!"}