AuthorizationLodging.fromJson constructor
AuthorizationLodging.fromJson(
- Object? json
Implementation
factory AuthorizationLodging.fromJson(Object? json) {
final map = (json as Map).cast<String, Object?>();
return AuthorizationLodging(
checkInAt: map['check_in_at'] == null
? null
: DateTime.fromMillisecondsSinceEpoch(
(map['check_in_at'] as int).toInt()),
nights: map['nights'] == null ? null : (map['nights'] as num).toInt(),
);
}