2 FS::agent_type - Object methods for agent_type records
7 $record = create FS::agent_type \%hash;
8 $record = create FS::agent_type { 'column' => 'value' };
10 $error = $record->insert;
12 $error = $new_record->replace($old_record);
14 $error = $record->delete;
16 $error = $record->check;
19 An FS::agent_type object represents an agent type. Every agent
20 (see the FS::agent manpage) has an agent type. Agent types
21 define which packages (see the FS::part_pkg manpage) may be
22 purchased by customers (see the FS::cust_main manpage), via
23 FS::type_pkgs records (see the FS::type_pkgs manpage).
24 FS::agent_type inherits from FS::Record. The following fields
25 are currently supported:
27 typenum - primary key (assigned automatically for new agent types)
28 atype - Text name of this agent type
31 Creates a new agent type. To add the agent type to the
32 database, see the section on "insert".
35 Adds this agent type to the database. If there is an error,
36 returns the error, otherwise returns false.
39 Deletes this agent type from the database. Only agent types
40 with no agents can be deleted. If there is an error, returns
41 the error, otherwise returns false.
44 Replaces OLD_RECORD with this one in the database. If there
45 is an error, returns the error, otherwise returns false.
48 Checks all fields to make sure this is a valid agent type.
49 If there is an error, returns the error, otherwise returns
50 false. Called by the insert and replace methods.
53 It doesn't properly override FS::Record yet.
56 the FS::Record manpage, the FS::agent manpage, the FS::type_pkgs
57 manpage, the FS::cust_main manpage, the FS::part_pkg manpage,
58 schema.html from the base documentation.
61 Class for the different sets of allowable packages you can
64 ivan@sisd.com 97-nov-13
66 ut_ FS::Record methods ivan@sisd.com 97-dec-10
68 Changed 'type' to 'atype' because Pg6.3 reserves the type word
69 bmccane@maxbaud.net 98-apr-3
71 pod, added check in delete ivan@sisd.com 98-sep-21