From 8b0cff508e497dd38c0fd9f3d988c7cfc76f48fd Mon Sep 17 00:00:00 2001 From: PhoenixPM - BK Date: Tue, 1 Aug 2017 19:36:02 +0200 Subject: [PATCH 1/2] adding addBlacklistEntries method to support https://api.emarsys.net/api/v2/blacklist --- src/Snowcap/Emarsys/Client.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/Snowcap/Emarsys/Client.php b/src/Snowcap/Emarsys/Client.php index fcfd14a..734bdc6 100644 --- a/src/Snowcap/Emarsys/Client.php +++ b/src/Snowcap/Emarsys/Client.php @@ -777,6 +777,19 @@ public function createCustomField($name, $type) return $this->send(HttpClient::POST, 'field', array('name'=>$name, 'application_type'=>$type)); } + /** + * Adds list of emails and domains to blacklist + * + * @param array $emails + * @param array $domains + * + * @return Response + */ + public function addToBlacklist(array $emails = array(), array $domains = array()) + { + return $this->send(HttpClient::POST, 'blacklist', array('emails' => $emails, 'domains' => $domains)); + } + /** * @param string $method * @param string $uri From 9e13abff0ae2107933c622f15b33e9b25b240b2b Mon Sep 17 00:00:00 2001 From: PhoenixPM - BK Date: Wed, 2 Aug 2017 05:34:48 +0200 Subject: [PATCH 2/2] added addBlacklistEntries method to add emails and domains to blacklist --- src/Snowcap/Emarsys/Client.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Snowcap/Emarsys/Client.php b/src/Snowcap/Emarsys/Client.php index 734bdc6..3d62e58 100644 --- a/src/Snowcap/Emarsys/Client.php +++ b/src/Snowcap/Emarsys/Client.php @@ -785,7 +785,7 @@ public function createCustomField($name, $type) * * @return Response */ - public function addToBlacklist(array $emails = array(), array $domains = array()) + public function addBlacklistEntries(array $emails = array(), array $domains = array()) { return $this->send(HttpClient::POST, 'blacklist', array('emails' => $emails, 'domains' => $domains)); }