decrementLicenseUsageWithHttpInfo method
Future<Response>
decrementLicenseUsageWithHttpInfo(
- String account,
- String license, {
- DecrementLicenseUsageRequest? decrementLicenseUsageRequest,
Decrement license usage
Action to decrement a license's uses
attribute in accordance with its policy's maxUses
attribute.
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 decrement usage for.
-
DecrementLicenseUsageRequest decrementLicenseUsageRequest:
Implementation
Future<Response> decrementLicenseUsageWithHttpInfo(String account, String license, { DecrementLicenseUsageRequest? decrementLicenseUsageRequest, }) async {
// ignore: prefer_const_declarations
final path = r'/accounts/{account}/licenses/{license}/actions/decrement-usage'
.replaceAll('{account}', account)
.replaceAll('{license}', license);
// ignore: prefer_final_locals
Object? postBody = decrementLicenseUsageRequest;
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,
);
}