ChatRevenueAmount.fromJson constructor

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

Parses a ChatRevenueAmount from TDLib JSON.

Implementation

factory ChatRevenueAmount.fromJson(Map<String, dynamic> json) =>
    ChatRevenueAmount(
      cryptocurrency: _readString(json['cryptocurrency']),
      totalAmount: _readInt(json['total_amount']),
      balanceAmount: _readInt(json['balance_amount']),
      availableAmount: _readInt(json['available_amount']),
      withdrawalEnabled: _readBool(json['withdrawal_enabled']),
    );