1 package iZoomOnlineProvisionService;
5 #BEGIN { push @INC, '/usr/lib/perl/5.8.8/' };
6 use FS::SelfService qw( bulk_processrow check_username agent_login );
10 _IN agent_username $string agent username
11 _IN agent_password $string agent password
12 _IN agent_custid $string customer id in agent system
13 _IN username $string customer service username
14 _IN password $string customer service password
15 _IN daytime $string phone number
16 _IN first $string first name
17 _IN last $string last name
18 _IN address1 $string address line 1
19 _IN address2 $string address line 2
21 _IN state $string state
23 _IN pkg $string package name
24 _IN action $string one of (R|P|D|S)(reconcile, provision, provision with disk, send disk)
25 _IN adjourn $string day to terminate service
26 _IN mobile $string mobile phone
27 _IN sms $string (T|F) acceptable to send SMS messages to mobile?
28 _IN ship_addr1 $string shipping address line 1
29 _IN ship_addr2 $string shipping address line 2
30 _IN ship_city $string shipping address city
31 _IN ship_state $string shipping address state
32 _IN ship_zip $string shipping address zip
33 _RETURN @string array [status, message]. status is one of OK, ERR
42 my $session = agent_login( map { $_ => shift @_ } qw( username password ) );
43 return [ 'ERR', $session->{error} ] if $session->{error};
46 bulk_processrow( session_id => $session->{session_id}, row => [ @_ ] );
48 return $result->{error} ? [ 'ERR', $result->{error} ]
49 : [ 'OK', $result->{message} ];
54 _IN agent_username $string agent username
55 _IN agent_password $string agent password
56 _IN username $string customer service username
57 _IN domain $string user domain name
58 _RETURN @string [OK|ERR]
64 my $session = agent_login( map { $_ => shift @_ } qw( username password ) );
65 return [ 'ERR', $session->{error} ] if $session->{error};
67 my $result = check_username( session_id => $session->{session_id},
68 map { $_ => shift @_ } qw( user domain )
71 return $result->{error} ? [ 'ERR', $result->{error} ]
72 : [ 'OK', $result->{message} ];