5 #use FS::Record qw( qsearch qsearchs );
8 #@ISA = qw(FS::Record);
9 @ISA = qw( FS::svc_Common );
13 FS::svc_elec - Object methods for svc_elec records
19 $record = new FS::svc_elec \%hash;
20 $record = new FS::svc_elec { 'column' => 'value' };
22 $error = $record->insert;
24 $error = $new_record->replace($old_record);
26 $error = $record->delete;
28 $error = $record->check;
30 $error = $record->suspend;
31 $error = $record->unsuspend;
32 $error = $record->cancel;
36 An FS::svc_elec object represents an example. FS::svc_elec inherits from
37 FS::Record. The following fields are currently supported:
45 =item svcnum - primary key
62 Creates a new example. To add the example to the database, see L<"insert">.
64 Note that this stores the hash reference, not a distinct copy of the hash it
65 points to. You can ask the object for a copy with the I<hash> method.
69 # the new method can be inherited from FS::Record, if a table method is defined
71 sub table { 'svc_elec'; }
75 Adds this record to the database. If there is an error, returns the error,
76 otherwise returns false.
80 # the insert method can be inherited from FS::Record
84 Delete this record from the database.
88 # the delete method can be inherited from FS::Record
90 =item replace OLD_RECORD
92 Replaces the OLD_RECORD with this one in the database. If there is an error,
93 returns the error, otherwise returns false.
97 # the replace method can be inherited from FS::Record
101 Checks all fields to make sure this is a valid example. If there is
102 an error, returns the error, otherwise returns false. Called by the insert
107 # the check method should currently be supplied - FS::Record contains some
108 # data checking routines
114 $self->ut_numbern('svcnum')
115 || $self->ut_number('id')
116 || $self->ut_number('esiid')
117 || $self->ut_text('countrycode')
118 || $self->ut_text('phonenum')
119 || $self->ut_textn('pin')
121 return $error if $error;
130 The author forgot to customize this manpage.
134 L<FS::Record>, schema.html from the base documentation.