[freeside-commits] branch FREESIDE_3_BRANCH updated. 56fabf7ddfea7308bb22e43b79df04dd46a1620f

Jeremy Davis jeremyd at 420.am
Wed Feb 11 11:30:44 PST 2015


The branch, FREESIDE_3_BRANCH has been updated
       via  56fabf7ddfea7308bb22e43b79df04dd46a1620f (commit)
      from  60713e5d1ac1775194b87486b3c73f27de4eb63d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 56fabf7ddfea7308bb22e43b79df04dd46a1620f
Author: Jeremy Davis <jeremyd at freeside.biz>
Date:   Wed Feb 11 14:30:00 2015 -0500

    Document bill now API

diff --git a/FS/FS/API.pm b/FS/FS/API.pm
index 994f8ba..9b5783a 100644
--- a/FS/FS/API.pm
+++ b/FS/FS/API.pm
@@ -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
index 0000000..244b66f
--- /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;

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/API.pm                                          |   17 +++++++++++++++--
 ...{xmlrpc-customer_info => xmlrpc-customer_bill_now} |    4 ++--
 2 files changed, 17 insertions(+), 4 deletions(-)
 copy bin/{xmlrpc-customer_info => xmlrpc-customer_bill_now} (85%)
 mode change 100755 => 100644




More information about the freeside-commits mailing list