Class: Verify2::Channels::SilentAuth

Inherits:
Object
  • Object
show all
Defined in:
lib/vonage/verify2/channels/silent_auth.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(to:, redirect_url: nil, sandbox: nil) ⇒ SilentAuth

Returns a new instance of SilentAuth.



11
12
13
14
15
16
# File 'lib/vonage/verify2/channels/silent_auth.rb', line 11

def initialize(to:, redirect_url: nil, sandbox: nil)
  self.channel = 'silent_auth'
  self.to = to
  self.redirect_url = redirect_url unless redirect_url.nil?
  self.sandbox = sandbox unless sandbox.nil?
end

Instance Attribute Details

#channelObject

Returns the value of attribute channel.



9
10
11
# File 'lib/vonage/verify2/channels/silent_auth.rb', line 9

def channel
  @channel
end

#redirect_urlObject

Returns the value of attribute redirect_url.



9
10
11
# File 'lib/vonage/verify2/channels/silent_auth.rb', line 9

def redirect_url
  @redirect_url
end

#sandboxObject

Returns the value of attribute sandbox.



9
10
11
# File 'lib/vonage/verify2/channels/silent_auth.rb', line 9

def sandbox
  @sandbox
end

#toObject

Returns the value of attribute to.



9
10
11
# File 'lib/vonage/verify2/channels/silent_auth.rb', line 9

def to
  @to
end

Instance Method Details

#to_hObject



33
34
35
36
37
38
39
# File 'lib/vonage/verify2/channels/silent_auth.rb', line 33

def to_h
  hash = Hash.new
  self.instance_variables.each do |ivar|
    hash[ivar.to_s.delete("@").to_sym] = self.instance_variable_get(ivar)
  end
  hash
end