regenerated perl api docs from embedded pod
[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 = new FS::part_pkg \%hash
8       $record = new FS::part_pkg { 'column' => 'value' };
9
10       $custom_record = $template_record->clone;
11
12       $error = $record->insert;
13
14       $error = $new_record->replace($old_record);
15
16       $error = $record->delete;
17
18       $error = $record->check;
19
20 DESCRIPTION
21     An FS::part_pkg object represents a billing item definition.
22     FS::part_pkg inherits from FS::Record. The following fields are
23     currently supported:
24
25     pkgpart - primary key (assigned automatically for new billing item definitions)
26     pkg - Text name of this billing item definition (customer-viewable)
27     comment - Text name of this billing item definition (non-customer-viewable)
28     setup - Setup fee
29     freq - Frequency of recurring fee
30     recur - Recurring fee
31     setup and recur are evaluated as Safe perl expressions. You can
32     use numbers just as you would normally. More advanced semantics
33     are not yet defined.
34
35 METHODS
36     new HASHREF
37         Creates a new billing item definition. To add the billing
38         item definition to the database, see the section on
39         "insert".
40
41     clone
42         An alternate constructor. Creates a new billing item
43         definition by duplicating an existing definition. A new
44         pkgpart is assigned and `(CUSTOM) ' is prepended to the
45         comment field. To add the billing item definition to the
46         database, see the section on "insert".
47
48     insert
49         Adds this billing item definition to the database. If there
50         is an error, returns the error, otherwise returns false.
51
52     delete
53         Currently unimplemented.
54
55     replace OLD_RECORD
56         Replaces OLD_RECORD with this one in the database. If there
57         is an error, returns the error, otherwise returns false.
58
59     check
60         Checks all fields to make sure this is a valid billing item
61         definition. If there is an error, returns the error,
62         otherwise returns false. Called by the insert and replace
63         methods.
64
65 VERSION
66     $Id: part_pkg.txt,v 1.3 1999-04-08 13:39:32 ivan Exp $
67
68 BUGS
69     It doesn't properly override FS::Record yet.
70
71     The delete method is unimplemented.
72
73     setup and recur semantics are not yet defined (and are
74     implemented in FS::cust_bill. hmm.).
75
76 SEE ALSO
77     the FS::Record manpage, the FS::cust_pkg manpage, the
78     FS::type_pkgs manpage, the FS::pkg_svc manpage, the Safe
79     manpage. schema.html from the base documentation.
80
81 HISTORY
82     ivan@sisd.com 97-dec-5
83
84     pod ivan@sisd.com 98-sep-21
85
86     $Log: part_pkg.txt,v $
87     Revision 1.3  1999-04-08 13:39:32  ivan
88     convert from pod for 1.2.0 release
89  Revision 1.5 1998/12/31 01:04:16 ivan doc
90
91     Revision 1.3 1998/11/15 13:00:15 ivan bugfix in clone method,
92     clone method doc clarification
93