DisputeMerchandiseNotAsDescribed.fromJson constructor

DisputeMerchandiseNotAsDescribed.fromJson(
  1. Object? json
)

Implementation

factory DisputeMerchandiseNotAsDescribed.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return DisputeMerchandiseNotAsDescribed(
    additionalDocumentation: map['additional_documentation'] == null
        ? null
        : (map['additional_documentation'] 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()),
    returnDescription: map['return_description'] == null
        ? null
        : (map['return_description'] as String),
    returnStatus: map['return_status'] == null
        ? null
        : DisputeReturnStatus.fromJson(map['return_status']),
    returnedAt: map['returned_at'] == null
        ? null
        : DateTime.fromMillisecondsSinceEpoch(
            (map['returned_at'] as int).toInt()),
  );
}