summaryrefslogtreecommitdiff
path: root/bin/xmlrpc-customer_list_svcs
blob: cdfb51ebf925b9fc3dfa25284ad26b4ee6576118 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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;