diff options
author | cvs2git <cvs2git> | 2009-10-11 02:42:17 +0000 |
---|---|---|
committer | cvs2git <cvs2git> | 2009-10-11 02:42:17 +0000 |
commit | a83a000a027d1272e813259d09230d701d84df64 (patch) | |
tree | 71500c957e6d7db3e1ad3d59e74ca7bbb14e44ff /fs_selfservice/FS-SelfService/iZoomOnlineProvisionService.pm | |
parent | 097a12385d80ef52f37d4cc2bb93bc3f81e6f8e6 (diff) | |
parent | 0b69c091543b56a45f2ae6b8718fc67f381a6686 (diff) |
This commit was manufactured by cvs2svn to create branchfreeside_1_9_1
'FREESIDE_1_9_BRANCH'.
Diffstat (limited to 'fs_selfservice/FS-SelfService/iZoomOnlineProvisionService.pm')
-rw-r--r-- | fs_selfservice/FS-SelfService/iZoomOnlineProvisionService.pm | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/fs_selfservice/FS-SelfService/iZoomOnlineProvisionService.pm b/fs_selfservice/FS-SelfService/iZoomOnlineProvisionService.pm new file mode 100644 index 000000000..f4c586969 --- /dev/null +++ b/fs_selfservice/FS-SelfService/iZoomOnlineProvisionService.pm @@ -0,0 +1,75 @@ +package iZoomOnlineProvisionService; + +use strict; + +#BEGIN { push @INC, '/usr/lib/perl/5.8.8/' }; +use FS::SelfService qw( bulk_processrow check_username agent_login ); + +=begin WSDL + +_IN agent_username $string agent username +_IN agent_password $string agent password +_IN agent_custid $string customer id in agent system +_IN username $string customer service username +_IN password $string customer service password +_IN daytime $string phone number +_IN first $string first name +_IN last $string last name +_IN address1 $string address line 1 +_IN address2 $string address line 2 +_IN city $string city +_IN state $string state +_IN zip $string zip +_IN pkg $string package name +_IN action $string one of (R|P|D|S)(reconcile, provision, provision with disk, send disk) +_IN adjourn $string day to terminate service +_IN mobile $string mobile phone +_IN sms $string (T|F) acceptable to send SMS messages to mobile? +_IN ship_addr1 $string shipping address line 1 +_IN ship_addr2 $string shipping address line 2 +_IN ship_city $string shipping address city +_IN ship_state $string shipping address state +_IN ship_zip $string shipping address zip +_RETURN @string array [status, message]. status is one of OK, ERR + +=cut + +my $DEBUG = 0; + +sub Provision { + my $class = shift; + + my $session = agent_login( map { $_ => shift @_ } qw( username password ) ); + return [ 'ERR', $session->{error} ] if $session->{error}; + + my $result = + bulk_processrow( session_id => $session->{session_id}, row => [ @_ ] ); + + return $result->{error} ? [ 'ERR', $result->{error} ] + : [ 'OK', $result->{message} ]; +} + +=begin WSDL + +_IN agent_username $string agent username +_IN agent_password $string agent password +_IN username $string customer service username +_IN domain $string user domain name +_RETURN @string [OK|ERR] + +=cut +sub CheckUserName { + my $class = shift; + + my $session = agent_login( map { $_ => shift @_ } qw( username password ) ); + return [ 'ERR', $session->{error} ] if $session->{error}; + + my $result = check_username( session_id => $session->{session_id}, + map { $_ => shift @_ } qw( user domain ) + ); + + return $result->{error} ? [ 'ERR', $result->{error} ] + : [ 'OK', $result->{message} ]; +} + +1; |