|
| 1 | +# Booking Comments |
| 2 | + |
| 3 | +1. TOC |
| 4 | +{:toc} |
| 5 | + |
| 6 | +### Parameters |
| 7 | +<ul class="nav nav-pills" role="tablist"> |
| 8 | + <li class="disabled"><a>OAuth Scopes:</a></li> |
| 9 | + <li class="active"><a href="#bookings_read" role="tab" data-toggle="pill">bookings_read</a></li> |
| 10 | + <li><a href="#bookings_write-bookings_write_owned" role="tab" data-toggle="pill"> |
| 11 | + bookings_write / bookings_write_owned |
| 12 | + </a></li> |
| 13 | +</ul> |
| 14 | +<div class="tab-content" markdown="1"> |
| 15 | + <div class="tab-pane active" id="bookings_read" markdown="1"> |
| 16 | +Name | Type | Read/Write | Description |
| 17 | +-----------------|---------|------------|------------ |
| 18 | +id | Integer | Read | Booking Comment's id. |
| 19 | +-----------------|---------|------------|------------ |
| 20 | +content | String | Read | Booking Comment's content. |
| 21 | +editable | Boolean | Read | Booking Comment can be edited if true is returned. |
| 22 | +-----------------|---------|------------|------------ |
| 23 | +created_at | [Time](/reference/enums#formats) | Read | Booking Comment's create time. |
| 24 | +updated_at | [Time](/reference/enums#formats) | Read | Booking Comment's update time. |
| 25 | +{: class="table table-bordered"} |
| 26 | + </div> |
| 27 | + <div class="tab-pane" id="bookings_write-bookings_write_owned" markdown="1"> |
| 28 | +Name | Type | Read/Write | Description |
| 29 | +-----------------|---------|------------|------------ |
| 30 | +id | Integer | Read | Booking Comment's id. |
| 31 | +booking_id | Integer | Write | **Required**. Booking id related to the Booking Comment. |
| 32 | +-----------------|---------|------------|------------ |
| 33 | +content | String | Read/Write | **Required**. Booking Comment's content. |
| 34 | +editable | Boolean | Read | Booking Comment can be edited if true is returned. |
| 35 | +-----------------|---------|------------|------------ |
| 36 | +created_at | [Time](/reference/enums#formats) | Read | Booking Comment's create time. |
| 37 | +updated_at | [Time](/reference/enums#formats) | Read | Booking Comment's update time. |
| 38 | +{: class="table table-bordered"} |
| 39 | + </div> |
| 40 | +</div> |
| 41 | + |
| 42 | +## List booking comments |
| 43 | + |
| 44 | +List all booking_comments for given account. |
| 45 | + |
| 46 | +~~~ |
| 47 | +GET /booking_comments |
| 48 | +~~~ |
| 49 | + |
| 50 | +<%= render 'json_response', endpoint: "booking_comments", |
| 51 | + scopes: %w(bookings_read bookings_write-bookings_write_owned) %> |
| 52 | + |
| 53 | +## Get a single booking comment |
| 54 | + |
| 55 | +Returns a single booking_comment identified by ID. |
| 56 | + |
| 57 | +~~~ |
| 58 | +GET /booking_comments/:booking_comment_id |
| 59 | +~~~ |
| 60 | + |
| 61 | +<%= render 'json_response', endpoint: "booking_comments", |
| 62 | + scopes: %w(bookings_read bookings_write-bookings_write_owned) %> |
| 63 | + |
| 64 | +## Create a new booking comment |
| 65 | + |
| 66 | +Creates a booking_comment for given season. |
| 67 | + |
| 68 | +~~~ |
| 69 | +POST /booking_comments |
| 70 | +~~~ |
| 71 | + |
| 72 | +<%= render 'json_response', endpoint: "booking_comments", request: "create", |
| 73 | + scopes: [{ "bookings_write-bookings_write_owned" => "bookings_write-bookings_write_owned" }] %> |
| 74 | + |
| 75 | +## Update a booking comment |
| 76 | + |
| 77 | +Returns an updated booking_comment identified by ID. |
| 78 | + |
| 79 | +~~~ |
| 80 | +PUT /booking_comments/:booking_comment_id |
| 81 | +~~~ |
| 82 | + |
| 83 | +<%= render 'json_response', endpoint: "booking_comments", request: "update", |
| 84 | + scopes: [{ "bookings_write-bookings_write_owned" => "bookings_write-bookings_write_owned" }] %> |
| 85 | + |
| 86 | +## Destroy a booking comment |
| 87 | + |
| 88 | +Required OAuth scope: `:bookings_write` or `:bookings_write_owned` |
| 89 | + |
| 90 | +Returns an empty response with '204 No Content' status code on success. |
| 91 | + |
| 92 | +~~~~~~ |
| 93 | +DELETE /booking_comments/:booking_comment_id |
| 94 | +~~~~~~ |
0 commit comments