public function update($id, array $params = [])
    {
        $defaults = [
            'role_ids' => null,
        ];
        $params = $this->sanitizeParams($defaults, $params);

        if (!isset($params['role_ids'])) {
            throw new \Exception('Missing mandatory parameters');
        }

        $xml = $this->buildXML($params);

        return $this->put('/memberships/'.$id.'.xml', $xml->asXML());
    }
public function update($id, array $params = [])
    {
        $defaults = [
            'role_ids' => null,
        ];
        $params = $this->sanitizeParams($defaults, $params);

        if (!isset($params['role_ids'])) {
            throw new \Exception('Missing mandatory parameters');
        }

        $xml = $this->buildXML($params);

        return $this->put('/memberships/'.$id.'.xml', $xml->asXML());
    }
public function update ( $ id , array $ params = [ ] ) { $ defaults = [ 'role_ids' => null , ] ; $ params = $ this -> sanitizeParams ( $ defaults , $ params ) ; if ( ! isset ( $ params [ 'role_ids' ] ) ) { throw new \ Exception ( 'Missing mandatory parameters' ) ; } $ xml = $ this -> buildXML ( $ params ) ; return $ this -> put ( '/memberships/' . $ id . '.xml' , $ xml -> asXML ( ) ) ; }
Update membership information's by id.

@see http://www.redmine.org/projects/redmine/wiki/Rest_Memberships#PUT

@param int   $id     id of the membership
@param array $params the new membership data

@throws \Exception Missing mandatory parameters

@return string|false
Update membership information s by id .