CardholderSpendingControls.fromJson constructor
CardholderSpendingControls.fromJson(
- Object? json
Implementation
factory CardholderSpendingControls.fromJson(Object? json) {
final map = (json as Map).cast<String, Object?>();
return CardholderSpendingControls(
allowedCategories: map['allowed_categories'] == null
? null
: (map['allowed_categories'] as List<Object?>)
.map((el) =>
IssuingCardholderSpendingControlsAllowedCategoriesItem
.fromJson(el))
.toList(),
blockedCategories: map['blocked_categories'] == null
? null
: (map['blocked_categories'] as List<Object?>)
.map((el) =>
IssuingCardholderSpendingControlsAllowedCategoriesItem
.fromJson(el))
.toList(),
spendingLimits: map['spending_limits'] == null
? null
: (map['spending_limits'] as List<Object?>)
.map((el) => CardholderSpendingLimitsItem.fromJson(el))
.toList(),
spendingLimitsCurrency: map['spending_limits_currency'] == null
? null
: (map['spending_limits_currency'] as String),
);
}