StarTransaction.fromJson constructor

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

Parses a StarTransaction from TDLib JSON.

Implementation

factory StarTransaction.fromJson(Map<String, dynamic> json) =>
    StarTransaction(
      id: _readString(json['id']),
      starAmount: _readObject(json['star_amount'], StarAmount.fromJson),
      isRefund: _readBool(json['is_refund']),
      date: _readInt(json['date']),
      type: _readObject(json['type'], StarTransactionType.fromJson),
    );