TerminalReaderCreateOptions.fromJson constructor
TerminalReaderCreateOptions.fromJson(
- Object? json
Implementation
factory TerminalReaderCreateOptions.fromJson(Object? json) {
final map = (json as Map).cast<String, Object?>();
return TerminalReaderCreateOptions(
expand: map['expand'] == null
? null
: (map['expand'] as List<Object?>)
.map((el) => (el as String))
.toList(),
label: map['label'] == null ? null : (map['label'] as String),
location: map['location'] == null ? null : (map['location'] as String),
metadata: map['metadata'] == null
? null
: (map['metadata'] as Map).cast<String, Object?>().map((
key,
value,
) =>
MapEntry(
key,
(value as String),
)),
registrationCode: (map['registration_code'] as String),
);
}