1 package FS::cdr_carrier;
5 use FS::Record qw( qsearch qsearchs );
11 FS::cdr_carrier - Object methods for cdr_carrier records
17 $record = new FS::cdr_carrier \%hash;
18 $record = new FS::cdr_carrier { 'column' => 'value' };
20 $error = $record->insert;
22 $error = $new_record->replace($old_record);
24 $error = $record->delete;
26 $error = $record->check;
30 An FS::cdr_carrier object represents an CDR carrier or upstream.
31 FS::cdr_carrier inherits from FS::Record. The following fields are currently
36 =item carrierid - primary key
38 =item carriername - Carrier name
48 Creates a new carrier. To add the carrier 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 { 'cdr_carrier'; }
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 carrier. If there is
88 an error, returns the error, otherwise returns false. Called by the insert
97 $self->ut_numbern('carrierid')
98 || $self->ut_text('carriername')
100 return $error if $error;
111 L<FS::Record>, schema.html from the base documentation.