{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "Statement.json",
  "title": "Statement summary",
  "description": "Open, overdue and paid totals per currency. Counts approved and paid invoices; voided ones are excluded.",
  "type": "object",
  "properties": {
    "customerId": {
      "type": "integer",
      "format": "int32",
      "description": "The customer."
    },
    "currencies": {
      "type": "array",
      "items": {
        "$ref": "CurrencyTotals.json"
      },
      "description": "One entry per currency the customer has invoices in. Empty if none."
    }
  },
  "required": [
    "customerId",
    "currencies"
  ],
  "examples": [
    {
      "customerId": 812,
      "currencies": [
        {
          "currency": "NGN",
          "open": 500000,
          "overdue": 250000,
          "paid": 1250000,
          "openCount": 2,
          "overdueCount": 1,
          "paidCount": 5
        }
      ]
    }
  ]
}
