{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "CustomerContact.json",
  "title": "Billing contact",
  "description": "An email on a customer that receives invoices and receipts.",
  "type": "object",
  "properties": {
    "name": {
      "type": [
        "string",
        "null"
      ],
      "description": "Label or person's name."
    },
    "email": {
      "type": "string",
      "description": "Receives invoices and receipts."
    },
    "phone": {
      "type": [
        "string",
        "null"
      ],
      "description": "Phone number."
    },
    "isBillingPrimary": {
      "type": "boolean",
      "description": "The primary billing contact. At most one per customer."
    },
    "ccOnInvoices": {
      "type": "boolean",
      "description": "Copied on invoice and receipt emails."
    }
  },
  "required": [
    "name",
    "email",
    "phone",
    "isBillingPrimary",
    "ccOnInvoices"
  ],
  "examples": [
    {
      "name": "Finance",
      "email": "finance@leadway.example",
      "phone": null,
      "isBillingPrimary": true,
      "ccOnInvoices": false
    }
  ]
}
