public function getAttributes(Organization $organization, $attributeNames = null)
    {
        $result = array();
        $url = self::makeAttributeUrl($organization->id, $attributeNames);
        $data = $this->service->prepAndSend($url, array(200, 204), 'GET', null, true);
        $jsonObj = json_decode($data);
        if (!empty($jsonObj)) {
            $result = array();
            foreach ($jsonObj->attribute as $attr) {
                $result[] = Attribute::createFromJSON($attr);
            }
            return $result;
        } else {
            return array();
        }
    }