{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/threshold-rentals/json-schema/threshold-rentals-cancellation-preview-schema.json",
  "title": "CancellationPreview",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/threshold-rentals-openapi.json#/components/schemas/CancellationPreview",
  "type": "object",
  "properties": {
    "booking_id": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "cancellable": {
      "type": "boolean"
    },
    "refund": {
      "$ref": "#/$defs/Money"
    },
    "retained": {
      "$ref": "#/$defs/Money"
    },
    "tier_ends_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "as_of": {
      "type": "string",
      "format": "date-time"
    },
    "note": {
      "type": "string"
    }
  },
  "$defs": {
    "Money": {
      "type": "object",
      "required": [
        "amount",
        "currency"
      ],
      "properties": {
        "amount": {
          "type": "integer",
          "description": "In cents"
        },
        "currency": {
          "type": "string"
        }
      }
    }
  }
}