code: public ApiResponse<ApiSuccessResponse> leaveChatWithHttpInfo(String id, LeaveData leaveData) throws ApiException {
          com.squareup.okhttp.Call call = leaveChatValidateBeforeCall(id, leaveData, null, null);
          Type localVarReturnType = new TypeToken<ApiSuccessResponse>(){}.getType();
          return apiClient.execute(call, localVarReturnType);
      }
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 ApiResponse&lt;ApiSuccessResponse&gt;
  @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body