disassociateQualificationFromWorker method
The DisassociateQualificationFromWorker
revokes a previously
granted Qualification from a user.
You can provide a text message explaining why the Qualification was revoked. The user who had the Qualification can see this message.
May throw ServiceFault. May throw RequestError.
Parameter qualificationTypeId
:
The ID of the Qualification type of the Qualification to be revoked.
Parameter workerId
:
The ID of the Worker who possesses the Qualification to be revoked.
Parameter reason
:
A text message that explains why the Qualification was revoked. The user
who had the Qualification sees this message.
Implementation
Future<void> disassociateQualificationFromWorker({
required String qualificationTypeId,
required String workerId,
String? reason,
}) async {
ArgumentError.checkNotNull(qualificationTypeId, 'qualificationTypeId');
_s.validateStringLength(
'qualificationTypeId',
qualificationTypeId,
1,
64,
isRequired: true,
);
ArgumentError.checkNotNull(workerId, 'workerId');
_s.validateStringLength(
'workerId',
workerId,
1,
64,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target':
'MTurkRequesterServiceV20170117.DisassociateQualificationFromWorker'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'QualificationTypeId': qualificationTypeId,
'WorkerId': workerId,
if (reason != null) 'Reason': reason,
},
);
}