diff --git a/src/Snowcap/Emarsys/Client.php b/src/Snowcap/Emarsys/Client.php index 4e923cf..1c11b11 100644 --- a/src/Snowcap/Emarsys/Client.php +++ b/src/Snowcap/Emarsys/Client.php @@ -263,6 +263,17 @@ public function updateContact(array $data) return $this->send(HttpClient::PUT, 'contact', $this->mapFieldsToIds($data)); } + /** + * Deletes a single contact/recipient, identified by an external ID. + * + * @param array $data + * @return Response + */ + public function deleteContact(array $data) + { + return $this->send(HttpClient::POST, 'contact/delete', $data); + } + /** * Returns the internal ID of a contact specified by its external ID. * @@ -359,6 +370,17 @@ public function createContactList(array $data) return $this->send(HttpClient::POST, 'contactlist', $data); } + /** + * Deletes a contact list which can be used as recipient source for the email. + * + * @param string $listId + * @return Response + */ + public function deleteContactList($listId) + { + return $this->send(HttpClient::POST, sprintf('contactlist/%s/deletelist', $listId)); + } + /** * Creates a contact list which can be used as recipient source for the email. * @@ -383,6 +405,18 @@ public function removeContactsFromContactList($listId, array $data) return $this->send(HttpClient::POST, sprintf('contactlist/%s/delete', $listId), $data); } + /** + * Get a list of contact IDs that are in a contact list + * + * @param string $listId + * @param array $data + * @return Response + */ + public function getContactsFromContactList($listId, array $data) + { + return $this->send(HttpClient::GET, sprintf('contactlist/%s/contacts', $listId), $data); + } + /** * Returns a list of emails. *