getLinkUsageSummaryWithHttpInfo method

Future<Response> getLinkUsageSummaryWithHttpInfo({
  1. String? range,
})

Shows plan consumption and Hanzo spend side by side.

Shows plan consumption and Hanzo spend side by side. It answers the global usage board over one window: the caller's own linked accounts, metered from each provider's own login, alongside their org's Hanzo-routed inference. These come from different ledgers and mean different things, so every row is LABELLED by source, by scope and by availability, and THE TWO ARE NEVER SUMMED — a plan's percentage is not money, and a provider's own spend is not a Hanzo charge. The rows sit side by side and say what they are. One resolver fixes the window for both halves, so the two sets always cover the same period. range is one of 1h, 24h, 7d or 30d and defaults to 24h; anything else is 400 rather than a silent substitution. A ledger that cannot answer reports available:false instead of a zero that would read as "no usage".

Note: This method returns the HTTP Response.

Parameters:

  • String range: Range is the period, one of 1h, 24h, 7d or 30d; empty means 24h, and an unknown label is 400, never a silent substitution.

Implementation

Future<Response> getLinkUsageSummaryWithHttpInfo({ String? range, }) async {
  // ignore: prefer_const_declarations
  final path = r'/v1/link/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));
  }

  const contentTypes = <String>[];


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