RT# 27969 - created 3 new api functions to add, edit and list advertising sources
[freeside.git] / bin / xmlrpc-advertising_sources-add.pl
diff --git a/bin/xmlrpc-advertising_sources-add.pl b/bin/xmlrpc-advertising_sources-add.pl
new file mode 100755 (executable)
index 0000000..4800ad0
--- /dev/null
@@ -0,0 +1,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;
\ No newline at end of file