From f3f56c4f52d393dbf5d4487948da201164e9f04a Mon Sep 17 00:00:00 2001 From: Sergey Gripinskiy Date: Tue, 22 Nov 2016 13:11:44 +0300 Subject: [PATCH 1/3] Add contact in list checking method --- src/Snowcap/Emarsys/Client.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/Snowcap/Emarsys/Client.php b/src/Snowcap/Emarsys/Client.php index 1c11b11..a15df37 100644 --- a/src/Snowcap/Emarsys/Client.php +++ b/src/Snowcap/Emarsys/Client.php @@ -417,6 +417,21 @@ public function getContactsFromContactList($listId, array $data) return $this->send(HttpClient::GET, sprintf('contactlist/%s/contacts', $listId), $data); } + /** + * Checks whether a specific contact is included in the defined contact list. + * + * @param integer $contactId + * @param integer $listId + * + * @return Response + * + * @link http://documentation.emarsys.com/resource/developers/endpoints/contacts/check-a-contact-in-a-contact-list/ + */ + public function checkContactInList($contactId, $listId) + { + return $this->send(HttpClient::GET, sprintf('contactlist/%s/contacts/%s', $listId, $contactId)); + } + /** * Returns a list of emails. * From 5380bf1a61e18cafcb1220b4b139847417a05495 Mon Sep 17 00:00:00 2001 From: Sergey Gripinskiy Date: Tue, 22 Nov 2016 18:06:45 +0300 Subject: [PATCH 2/3] Add contact in list checking method Format according to project codestyle; --- src/Snowcap/Emarsys/Client.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Snowcap/Emarsys/Client.php b/src/Snowcap/Emarsys/Client.php index a15df37..87e3450 100644 --- a/src/Snowcap/Emarsys/Client.php +++ b/src/Snowcap/Emarsys/Client.php @@ -418,13 +418,11 @@ public function getContactsFromContactList($listId, array $data) } /** - * Checks whether a specific contact is included in the defined contact list. - * - * @param integer $contactId - * @param integer $listId + * Check whether a specific contact is included in the defined contact list. * + * @param int $contactId + * @param int $listId * @return Response - * * @link http://documentation.emarsys.com/resource/developers/endpoints/contacts/check-a-contact-in-a-contact-list/ */ public function checkContactInList($contactId, $listId) From b6d556cde55c823e6463a9b60353f18ebd52458e Mon Sep 17 00:00:00 2001 From: Sergey Gripinskiy Date: Tue, 22 Nov 2016 22:12:28 +0300 Subject: [PATCH 3/3] Add contact in list checking method Correct third person verb form of description; --- 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 87e3450..a0e2f92 100644 --- a/src/Snowcap/Emarsys/Client.php +++ b/src/Snowcap/Emarsys/Client.php @@ -418,7 +418,7 @@ public function getContactsFromContactList($listId, array $data) } /** - * Check whether a specific contact is included in the defined contact list. + * Checks whether a specific contact is included in the defined contact list. * * @param int $contactId * @param int $listId