summaryrefslogtreecommitdiffstats
path: root/src/Core/Communicator.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Core/Communicator.php')
-rw-r--r--src/Core/Communicator.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Core/Communicator.php b/src/Core/Communicator.php
index 257a6a4..1417e4c 100644
--- a/src/Core/Communicator.php
+++ b/src/Core/Communicator.php
@@ -4,7 +4,7 @@
* @author Hannes Kindströmmer <hannes@kindstrommer.se>
* @copyright 2017 IP1 SMS
* @license https://www.gnu.org/licenses/lgpl-3.0.txt LGPL-3.0
-* @version 0.1.0-beta
+* @version 0.2.0-beta
* @since File available since Release 0.1.0-beta
* @link http://api.ip1sms.com/Help
* @link https://github.com/iP1SMS/ip1-php-sdk
@@ -94,11 +94,13 @@ class Communicator
case "IP1\RESTClient\Recipient\ProcessedMembership":
$response = $this->sendRequest("api/memberships/".$component->getID(), "DELETE");
return RecipientFactory::createProcessedMembershipFromJSON($response);
+
case "IP1\RESTClient\Recipient\ProcessedBlacklistEntry":
$response = $this->sendRequest("api/blacklist/".$component->getID(), "DELETE");
$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.");
}