Method: Fog::DNS::Rage4::Real#update_domain

Defined in:
lib/fog/rage4/requests/dns/update_domain.rb

#update_domain(id, options = {}) ⇒ Object

Update an existing domain

Parameters

  • id<~Integer> - domain integer value

  • email <~String> - email of domain owner

  • nsprefix<~String> - vanity ns prefix (nullable)

  • nsname<~String> - vanity ns domain name (nullable)

  • enablevanity<~String> - activate/deactivate

  • failover<~Boolean> - failover enable

Returns

  • response<~Excon::Response>:

    • body<~Hash>:

      * 'status'<~Boolean>
      * 'id'<~Integer>
      * 'error'<~String>
      


20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/fog/rage4/requests/dns/update_domain.rb', line 20

def update_domain(id, options = {})
  email = options[:email] || @rage4_email

  path = "/rapi/updatedomain/#{id}?email=#{email}"

  path << "&nsname=#{options[:nsname]}"              if options[:nsname]
  path << "&nsprefix=#{options[:nsprefix]}"          if options[:nsprefix]
  path << "&enablevanity=#{options[:enablevanity]}"  if options[:enablevanity]
  path << "&failover=#{options[:failover]}"          if options[:failover]

  request(
          :expects  => 200,
          :method   => 'GET',
          :path     =>  path
  )
end