listLicenseEntitlementsWithHttpInfo method

Future<Response> listLicenseEntitlementsWithHttpInfo(
  1. String account,
  2. String license, {
  3. Object? page,
  4. int? limit,
})

List license entitlements

Returns a list of entitlements attached to the license. The entitlements are returned sorted by creation date, with the most recent entitlements appearing first. The listed entitlements include all entitlements attached to the license's policy, in addition to the entitlements attached to the particular license.

Note: This method returns the HTTP Response.

Parameters:

  • String account (required): The identifier (UUID) or slug of your Keygen account.

  • String license (required): The identifier (UUID) or key of the license to list entitlements for.

  • Object page: Object containing page size and page number.

  • int limit:

Implementation

Future<Response> listLicenseEntitlementsWithHttpInfo(String account, String license, { Object? page, int? limit, }) async {
  // ignore: prefer_const_declarations
  final path = r'/accounts/{account}/licenses/{license}/entitlements'
    .replaceAll('{account}', account)
    .replaceAll('{license}', license);

  // ignore: prefer_final_locals
  Object? postBody;

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

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

  const contentTypes = <String>[];


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