{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/normapi-com/main/json-schema/normapi-com-customer-month-schema.json",
  "title": "CustomerMonth",
  "x-generated": "2026-10-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/normapi-com-customers-api-openapi.yml#/components/schemas/CustomerMonth",
  "allOf": [
    {
      "$ref": "#/$defs/CustomerCounts"
    },
    {
      "type": "object",
      "properties": {
        "customer": {
          "type": "string"
        },
        "monthlyInvoices": {
          "type": [
            "integer",
            "null"
          ],
          "description": "The ceiling in force now, or null without one."
        }
      },
      "required": [
        "customer",
        "monthlyInvoices"
      ]
    }
  ],
  "$defs": {
    "CustomerCounts": {
      "type": "object",
      "properties": {
        "generated": {
          "type": "integer",
          "description": "Invoices generated (2xx) in the month — the number to bill on."
        },
        "refused": {
          "type": "integer",
          "description": "Generations answered 4xx — refused data, a limit or the ceiling."
        },
        "calls": {
          "type": "object",
          "description": "Calls per endpoint, every status: `generate`, `validate`, and any\nother endpoint the customer called.\n",
          "additionalProperties": {
            "type": "integer"
          }
        }
      },
      "required": [
        "generated",
        "refused",
        "calls"
      ]
    }
  }
}