{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/alliance-data-systems/main/json-schema/bread-classic-cart-schema.json",
  "title": "BreadClassicCart",
  "description": "Bread Classic cart that initiates the legacy BNPL checkout flow.",
  "type": "object",
  "required": ["currency", "totalPrice"],
  "properties": {
    "id": { "type": "string" },
    "currency": { "type": "string", "minLength": 3, "maxLength": 3 },
    "items": {
      "type": "array",
      "items": { "$ref": "bread-classic-cart-item-schema.json" }
    },
    "discounts": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "description": { "type": "string" },
          "amount": { "type": "integer" }
        }
      }
    },
    "shipping": {
      "type": "object",
      "properties": {
        "typeId": { "type": "string" },
        "cost": { "type": "integer" }
      }
    },
    "tax": { "type": "integer" },
    "totalPrice": { "type": "integer" },
    "createdAt": { "type": "string", "format": "date-time" }
  }
}
