Class: Dyn::Traffic::Base
- Inherits:
-
Object
- Object
- Dyn::Traffic::Base
- Defined in:
- lib/dyn/traffic/base.rb
Instance Attribute Summary collapse
-
#zone ⇒ Object
Returns the value of attribute zone.
Instance Method Summary collapse
-
#discard_change_set ⇒ Hash
Discard any pending changes in the session - required if you don’t with to persist changes.
-
#freeze ⇒ Hash
Freeze the zone.
-
#get_change_set ⇒ Hash
Show pending changes to zone.
-
#publish ⇒ Hash
Publish any pending changes to the zone - required to make any alterations permanent.
-
#thaw ⇒ Hash
Thaw the zone.
Instance Attribute Details
#zone ⇒ Object
Returns the value of attribute zone.
24 25 26 |
# File 'lib/dyn/traffic/base.rb', line 24 def zone @zone end |
Instance Method Details
#discard_change_set ⇒ Hash
Discard any pending changes in the session - required if you don’t with to persist changes.
42 43 44 |
# File 'lib/dyn/traffic/base.rb', line 42 def discard_change_set @dyn.delete("ZoneChanges/#{@zone}") end |
#freeze ⇒ Hash
Freeze the zone.
See: manage.dynect.net/help/docs/api2/rest/resources/Zone.html
52 53 54 |
# File 'lib/dyn/traffic/base.rb', line 52 def freeze @dyn.put("Zone/#{@zone}", { "freeze" => true }) end |
#get_change_set ⇒ Hash
Show pending changes to zone
72 73 74 |
# File 'lib/dyn/traffic/base.rb', line 72 def get_change_set @dyn.get("ZoneChanges/#{@zone}") end |
#publish ⇒ Hash
Publish any pending changes to the zone - required to make any alterations permanent.
See: manage.dynect.net/help/docs/api2/rest/resources/Zone.html
32 33 34 |
# File 'lib/dyn/traffic/base.rb', line 32 def publish @dyn.put("Zone/#{@zone}", { "publish" => true }) end |
#thaw ⇒ Hash
Thaw the zone.
See: manage.dynect.net/help/docs/api2/rest/resources/Zone.html
62 63 64 |
# File 'lib/dyn/traffic/base.rb', line 62 def thaw @dyn.put("Zone/#{@zone}", { "thaw" => true }) end |