getNextScheduledTask method

Future<DynamiteResponse<TaskProcessingApiGetNextScheduledTaskResponseApplicationJson, void>> getNextScheduledTask({
  1. required BuiltList<String> providerIds,
  2. required BuiltList<String> taskTypeIds,
  3. bool? oCSAPIRequest,
})

Returns the next scheduled task for the taskTypeId.

This endpoint requires admin access.

Returns a Future containing a DynamiteResponse with the status code, deserialized body and headers. Throws a DynamiteApiException if the API call does not return an expected status code.

Parameters:

  • providerIds The ids of the providers.
  • taskTypeIds The ids of the task types.
  • oCSAPIRequest Required to be true for the API request to pass. Defaults to true.

Status codes:

  • 200: Task returned
  • 204: No task found
  • 500

See:

Implementation

Future<_i1.DynamiteResponse<TaskProcessingApiGetNextScheduledTaskResponseApplicationJson, void>>
    getNextScheduledTask({
  required BuiltList<String> providerIds,
  required BuiltList<String> taskTypeIds,
  bool? oCSAPIRequest,
}) async {
  final _request = $getNextScheduledTask_Request(
    providerIds: providerIds,
    taskTypeIds: taskTypeIds,
    oCSAPIRequest: oCSAPIRequest,
  );
  final _streamedResponse = await _rootClient.httpClient.send(_request);
  final _response = await _i3.Response.fromStream(_streamedResponse);

  final _serializer = $getNextScheduledTask_Serializer();
  return _i1.ResponseConverter<TaskProcessingApiGetNextScheduledTaskResponseApplicationJson, void>(_serializer)
      .convert(_response);
}