- web interface for hourly account charges!
[freeside.git] / httemplate / docs / man / FS / svc_acct_sm.html
1 <HTML>
2 <HEAD>
3 <TITLE>FS::svc_acct_sm - Object methods for svc_acct_sm records</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="#warning">WARNING</A></LI>
17         <LI><A HREF="#description">DESCRIPTION</A></LI>
18         <LI><A HREF="#methods">METHODS</A></LI>
19         <LI><A HREF="#version">VERSION</A></LI>
20         <LI><A HREF="#bugs">BUGS</A></LI>
21         <LI><A HREF="#see also">SEE ALSO</A></LI>
22 </UL>
23 <!-- INDEX END -->
24
25 <HR>
26 <P>
27 <H1><A NAME="name">NAME</A></H1>
28 <P>FS::svc_acct_sm - Object methods for svc_acct_sm records</P>
29 <P>
30 <HR>
31 <H1><A NAME="synopsis">SYNOPSIS</A></H1>
32 <PRE>
33   use FS::svc_acct_sm;</PRE>
34 <PRE>
35   $record = new FS::svc_acct_sm \%hash;
36   $record = new FS::svc_acct_sm { 'column' =&gt; 'value' };</PRE>
37 <PRE>
38   $error = $record-&gt;insert;</PRE>
39 <PRE>
40   $error = $new_record-&gt;replace($old_record);</PRE>
41 <PRE>
42   $error = $record-&gt;delete;</PRE>
43 <PRE>
44   $error = $record-&gt;check;</PRE>
45 <PRE>
46   $error = $record-&gt;suspend;</PRE>
47 <PRE>
48   $error = $record-&gt;unsuspend;</PRE>
49 <PRE>
50   $error = $record-&gt;cancel;</PRE>
51 <P>
52 <HR>
53 <H1><A NAME="warning">WARNING</A></H1>
54 <P>FS::svc_acct_sm is <STRONG>depreciated</STRONG>.  This class is only included for migration
55 purposes.  See <A HREF=".././FS/svc_forward.html">the FS::svc_forward manpage</A>.</P>
56 <P>
57 <HR>
58 <H1><A NAME="description">DESCRIPTION</A></H1>
59 <P>An FS::svc_acct_sm object represents a virtual mail alias.  FS::svc_acct_sm
60 inherits from FS::Record.  The following fields are currently supported:</P>
61 <DL>
62 <DT><STRONG><A NAME="item_key">svcnum - primary key (assigned automatcially for new accounts)</A></STRONG><BR>
63 <DD>
64 <DT><STRONG><A NAME="item_domain">domsvc - svcnum of the virtual domain (see <A HREF=".././FS/svc_domain.html">the FS::svc_domain manpage</A>)</A></STRONG><BR>
65 <DD>
66 <DT><STRONG><A NAME="item_account">domuid - uid of the target account (see <A HREF=".././FS/svc_acct.html">the FS::svc_acct manpage</A>)</A></STRONG><BR>
67 <DD>
68 <DT><STRONG><A NAME="item_domuser_%2D_virtual_username">domuser - virtual username</A></STRONG><BR>
69 <DD>
70 </DL>
71 <P>
72 <HR>
73 <H1><A NAME="methods">METHODS</A></H1>
74 <DL>
75 <DT><STRONG><A NAME="item_new">new HASHREF</A></STRONG><BR>
76 <DD>
77 Creates a new virtual mail alias.  To add the virtual mail alias to the
78 database, see <A HREF="#insert">insert</A>.
79 <P></P>
80 <DT><STRONG><A NAME="item_insert">insert</A></STRONG><BR>
81 <DD>
82 Adds this virtual mail alias to the database.  If there is an error, returns
83 the error, otherwise returns false.
84 <P>The additional fields pkgnum and svcpart (see <A HREF=".././FS/cust_svc.html">the FS::cust_svc manpage</A>) should be 
85 defined.  An FS::cust_svc record will be created and inserted.</P>
86 <PRE>
87  #If the configuration values (see L&lt;FS::Conf&gt;) shellmachine and qmailmachines
88  #exist, and domuser is `*' (meaning a catch-all mailbox), the command:
89  #
90  #  [ -e $dir/.qmail-$qdomain-default ] || {
91  #    touch $dir/.qmail-$qdomain-default;
92  #    chown $uid:$gid $dir/.qmail-$qdomain-default;
93  #  }
94  #
95  #is executed on shellmachine via ssh (see L&lt;dot-qmail/&quot;EXTENSION ADDRESSES&quot;&gt;).
96  #This behaviour can be surpressed by setting $FS::svc_acct_sm::nossh_hack true.</PRE>
97 <P></P>
98 <DT><STRONG><A NAME="item_delete">delete</A></STRONG><BR>
99 <DD>
100 Deletes this virtual mail alias from the database.  If there is an error,
101 returns the error, otherwise returns false.
102 <P>The corresponding FS::cust_svc record will be deleted as well.</P>
103 <P></P>
104 <DT><STRONG><A NAME="item_replace_OLD_RECORD">replace OLD_RECORD</A></STRONG><BR>
105 <DD>
106 Replaces OLD_RECORD with this one in the database.  If there is an error,
107 returns the error, otherwise returns false.
108 <P></P>
109 <DT><STRONG><A NAME="item_suspend">suspend</A></STRONG><BR>
110 <DD>
111 Just returns false (no error) for now.
112 <P>Called by the suspend method of FS::cust_pkg (see <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>).</P>
113 <P></P>
114 <DT><STRONG><A NAME="item_unsuspend">unsuspend</A></STRONG><BR>
115 <DD>
116 Just returns false (no error) for now.
117 <P>Called by the unsuspend method of FS::cust_pkg (see <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>).</P>
118 <P></P>
119 <DT><STRONG><A NAME="item_cancel">cancel</A></STRONG><BR>
120 <DD>
121 Just returns false (no error) for now.
122 <P>Called by the cancel method of FS::cust_pkg (see <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>).</P>
123 <P></P>
124 <DT><STRONG><A NAME="item_check">check</A></STRONG><BR>
125 <DD>
126 Checks all fields to make sure this is a valid virtual mail alias.  If there is
127 an error, returns the error, otherwise returns false.  Called by the insert and
128 replace methods.
129 <P>Sets any fixed values; see <A HREF=".././FS/part_svc.html">the FS::part_svc manpage</A>.</P>
130 <P></P></DL>
131 <P>
132 <HR>
133 <H1><A NAME="version">VERSION</A></H1>
134 <P>$Id: svc_acct_sm.html,v 1.3 2002-01-29 17:42:46 ivan Exp $</P>
135 <P>
136 <HR>
137 <H1><A NAME="bugs">BUGS</A></H1>
138 <P>The remote commands should be configurable.</P>
139 <P>The $recref stuff in sub check should be cleaned up.</P>
140 <P>
141 <HR>
142 <H1><A NAME="see also">SEE ALSO</A></H1>
143 <P><A HREF=".././FS/svc_forward.html">the FS::svc_forward manpage</A></P>
144 <P><A HREF=".././FS/Record.html">the FS::Record manpage</A>, <A HREF=".././FS/Conf.html">the FS::Conf manpage</A>, <A HREF=".././FS/cust_svc.html">the FS::cust_svc manpage</A>, <A HREF=".././FS/part_svc.html">the FS::part_svc manpage</A>, <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>,
145 <A HREF=".././FS/svc_acct.html">the FS::svc_acct manpage</A>, <A HREF=".././FS/svc_domain.html">the FS::svc_domain manpage</A>, <A HREF="../Net/SSH.html">the Net::SSH manpage</A>, <EM>ssh</EM>, <EM>dot-qmail</EM>,
146 schema.html from the base documentation.</P>
147
148 </BODY>
149
150 </HTML>