{
  "$schema": "http://json-schema.org/draft-03/schema#",
  "title": "Schema for booking an invoice",
  "description": "The schema for booking a draft invoice.",
  "type": "object",
  "restdocs": "http://restdocs.e-conomic.com/#post-invoices-booked",
  "properties": {
    "draftInvoice": {
      "type": "object",
      "description": "The draft invoice you want to book.",
      "properties": {
        "draftInvoiceNumber": {
          "type": "integer",
          "minimum": 1,
          "maximum": 999999999,
          "description": "A reference number for the draft invoice document to be booked."
        },
        "self": {
          "type": "string",
          "format": "uri",
          "description": "The unique self reference of the draft invoice to be booked."
        }
      }
    },
    "bookWithNumber": {
      "type": "integer",
      "description": "The number for the invoice to be booked with. Optional."
    },
    "sendBy": {
      "type": "string",
      "enum": ["none", "EAN", "Email"],
      "description": "Optional. Sets whether invoice should be sent via e-invoicing when booking."
    }
  }
}
