View | Details | Raw Unified | Return to bug 35581
Collapse All | Expand All

(-)a/Koha/ILL/Request.pm (-20 / +17 lines)
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 929-935 sub backend_update_status { Link Here
929
929
930
=head3 backend_cancel
930
=head3 backend_cancel
931
931
932
    my $ILLResponse = $illRequest->backend_cancel;
932
    my $ILLResponse = $request->backend_cancel;
933
933
934
The standard interface method allowing for request cancellation.
934
The standard interface method allowing for request cancellation.
935
935
Lines 948-954 sub backend_cancel { Link Here
948
948
949
=head3 backend_renew
949
=head3 backend_renew
950
950
951
    my $renew_response = $illRequest->backend_renew;
951
    my $renew_response = $request->backend_renew;
952
952
953
The standard interface method allowing for request renewal queries.
953
The standard interface method allowing for request renewal queries.
954
954
Lines 1194-1204 sub get_type_disclaimer_date { Link Here
1194
    return $attr->value;
1194
    return $attr->value;
1195
}
1195
}
1196
1196
1197
#### Illrequests Imports
1198
1199
=head3 check_limits
1197
=head3 check_limits
1200
1198
1201
    my $ok = $illRequests->check_limits( {
1199
    my $ok = $requests->check_limits( {
1202
        borrower   => $borrower,
1200
        borrower   => $borrower,
1203
        branchcode => 'branchcode' | undef,
1201
        branchcode => 'branchcode' | undef,
1204
    } );
1202
    } );
Lines 1279-1285 sub _limit_counter { Link Here
1279
1277
1280
=head3 requires_moderation
1278
=head3 requires_moderation
1281
1279
1282
    my $status = $illRequest->requires_moderation;
1280
    my $status = $request->requires_moderation;
1283
1281
1284
Return the name of the status if moderation by staff is required; or 0
1282
Return the name of the status if moderation by staff is required; or 0
1285
otherwise.
1283
otherwise.
Lines 1512-1518 sub check_out { Link Here
1512
1510
1513
=head3 generic_confirm
1511
=head3 generic_confirm
1514
1512
1515
    my $stage_summary = $illRequest->generic_confirm;
1513
    my $stage_summary = $request->generic_confirm;
1516
1514
1517
Handle the generic_confirm extended method.  The first stage involves creating
1515
Handle the generic_confirm extended method.  The first stage involves creating
1518
a template email for the end user to edit in the browser.  The second stage
1516
a template email for the end user to edit in the browser.  The second stage
Lines 1877-1883 sub append_to_note { Link Here
1877
1875
1878
    my $prefix = $record->id_prefix;
1876
    my $prefix = $record->id_prefix;
1879
1877
1880
Return the prefix appropriate for the current Illrequest as derived from the
1878
Return the prefix appropriate for the current ILL request as derived from the
1881
borrower and branch associated with this request's Status, and the config
1879
borrower and branch associated with this request's Status, and the config
1882
file.
1880
file.
1883
1881
Lines 1894-1900 sub id_prefix { Link Here
1894
1892
1895
=head3 _censor
1893
=head3 _censor
1896
1894
1897
    my $params = $illRequest->_censor($params);
1895
    my $params = $request->_censor($params);
1898
1896
1899
Return $params, modified to reflect our censorship requirements.
1897
Return $params, modified to reflect our censorship requirements.
1900
1898
Lines 1912-1918 sub _censor { Link Here
1912
1910
1913
=head3 store
1911
=head3 store
1914
1912
1915
    $Illrequest->store;
1913
    $request->store;
1916
1914
1917
Overloaded I<store> method that, in addition to performing the 'store',
1915
Overloaded I<store> method that, in addition to performing the 'store',
1918
possibly records the fact that something happened
1916
possibly records the fact that something happened
Lines 1960-1966 sub store { Link Here
1960
1958
1961
=head3 requested_partners
1959
=head3 requested_partners
1962
1960
1963
    my $partners_string = $illRequest->requested_partners;
1961
    my $partners_string = $request->requested_partners;
1964
1962
1965
Return the string representing the email addresses of the partners to
1963
Return the string representing the email addresses of the partners to
1966
whom a request has been sent
1964
whom a request has been sent
Lines 1977-1983 sub requested_partners { Link Here
1977
1975
1978
=head3 TO_JSON
1976
=head3 TO_JSON
1979
1977
1980
    $json = $illrequest->TO_JSON
1978
    $json = $request->TO_JSON
1981
1979
1982
Overloaded I<TO_JSON> method that takes care of inserting calculated values
1980
Overloaded I<TO_JSON> method that takes care of inserting calculated values
1983
into the unblessed representation of the object.
1981
into the unblessed representation of the object.
1984
- 

Return to bug 35581