BatchStartResponse.fromJson constructor

BatchStartResponse.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory BatchStartResponse.fromJson(Map<String, dynamic> json) {
  return BatchStartResponse(
    failed: (json['failed'] as List?)
        ?.whereNotNull()
        .map(
            (e) => BatchFailedResultModel.fromJson(e as Map<String, dynamic>))
        .toList(),
    successful: (json['successful'] as List?)
        ?.whereNotNull()
        .map((e) =>
            BatchSuccessfulResultModel.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}