setLicenseWithHttpInfo method
Future<Response>
setLicenseWithHttpInfo(
- LicenseToken licenseToken, {
- bool? dryrun,
- String? uuidToken,
Set license key
Sets the given license key.
Note: This method returns the HTTP Response.
Parameters:
-
LicenseToken licenseToken (required):
-
bool dryrun: Just validate the license key, instead of writing into the device's configuraton file
-
String uuidToken: Used for remote connections to device
Implementation
Future<Response> setLicenseWithHttpInfo(
LicenseToken licenseToken, {
bool? dryrun,
String? uuidToken,
}) async {
// ignore: prefer_const_declarations
final path = uuidToken != null
? '${LbSetupEnvironment.getApiEndpoint(iotUuid: uuidToken)}/device/license'
: '/device/license';
// ignore: prefer_final_locals
Object? postBody = licenseToken;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
if (dryrun != null) {
queryParams.addAll(_queryParams('', 'dryrun', dryrun));
}
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}