Skip to content

Commit 2ea2c06

Browse files
authored
Merge pull request #360 from BookingSync/document-constraints-batch-7
Document constraints batch 7
2 parents a92d28f + 9f52c0e commit 2ea2c06

File tree

6 files changed

+121
-57
lines changed

6 files changed

+121
-57
lines changed

content/reference/endpoints/seasons.md

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
1. TOC
44
{:toc}
55

6+
## Overview
7+
8+
This resource represents Seasons which together with [Periods](/reference/endpoints/seasons/) define the time when the [Rates Rules](/reference/endpoints/rates_rules/) or [Rentals Fees](/reference/endpoints/rates_rules/) are applicable and provide a way to define seasonal pricing for the [Rentals](/reference/endpoints/rentals) (impacting price via `ratio_percentage` and minimum length of stay via `minimum_stay`).
9+
610
### Parameters
711
<ul class="nav nav-pills" role="tablist">
812
<li class="disabled"><a>OAuth Scopes:</a></li>
@@ -13,9 +17,14 @@
1317
<div class="tab-pane active" id="rates_read" markdown="1">
1418
Name | Type | Read/Write | Description
1519
-----------------|---------|------------|------------
16-
id | Integer | Read | Season's id.
20+
rates_table | Integer | Read | Rates Table's ID related to the Season
21+
account | Integer | Read | Account's ID related to the Season
22+
rates_rules | Array | Read | Rates Rules' IDs related to the Season
23+
periods | Array | Read | Periods' IDs related to the Season
1724
-----------------|---------|------------|------------
25+
id | Integer | Read | Season's ID.
1826
color_ratio | [Decimal](/reference/enums#formats) | Read | Season's color_ratio.
27+
color | String | Read | Season's color (hexadecimal).
1928
minimum_stay | Integer | Read | Season's minimum stay in days.
2029
name | [Object](/reference/enums#formats) | Read | Season's name, list of locales described in [enums section](/reference/enums#locales).
2130
ratio_percentage | [Decimal](/reference/enums#formats) | Read | Season's ratio expressed in percentage.
@@ -25,17 +34,22 @@ updated_at | [Time](/reference/enums#formats) | Read | Season's upda
2534
{: class="table table-bordered"}
2635
</div>
2736
<div class="tab-pane" id="rates_write" markdown="1">
28-
Name | Type | Read/Write | Description
29-
-----------------|---------|------------|------------
30-
id | Integer | Read | Season's id.
31-
-----------------|---------|------------|------------
32-
color_ratio | [Decimal](/reference/enums#formats) | Read | Season's color_ratio.
33-
minimum_stay | Integer | Read/Write | **Required**. Season's minimum stay in days. (greater than 0)
34-
name | String | Read/Write | **Required**. Season's name. (50 max characters)
35-
ratio_percentage | [Decimal](/reference/enums#formats) | Read/Write | **Required**. Season's ratio expressed in percentage. (between 1 and 1000)
36-
-----------------|---------|------------|------------
37-
created_at | [Time](/reference/enums#formats) | Read | Season's create time.
38-
updated_at | [Time](/reference/enums#formats) | Read | Season's update time.
37+
Name | Type | Read/Write | Description | Constraints
38+
-----------------|---------|------------|-------------|
39+
rates_table | Integer | Read | Rates Table's ID related to the Season |
40+
account | Integer | Read | Account's ID related to the Season |
41+
rates_rules | Array | Read | Rates Rules' IDs related to the Season |
42+
periods | Array | Read | Periods' IDs related to the Season |
43+
-----------------|---------|------------|-------------|
44+
id | Integer | Read | Season's ID. |
45+
color_ratio | [Decimal](/reference/enums#formats) | Read | Season's color_ratio. |
46+
color | String | Read | Season's color (hexadecimal) |
47+
minimum_stay | Integer | Read/Write | Season's minimum stay in days. | **Required**, must be greater than: 0
48+
name | [Object](/reference/enums#formats) | Read/Write | Season's name. | **Required** for Account's default locale, maximum length: 50, must not contain non-printing characters
49+
ratio_percentage | [Decimal](/reference/enums#formats) | Read/Write | Season's ratio expressed in percentage. | **Required**, must be greater than: 0
50+
-----------------|---------|------------|-------------|
51+
created_at | [Time](/reference/enums#formats) | Read | Season's create time. |
52+
updated_at | [Time](/reference/enums#formats) | Read | Season's update time. |
3953
{: class="table table-bordered"}
4054
</div>
4155
</div>

content/reference/endpoints/sources.md

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
1. TOC
44
{:toc}
55

6+
## Overview
7+
8+
This resource represents Sources which usually represent Channels from which [Bookings](/reference/endpoints/Bookings/) originate from.
9+
610
### Parameters
711
<ul class="nav nav-pills" role="tablist">
812
<li class="disabled"><a>OAuth Scopes:</a></li>
@@ -13,27 +17,29 @@
1317
<div class="tab-pane active" id="bookings_read" markdown="1">
1418
Name | Type | Read/Write | Description
1519
-----------------|---------|------------|------------
16-
id | Integer | Read | Source's id.
20+
account | Integer | Read | Account's ID related to the Source
1721
-----------------|---------|------------|------------
22+
id | Integer | Read | Source's ID.
1823
name | String | Read | Source's name.
1924
position | Integer | Read | Source's position on the list.
20-
internal | Boolean | Read | Source's internal status. When `true`, it is restricted for internal-only use (should not be used by the partner for anything else than read). Every attempt to associate any record with such a source will result in 422 error.
25+
internal | Boolean | Read | Source's internal status. When `true`, it is restricted for internal-only use (should not be used by the Partners for anything else than read). Every attempt to associate any record with such a source will result in 422 error.
2126
-----------------|---------|------------|------------
2227
created_at | [Time](/reference/enums#formats) | Read | Source's create time.
2328
updated_at | [Time](/reference/enums#formats) | Read | Source's update time.
2429
{: class="table table-bordered"}
2530
</div>
2631
<div class="tab-pane" id="bookings_write-bookings_write_owned" markdown="1">
27-
Name | Type | Read/Write | Description
28-
-----------------|---------|------------|------------
29-
id | Integer | Read | Source's id.
30-
-----------------|---------|------------|------------
31-
name | String | Read/Write | **Required**. Source's name. (50 characters max)
32-
position | Integer | Read/Write | Source's position on the list.
33-
internal | Boolean | Read | Source's internal status. When `true`, it is restricted for internal-only use (should not be used by the partner for anything else than read). Every attempt to associate any record with such a source will result in 422 error.
34-
-----------------|---------|------------|------------
35-
created_at | [Time](/reference/enums#formats) | Read | Source's create time.
36-
updated_at | [Time](/reference/enums#formats) | Read | Source's update time.
32+
Name | Type | Read/Write | Description | Constraints
33+
-----------------|---------|------------|-------------|
34+
account | Integer | Read | Account's ID related to the Source |
35+
-----------------|---------|------------|-------------|
36+
id | Integer | Read | Source's ID. |
37+
name | String | Read/Write | Source's name.| **Required**, maximum length: 50, must not contain non-printing characters
38+
position | Integer | Read/Write | Source's position on the list. |
39+
internal | Boolean | Read | Source's internal status. When `true`, it is restricted for internal-only use (should not be used by the Partners for anything else than read). Every attempt to associate any record with such a source will result in 422 error. |
40+
-----------------|---------|------------|-------------|
41+
created_at | [Time](/reference/enums#formats) | Read | Source's create time. |
42+
updated_at | [Time](/reference/enums#formats) | Read | Source's update time. |
3743
{: class="table table-bordered"}
3844
</div>
3945
</div>

content/reference/endpoints/special_offers.md

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
1. TOC
44
{:toc}
55

6+
## Overview
7+
8+
This resource represents Special Offers which are the Rental's price (as `initial_price` in [Booking](/reference/endpoints/Bookings/)) modifiers, making it possible to provide special discounts during certain periods.
9+
610
### Parameters
711
<ul class="nav nav-pills" role="tablist">
812
<li class="disabled"><a>OAuth Scopes:</a></li>
@@ -13,8 +17,10 @@
1317
<div class="tab-pane active" id="public" markdown="1">
1418
Name | Type | Read/Write | Description
1519
---------------------|---------|------------|------------
16-
id | Integer | Read | Special Offer's id.
20+
account | Integer | Read | Account's ID related to the Special Offer
21+
rental | Integer | Read | Rental's ID related to the Special Offer
1722
---------------------|---------|------------|------------
23+
id | Integer | Read | Special Offer's ID.
1824
discount | Float | Read | Special Offer's discount in percents.
1925
name | [Object](/reference/enums#formats) | Read | Special Offer's name, list of locales described in [enums section](/reference/enums#locales).
2026
---------------------|---------|------------|------------
@@ -25,17 +31,19 @@ end_date | [Date](/reference/enums#formats) | Read | Special O
2531
{: class="table table-bordered"}
2632
</div>
2733
<div class="tab-pane" id="rates_write" markdown="1">
28-
Name | Type | Read/Write | Description
29-
---------------------|---------|------------|------------
30-
id | Integer | Read | Special Offer's id.
31-
---------------------|---------|------------|------------
32-
discount | Float | Read/Write | **Required**. Special Offer's discount in percents. (between 1 and 100)
33-
name | [Object](/reference/enums#formats) | Read/Write | **Required**. Special Offer's name, list of locales described in [enums section](/reference/enums#locales). (50 characters max)
34-
---------------------|---------|------------|------------
35-
created_at | [Time](/reference/enums#formats) | Read | Special Offer's create time.
36-
updated_at | [Time](/reference/enums#formats) | Read | Special Offer's update time.
37-
start_date | [Date](/reference/enums#formats) | Read/Write | **Required**. Special Offer's start date.
38-
end_date | [Date](/reference/enums#formats) | Read/Write | **Required**. Special Offer's end date.
34+
Name | Type | Read/Write | Description | Constraints
35+
---------------------|---------|------------|-------------|
36+
account | Integer | Read | Account's ID related to the Special Offer |
37+
rental | Integer | Read | Rental's ID related to the Special Offer |
38+
---------------------|---------|------------|-------------|
39+
id | Integer | Read | Special Offer's ID. |
40+
discount | Float | Read/Write | **Required**. Special Offer's discount in percents. (between 1 and 100) | **Required**, must be between 1 (exclusive) and 100 (inclusive)
41+
name | [Object](/reference/enums#formats) | Read/Write | Special Offer's name, list of locales described in [enums section](/reference/enums#locales). | **Required** for Account's default locale, minimum length: 3, maximum length: 50
42+
---------------------|---------|------------|-------------|
43+
created_at | [Time](/reference/enums#formats) | Read | Special Offer's create time. |
44+
updated_at | [Time](/reference/enums#formats) | Read | Special Offer's update time. |
45+
start_date | [Date](/reference/enums#formats) | Read/Write | Special Offer's start date. | **Required**, must be before `end_date`, cannot be in the past
46+
end_date | [Date](/reference/enums#formats) | Read/Write | Special Offer's end date. | **Required**, must be after `start_date`
3947
{: class="table table-bordered"}
4048
</div>
4149
</div>

content/reference/endpoints/tax_rules.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
1. TOC
44
{:toc}
55

6+
## Overview
7+
8+
This resource represents Tax Rules which are applicable to [Rentals Taxes](/reference/endpoints/rentals_taxes/) or [Taxes](/reference/endpoints/taxes/).
9+
10+
This resource impacts the applicability of the parent resource. For example, if `comparator` is set to `>`, `value` is set to `10` and `compared_attribute` is `length_of_stay`, it means that the Tax will be applied only if the length of stay of the [Booking](/reference/endpoints/booking/) is great than 10 nights.
11+
612
### Parameters
713
<ul class="nav nav-pills" role="tablist">
814
<li class="disabled"><a>OAuth Scopes:</a></li>
@@ -12,12 +18,13 @@
1218
<div class="tab-pane active" id="public" markdown="1">
1319
Name | Type | Read/Write | Description
1420
-----------------------|---------|------------|------------
15-
id | Integer | Read | Tax Rule's id.
21+
account | Integer | Read | Account's ID related to the Tax Rule
1622
-----------------------|---------|------------|------------
23+
id | Integer | Read | Tax Rule's ID.
1724
comparator | String | Read | Sign used to compare, possible values: `<` `<=` `==` `>=` `>`.
18-
compared_attribute | String | Read | Name of the attribute to compare.
19-
ruleable_id | Integer | Read | Id of the owner of the Tax Rule.
20-
ruleable_type | String | Read | Type of the owner of the Tax Rule, either `RentalsTax` or `Tax`.
25+
compared_attribute | String | Read | Name of the attribute to compare. Possible values: `length_of_stay`
26+
ruleable_id | Integer | Read | ID of the subject of the Tax Rule.
27+
ruleable_type | String | Read | Type of the subject of the Tax Rule, either `RentalsTax` or `Tax`.
2128
value | String | Read | Value of the `compared_attribute`.
2229
-----------------------|---------|------------|------------
2330
created_at | [Time](/reference/enums#formats) | Read | Tax Rule's create time.

0 commit comments

Comments
 (0)