module Lifen class Status < Base attribute :user, Lifen::User attribute :unread, Integer def refresh json = client.get("central/api/chats/status") self.unread = json["unread"] end private def client @client ||= user.client end end end