regenerated perl api docs from embedded pod
[freeside.git] / htdocs / docs / man / cust_svc.txt
1 NAME
2     FS::cust_svc - Object method for cust_svc objects
3
4 SYNOPSIS
5       use FS::cust_svc;
6
7       $record = new FS::cust_svc \%hash
8       $record = new FS::cust_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       ($label, $value) = $record->label;
19
20 DESCRIPTION
21     An FS::cust_svc represents a service. FS::cust_svc inherits from
22     FS::Record. The following fields are currently supported:
23
24     svcnum - primary key (assigned automatically for new services)
25     pkgnum - Package (see the FS::cust_pkg manpage)
26     svcpart - Service definition (see the FS::part_svc manpage)
27 METHODS
28     new HASHREF
29         Creates a new service. To add the refund to the database,
30         see the section on "insert". Services are normally created
31         by creating FS::svc_ objects (see the FS::svc_acct manpage,
32         the FS::svc_domain manpage, and the FS::svc_acct_sm manpage,
33         among others).
34
35     insert
36         Adds this service to the database. If there is an error,
37         returns the error, otherwise returns false.
38
39     delete
40         Deletes this service from the database. If there is an
41         error, returns the error, otherwise returns false.
42
43         Called by the cancel method of the package (see the
44         FS::cust_pkg manpage).
45
46     replace OLD_RECORD
47         Replaces the OLD_RECORD with this one in the database. If
48         there is an error, returns the error, otherwise returns
49         false.
50
51     check
52         Checks all fields to make sure this is a valid service. If
53         there is an error, returns the error, otehrwise returns
54         false. Called by the insert and replace methods.
55
56     label
57         Returns a list consisting of: - The name of this service
58         (from part_svc) - A meaningful identifier (username, domain,
59         or mail alias) - The table name (i.e. svc_domain) for this
60         service
61
62 VERSION
63     $Id: cust_svc.txt,v 1.4 1999-04-08 13:39:32 ivan Exp $
64
65 BUGS
66     Behaviour of changing the svcpart of cust_svc records is
67     undefined and should possibly be prohibited, and pkg_svc records
68     are not checked.
69
70     pkg_svc records are not checked in general (here).
71
72     Deleting this record doesn't check or delete the svc_* record
73     associated with this record.
74
75 SEE ALSO
76     the FS::Record manpage, the FS::cust_pkg manpage, the
77     FS::part_svc manpage, the FS::pkg_svc manpage, schema.html from
78     the base documentation
79
80 HISTORY
81     ivan@voicenet.com 97-jul-10,14
82
83     no TableUtil, no FS::Lock ivan@sisd.com 98-mar-7
84
85     pod ivan@sisd.com 98-sep-21
86
87     $Log: cust_svc.txt,v $
88     Revision 1.4  1999-04-08 13:39:32  ivan
89     convert from pod for 1.2.0 release
90  Revision 1.5 1998/12/29 11:59:47 ivan
91     mostly properly OO, some work still to be done with svc_ stuff
92
93     Revision 1.4 1998/11/12 07:58:15 ivan added svcdb to label
94
95     Revision 1.3 1998/11/12 03:45:38 ivan use FS::table_name for all
96     tables qsearch()'ed
97
98     Revision 1.2 1998/11/12 03:32:46 ivan added label method
99