You are here

function CampaignMonitor::listUpdate in Campaign Monitor 6.3

Same name and namespace in other branches
  1. 5.2 lib/CMBase.php \CampaignMonitor::listUpdate()
  2. 6.2 lib/CMBase.php \CampaignMonitor::listUpdate()

*

Parameters

int $list_id (List) ID of the list to be updated: * @param string $title (Title) Name of the new list * @param string $unsubscribePage (UnsubscribePage) URL of the page users will be * directed to when they unsubscribe from this list. * @param string $confirmOptIn (ConfirmOptIn) If true, the user will be sent a confirmation * email before they are added to the list. If they click the link to confirm * their subscription they will be added to the list. If false, they will be * added automatically. * @param string $confirmationSuccessPage (ConfirmationSuccessPage) URL of the page that * users will be sent to if they confirm their subscription. Only required when $confirmOptIn is true. * @see http://www.campaignmonitor.com/api/method/list-update/

File

lib/CMBase.php, line 1367

Class

CampaignMonitor
The new CampaignMonitor class that now extends from CMBase. This should be backwards compatible with the original (PHP5) version.

Code

function listUpdate($list_id, $title, $unsubscribePage, $confirmOptIn, $confirmationSuccessPage) {
  if ($confirmOptIn == 'false') {
    $confirmationSuccessPage = '';
  }
  return $this
    ->makeCall('List.Update', array(
    'params' => array(
      'ListID' => $list_id,
      'Title' => $title,
      'UnsubscribePage' => $unsubscribePage,
      'ConfirmOptIn' => $confirmOptIn,
      'ConfirmationSuccessPage' => $confirmationSuccessPage,
    ),
  ));
}