Class: Appwrite::Models::OAuth2Bitbucket

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, enabled:, key:, secret:) ⇒ OAuth2Bitbucket

Returns a new instance of OAuth2Bitbucket.



11
12
13
14
15
16
17
18
19
20
21
# File 'lib/appwrite/models/o_auth2_bitbucket.rb', line 11

def initialize(
    id:,
    enabled:,
    key:,
    secret:
)
    @id = id
    @enabled = enabled
    @key = key
    @secret = secret
end

Instance Attribute Details

#enabledObject (readonly)

Returns the value of attribute enabled.



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

def enabled
  @enabled
end

#idObject (readonly)

Returns the value of attribute id.



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

def id
  @id
end

#keyObject (readonly)

Returns the value of attribute key.



8
9
10
# File 'lib/appwrite/models/o_auth2_bitbucket.rb', line 8

def key
  @key
end

#secretObject (readonly)

Returns the value of attribute secret.



9
10
11
# File 'lib/appwrite/models/o_auth2_bitbucket.rb', line 9

def secret
  @secret
end

Class Method Details

.from(map:) ⇒ Object



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

def self.from(map:)
    OAuth2Bitbucket.new(
        id: map["$id"],
        enabled: map["enabled"],
        key: map["key"],
        secret: map["secret"]
    )
end

Instance Method Details

#to_mapObject



32
33
34
35
36
37
38
39
# File 'lib/appwrite/models/o_auth2_bitbucket.rb', line 32

def to_map
    {
        "$id": @id,
        "enabled": @enabled,
        "key": @key,
        "secret": @secret
    }
end