TerminalReaderProcessPaymentIntentOptions.fromJson constructor

TerminalReaderProcessPaymentIntentOptions.fromJson(
  1. Object? json
)

Implementation

factory TerminalReaderProcessPaymentIntentOptions.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return TerminalReaderProcessPaymentIntentOptions(
    expand: map['expand'] == null
        ? null
        : (map['expand'] as List<Object?>)
            .map((el) => (el as String))
            .toList(),
    paymentIntent: (map['payment_intent'] as String),
    processConfig: map['process_config'] == null
        ? null
        : ReaderProcessConfig.fromJson(map['process_config']),
  );
}