1 package FS::cable_provider;
4 use base qw( FS::Record );
5 use FS::Record qw( qsearch qsearchs );
9 FS::cable_provider - Object methods for cable_provider records
13 use FS::cable_provider;
15 $record = new FS::cable_provider \%hash;
16 $record = new FS::cable_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::cable_provider object represents a cable service provider.
29 FS::cable_provider inherits from FS::Record. The following fields are
55 Creates a new provider. To add the provider to the database, see L<"insert">.
57 Note that this stores the hash reference, not a distinct copy of the hash it
58 points to. You can ask the object for a copy with the I<hash> method.
62 # the new method can be inherited from FS::Record, if a table method is defined
64 sub table { 'cable_provider'; }
68 Adds this record to the database. If there is an error, returns the error,
69 otherwise returns false.
73 Delete this record from the database.
75 =item replace OLD_RECORD
77 Replaces the OLD_RECORD with this one in the database. If there is an error,
78 returns the error, otherwise returns false.
82 Checks all fields to make sure this is a valid provider. If there is
83 an error, returns the error, otherwise returns false. Called by the insert
92 $self->ut_numbern('providernum')
93 || $self->ut_text('provider')
94 || $self->ut_enum('disabled', [ '', 'Y' ] )
96 return $error if $error;
107 L<FS::Record>, schema.html from the base documentation.