{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/SubscriptionItem",
  "title": "SubscriptionItem",
  "type": "object",
  "properties": {
    "itemId": {
      "type": "string"
    },
    "productId": {
      "type": "string"
    },
    "productName": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "quantity": {
      "type": "integer",
      "minimum": 1
    },
    "unitPrice": {
      "$ref": "#/components/schemas/MonetaryAmount"
    },
    "totalPrice": {
      "$ref": "#/components/schemas/MonetaryAmount"
    },
    "billingType": {
      "type": "string",
      "enum": [
        "RECURRING",
        "ONE_TIME",
        "USAGE_BASED"
      ]
    },
    "includedUnits": {
      "type": "integer",
      "description": "Number of units included in the base price"
    },
    "overageRate": {
      "type": "number",
      "format": "double",
      "description": "Rate per unit above the included quantity"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    }
  }
}