private function buildXML(array $params = [])
    {
        $xml = new \SimpleXMLElement('<?xml version="1.0"?><membership></membership>');

        foreach ($params as $k => $v) {
            if ('role_ids' === $k && is_array($v)) {
                $item = $xml->addChild($k);
                $item->addAttribute('type', 'array');
                foreach ($v as $role) {
                    $item->addChild('role_id', $role);
                }
            } else {
                $xml->addChild($k, $v);
            }
        }

        return $xml;
    }