{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "KuendigungVorversorgerAbgelehnt",
  "description": "The `data` of `de.mako.vertrag.kuendigung-vorversorger.abgelehnt`.",
  "type": "object",
  "properties": {
    "vertrag_id": {
      "type": "string",
      "format": "uuid"
    },
    "vertrags_nr": {
      "type": "string"
    },
    "customer_id": {
      "description": "The Kunde the contract is with — the customer number of the portfolio\nroute.",
      "type": "string",
      "format": "uuid"
    },
    "erp_contract_id": {
      "description": "The caller's contract reference, where the contract was created with one.",
      "type": [
        "string",
        "null"
      ]
    },
    "bestellreferenz": {
      "description": "The front end's order reference, where the contract came from an order.",
      "type": [
        "string",
        "null"
      ]
    },
    "komp_id": {
      "type": "string",
      "format": "uuid"
    },
    "sparte": {
      "type": "string"
    },
    "malo_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "lieferbeginn": {
      "description": "The day supply begins, as the contract holds it.",
      "type": "string",
      "format": "date"
    },
    "vorversorger_mp_id": {
      "type": "string"
    },
    "antwortcode": {
      "type": [
        "string",
        "null"
      ]
    },
    "codeliste": {
      "type": [
        "string",
        "null"
      ]
    },
    "reason": {
      "type": [
        "string",
        "null"
      ]
    },
    "klasse": {
      "description": "What the code means for the Anmeldung.",
      "anyOf": [
        {
          "$ref": "#/$defs/Klasse"
        },
        {
          "type": "null"
        }
      ]
    },
    "reaktion": {
      "$ref": "#/$defs/Reaktion"
    }
  },
  "required": [
    "vertrag_id",
    "vertrags_nr",
    "customer_id",
    "komp_id",
    "sparte",
    "lieferbeginn",
    "vorversorger_mp_id",
    "reaktion"
  ],
  "$defs": {
    "Klasse": {
      "description": "What an answer to the Kündigung means for the Anmeldung.",
      "oneOf": [
        {
          "description": "The old supplier confirmed.",
          "type": "string",
          "const": "zustimmung"
        },
        {
          "description": "It confirmed for another date — „Zustimmung mit Terminänderung\"\n(`E_3001` Z01, the date in `DTM+471`). The Anmeldung waits: the\nconfirmed date is not read from the answer, and a Lieferbeginn\nbefore it would meet a bound contract.",
          "type": "string",
          "const": "zustimmung_mit_terminaenderung"
        },
        {
          "description": "„Zum Kündigungstermin besteht kein Vertragsverhältnis mehr\" and its\nkin: there is nothing to terminate.",
          "type": "string",
          "const": "kein_vertrag"
        },
        {
          "description": "The old contract is still bound.",
          "type": "string",
          "const": "vertragsbindung"
        },
        {
          "description": "Date passed, Vollmacht not accepted, or Sonstiges: the Kündigung itself\nhas to be fixed.",
          "type": "string",
          "const": "sonstige"
        }
      ]
    },
    "Reaktion": {
      "description": "Whether the Anmeldung goes out after the answer.",
      "type": "string",
      "enum": [
        "angemeldet",
        "gehalten"
      ]
    }
  },
  "$id": "https://hupe1980.github.io/mako/schemas/events/de.mako.vertrag.kuendigung-vorversorger.abgelehnt.json"
}
