{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$ref": "#/definitions/PremiumInstallment",
  "definitions": {
    "PremiumInstallment": {
      "type": "object",
      "properties": {
        "installmentNumber": {
          "type": "number",
          "description": "Installment sequence number"
        },
        "dueDate": {
          "type": "string",
          "description": "Date the installment is due.",
          "format": "date"
        },
        "amount": {
          "$ref": "#/definitions/Money",
          "description": "Installment amount"
        },
        "status": {
          "type": "string",
          "enum": [
            "due",
            "paid",
            "overdue",
            "waived"
          ],
          "description": "Payment status"
        }
      },
      "required": [
        "installmentNumber",
        "dueDate",
        "amount"
      ],
      "additionalProperties": false,
      "description": "A premium payment installment."
    },
    "Money": {
      "type": "object",
      "properties": {
        "value": {
          "type": "number",
          "description": "Numeric amount. Represented as a number; precision should be maintained by the consuming system."
        },
        "currency": {
          "type": "string",
          "description": "ISO 4217 currency code.",
          "default": "USD"
        }
      },
      "required": [
        "value"
      ],
      "additionalProperties": false,
      "description": "A monetary amount with currency.",
      "examples": [
        {
          "value": 1000000,
          "currency": "USD"
        }
      ]
    }
  },
  "$id": "https://bind-standard.org/schema/PremiumInstallment",
  "title": "PremiumInstallment"
}
