BalanceAmountBySourceType.fromJson constructor

BalanceAmountBySourceType.fromJson(
  1. Object? json
)

Implementation

factory BalanceAmountBySourceType.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return BalanceAmountBySourceType(
    bankAccount: map['bank_account'] == null
        ? null
        : (map['bank_account'] as num).toInt(),
    card: map['card'] == null ? null : (map['card'] as num).toInt(),
    fpx: map['fpx'] == null ? null : (map['fpx'] as num).toInt(),
  );
}