Class: Plivo::Token::VoiceGrants

Inherits:
Object
  • Object
show all
Defined in:
lib/plivo/jwt.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(incoming = nil, outgoing = nil) ⇒ VoiceGrants

Returns a new instance of VoiceGrants.



16
17
18
19
20
21
# File 'lib/plivo/jwt.rb', line 16

def initialize(incoming = nil, outgoing = nil)
  Utils.valid_param?(:incoming, incoming, [TrueClass, FalseClass], false)
  Utils.valid_param?(:outgoing, outgoing, [TrueClass, FalseClass], false)
  @incoming_allow = incoming
  @outgoing_allow = outgoing
end

Instance Attribute Details

#incoming_allowObject (readonly)

Returns the value of attribute incoming_allow.



14
15
16
# File 'lib/plivo/jwt.rb', line 14

def incoming_allow
  @incoming_allow
end

#outgoing_allowObject (readonly)

Returns the value of attribute outgoing_allow.



14
15
16
# File 'lib/plivo/jwt.rb', line 14

def outgoing_allow
  @outgoing_allow
end

Instance Method Details

#to_hashObject



23
24
25
26
27
# File 'lib/plivo/jwt.rb', line 23

def to_hash
  hash = {}
  instance_variables.each { |var| hash[var.to_s.delete('@')] = instance_variable_get(var) }
  hash
end