1 package FS::export_nas;
2 use base qw( FS::Record );
5 use vars qw($noexport_hack);
11 FS::export_nas - Object methods for export_nas records
17 $record = new FS::export_nas \%hash;
18 $record = new FS::export_nas { 'column' => 'value' };
20 $error = $record->insert;
22 $error = $new_record->replace($old_record);
24 $error = $record->delete;
26 $error = $record->check;
30 An FS::export_nas object links RADIUS exports (in the part_export table)
31 to RADIUS clients (in the nas table). FS::export_nas inherits from
32 FS::Record. The following fields are currently supported:
57 Creates a new record. To add the record to the database, see L<"insert">.
59 Note that this stores the hash reference, not a distinct copy of the hash it
60 points to. You can ask the object for a copy with the I<hash> method.
64 # the new method can be inherited from FS::Record, if a table method is defined
66 sub table { 'export_nas'; }
70 Adds this record to the database. If there is an error, returns the error,
71 otherwise returns false.
77 $self->SUPER::insert ||
78 ($noexport_hack ? '' : $self->part_export->export_nas_insert($self->nas));
83 Delete this record from the database.
89 ($noexport_hack ? '' : $self->part_export->export_nas_delete($self->nas))
90 || $self->SUPER::delete;
93 =item replace OLD_RECORD
95 Unavailable. Delete the record and create a new one.
100 die "replace not implemented for export_nas records";
105 Checks all fields to make sure this is a valid record. If there is
106 an error, returns the error, otherwise returns false. Called by the insert
111 # the check method should currently be supplied - FS::Record contains some
112 # data checking routines
118 $self->ut_numbern('exportnasnum')
119 || $self->ut_foreign_key('exportnum', 'part_export', 'exportnum' )
120 || $self->ut_foreign_key('nasnum', 'nas', 'nasnum')
122 return $error if $error;
133 L<FS::Record>, schema.html from the base documentation.