[open-ils-commits] r10317 - branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Aug 8 15:43:47 EDT 2008


Author: erickson
Date: 2008-08-08 15:43:43 -0400 (Fri, 08 Aug 2008)
New Revision: 10317

Modified:
   branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Lineitem.pm
Log:
added generic lineitem attr retrieval call

Modified: branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Lineitem.pm
===================================================================
--- branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Lineitem.pm	2008-08-08 16:19:01 UTC (rev 10316)
+++ branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Lineitem.pm	2008-08-08 19:43:43 UTC (rev 10317)
@@ -858,6 +858,29 @@
     return $attr->id;
 }
 
+__PACKAGE__->register_method(
+	method => 'get_lineitem_attr_defs',
+	api_name	=> 'open-ils.acq.lineitem_attr_definition.retrieve.all',
+	signature => {
+        desc => 'Retrieve lineitem attr definitions',
+        params => [
+            {desc => 'Authentication token', type => 'string'},
+        ],
+        return => {desc => 'List of attr definitions'}
+    }
+);
 
+sub get_lineitem_attr_defs {
+    my($self, $conn, $auth) = @_;
+    my $e = new_editor(authtoken=>$auth);
+    return $e->event unless $e->checkauth;
+    my %results;
+    for my $type (qw/generated marc local usr provider/) {
+        my $call = "retrieve_all_acq_lineitem_${type}_attr_definition";
+        $results{$type} = $e->$call;
+    }
+    return \%results;
+}
 
+
 1;



More information about the open-ils-commits mailing list