X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FClientAPI_XMLRPC.pm;h=7a1fc3e0fc2ca911ad487d5ac5a903af04c4d2c6;hb=06f584e3a7d4621169d89490c72484615aecf841;hp=593440232df7fee9298dadffb6896e8c49420ffa;hpb=0c76afbb717e1716e6126bc4a120b8d9471614a0;p=freeside.git diff --git a/FS/FS/ClientAPI_XMLRPC.pm b/FS/FS/ClientAPI_XMLRPC.pm index 593440232..7a1fc3e0f 100644 --- a/FS/FS/ClientAPI_XMLRPC.pm +++ b/FS/FS/ClientAPI_XMLRPC.pm @@ -30,6 +30,7 @@ L, L use strict; use vars qw($DEBUG $AUTOLOAD); +use Encode; use XMLRPC::Lite; # for XMLRPC::Data use FS::ClientAPI; @@ -67,12 +68,17 @@ sub AUTOLOAD { shift; #discard package name; + #$call = "FS::SelfService::$call"; #no strict 'refs'; #&{$call}(@_); #FS::ClientAPI->dispatch($autoload->{$call}, @_); - my $return = FS::ClientAPI->dispatch($autoload->{$call}, { @_ } ); + my %hash = @_; + #XXX doesn't handle multi-level data structs + $hash{$_} = decode(utf8=>$hash{$_}) foreach keys %hash; + + my $return = FS::ClientAPI->dispatch($autoload->{$call}, \%hash ); if ( exists($typefix{$call}) ) { my $typefix = $typefix{$call}; @@ -85,7 +91,7 @@ sub AUTOLOAD { $return; - }else{ + } else { die "No such procedure: $call"; } } @@ -105,6 +111,7 @@ sub ss2clientapi { 'switch_acct' => 'MyAccount/switch_acct', 'customer_info' => 'MyAccount/customer_info', 'customer_info_short' => 'MyAccount/customer_info_short', + 'customer_recurring' => 'MyAccount/customer_recurring', 'contact_passwd' => 'MyAccount/contact/contact_passwd', 'list_contacts' => 'MyAccount/contact/list_contacts', @@ -203,6 +210,8 @@ sub ss2clientapi { 'quotation_add_pkg' => 'MyAccount/quotation/quotation_add_pkg', 'quotation_remove_pkg' => 'MyAccount/quotation/quotation_remove_pkg', 'quotation_order' => 'MyAccount/quotation/quotation_order', + + 'freesideinc_service' => 'Freeside/freesideinc_service', }; }