IssuingCardUpdateOptions.fromJson constructor
IssuingCardUpdateOptions.fromJson(
- Object? json
Implementation
factory IssuingCardUpdateOptions.fromJson(Object? json) {
final map = (json as Map).cast<String, Object?>();
return IssuingCardUpdateOptions(
cancellationReason: map['cancellation_reason'] == null
? null
: CardCancellationReason.fromJson(map['cancellation_reason']),
expand: map['expand'] == null
? null
: (map['expand'] as List<Object?>)
.map((el) => (el as String))
.toList(),
metadata: map['metadata'] == null
? null
: (map['metadata'] as Map).cast<String, Object?>().map((
key,
value,
) =>
MapEntry(
key,
(value as String),
)),
personalizationDesign: map['personalization_design'] == null
? null
: (map['personalization_design'] as String),
pin: map['pin'] == null ? null : CardPin.fromJson(map['pin']),
spendingControls: map['spending_controls'] == null
? null
: CardSpendingControls.fromJson(map['spending_controls']),
status: map['status'] == null
? null
: IssuingCardStatus.fromJson(map['status']),
);
}