RoomIapSession.fromJson constructor
RoomIapSession.fromJson(
- Map<String, dynamic> json
)
Implementation
factory RoomIapSession.fromJson(Map<String, dynamic> json) => RoomIapSession(
id: json['id'] as String,
userId: json['user_id'] as String,
firstName: json['first_name'] as String?,
lastName: json['last_name'] as String?,
email: json['email'] as String,
clientType: json['client_type'] as String,
clientName: json['client_name'] as String?,
operatingSystem: json['operating_system'] as String?,
deviceClass: json['device_class'] as String?,
friendlyName: json['friendly_name'] as String?,
city: json['city'] as String?,
region: json['region'] as String?,
countryCode: json['country_code'] as String?,
createdAt: DateTime.parse(json['created_at'] as String),
lastSeenAt: DateTime.parse(json['last_seen_at'] as String),
expiresAt: DateTime.parse(json['expires_at'] as String),
revokedAt: json['revoked_at'] == null ? null : DateTime.parse(json['revoked_at'] as String),
);