PaymentIntentPix.fromJson constructor

PaymentIntentPix.fromJson(
  1. Object? json
)

Implementation

factory PaymentIntentPix.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return PaymentIntentPix(
    expiresAfterSeconds: map['expires_after_seconds'] == null
        ? null
        : (map['expires_after_seconds'] as num).toInt(),
    expiresAt: map['expires_at'] == null
        ? null
        : DateTime.fromMillisecondsSinceEpoch(
            (map['expires_at'] as int).toInt()),
  );
}