toJson method

Map<String, dynamic> toJson()

Converts the batch data to a Map.

Implementation

Map<String, dynamic> toJson() => {
      if (batchCode != null) 'batch_code': batchCode,
      if (reference != null) 'reference': reference,
      if (status != null) 'status': status,
      if (totalCharges != null) 'total_charges': totalCharges,
      if (pendingCharges != null) 'pending_charges': pendingCharges,
      if (unit != null) 'unit': unit,
      if (id != null) 'id': id,
      if (integration != null) 'integration': integration,
      if (createdAt != null) 'createdAt': createdAt,
      if (updatedAt != null) 'updatedAt': updatedAt,
    };