public function MailchimpLists::addSegment in Mailchimp 8
Same name in this branch
- 8 lib/mailchimp-api-php/src/MailchimpLists.php \Mailchimp\MailchimpLists::addSegment()
- 8 lib/mailchimp-api-php/tests/src/MailchimpLists.php \Mailchimp\Tests\MailchimpLists::addSegment()
@inheritdoc
Overrides MailchimpLists::addSegment
File
- lib/
mailchimp-api-php/ tests/ src/ MailchimpLists.php, line 257
Class
- MailchimpLists
- Mailchimp Lists library test cases.
Namespace
Mailchimp\TestsCode
public function addSegment($list_id, $name, $parameters = [], $batch = FALSE) {
parent::addSegment($list_id, $name, $parameters, $batch);
$response = (object) [];
if (!empty($list_id) && !empty($name) && !empty($parameters['type'])) {
$response->id = 49381;
$response->name = $name;
$response->type = $parameters['type'];
$response->list_id = $list_id;
}
return $response;
}