1 package FS::circuit_provider;
4 use base qw( FS::Record );
5 use FS::Record qw( qsearch qsearchs );
9 FS::circuit_provider - Object methods for circuit_provider records
13 use FS::circuit_provider;
15 $record = new FS::circuit_provider \%hash;
16 $record = new FS::circuit_provider { 'column' => 'value' };
18 $error = $record->insert;
20 $error = $new_record->replace($old_record);
22 $error = $record->delete;
24 $error = $record->check;
28 An FS::circuit_provider object represents a telecom carrier that provides
29 physical circuits (L<FS::svc_circuit>). FS::circuit_provider inherits from
30 FS::Record. The following fields are currently supported:
34 =item providernum - primary key
36 =item provider - provider name
38 =item disabled - disabled
48 Creates a new record. To add the record to the database, see L<"insert">.
52 sub table { 'circuit_provider'; }
56 Adds this record to the database. If there is an error, returns the error,
57 otherwise returns false.
61 Delete this record from the database.
63 =item replace OLD_RECORD
65 Replaces the OLD_RECORD with this one in the database. If there is an error,
66 returns the error, otherwise returns false.
70 Checks all fields to make sure this is a valid example. If there is
71 an error, returns the error, otherwise returns false. Called by the insert
76 # the check method should currently be supplied - FS::Record contains some
77 # data checking routines
83 $self->ut_numbern('providernum')
84 || $self->ut_text('provider')
85 || $self->ut_flag('disabled')
87 return $error if $error;