{
  "tool": "matric-nqf4.tour_currency",
  "name": "Currency conversion and occupancy (CDU-GEN-NSC-400)",
  "answers": "A currency conversion at a stated rate, and the occupancy percentage of a lodge.",
  "degree": {
    "id": "competency:matric-nqf4",
    "code": "CDU-GEN-NSC-400",
    "name": "Senior Certificate (Amended) — exam-readiness programme (NQF 4 matric)",
    "version": "1.0.0"
  },
  "reference": "Umalusi/NSC subject catalogue, worked reference (offline reconstruction); Tourism row of §4 — a currency conversion and an occupancy percentage",
  "endpoint": "/faculty/matric-nqf4/tour_currency",
  "feeSt": 1,
  "inputSchema": {
    "type": "object",
    "required": [
      "pan",
      "amount",
      "rate",
      "roomsSold",
      "roomsAvailable"
    ],
    "properties": {
      "pan": {
        "type": "string",
        "description": "The student PAN — the degree must be held in one of its five slots",
        "pattern": "^[0-9 ]{16,19}$"
      },
      "amount": {
        "type": "number",
        "description": "amount in the source currency (≥ 0)",
        "minimum": 0,
        "maximum": 1000000000
      },
      "rate": {
        "type": "number",
        "description": "units of the target currency per source unit (> 0)",
        "minimum": 0.000001,
        "maximum": 1000000
      },
      "roomsSold": {
        "type": "number",
        "description": "rooms sold",
        "minimum": 0,
        "maximum": 1000000
      },
      "roomsAvailable": {
        "type": "number",
        "description": "rooms available (> 0)",
        "minimum": 1,
        "maximum": 1000000
      }
    },
    "additionalProperties": false
  },
  "outputSchema": {
    "type": "object",
    "required": [
      "converted",
      "occupancyPercent"
    ],
    "properties": {
      "converted": {
        "type": "number",
        "description": "converted amount (2 d.p.)"
      },
      "occupancyPercent": {
        "type": "number",
        "description": "occupancy (%, 1 d.p.)"
      }
    },
    "additionalProperties": false
  },
  "example": {
    "amount": 1000,
    "rate": 18.5,
    "roomsSold": 45,
    "roomsAvailable": 60
  }
}