Skip to content

Commit

Permalink
Merge pull request #23 from oxyshop/feature-delete-subscriber
Browse files Browse the repository at this point in the history
Add deleteSubscriber() method
  • Loading branch information
Tlapi authored Mar 12, 2020
2 parents 57ebeab + 546dab2 commit 7274edc
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/Ecomail.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,21 @@ public function addSubscriberBulk($list_id, array $data){
$url = $this->joinString('lists/', $list_id, '/subscribe-bulk');
return $this->post($url, $data);
}


// === Subscribers ===


/**
* Remove subscriber from DB (all lists).
*
* @param string $email Email
* @return array|stdClass|string
*/
public function deleteSubscriber(string $email){
$url = $this->joinString('subscribers/', $email, '/delete');
return $this->delete($url);
}


// === Campaigns ===
Expand Down

0 comments on commit 7274edc

Please sign in to comment.