Class: OneLogin::Api::Models::MFA

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ MFA

Returns a new instance of MFA.


9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/onelogin/api/models/mfa.rb', line 9

def initialize(data)
  unless data['user'].empty?
    @user = OneLogin::Api::Models::User.new(data['user']) # Partial info
  end
  @state_token = data['state_token'].to_s
  @callback_url = data['callback_url'].to_s
  @devices = []
  unless data['devices'].empty?
    data['devices'].each do |device_data|
      @devices << OneLogin::Api::Models::Device.new(device_data)
    end
  end
end

Instance Attribute Details

#callback_urlObject

Returns the value of attribute callback_url.


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

def callback_url
  @callback_url
end

#devicesObject

Returns the value of attribute devices.


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

def devices
  @devices
end

#state_tokenObject

Returns the value of attribute state_token.


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

def state_token
  @state_token
end

#userObject

Returns the value of attribute user.


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

def user
  @user
end