3 <TITLE>FS::cust_svc - Object method for cust_svc objects</TITLE>
4 <LINK REV="made" HREF="mailto:perl@packages.debian.org">
9 <A NAME="__index__"></A>
14 <LI><A HREF="#name">NAME</A></LI>
15 <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
16 <LI><A HREF="#description">DESCRIPTION</A></LI>
17 <LI><A HREF="#methods">METHODS</A></LI>
18 <LI><A HREF="#version">VERSION</A></LI>
19 <LI><A HREF="#bugs">BUGS</A></LI>
20 <LI><A HREF="#see also">SEE ALSO</A></LI>
26 <H1><A NAME="name">NAME</A></H1>
27 <P>FS::cust_svc - Object method for cust_svc objects</P>
30 <H1><A NAME="synopsis">SYNOPSIS</A></H1>
32 use FS::cust_svc;</PRE>
34 $record = new FS::cust_svc \%hash
35 $record = new FS::cust_svc { 'column' => 'value' };</PRE>
37 $error = $record->insert;</PRE>
39 $error = $new_record->replace($old_record);</PRE>
41 $error = $record->delete;</PRE>
43 $error = $record->check;</PRE>
45 ($label, $value) = $record->label;</PRE>
48 <H1><A NAME="description">DESCRIPTION</A></H1>
49 <P>An FS::cust_svc represents a service. FS::cust_svc inherits from FS::Record.
50 The following fields are currently supported:</P>
52 <DT><STRONG><A NAME="item_key">svcnum - primary key (assigned automatically for new services)</A></STRONG><BR>
54 <DT><STRONG><A NAME="item_Package">pkgnum - Package (see <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>)</A></STRONG><BR>
56 <DT><STRONG><A NAME="item_definition">svcpart - Service definition (see <A HREF=".././FS/part_svc.html">the FS::part_svc manpage</A>)</A></STRONG><BR>
61 <H1><A NAME="methods">METHODS</A></H1>
63 <DT><STRONG><A NAME="item_new">new HASHREF</A></STRONG><BR>
65 Creates a new service. To add the refund to the database, see <A HREF="#insert">insert</A>.
66 Services are normally created by creating FS::svc_ objects (see
67 <A HREF=".././FS/svc_acct.html">the FS::svc_acct manpage</A>, <A HREF=".././FS/svc_domain.html">the FS::svc_domain manpage</A>, and <A HREF=".././FS/svc_acct_sm.html">the FS::svc_acct_sm manpage</A>, among others).
69 <DT><STRONG><A NAME="item_insert">insert</A></STRONG><BR>
71 Adds this service to the database. If there is an error, returns the error,
72 otherwise returns false.
74 <DT><STRONG><A NAME="item_delete">delete</A></STRONG><BR>
76 Deletes this service from the database. If there is an error, returns the
77 error, otherwise returns false.
78 <P>Called by the cancel method of the package (see <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>).</P>
80 <DT><STRONG><A NAME="item_replace_OLD_RECORD">replace OLD_RECORD</A></STRONG><BR>
82 Replaces the OLD_RECORD with this one in the database. If there is an error,
83 returns the error, otherwise returns false.
85 <DT><STRONG><A NAME="item_check">check</A></STRONG><BR>
87 Checks all fields to make sure this is a valid service. If there is an error,
88 returns the error, otehrwise returns false. Called by the insert and
91 <DT><STRONG><A NAME="item_label">label</A></STRONG><BR>
93 Returns a list consisting of:
94 - The name of this service (from part_svc)
95 - A meaningful identifier (username, domain, or mail alias)
96 - The table name (i.e. svc_domain) for this service
100 <H1><A NAME="version">VERSION</A></H1>
101 <P>$Id: cust_svc.html,v 1.3 2001-04-23 12:40:31 ivan Exp $</P>
104 <H1><A NAME="bugs">BUGS</A></H1>
105 <P>Behaviour of changing the svcpart of cust_svc records is undefined and should
106 possibly be prohibited, and pkg_svc records are not checked.</P>
107 <P>pkg_svc records are not checked in general (here).</P>
108 <P>Deleting this record doesn't check or delete the svc_* record associated
109 with this record.</P>
112 <H1><A NAME="see also">SEE ALSO</A></H1>
113 <P><A HREF=".././FS/Record.html">the FS::Record manpage</A>, <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>, <A HREF=".././FS/part_svc.html">the FS::part_svc manpage</A>, <A HREF=".././FS/pkg_svc.html">the FS::pkg_svc manpage</A>,
114 schema.html from the base documentation</P>