diff options
author | Jeremy Davis <jeremyd@freeside.biz> | 2015-02-11 14:28:01 -0500 |
---|---|---|
committer | Jeremy Davis <jeremyd@freeside.biz> | 2015-02-11 14:28:01 -0500 |
commit | a7d1e60f6b411c9a8daa1f654855440f59bc05ea (patch) | |
tree | c02c56a514d3366dde68e46e1cbdae81de7454aa | |
parent | ff9eaa5810c2ddb8688ae573b372d760679272ed (diff) |
Document bill now API
-rw-r--r-- | FS/FS/API.pm | 17 | ||||
-rwxr-xr-x | bin/xmlrpc-customer_bill_now | 21 |
2 files changed, 36 insertions, 2 deletions
diff --git a/FS/FS/API.pm b/FS/FS/API.pm index dd172c143..c49fb205a 100644 --- a/FS/FS/API.pm +++ b/FS/FS/API.pm @@ -603,8 +603,21 @@ sub location_info { Bills a single customer now, in the same fashion as the "Bill now" link in the UI. -Returns a hash reference with a single key, 'error'. If there is an error, -the value contains the error, otherwise it is empty. +Returns a hash reference with a single key, 'error'. If there is an error, +the value contains the error, otherwise it is empty. Takes a list of keys and +values as parameters with the following keys: + +=over 4 + +=item secret + +API Secret (required) + +=item custnum + +Customer number (required) + +=back =cut diff --git a/bin/xmlrpc-customer_bill_now b/bin/xmlrpc-customer_bill_now new file mode 100755 index 000000000..244b66f06 --- /dev/null +++ b/bin/xmlrpc-customer_bill_now @@ -0,0 +1,21 @@ +#!/usr/bin/perl + +use strict; +use Frontier::Client; +use Data::Dumper; + +my $uri = new URI 'http://localhost:8008/'; + +my $server = new Frontier::Client ( 'url' => $uri ); + +my $result = $server->call( + 'FS.API.bill_now', + 'secret' => 'sharingiscaring', + 'custnum' => 3, +); + +#die $result->{'error'} if $result->{'error'}; + +print Dumper($result); + +1; |