Module: Dnsimple::Client::VanityNameServers

Included in:
NameServersService
Defined in:
lib/dnsimple/client/vanity_name_servers.rb

Instance Method Summary collapse

Instance Method Details

#disable_vanity_name_servers(domain, options = {}) ⇒ void

This method returns an undefined value.

Disable vanity name servers for a domain.

Parameters:

  • domain (#to_s)

    The domain id or domain name.

Raises:

See Also:



33
34
35
# File 'lib/dnsimple/client/vanity_name_servers.rb', line 33

def disable_vanity_name_servers(domain, options={})
  client.delete("v1/domains/#{domain}/vanity_name_servers", options)
end

#enable_vanity_name_servers(domain, names, options = {}) ⇒ void

This method returns an undefined value.

Enable vanity name servers for a domain.

are ns1 through ns4, e.g.

{
  "ns1" => "ns1.example.com",
  "ns2" => "ns2.example.com"
}

Parameters:

  • domain (#to_s)

    The domain id or domain name.

  • names (Hash)

    A hash of up to 4 external name servers; hash keys

Raises:

See Also:



19
20
21
22
23
# File 'lib/dnsimple/client/vanity_name_servers.rb', line 19

def enable_vanity_name_servers(domain, names, options={})
  options["vanity_nameserver_configuration"] = {"server_source" => "external"}
  options["vanity_nameserver_configuration"].merge!(names)
  client.post(Client.versioned("domains/#{domain}/vanity_name_servers"), options)
end