7 my( $email, $password, $custpaybynum ) = @ARGV;
8 die "Usage: xmlrpc-delete_payby email password custpaybynum\n"
9 unless $email && length($password) && $custpaybynum;
11 my $uri = new URI 'http://localhost:8080/';
13 my $server = new Frontier::Client ( 'url' => $uri );
15 my $login_result = $server->call(
16 'FS.ClientAPI_XMLRPC.login',
18 'password' => $password,
20 die $login_result->{'error'}."\n" if $login_result->{'error'};
22 my $list_result = $server->call(
23 'FS.ClientAPI_XMLRPC.delete_payby',
24 'session_id' => $login_result->{'session_id'},
25 'custpaybynum' => $custpaybynum,
27 die $list_result->{'error'}."\n" if $list_result->{'error'};
29 #print Dumper($list_result);
30 print "Successfully deleted\n";