PaymentIntentNextActionCardAwaitNotification.fromJson constructor

PaymentIntentNextActionCardAwaitNotification.fromJson(
  1. Object? json
)

Implementation

factory PaymentIntentNextActionCardAwaitNotification.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return PaymentIntentNextActionCardAwaitNotification(
    chargeAttemptAt: map['charge_attempt_at'] == null
        ? null
        : DateTime.fromMillisecondsSinceEpoch(
            (map['charge_attempt_at'] as int).toInt()),
    customerApprovalRequired: map['customer_approval_required'] == null
        ? null
        : (map['customer_approval_required'] as bool),
  );
}