X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FClientAPI_XMLRPC.pm;h=91f979d1d08404b3a3373eb6273679e7a77aeadb;hb=b3cc20aeca25e4351c6ec3b795a951e6124f6376;hp=757f7649069b64fdb2fe1c2f1c16ca8890b14abf;hpb=c8cfa4829c828793e26082d0ce1dfb9733bbcef0;p=freeside.git diff --git a/FS/FS/ClientAPI_XMLRPC.pm b/FS/FS/ClientAPI_XMLRPC.pm index 757f76490..91f979d1d 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 FS::XMLRPC_Lite; #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"; } } @@ -106,6 +112,13 @@ sub ss2clientapi { 'switch_cust' => 'MyAccount/switch_cust', 'customer_info' => 'MyAccount/customer_info', 'customer_info_short' => 'MyAccount/customer_info_short', + + 'contact_passwd' => 'MyAccount/contact/contact_passwd', + 'list_contacts' => 'MyAccount/contact/list_contacts', + 'edit_contact' => 'MyAccount/contact/edit_contact', + 'delete_contact' => 'MyAccount/contact/delete_contact', + 'new_contact' => 'MyAccount/contact/new_contact', + 'billing_history' => 'MyAccount/billing_history', 'edit_info' => 'MyAccount/edit_info', #add to ss cgi! 'invoice' => 'MyAccount/invoice', @@ -114,6 +127,9 @@ sub ss2clientapi { 'legacy_invoice_pdf' => 'MyAccount/legacy_invoice_pdf', 'invoice_logo' => 'MyAccount/invoice_logo', 'list_invoices' => 'MyAccount/list_invoices', #? + 'list_payby' => 'MyAccount/list_payby', + 'insert_payby' => 'MyAccount/insert_payby', + 'delete_payby' => 'MyAccount/delete_payby', 'cancel' => 'MyAccount/cancel', #add to ss cgi! 'payment_info' => 'MyAccount/payment_info', 'payment_info_renew_info' => 'MyAccount/payment_info_renew_info', @@ -156,6 +172,7 @@ sub ss2clientapi { 'part_svc_info' => 'MyAccount/part_svc_info', 'provision_acct' => 'MyAccount/provision_acct', 'provision_phone' => 'MyAccount/provision_phone', + 'provision_pbx' => 'MyAccount/provision_pbx', 'provision_external' => 'MyAccount/provision_external', 'unprovision_svc' => 'MyAccount/unprovision_svc', 'myaccount_passwd' => 'MyAccount/myaccount_passwd',