[open-ils-commits] r16070 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Mar 31 13:26:13 EDT 2010
Author: erickson
Date: 2010-03-31 13:26:09 -0400 (Wed, 31 Mar 2010)
New Revision: 16070
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor/Stage.pm
Log:
added API docs for open-ils.actor.user.stage.create. Added support for passing in staged statcats
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor/Stage.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor/Stage.pm 2010-03-31 13:58:45 UTC (rev 16069)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor/Stage.pm 2010-03-31 17:26:09 UTC (rev 16070)
@@ -11,10 +11,27 @@
__PACKAGE__->register_method (
method => 'create_user_stage',
api_name => 'open-ils.actor.user.stage.create',
+ signature => {
+ desc => q/
+ Creates a new pending user account including addresses and statcats.
+ Users are added to staging tables pending staff review.
+ /,
+ params => [
+ {desc => 'user', type => 'object', class => 'stgu'},
+ {desc => 'Mailing address. Optional', type => 'object', class => 'stgma'},
+ {desc => 'Billing address. Optional', type => 'object', class => 'stgba'},
+ {desc => 'Statcats. Optional. This is an array of "stgsc" objects', type => 'array'},
+ ],
+ return => {
+ desc => 'username on success, Event on error',
+ type => ''
+ }
+
+ }
);
sub create_user_stage {
- my($self, $conn, $user, $mail_addr, $bill_addr) = @_; # more?
+ my($self, $conn, $user, $mail_addr, $bill_addr, $statcats) = @_; # more?
return 0 unless $U->ou_ancestor_setting_value('opac.allow_pending_user');
return OpenILS::Event->new('BAD_PARAMS') unless $user;
@@ -36,6 +53,13 @@
$e->create_staging_billing_address_stage($bill_addr) or return $e->die_event;
}
+ if($statcats) {
+ foreach (@$statcats) {
+ $_->usrname($uname);
+ $e->create_staging_statcat_stage($_) or return $e->die_event;
+ }
+ }
+
$e->commit;
$conn->respond_complete($uname);
@@ -148,8 +172,5 @@
}
-
1;
-
-
More information about the open-ils-commits
mailing list