Initial revision
[freeside.git] / htdocs / docs / man / pkg_svc.txt
1 NAME
2     FS::pkg_svc - Object methods for pkg_svc records
3
4 SYNOPSIS
5       use FS::pkg_svc;
6
7       $record = create FS::pkg_svc \%hash;
8       $record = create FS::pkg_svc { '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::pkg_svc record links a billing item definition (see the
20     FS::part_pkg manpage) to a service definition (see the
21     FS::part_svc manpage). FS::pkg_svc inherits from FS::Record. The
22     following fields are currently supported:
23
24     pkgpart - Billing item definition (see the FS::part_pkg manpage)
25     svcpart - Service definition (see the FS::part_svc manpage)
26     quantity - Quantity of this service definition that this billing item
27     definition includes
28 METHODS
29     create HASHREF
30         Create a new record. To add the record to the database, see
31         the section on "insert".
32
33     insert
34         Adds this record to the database. If there is an error,
35         returns the error, otherwise returns false.
36
37     delete
38         Deletes this record from the database. If there is an error,
39         returns the error, otherwise returns false.
40
41     replace OLD_RECORD
42         Replaces OLD_RECORD with this one in the database. If there
43         is an error, returns the error, otherwise returns false.
44
45     check
46         Checks all fields to make sure this is a valid record. If
47         there is an error, returns the error, otherwise returns
48         false. Called by the insert and replace methods.
49
50 BUGS
51     It doesn't properly override FS::Record yet.
52
53 SEE ALSO
54     the FS::Record manpage, the FS::part_pkg manpage, the
55     FS::part_svc manpage, schema.html from the base documentation.
56
57 HISTORY
58     ivan@voicenet.com 97-jul-1 added hfields ivan@sisd.com 97-nov-13
59
60     pod ivan@sisd.com 98-sep-22
61