Add unsubscribe API method

It can be used by calling:

```
$mailpoet_api = \MailPoet\API\API::MP('v1');
$mailpoet_api->unsubscribe($subscriberId);
```

[MAILPOET-5152]
This commit is contained in:
Rodrigo Primo
2023-03-27 11:41:09 -03:00
committed by Aschepikov
parent d37b961c2b
commit c507229dd2
5 changed files with 114 additions and 1 deletions

View File

@ -24,4 +24,5 @@ class APIException extends \Exception {
const LIST_USED_IN_FORM = 21;
const FAILED_TO_DELETE_LIST = 22;
const LIST_TYPE_IS_NOT_SUPPORTED = 23;
const SUBSCRIBER_ALREADY_UNSUBSCRIBED = 24;
}