{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/lockally-com/json-schema/lockally-com-billing-status-schema.json",
  "title": "BillingStatus",
  "x-generated": "2026-11-17",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/lockally-com-openapi.yml#/components/schemas/BillingStatus",
  "type": "object",
  "required": [
    "plan",
    "display_name",
    "mode",
    "rate_cap_per_min",
    "monthly_included_sends",
    "msgs_this_period",
    "status",
    "price_naira_per_seat",
    "created_at",
    "send_units_balance",
    "unit_bundles",
    "catalog"
  ],
  "properties": {
    "plan": {
      "type": "string"
    },
    "display_name": {
      "type": "string"
    },
    "mode": {
      "type": "string",
      "enum": [
        "api",
        "business",
        "both"
      ]
    },
    "rate_cap_per_min": {
      "type": "integer"
    },
    "monthly_included_sends": {
      "type": "integer"
    },
    "msgs_this_period": {
      "type": "integer"
    },
    "status": {
      "type": "string",
      "enum": [
        "active",
        "suspended"
      ]
    },
    "price_naira_per_seat": {
      "type": "integer"
    },
    "subscribed_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "current_period_end": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "send_units_balance": {
      "type": "integer"
    },
    "send_units_next_expiry": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "unit_bundles": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/UnitBundle"
      }
    },
    "catalog": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PlanCatalogEntry"
      }
    }
  },
  "$defs": {
    "PlanCatalogEntry": {
      "type": "object",
      "required": [
        "name",
        "display_name",
        "description",
        "price_naira_per_seat",
        "rate_cap_per_min",
        "monthly_included_sends",
        "has_shared_mailboxes",
        "has_send_units",
        "has_ai_units",
        "has_e2e_encryption"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "display_name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "price_naira_per_seat": {
          "type": "integer"
        },
        "rate_cap_per_min": {
          "type": "integer"
        },
        "monthly_included_sends": {
          "type": "integer"
        },
        "has_shared_mailboxes": {
          "type": "boolean"
        },
        "has_send_units": {
          "type": "boolean"
        },
        "has_ai_units": {
          "type": "boolean"
        },
        "has_e2e_encryption": {
          "type": "boolean"
        }
      }
    },
    "UnitBundle": {
      "type": "object",
      "required": [
        "key",
        "units",
        "display_name",
        "price_naira",
        "display_price"
      ],
      "properties": {
        "key": {
          "type": "string"
        },
        "units": {
          "type": "integer"
        },
        "display_name": {
          "type": "string"
        },
        "price_naira": {
          "type": "integer"
        },
        "display_price": {
          "type": "string"
        }
      }
    }
  }
}