PaymentIntentNextActionKonbini.fromJson constructor

PaymentIntentNextActionKonbini.fromJson(
  1. Object? json
)

Implementation

factory PaymentIntentNextActionKonbini.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return PaymentIntentNextActionKonbini(
    expiresAt: DateTime.fromMillisecondsSinceEpoch(
        (map['expires_at'] as int).toInt()),
    hostedVoucherUrl: map['hosted_voucher_url'] == null
        ? null
        : (map['hosted_voucher_url'] as String),
    stores: PaymentIntentNextActionKonbiniStores.fromJson(map['stores']),
  );
}