regenerated perl api docs from embedded pod
[freeside.git] / htdocs / docs / man / agent_type.txt
1 NAME
2     FS::agent_type - Object methods for agent_type records
3
4 SYNOPSIS
5       use FS::agent_type;
6
7       $record = new FS::agent_type \%hash;
8       $record = new FS::agent_type { '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::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:
26
27     typenum - primary key (assigned automatically for new agent types)
28     atype - Text name of this agent type
29 METHODS
30     new HASHREF
31         Creates a new agent type. To add the agent type to the
32         database, see the section on "insert".
33
34     insert
35         Adds this agent type to the database. If there is an error,
36         returns the error, otherwise returns false.
37
38     delete
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.
42
43     replace OLD_RECORD
44         Replaces OLD_RECORD with this one in the database. If there
45         is an error, returns the error, otherwise returns false.
46
47     check
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.
51
52 VERSION
53     $Id: agent_type.txt,v 1.3 1999-04-08 13:39:31 ivan Exp $
54
55 BUGS
56 SEE ALSO
57     the FS::Record manpage, the FS::agent manpage, the FS::type_pkgs
58     manpage, the FS::cust_main manpage, the FS::part_pkg manpage,
59     schema.html from the base documentation.
60
61 HISTORY
62     Class for the different sets of allowable packages you can
63     assign to an agent.
64
65     ivan@sisd.com 97-nov-13
66
67     ut_ FS::Record methods ivan@sisd.com 97-dec-10
68
69     Changed 'type' to 'atype' because Pg6.3 reserves the type word
70     bmccane@maxbaud.net 98-apr-3
71
72     pod, added check in delete ivan@sisd.com 98-sep-21
73
74     $Log: agent_type.txt,v $
75     Revision 1.3  1999-04-08 13:39:31  ivan
76     convert from pod for 1.2.0 release
77  Revision 1.2 1998/12/29 11:59:35 ivan
78     mostly properly OO, some work still to be done with svc_ stuff
79