Initial revision
[freeside.git] / htdocs / docs / man / part_pkg.txt
1 NAME
2     FS::part_pkg - Object methods for part_pkg objects
3
4 SYNOPSIS
5       use FS::part_pkg;
6
7       $record = create FS::part_pkg \%hash
8       $record = create FS::part_pkg { 'column' => 'value' };
9
10       $error = $record->insert;
11
12       $error = $new_record->replace($old_record);
13
14       $error = $record->delete;
15
16       $error = $record->check;
17
18 DESCRIPTION
19     An FS::part_pkg represents a billing item definition.
20     FS::part_pkg inherits from FS::Record. The following fields are
21     currently supported:
22
23     pkgpart - primary key (assigned automatically for new billing item definitions)
24     pkg - Text name of this billing item definition (customer-viewable)
25     comment - Text name of this billing item definition (non-customer-viewable)
26     setup - Setup fee
27     freq - Frequency of recurring fee
28     recur - Recurring fee
29     setup and recur are evaluated as Safe perl expressions. You can
30     use numbers just as you would normally. More advanced semantics
31     are not yet defined.
32
33 METHODS
34     create HASHREF
35         Creates a new billing item definition. To add the billing
36         item definition to the database, see the section on
37         "insert".
38
39     insert
40         Adds this billing item definition to the database. If there
41         is an error, returns the error, otherwise returns false.
42
43     delete
44         Currently unimplemented.
45
46     replace OLD_RECORD
47         Replaces OLD_RECORD with this one in the database. If there
48         is an error, returns the error, otherwise returns false.
49
50     check
51         Checks all fields to make sure this is a valid billing item
52         definition. If there is an error, returns the error,
53         otherwise returns false. Called by the insert and replace
54         methods.
55
56 BUGS
57     It doesn't properly override FS::Record yet.
58
59     The delete method is unimplemented.
60
61     setup and recur semantics are not yet defined (and are
62     implemented in FS::cust_bill. hmm.).
63
64 SEE ALSO
65     the FS::Record manpage, the FS::cust_pkg manpage, the
66     FS::type_pkgs manpage, the FS::pkg_svc manpage, the Safe
67     manpage. schema.html from the base documentation.
68
69 HISTORY
70     ivan@sisd.com 97-dec-5
71
72     pod ivan@sisd.com 98-sep-21
73