getUsageSummaryWithHttpInfo method

Future<Response> getUsageSummaryWithHttpInfo({
  1. String? range,
  2. String? start,
  3. String? end,
})

Answers GET /v1/usage/summary: the caller's own usage footprint over one window — the categorized spend roll-up from the commerce ledger, the org's LLM usage totals from the warehouse, and the caller's OWN linked provider accounts beside the org's Hanzo-routed usage.

Answers GET /v1/usage/summary: the caller's own usage footprint over one window — the categorized spend roll-up from the commerce ledger, the org's LLM usage totals from the warehouse, and the caller's OWN linked provider accounts beside the org's Hanzo-routed usage. Every source degrades INDEPENDENTLY to honest zeros and says so in sources and in its own available flag, so a partial deploy reports "no data" rather than fabricating spend. The account rows and the Hanzo rows are concatenated and never summed: a plan's percent is not money. The response is org-scoped from the validated principal and marked no-store — a signed-out caller is refused.

Note: This method returns the HTTP Response.

Parameters:

  • String range: Range is the window: a count and a unit — 24h, 7d, 90d, any

  • String start: Start is the inclusive window start, RFC3339. Read only when Range is custom.

  • String end: End is the exclusive window end, RFC3339. Read only when Range is custom.

Implementation

Future<Response> getUsageSummaryWithHttpInfo({ String? range, String? start, String? end, }) async {
  // ignore: prefer_const_declarations
  final path = r'/v1/usage/summary';

  // ignore: prefer_final_locals
  Object? postBody;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  if (range != null) {
    queryParams.addAll(_queryParams('', 'range', range));
  }
  if (start != null) {
    queryParams.addAll(_queryParams('', 'start', start));
  }
  if (end != null) {
    queryParams.addAll(_queryParams('', 'end', end));
  }

  const contentTypes = <String>[];


  return apiClient.invokeAPI(
    path,
    'GET',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}