You are here

public function MailchimpLists::getSegments in Mailchimp 8

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

@inheritdoc

Overrides MailchimpLists::getSegments

File

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

Class

MailchimpLists
Mailchimp Lists library test cases.

Namespace

Mailchimp\Tests

Code

public function getSegments($list_id, $parameters = []) {
  parent::getSegments($list_id, $parameters);
  $response = (object) [
    'segments' => [
      (object) [
        'id' => 49377,
        'name' => 'Test Segment One',
        'type' => 'static',
        'list_id' => $list_id,
      ],
      (object) [
        'id' => 49378,
        'name' => 'Test Segment Two',
        'type' => 'static',
        'list_id' => $list_id,
      ],
    ],
    'total_items' => 2,
  ];
  return $response;
}