listEntitlementsWithHttpInfo method
List all entitlements
Returns a list of entitlements. The entitlements are returned sorted by creation date, with the most recent entitlements appearing first. Resources are automatically scoped to the authenticated bearer e.g. when authenticated as a license, only entitlements attached to that specific license will be listed.
Note: This method returns the HTTP Response
.
Parameters:
Implementation
Future<Response> listEntitlementsWithHttpInfo(String account, { Object? page, int? limit, }) async {
// ignore: prefer_const_declarations
final path = r'/accounts/{account}/entitlements'
.replaceAll('{account}', account);
// 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,
);
}