2 use base qw(FS::Record);
8 FS::registrar - Object methods for registrar records
14 $record = new FS::registrar \%hash;
15 $record = new FS::registrar { 'column' => 'value' };
17 $error = $record->insert;
19 $error = $new_record->replace($old_record);
21 $error = $record->delete;
23 $error = $record->check;
27 An FS::registrar object represents a registrar. FS::registrar inherits from
28 FS::Record. The following fields are currently supported:
32 =item registrarnum - primary key
45 Creates a new registrar. To add the registrar to the database, see L<"insert">.
47 Note that this stores the hash reference, not a distinct copy of the hash it
48 points to. You can ask the object for a copy with the I<hash> method.
52 # the new method can be inherited from FS::Record, if a table method is defined
54 sub table { 'registrar'; }
58 Adds this record to the database. If there is an error, returns the error,
59 otherwise returns false.
63 # the insert method can be inherited from FS::Record
67 Delete this record from the database.
71 # the delete method can be inherited from FS::Record
73 =item replace OLD_RECORD
75 Replaces the OLD_RECORD with this one in the database. If there is an error,
76 returns the error, otherwise returns false.
80 # the replace method can be inherited from FS::Record
84 Checks all fields to make sure this is a valid registrar. If there is
85 an error, returns the error, otherwise returns false. Called by the insert
90 # the check method should currently be supplied - FS::Record contains some
91 # data checking routines
97 $self->ut_numbern('registrarnum')
98 || $self->ut_text('registrarname')
100 return $error if $error;
111 L<FS::Record>, schema.html from the base documentation.