{
  "$ref": "#/definitions/Component",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "definitions": {
    "Component": {
      "additionalProperties": false,
      "properties": {
        "completed": {
          "enum": [
            "yes",
            "no"
          ],
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "payment": {
          "$ref": "#/definitions/IShoppingPayment"
        }
      },
      "required": [
        "payment"
      ],
      "type": "object"
    },
    "IShopItem": {
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "quantity": {
          "type": "number"
        },
        "taxPercentage": {
          "type": "number"
        },
        "unit": {
          "type": "string"
        },
        "unitaryPrice": {
          "type": "number"
        }
      },
      "required": [
        "id",
        "name",
        "unitaryPrice",
        "taxPercentage"
      ],
      "type": "object"
    },
    "IShoppingPayment": {
      "additionalProperties": false,
      "properties": {
        "countryCode": {
          "enum": [
            "IT",
            "US",
            "EU"
          ],
          "type": "string"
        },
        "currencySymbol": {
          "enum": [
            "€",
            "$"
          ],
          "type": "string"
        },
        "items": {
          "items": {
            "$ref": "#/definitions/IShopItem"
          },
          "type": "array"
        },
        "shipmentFee": {
          "type": "number"
        }
      },
      "required": [
        "countryCode",
        "items"
      ],
      "type": "object"
    }
  }
}
