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:
40 =item acnum - primary key
42 =item actypenum - AC type, see L<FS::ac_type>
44 =item acname - descriptive name for the AC
54 Create a new record. To add the record to the database, see L<"insert">.
62 Adds this record to the database. If there is an error, returns the error,
63 otherwise returns false.
67 Deletes this record from the database. If there is an error, returns the
68 error, otherwise returns false.
70 =item replace OLD_RECORD
72 Replaces OLD_RECORD with this one in the database. If there is an error,
73 returns the error, otherwise returns false.
77 Checks all fields to make sure this is a valid record. If there is an error,
78 returns the error, otherwise returns false. Called by the insert and replace
87 $self->ut_numbern('acnum')
88 || $self->ut_number('actypenum')
89 || $self->ut_text('acname');
90 return $error if $error;
92 return "Unknown actypenum"
93 unless $self->ac_type;
99 Returns the L<FS::ac_type> object corresponding to this object.
105 return qsearchs('ac_type', { actypenum => $self->actypenum });
110 Returns a list of L<FS::ac_block> objects (address blocks) associated
117 return qsearch('ac_block', { acnum => $self->acnum });
122 Returns a hash of L<FS::ac_field> objects assigned to this object.
129 return qsearch('ac_field', { acnum => $self->acnum });
142 L<FS::svc_broadband>, L<FS::ac>, L<FS::ac_block>, L<FS::ac_field>, schema.html
143 from the base documentation.