Module: Dnsimple::Client::VanityNameServers

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

Instance Method Summary collapse

Instance Method Details

#disable_vanity_name_servers(account_id, domain_name, options = {}) ⇒ Dnsimple::Response<nil>

Disable vanity name servers for the domain.

Examples:

Disable vanity name servers for example.com:

client.vanity_name_servers.disable_vanity_name_servers(1010, "example.com")

Parameters:

  • account_id (Integer)

    the account ID

  • domain_name (#to_s)

    the domain name

  • options (Hash) (defaults to: {})

Returns:

Raises:

See Also:



40
41
42
43
44
45
# File 'lib/dnsimple/client/vanity_name_servers.rb', line 40

def disable_vanity_name_servers(, domain_name, options = {})
  endpoint = Client.versioned("/%s/vanity/%s" % [, domain_name])
  response = client.delete(endpoint, options)

  Dnsimple::Response.new(response, response["data"])
end

#enable_vanity_name_servers(account_id, domain_name, options = {}) ⇒ Dnsimple::Response<Array>

Enable vanity name servers for the domain.

Examples:

Enable vanity name servers for example.com:

client.vanity_name_servers.enable_vanity_name_servers(1010, "example.com")

Parameters:

  • account_id (Integer)

    the account ID

  • domain_name (#to_s)

    the domain name

  • options (Hash) (defaults to: {})

Returns:

Raises:

See Also:



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

def enable_vanity_name_servers(, domain_name, options = {})
  endpoint = Client.versioned("/%s/vanity/%s" % [, domain_name])
  response = client.put(endpoint, options)

  Dnsimple::Response.new(response, response["data"])
end