changeLicensePolicyWithHttpInfo method

Future<Response> changeLicensePolicyWithHttpInfo(
  1. String account,
  2. String license,
  3. ChangeLicensePolicyRequest changeLicensePolicyRequest
)

Change policy

Change a license's policy relationship. This will immediately be taken into effect for all future validations. The license's expiry may be changed, according to the new policy's transfer strategy. Below are the limitations to changing a license's policy: - You cannot change from an encrypted policy to an unencrypted policy (or vice-versa). - You cannot change from a pooled policy to an unpooled policy (or vice-versa). - You cannot change to a policy that has a less strict fingerprint strategy. - You cannot change to a policy that has a different cryptographic scheme.

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 key of the license to be updated.

  • ChangeLicensePolicyRequest changeLicensePolicyRequest (required):

Implementation

Future<Response> changeLicensePolicyWithHttpInfo(String account, String license, ChangeLicensePolicyRequest changeLicensePolicyRequest,) async {
  // ignore: prefer_const_declarations
  final path = r'/accounts/{account}/licenses/{license}/policy'
    .replaceAll('{account}', account)
    .replaceAll('{license}', license);

  // ignore: prefer_final_locals
  Object? postBody = changeLicensePolicyRequest;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  const contentTypes = <String>['application/vnd.api+json'];


  return apiClient.invokeAPI(
    path,
    'PUT',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}