diff options
author | Jonathan Prykop <jonathan@freeside.biz> | 2016-08-31 21:49:04 -0500 |
---|---|---|
committer | Jonathan Prykop <jonathan@freeside.biz> | 2016-08-31 22:27:31 -0500 |
commit | d5461ef7f534030b662ce5c6ee81eafd5f18cbec (patch) | |
tree | b88fd91b93af3d45d8cf978032a737ce1e1d652f /bin | |
parent | 259777e4667fc8a45496ba2805d1f7e01c75ac7b (diff) |
71890: SelfService API: Return monthly recurring fee
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/xmlrpc-customer_recurring | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/bin/xmlrpc-customer_recurring b/bin/xmlrpc-customer_recurring new file mode 100755 index 000000000..18dd3e896 --- /dev/null +++ b/bin/xmlrpc-customer_recurring @@ -0,0 +1,30 @@ +#!/usr/bin/perl + +use strict; +use Frontier::Client; +use Data::Dumper; + +my( $email, $password ) = @ARGV; +die "Usage: xmlrpc-customer_recurring email password\n" + unless $email && length($password); + +my $uri = new URI 'http://localhost:8080/'; + +my $server = new Frontier::Client ( 'url' => $uri ); + +my $login_result = $server->call( + 'FS.ClientAPI_XMLRPC.login', + 'email' => $email, + 'password' => $password, +); +die $login_result->{'error'}."\n" if $login_result->{'error'}; + +my $list_result = $server->call( + 'FS.ClientAPI_XMLRPC.customer_recurring', + 'session_id' => $login_result->{'session_id'}, +); +die $list_result->{'error'}."\n" if $list_result->{'error'}; + +print Dumper($list_result); + +1; |