You are here

public function MailchimpLists::updateSegment in Mailchimp 8

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

@inheritdoc

Overrides MailchimpLists::updateSegment

File

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

Class

MailchimpLists
Mailchimp Lists library test cases.

Namespace

Mailchimp\Tests

Code

public function updateSegment($list_id, $segment_id, $name, $parameters = [], $batch = FALSE) {
  parent::updateSegment($list_id, $segment_id, $name, $parameters);
  $response = (object) [
    'id' => $segment_id,
    'name' => $name,
    'member_count' => isset($parameters['static_segment']) ? count($parameters['static_segment']) : 0,
    'list_id' => $list_id,
  ];
  return $response;
}