*/ class Mage_Customer_Model_Group_Api extends Mage_Api_Model_Resource_Abstract { /** * Retrieve groups * * @return array */ public function items() { $collection = Mage::getModel('customer/group')->getCollection(); $result = array(); foreach ($collection as $group) { /* @var $group Mage_Customer_Model_Group */ $result[] = $group->toArray(array('customer_group_id', 'customer_group_code')); } return $result; } }