|
@@ 110-119 (lines=10) @@
|
| 107 |
|
return true; |
| 108 |
|
} |
| 109 |
|
|
| 110 |
|
public function unsubscribe(string $email, string $listName = '') |
| 111 |
|
{ |
| 112 |
|
$list = $this->lists->findByName($listName); |
| 113 |
|
|
| 114 |
|
$response = $this->mailChimp->patch("lists/{$list->getId()}/members/{$this->getSubscriberHash($email)}", [ |
| 115 |
|
'status' => 'unsubscribed', |
| 116 |
|
]); |
| 117 |
|
|
| 118 |
|
return $response; |
| 119 |
|
} |
| 120 |
|
|
| 121 |
|
public function updateEmailAddress(string $currentEmailAddress, string $newEmailAddress, string $listName = '') |
| 122 |
|
{ |
|
@@ 121-130 (lines=10) @@
|
| 118 |
|
return $response; |
| 119 |
|
} |
| 120 |
|
|
| 121 |
|
public function updateEmailAddress(string $currentEmailAddress, string $newEmailAddress, string $listName = '') |
| 122 |
|
{ |
| 123 |
|
$list = $this->lists->findByName($listName); |
| 124 |
|
|
| 125 |
|
$response = $this->mailChimp->patch("lists/{$list->getId()}/members/{$this->getSubscriberHash($currentEmailAddress)}", [ |
| 126 |
|
'email_address' => $newEmailAddress, |
| 127 |
|
]); |
| 128 |
|
|
| 129 |
|
return $response; |
| 130 |
|
} |
| 131 |
|
|
| 132 |
|
public function delete(string $email, string $listName = '') |
| 133 |
|
{ |