1 package FS::alarm_system;
4 use base qw( FS::Record );
5 use FS::Record; # qw( qsearch qsearchs );
10 FS::alarm_system - Object methods for alarm_system records
16 $record = new FS::alarm_system \%hash;
17 $record = new FS::alarm_system { 'column' => 'value' };
19 $error = $record->insert;
21 $error = $new_record->replace($old_record);
23 $error = $record->delete;
25 $error = $record->check;
29 An FS::alarm_system object represents an alarm system vendor. FS::alarm_system
30 inherits from FS::Record. The following fields are currently supported:
59 Creates a new vendor. To add the vendor to the database, see L<"insert">.
61 Note that this stores the hash reference, not a distinct copy of the hash it
62 points to. You can ask the object for a copy with the I<hash> method.
66 # the new method can be inherited from FS::Record, if a table method is defined
68 sub table { 'alarm_system'; }
72 Adds this record to the database. If there is an error, returns the error,
73 otherwise returns false.
77 Delete this record from the database.
79 =item replace OLD_RECORD
81 Replaces the OLD_RECORD with this one in the database. If there is an error,
82 returns the error, otherwise returns false.
86 Checks all fields to make sure this is a valid vendor. If there is
87 an error, returns the error, otherwise returns false. Called by the insert
96 $self->ut_numbern('alarmsystemnum')
97 || $self->ut_foreign_keyn('agentnum', 'agent', 'agentnum')
98 || $self->ut_text('systemname')
99 || $self->ut_enum('disabled', ['', 'Y'])
101 return $error if $error;
112 L<FS::svc_alarm>, L<FS::Record>