1 <% encode_rest($return) %>\
6 my( $pkgnum, $command ) = split('/', rest_uri_remain($r, $m), 2 );
8 if ( $r->method eq 'GET' ) {
14 my $cust_pkg = qsearchs('cust_main', { 'pkgnum'=>$pkgnum } )
15 or die "unknown pkgnum $pkgnum";
17 if ( $command eq '' ) {
19 $return = $cust_pkg->API_getinfo;
21 } elsif ( $command eq 'cust_svc' ) {
23 $return = [ map $_->API_getinfo, $cust_pkg->cust_svc ];
33 } elsif ( $r->method eq 'POST' ) { #create new
35 } elsif ( $r->method eq 'PUT' ) { #modify