{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/breezecash/json-schema/breezecash-regular-product-schema.json",
  "title": "RegularProduct",
  "description": "Product details",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/breezecash-products-api-openapi.yml#/components/schemas/RegularProduct",
  "type": "object",
  "properties": {
    "clientProductId": {
      "type": "string",
      "description": "Your unique identifier for this product. Minimum 1 character, maximum 100 characters. Allowed characters: letters (a–z, A–Z), numbers (0–9), dot (.), underscore (_), and hyphen (-). Example: 'prod_123', 'my-product.v2'.",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[0-9a-zA-Z._-]+$"
    },
    "description": {
      "type": "string",
      "description": "Optional description of the product shown to customers. Minimum 1 character, maximum 280 characters.",
      "minLength": 1,
      "maxLength": 280
    },
    "displayName": {
      "type": "string",
      "description": "The name of the product shown to customers.",
      "minLength": 1,
      "maxLength": 100
    },
    "image": {
      "type": "string",
      "description": "URL of the product image shown to customers.",
      "format": "uri"
    },
    "type": {
      "$ref": "#/$defs/ProductType"
    },
    "amount": {
      "type": "string",
      "deprecated": true
    },
    "unitAmount": {
      "type": "integer",
      "description": "Price of the product in minor units / cents (e.g., currency: \"USD\", 1000 = USD 10).",
      "exclusiveMinimum": 0
    },
    "currency": {
      "$ref": "#/$defs/ProductCurrency"
    }
  },
  "required": [
    "displayName",
    "type",
    "currency"
  ],
  "additionalProperties": false,
  "oneOf": [
    {
      "title": "With unitAmount (minor units)",
      "required": [
        "unitAmount"
      ]
    },
    {
      "title": "With amount (major units, deprecated)",
      "required": [
        "amount"
      ]
    }
  ],
  "$defs": {
    "ProductCurrency": {
      "type": "string",
      "description": "Three-letter ISO currency code for the product price. Supported values: USD, AUD, CAD, CHF, DKK, EUR, GBP, NOK, NZD, PLN, SEK, SGD.",
      "enum": [
        "USD",
        "AUD",
        "CAD",
        "CHF",
        "DKK",
        "EUR",
        "GBP",
        "NOK",
        "NZD",
        "PLN",
        "SEK",
        "SGD"
      ]
    },
    "ProductType": {
      "type": "string",
      "description": "The type of product.",
      "enum": [
        "REGULAR",
        "SUBSCRIPTION"
      ]
    }
  }
}