Class: Appwrite::Models::Oauth2DeviceAuthorization
- Inherits:
-
Object
- Object
- Appwrite::Models::Oauth2DeviceAuthorization
- Defined in:
- lib/appwrite/models/oauth2_device_authorization.rb
Instance Attribute Summary collapse
-
#device_code ⇒ Object
readonly
Returns the value of attribute device_code.
-
#expires_in ⇒ Object
readonly
Returns the value of attribute expires_in.
-
#interval ⇒ Object
readonly
Returns the value of attribute interval.
-
#user_code ⇒ Object
readonly
Returns the value of attribute user_code.
-
#verification_uri ⇒ Object
readonly
Returns the value of attribute verification_uri.
-
#verification_uri_complete ⇒ Object
readonly
Returns the value of attribute verification_uri_complete.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(device_code:, user_code:, verification_uri:, verification_uri_complete:, expires_in:, interval:) ⇒ Oauth2DeviceAuthorization
constructor
A new instance of Oauth2DeviceAuthorization.
- #to_map ⇒ Object
Constructor Details
#initialize(device_code:, user_code:, verification_uri:, verification_uri_complete:, expires_in:, interval:) ⇒ Oauth2DeviceAuthorization
Returns a new instance of Oauth2DeviceAuthorization.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/appwrite/models/oauth2_device_authorization.rb', line 13 def initialize( device_code:, user_code:, verification_uri:, verification_uri_complete:, expires_in:, interval: ) @device_code = device_code @user_code = user_code @verification_uri = verification_uri @verification_uri_complete = verification_uri_complete @expires_in = expires_in @interval = interval end |
Instance Attribute Details
#device_code ⇒ Object (readonly)
Returns the value of attribute device_code.
6 7 8 |
# File 'lib/appwrite/models/oauth2_device_authorization.rb', line 6 def device_code @device_code end |
#expires_in ⇒ Object (readonly)
Returns the value of attribute expires_in.
10 11 12 |
# File 'lib/appwrite/models/oauth2_device_authorization.rb', line 10 def expires_in @expires_in end |
#interval ⇒ Object (readonly)
Returns the value of attribute interval.
11 12 13 |
# File 'lib/appwrite/models/oauth2_device_authorization.rb', line 11 def interval @interval end |
#user_code ⇒ Object (readonly)
Returns the value of attribute user_code.
7 8 9 |
# File 'lib/appwrite/models/oauth2_device_authorization.rb', line 7 def user_code @user_code end |
#verification_uri ⇒ Object (readonly)
Returns the value of attribute verification_uri.
8 9 10 |
# File 'lib/appwrite/models/oauth2_device_authorization.rb', line 8 def verification_uri @verification_uri end |
#verification_uri_complete ⇒ Object (readonly)
Returns the value of attribute verification_uri_complete.
9 10 11 |
# File 'lib/appwrite/models/oauth2_device_authorization.rb', line 9 def verification_uri_complete @verification_uri_complete end |
Class Method Details
.from(map:) ⇒ Object
29 30 31 32 33 34 35 36 37 38 |
# File 'lib/appwrite/models/oauth2_device_authorization.rb', line 29 def self.from(map:) Oauth2DeviceAuthorization.new( device_code: map["device_code"], user_code: map["user_code"], verification_uri: map["verification_uri"], verification_uri_complete: map["verification_uri_complete"], expires_in: map["expires_in"], interval: map["interval"] ) end |
Instance Method Details
#to_map ⇒ Object
40 41 42 43 44 45 46 47 48 49 |
# File 'lib/appwrite/models/oauth2_device_authorization.rb', line 40 def to_map { "device_code": @device_code, "user_code": @user_code, "verification_uri": @verification_uri, "verification_uri_complete": @verification_uri_complete, "expires_in": @expires_in, "interval": @interval } end |