summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2017-07-24 23:59:52 -0700
committerIvan Kohler <ivan@freeside.biz>2017-07-24 23:59:52 -0700
commite3c22ef5216a090529e99209409a9cc6ff11a1d3 (patch)
tree8584df04781a179952ad4672299b2ae2627311c6 /bin
parente6968c64eb7a29323d09e32de729e8c0731731a8 (diff)
new backoffice API call customer_list_svcs
Diffstat (limited to 'bin')
-rwxr-xr-xbin/xmlrpc-customer_list_svcs26
1 files changed, 26 insertions, 0 deletions
diff --git a/bin/xmlrpc-customer_list_svcs b/bin/xmlrpc-customer_list_svcs
new file mode 100755
index 000000000..cdfb51ebf
--- /dev/null
+++ b/bin/xmlrpc-customer_list_svcs
@@ -0,0 +1,26 @@
+#!/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.customer_list_svcs',
+ 'secret' => 'sharingiscaring',
+ 'custnum' => 181318,
+);
+
+#die $result->{'error'} if $result->{'error'};
+
+#print Dumper($result);
+
+foreach my $cust_svc ( @{ $result->{'cust_svc'} } ) {
+ #print $cust_svc->{mac_addr}."\n" if exists $cust_svc->{mac_addr};
+ print $cust_svc->{circuit_id}."\n" if exists $cust_svc->{circuit_id};
+}
+
+1;