TransferReversalCreateOptions.fromJson constructor
TransferReversalCreateOptions.fromJson(
- Object? json
Implementation
factory TransferReversalCreateOptions.fromJson(Object? json) {
final map = (json as Map).cast<String, Object?>();
return TransferReversalCreateOptions(
amount: map['amount'] == null ? null : (map['amount'] as num).toInt(),
description:
map['description'] == null ? null : (map['description'] as String),
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),
)),
refundApplicationFee: map['refund_application_fee'] == null
? null
: (map['refund_application_fee'] as bool),
);
}