{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/recurly/json-schema/recurly-entitlement-list-schema.json",
  "title": "EntitlementList",
  "description": "A list of privileges granted to a customer through the purchase of a plan or item.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/recurly-account-api-openapi.yml#/components/schemas/EntitlementList",
  "type": "object",
  "properties": {
    "object": {
      "type": "string",
      "title": "Object Type"
    },
    "has_more": {
      "type": "boolean",
      "description": "Indicates there are more results on subsequent pages."
    },
    "next": {
      "type": "string",
      "description": "Path to subsequent page of results."
    },
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Entitlement"
      }
    }
  },
  "$defs": {
    "CustomerPermission": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Customer permission ID."
        },
        "code": {
          "type": "string",
          "description": "Customer permission code."
        },
        "name": {
          "type": "string",
          "description": "Customer permission name."
        },
        "description": {
          "type": "string",
          "description": "Description of customer permission."
        },
        "object": {
          "type": "string",
          "description": "It will always be \"customer_permission\"."
        }
      }
    },
    "Entitlement": {
      "type": "object",
      "properties": {
        "object": {
          "type": "string",
          "description": "Entitlement"
        },
        "customer_permission": {
          "$ref": "#/$defs/CustomerPermission"
        },
        "granted_by": {
          "type": "array",
          "description": "Subscription or item that granted the customer permission.",
          "items": {
            "$ref": "#/$defs/GrantedBy"
          }
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "description": "Time object was created."
        },
        "updated_at": {
          "type": "string",
          "format": "date-time",
          "description": "Time the object was last updated"
        }
      }
    },
    "GrantedBy": {
      "type": "object",
      "description": "The subscription or external subscription that grants customer permissions.",
      "properties": {
        "object": {
          "type": "string",
          "title": "Object Type"
        },
        "id": {
          "type": "string",
          "description": "The ID of the subscription or external subscription that grants the permission to the account."
        }
      }
    }
  }
}