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