{
  "type": "object",
  "properties": {
    "duplicate": {
      "type": "boolean",
      "description": "True only when the input explicitly reports being charged more than once for the same purchase; otherwise false.",
      "x-runtime": {
        "probabilities": true
      }
    },
    "route": {
      "enum": [
        "automatic",
        "review",
        "decline"
      ]
    }
  },
  "required": [
    "duplicate",
    "route"
  ],
  "additionalProperties": false,
  "x-runtime": {
    "switch": {
      "on": {
        "probability": {
          "path": "/duplicate",
          "value": true
        }
      },
      "cases": [
        {
          "when": {
            "gte": 0.95
          },
          "then": {
            "properties": {
              "route": {
                "const": "automatic"
              }
            }
          }
        },
        {
          "when": {
            "gte": 0.5
          },
          "then": {
            "properties": {
              "route": {
                "const": "review"
              }
            }
          }
        }
      ],
      "default": {
        "properties": {
          "route": {
            "const": "decline"
          }
        }
      }
    }
  }
}
