incrementLicenseUsageWithHttpInfo method
Future<Response>
incrementLicenseUsageWithHttpInfo(
- String account,
- String license, {
- IncrementLicenseUsageRequest? incrementLicenseUsageRequest,
Increment license usage
Action to increment a license's uses attribute in accordance with its policy's maxUses attribute. When the policy's maxUses limit is exceeded, the increment attempt will fail. When the policy's maxUses is set to null, there is no limit on usage.
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 URL-safe key of the license to increment usage for.
-
IncrementLicenseUsageRequest incrementLicenseUsageRequest:
Implementation
Future<Response> incrementLicenseUsageWithHttpInfo(String account, String license, { IncrementLicenseUsageRequest? incrementLicenseUsageRequest, }) async {
// ignore: prefer_const_declarations
final path = r'/accounts/{account}/licenses/{license}/actions/increment-usage'
.replaceAll('{account}', account)
.replaceAll('{license}', license);
// ignore: prefer_final_locals
Object? postBody = incrementLicenseUsageRequest;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/vnd.api+json'];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}