QuotesResourceTransferData.fromJson constructor

QuotesResourceTransferData.fromJson(
  1. Object? json
)

Implementation

factory QuotesResourceTransferData.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return QuotesResourceTransferData(
    amount: map['amount'] == null ? null : (map['amount'] as num).toInt(),
    amountPercent: map['amount_percent'] == null
        ? null
        : (map['amount_percent'] as num).toDouble(),
    destination: AccountOrId.fromJson(map['destination']),
  );
}