Tax Rules
Overview
This resource represents Tax Rules which are applicable to Rentals Taxes or Taxes.
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 is great than 10 nights.
Parameters
- OAuth Scopes:
- public
Name | Type | Read/Write | Description |
---|---|---|---|
account | Integer | Read | Account's ID related to the Tax Rule |
id | Integer | Read | Tax Rule's ID |
comparator | String | Read | Sign used to compare, possible values: < <= == >= > |
compared_attribute | String | Read | Name of the attribute to compare. Possible values: length_of_stay |
ruleable_id | Integer | Read | ID of the subject of the Tax Rule |
ruleable_type | String | Read | Type of the subject of the Tax Rule, either RentalsTax or Tax |
value | String | Read | Value of the compared_attribute |
created_at | Time | Read | Tax Rule's create time |
updated_at | Time | Read | Tax Rule's update time |
List tax rules
List all tax rules for a given account(s).
GET /tax_rules
- OAuth Scopes:
- public
response.json
{
"tax_rules": [
{
"id": 3,
"created_at": "2015-08-04T15:23:27Z",
"updated_at": "2015-08-04T15:23:27Z",
"comparator": "==",
"compared_attribute": "start_at",
"value": "4",
"ruleable_id": 2,
"ruleable_type": "Tax"
}
]
}
Get a single tax rule
Returns a single tax rule identified by ID.
GET /tax_rules/:tax_rule_id
- OAuth Scopes:
- public
response.json
{
"tax_rules": [
{
"id": 3,
"created_at": "2015-08-04T15:23:27Z",
"updated_at": "2015-08-04T15:23:27Z",
"comparator": "==",
"compared_attribute": "start_at",
"value": "4",
"ruleable_id": 2,
"ruleable_type": "Tax"
}
]
}