Class: Appwrite::Models::Token
- Inherits:
-
Object
- Object
- Appwrite::Models::Token
- Defined in:
- lib/appwrite/models/token.rb
Instance Attribute Summary collapse
-
#expire ⇒ Object
readonly
Returns the value of attribute expire.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#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:, user_id:, secret:, expire:) ⇒ Token
constructor
A new instance of Token.
- #to_map ⇒ Object
Constructor Details
#initialize(id:, user_id:, secret:, expire:) ⇒ Token
Returns a new instance of Token.
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/appwrite/models/token.rb', line 11 def initialize( id:, user_id:, secret:, expire: ) @id = id @user_id = user_id @secret = secret @expire = expire end |
Instance Attribute Details
#expire ⇒ Object (readonly)
Returns the value of attribute expire.
9 10 11 |
# File 'lib/appwrite/models/token.rb', line 9 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 |
#secret ⇒ Object (readonly)
Returns the value of attribute secret.
8 9 10 |
# File 'lib/appwrite/models/token.rb', line 8 def secret @secret end |
#user_id ⇒ Object (readonly)
Returns the value of attribute user_id.
7 8 9 |
# File 'lib/appwrite/models/token.rb', line 7 def user_id @user_id end |
Class Method Details
Instance Method Details
#to_map ⇒ Object
32 33 34 35 36 37 38 39 |
# File 'lib/appwrite/models/token.rb', line 32 def to_map { "$id": @id, "userId": @user_id, "secret": @secret, "expire": @expire } end |