1 package FS::radius_usergroup;
5 use FS::Record qw( qsearch qsearchs );
12 FS::radius_usergroup - Object methods for radius_usergroup records
16 use FS::radius_usergroup;
18 $record = new FS::radius_usergroup \%hash;
19 $record = new FS::radius_usergroup { 'column' => 'value' };
21 $error = $record->insert;
23 $error = $new_record->replace($old_record);
25 $error = $record->delete;
27 $error = $record->check;
31 An FS::radius_usergroup object links an account (see L<FS::svc_acct>) with a
32 RADIUS group. FS::radius_usergroup inherits from FS::Record. The following
33 fields are currently supported:
37 =item usergroupnum - primary key
39 =item svcnum - Account (see L<FS::svc_acct>).
41 =item groupname - group name
51 Creates a new record. To add the record to the database, see L<"insert">.
53 Note that this stores the hash reference, not a distinct copy of the hash it
54 points to. You can ask the object for a copy with the I<hash> method.
58 # the new method can be inherited from FS::Record, if a table method is defined
60 sub table { 'radius_usergroup'; }
64 Adds this record to the database. If there is an error, returns the error,
65 otherwise returns false.
69 #inherited from FS::Record
73 Delete this record from the database.
77 #inherited from FS::Record
79 =item replace OLD_RECORD
81 Replaces the OLD_RECORD with this one in the database. If there is an error,
82 returns the error, otherwise returns false.
86 #inherited from FS::Record
90 Checks all fields to make sure this is a valid record. If there is
91 an error, returns the error, otherwise returns false. Called by the insert
99 $self->ut_numbern('usergroupnum')
100 || $self->ut_number('svcnum')
101 || $self->ut_foreign_key('svcnum','svc_acct','svcnum')
102 || $self->ut_text('groupname')
108 Returns the account associated with this record (see L<FS::svc_acct>).
114 qsearchs('svc_acct', { svcnum => $self->svcnum } );
121 Don't let 'em get you down.
125 L<svc_acct>, L<FS::Record>, schema.html from the base documentation.