IssuingTransactionReceiptData.fromJson constructor

IssuingTransactionReceiptData.fromJson(
  1. Object? json
)

Implementation

factory IssuingTransactionReceiptData.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return IssuingTransactionReceiptData(
    description:
        map['description'] == null ? null : (map['description'] as String),
    quantity:
        map['quantity'] == null ? null : (map['quantity'] as num).toDouble(),
    total: map['total'] == null ? null : (map['total'] as num).toInt(),
    unitCost:
        map['unit_cost'] == null ? null : (map['unit_cost'] as num).toInt(),
  );
}