public function updateInterestGroup($old_name, $new_name, $grouping_id = NULL)
    {

        $payload = array(
            'id' => $this->listId,
            'old_name' => $old_name,
            'new_name' => $new_name,
            'grouping_id' => (NULL === $grouping_id) ? $this->grouping_id : $grouping_id
        );

        $apiCall = 'lists/interest-group-update';
        $data = $this->requestMonkey($apiCall, $payload);
        $data = json_decode($data, true);
        if (isset($data['error']))
            throw new MailchimpAPIException($data);
        else
            return true;
    }
public function updateInterestGroup($old_name, $new_name, $grouping_id = NULL)
    {

        $payload = array(
            'id' => $this->listId,
            'old_name' => $old_name,
            'new_name' => $new_name,
            'grouping_id' => (NULL === $grouping_id) ? $this->grouping_id : $grouping_id
        );

        $apiCall = 'lists/interest-group-update';
        $data = $this->requestMonkey($apiCall, $payload);
        $data = json_decode($data, true);
        if (isset($data['error']))
            throw new MailchimpAPIException($data);
        else
            return true;
    }
public function updateInterestGroup ( $ old_name , $ new_name , $ grouping_id = NULL ) { $ payload = array ( 'id' => $ this -> listId , 'old_name' => $ old_name , 'new_name' => $ new_name , 'grouping_id' => ( NULL === $ grouping_id ) ? $ this -> grouping_id : $ grouping_id ) ; $ apiCall = 'lists/interest-group-update' ; $ data = $ this -> requestMonkey ( $ apiCall , $ payload ) ; $ data = json_decode ( $ data , true ) ; if ( isset ( $ data [ 'error' ] ) ) throw new MailchimpAPIException ( $ data ) ; else return true ; }
Change the name of an Interest Group

@link http://apidocs.mailchimp.com/api/2.0/lists/interest-group-update.php
@param string $old_name the interest group name to be changed
@param string $new_name the new interest group name to be set
@param int $grouping_id optional  The grouping to delete the group from  If not supplied, the first grouping on the list is used.
@return boolean true on success
@throws MailchimpAPIException
Change the name of an Interest Group