TreasuryReceivedDebitsResourceReversalDetails.fromJson constructor

TreasuryReceivedDebitsResourceReversalDetails.fromJson(
  1. Object? json
)

Implementation

factory TreasuryReceivedDebitsResourceReversalDetails.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return TreasuryReceivedDebitsResourceReversalDetails(
    deadline: map['deadline'] == null
        ? null
        : DateTime.fromMillisecondsSinceEpoch(
            (map['deadline'] as int).toInt()),
    restrictedReason: map['restricted_reason'] == null
        ? null
        : TreasuryReceivedCreditReversalDetailsRestrictedReason.fromJson(
            map['restricted_reason']),
  );
}