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 33-38 properties: Link Here
33
    type:
33
    type:
34
      - object
34
      - object
35
      - "null"
35
      - "null"
36
  pickup_library_id:
37
    description: Internal pickup_library identifier
38
    type: string
39
  pickup_library:
40
    description: Embedable pickup_library representation
41
    type:
42
      - object
43
      - "null"
36
  start_date:
44
  start_date:
37
    description: Start date and time of this booking
45
    description: Start date and time of this booking
38
    format: date-time
46
    format: date-time
Lines 41-46 required: Link Here
41
  - biblio_id
49
  - biblio_id
42
  - item_id
50
  - item_id
43
  - patron_id
51
  - patron_id
52
  - pickup_library_id
44
  - start_date
53
  - start_date
45
  - end_date
54
  - end_date
46
type: object
55
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 786-792 Link Here
786
                - integer
788
                - integer
787
                - "null"
789
                - "null"
788
          required:
790
          required:
789
              - rating
791
            - rating
790
          additionalProperties: false
792
          additionalProperties: false
791
    produces:
793
    produces:
792
      - application/json
794
      - 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 117-123 Link Here
117
      permissions:
118
      permissions:
118
        circulate: manage_bookings
119
        circulate: manage_bookings
119
    x-mojo-to: Bookings#add
120
    x-mojo-to: Bookings#add
120
'/bookings/{booking_id}':
121
"/bookings/{booking_id}":
121
  delete:
122
  delete:
122
    operationId: deleteBooking
123
    operationId: deleteBooking
123
    parameters:
124
    parameters:
124
- 

Return to bug 36120