Class: OneLogin::Api::Models::OneLoginAppBasic

Inherits:
Object
  • Object
show all
Defined in:
lib/onelogin/api/models/onelogin_app_basic.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ OneLoginAppBasic

Returns a new instance of OneLoginAppBasic.


13
14
15
16
17
18
19
20
21
22
23
# File 'lib/onelogin/api/models/onelogin_app_basic.rb', line 13

def initialize(data)
  @id = data['id']? data['id'].to_i : nil
  @name = data['name']
  @description = data['description']
  @auth_method = data['auth_method']
  @connector_id = data['connector_id']? data['connector_id'].to_i : nil
  @visible = data['visible']
  @created_at = data['created_at']
  @updated_at = data['updated_at']

end

Instance Attribute Details

#auth_methodObject (readonly)

Returns the value of attribute auth_method.


10
11
12
# File 'lib/onelogin/api/models/onelogin_app_basic.rb', line 10

def auth_method
  @auth_method
end

#connector_idObject (readonly)

Returns the value of attribute connector_id.


10
11
12
# File 'lib/onelogin/api/models/onelogin_app_basic.rb', line 10

def connector_id
  @connector_id
end

#created_atObject (readonly)

Returns the value of attribute created_at.


10
11
12
# File 'lib/onelogin/api/models/onelogin_app_basic.rb', line 10

def created_at
  @created_at
end

#descriptionObject

Returns the value of attribute description.


7
8
9
# File 'lib/onelogin/api/models/onelogin_app_basic.rb', line 7

def description
  @description
end

#idObject (readonly)

Returns the value of attribute id.


10
11
12
# File 'lib/onelogin/api/models/onelogin_app_basic.rb', line 10

def id
  @id
end

#nameObject

Returns the value of attribute name.


7
8
9
# File 'lib/onelogin/api/models/onelogin_app_basic.rb', line 7

def name
  @name
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.


10
11
12
# File 'lib/onelogin/api/models/onelogin_app_basic.rb', line 10

def updated_at
  @updated_at
end

#visibleObject

Returns the value of attribute visible.


7
8
9
# File 'lib/onelogin/api/models/onelogin_app_basic.rb', line 7

def visible
  @visible
end

Instance Method Details

#get_auth_method_nameObject


25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/onelogin/api/models/onelogin_app_basic.rb', line 25

def get_auth_method_name
  auth_method_name = nil
  case @auth_method
  when 0
    auth_method_name = "PASSWORD"
  when 1
    auth_method_name = "OPENID"
  when 2
    auth_method_name = "SAML"
  when 3
    auth_method_name = "API"
  when 4
    auth_method_name = "GOOGLE"
  when 6
    auth_method_name = "BASIC_AUTH"
  when 7
    auth_method_name = "WSFED"
  when 8
    auth_method_name = "OIDC"
  end

  auth_method_name
end