don't queue up fuzzyfiles update jobs during contact upgrade
[freeside.git] / bin / xmlrpc-delete_payby
1 #!/usr/bin/perl
2
3 use strict;
4 use Frontier::Client;
5 use Data::Dumper;
6
7 my( $email, $password, $custpaybynum ) = @ARGV;
8 die "Usage: xmlrpc-delete_payby email password custpaybynum\n"
9   unless $email && length($password) && $custpaybynum;
10
11 my $uri = new URI 'http://localhost:8080/';
12
13 my $server = new Frontier::Client ( 'url' => $uri );
14
15 my $login_result = $server->call(
16   'FS.ClientAPI_XMLRPC.login',
17     'email'    => $email,
18     'password' => $password,
19 );
20 die $login_result->{'error'}."\n" if $login_result->{'error'};
21
22 my $list_result = $server->call(
23   'FS.ClientAPI_XMLRPC.delete_payby',
24     'session_id'   => $login_result->{'session_id'},
25     'custpaybynum' => $custpaybynum,
26 );
27 die $list_result->{'error'}."\n" if $list_result->{'error'};
28
29 #print Dumper($list_result);
30 print "Successfully deleted\n";
31
32 1;