BusinessConnection.fromJson constructor

BusinessConnection.fromJson(
  1. Map<String, dynamic> json
)

Parses a BusinessConnection from TDLib JSON.

Implementation

factory BusinessConnection.fromJson(Map<String, dynamic> json) =>
    BusinessConnection(
      id: _readString(json['id']),
      userId: _readInt(json['user_id']),
      userChatId: _readInt(json['user_chat_id']),
      date: _readInt(json['date']),
      rights: _readOptional(json['rights'], BusinessBotRights.fromJson),
      isEnabled: _readBool(json['is_enabled']),
      extra: json['@extra'],
      clientId: _readClientId(json['@client_id']),
    );