documentation and webdemo updates
[freeside.git] / htdocs / docs / man / FS / cust_svc.html
1 <HTML>
2 <HEAD>
3 <TITLE>FS::cust_svc - Object method for cust_svc objects</TITLE>
4 <LINK REV="made" HREF="mailto:perl@packages.debian.org">
5 </HEAD>
6
7 <BODY>
8
9 <A NAME="__index__"></A>
10 <!-- INDEX BEGIN -->
11
12 <UL>
13
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>
21 </UL>
22 <!-- INDEX END -->
23
24 <HR>
25 <P>
26 <H1><A NAME="name">NAME</A></H1>
27 <P>FS::cust_svc - Object method for cust_svc objects</P>
28 <P>
29 <HR>
30 <H1><A NAME="synopsis">SYNOPSIS</A></H1>
31 <PRE>
32   use FS::cust_svc;</PRE>
33 <PRE>
34   $record = new FS::cust_svc \%hash
35   $record = new FS::cust_svc { 'column' =&gt; 'value' };</PRE>
36 <PRE>
37   $error = $record-&gt;insert;</PRE>
38 <PRE>
39   $error = $new_record-&gt;replace($old_record);</PRE>
40 <PRE>
41   $error = $record-&gt;delete;</PRE>
42 <PRE>
43   $error = $record-&gt;check;</PRE>
44 <PRE>
45   ($label, $value) = $record-&gt;label;</PRE>
46 <P>
47 <HR>
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>
51 <DL>
52 <DT><STRONG><A NAME="item_key">svcnum - primary key (assigned automatically for new services)</A></STRONG><BR>
53 <DD>
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>
55 <DD>
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>
57 <DD>
58 </DL>
59 <P>
60 <HR>
61 <H1><A NAME="methods">METHODS</A></H1>
62 <DL>
63 <DT><STRONG><A NAME="item_new">new HASHREF</A></STRONG><BR>
64 <DD>
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).
68 <P></P>
69 <DT><STRONG><A NAME="item_insert">insert</A></STRONG><BR>
70 <DD>
71 Adds this service to the database.  If there is an error, returns the error,
72 otherwise returns false.
73 <P></P>
74 <DT><STRONG><A NAME="item_delete">delete</A></STRONG><BR>
75 <DD>
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>
79 <P></P>
80 <DT><STRONG><A NAME="item_replace_OLD_RECORD">replace OLD_RECORD</A></STRONG><BR>
81 <DD>
82 Replaces the OLD_RECORD with this one in the database.  If there is an error,
83 returns the error, otherwise returns false.
84 <P></P>
85 <DT><STRONG><A NAME="item_check">check</A></STRONG><BR>
86 <DD>
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
89 replace methods.
90 <P></P>
91 <DT><STRONG><A NAME="item_label">label</A></STRONG><BR>
92 <DD>
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
97 <P></P></DL>
98 <P>
99 <HR>
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>
102 <P>
103 <HR>
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>
110 <P>
111 <HR>
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>
115
116 </BODY>
117
118 </HTML>