summaryrefslogtreecommitdiff
path: root/httemplate/misc
diff options
context:
space:
mode:
authorivan <ivan>2010-06-26 20:54:40 +0000
committerivan <ivan>2010-06-26 20:54:40 +0000
commit0d3dee3cf6dc3518fb21d1014f5ebb5ea7f95434 (patch)
treea29ce14e53fb6a83cdb3d455383b1aea79b133e1 /httemplate/misc
parent45195c22e1e78a950da9ccc57e69f107f34d7f73 (diff)
adding more REST-like API for maestro here too
Diffstat (limited to 'httemplate/misc')
-rw-r--r--httemplate/misc/maestro-customer_status.cgi16
-rw-r--r--httemplate/misc/maestro-customer_status.html16
2 files changed, 32 insertions, 0 deletions
diff --git a/httemplate/misc/maestro-customer_status.cgi b/httemplate/misc/maestro-customer_status.cgi
new file mode 100644
index 000000000..abd0fb48f
--- /dev/null
+++ b/httemplate/misc/maestro-customer_status.cgi
@@ -0,0 +1,16 @@
+<% $uri->query %>
+<%init>
+
+my $uri = new URI;
+
+my($query) = $cgi->keywords;
+if ( $query =~ /^(\d+)$/ ) {
+
+ use FS::Maestro;
+ $uri->query_form( FS::Maestro::customer_status($1) );
+
+} else {
+ $uri->query_form( { 'error' => 'No custnum' } );
+}
+
+</%init>
diff --git a/httemplate/misc/maestro-customer_status.html b/httemplate/misc/maestro-customer_status.html
new file mode 100644
index 000000000..0c45bcd4b
--- /dev/null
+++ b/httemplate/misc/maestro-customer_status.html
@@ -0,0 +1,16 @@
+<% objToJson( $return ) %>
+<%init>
+
+my $return;
+
+my($query) = $cgi->keywords;
+if ( $query =~ /^(\d+)$/ ) {
+
+ use FS::Maestro;
+ $return = FS::Maestro::customer_status($1);
+
+} else {
+ $return = { 'error' => 'No custnum' };
+}
+
+</%init>