diff options
author | Christopher Burger <burgerc@freeside.biz> | 2017-08-21 11:42:36 -0400 |
---|---|---|
committer | Christopher Burger <burgerc@freeside.biz> | 2017-08-21 11:42:36 -0400 |
commit | 05de6d688077b77b7da5bc8ae238871f354459a9 (patch) | |
tree | b7aac5f574f5fad927b69e557907225cd6923f4a /bin | |
parent | 7d80f005462758e0271215240cdf99a9336f03dd (diff) |
RT# 27969 - created 3 new api functions to add, edit and list advertising sources
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/xmlrpc-advertising_sources-add.pl | 28 | ||||
-rwxr-xr-x | bin/xmlrpc-advertising_sources-edit.pl | 30 | ||||
-rwxr-xr-x | bin/xmlrpc-advertising_sources-list.pl | 22 |
3 files changed, 80 insertions, 0 deletions
diff --git a/bin/xmlrpc-advertising_sources-add.pl b/bin/xmlrpc-advertising_sources-add.pl new file mode 100755 index 000000000..4800ad0c7 --- /dev/null +++ b/bin/xmlrpc-advertising_sources-add.pl @@ -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 diff --git a/bin/xmlrpc-advertising_sources-edit.pl b/bin/xmlrpc-advertising_sources-edit.pl new file mode 100755 index 000000000..80f9139c1 --- /dev/null +++ b/bin/xmlrpc-advertising_sources-edit.pl @@ -0,0 +1,30 @@ +#!/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.edit_advertising_source', + 'secret' => 'MySecretCode', + 'refnum' => '4', + 'source' => { + 'referral' => 'Edit referral', + 'title' => 'Edit Referral title', + #'disabled' => 'Y', + #'disabled' => '', + #'agentnum' => '2', + }, +); + +die $result->{'error'} if $result->{'error'}; + +print Dumper($result); + +print "\nAll Done\n"; + +exit;
\ No newline at end of file diff --git a/bin/xmlrpc-advertising_sources-list.pl b/bin/xmlrpc-advertising_sources-list.pl new file mode 100755 index 000000000..317a38b7b --- /dev/null +++ b/bin/xmlrpc-advertising_sources-list.pl @@ -0,0 +1,22 @@ +#!/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.list_advertising_sources', + 'secret' => 'MySecretCode', +); + +die $result->{'error'} if $result->{'error'}; + +print Dumper($result); + +print "\nAll Done\n"; + +exit;
\ No newline at end of file |