Module: Dnsimple::Client::RegistrarDelegation

Included in:
RegistrarService
Defined in:
lib/dnsimple/client/registrar_delegation.rb

Instance Method Summary collapse

Instance Method Details

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

Chagne name servers the domain is delegating to.

Examples:

Change the name servers example.com is delegating to:

client.registrar.change_domain_delegation(1010, "example.com",
    ["ns1.dnsimple.com", "ns2.dnsimple.com", "ns3.dnsimple.com", "ns4.dnsimple.com"])

Parameters:

  • account_id (Fixnum)

    the account ID

  • domain_name (#to_s)

    the domain name to check

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

Returns:

Raises:

See Also:



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

def change_domain_delegation(, domain_name, attributes, options = {})
  endpoint = Client.versioned("/%s/registrar/domains/%s/delegation" % [, domain_name])
  response = client.put(endpoint, attributes, options)

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

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

Lists name servers the domain is delegating to.

Examples:

List the name servers example.com is delegating to:

client.registrar.domain_delegation(1010, "example.com")

Parameters:

  • account_id (Fixnum)

    the account ID

  • domain_name (#to_s)

    the domain name to check

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

Returns:

Raises:

See Also:



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

def domain_delegation(, domain_name, options = {})
  endpoint = Client.versioned("/%s/registrar/domains/%s/delegation" % [, domain_name])
  response = client.get(endpoint, options)

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