Class: Appwrite::Models::Oauth2Authorize

Inherits:
Object
  • Object
show all
Defined in:
lib/appwrite/models/oauth2_authorize.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(grant_id:, redirect_url:) ⇒ Oauth2Authorize

Returns a new instance of Oauth2Authorize.



9
10
11
12
13
14
15
# File 'lib/appwrite/models/oauth2_authorize.rb', line 9

def initialize(
    grant_id:,
    redirect_url:
)
    @grant_id = grant_id
    @redirect_url = redirect_url
end

Instance Attribute Details

#grant_idObject (readonly)

Returns the value of attribute grant_id.



6
7
8
# File 'lib/appwrite/models/oauth2_authorize.rb', line 6

def grant_id
  @grant_id
end

#redirect_urlObject (readonly)

Returns the value of attribute redirect_url.



7
8
9
# File 'lib/appwrite/models/oauth2_authorize.rb', line 7

def redirect_url
  @redirect_url
end

Class Method Details

.from(map:) ⇒ Object



17
18
19
20
21
22
# File 'lib/appwrite/models/oauth2_authorize.rb', line 17

def self.from(map:)
    Oauth2Authorize.new(
        grant_id: map["grantId"],
        redirect_url: map["redirectUrl"]
    )
end

Instance Method Details

#to_mapObject



24
25
26
27
28
29
# File 'lib/appwrite/models/oauth2_authorize.rb', line 24

def to_map
    {
        "grantId": @grant_id,
        "redirectUrl": @redirect_url
    }
end