attachLicenseEntitlementsWithHttpInfo method
Future<Response>
attachLicenseEntitlementsWithHttpInfo(
- String account,
- String license,
- AttachLicenseEntitlementsRequest attachLicenseEntitlementsRequest
Attach license entitlements
Attach entitlements to a license. This will immediately be taken into effect for all future validations. Below are the limitations to attaching an entitlement: - You cannot attach an entitlement that is already attached through the policy. - You cannot attach an already attached entitlement.
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.
-
AttachLicenseEntitlementsRequest attachLicenseEntitlementsRequest (required):
Implementation
Future<Response> attachLicenseEntitlementsWithHttpInfo(String account, String license, AttachLicenseEntitlementsRequest attachLicenseEntitlementsRequest,) async {
// ignore: prefer_const_declarations
final path = r'/accounts/{account}/licenses/{license}/entitlements'
.replaceAll('{account}', account)
.replaceAll('{license}', license);
// ignore: prefer_final_locals
Object? postBody = attachLicenseEntitlementsRequest;
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,
);
}