function toString()
    {

        // Generate custom field string
        $customfields = "";
        if (isset($this->custom_fields)) {
            foreach ($this->custom_fields as $index => $type) {
                $customfields .= $index . "=" . $type . ", ";
            }
            $customfields = rtrim($customfields, ', ');
        }

        return "CustomFields = {" . $customfields . "}";
    }