{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://rctp.dev/schemas/deal-terms.schema.json",
  "title": "Deal Terms",
  "description": "What an offer proposes and an acceptance fixes: a price, one UCP fulfillment option and one UCP payment term, each chosen from those the listing allows (Draft 0.4 7.2, A.3).",
  "type": "object",
  "properties": {
    "price": {
      "$ref": "common.schema.json#/$defs/Money"
    },
    "fulfillment": {
      "type": "object",
      "properties": {
        "method_type": {
          "$ref": "common.schema.json#/$defs/MethodType"
        },
        "selected_option_id": {
          "$ref": "common.schema.json#/$defs/OptionId"
        }
      },
      "additionalProperties": false,
      "required": [
        "method_type",
        "selected_option_id"
      ]
    },
    "payment": {
      "type": "object",
      "properties": {
        "selected_term_id": {
          "$ref": "common.schema.json#/$defs/PaymentTermId"
        }
      },
      "additionalProperties": false,
      "required": [
        "selected_term_id"
      ]
    }
  },
  "additionalProperties": false,
  "required": [
    "price",
    "fulfillment",
    "payment"
  ]
}
