QuotesResourceStatusTransitions.fromJson constructor

QuotesResourceStatusTransitions.fromJson(
  1. Object? json
)

Implementation

factory QuotesResourceStatusTransitions.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return QuotesResourceStatusTransitions(
    acceptedAt: map['accepted_at'] == null
        ? null
        : DateTime.fromMillisecondsSinceEpoch(
            (map['accepted_at'] as int).toInt()),
    canceledAt: map['canceled_at'] == null
        ? null
        : DateTime.fromMillisecondsSinceEpoch(
            (map['canceled_at'] as int).toInt()),
    finalizedAt: map['finalized_at'] == null
        ? null
        : DateTime.fromMillisecondsSinceEpoch(
            (map['finalized_at'] as int).toInt()),
  );
}