From: ivan Date: Mon, 23 Apr 2001 12:41:57 +0000 (+0000) Subject: new API documentation X-Git-Tag: freeside_1_3_0~3 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=35227000d6222f35ec49bc4226e94200b77abc4f new API documentation --- diff --git a/htdocs/docs/man/FS/CGIwrapper.html b/htdocs/docs/man/FS/CGIwrapper.html new file mode 100644 index 000000000..bab5e7f37 --- /dev/null +++ b/htdocs/docs/man/FS/CGIwrapper.html @@ -0,0 +1,16 @@ + + +./FS/FS/CGIwrapper.pm + + + + + + + + + + + + + diff --git a/htdocs/docs/man/FS/SignupClient.html b/htdocs/docs/man/FS/SignupClient.html new file mode 100644 index 000000000..0c621edcb --- /dev/null +++ b/htdocs/docs/man/FS/SignupClient.html @@ -0,0 +1,125 @@ + + +FS::SignupClient - Freeside signup client API + + + + + + + + + + +
+

+

NAME

+

+FS::SignupClient - Freeside signup client API + +

+


+

SYNOPSIS

+

+

  use FS::SignupClient qw( signup_info new_customer );
+
+

+

  ( $locales, $packages, $pops ) = signup_info;
+
+

+

  $error = new_customer ( {
+    'first'          => $first,
+    'last'           => $last,
+    'ss'             => $ss,
+    'comapny'        => $company,
+    'address1'       => $address1,
+    'address2'       => $address2,
+    'city'           => $city,
+    'county'         => $county,
+    'state'          => $state,
+    'zip'            => $zip,
+    'country'        => $country,
+    'daytime'        => $daytime,
+    'night'          => $night,
+    'fax'            => $fax,
+    'payby'          => $payby,
+    'payinfo'        => $payinfo,
+    'paydate'        => $paydate,
+    'payname'        => $payname,
+    'invoicing_list' => $invoicing_list,
+    'pkgpart'        => $pkgpart,
+    'username'       => $username,
+    '_password'       => $password,
+    'popnum'         => $popnum,
+  } );
+
+

+


+

DESCRIPTION

+

+This module provides an API for a remote signup server. + +

+It needs to be run as the freeside user. Because of this, the program which +calls these subroutines should be written very carefully. + +

+


+

SUBROUTINES

+
+
signup_info
+

+Returns three array references of hash references. + +

+The first set of hash references is of allowable locales. Each hash +reference has the following keys: taxnum state county country + +

+The second set of hash references is of allowable packages. Each hash +reference has the following keys: pkgpart pkg + +

+The third set of hash references is of allowable POPs (Points Of Presence). +Each hash reference has the following keys: popnum city state ac exch + +

new_customer HASHREF
+

+Adds a customer to the remote Freeside system. Requires a hash reference as +a paramater with the following keys: first last ss comapny address1 +address2 city county state zip country daytime night fax payby payinfo +paydate payname invoicing_list pkgpart username _password popnum + +

+Returns a scalar error message, or the empty string for success. + +

+

+


+

VERSION

+

+$Id: SignupClient.html,v 1.1 2001-04-23 12:41:57 ivan Exp $ + +

+


+

BUGS

+

+


+

SEE ALSO

+

+fs_signupd, FS::SignupServer, FS::cust_main + + + + + + diff --git a/htdocs/docs/man/FS/domain_record.html b/htdocs/docs/man/FS/domain_record.html new file mode 100644 index 000000000..78601b4d0 --- /dev/null +++ b/htdocs/docs/man/FS/domain_record.html @@ -0,0 +1,122 @@ + + +FS::domain_record - Object methods for domain_record records + + + + + + + + +

+ + +
+

+

NAME

+

FS::domain_record - Object methods for domain_record records

+

+


+

SYNOPSIS

+
+  use FS::domain_record;
+
+  $record = new FS::domain_record \%hash;
+  $record = new FS::domain_record { 'column' => 'value' };
+
+  $error = $record->insert;
+
+  $error = $new_record->replace($old_record);
+
+  $error = $record->delete;
+
+  $error = $record->check;
+

+


+

DESCRIPTION

+

An FS::domain_record object represents an entry in a DNS zone. +FS::domain_record inherits from FS::Record. The following fields are currently +supported:

+
+
recnum - primary key
+
+
svcnum - Domain (see the FS::svc_domain manpage) of this entry
+
+
reczone - partial (or full) zone for this entry
+
+
recaf - address family for this entry, currently only `IN' is recognized.
+
+
rectype - record type for this entry (A, MX, etc.)
+
+
recdata - data for this entry
+
+
+

+


+

METHODS

+
+
new HASHREF
+
+Creates a new entry. To add the example to the database, see insert. +

Note that this stores the hash reference, not a distinct copy of the hash it +points to. You can ask the object for a copy with the hash method.

+

+
insert
+
+Adds this record to the database. If there is an error, returns the error, +otherwise returns false. +

+
delete
+
+Delete this record from the database. +

+
replace OLD_RECORD
+
+Replaces the OLD_RECORD with this one in the database. If there is an error, +returns the error, otherwise returns false. +

+
check
+
+Checks all fields to make sure this is a valid example. If there is +an error, returns the error, otherwise returns false. Called by the insert +and replace methods. +

+

+


+

VERSION

+

$Id: domain_record.html,v 1.1 2001-04-23 12:41:57 ivan Exp $

+

+


+

BUGS

+

The data validation doesn't check everything it could. In particular, +there is no protection against bad data that passes the regex, duplicate +SOA records, forgetting the trailing `.', impossible IP addersses, etc. Of +course, it's still better than editing the zone files directly. :)

+

+


+

SEE ALSO

+

the FS::Record manpage, schema.html from the base documentation.

+

+


+

HISTORY

+

$Log: domain_record.html,v $ +

Revision 1.1 2001-04-23 12:41:57 ivan +

new API documentation +

+Revision 1.1 2000/02/03 05:16:52 ivan +beginning of DNS and Apache support

+ + + + diff --git a/htdocs/docs/man/FS/nas.html b/htdocs/docs/man/FS/nas.html new file mode 100644 index 000000000..db704c777 --- /dev/null +++ b/htdocs/docs/man/FS/nas.html @@ -0,0 +1,117 @@ + + +FS::nas - Object methods for nas records + + + + + + + + + + + +
+

+

NAME

+

FS::nas - Object methods for nas records

+

+


+

SYNOPSIS

+
+  use FS::nas;
+
+  $record = new FS::nas \%hash;
+  $record = new FS::nas {
+    'nasnum'  => 1,
+    'nasip'   => '10.4.20.23',
+    'nasfqdn' => 'box1.brc.nv.us.example.net',
+  };
+
+  $error = $record->insert;
+
+  $error = $new_record->replace($old_record);
+
+  $error = $record->delete;
+
+  $error = $record->check;
+
+  $error = $record->heartbeat($timestamp);
+

+


+

DESCRIPTION

+

An FS::nas object represents an Network Access Server on your network, such as +a terminal server or equivalent. FS::nas inherits from FS::Record. The +following fields are currently supported:

+
+
nasnum - primary key
+
+
nas - NAS name
+
+
nasip - NAS ip address
+
+
nasfqdn - NAS fully-qualified domain name
+
+
last - timestamp indicating the last instant the NAS was in a known + state (used by the session monitoring).
+
+
+

+


+

METHODS

+
+
new HASHREF
+
+Creates a new NAS. To add the NAS to the database, see insert. +

Note that this stores the hash reference, not a distinct copy of the hash it +points to. You can ask the object for a copy with the hash method.

+

+
insert
+
+Adds this record to the database. If there is an error, returns the error, +otherwise returns false. +

+
delete
+
+Delete this record from the database. +

+
replace OLD_RECORD
+
+Replaces the OLD_RECORD with this one in the database. If there is an error, +returns the error, otherwise returns false. +

+
check
+
+Checks all fields to make sure this is a valid example. If there is +an error, returns the error, otherwise returns false. Called by the insert +and replace methods. +

+
heartbeat TIMESTAMP
+
+Updates the timestamp for this nas +

+

+


+

VERSION

+

$Id: nas.html,v 1.1 2001-04-23 12:41:57 ivan Exp $

+

+


+

BUGS

+

+


+

SEE ALSO

+

the FS::Record manpage, schema.html from the base documentation.

+ + + + diff --git a/htdocs/docs/man/FS/port.html b/htdocs/docs/man/FS/port.html new file mode 100644 index 000000000..b747f0ca3 --- /dev/null +++ b/htdocs/docs/man/FS/port.html @@ -0,0 +1,120 @@ + + +FS::port - Object methods for port records + + + + + + + + + + + +
+

+

NAME

+

FS::port - Object methods for port records

+

+


+

SYNOPSIS

+
+  use FS::port;
+
+  $record = new FS::port \%hash;
+  $record = new FS::port { 'column' => 'value' };
+
+  $error = $record->insert;
+
+  $error = $new_record->replace($old_record);
+
+  $error = $record->delete;
+
+  $error = $record->check;
+
+  $session = $port->session;
+

+


+

DESCRIPTION

+

An FS::port object represents an individual port on a NAS. FS::port inherits +from FS::Record. The following fields are currently supported:

+
+
portnum - primary key
+
+
ip - IP address of this port
+
+
nasport - port number on the NAS
+
+
nasnum - NAS this port is on - see the FS::nas manpage
+
+
+

+


+

METHODS

+
+
new HASHREF
+
+Creates a new port. To add the example to the database, see insert. +

Note that this stores the hash reference, not a distinct copy of the hash it +points to. You can ask the object for a copy with the hash method.

+

+
insert
+
+Adds this record to the database. If there is an error, returns the error, +otherwise returns false. +

+
delete
+
+Delete this record from the database. +

+
replace OLD_RECORD
+
+Replaces the OLD_RECORD with this one in the database. If there is an error, +returns the error, otherwise returns false. +

+
check
+
+Checks all fields to make sure this is a valid example. If there is +an error, returns the error, otherwise returns false. Called by the insert +and replace methods. +

+
session
+
+Returns the currently open session on this port, or if no session is currently +open, the most recent session. See the FS::session manpage. +

+

+


+

VERSION

+

$Id: port.html,v 1.1 2001-04-23 12:41:57 ivan Exp $

+

+


+

BUGS

+

The author forgot to customize this manpage.

+

The session method won't deal well if you have multiple open sessions on a +port, for example if your RADIUS server drops stop records. Suggestions for +how to deal with this sort of lossage welcome; should we close the session +when we get a new session on that port? Tag it as invalid somehow? Close it +one second after it was opened? *sigh* Maybe FS::session shouldn't let you +create overlapping sessions, at least folks will find out their logging is +dropping records.

+

If you think the above refers multiple user logins you need to read the +manpages again.

+

+


+

SEE ALSO

+

the FS::Record manpage, schema.html from the base documentation.

+ + + + diff --git a/htdocs/docs/man/FS/prepay_credit.html b/htdocs/docs/man/FS/prepay_credit.html new file mode 100644 index 000000000..699b1c16f --- /dev/null +++ b/htdocs/docs/man/FS/prepay_credit.html @@ -0,0 +1,118 @@ + + +FS::prepay_credit - Object methods for prepay_credit records + + + + + + + + + + + +
+

+

NAME

+

FS::prepay_credit - Object methods for prepay_credit records

+

+


+

SYNOPSIS

+
+  use FS::prepay_credit;
+
+  $record = new FS::prepay_credit \%hash;
+  $record = new FS::prepay_credit {
+    'identifier' => '4198123455512121'
+    'amount'     => '19.95',
+  };
+
+  $error = $record->insert;
+
+  $error = $new_record->replace($old_record);
+
+  $error = $record->delete;
+
+  $error = $record->check;
+

+


+

DESCRIPTION

+

An FS::table_name object represents an pre--paid credit, such as a pre-paid +``calling card''. FS::prepay_credit inherits from FS::Record. The following +fields are currently supported:

+
+
field - description
+
+
identifier - identifier entered by the user to receive the credit
+
+
amount - amount of the credit
+
+
+

+


+

METHODS

+
+
new HASHREF
+
+Creates a new pre-paid credit. To add the example to the database, see +insert. +

Note that this stores the hash reference, not a distinct copy of the hash it +points to. You can ask the object for a copy with the hash method.

+

+
insert
+
+Adds this record to the database. If there is an error, returns the error, +otherwise returns false. +

+
delete
+
+Delete this record from the database. +

+
replace OLD_RECORD
+
+Replaces the OLD_RECORD with this one in the database. If there is an error, +returns the error, otherwise returns false. +

+
check
+
+Checks all fields to make sure this is a valid pre-paid credit. If there is +an error, returns the error, otherwise returns false. Called by the insert +and replace methods. +

+

+


+

VERSION

+

$Id: prepay_credit.html,v 1.1 2001-04-23 12:41:57 ivan Exp $

+

+


+

BUGS

+

+


+

SEE ALSO

+

the FS::Record manpage, schema.html from the base documentation.

+

+


+

HISTORY

+

$Log: prepay_credit.html,v $ +

Revision 1.1 2001-04-23 12:41:57 ivan +

new API documentation +

+Revision 1.2 2000/02/02 20:22:18 ivan +bugfix prepayment in signup server

+

Revision 1.1 2000/01/31 05:22:23 ivan +prepaid ``internet cards''

+ + + + diff --git a/htdocs/docs/man/FS/session.html b/htdocs/docs/man/FS/session.html new file mode 100644 index 000000000..c714337be --- /dev/null +++ b/htdocs/docs/man/FS/session.html @@ -0,0 +1,129 @@ + + +FS::session - Object methods for session records + + + + + + + + + + + +
+

+

NAME

+

FS::session - Object methods for session records

+

+


+

SYNOPSIS

+
+  use FS::session;
+
+  $record = new FS::session \%hash;
+  $record = new FS::session {
+    'portnum' => 1,
+    'svcnum'  => 2,
+    'login'   => $timestamp,
+    'logout'  => $timestamp,
+  };
+
+  $error = $record->insert;
+
+  $error = $new_record->replace($old_record);
+
+  $error = $record->delete;
+
+  $error = $record->check;
+
+  $error = $record->nas_heartbeat($timestamp);
+

+


+

DESCRIPTION

+

An FS::session object represents an user login session. FS::session inherits +from FS::Record. The following fields are currently supported:

+
+
sessionnum - primary key
+
+
portnum - NAS port for this session - see the FS::port manpage
+
+
svcnum - User for this session - see the FS::svc_acct manpage
+
+
login - timestamp indicating the beginning of this user session.
+
+
logout - timestamp indicating the end of this user session. May be null, + which indicates a currently open session.
+
+
+

+


+

METHODS

+
+
new HASHREF
+
+Creates a new session. To add the session to the database, see insert. +

Note that this stores the hash reference, not a distinct copy of the hash it +points to. You can ask the object for a copy with the hash method.

+

+
insert
+
+Adds this record to the database. If there is an error, returns the error, +otherwise returns false. If the `login' field is empty, it is replaced with +the current time. +

+
delete
+
+Delete this record from the database. +

+
replace OLD_RECORD
+
+Replaces the OLD_RECORD with this one in the database. If there is an error, +returns the error, otherwise returns false. If the `logout' field is empty, +it is replaced with the current time. +

+
check
+
+Checks all fields to make sure this is a valid session. If there is +an error, returns the error, otherwise returns false. Called by the insert +and replace methods. +

+
nas_heartbeat
+
+Heartbeats the nas associated with this session (see the FS::nas manpage). +

+
svc_acct
+
+Returns the svc_acct record associated with this session (see the FS::svc_acct manpage). +

+

+


+

VERSION

+

$Id: session.html,v 1.1 2001-04-23 12:41:57 ivan Exp $

+

+


+

BUGS

+

Maybe you shouldn't be able to insert a session if there's currently an open +session on that port. Or maybe the open session on that port should be flagged +as problematic? autoclosed? *sigh*

+

Hmm, sessions refer to current svc_acct records... probably need to constrain +deletions to svc_acct records such that no svc_acct records are deleted which +have a session (even if long-closed).

+

+


+

SEE ALSO

+

the FS::Record manpage, schema.html from the base documentation.

+ + + + diff --git a/htdocs/docs/man/FS/svc_www.html b/htdocs/docs/man/FS/svc_www.html new file mode 100644 index 000000000..8f3a99a64 --- /dev/null +++ b/htdocs/docs/man/FS/svc_www.html @@ -0,0 +1,150 @@ + + +FS::svc_www - Object methods for svc_www records + + + + + + + + + + + +
+

+

NAME

+

FS::svc_www - Object methods for svc_www records

+

+


+

SYNOPSIS

+
+  use FS::svc_www;
+
+  $record = new FS::svc_www \%hash;
+  $record = new FS::svc_www { 'column' => 'value' };
+
+  $error = $record->insert;
+
+  $error = $new_record->replace($old_record);
+
+  $error = $record->delete;
+
+  $error = $record->check;
+
+  $error = $record->suspend;
+
+  $error = $record->unsuspend;
+
+  $error = $record->cancel;
+

+


+

DESCRIPTION

+

An FS::svc_www object represents an web virtual host. FS::svc_www inherits +from FS::svc_Common. The following fields are currently supported:

+
+
svcnum - primary key
+
+
recnum - DNS `A' record corresponding to this web virtual host. (see the FS::domain_record manpage)
+
+
usersvc - account (see the FS::svc_acct manpage) corresponding to this web virtual host.
+
+
+

+


+

METHODS

+
+
new HASHREF
+
+Creates a new web virtual host. To add the record to the database, see +insert. +

Note that this stores the hash reference, not a distinct copy of the hash it +points to. You can ask the object for a copy with the hash method.

+

+
insert
+
+Adds this record to the database. If there is an error, returns the error, +otherwise returns false. +

The additional fields pkgnum and svcpart (see the FS::cust_svc manpage) should be +defined. An FS::cust_svc record will be created and inserted.

+

If the configuration values (see the FS::Conf manpage) apachemachine, and +apacheroot exist, the command:

+
+  mkdir $apacheroot/$zone;
+  chown $username $apacheroot/$zone;
+  ln -s $apacheroot/$zone $homedir/$zone
+

$zone is the DNS A record pointed to by recnum +$username is the username pointed to by usersvc +$homedir is that user's home directory

+

is executed on apachemachine via ssh. This behaviour can be surpressed by +setting $FS::svc_www::nossh_hack true.

+

+
delete
+
+Delete this record from the database. +

+
replace OLD_RECORD
+
+Replaces the OLD_RECORD with this one in the database. If there is an error, +returns the error, otherwise returns false. +

+
suspend
+
+Called by the suspend method of FS::cust_pkg (see the FS::cust_pkg manpage). +

+
unsuspend
+
+Called by the unsuspend method of FS::cust_pkg (see the FS::cust_pkg manpage). +

+
cancel
+
+Called by the cancel method of FS::cust_pkg (see the FS::cust_pkg manpage). +

+
check
+
+Checks all fields to make sure this is a valid example. If there is +an error, returns the error, otherwise returns false. Called by the insert +and repalce methods. +

+

+


+

VERSION

+

$Id: svc_www.html,v 1.1 2001-04-23 12:41:57 ivan Exp $

+

+


+

BUGS

+

+


+

SEE ALSO

+

the FS::svc_Common manpage, the FS::Record manpage, the FS::domain_record manpage, the FS::cust_svc manpage, +the FS::part_svc manpage, the FS::cust_pkg manpage, schema.html from the base documentation.

+

+


+

HISTORY

+

$Log: svc_www.html,v $ +

Revision 1.1 2001-04-23 12:41:57 ivan +

new API documentation +

+Revision 1.4 2001/04/22 01:56:15 ivan +get rid of FS::SSH.pm (became Net::SSH and Net::SCP on CPAN)

+

Revision 1.3 2000/11/22 23:30:51 ivan +tyop

+

Revision 1.2 2000/03/01 08:13:59 ivan +compilation bugfixes

+

Revision 1.1 2000/02/03 05:16:52 ivan +beginning of DNS and Apache support

+ + + +