getRequestCommentById method

Future<CommentDTO> getRequestCommentById({
  1. required String issueIdOrKey,
  2. required int commentId,
  3. List<String>? expand,
})

This method returns details of a customer request's comment.

Permissions required: Permission to view the customer request.

Response limitations: Customers can only view public comments on requests where they are the reporter or a participant whereas agents can see both internal and public comments.

Implementation

Future<CommentDTO> getRequestCommentById(
    {required String issueIdOrKey,
    required int commentId,
    List<String>? expand}) async {
  return CommentDTO.fromJson(await _client.send(
    'get',
    'rest/servicedeskapi/request/{issueIdOrKey}/comment/{commentId}',
    pathParameters: {
      'issueIdOrKey': issueIdOrKey,
      'commentId': '$commentId',
    },
    queryParameters: {
      if (expand != null) 'expand': expand.map((e) => e).join(','),
    },
  ));
}