public function MailchimpLists::addOrUpdateMember in Mailchimp 8
Same name in this branch
- 8 lib/mailchimp-api-php/src/MailchimpLists.php \Mailchimp\MailchimpLists::addOrUpdateMember()
- 8 lib/mailchimp-api-php/tests/src/MailchimpLists.php \Mailchimp\Tests\MailchimpLists::addOrUpdateMember()
@inheritdoc
Overrides MailchimpLists::addOrUpdateMember
File
- lib/
mailchimp-api-php/ tests/ src/ MailchimpLists.php, line 196
Class
- MailchimpLists
- Mailchimp Lists library test cases.
Namespace
Mailchimp\TestsCode
public function addOrUpdateMember($list_id, $email, $parameters = [], $batch = FALSE) {
parent::addOrUpdateMember($list_id, $email, $parameters, $batch);
$response = (object) [
'id' => md5(strtolower($email)),
'email_address' => $email,
];
foreach ($parameters as $key => $value) {
$response->{$key} = $value;
}
return $response;
}