updateCase method

Future<void> updateCase({
  1. required String caseId,
  2. required String domainId,
  3. required List<FieldValue> fields,
  4. UserUnion? performedBy,
})
Updates the values of fields on a case. Fields to be updated are received as an array of id/value pairs identical to the CreateCase input .

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter caseId : A unique identifier of the case.

Parameter domainId : The unique identifier of the Cases domain.

Parameter fields : An array of objects with fieldId (matching ListFields/DescribeField) and value union data, structured identical to CreateCase.

Implementation

Future<void> updateCase({
  required String caseId,
  required String domainId,
  required List<FieldValue> fields,
  UserUnion? performedBy,
}) async {
  final $payload = <String, dynamic>{
    'fields': fields,
    if (performedBy != null) 'performedBy': performedBy,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/domains/${Uri.encodeComponent(domainId)}/cases/${Uri.encodeComponent(caseId)}',
    exceptionFnMap: _exceptionFns,
  );
}