{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/quub-rent/json-schema/quub-rent-tourist-tax-schema.json",
  "title": "TouristTax",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/quub-rent-openapi.json#/components/schemas/TouristTax",
  "type": "object",
  "properties": {
    "found": {
      "type": "boolean"
    },
    "destination": {
      "type": "object",
      "properties": {
        "slug": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "country": {
          "type": "string"
        },
        "tax_page": {
          "type": "string"
        },
        "guide_url": {
          "type": "string"
        }
      }
    },
    "rule": {
      "type": "object",
      "description": "kind is tax or none; computable false comes with reason. charges is the structured rule (tiers, seasons, maxNights, ages, exemptOver); in_words says the same in sentences.",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "tax",
            "none"
          ]
        },
        "computable": {
          "type": "boolean"
        },
        "reason": {
          "type": "string"
        },
        "currency": {
          "type": [
            "string",
            "null"
          ]
        },
        "headline": {
          "type": "string"
        },
        "in_words": {
          "type": "array",
          "items": {
            "type": "object"
          }
        },
        "long_stay": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "charges": {
          "type": "array",
          "items": {
            "type": "object"
          }
        },
        "paid": {
          "type": [
            "string",
            "null"
          ]
        },
        "included_in_price": {
          "type": [
            "string",
            "null"
          ]
        },
        "source": {
          "type": "string"
        },
        "source_read": {
          "type": "string",
          "format": "date"
        }
      }
    },
    "calculation": {
      "type": "object",
      "properties": {
        "nights": {
          "type": "integer"
        },
        "guests": {
          "type": "integer"
        },
        "first_night": {
          "type": "string",
          "format": "date"
        },
        "total": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "min": {
              "type": "number"
            },
            "max": {
              "type": "number"
            }
          },
          "description": "In the rule currency; null when an input in needs is missing."
        },
        "exact": {
          "type": "boolean"
        },
        "approximate": {
          "type": "boolean"
        },
        "charges": {
          "type": "array",
          "items": {
            "type": "object"
          }
        },
        "explanation": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "uncovered_nights": {
          "type": "integer"
        },
        "assumed": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "needs": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "charge": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "options": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      }
    },
    "note": {
      "type": "string"
    }
  }
}