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 300-305 Link Here
300
          enum:
300
          enum:
301
            - item
301
            - item
302
            - patron
302
            - patron
303
            - pickup_library
303
        collectionFormat: csv
304
        collectionFormat: csv
304
    consumes:
305
    consumes:
305
      - application/json
306
      - application/json
Lines 373-379 Link Here
373
        collectionFormat: csv
374
        collectionFormat: csv
374
      - name: checked_in
375
      - name: checked_in
375
        in: query
376
        in: query
376
        description: By default, current checkouts are returned, when this is true then
377
        description:
378
          By default, current checkouts are returned, when this is true then
377
          checked in checkouts are returned as result.
379
          checked in checkouts are returned as result.
378
        type: boolean
380
        type: boolean
379
    produces:
381
    produces:
Lines 812-818 Link Here
812
                - integer
814
                - integer
813
                - "null"
815
                - "null"
814
          required:
816
          required:
815
              - rating
817
            - rating
816
          additionalProperties: false
818
          additionalProperties: false
817
    produces:
819
    produces:
818
      - application/json
820
      - 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