Class: Appwrite::Models::AuthProvider
- Inherits:
-
Object
- Object
- Appwrite::Models::AuthProvider
- Defined in:
- lib/appwrite/models/auth_provider.rb
Instance Attribute Summary collapse
-
#app_id ⇒ Object
readonly
Returns the value of attribute app_id.
-
#enabled ⇒ Object
readonly
Returns the value of attribute enabled.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#secret ⇒ Object
readonly
Returns the value of attribute secret.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(key:, name:, app_id:, secret:, enabled:) ⇒ AuthProvider
constructor
A new instance of AuthProvider.
- #to_map ⇒ Object
Constructor Details
#initialize(key:, name:, app_id:, secret:, enabled:) ⇒ AuthProvider
Returns a new instance of AuthProvider.
12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/appwrite/models/auth_provider.rb', line 12 def initialize( key:, name:, app_id:, secret:, enabled: ) @key = key @name = name @app_id = app_id @secret = secret @enabled = enabled end |
Instance Attribute Details
#app_id ⇒ Object (readonly)
Returns the value of attribute app_id.
8 9 10 |
# File 'lib/appwrite/models/auth_provider.rb', line 8 def app_id @app_id end |
#enabled ⇒ Object (readonly)
Returns the value of attribute enabled.
10 11 12 |
# File 'lib/appwrite/models/auth_provider.rb', line 10 def enabled @enabled end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
6 7 8 |
# File 'lib/appwrite/models/auth_provider.rb', line 6 def key @key end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/appwrite/models/auth_provider.rb', line 7 def name @name end |
#secret ⇒ Object (readonly)
Returns the value of attribute secret.
9 10 11 |
# File 'lib/appwrite/models/auth_provider.rb', line 9 def secret @secret end |
Class Method Details
.from(map:) ⇒ Object
26 27 28 29 30 31 32 33 34 |
# File 'lib/appwrite/models/auth_provider.rb', line 26 def self.from(map:) AuthProvider.new( key: map["key"], name: map["name"], app_id: map["appId"], secret: map["secret"], enabled: map["enabled"] ) end |
Instance Method Details
#to_map ⇒ Object
36 37 38 39 40 41 42 43 44 |
# File 'lib/appwrite/models/auth_provider.rb', line 36 def to_map { "key": @key, "name": @name, "appId": @app_id, "secret": @secret, "enabled": @enabled } end |