Initial revision
[freeside.git] / htdocs / docs / man / type_pkgs.txt
1 NAME
2     FS::type_pkgs - Object methods for type_pkgs records
3
4 SYNOPSIS
5       use FS::type_pkgs;
6
7       $record = create FS::type_pkgs \%hash;
8       $record = create FS::type_pkgs { '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::type_pkgs record links an agent type (see the
20     FS::agent_type manpage) to a billing item definition (see the
21     FS::part_pkg manpage). FS::type_pkgs inherits from FS::Record.
22     The following fields are currently supported:
23
24     typenum - Agent type, see the FS::agent_type manpage
25     pkgpart - Billing item definition, see the FS::part_pkg manpage
26 METHODS
27     create HASHREF
28         Create a new record. To add the record to the database, see
29         the section on "insert".
30
31     insert
32         Adds this record to the database. If there is an error,
33         returns the error, otherwise returns false.
34
35     delete
36         Deletes this record from the database. If there is an error,
37         returns the error, otherwise returns false.
38
39     replace OLD_RECORD
40         Replaces OLD_RECORD with this one in the database. If there
41         is an error, returns the error, otherwise returns false.
42
43     check
44         Checks all fields to make sure this is a valid record. If
45         there is an error, returns the error, otherwise returns
46         false. Called by the insert and replace methods.
47
48 HISTORY
49     Defines the relation between agent types and pkgparts (Which
50     pkgparts can the different [types of] agents sell?)
51
52     ivan@sisd.com 97-nov-13
53
54     change to ut_ FS::Record, fixed bugs ivan@sisd.com 97-dec-10
55