|
Lines 47-62
my %supports = (
Link Here
|
| 47 |
"renew all" => 1, |
47 |
"renew all" => 1, |
| 48 |
); |
48 |
); |
| 49 |
|
49 |
|
| 50 |
=head1 Functions |
|
|
| 51 |
|
| 52 |
=cut |
| 53 |
|
| 54 |
=head2 new |
| 55 |
|
| 56 |
Missing POD for new. |
| 57 |
|
| 58 |
=cut |
| 59 |
|
| 60 |
sub new { |
50 |
sub new { |
| 61 |
my ( $class, $institution ) = @_; |
51 |
my ( $class, $institution ) = @_; |
| 62 |
my $type = ref($class) || $class; |
52 |
my $type = ref($class) || $class; |
|
Lines 66-88
sub new {
Link Here
|
| 66 |
return bless $self, $type; |
56 |
return bless $self, $type; |
| 67 |
} |
57 |
} |
| 68 |
|
58 |
|
| 69 |
=head2 find_patron |
|
|
| 70 |
|
| 71 |
Missing POD for find_patron. |
| 72 |
|
| 73 |
=cut |
| 74 |
|
| 75 |
sub find_patron { |
59 |
sub find_patron { |
| 76 |
my $self = shift; |
60 |
my $self = shift; |
| 77 |
return C4::SIP::ILS::Patron->new(@_); |
61 |
return C4::SIP::ILS::Patron->new(@_); |
| 78 |
} |
62 |
} |
| 79 |
|
63 |
|
| 80 |
=head2 find_item |
|
|
| 81 |
|
| 82 |
Missing POD for find_item. |
| 83 |
|
| 84 |
=cut |
| 85 |
|
| 86 |
sub find_item { |
64 |
sub find_item { |
| 87 |
my $self = shift; |
65 |
my $self = shift; |
| 88 |
return C4::SIP::ILS::Item->new(@_); |
66 |
return C4::SIP::ILS::Item->new(@_); |
|
Lines 93-126
sub institution {
Link Here
|
| 93 |
return $self->{institution}->{id}; # consider making this return the whole institution |
71 |
return $self->{institution}->{id}; # consider making this return the whole institution |
| 94 |
} |
72 |
} |
| 95 |
|
73 |
|
| 96 |
=head2 institution_id |
|
|
| 97 |
|
| 98 |
Missing POD for institution_id. |
| 99 |
|
| 100 |
=cut |
| 101 |
|
| 102 |
sub institution_id { |
74 |
sub institution_id { |
| 103 |
my $self = shift; |
75 |
my $self = shift; |
| 104 |
return $self->{institution}->{id}; |
76 |
return $self->{institution}->{id}; |
| 105 |
} |
77 |
} |
| 106 |
|
78 |
|
| 107 |
=head2 supports |
|
|
| 108 |
|
| 109 |
Missing POD for supports. |
| 110 |
|
| 111 |
=cut |
| 112 |
|
| 113 |
sub supports { |
79 |
sub supports { |
| 114 |
my ( $self, $op ) = @_; |
80 |
my ( $self, $op ) = @_; |
| 115 |
return ( exists( $supports{$op} ) && $supports{$op} ); |
81 |
return ( exists( $supports{$op} ) && $supports{$op} ); |
| 116 |
} |
82 |
} |
| 117 |
|
83 |
|
| 118 |
=head2 check_inst_id |
|
|
| 119 |
|
| 120 |
Missing POD for check_inst_id. |
| 121 |
|
| 122 |
=cut |
| 123 |
|
| 124 |
sub check_inst_id { |
84 |
sub check_inst_id { |
| 125 |
my ( $self, $id, $whence ) = @_; |
85 |
my ( $self, $id, $whence ) = @_; |
| 126 |
if ( $id ne $self->{institution}->{id} ) { |
86 |
if ( $id ne $self->{institution}->{id} ) { |
|
Lines 133-144
sub check_inst_id {
Link Here
|
| 133 |
} |
93 |
} |
| 134 |
} |
94 |
} |
| 135 |
|
95 |
|
| 136 |
=head2 to_bool |
|
|
| 137 |
|
| 138 |
Missing POD for to_bool. |
| 139 |
|
| 140 |
=cut |
| 141 |
|
| 142 |
sub to_bool { |
96 |
sub to_bool { |
| 143 |
my $bool = shift; |
97 |
my $bool = shift; |
| 144 |
|
98 |
|
|
Lines 180-186
sub offline_ok {
Link Here
|
| 180 |
# returns a status opject that can be queried for the various bits |
134 |
# returns a status opject that can be queried for the various bits |
| 181 |
# of information that the protocol (SIP or NCIP) needs to generate |
135 |
# of information that the protocol (SIP or NCIP) needs to generate |
| 182 |
# the response. |
136 |
# the response. |
| 183 |
# |
137 |
|
| 184 |
sub checkout { |
138 |
sub checkout { |
| 185 |
my ( $self, $patron_id, $item_id, $sc_renew, $fee_ack, $account, $no_block_due_date ) = @_; |
139 |
my ( $self, $patron_id, $item_id, $sc_renew, $fee_ack, $account, $no_block_due_date ) = @_; |
| 186 |
my ( $patron, $item, $circ ); |
140 |
my ( $patron, $item, $circ ); |
|
Lines 289-300
sub _ci_cardnumber_cmp {
Link Here
|
| 289 |
|
243 |
|
| 290 |
# wrapper which allows above to be called for testing |
244 |
# wrapper which allows above to be called for testing |
| 291 |
|
245 |
|
| 292 |
=head2 test_cardnumber_compare |
|
|
| 293 |
|
| 294 |
Missing POD for test_cardnumber_compare. |
| 295 |
|
| 296 |
=cut |
| 297 |
|
| 298 |
sub test_cardnumber_compare { |
246 |
sub test_cardnumber_compare { |
| 299 |
my ( $self, $str1, $str2 ) = @_; |
247 |
my ( $self, $str1, $str2 ) = @_; |
| 300 |
return _ci_cardnumber_cmp( $str1, $str2 ); |
248 |
return _ci_cardnumber_cmp( $str1, $str2 ); |
|
Lines 399-404
sub checkin {
Link Here
|
| 399 |
|
347 |
|
| 400 |
# If the ILS caches patron information, this lets it free |
348 |
# If the ILS caches patron information, this lets it free |
| 401 |
# it up |
349 |
# it up |
|
|
350 |
|
| 402 |
sub end_patron_session { |
351 |
sub end_patron_session { |
| 403 |
my ( $self, $patron_id ) = @_; |
352 |
my ( $self, $patron_id ) = @_; |
| 404 |
|
353 |
|
|
Lines 534-539
sub cancel_hold {
Link Here
|
| 534 |
|
483 |
|
| 535 |
# The patron and item id's can't be altered, but the |
484 |
# The patron and item id's can't be altered, but the |
| 536 |
# date, location, and type can. |
485 |
# date, location, and type can. |
|
|
486 |
|
| 537 |
sub alter_hold { |
487 |
sub alter_hold { |
| 538 |
my ( |
488 |
my ( |
| 539 |
$self, $patron_id, $patron_pwd, $item_id, $title_id, |
489 |
$self, $patron_id, $patron_pwd, $item_id, $title_id, |
|
Lines 680-684
sub renew_all {
Link Here
|
| 680 |
} |
630 |
} |
| 681 |
|
631 |
|
| 682 |
1; |
632 |
1; |
| 683 |
__END__ |
|
|
| 684 |
|
633 |
|
|
|
634 |
=head1 NAME |
| 635 |
|
| 636 |
ILS - Portability layer to interface between Open-SIP and ILS |
| 637 |
|
| 638 |
=head1 SYNOPSIS |
| 639 |
|
| 640 |
use ILS; |
| 641 |
|
| 642 |
# Initialize connection between SIP and the ILS |
| 643 |
my $ils = new ILS (institution => 'Foo Public Library'); |
| 644 |
|
| 645 |
# Basic object access methods |
| 646 |
$inst_name = $self->institution; |
| 647 |
$bool = $self->support($operation); |
| 648 |
$self->check_inst_id($inst_name, "error message"); |
| 649 |
|
| 650 |
# Check to see if certain protocol options are permitted |
| 651 |
$bool = $self->checkout_ok; |
| 652 |
$bool = $self->checkin_ok; |
| 653 |
$bool = $self->status_update_ok; |
| 654 |
$bool = $self->offline_ok; |
| 655 |
|
| 656 |
$status = $ils->checkout($patron_id, $item_id, $sc_renew); |
| 657 |
|
| 658 |
$status = $ils->checkin($item_id, $trans_date, $return_date, |
| 659 |
$current_loc, $item_props, $cancel); |
| 660 |
|
| 661 |
$status = $ils->end_patron_session($patron_id); |
| 662 |
|
| 663 |
$status = $ils->pay_fee($patron_id, $patron_pwd, $fee_amt, |
| 664 |
$fee_type, $pay_type, $fee_id, $trans_id, |
| 665 |
$currency); |
| 666 |
|
| 667 |
$status = $ils->add_hold($patron_id, $patron_pwd, $item_id, |
| 668 |
$title_id, $expiry_date, |
| 669 |
$pickup_locn, $hold_type, $fee_ack); |
| 670 |
|
| 671 |
$status = $ils->cancel_hold($patron_id, $patron_pwd, |
| 672 |
$item_id, $title_id); |
| 673 |
|
| 674 |
$status = $ils->alter_hold($patron_id, $patron_pwd, $item_id, |
| 675 |
$title_id, $expiry_date, |
| 676 |
$pickup_locn, $hold_type, |
| 677 |
$fee_ack); |
| 678 |
|
| 679 |
$status = $ils->renew($patron_id, $patron_pwd, $item_id, |
| 680 |
$title_id, $no_block, $nb_due_date, |
| 681 |
$third_party, $item_props, $fee_ack); |
| 682 |
|
| 683 |
$status = $ils->renew_all($patron_id, $patron_pwd, $fee_ack); |
| 684 |
|
| 685 |
=head1 INTRODUCTION |
| 686 |
|
| 687 |
The ILS module defines a basic portability layer between the SIP |
| 688 |
server and the rest of the integrated library system. It is the |
| 689 |
responsibility of the ILS vendor to implement the functions |
| 690 |
defined by this interface. This allows the SIP server to be |
| 691 |
reasonably portable between ILS systems (of course, we won't know |
| 692 |
exactly I<how> portable the interface is until it's been used by |
| 693 |
a second ILS. |
| 694 |
|
| 695 |
Because no business logic is embedded in the SIP server code |
| 696 |
itself, the SIP protocol handler functions do almost nothing |
| 697 |
except decode the network messages and pass the parameters to the |
| 698 |
ILS module or one of its submodules, C<ILS::Patron> and |
| 699 |
C<ILS::Item>. The SIP protocol query messages (Patron |
| 700 |
Information, or Item Status, for example), are implemented within |
| 701 |
the SIP server code by fetching a Patron, or Item, record and |
| 702 |
then retrieving the relevant information from that record. See |
| 703 |
L<ILS::Patron> and L<ILS::Item> for the details. |
| 704 |
|
| 705 |
=head1 INITIALIZATION |
| 706 |
|
| 707 |
The first thing the SIP server does, after a terminal has |
| 708 |
successfully logged in, is initialize the ILS module by calling |
| 709 |
|
| 710 |
$ils = new ILS $institution |
| 711 |
|
| 712 |
where C<$institution> is a hash ( institution => 'Foo Public Library' ) |
| 713 |
describing the institution to which the terminal belongs. |
| 714 |
In general, this will be the single institution that the ILS supports, |
| 715 |
but it may be that in a consortial setting, the SIP server may support |
| 716 |
connecting to different ILSs based on the C<$institution> of the terminal. |
| 717 |
|
| 718 |
=head1 BASIC OBJECT ACCESS AND PROTOCOL SUPPORT |
| 719 |
|
| 720 |
The C<$ils> object supports a small set of simple access methods |
| 721 |
and methods that allow the SIP server to determine if certain |
| 722 |
protocol operations are permitted to the remote terminals. |
| 723 |
|
| 724 |
=head2 C<$inst_name = $self-E<gt>institution;> |
| 725 |
|
| 726 |
Returns the institution ID as a string, suitable for |
| 727 |
incorporating into a SIP response message. |
| 728 |
|
| 729 |
=head2 C<$bool = $self-E<gt>support($operation);> |
| 730 |
|
| 731 |
Reports whether this ILS implementation supports certain |
| 732 |
operations that are necessary to report information to the SIP |
| 733 |
terminal. The argument C<$operation> is a string from this list: |
| 734 |
|
| 735 |
=over |
| 736 |
|
| 737 |
=item C<'magnetic media'> |
| 738 |
|
| 739 |
Can the ILS properly report whether an item is (or contains) |
| 740 |
magnetic media, such as a videotape or a book with a floppy disk? |
| 741 |
|
| 742 |
=item C<'security inhibit'> |
| 743 |
|
| 744 |
Is the ILS capable of directing the terminal to ignore the |
| 745 |
security status of an item? |
| 746 |
|
| 747 |
=item C<'offline operation'> |
| 748 |
|
| 749 |
Does the ILS allow self-check units to operate when unconnected |
| 750 |
to the ILS? That is, can a self-check unit check out items to |
| 751 |
patrons without checking the status of the items and patrons in |
| 752 |
real time? |
| 753 |
|
| 754 |
=back |
| 755 |
|
| 756 |
=head2 C<$bool = $self-E<gt>checkout_ok;> |
| 757 |
|
| 758 |
Are the self service terminals permitted to check items out to |
| 759 |
patrons? |
| 760 |
|
| 761 |
=head2 C<$bool = $self-E<gt>checkin_ok;> |
| 762 |
|
| 763 |
Are the self service terminals permitted to check items in? |
| 764 |
|
| 765 |
=head2 C<$bool = $self-E<gt>status_update_ok;> |
| 766 |
|
| 767 |
Are the self service terminals permitted to update patron status |
| 768 |
information. For example, can terminals block patrons? |
| 769 |
|
| 770 |
=head2 C<$bool = $self-E<gt>offline_ok>; |
| 771 |
|
| 772 |
Are the self service terminals permitted to operate off-line. |
| 773 |
That is, can they perform their core self service operations when |
| 774 |
not in communication with the ILS? |
| 775 |
|
| 776 |
=head1 THE TRANSACTIONS |
| 777 |
|
| 778 |
In general, every protocol transaction that changes the status of |
| 779 |
some ILS object (Patron or Item) has a corresponding C<ILS> |
| 780 |
method. Operations like C<Check In>, which are a function of |
| 781 |
both a patron and an item are C<ILS> functions, while others, |
| 782 |
like C<Patron Status> or C<Item Status>, which only depend on one |
| 783 |
type of object, are methods of the corresponding sub-module. |
| 784 |
|
| 785 |
In the stub implementation provided with the SIP system, the |
| 786 |
C<$status> objects returned by the various C<ILS> transactions |
| 787 |
are objects that are subclasses of a virtual C<ILS::Transaction> |
| 788 |
object, but this is not required of the SIP code, as long as the |
| 789 |
status objects support the appropriate methods. |
| 790 |
|
| 791 |
=head2 CORE TRANSACTION STATUS METHODS |
| 792 |
|
| 793 |
The C<$status> objects returned by all transactions must support |
| 794 |
the following common methods: |
| 795 |
|
| 796 |
=over |
| 797 |
|
| 798 |
=item C<ok> |
| 799 |
|
| 800 |
Returns C<true> if the transaction was successful and C<false> if |
| 801 |
not. Other methods can be used to find out what went wrong. |
| 802 |
|
| 803 |
=item C<item> |
| 804 |
|
| 805 |
Returns an C<ILS::Item> object corresponding to the item with the |
| 806 |
barcode C<$item_id>, or C<undef> if the barcode is invalid. |
| 807 |
|
| 808 |
=item C<patron> |
| 809 |
|
| 810 |
Returns a C<ILS::Patron> object corresponding to the patron with |
| 811 |
the barcode C<$patron_id>, or C<undef> if the barcode is invalid |
| 812 |
(ie, nonexistent, as opposed to "expired" or "delinquent"). |
| 813 |
|
| 814 |
=item C<screen_msg> |
| 815 |
|
| 816 |
Optional. Returns a message that is to be displayed on the |
| 817 |
terminal's screen. Some self service terminals read the value of |
| 818 |
this string and act based on it. The configuration of the |
| 819 |
terminal, and the ILS implementation of this method will have to |
| 820 |
be coordinated. |
| 821 |
|
| 822 |
=item C<print_line> |
| 823 |
|
| 824 |
Optional. Returns a message that is to be printed on the |
| 825 |
terminal's receipt printer. This message is distinct from the |
| 826 |
basic transactional information that the terminal will be |
| 827 |
printing anyway (such as, the basic checkout information like the |
| 828 |
title and due date). |
| 829 |
|
| 830 |
=back |
| 831 |
|
| 832 |
=head2 C<$status = $ils-E<gt>checkout($patron_id, $item_id, $sc_renew)> |
| 833 |
|
| 834 |
Check out (or possibly renew) item with barcode C<$item_id> to |
| 835 |
the patron with barcode C<$patron_id>. If C<$sc_renew> is true, |
| 836 |
then the self-check terminal has been configured to allow |
| 837 |
self-renewal of items, and the ILS may take this into account |
| 838 |
when deciding how to handle the case where C<$item_id> is already |
| 839 |
checked out to C<$patron_id>. |
| 840 |
|
| 841 |
The C<$status> object returned by C<checkout> must support the |
| 842 |
following methods: |
| 843 |
|
| 844 |
=over |
| 845 |
|
| 846 |
=item C<renewal_ok> |
| 847 |
|
| 848 |
Is this transaction actually a renewal? That is, did C<$patron_id> |
| 849 |
already have C<$item_id> checked out? |
| 850 |
|
| 851 |
=item C<desensitize> |
| 852 |
|
| 853 |
Should the terminal desensitize the item? This will be false for |
| 854 |
magnetic media, like videocassettes, and for "in library" items |
| 855 |
that are checked out to the patron, but not permitted to leave the |
| 856 |
building. |
| 857 |
|
| 858 |
=item C<security_inhibit> |
| 859 |
|
| 860 |
Should self checkout unit ignore the security status of this |
| 861 |
item? |
| 862 |
|
| 863 |
This method will only be used if |
| 864 |
|
| 865 |
$ils->supports('security inhibit') |
| 866 |
|
| 867 |
returns C<true>. |
| 868 |
|
| 869 |
=item C<fee_amount> |
| 870 |
|
| 871 |
If there is a fee associated with the use of C<$item_id>, then |
| 872 |
this method should return the amount of the fee, otherwise it |
| 873 |
should return zero. See also the C<sip_currency> and |
| 874 |
C<sip_fee_type> methods. |
| 875 |
|
| 876 |
=item C<sip_currency> |
| 877 |
|
| 878 |
The ISO currency code for the currency in which the fee |
| 879 |
associated with this item is denominated. For example, 'USD' or |
| 880 |
'CAD'. |
| 881 |
|
| 882 |
=item C<sip_fee_type> |
| 883 |
|
| 884 |
A code indicating the type of fee associated with this item. See |
| 885 |
the table in the protocol specification for the complete list of |
| 886 |
standard values that this function can return. |
| 887 |
|
| 888 |
=back |
| 889 |
|
| 890 |
=head2 C<$status = $ils-E<gt>checkin($item_id, $trans_date, $return_date, $current_loc, $item_props, $cancel)> |
| 891 |
|
| 892 |
Check in item identified by barcode C<$item_id>. This |
| 893 |
transaction took place at time C<$trans_date> and was effective |
| 894 |
C<$return_date> (to allow for backdating of items to when the |
| 895 |
branch closed, for example). The self check unit which received |
| 896 |
the item is located at C<$current_loc>, and the item has |
| 897 |
properties C<$item_props>. The parameters C<$current_loc> and |
| 898 |
C<$item_props> are opaque strings passed from the self service |
| 899 |
unit to the ILS untranslated. The configuration of the terminal, |
| 900 |
and the ILS implementation of this method will have to be |
| 901 |
coordinated. |
| 902 |
|
| 903 |
The C<$status> object returned by the C<checkin> operation must |
| 904 |
support the following methods: |
| 905 |
|
| 906 |
=over |
| 907 |
|
| 908 |
=item C<resensitize> |
| 909 |
|
| 910 |
Does the item need to be resensitized by the self check unit? |
| 911 |
|
| 912 |
=item C<alert> |
| 913 |
|
| 914 |
Should the self check unit generate an audible alert to notify |
| 915 |
staff that the item has been returned? |
| 916 |
|
| 917 |
=item C<sort_bin> |
| 918 |
|
| 919 |
Certain self checkin units provide for automated sorting of the |
| 920 |
returned items. This function returns the bin number into which |
| 921 |
the received item should be placed. This function may return the |
| 922 |
empty string, or C<undef>, to indicate that no sort bin has been |
| 923 |
specified. |
| 924 |
|
| 925 |
=back |
| 926 |
|
| 927 |
=head2 C<($status, $screen_msg, $print_line) = $ils-E<gt>end_patron_session($patron_id)> |
| 928 |
|
| 929 |
This function informs the ILS that the current patron's session |
| 930 |
has ended. This allows the ILS to free up any internal state |
| 931 |
that it may be preserving between messages from the self check |
| 932 |
unit. The function returns a boolean C<$status>, where C<true> |
| 933 |
indicates success, and two strings: a screen message to display |
| 934 |
on the self check unit's console, and a print line to be printed |
| 935 |
on the unit's receipt printer. |
| 936 |
|
| 937 |
=head2 C<$status = $ils-E<gt>pay_fee($patron_id, $patron_pwd, $fee_amt, $fee_type, $pay_type, $fee_id, $trans_id, $currency)> |
| 938 |
|
| 939 |
Reports that the self check terminal handled fee payment from |
| 940 |
patron C<$patron_id> (who has password C<$patron_pwd>, which is |
| 941 |
an optional parameter). The other parameters are: |
| 942 |
|
| 943 |
=over |
| 944 |
|
| 945 |
=item C<$fee_amt> |
| 946 |
|
| 947 |
The amount of the fee. |
| 948 |
|
| 949 |
=item C<$fee_type> |
| 950 |
|
| 951 |
The type of fee, according a table in the SIP protocol |
| 952 |
specification. |
| 953 |
|
| 954 |
=item C<$pay_type> |
| 955 |
|
| 956 |
The payment method. Defined in the SIP protocol specification. |
| 957 |
|
| 958 |
=item C<$fee_id> |
| 959 |
|
| 960 |
Optional. Identifies which particular fee was paid. This |
| 961 |
identifier would have been sent from the ILS to the Self Check |
| 962 |
unit by a previous "Patron Information Response" message. |
| 963 |
|
| 964 |
=item C<$trans_id> |
| 965 |
|
| 966 |
Optional. A transaction identifier set by the payment device. |
| 967 |
This should be recorded by the ILS for financial tracking |
| 968 |
purposes. |
| 969 |
|
| 970 |
=item C<$currency> |
| 971 |
|
| 972 |
An ISO currency code indicating the currency in which the fee was |
| 973 |
paid. |
| 974 |
|
| 975 |
=back |
| 976 |
|
| 977 |
The status object returned by the C<pay_fee> must support the |
| 978 |
following methods: |
| 979 |
|
| 980 |
=over |
| 981 |
|
| 982 |
=item C<transaction_id> |
| 983 |
|
| 984 |
Transaction identifier of the transaction. This parallels the |
| 985 |
optional C<$trans_id> sent from the terminal to the ILS. This |
| 986 |
may return an empty string. |
| 987 |
|
| 988 |
=back |
| 989 |
|
| 990 |
=head2 C<$status = $ils-E<gt>add_hold($patron_id, $patron_pwd, $item_id, $title_id, $expiry_date, $pickup_locn, $hold_type, $fee_ack);> |
| 991 |
|
| 992 |
Places a hold for C<$patron_id> (optionally, with password |
| 993 |
C<$patron_pwd>) on the item described by either C<$item_id> or |
| 994 |
C<$title_id>. The other parameters are: |
| 995 |
|
| 996 |
=over |
| 997 |
|
| 998 |
=item C<$expiry_date> |
| 999 |
|
| 1000 |
The date on which the hold should be cancelled. This date is a |
| 1001 |
SIP protocol standard format timestamp: |
| 1002 |
|
| 1003 |
YYYYMMDDZZZZHHMMSS |
| 1004 |
|
| 1005 |
where the 'Z' characters indicate spaces. |
| 1006 |
|
| 1007 |
=item C<$pickup_location> |
| 1008 |
|
| 1009 |
The location at which the patron wishes to pick up the item when |
| 1010 |
it's available. The configuration of the terminal, and the ILS |
| 1011 |
implementation of this parameter will have to be coordinated. |
| 1012 |
|
| 1013 |
=item C<$hold_type> |
| 1014 |
|
| 1015 |
The type of hold being placed: any copy, a specific copy, any |
| 1016 |
copy from a particular branch or location. See the SIP protocol |
| 1017 |
specification for the exact values that this parameter might |
| 1018 |
take. |
| 1019 |
|
| 1020 |
=item C<$fee_ack> |
| 1021 |
|
| 1022 |
Boolean. If true, the patron has acknowleged that she is willing |
| 1023 |
to pay the fee associated with placing a hold on this item. If |
| 1024 |
C<$fee_ack> is false, then the ILS should refuse to place the |
| 1025 |
hold. |
| 1026 |
|
| 1027 |
=back |
| 1028 |
|
| 1029 |
=head2 C<$status = $ils-E<gt>cancel_hold($patron_id, $patron_pwd, $item_id, $title_id);> |
| 1030 |
|
| 1031 |
Cancel a hold placed by C<$patron_id> for the item identified by |
| 1032 |
C<$item_id> or C<$title_id>. The patron password C<$patron_pwd> |
| 1033 |
may be C<undef>, if it was not provided by the terminal. |
| 1034 |
|
| 1035 |
=head2 C<$status = $ils-E<gt>alter_hold($patron_id, $patron_pwd, $item_id, $title_id, $expiry_date, $pickup_locn, $hold_type, $fee_ack);> |
| 1036 |
|
| 1037 |
The C<$status> object returned by C<$ils-E<gt>add_hold>, |
| 1038 |
C<$ils-E<gt>cancel_hold>, and C<$ils-E<gt>alter_hold> must all |
| 1039 |
support the same methods: |
| 1040 |
|
| 1041 |
=over |
| 1042 |
|
| 1043 |
=item C<expiration_date> |
| 1044 |
|
| 1045 |
Returns the expiry date for the placed hold, in seconds since the |
| 1046 |
epoch. |
| 1047 |
|
| 1048 |
=item C<queue_position> |
| 1049 |
|
| 1050 |
Returns the new hold's place in the queue of outstanding holds. |
| 1051 |
|
| 1052 |
=item C<pickup_location> |
| 1053 |
|
| 1054 |
Returns the location code for the pickup location. |
| 1055 |
|
| 1056 |
=back |
| 1057 |
|
| 1058 |
=head2 C<$status = $ils-E<gt>renew($patron_id, $patron_pwd, $item_id, $title_id, $no_block, $nb_due_date, $third_party, $item_props, $fee_ack);> |
| 1059 |
|
| 1060 |
Renew the item identified by C<$item_id> or C<$title_id>, as |
| 1061 |
requested by C<$patron_id> (with password C<$patron_pwd>). The |
| 1062 |
item has the properties C<$item_props> associated with it. |
| 1063 |
|
| 1064 |
If the patron renewed the item while the terminal was |
| 1065 |
disconnected from the net, then it is a C<$no_block> transaction, |
| 1066 |
and the due date assigned by the terminal, and reported to the |
| 1067 |
patron was C<$nb_due_date> (so we have to honor it). |
| 1068 |
|
| 1069 |
If there is a fee associated with renewing the item, and the |
| 1070 |
patron has agreed to pay the fee, then C<$fee_ack> will be |
| 1071 |
C<'Y'>. |
| 1072 |
|
| 1073 |
If C<$third_party> is C<'Y'> and the book is not checked out to |
| 1074 |
C<$patron_id>, but to some other person, then this is a |
| 1075 |
third-party renewal; the item should be renewed for the person to |
| 1076 |
whom it is checked out, rather than checking it out to |
| 1077 |
C<$patron_id>, or the renewal should fail. |
| 1078 |
|
| 1079 |
The C<$status> object returned by C<$ils-E<gt>renew> must support |
| 1080 |
the following methods: |
| 1081 |
|
| 1082 |
=over |
| 1083 |
|
| 1084 |
=item C<renewal_ok> |
| 1085 |
|
| 1086 |
Boolean. If C<renewal_ok> is true, then the item was already |
| 1087 |
checked out to the patron, so it is being renewed. If |
| 1088 |
C<renewal_ok> is false, then the patron did not already have the |
| 1089 |
item checked out. |
| 1090 |
|
| 1091 |
NOTE: HOW IS THIS USED IN PRACTICE? |
| 1092 |
|
| 1093 |
=item C<desensitize>, C<security_inhibit>, C<fee_amount>, C<sip_currency>, C<sip_fee_type>, C<transaction_id> |
| 1094 |
|
| 1095 |
See C<$ils-E<gt>checkout> for these methods. |
| 1096 |
|
| 1097 |
=back |
| 1098 |
|
| 1099 |
=head2 C<$status = $ils-E<gt>renew_all($patron_id, $patron_pwd, $fee_ack);> |
| 1100 |
|
| 1101 |
Renew all items checked out by C<$patron_id> (with password |
| 1102 |
C<$patron_pwd>). If the patron has agreed to pay any fees |
| 1103 |
associated with this transaction, then C<$fee_ack> will be |
| 1104 |
C<'Y'>. |
| 1105 |
|
| 1106 |
The C<$status> object must support the following methods: |
| 1107 |
|
| 1108 |
=over |
| 1109 |
|
| 1110 |
=item C<renewed> |
| 1111 |
|
| 1112 |
Returns a list of the C<$item_id>s of the items that were renewed. |
| 1113 |
|
| 1114 |
=item C<unrenewed> |
| 1115 |
|
| 1116 |
Returns a list of the C<$item_id>s of the items that were not renewed. |
| 1117 |
|
| 1118 |
=item C<new> |
| 1119 |
|
| 1120 |
Missing POD for new. |
| 1121 |
|
| 1122 |
=item C<find_patron> |
| 1123 |
|
| 1124 |
Missing POD for find_patron. |
| 1125 |
|
| 1126 |
=item C<institution> |
| 1127 |
|
| 1128 |
Missing POD for institution. |
| 1129 |
|
| 1130 |
=item C<institution_id> |
| 1131 |
|
| 1132 |
Missing POD for institution_id. |
| 1133 |
|
| 1134 |
=item C<supports> |
| 1135 |
|
| 1136 |
Missing POD for supports. |
| 1137 |
|
| 1138 |
=item C<check_inst_id> |
| 1139 |
|
| 1140 |
Missing POD for check_inst_id. |
| 1141 |
|
| 1142 |
=item C<find_item> |
| 1143 |
|
| 1144 |
Missing POD for find_item. |
| 1145 |
|
| 1146 |
=item C<test_cardnumber_compare> |
| 1147 |
|
| 1148 |
Missing POD for test_cardnumber_compare. |
| 1149 |
|
| 1150 |
=item C<to_bool> |
| 1151 |
|
| 1152 |
Missing POD for to_bool. |
| 1153 |
|
| 1154 |
=back |