1 package FS::access_groupagent;
2 use base qw(FS::Record);
8 FS::access_groupagent - Object methods for access_groupagent records
12 use FS::access_groupagent;
14 $record = new FS::access_groupagent \%hash;
15 $record = new FS::access_groupagent { 'column' => 'value' };
17 $error = $record->insert;
19 $error = $new_record->replace($old_record);
21 $error = $record->delete;
23 $error = $record->check;
27 An FS::access_groupagent object represents an group reseller virtualization. FS::access_groupagent inherits from
28 FS::Record. The following fields are currently supported:
32 =item groupagentnum - primary key
47 Creates a new group reseller virtualization. To add the record to the database, see L<"insert">.
49 Note that this stores the hash reference, not a distinct copy of the hash it
50 points to. You can ask the object for a copy with the I<hash> method.
54 # the new method can be inherited from FS::Record, if a table method is defined
56 sub table { 'access_groupagent'; }
60 Adds this record to the database. If there is an error, returns the error,
61 otherwise returns false.
65 # the insert method can be inherited from FS::Record
69 Delete this record from the database.
73 # the delete method can be inherited from FS::Record
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 # the replace method can be inherited from FS::Record
86 Checks all fields to make sure this is a valid group reseller virtualization. If there is
87 an error, returns the error, otherwise returns false. Called by the insert
92 # the check method should currently be supplied - FS::Record contains some
93 # data checking routines
99 $self->ut_numbern('groupagentnum')
100 || $self->ut_foreign_key('groupnum', 'access_group', 'groupnum')
101 || $self->ut_foreign_key('agentnum', 'agent', 'agentnum')
103 return $error if $error;
110 Returns the associated FS::agent object.
114 Returns the associated FS::access_group object.
122 L<FS::Record>, schema.html from the base documentation.