1 package FS::SignupClient;
4 use vars qw($VERSION @ISA @EXPORT_OK); # $fs_signupd_socket);
9 #use Storable qw(nstore_fd fd_retrieve);
10 use FS::SelfService; # qw( new_customer signup_info );
14 @ISA = qw( Exporter );
15 @EXPORT_OK = qw( signup_info new_customer );
19 FS::SignupClient - Freeside signup client API
23 use FS::SignupClient qw( signup_info new_customer );
25 #this is the backwards-compatibility bit
26 ( $locales, $packages, $pops, $real_signup_info ) = signup_info;
28 #this is compatible with FS::SelfService::new_customer
29 $error = new_customer ( {
33 'comapny' => $company,
34 'address1' => $address1,
35 'address2' => $address2,
40 'country' => $country,
41 'daytime' => $daytime,
45 'payinfo' => $payinfo,
47 'paydate' => $paydate,
48 'payname' => $payname,
49 'invoicing_list' => $invoicing_list,
50 'referral_custnum' => $referral_custnum,
51 'comments' => $comments,
52 'pkgpart' => $pkgpart,
53 'username' => $username,
54 '_password' => $password,
55 'sec_phrase' => $sec_phrase,
57 'agentnum' => $agentnum, #optional
62 This module provides an API for a remote signup server.
64 It needs to be run as the freeside user. Because of this, the program which
65 calls these subroutines should be written very carefully.
73 Returns three array references of hash references.
75 The first set of hash references is of allowable locales. Each hash reference
76 has the following keys:
82 The second set of hash references is of allowable packages. Each hash
83 reference has the following keys:
87 The third set of hash references is of allowable POPs (Points Of Presence).
88 Each hash reference has the following keys:
95 (Future expansion: fourth argument is the $init_data hash reference)
102 my $init_data = FS::SelfService::signup_info();
104 (map { $init_data->{$_} } qw( cust_main_county part_pkg svc_acct_pop ) ),
109 =item new_customer HASHREF
111 Adds a customer to the remote Freeside system. Requires a hash reference as
112 a paramater with the following keys:
141 Returns a scalar error message, or the empty string for success.
147 my $hash = FS::SelfService::new_customer(@_);
157 L<fs_signupd>, L<FS::cust_main>