3 <TITLE>FS::cust_svc - Object method for cust_svc objects</TITLE>
4 <LINK REV="made" HREF="mailto:none">
13 <LI><A HREF="#NAME">NAME</A>
14 <LI><A HREF="#SYNOPSIS">SYNOPSIS</A>
15 <LI><A HREF="#DESCRIPTION">DESCRIPTION</A>
16 <LI><A HREF="#METHODS">METHODS</A>
17 <LI><A HREF="#VERSION">VERSION</A>
18 <LI><A HREF="#BUGS">BUGS</A>
19 <LI><A HREF="#SEE_ALSO">SEE ALSO</A>
25 <H1><A NAME="NAME">NAME</A></H1>
27 FS::cust_svc - Object method for cust_svc objects
31 <H1><A NAME="SYNOPSIS">SYNOPSIS</A></H1>
33 <PRE> use FS::cust_svc;
36 <PRE> $record = new FS::cust_svc \%hash
37 $record = new FS::cust_svc { 'column' => 'value' };
40 <PRE> $error = $record->insert;
43 <PRE> $error = $new_record->replace($old_record);
46 <PRE> $error = $record->delete;
49 <PRE> $error = $record->check;
52 <PRE> ($label, $value) = $record->label;
56 <H1><A NAME="DESCRIPTION">DESCRIPTION</A></H1>
58 An FS::cust_svc represents a service. FS::cust_svc inherits from
59 FS::Record. The following fields are currently supported:
62 <DT><STRONG><A NAME="item_svcnum">svcnum - primary key (assigned automatically for new services)</A></STRONG><DD>
63 <DT><STRONG><A NAME="item_pkgnum">pkgnum - Package (see FS::cust_pkg)</A></STRONG><DD>
64 <DT><STRONG><A NAME="item_svcpart">svcpart - Service definition (see FS::part_svc)</A></STRONG><DD>
68 <H1><A NAME="METHODS">METHODS</A></H1>
70 <DT><STRONG><A NAME="item_new">new HASHREF</A></STRONG><DD>
72 Creates a new service. To add the refund to the database, see <A HREF="#insert">insert</A>. Services are normally created by creating FS::svc_ objects (see
73 <A HREF="../FS/svc_acct.html">FS::svc_acct</A>, <A HREF="../FS/svc_domain.html">FS::svc_domain</A>, and <A HREF="../FS/svc_acct_sm.html">FS::svc_acct_sm</A>, among others).
75 <DT><STRONG><A NAME="item_insert">insert</A></STRONG><DD>
77 Adds this service to the database. If there is an error, returns the error,
78 otherwise returns false.
80 <DT><STRONG><A NAME="item_delete">delete</A></STRONG><DD>
82 Deletes this service from the database. If there is an error, returns the
83 error, otherwise returns false.
86 Called by the cancel method of the package (see <A HREF="../FS/cust_pkg.html">FS::cust_pkg</A>).
88 <DT><STRONG><A NAME="item_replace">replace OLD_RECORD</A></STRONG><DD>
90 Replaces the OLD_RECORD with this one in the database. If there is an
91 error, returns the error, otherwise returns false.
93 <DT><STRONG><A NAME="item_check">check</A></STRONG><DD>
95 Checks all fields to make sure this is a valid service. If there is an
96 error, returns the error, otehrwise returns false. Called by the insert and
99 <DT><STRONG><A NAME="item_label">label</A></STRONG><DD>
101 Returns a list consisting of: - The name of this service (from part_svc) -
102 A meaningful identifier (username, domain, or mail alias) - The table name
103 (i.e. svc_domain) for this service
108 <H1><A NAME="VERSION">VERSION</A></H1>
110 $Id: cust_svc.html,v 1.2 2000-03-03 18:22:43 ivan Exp $
114 <H1><A NAME="BUGS">BUGS</A></H1>
116 Behaviour of changing the svcpart of cust_svc records is undefined and
117 should possibly be prohibited, and pkg_svc records are not checked.
120 pkg_svc records are not checked in general (here).
123 Deleting this record doesn't check or delete the svc_* record associated
128 <H1><A NAME="SEE_ALSO">SEE ALSO</A></H1>
130 <A HREF="../FS/Record.html">FS::Record</A>, <A HREF="../FS/cust_pkg.html">FS::cust_pkg</A>, <A HREF="../FS/part_svc.html">FS::part_svc</A>, <A HREF="../FS/pkg_svc.html">FS::pkg_svc</A>, schema.html from the base documentation