DisputeServiceNotAsDescribed.fromJson constructor

DisputeServiceNotAsDescribed.fromJson(
  1. Object? json
)

Implementation

factory DisputeServiceNotAsDescribed.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return DisputeServiceNotAsDescribed(
    additionalDocumentation: map['additional_documentation'] == null
        ? null
        : (map['additional_documentation'] as String),
    canceledAt: map['canceled_at'] == null
        ? null
        : DateTime.fromMillisecondsSinceEpoch(
            (map['canceled_at'] as int).toInt()),
    cancellationReason: map['cancellation_reason'] == null
        ? null
        : (map['cancellation_reason'] as String),
    explanation:
        map['explanation'] == null ? null : (map['explanation'] as String),
    receivedAt: map['received_at'] == null
        ? null
        : DateTime.fromMillisecondsSinceEpoch(
            (map['received_at'] as int).toInt()),
  );
}