Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions api_calls/reference/living_rooms/create-request.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"living_rooms": [
{
"bunk_beds_count": 0,
"double_beds_count": 1,
"kingsize_beds_count": 0,
"queensize_beds_count": 0,
"single_beds_count": 2,
"sofa_beds_count": 1
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"links": {
"living_rooms.rental": "https://www.bookingsync.com/api/v3/rentals/{living_rooms.rental}"
},
"living_rooms": [
{
"links": {
"rental": 1
},
"id": 1,
"bunk_beds_count": 0,
"double_beds_count": 1,
"kingsize_beds_count": 0,
"queensize_beds_count": 0,
"single_beds_count": 2,
"sofa_beds_count": 1,
"created_at": "CREATED_AT",
"updated_at": "UPDATED_AT"
}
]
}
12 changes: 12 additions & 0 deletions api_calls/reference/living_rooms/update-request.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"living_rooms": [
{
"bunk_beds_count": 0,
"double_beds_count": 1,
"kingsize_beds_count": 0,
"queensize_beds_count": 0,
"single_beds_count": 2,
"sofa_beds_count": 1
}
]
}
4 changes: 4 additions & 0 deletions content/reference/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 2016-11-25

* [api improvement] Add `living_rooms` endpoint.

## 2016-11-16

* [api improvement] Update `nightly_rate_maps` endpoint with partial update information.
Expand Down
99 changes: 99 additions & 0 deletions content/reference/endpoints/living_rooms.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# LivingRooms

1. TOC
{:toc}

### Parameters
<ul class="nav nav-pills" role="tablist">
<li class="disabled"><a>OAuth Scopes:</a></li>
<li class="active"><a href="#public" role="tab" data-toggle="pill">public</a></li>
<li><a href="#rentals_write" role="tab" data-toggle="pill">rentals_write</a></li>
</ul>
<div class="tab-content" markdown="1">
<div class="tab-pane active" id="public" markdown="1">
Name | Type | Read/Write | Description
--------------------|---------|------------|------------
id | Integer | Read | LivingRoom's id.
--------------------|---------|------------|------------
bunk_beds_count | Integer | Read | LivingRoom's number of bunk beds.
double_beds_count | Integer | Read | LivingRoom's number of double beds.
kingsize_beds_count | Integer | Read | LivingRoom's number of kingsize beds.
queensize_beds_count| Integer | Read | LivingRoom's number of queensize beds.
single_beds_count | Integer | Read | LivingRoom's number of single beds.
sofa_beds_count | Integer | Read | LivingRoom's number of sofa beds.
--------------------|---------|------------|------------
created_at | [Time](/reference/enums#formats) | Read | LivingRoom's create time.
updated_at | [Time](/reference/enums#formats) | Read | LivingRoom's update time.
{: class="table table-bordered"}
</div>
<div class="tab-pane" id="rentals_write" markdown="1">
Name | Type | Read/Write | Description
--------------------|---------|------------|------------
id | Integer | Read | LivingRoom's id.
--------------------|---------|------------|------------
bunk_beds_count | Integer | Read/Write | LivingRoom's number of bunk beds.
double_beds_count | Integer | Read/Write | LivingRoom's number of double beds.
kingsize_beds_count | Integer | Read/Write | LivingRoom's number of kingsize beds.
queensize_beds_count| Integer | Read/Write | LivingRoom's number of queensize beds.
single_beds_count | Integer | Read/Write | LivingRoom's number of single beds.
sofa_beds_count | Integer | Read/Write | LivingRoom's number of sofa beds.
--------------------|---------|------------|------------
created_at | [Time](/reference/enums#formats) | Read | LivingRoom's create time.
updated_at | [Time](/reference/enums#formats) | Read | LivingRoom's update time.
{: class="table table-bordered"}
</div>
</div>

## List living_rooms

List all living_rooms for given account.

~~~
GET /living_rooms
~~~

<%= render 'json_response', endpoint: "living_rooms",
scopes: [{ public: "public-rentals_write" }] %>

## Get a single living_room

Returns a single living_room identified by ID.

~~~
GET /living_rooms/:living_room_id
~~~

<%= render 'json_response', endpoint: "living_rooms",
scopes: [{ public: "public-rentals_write" }] %>

## Create a new living_room

Creates a living_room for given rental.

~~~
POST /rentals/:rental_id/living_rooms
~~~

<%= render 'json_response', endpoint: "living_rooms", request: "create",
scopes: [{ rentals_write: "public-rentals_write" }] %>

## Update a living_room

Returns an updated living_room identified by ID.

~~~
PUT /living_rooms/:living_room_id
~~~

<%= render 'json_response', endpoint: "living_rooms", request: "update",
scopes: [{ rentals_write: "public-rentals_write" }] %>

## Destroy a living_room

Required OAuth scope: `:rentals_write`

Returns an empty response with '204 No Content' status code on success.

~~~~~~
DELETE /living_rooms/:living_room_id
~~~~~~
2 changes: 2 additions & 0 deletions layouts/reference.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ <h3 class="panel-title">Endpoints</h3>
class: "list-group-item") %>
<%= link_to_with_current("Inquiries", "/reference/endpoints/inquiries/",
class: "list-group-item") %>
<%= link_to_with_current("Living Rooms", "/reference/endpoints/living_rooms/",
class: "list-group-item") %>
<%= link_to_with_current("Nightly Rate Maps", "/reference/endpoints/nightly_rate_maps/",
class: "list-group-item") %>
<%= link_to_with_current("Payments", "/reference/endpoints/payments/",
Expand Down