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());
    }