ACL for hardware class config, RT#85057
[freeside.git] / FS / FS / contact_class.pm
1 package FS::contact_class;
2 use base qw( FS::class_Common );
3
4 use strict;
5 use FS::Record qw( qsearch qsearchs );
6
7 =head1 NAME
8
9 FS::contact_class - Object methods for contact_class records
10
11 =head1 SYNOPSIS
12
13   use FS::contact_class;
14
15   $record = new FS::contact_class \%hash;
16   $record = new FS::contact_class { 'column' => 'value' };
17
18   $error = $record->insert;
19
20   $error = $new_record->replace($old_record);
21
22   $error = $record->delete;
23
24   $error = $record->check;
25
26 =head1 DESCRIPTION
27
28 An FS::contact_class object represents a contact class.  FS::contact_class
29 inherits from FS::class_Common.  The following fields are currently supported:
30
31 =over 4
32
33 =item classnum
34
35 primary key
36
37 =item classname
38
39 Class name
40
41 =item disabled
42
43 Disabled flag
44
45 =back
46
47 =head1 METHODS
48
49 =over 4
50
51 =item new HASHREF
52
53 Creates a new example.  To add the example to the database, see L<"insert">.
54
55 Note that this stores the hash reference, not a distinct copy of the hash it
56 points to.  You can ask the object for a copy with the I<hash> method.
57
58 =cut
59
60 sub table { 'contact_class'; }
61
62 =item insert
63
64 Adds this record to the database.  If there is an error, returns the error,
65 otherwise returns false.
66
67 =item delete
68
69 Delete this record from the database.
70
71 =item replace OLD_RECORD
72
73 Replaces the OLD_RECORD with this one in the database.  If there is an error,
74 returns the error, otherwise returns false.
75 =item check
76
77 Checks all fields to make sure this is a valid class.  If there is
78 an error, returns the error, otherwise returns false.  Called by the insert
79 and replace methods.
80
81 =back
82
83 =head1 BUGS
84
85 The author forgot to customize this manpage.
86
87 =head1 SEE ALSO
88
89 L<FS::Record>, schema.html from the base documentation.
90
91 =cut
92
93 1;
94