RadarEarlyFraudWarning.fromJson constructor

RadarEarlyFraudWarning.fromJson(
  1. Object? json
)

Implementation

factory RadarEarlyFraudWarning.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return RadarEarlyFraudWarning(
    actionable: (map['actionable'] as bool),
    charge: ChargeOrId.fromJson(map['charge']),
    created:
        DateTime.fromMillisecondsSinceEpoch((map['created'] as int).toInt()),
    fraudType: (map['fraud_type'] as String),
    id: (map['id'] as String),
    livemode: (map['livemode'] as bool),
    paymentIntent: map['payment_intent'] == null
        ? null
        : PaymentIntentOrId.fromJson(map['payment_intent']),
  );
}