5 use FS::Record qw( qsearchs qsearch );
9 @ISA = qw( FS::Record );
13 FS::ac - Object methods for ac records
19 $record = new FS::ac \%hash;
20 $record = new FS::ac { 'column' => 'value' };
22 $error = $record->insert;
24 $error = $new_record->replace($old_record);
26 $error = $record->delete;
28 $error = $record->check;
32 An FS::ac record describes a broadband Access Concentrator, such as a DSLAM
33 or a wireless access point. FS::ac inherits from FS::Record. The following
34 fields are currently supported:
38 =item acnum - primary key
40 =item actypenum - AC type, see L<FS::ac_type>
42 =item acname - descriptive name for the AC
52 Create a new record. To add the record to the database, see L<"insert">.
60 Adds this record to the database. If there is an error, returns the error,
61 otherwise returns false.
65 Deletes this record from the database. If there is an error, returns the
66 error, otherwise returns false.
68 =item replace OLD_RECORD
70 Replaces OLD_RECORD with this one in the database. If there is an error,
71 returns the error, otherwise returns false.
75 Checks all fields to make sure this is a valid record. If there is an error,
76 returns the error, otherwise returns false. Called by the insert and replace
85 $self->ut_numbern('acnum')
86 || $self->ut_number('actypenum')
87 || $self->ut_text('acname');
88 return $error if $error;
90 return "Unknown actypenum"
91 unless $self->ac_type;
97 Returns the L<FS::ac_type> object corresponding to this object.
103 return qsearchs('ac_type', { actypenum => $self->actypenum });
108 Returns a list of L<FS::ac_block> objects (address blocks) associated
115 return qsearch('ac_block', { acnum => $self->acnum });
120 Returns a hash of L<FS::ac_field> objects assigned to this object.
127 return qsearch('ac_field', { acnum => $self->acnum });
140 L<FS::svc_broadband>, L<FS::ac>, L<FS::ac_block>, L<FS::ac_field>, schema.html
141 from the base documentation.