You are here

public function MailchimpLists::addWebhook in Mailchimp 8

Same name in this branch
  1. 8 lib/mailchimp-api-php/src/MailchimpLists.php \Mailchimp\MailchimpLists::addWebhook()
  2. 8 lib/mailchimp-api-php/tests/src/MailchimpLists.php \Mailchimp\Tests\MailchimpLists::addWebhook()

@inheritdoc

Overrides MailchimpLists::addWebhook

File

lib/mailchimp-api-php/tests/src/MailchimpLists.php, line 319

Class

MailchimpLists
Mailchimp Lists library test cases.

Namespace

Mailchimp\Tests

Code

public function addWebhook($list_id, $url, $parameters = [], $batch = FALSE) {
  parent::addWebhook($list_id, $url, $parameters, $batch);
  $response = (object) [
    'id' => 'ab24521a00',
    'url' => $url,
    'list_id' => $list_id,
  ];
  foreach ($parameters as $key => $value) {
    $response->{$key} = $value;
  }
  return $response;
}