You are here

public function MailchimpCampaigns::updateCampaign in Mailchimp 8

Updates a campaign.

Parameters

string $campaign_id: The ID of the campaign.

string $type: The campaign type. See CAMPAIGN_TYPE_* constants.

object $recipients: List settings for the campaign.

object $settings: The subject, from name, reply-to, etc settings for the campaign.

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/campaig...

File

lib/mailchimp-api-php/src/MailchimpCampaigns.php, line 161

Class

MailchimpCampaigns
Mailchimp Campaigns library.

Namespace

Mailchimp

Code

public function updateCampaign($campaign_id, $type, $recipients, $settings, $parameters = [], $batch = FALSE) {
  $tokens = [
    'campaign_id' => $campaign_id,
  ];
  $parameters += [
    'type' => $type,
    'recipients' => $recipients,
    'settings' => $settings,
  ];
  return $this
    ->request('PATCH', '/campaigns/{campaign_id}', $tokens, $parameters, $batch);
}