5 use FS::Record qw( qsearch qsearchs );
11 FS::registrar - Object methods for registrar records
17 $record = new FS::registrar \%hash;
18 $record = new FS::registrar { 'column' => 'value' };
20 $error = $record->insert;
22 $error = $new_record->replace($old_record);
24 $error = $record->delete;
26 $error = $record->check;
30 An FS::registrar object represents a registrar. FS::registrar inherits from
31 FS::Record. The following fields are currently supported:
35 =item registrarnum - primary key
48 Creates a new registrar. To add the registrar to the database, see L<"insert">.
50 Note that this stores the hash reference, not a distinct copy of the hash it
51 points to. You can ask the object for a copy with the I<hash> method.
55 # the new method can be inherited from FS::Record, if a table method is defined
57 sub table { 'registrar'; }
61 Adds this record to the database. If there is an error, returns the error,
62 otherwise returns false.
66 # the insert method can be inherited from FS::Record
70 Delete this record from the database.
74 # the delete method can be inherited from FS::Record
76 =item replace OLD_RECORD
78 Replaces the OLD_RECORD with this one in the database. If there is an error,
79 returns the error, otherwise returns false.
83 # the replace method can be inherited from FS::Record
87 Checks all fields to make sure this is a valid registrar. If there is
88 an error, returns the error, otherwise returns false. Called by the insert
93 # the check method should currently be supplied - FS::Record contains some
94 # data checking routines
100 $self->ut_numbern('registrarnum')
101 || $self->ut_text('registrarname')
103 return $error if $error;
114 L<FS::Record>, schema.html from the base documentation.