validateLicenseKeyWithHttpInfo method

Future<Response> validateLicenseKeyWithHttpInfo(
  1. String account, {
  2. ValidateLicenseKeyRequest? validateLicenseKeyRequest,
})

Validate by license key

Action to validate a license key. This will look up the license by its key and check the following: if the license is suspended, if the license is expired, if the license is overdue for check-in, and if the license meets its machine requirements (if strict). Additional scopes can also be applied, and may be required by the license's policy, e.g. a policy may set requireFingerprintScope=true, which will require that you specify a scope.fingerprint within the validation request in order to pass validation. The scoping feature allows you to easily set up a node-locked or floating licensing model without additional logic on your end.

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<Response> validateLicenseKeyWithHttpInfo(String account, { ValidateLicenseKeyRequest? validateLicenseKeyRequest, }) async {
  // ignore: prefer_const_declarations
  final path = r'/accounts/{account}/licenses/actions/validate-key'
    .replaceAll('{account}', account);

  // ignore: prefer_final_locals
  Object? postBody = validateLicenseKeyRequest;

  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,
  );
}