Class: Appwrite::Models::Token
- Inherits:
-
Object
- Object
- Appwrite::Models::Token
- Defined in:
- lib/appwrite/models/token.rb
Instance Attribute Summary collapse
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#expire ⇒ Object
readonly
Returns the value of attribute expire.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#phrase ⇒ Object
readonly
Returns the value of attribute phrase.
-
#secret ⇒ Object
readonly
Returns the value of attribute secret.
-
#user_id ⇒ Object
readonly
Returns the value of attribute user_id.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id:, created_at:, user_id:, secret:, expire:, phrase:) ⇒ Token
constructor
A new instance of Token.
- #to_map ⇒ Object
Constructor Details
#initialize(id:, created_at:, user_id:, secret:, expire:, phrase:) ⇒ Token
Returns a new instance of Token.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/appwrite/models/token.rb', line 13 def initialize( id:, created_at:, user_id:, secret:, expire:, phrase: ) @id = id @created_at = created_at @user_id = user_id @secret = secret @expire = expire @phrase = phrase end |
Instance Attribute Details
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
7 8 9 |
# File 'lib/appwrite/models/token.rb', line 7 def created_at @created_at end |
#expire ⇒ Object (readonly)
Returns the value of attribute expire.
10 11 12 |
# File 'lib/appwrite/models/token.rb', line 10 def expire @expire end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/appwrite/models/token.rb', line 6 def id @id end |
#phrase ⇒ Object (readonly)
Returns the value of attribute phrase.
11 12 13 |
# File 'lib/appwrite/models/token.rb', line 11 def phrase @phrase end |
#secret ⇒ Object (readonly)
Returns the value of attribute secret.
9 10 11 |
# File 'lib/appwrite/models/token.rb', line 9 def secret @secret end |
#user_id ⇒ Object (readonly)
Returns the value of attribute user_id.
8 9 10 |
# File 'lib/appwrite/models/token.rb', line 8 def user_id @user_id end |
Class Method Details
Instance Method Details
#to_map ⇒ Object
40 41 42 43 44 45 46 47 48 49 |
# File 'lib/appwrite/models/token.rb', line 40 def to_map { "$id": @id, "$createdAt": @created_at, "userId": @user_id, "secret": @secret, "expire": @expire, "phrase": @phrase } end |