PaymentIntentKonbini.fromJson constructor

PaymentIntentKonbini.fromJson(
  1. Object? json
)

Implementation

factory PaymentIntentKonbini.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return PaymentIntentKonbini(
    confirmationNumber: map['confirmation_number'] == null
        ? null
        : (map['confirmation_number'] as String),
    expiresAfterDays: map['expires_after_days'] == null
        ? null
        : (map['expires_after_days'] as num).toInt(),
    expiresAt: map['expires_at'] == null
        ? null
        : DateTime.fromMillisecondsSinceEpoch(
            (map['expires_at'] as int).toInt()),
    productDescription: map['product_description'] == null
        ? null
        : (map['product_description'] as String),
  );
}