Skip to main content
CrystalDocs
Search documentation
Search
Browse Docs
CrystalShards
About
struct
User
Inherits
Struct
<
Value
<
Object
Constructors
new
(id :
Int64
, telegram_id :
Int64
, username :
Nil
|
String
, first_name :
Nil
|
String
, last_name :
Nil
|
String
, sub_type :
Nil
|
String
, sub_expires_at :
Time
|
Nil
, preferred_dub_language :
Nil
|
String
= nil)
Source
upsert
(telegram_id :
Int64
, username :
String
|
Nil
, first_name :
String
|
Nil
, last_name :
String
|
Nil
) :
User
Source
Class methods
find_by_telegram_id
(telegram_id :
Int64
) :
User
|
Nil
Source
update_subscription
(id :
Int64
, sub_type :
String
, expires_at :
Time
)
Source
Instance methods
first_name
Source
first_name=
(first_name :
String
|
Nil
)
Source
id
Source
id=
(id :
Int64
)
Source
last_name
Source
last_name=
(last_name :
String
|
Nil
)
Source
preferred_dub_language
Source
preferred_dub_language=
(preferred_dub_language :
String
|
Nil
)
Source
sub_expires_at
Source
sub_expires_at=
(sub_expires_at :
Time
|
Nil
)
Source
sub_type
Source
sub_type=
(sub_type :
String
|
Nil
)
Source
subscribed?
Source
telegram_id
Source
telegram_id=
(telegram_id :
Int64
)
Source
username
Source
username=
(username :
String
|
Nil
)
Source