2 FS::cust_svc - Object method for cust_svc objects
7 $record = new FS::cust_svc \%hash
8 $record = new FS::cust_svc { 'column' => 'value' };
10 $error = $record->insert;
12 $error = $new_record->replace($old_record);
14 $error = $record->delete;
16 $error = $record->check;
18 ($label, $value) = $record->label;
21 An FS::cust_svc represents a service. FS::cust_svc inherits from
22 FS::Record. The following fields are currently supported:
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)
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,
36 Adds this service to the database. If there is an error,
37 returns the error, otherwise returns false.
40 Deletes this service from the database. If there is an
41 error, returns the error, otherwise returns false.
43 Called by the cancel method of the package (see the
44 FS::cust_pkg manpage).
47 Replaces the OLD_RECORD with this one in the database. If
48 there is an error, returns the error, otherwise returns
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.
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
63 $Id: cust_svc.txt,v 1.4 1999-04-08 13:39:32 ivan Exp $
66 Behaviour of changing the svcpart of cust_svc records is
67 undefined and should possibly be prohibited, and pkg_svc records
70 pkg_svc records are not checked in general (here).
72 Deleting this record doesn't check or delete the svc_* record
73 associated with this record.
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
81 ivan@voicenet.com 97-jul-10,14
83 no TableUtil, no FS::Lock ivan@sisd.com 98-mar-7
85 pod ivan@sisd.com 98-sep-21
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
93 Revision 1.4 1998/11/12 07:58:15 ivan added svcdb to label
95 Revision 1.3 1998/11/12 03:45:38 ivan use FS::table_name for all
98 Revision 1.2 1998/11/12 03:32:46 ivan added label method