Document bill now API
authorJeremy Davis <jeremyd@freeside.biz>
Wed, 11 Feb 2015 19:30:00 +0000 (14:30 -0500)
committerJeremy Davis <jeremyd@freeside.biz>
Wed, 11 Feb 2015 19:30:00 +0000 (14:30 -0500)
FS/FS/API.pm
bin/xmlrpc-customer_bill_now [new file with mode: 0644]

index 994f8ba..9b5783a 100644 (file)
@@ -749,8 +749,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 100644 (file)
index 0000000..244b66f
--- /dev/null
@@ -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;