summaryrefslogtreecommitdiff
path: root/bin/xmlrpc-advertising_sources-add.pl
blob: 4800ad0c70e797d791eb0b2192b56e66062ec72c (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
27
28
#!/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.add_advertising_source',
    'secret' => 'MySecretCode',
    'source' => {
    		'referral' => 'API test referral',
    		'disabled' => '',
    		'agentnum' => '',
    		'title'    => 'API test title',
    	},
);

die $result->{'error'} if $result->{'error'};

print Dumper($result);

print "\nAll Done\n";

exit;