BusinessInfo.fromJson constructor

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

Parses a BusinessInfo from TDLib JSON.

Implementation

factory BusinessInfo.fromJson(Map<String, dynamic> json) => BusinessInfo(
  location: _readOptional(json['location'], BusinessLocation.fromJson),
  openingHours: _readOptional(
    json['opening_hours'],
    BusinessOpeningHours.fromJson,
  ),
  localOpeningHours: _readOptional(
    json['local_opening_hours'],
    BusinessOpeningHours.fromJson,
  ),
  nextOpenIn: _readInt(json['next_open_in']),
  nextCloseIn: _readInt(json['next_close_in']),
  greetingMessageSettings: _readOptional(
    json['greeting_message_settings'],
    BusinessGreetingMessageSettings.fromJson,
  ),
  awayMessageSettings: _readOptional(
    json['away_message_settings'],
    BusinessAwayMessageSettings.fromJson,
  ),
  startPage: _readOptional(json['start_page'], BusinessStartPage.fromJson),
);