{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/AccountingAddress",
  "title": "Accounting: Address",
  "x-internal": true,
  "type": "object",
  "properties": {
    "type": {
      "$ref": "#/components/schemas/AccountingAddress/definitions/accountingAddressType"
    },
    "line1": {
      "type": "string",
      "nullable": true,
      "description": "Line 1 of the customer address."
    },
    "line2": {
      "type": "string",
      "nullable": true,
      "description": "Line 2 of the customer address."
    },
    "city": {
      "type": "string",
      "nullable": true,
      "description": "City of the customer address."
    },
    "region": {
      "type": "string",
      "nullable": true,
      "description": "Region of the customer address."
    },
    "country": {
      "type": "string",
      "nullable": true,
      "description": "Country of the customer address."
    },
    "postalCode": {
      "type": "string",
      "nullable": true,
      "description": "Postal code or zip code."
    }
  },
  "required": [
    "type"
  ],
  "definitions": {
    "accountingAddressType": {
      "description": "The type of the address",
      "type": "string",
      "enum": [
        "Unknown",
        "Billing",
        "Delivery"
      ]
    }
  }
}