{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/tier1-shop/json-schema/tier1-shop-tariffs-schema.json",
  "title": "Tariffs",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/tier1-shop-openapi.json#/components/schemas/Tariffs",
  "type": "object",
  "required": [
    "geo",
    "currency",
    "tariffs"
  ],
  "properties": {
    "geo": {
      "type": "string",
      "enum": [
        "ru",
        "intl"
      ]
    },
    "currency": {
      "type": "string",
      "enum": [
        "RUB",
        "USD"
      ]
    },
    "tariffs": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "product_id",
          "name",
          "kind",
          "service_slots",
          "price"
        ],
        "properties": {
          "product_id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "geo": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "service_slots": {
            "type": "object",
            "additionalProperties": {
              "type": "integer"
            }
          },
          "price": {
            "$ref": "#/$defs/Money"
          },
          "placement_years": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Explicit placement term when provided by the tariff; Gold+ is 2 years from actual placement."
          }
        }
      }
    }
  },
  "$defs": {
    "Money": {
      "type": "object",
      "required": [
        "currency",
        "amount_minor",
        "minor_unit"
      ],
      "properties": {
        "currency": {
          "type": "string",
          "enum": [
            "RUB",
            "USD"
          ]
        },
        "amount_minor": {
          "type": "integer"
        },
        "minor_unit": {
          "type": "integer",
          "const": 2
        }
      }
    }
  }
}