Exemplo n.º 1
0
 /**
  * Managing the lists for a single contact. Subscribe the contact to the given contact lists.
  *
  * @see http://dev.mailjet.com/email-api/v3/contact-managecontactslists/
  * @see http://dev.mailjet.com/guides/#subscribe-to-a-list
  *
  * @param string $ID            id of the current contact
  * @param array  $ContactsLists containing contactlists values
  *
  * @return Contact
  */
 public function manageContactInContactLists($ID, array $ContactsLists)
 {
     if (!is_integer($ID)) {
         throw new Exception\InvalidArgumentException('You must specify a valid ID');
     }
     $this->name = $this->name . "/{$ID}/managecontactslists";
     return parent::manage(array(), array('ContactsLists' => $ContactsLists), false);
 }
Exemplo n.º 2
0
 /**
  * Import the contacts of another contact list into the current list and apply the 
  * specified action on imported contacts. In case of conflict, the contact original 
  * subscription state is overridden. Returns the ID of the job to monitor.
  * Manage the duplication of a contact list.
  *
  * @see http://dev.mailjet.com/email-api/v3/contactslist-importlist/
  *
  * @param int $ID     id of the current list
  * @param int $Action Action to apply on imported contacts. Values: "addforce", "addnoforce", "unsub", "duplicate-override", "duplicate-no-override"
  * @param int $ListID ID of the list to import into the current list
  *
  * @return Contactslist
  */
 public function importList($ID, $Action, $ListID)
 {
     $this->name = $this->name . "/{$ID}/importlist";
     return parent::manage(array('Action' => $Action, 'ListID' => $ListID));
 }