code: public TaskStatusesHistoryEnvelope getStatusesHistory(String tid, String did) throws ApiException {
          ApiResponse<TaskStatusesHistoryEnvelope> resp = getStatusesHistoryWithHttpInfo(tid, did);
          return resp.getData();
      }
docs: Returns the history of the status changes for a specific task id, or for a specific device id in that task.
  Returns the history of the status changes for a specific task id, or for a specific device id in that task.
  @param tid Task ID. (required)
  @param did Device ID. Optional. (optional)
  @return TaskStatusesHistoryEnvelope
  @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body