public function add(ProcessableComponentInterface $component)
    {
        switch (get_class($component)) {
            case "IP1\RESTClient\Recipient\Contact":
                $response = $this->sendRequest("api/contacts", "POST", json_encode($component));
                return RecipientFactory::createProcessedContactFromJSON($response);

            case "IP1\RESTClient\Recipient\Group":
                $response = $this->sendRequest("api/groups", "POST", json_encode($component));
                return RecipientFactory::createProcessedGroupFromJSON($response);

            case "IP1\RESTClient\Recipient\Membership":
                $response = $this->sendRequest("api/memberships", "POST", json_encode($component));
                return RecipientFactory::createProcessedMembershipFromJSON($response);

            case "IP1\RESTClient\SMS\OutGoingSMS":
                $response = $this->sendRequest("api/sms/send", "POST", json_encode($component));
                return RecipientFactory::createProcessedOutGoingSMSFromJSONArray($response);
            case "IP1\RESTClient\Recipient\BlacklistEntry":
                $response = $this->sendRequest("api/blacklist", "POST", json_encode($component));
                $stdResponse = json_decode($response);
                $created = new \DateTime($stdResponse->Created);
                return new ProcessedBlacklistEntry($stdResponse->Phone, $stdResponse->ID, $created);
            default:
                throw new \InvalidArgumentException("Given JsonSerializable not supported.");
        }
    }