Class: DataDomeAuthentication

Inherits:
Object
  • Object
show all
Defined in:
lib/model/authentication.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(mode: DataDomeAuthenticationMode::OTHER, type: DataDomeAuthenticationType::OTHER, social_provider: DataDomeSocialProvider::OTHER) ⇒ DataDomeAuthentication

Returns a new instance of DataDomeAuthentication.



34
35
36
37
38
# File 'lib/model/authentication.rb', line 34

def initialize(mode: DataDomeAuthenticationMode::OTHER, type: DataDomeAuthenticationType::OTHER, social_provider: DataDomeSocialProvider::OTHER)
  @mode = mode
  @type = type
  @social_provider = social_provider
end

Instance Attribute Details

#modeObject

Returns the value of attribute mode.



32
33
34
# File 'lib/model/authentication.rb', line 32

def mode
  @mode
end

#social_providerObject

Returns the value of attribute social_provider.



32
33
34
# File 'lib/model/authentication.rb', line 32

def social_provider
  @social_provider
end

#typeObject

Returns the value of attribute type.



32
33
34
# File 'lib/model/authentication.rb', line 32

def type
  @type
end

Instance Method Details

#to_json(options = {}) ⇒ Object



44
45
46
47
48
49
50
# File 'lib/model/authentication.rb', line 44

def to_json(options = {})
  {
    mode: @mode,
    type: @type,
    socialProvider: @social_provider,
  }.to_json
end

#to_sObject



40
41
42
# File 'lib/model/authentication.rb', line 40

def to_s
  "DataDomeAuthentication: mode=#{@mode}, type=#{@type}, socialProvider=#{@social_provider}"
end