PaymentIntentCancelOptions.fromJson constructor
PaymentIntentCancelOptions.fromJson(
- Object? json
Implementation
factory PaymentIntentCancelOptions.fromJson(Object? json) {
final map = (json as Map).cast<String, Object?>();
return PaymentIntentCancelOptions(
cancellationReason: map['cancellation_reason'] == null
? null
: PaymentIntentCancelOptionsCancellationReason.fromJson(
map['cancellation_reason']),
expand: map['expand'] == null
? null
: (map['expand'] as List<Object?>)
.map((el) => (el as String))
.toList(),
);
}