Class: Dyn::Traffic::Session

Inherits:
Base
  • Object
show all
Defined in:
lib/dyn/traffic/session.rb

Instance Attribute Summary

Attributes inherited from Base

#zone

Instance Method Summary collapse

Methods inherited from Base

#freeze, #publish, #thaw

Constructor Details

#initialize(dyn) ⇒ Session

Returns a new instance of Session.



24
25
26
# File 'lib/dyn/traffic/session.rb', line 24

def initialize(dyn)
  @dyn = dyn
end

Instance Method Details

#createObject



28
29
30
# File 'lib/dyn/traffic/session.rb', line 28

def create
  @dyn.post('Session', { 'customer_name' => @dyn.customer_name, 'user_name' => @dyn.user_name, 'password' => @dyn.password }, {})
end

#deleteObject



32
33
34
# File 'lib/dyn/traffic/session.rb', line 32

def delete
  @dyn.delete('Session')
end