Class: Appwrite::Models::OAuth2Auth0
- Inherits:
-
Object
- Object
- Appwrite::Models::OAuth2Auth0
- Defined in:
- lib/appwrite/models/o_auth2_auth0.rb
Instance Attribute Summary collapse
-
#client_id ⇒ Object
readonly
Returns the value of attribute client_id.
-
#client_secret ⇒ Object
readonly
Returns the value of attribute client_secret.
-
#enabled ⇒ Object
readonly
Returns the value of attribute enabled.
-
#endpoint ⇒ Object
readonly
Returns the value of attribute endpoint.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#prompt ⇒ Object
readonly
Returns the value of attribute prompt.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id:, enabled:, client_id:, client_secret:, prompt:, endpoint:) ⇒ OAuth2Auth0
constructor
A new instance of OAuth2Auth0.
- #to_map ⇒ Object
Constructor Details
#initialize(id:, enabled:, client_id:, client_secret:, prompt:, endpoint:) ⇒ OAuth2Auth0
Returns a new instance of OAuth2Auth0.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/appwrite/models/o_auth2_auth0.rb', line 13 def initialize( id:, enabled:, client_id:, client_secret:, prompt:, endpoint: ) @id = id @enabled = enabled @client_id = client_id @client_secret = client_secret @prompt = validate_prompt(prompt) @endpoint = endpoint end |
Instance Attribute Details
#client_id ⇒ Object (readonly)
Returns the value of attribute client_id.
8 9 10 |
# File 'lib/appwrite/models/o_auth2_auth0.rb', line 8 def client_id @client_id end |
#client_secret ⇒ Object (readonly)
Returns the value of attribute client_secret.
9 10 11 |
# File 'lib/appwrite/models/o_auth2_auth0.rb', line 9 def client_secret @client_secret end |
#enabled ⇒ Object (readonly)
Returns the value of attribute enabled.
7 8 9 |
# File 'lib/appwrite/models/o_auth2_auth0.rb', line 7 def enabled @enabled end |
#endpoint ⇒ Object (readonly)
Returns the value of attribute endpoint.
11 12 13 |
# File 'lib/appwrite/models/o_auth2_auth0.rb', line 11 def endpoint @endpoint end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/appwrite/models/o_auth2_auth0.rb', line 6 def id @id end |
#prompt ⇒ Object (readonly)
Returns the value of attribute prompt.
10 11 12 |
# File 'lib/appwrite/models/o_auth2_auth0.rb', line 10 def prompt @prompt end |
Class Method Details
.from(map:) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/appwrite/models/o_auth2_auth0.rb', line 29 def self.from(map:) map = { "$id" => "", "enabled" => false, "clientId" => "", "clientSecret" => "", "prompt" => [], "endpoint" => "" }.merge(map) OAuth2Auth0.new( id: map["$id"], enabled: map["enabled"], client_id: map["clientId"], client_secret: map["clientSecret"], prompt: map["prompt"], endpoint: map["endpoint"] ) end |
Instance Method Details
#to_map ⇒ Object
41 42 43 44 45 46 47 48 49 50 |
# File 'lib/appwrite/models/o_auth2_auth0.rb', line 41 def to_map { "$id": @id, "enabled": @enabled, "clientId": @client_id, "clientSecret": @client_secret, "prompt": @prompt, "endpoint": @endpoint } end |