TerminalReaderPresentPaymentMethodOptions.fromJson constructor
TerminalReaderPresentPaymentMethodOptions.fromJson(
- Object? json
Implementation
factory TerminalReaderPresentPaymentMethodOptions.fromJson(Object? json) {
final map = (json as Map).cast<String, Object?>();
return TerminalReaderPresentPaymentMethodOptions(
amountTip:
map['amount_tip'] == null ? null : (map['amount_tip'] as num).toInt(),
cardPresent: map['card_present'] == null
? null
: ReaderCardPresent.fromJson(map['card_present']),
expand: map['expand'] == null
? null
: (map['expand'] as List<Object?>)
.map((el) => (el as String))
.toList(),
interacPresent: map['interac_present'] == null
? null
: ReaderCardPresent.fromJson(map['interac_present']),
type: map['type'] == null ? null : ReaderType.fromJson(map['type']),
);
}