RT# 81961 Repair broken links in POD documentation
[freeside.git] / FS / FS / hardware_type.pm
index ba19fcb..a84470b 100644 (file)
@@ -26,7 +26,7 @@ FS::hardware_type - Object methods for hardware_type records
 =head1 DESCRIPTION
 
 An FS::hardware_type object represents a device type (a model name or 
-number) assignable as a hardware service (L<FS::svc_hardware)>).
+number) assignable as a hardware service (L<FS::svc_hardware>).
 FS::hardware_type inherits from FS::Record.  The following fields are 
 currently supported:
 
@@ -39,6 +39,8 @@ to which this device type belongs.
 
 =item model - descriptive model name or number
 
+=item revision - revision name/number, subordinate to model
+
 =back
 
 =head1 METHODS
@@ -102,6 +104,7 @@ sub check {
     $self->ut_numbern('typenum')
     || $self->ut_foreign_key('classnum', 'hardware_class', 'classnum')
     || $self->ut_text('model')
+    || $self->ut_textn('revision')
   ;
   return $error if $error;
 
@@ -119,6 +122,17 @@ sub hardware_class {
   return qsearchs('hardware_class', { 'classnum' => $self->classnum });
 }
 
+=item description
+
+Returns the model and revision number.
+
+=cut
+
+sub description {
+  my $self = shift;
+  $self->model . ($self->revision ? ' '.$self->revision : '');
+}
+
 =back
 
 =head1 SEE ALSO