changes from 1.2.3 release, fixes from webdemo
[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:none">
5 </HEAD>
6
7 <BODY>
8
9 <!-- INDEX BEGIN -->
10
11 <UL>
12
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>
20 </UL>
21 <!-- INDEX END -->
22
23 <HR>
24 <P>
25 <H1><A NAME="NAME">NAME</A></H1>
26 <P>
27 FS::cust_svc - Object method for cust_svc objects
28
29 <P>
30 <HR>
31 <H1><A NAME="SYNOPSIS">SYNOPSIS</A></H1>
32 <P>
33 <PRE>  use FS::cust_svc;
34 </PRE>
35 <P>
36 <PRE>  $record = new FS::cust_svc \%hash
37   $record = new FS::cust_svc { 'column' =&gt; 'value' };
38 </PRE>
39 <P>
40 <PRE>  $error = $record-&gt;insert;
41 </PRE>
42 <P>
43 <PRE>  $error = $new_record-&gt;replace($old_record);
44 </PRE>
45 <P>
46 <PRE>  $error = $record-&gt;delete;
47 </PRE>
48 <P>
49 <PRE>  $error = $record-&gt;check;
50 </PRE>
51 <P>
52 <PRE>  ($label, $value) = $record-&gt;label;
53 </PRE>
54 <P>
55 <HR>
56 <H1><A NAME="DESCRIPTION">DESCRIPTION</A></H1>
57 <P>
58 An FS::cust_svc represents a service. FS::cust_svc inherits from
59 FS::Record. The following fields are currently supported:
60
61 <DL>
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>
65 </DL>
66 <P>
67 <HR>
68 <H1><A NAME="METHODS">METHODS</A></H1>
69 <DL>
70 <DT><STRONG><A NAME="item_new">new HASHREF</A></STRONG><DD>
71 <P>
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).
74
75 <DT><STRONG><A NAME="item_insert">insert</A></STRONG><DD>
76 <P>
77 Adds this service to the database. If there is an error, returns the error,
78 otherwise returns false.
79
80 <DT><STRONG><A NAME="item_delete">delete</A></STRONG><DD>
81 <P>
82 Deletes this service from the database. If there is an error, returns the
83 error, otherwise returns false.
84
85 <P>
86 Called by the cancel method of the package (see <A HREF="../FS/cust_pkg.html">FS::cust_pkg</A>).
87
88 <DT><STRONG><A NAME="item_replace">replace OLD_RECORD</A></STRONG><DD>
89 <P>
90 Replaces the OLD_RECORD with this one in the database. If there is an
91 error, returns the error, otherwise returns false.
92
93 <DT><STRONG><A NAME="item_check">check</A></STRONG><DD>
94 <P>
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
97 replace methods.
98
99 <DT><STRONG><A NAME="item_label">label</A></STRONG><DD>
100 <P>
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
104
105 </DL>
106 <P>
107 <HR>
108 <H1><A NAME="VERSION">VERSION</A></H1>
109 <P>
110 $Id: cust_svc.html,v 1.2 2000-03-03 18:22:43 ivan Exp $
111
112 <P>
113 <HR>
114 <H1><A NAME="BUGS">BUGS</A></H1>
115 <P>
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.
118
119 <P>
120 pkg_svc records are not checked in general (here).
121
122 <P>
123 Deleting this record doesn't check or delete the svc_* record associated
124 with this record.
125
126 <P>
127 <HR>
128 <H1><A NAME="SEE_ALSO">SEE ALSO</A></H1>
129 <P>
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
131
132 </BODY>
133
134 </HTML>