{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "schema:OrderItem",
  "title": "OrderItem",
  "description": "An order item is a line of an order. It includes the quantity and shipping details of a bought offer.",
  "type": "object",
  "allOf": [
    {
      "description": "A utility class that serves as the umbrella for a number of 'intangible' things such as quantities, structured values, etc.",
      "$ref": "schema:Intangible"
    }
  ],
  "properties": {
    "orderDelivery": {
      "description": "The delivery of the parcel related to this order or order item.",
      "$ref": "schema:ParcelDelivery"
    },
    "orderItemNumber": {
      "description": "The identifier of the order item.",
      "type": "string"
    },
    "orderItemStatus": {
      "description": "The current status of the order item.",
      "$ref": "schema:OrderStatus"
    },
    "orderQuantity": {
      "description": "The number of the item ordered. If the property is not set, assume the quantity is one.",
      "anyOf": [{ "type": "number" }, { "$ref": "schema:QuantitativeValue" }]
    },
    "orderedItem": {
      "description": "The item ordered.",
      "oneOf": [
        {
          "anyOf": [
            { "$ref": "schema:OrderItem" },
            { "$ref": "schema:Product" },
            { "$ref": "schema:Service" }
          ]
        },
        {
          "type": "array",
          "items": {
            "anyOf": [
              { "$ref": "schema:OrderItem" },
              { "$ref": "schema:Product" },
              { "$ref": "schema:Service" }
            ]
          }
        }
      ]
    }
  }
}
