CardholderSpendingLimitsItem.fromJson constructor

CardholderSpendingLimitsItem.fromJson(
  1. Object? json
)

Implementation

factory CardholderSpendingLimitsItem.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return CardholderSpendingLimitsItem(
    amount: (map['amount'] as num).toInt(),
    categories: map['categories'] == null
        ? null
        : (map['categories'] as List<Object?>)
            .map((el) =>
                IssuingCardholderSpendingControlsAllowedCategoriesItem
                    .fromJson(el))
            .toList(),
    interval: IssuingCardSpendingLimitInterval.fromJson(map['interval']),
  );
}