{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/recurly/json-schema/recurly-measured-unit-schema.json",
  "title": "Measured unit",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/recurly-measured-unit-api-openapi.yml#/components/schemas/MeasuredUnit",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "title": "Item ID",
      "maxLength": 13,
      "readOnly": true
    },
    "object": {
      "type": "string",
      "title": "Object type",
      "readOnly": true
    },
    "name": {
      "type": "string",
      "title": "Name",
      "description": "Unique internal name of the measured unit on your site."
    },
    "display_name": {
      "type": "string",
      "title": "Display name",
      "description": "Display name for the measured unit. Can only contain spaces, underscores and must be alphanumeric.",
      "maxLength": 50
    },
    "state": {
      "title": "State",
      "description": "The current state of the measured unit.",
      "readOnly": true,
      "$ref": "#/$defs/ActiveStateEnum"
    },
    "description": {
      "type": "string",
      "title": "Description",
      "description": "Optional internal description."
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created at",
      "readOnly": true
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "title": "Last updated at",
      "readOnly": true
    },
    "deleted_at": {
      "type": "string",
      "format": "date-time",
      "title": "Deleted at",
      "readOnly": true
    }
  },
  "$defs": {
    "ActiveStateEnum": {
      "type": "string",
      "enum": [
        "active",
        "inactive"
      ]
    }
  }
}