TreasuryInboundTransfersResourceInboundTransferResourceStatusTransitions.fromJson constructor

TreasuryInboundTransfersResourceInboundTransferResourceStatusTransitions.fromJson(
  1. Object? json
)

Implementation

factory TreasuryInboundTransfersResourceInboundTransferResourceStatusTransitions.fromJson(
    Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return TreasuryInboundTransfersResourceInboundTransferResourceStatusTransitions(
    canceledAt: map['canceled_at'] == null
        ? null
        : DateTime.fromMillisecondsSinceEpoch(
            (map['canceled_at'] as int).toInt()),
    failedAt: map['failed_at'] == null
        ? null
        : DateTime.fromMillisecondsSinceEpoch(
            (map['failed_at'] as int).toInt()),
    succeededAt: map['succeeded_at'] == null
        ? null
        : DateTime.fromMillisecondsSinceEpoch(
            (map['succeeded_at'] as int).toInt()),
  );
}