{
  "$schema": "https://abhcr.github.io/comcom-protocol/releases/v0.2.0/schemas/comcom-meta.schema.json",
  "$id": "https://abhcr.github.io/comcom-protocol/releases/v0.2.0/profiles/v0.2/commerce.pricing/comcom-offer-withdraw/schemas/resource.schema.json",
  "title": "Offer resource for comcom.offer.withdraw",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "id",
    "type",
    "state",
    "revision",
    "createdAt",
    "updatedAt"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Globally unique resource URI.",
      "format": "uri-reference"
    },
    "type": {
      "const": "Offer"
    },
    "state": {
      "enum": [
        "active",
        "withdrawn"
      ]
    },
    "revision": {
      "type": "integer",
      "minimum": 0
    },
    "createdAt": {
      "type": "string",
      "description": "Creation instant.",
      "format": "date-time"
    },
    "updatedAt": {
      "type": "string",
      "description": "Last update instant.",
      "format": "date-time"
    },
    "statusCode": {
      "type": "string",
      "description": "Profile-defined business state.",
      "pattern": "^[a-z][a-zA-Z0-9.-]{0,63}$"
    },
    "name": {
      "type": "string",
      "description": "Display name.",
      "minLength": 1,
      "maxLength": 300
    },
    "description": {
      "type": "string",
      "description": "Description.",
      "maxLength": 5000
    },
    "categoryCode": {
      "type": "string",
      "description": "Standard or provider category code.",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
    },
    "sku": {
      "type": "string",
      "description": "Seller stock-keeping unit.",
      "maxLength": 100
    },
    "gtin": {
      "type": "string",
      "description": "GS1 Global Trade Item Number.",
      "pattern": "^[0-9]{8}([0-9]{4,6})?$"
    },
    "providerId": {
      "type": "string",
      "description": "Provider URI.",
      "format": "uri-reference"
    },
    "amount": {
      "type": "string",
      "description": "Price amount.",
      "pattern": "^-?(0|[1-9][0-9]*)(\\.[0-9]+)?$"
    },
    "currency": {
      "type": "string",
      "description": "ISO 4217 currency code.",
      "pattern": "^[A-Z]{3}$"
    },
    "available": {
      "type": "boolean"
    }
  }
}
