adding more REST-like API for maestro here too
authorivan <ivan>
Sat, 26 Jun 2010 20:54:40 +0000 (20:54 +0000)
committerivan <ivan>
Sat, 26 Jun 2010 20:54:40 +0000 (20:54 +0000)
httemplate/misc/maestro-customer_status.cgi [new file with mode: 0644]
httemplate/misc/maestro-customer_status.html [new file with mode: 0644]

diff --git a/httemplate/misc/maestro-customer_status.cgi b/httemplate/misc/maestro-customer_status.cgi
new file mode 100644 (file)
index 0000000..abd0fb4
--- /dev/null
@@ -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 (file)
index 0000000..0c45bcd
--- /dev/null
@@ -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>