File tree Expand file tree Collapse file tree 2 files changed +32
-1
lines changed Expand file tree Collapse file tree 2 files changed +32
-1
lines changed Original file line number Diff line number Diff line change @@ -439,6 +439,29 @@ public function removeEmails($bookID, $emails)
439439 return $ this ->handleResult ($ requestResult );
440440 }
441441
442+ /**
443+ * Unsubscribe email addresses from book
444+ *
445+ * @param $bookID
446+ * @param $emails
447+ *
448+ * @return stdClass
449+ */
450+ public function unsubscribeEmails ($ bookID , $ emails )
451+ {
452+ if (empty ($ bookID ) || empty ($ emails )) {
453+ return $ this ->handleError ('Empty book id or emails ' );
454+ }
455+
456+ $ data = array (
457+ 'emails ' => serialize ($ emails ),
458+ );
459+
460+ $ requestResult = $ this ->sendRequest ('addressbooks/ ' . $ bookID . '/emails/unsubscribe ' , 'POST ' , $ data );
461+
462+ return $ this ->handleResult ($ requestResult );
463+ }
464+
442465 /**
443466 * Get information about email address from book
444467 *
@@ -1628,4 +1651,4 @@ public function deleteSmsCampaign($campaignID)
16281651
16291652 return $ this ->handleResult ($ requestResult );
16301653 }
1631- }
1654+ }
Original file line number Diff line number Diff line change @@ -82,6 +82,14 @@ public function addEmails($bookID, $emails);
8282 */
8383 public function removeEmails ($ bookID , $ emails );
8484
85+ /**
86+ * Unsubscribe email addresses from book
87+ *
88+ * @param $bookID
89+ * @param $emails
90+ */
91+ public function unsubscribeEmails ($ bookID , $ emails );
92+
8593 /**
8694 * Get information about email from book
8795 *
You can’t perform that action at this time.
0 commit comments