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

(-)a/Koha/Booking.pm (+13 lines)
Lines 58-63 sub patron { Link Here
58
    return Koha::Patron->_new_from_dbic($patron_rs);
58
    return Koha::Patron->_new_from_dbic($patron_rs);
59
}
59
}
60
60
61
=head3 pickup_library
62
63
Returns the related Koha::Library object for this booking
64
65
=cut
66
67
sub pickup_library {
68
    my ($self) = @_;
69
70
    my $pickup_library_rs = $self->_result->pickup_library;
71
    return Koha::Library->_new_from_dbic($pickup_library_rs);
72
}
73
61
=head3 item
74
=head3 item
62
75
63
Returns the related Koha::Item object for this Booking
76
Returns the related Koha::Item object for this Booking
(-)a/api/v1/swagger/definitions/booking.yaml (+9 lines)
Lines 32-37 properties: Link Here
32
    type:
32
    type:
33
      - object
33
      - object
34
      - "null"
34
      - "null"
35
  pickup_library_id:
36
    description: Internal pickup_library identifier
37
    type: string
38
  pickup_library:
39
    description: Embedable pickup_library representation
40
    type:
41
      - object
42
      - "null"
35
  start_date:
43
  start_date:
36
    description: Start date and time of this booking
44
    description: Start date and time of this booking
37
    format: date-time
45
    format: date-time
Lines 40-45 required: Link Here
40
  - biblio_id
48
  - biblio_id
41
  - item_id
49
  - item_id
42
  - patron_id
50
  - patron_id
51
  - pickup_library_id
43
  - start_date
52
  - start_date
44
  - end_date
53
  - end_date
45
type: object
54
type: object
(-)a/api/v1/swagger/paths/biblios.yaml (-2 / +4 lines)
Lines 299-304 Link Here
299
          enum:
299
          enum:
300
            - item
300
            - item
301
            - patron
301
            - patron
302
            - pickup_library
302
        collectionFormat: csv
303
        collectionFormat: csv
303
    consumes:
304
    consumes:
304
      - application/json
305
      - application/json
Lines 372-378 Link Here
372
        collectionFormat: csv
373
        collectionFormat: csv
373
      - name: checked_in
374
      - name: checked_in
374
        in: query
375
        in: query
375
        description: By default, current checkouts are returned, when this is true then
376
        description:
377
          By default, current checkouts are returned, when this is true then
376
          checked in checkouts are returned as result.
378
          checked in checkouts are returned as result.
377
        type: boolean
379
        type: boolean
378
    produces:
380
    produces:
Lines 787-793 Link Here
787
                - integer
789
                - integer
788
                - "null"
790
                - "null"
789
          required:
791
          required:
790
              - rating
792
            - rating
791
          additionalProperties: false
793
          additionalProperties: false
792
    produces:
794
    produces:
793
      - application/json
795
      - application/json
(-)a/api/v1/swagger/paths/bookings.yaml (-2 / +2 lines)
Lines 46-51 Link Here
46
            - biblio
46
            - biblio
47
            - item
47
            - item
48
            - patron
48
            - patron
49
            - pickup_library
49
        collectionFormat: csv
50
        collectionFormat: csv
50
    produces:
51
    produces:
51
      - application/json
52
      - application/json
Lines 121-127 Link Here
121
      permissions:
122
      permissions:
122
        circulate: manage_bookings
123
        circulate: manage_bookings
123
    x-mojo-to: Bookings#add
124
    x-mojo-to: Bookings#add
124
'/bookings/{booking_id}':
125
"/bookings/{booking_id}":
125
  delete:
126
  delete:
126
    operationId: deleteBooking
127
    operationId: deleteBooking
127
    parameters:
128
    parameters:
128
- 

Return to bug 36120