code: public ApiSuccessResponse leaveChat(String id, LeaveData leaveData) throws ApiException {
          ApiResponse<ApiSuccessResponse> resp = leaveChatWithHttpInfo(id, leaveData);
          return resp.getData();
      }
docs: Leave a chat
  Leave the specified chat or conference. If the agent is in a conference, the chat session stays open for the customer. If the agent is not in a conference, the chat ends for the customer but the agent can still update user data and set disposition.
  @param id The ID of the chat interaction. (required)
  @param leaveData Request parameters. (optional)
  @return ApiSuccessResponse
  @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body