Map<String, dynamic> toMap() { return {"total": total, "tokens": tokens.map((p) => p.toMap()).toList()}; }