This commit was generated by cvs2svn to compensate for changes in r11022,
[freeside.git] / FS / FS / cust_category.pm
1 package FS::cust_category;
2
3 use strict;
4 use base qw( FS::category_Common );
5 use FS::cust_class;
6
7 =head1 NAME
8
9 FS::cust_category - Object methods for cust_category records
10
11 =head1 SYNOPSIS
12
13   use FS::cust_category;
14
15   $record = new FS::cust_category \%hash;
16   $record = new FS::cust_category { '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::cust_category object represents a customer category.  Every customer
29 class (see L<FS::cust_class>) has, optionally, a customer category.
30 FS::cust_category inherits from FS::Record.  The following fields are currently
31 supported:
32
33 =over 4
34
35 =item categorynum
36
37 primary key
38
39 =item categoryname
40
41 Text name of this package category
42
43 =item weight
44
45 Weight
46
47 =item disabled
48
49 Disabled flag, empty or 'Y'
50
51 =back
52
53 =head1 METHODS
54
55 =over 4
56
57 =item new HASHREF
58
59 Creates a new customer category.  To add the customer category to the database,
60 see L<"insert">.
61
62 =cut
63
64 sub table { 'cust_category'; }
65
66 =item insert
67
68 Adds this record to the database.  If there is an error, returns the error,
69 otherwise returns false.
70
71 =item delete
72
73 Delete this record from the database.
74
75 =item replace OLD_RECORD
76
77 Replaces the OLD_RECORD with this one in the database.  If there is an error,
78 returns the error, otherwise returns false.
79
80 =item check
81
82 Checks all fields to make sure this is a valid example.  If there is
83 an error, returns the error, otherwise returns false.  Called by the insert
84 and replace methods.
85
86 =back
87
88 =head1 BUGS
89
90 =head1 SEE ALSO
91
92 L<FS::cust_class>, L<FS::Record>
93
94 =cut
95
96 1;
97