Commit Graph

4 Commits

Author SHA1 Message Date
Josef Moravec 701aec8443
Bug 13895: Adapt naming according to voted RFC
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a142369b30)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-04-01 15:02:00 +01:00
Josef Moravec 0a1b3d1084
Bug 13895: (follow-up) Adapt checkout endpoint to openapi, update terminology
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 1dfb57164f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-04-01 15:01:58 +01:00
Tomas Cohen Arazi 34dba63bfe
Bug 13895: (QA follow-up) Adjust OpenAPI definitions for checkouts
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b63fd774c1)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-04-01 15:01:58 +01:00
Julian Maurice b37bb2bbad
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 e3f2e346f8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-04-01 15:01:55 +01:00