IssuingDisputeCanceledEvidence.fromJson constructor

IssuingDisputeCanceledEvidence.fromJson(
  1. Object? json
)

Implementation

factory IssuingDisputeCanceledEvidence.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return IssuingDisputeCanceledEvidence(
    additionalDocumentation: map['additional_documentation'] == null
        ? null
        : FileOrId.fromJson(map['additional_documentation']),
    canceledAt: map['canceled_at'] == null
        ? null
        : DateTime.fromMillisecondsSinceEpoch(
            (map['canceled_at'] as int).toInt()),
    cancellationPolicyProvided: map['cancellation_policy_provided'] == null
        ? null
        : (map['cancellation_policy_provided'] as bool),
    cancellationReason: map['cancellation_reason'] == null
        ? null
        : (map['cancellation_reason'] as String),
    expectedAt: map['expected_at'] == null
        ? null
        : DateTime.fromMillisecondsSinceEpoch(
            (map['expected_at'] as int).toInt()),
    explanation:
        map['explanation'] == null ? null : (map['explanation'] as String),
    productDescription: map['product_description'] == null
        ? null
        : (map['product_description'] as String),
    productType: map['product_type'] == null
        ? null
        : IssuingDisputeCanceledEvidenceProductType.fromJson(
            map['product_type']),
    returnStatus: map['return_status'] == null
        ? null
        : IssuingDisputeCanceledEvidenceReturnStatus.fromJson(
            map['return_status']),
    returnedAt: map['returned_at'] == null
        ? null
        : DateTime.fromMillisecondsSinceEpoch(
            (map['returned_at'] as int).toInt()),
  );
}