TerminalLocationUpdateOptions.fromJson constructor

TerminalLocationUpdateOptions.fromJson(
  1. Object? json
)

Implementation

factory TerminalLocationUpdateOptions.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return TerminalLocationUpdateOptions(
    address: map['address'] == null
        ? null
        : AccountSupportAddress.fromJson(map['address']),
    configurationOverrides: map['configuration_overrides'] == null
        ? null
        : (map['configuration_overrides'] as String),
    displayName:
        map['display_name'] == null ? null : (map['display_name'] as String),
    expand: map['expand'] == null
        ? null
        : (map['expand'] as List<Object?>)
            .map((el) => (el as String))
            .toList(),
    metadata: map['metadata'] == null
        ? null
        : (map['metadata'] as Map).cast<String, Object?>().map((
              key,
              value,
            ) =>
                MapEntry(
                  key,
                  (value as String),
                )),
  );
}