{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/erzycall-com/json-schema/erzycall-com-get-api-v1-usage-response-schema.json",
  "title": "GetApiV1UsageResponse",
  "x-generated": "2026-11-07",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_ae-authored/erzycall-com-openapi-generated.yml#/components/schemas/GetApiV1UsageResponse",
  "type": "object",
  "properties": {
    "plan": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "productType": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "includedMins": {
          "type": "integer"
        },
        "isTrial": {
          "type": "boolean"
        },
        "isComplimentary": {
          "type": "boolean"
        },
        "cancelAtPeriodEnd": {
          "type": "boolean"
        },
        "cancelAt": {
          "type": [
            "string",
            "null"
          ]
        },
        "features": {
          "type": "object",
          "properties": {
            "allowInbound": {
              "type": "boolean"
            },
            "allowOutbound": {
              "type": "boolean"
            },
            "allowWhatsApp": {
              "type": "boolean"
            }
          }
        }
      }
    },
    "balanceMins": {
      "type": "integer"
    },
    "isLowBalance": {
      "type": "boolean"
    },
    "period": {
      "type": "object",
      "properties": {
        "start": {
          "type": "string",
          "format": "date-time"
        },
        "end": {
          "type": "string",
          "format": "date-time"
        },
        "daysRemaining": {
          "type": "integer"
        },
        "source": {
          "type": "string"
        }
      }
    },
    "currentPeriodUsage": {
      "type": "object",
      "properties": {
        "totalMins": {
          "type": "integer"
        },
        "deductedMins": {
          "type": "integer"
        },
        "totalCalls": {
          "type": "integer"
        },
        "inbound": {
          "type": "object",
          "properties": {
            "calls": {
              "type": "integer"
            },
            "mins": {
              "type": "integer"
            }
          }
        },
        "outbound": {
          "type": "object",
          "properties": {
            "calls": {
              "type": "integer"
            },
            "mins": {
              "type": "integer"
            }
          }
        },
        "truncated": {
          "type": "boolean"
        }
      }
    },
    "trial": {
      "type": "object",
      "properties": {
        "isActive": {
          "type": "boolean"
        },
        "hasEnded": {
          "type": "boolean"
        },
        "expiredWithoutPlan": {
          "type": "boolean"
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "endsAt": {
          "type": "string",
          "format": "date-time"
        },
        "daysRemaining": {
          "type": [
            "string",
            "null"
          ]
        },
        "grantedMins": {
          "type": "integer"
        }
      }
    },
    "subscriptions": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "planId": {
            "type": "string"
          },
          "planName": {
            "type": "string"
          },
          "productType": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "currentPeriodStart": {
            "type": "string",
            "format": "date-time"
          },
          "currentPeriodEnd": {
            "type": "string",
            "format": "date-time"
          },
          "cancelAtPeriodEnd": {
            "type": "boolean"
          },
          "cancelAt": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      }
    }
  }
}