checkOutLicenseWithHttpInfo method
Check-out license
Action to check-out a license. This will generate a snapshot of the license at time of checkout, encoded into a license file certificate that can be decoded and used for licensing offline and air-gapped environments. The algorithm will depend on the policy's scheme
. License files can be distributed using email or USB drives to air-gapped devices. For instructions on verifying a license file, please see license file verification.
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 check-out.
-
int ttl: The time-to-live (TTL) of the checked out license file, in seconds.
-
List<String> include: Include relationship data in the license file.
Implementation
Future<Response> checkOutLicenseWithHttpInfo(String account, String license, { int? ttl, List<String>? include, }) async {
// ignore: prefer_const_declarations
final path = r'/accounts/{account}/licenses/{license}/actions/check-out'
.replaceAll('{account}', account)
.replaceAll('{license}', license);
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
if (ttl != null) {
queryParams.addAll(_queryParams('', 'ttl', ttl));
}
if (include != null) {
queryParams.addAll(_queryParams('multi', 'include', include));
}
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}