You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add capability to check out a copy of a book to a library member.
Details
Add a REST endpoint to checkout a book to a user: /book/{isbn}/checkout with a payload that has user ID and optionally a copy ID
Create a loan in DB linking member and copy of book
Book not found if book is not found
No copies available if no copies are available
Member not found if member is not found
Copy not available if specific copy is not available
Loan should have start date and expiry date
Duplicate checkout requests where a user already has a copy of a book does not checkout another copy, instead it will update the loan expiry date (i.e. renewal of loan)
Add configurable loan duration which is used in initial loan and when extending a loan
When a copy of a book is checked out, the number of available copies is updated in the book entity and shows when retrieved
Acceptance Criteria
API to checkout a book to a user exists: /book/{isbn}/checkout Request:
Summary
Add capability to check out a copy of a book to a library member.
Details
/book/{isbn}/checkout
with a payload that has user ID and optionally a copy IDAcceptance Criteria
/book/{isbn}/checkout
Request:
Response:
Related
#17
The text was updated successfully, but these errors were encountered: