public function edit(UpdatableComponentInterface $component): UpdatableComponentInterface
    {
        switch (get_class($component)) {
            case "IP1\RESTClient\Recipient\ProcessedContact":
                $response = $this->sendRequest(
                    "api/contacts/".$component->getID(),
                    "PUT",
                    json_encode($component)
                );
                return RecipientFactory::createProcessedContactFromJSON($response);

            case "IP1\RESTClient\Recipient\ProcessedGroup":
                $response = $this->sendRequest(
                    "api/groups/".$component->getID(),
                    "PUT",
                    json_encode($component)
                );
                return RecipientFactory::createProcessedGroupFromJSON($response);
            default:
                throw new \InvalidArgumentException("Given JsonSerializable not supported.");
        }
    }