Bug 36120: Add pickup_library support to bookings API
Sponsored-by: Cuyahoga County Public Library Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
b3fa2506cd
commit
dadabbd924
4 changed files with 28 additions and 3 deletions
|
@ -58,6 +58,19 @@ sub patron {
|
|||
return Koha::Patron->_new_from_dbic($patron_rs);
|
||||
}
|
||||
|
||||
=head3 pickup_library
|
||||
|
||||
Returns the related Koha::Library object for this booking
|
||||
|
||||
=cut
|
||||
|
||||
sub pickup_library {
|
||||
my ($self) = @_;
|
||||
|
||||
my $pickup_library_rs = $self->_result->pickup_library;
|
||||
return Koha::Library->_new_from_dbic($pickup_library_rs);
|
||||
}
|
||||
|
||||
=head3 item
|
||||
|
||||
Returns the related Koha::Item object for this Booking
|
||||
|
|
|
@ -32,6 +32,14 @@ properties:
|
|||
type:
|
||||
- object
|
||||
- "null"
|
||||
pickup_library_id:
|
||||
description: Internal pickup_library identifier
|
||||
type: string
|
||||
pickup_library:
|
||||
description: Embedable pickup_library representation
|
||||
type:
|
||||
- object
|
||||
- "null"
|
||||
start_date:
|
||||
description: Start date and time of this booking
|
||||
format: date-time
|
||||
|
@ -40,6 +48,7 @@ required:
|
|||
- biblio_id
|
||||
- item_id
|
||||
- patron_id
|
||||
- pickup_library_id
|
||||
- start_date
|
||||
- end_date
|
||||
type: object
|
||||
|
|
|
@ -300,6 +300,7 @@
|
|||
enum:
|
||||
- item
|
||||
- patron
|
||||
- pickup_library
|
||||
collectionFormat: csv
|
||||
consumes:
|
||||
- application/json
|
||||
|
@ -373,7 +374,8 @@
|
|||
collectionFormat: csv
|
||||
- name: checked_in
|
||||
in: query
|
||||
description: By default, current checkouts are returned, when this is true then
|
||||
description:
|
||||
By default, current checkouts are returned, when this is true then
|
||||
checked in checkouts are returned as result.
|
||||
type: boolean
|
||||
produces:
|
||||
|
@ -812,7 +814,7 @@
|
|||
- integer
|
||||
- "null"
|
||||
required:
|
||||
- rating
|
||||
- rating
|
||||
additionalProperties: false
|
||||
produces:
|
||||
- application/json
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
- biblio
|
||||
- item
|
||||
- patron
|
||||
- pickup_library
|
||||
collectionFormat: csv
|
||||
produces:
|
||||
- application/json
|
||||
|
@ -121,7 +122,7 @@
|
|||
permissions:
|
||||
circulate: manage_bookings
|
||||
x-mojo-to: Bookings#add
|
||||
'/bookings/{booking_id}':
|
||||
"/bookings/{booking_id}":
|
||||
delete:
|
||||
operationId: deleteBooking
|
||||
parameters:
|
||||
|
|
Loading…
Reference in a new issue