]> git.koha-community.org Git - koha.git/commit
Bug 13895: Add API routes for checkouts retrieval and renewal
authorJulian Maurice <julian.maurice@biblibre.com>
Mon, 23 Mar 2015 12:10:46 +0000 (13:10 +0100)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 1 Apr 2019 14:01:55 +0000 (15:01 +0100)
commitb37bb2bbada259602c4f66922bd673d4dbcc4438
tree85b544d8f075ebb1a5accfb9645a2b17a5361e26
parent16e250542de43eadf62bc9354329912be84c3420
Bug 13895: Add API routes for checkouts retrieval and renewal

GET /checkouts?borrowernumber={borrowernumber}
GET /checkouts/{checkout_id}
PUT /checkouts/{checkout_id}

+ unit tests in t/db_dependent/api/v1/checkouts.t

Test plan:
1. Open a browser tab on Koha staff and log in (to create CGISESSID
   cookie). You should have permission circulate_remaining_permissions.
2. Go to http://yourlibrary/api/v1/checkouts?borrowernumber=XXX (replace
   XXX with a borrowernumber that has checkouts) and check you receive
   correct data
3. Go to http://yourlibrary/api/v1/checkouts/YYY (replace YYY with an
   existing checkout id) and check you receive correct data
4. Send PUT requests to http://yourlibrary/api/v1/checkouts/YYY until
   the maximum number of renewals is reached (you should have a 403
   error)
5. Run unit tests in t/db_dependent/api/v1/checkouts.t

Depends on bugs 16699 and 14868

Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Signed-off-by: Lari Taskula <larit@student.uef.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e3f2e346f884e2ba6e4a8f43709955f776a259de)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Koha/REST/V1/Checkout.pm [new file with mode: 0644]
api/v1/swagger/definitions.json
api/v1/swagger/definitions/checkout.json [new file with mode: 0644]
api/v1/swagger/definitions/checkouts.json [new file with mode: 0644]
api/v1/swagger/parameters.json
api/v1/swagger/parameters/checkout.json [new file with mode: 0644]
api/v1/swagger/paths.json
api/v1/swagger/paths/checkouts.json [new file with mode: 0644]
t/db_dependent/api/v1/checkouts.t [new file with mode: 0644]