{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/zywave/json-schema/zywave-volume-rate-info-schema.json",
  "title": "VolumeRateInfo",
  "description": "Volume rate create/update data",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/zywave-etl-after-policy-api-openapi.yml#/components/schemas/VolumeRateInfo",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "monthlyRatePerBasisAmount",
    "basisAmount",
    "coverageOrSalaryAmount",
    "amountType",
    "description"
  ],
  "properties": {
    "monthlyRatePerBasisAmount": {
      "type": "number",
      "description": "The rate per BasisAmount",
      "format": "decimal",
      "maximum": 99999.9999,
      "minimum": 0.0,
      "pattern": "^\\d+\\.?\\d{0,4}$"
    },
    "basisAmount": {
      "type": "number",
      "description": "The basis amount used when applying the MonthlyRatePerBasisAmount",
      "format": "decimal",
      "maximum": 99999.99,
      "minimum": 0.0,
      "pattern": "^\\d+\\.?\\d{0,2}$"
    },
    "coverageOrSalaryAmount": {
      "type": "number",
      "description": "The total amount of coverage (can also be interpreted as salary when that is used to determine volume coverage).",
      "format": "decimal",
      "maximum": 99999999999.99,
      "minimum": 0.0,
      "pattern": "^\\d+\\.?\\d{0,2}$"
    },
    "amountType": {
      "description": "Indicates whether the BasisAmount represents Salary or Coverage.",
      "oneOf": [
        {
          "$ref": "#/$defs/VolumeAmountTypeOption"
        }
      ]
    },
    "description": {
      "type": "string",
      "description": "The description for this record. This should be unique with respect to other VolumeRate records for the policy.",
      "maxLength": 255,
      "minLength": 1
    },
    "totalMonthlyPremium": {
      "type": "number",
      "readOnly": true,
      "description": "The calculated total monthly premium for this Volume Rate record. Fractional cents are rounded up.",
      "format": "decimal"
    },
    "totalAnnualPremium": {
      "type": "number",
      "readOnly": true,
      "description": "The calculated total annual premium for this Volume Rate record.",
      "format": "decimal"
    }
  },
  "$defs": {
    "VolumeAmountTypeOption": {
      "type": "string",
      "description": "",
      "x-enumNames": [
        "Salary",
        "Coverage"
      ],
      "enum": [
        "Salary",
        "Coverage"
      ]
    }
  }
}