{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "OrderItem",
    "type": "object",
    "additionalProperties": false,
    "description": "TAnalytics-v4 .. Individual item/product in an order",
    "properties": {
        "product_id": {
            "type": "string",
            "description": "The id of a single item/product in the order. In case of a combo, this will have sub items"
        },
        "product_name": {
            "type": "string",
            "description": "The name of a single item/product in the order"
        },
        "quantity": {
            "type": "integer",
            "description": "The quantity of main items purchased"
        },
        "price": {
            "type": "object",
            "additionalProperties": false,
            "description": "Price details of individual product/item in order",
            "properties": {
                "total": {
                    "type": "number",
                    "description": "Total with taxes in specified currency"
                },
                "tax": {
                    "type": "number",
                    "description": "Taxes in specified currency"
                },
                "total_before_tax": {
                    "type": "number",
                    "description": "Total before taxes in specified currency"
                },
                "currency": {
                    "type": "string",
                    "enum": ["USD", "EUR"],
                    "description": "Currency"
                }
            }
        },
        "food_specific": {
            "type": "object",
            "additionalProperties": false,
            "description": "Details like modifiers and sub_items for a combo - specific to food order",
            "properties": {
                "modifiers": {
                    "type": "array",
                    "items": {
                        "$ref": "/resources/schema/analytics/client/v4/item/OrderModifierDetail.json"
                    }
                },
                "sub_items": {
                    "type": "array",
                    "items": {
                        "$ref": "/resources/schema/analytics/client/v4/item/OrderSubItem.json"
                    }
                }
            }
        },
        "parking_specific": {
            "type": "object",
            "additionalProperties": false,
            "description": "Details like start/end time and quote - specific to parking order",
            "properties": {
                "start_time": {
                    "type": "integer",
                    "description": "Start time of parking reservation - UTC timestamp in milliseconds"
                },
                "end_time": {
                    "type": "integer",
                    "description": "End time of parking reservation - UTC timestamp in milliseconds"
                },
                "quote_id": {
                    "type": "string",
                    "description": "Unique id of parking reservation from external vendor"
                }
            }
        }
    },
    "required": [
        "product_name"
    ]
}