CustomerFundCashBalanceOptions.fromJson constructor

CustomerFundCashBalanceOptions.fromJson(
  1. Object? json
)

Implementation

factory CustomerFundCashBalanceOptions.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return CustomerFundCashBalanceOptions(
    amount: (map['amount'] as num).toInt(),
    currency: (map['currency'] as String),
    expand: map['expand'] == null
        ? null
        : (map['expand'] as List<Object?>)
            .map((el) => (el as String))
            .toList(),
    reference: map['reference'] == null ? null : (map['reference'] as String),
  );
}