riskLabel method
Assert ground truth about events
Records a batch of ground truth against the entities it judges. Each assertion carries TWO times — when the judged event happened, and when the assertion became knowable — and both are required. The second is what keeps a chargeback that landed in June out of a model that had to decide in February. It is idempotent on the CONTENT of an assertion, so a webhook that redelivers is safe. It never overwrites: a source that corrects itself later files a NEW assertion, which wins from the moment it became knowable and leaves every earlier observation instant seeing exactly what it saw. The asserter is stamped from the validated credential and is not a body field.
Parameters:
- RiskLabelIn riskLabelIn (required):
Implementation
Future<RiskLabelOut?> riskLabel(RiskLabelIn riskLabelIn,) async {
final response = await riskLabelWithHttpInfo(riskLabelIn,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'RiskLabelOut',) as RiskLabelOut;
}
return null;
}