コード例 #1
0
  public static void main(String[] args) throws TwilioRestException {
    TwilioTaskRouterClient client = new TwilioTaskRouterClient(ACCOUNT_SID, AUTH_TOKEN);

    // accept a reservation
    Task task = client.getTask(WORKSPACE_SID, TASK_SID);
    for (Reservation reservation : task.getReservations()) {
      Map<String, String> params = new HashMap<String, String>();
      params.put("ReservationStatus", "accepted");
      reservation.update(params);
    }

    // accept a reservation #2
    task = client.getTask(WORKSPACE_SID, TASK_SID);
    for (Reservation reservation : task.getReservations()) {
      reservation.accept();
    }
  }
コード例 #2
0
  public static void main(String[] args) throws TwilioRestException {
    TwilioTaskRouterClient client = new TwilioTaskRouterClient(ACCOUNT_SID, AUTH_TOKEN);

    client.deleteTaskQueue(WORKSPACE_SID, TASKQUEUE_SID);
  }