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()

Updates a segment associated with a Mailchimp list.

Parameters

string $list_id: The ID of the list.

int $segment_id: The ID of the segment.

string $name: The name of the segment.

array $parameters: Associative array of optional request parameters.

bool $batch: TRUE to create a new pending batch operation.

Return value

object

See also

http://developer.mailchimp.com/documentation/mailchimp/reference/lists/s...

1 call to MailchimpLists::updateSegment()
MailchimpLists::updateSegment in lib/mailchimp-api-php/tests/src/MailchimpLists.php
@inheritdoc
1 method overrides MailchimpLists::updateSegment()
MailchimpLists::updateSegment in lib/mailchimp-api-php/tests/src/MailchimpLists.php
@inheritdoc

File

lib/mailchimp-api-php/src/MailchimpLists.php, line 427

Class

MailchimpLists
Mailchimp Lists/Audiences library.

Namespace

Mailchimp

Code

public function updateSegment($list_id, $segment_id, $name, $parameters = [], $batch = FALSE) {
  $tokens = [
    'list_id' => $list_id,
    'segment_id' => $segment_id,
  ];
  $parameters += [
    'name' => $name,
  ];
  return $this
    ->request('PATCH', '/lists/{list_id}/segments/{segment_id}', $tokens, $parameters, $batch);
}