Lines 48-59
use base qw(Koha::Object);
Link Here
|
48 |
|
48 |
|
49 |
=head1 NAME |
49 |
=head1 NAME |
50 |
|
50 |
|
51 |
Koha::ILL::Request - Koha Illrequest Object class |
51 |
Koha::ILL::Request - Koha ILL request Object class |
52 |
|
52 |
|
53 |
=head1 (Re)Design |
53 |
=head1 (Re)Design |
54 |
|
54 |
|
55 |
An ILLRequest consists of two parts; the ILL::Request Koha::Object, and a series |
55 |
An ILL request consists of two parts; the Koha::ILL::Request Koha::Object, and a series |
56 |
of related Illrequestattributes. |
56 |
of related Koha::ILL::Request::Attributes. |
57 |
|
57 |
|
58 |
The former encapsulates the basic necessary information that any ILL requires |
58 |
The former encapsulates the basic necessary information that any ILL requires |
59 |
to be usable in Koha. The latter is a set of additional properties used by |
59 |
to be usable in Koha. The latter is a set of additional properties used by |
Lines 104-114
An interface request has determined branch address details are incomplete.
Link Here
|
104 |
=item * cancel_success |
104 |
=item * cancel_success |
105 |
|
105 |
|
106 |
The interface's cancel_request method was successful in cancelling the |
106 |
The interface's cancel_request method was successful in cancelling the |
107 |
Illrequest using the API. |
107 |
ILL request using the API. |
108 |
|
108 |
|
109 |
=item * cancel_fail |
109 |
=item * cancel_fail |
110 |
|
110 |
|
111 |
The interface's cancel_request method failed to cancel the Illrequest using |
111 |
The interface's cancel_request method failed to cancel the ILL request using |
112 |
the API. |
112 |
the API. |
113 |
|
113 |
|
114 |
=item * unavailable |
114 |
=item * unavailable |
Lines 287-293
sub extended_attributes {
Link Here
|
287 |
|
287 |
|
288 |
=head3 status_alias |
288 |
=head3 status_alias |
289 |
|
289 |
|
290 |
$Illrequest->status_alias(143); |
290 |
$request->status_alias(143); |
291 |
|
291 |
|
292 |
Overloaded getter/setter for status_alias, |
292 |
Overloaded getter/setter for status_alias, |
293 |
that only returns authorised values from the |
293 |
that only returns authorised values from the |
Lines 348-354
sub status_alias {
Link Here
|
348 |
|
348 |
|
349 |
=head3 status |
349 |
=head3 status |
350 |
|
350 |
|
351 |
$Illrequest->status('CANREQ'); |
351 |
$request->status('CANREQ'); |
352 |
|
352 |
|
353 |
Overloaded getter/setter for request status, |
353 |
Overloaded getter/setter for request status, |
354 |
also nullifies status_alias and records the fact that the status has changed |
354 |
also nullifies status_alias and records the fact that the status has changed |
Lines 930-936
sub backend_update_status {
Link Here
|
930 |
|
930 |
|
931 |
=head3 backend_cancel |
931 |
=head3 backend_cancel |
932 |
|
932 |
|
933 |
my $ILLResponse = $illRequest->backend_cancel; |
933 |
my $ILLResponse = $request->backend_cancel; |
934 |
|
934 |
|
935 |
The standard interface method allowing for request cancellation. |
935 |
The standard interface method allowing for request cancellation. |
936 |
|
936 |
|
Lines 949-955
sub backend_cancel {
Link Here
|
949 |
|
949 |
|
950 |
=head3 backend_renew |
950 |
=head3 backend_renew |
951 |
|
951 |
|
952 |
my $renew_response = $illRequest->backend_renew; |
952 |
my $renew_response = $request->backend_renew; |
953 |
|
953 |
|
954 |
The standard interface method allowing for request renewal queries. |
954 |
The standard interface method allowing for request renewal queries. |
955 |
|
955 |
|
Lines 1165-1175
sub get_type {
Link Here
|
1165 |
return $attr->value; |
1165 |
return $attr->value; |
1166 |
}; |
1166 |
}; |
1167 |
|
1167 |
|
1168 |
#### Illrequests Imports |
|
|
1169 |
|
1170 |
=head3 check_limits |
1168 |
=head3 check_limits |
1171 |
|
1169 |
|
1172 |
my $ok = $illRequests->check_limits( { |
1170 |
my $ok = $requests->check_limits( { |
1173 |
borrower => $borrower, |
1171 |
borrower => $borrower, |
1174 |
branchcode => 'branchcode' | undef, |
1172 |
branchcode => 'branchcode' | undef, |
1175 |
} ); |
1173 |
} ); |
Lines 1250-1256
sub _limit_counter {
Link Here
|
1250 |
|
1248 |
|
1251 |
=head3 requires_moderation |
1249 |
=head3 requires_moderation |
1252 |
|
1250 |
|
1253 |
my $status = $illRequest->requires_moderation; |
1251 |
my $status = $request->requires_moderation; |
1254 |
|
1252 |
|
1255 |
Return the name of the status if moderation by staff is required; or 0 |
1253 |
Return the name of the status if moderation by staff is required; or 0 |
1256 |
otherwise. |
1254 |
otherwise. |
Lines 1483-1489
sub check_out {
Link Here
|
1483 |
|
1481 |
|
1484 |
=head3 generic_confirm |
1482 |
=head3 generic_confirm |
1485 |
|
1483 |
|
1486 |
my $stage_summary = $illRequest->generic_confirm; |
1484 |
my $stage_summary = $request->generic_confirm; |
1487 |
|
1485 |
|
1488 |
Handle the generic_confirm extended method. The first stage involves creating |
1486 |
Handle the generic_confirm extended method. The first stage involves creating |
1489 |
a template email for the end user to edit in the browser. The second stage |
1487 |
a template email for the end user to edit in the browser. The second stage |
Lines 1848-1854
sub append_to_note {
Link Here
|
1848 |
|
1846 |
|
1849 |
my $prefix = $record->id_prefix; |
1847 |
my $prefix = $record->id_prefix; |
1850 |
|
1848 |
|
1851 |
Return the prefix appropriate for the current Illrequest as derived from the |
1849 |
Return the prefix appropriate for the current ILL request as derived from the |
1852 |
borrower and branch associated with this request's Status, and the config |
1850 |
borrower and branch associated with this request's Status, and the config |
1853 |
file. |
1851 |
file. |
1854 |
|
1852 |
|
Lines 1865-1871
sub id_prefix {
Link Here
|
1865 |
|
1863 |
|
1866 |
=head3 _censor |
1864 |
=head3 _censor |
1867 |
|
1865 |
|
1868 |
my $params = $illRequest->_censor($params); |
1866 |
my $params = $request->_censor($params); |
1869 |
|
1867 |
|
1870 |
Return $params, modified to reflect our censorship requirements. |
1868 |
Return $params, modified to reflect our censorship requirements. |
1871 |
|
1869 |
|
Lines 1883-1889
sub _censor {
Link Here
|
1883 |
|
1881 |
|
1884 |
=head3 store |
1882 |
=head3 store |
1885 |
|
1883 |
|
1886 |
$Illrequest->store; |
1884 |
$request->store; |
1887 |
|
1885 |
|
1888 |
Overloaded I<store> method that, in addition to performing the 'store', |
1886 |
Overloaded I<store> method that, in addition to performing the 'store', |
1889 |
possibly records the fact that something happened |
1887 |
possibly records the fact that something happened |
Lines 1931-1937
sub store {
Link Here
|
1931 |
|
1929 |
|
1932 |
=head3 requested_partners |
1930 |
=head3 requested_partners |
1933 |
|
1931 |
|
1934 |
my $partners_string = $illRequest->requested_partners; |
1932 |
my $partners_string = $request->requested_partners; |
1935 |
|
1933 |
|
1936 |
Return the string representing the email addresses of the partners to |
1934 |
Return the string representing the email addresses of the partners to |
1937 |
whom a request has been sent |
1935 |
whom a request has been sent |
Lines 1948-1954
sub requested_partners {
Link Here
|
1948 |
|
1946 |
|
1949 |
=head3 TO_JSON |
1947 |
=head3 TO_JSON |
1950 |
|
1948 |
|
1951 |
$json = $illrequest->TO_JSON |
1949 |
$json = $request->TO_JSON |
1952 |
|
1950 |
|
1953 |
Overloaded I<TO_JSON> method that takes care of inserting calculated values |
1951 |
Overloaded I<TO_JSON> method that takes care of inserting calculated values |
1954 |
into the unblessed representation of the object. |
1952 |
into the unblessed representation of the object. |
1955 |
- |
|
|