getUsageAnalyticsAccessWithHttpInfo method

Future<Response> getUsageAnalyticsAccessWithHttpInfo({
  1. String? plan,
})

Echoes a plan's resolved analytics entitlement so a dashboard can configure itself against the LIVE catalog instead of hardcoding tier numbers.

Echoes a plan's resolved analytics entitlement so a dashboard can configure itself against the LIVE catalog instead of hardcoding tier numbers. An empty plan resolves the free floor, and a catalog resolution failure serves that same floor rather than erroring — so this always answers 200. It is a read-only contract echo and carries no tenant data.

Note: This method returns the HTTP Response.

Parameters:

  • String plan: Plan is a plan id from the live @hanzo/plans catalog. Empty resolves the free floor, and so does an id the catalog does not know — this never fails on an unknown plan.

Implementation

Future<Response> getUsageAnalyticsAccessWithHttpInfo({ String? plan, }) async {
  // ignore: prefer_const_declarations
  final path = r'/v1/usage/analytics/access';

  // ignore: prefer_final_locals
  Object? postBody;

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

  if (plan != null) {
    queryParams.addAll(_queryParams('', 'plan', plan));
  }

  const contentTypes = <String>[];


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