Class: Namecheap::Ns

Inherits:
Api
  • Object
show all
Defined in:
lib/namecheap/ns.rb

Constant Summary

Constants inherited from Api

Api::ENDPOINT, Api::ENVIRONMENT, Api::PRODUCTION, Api::SANDBOX

Instance Method Summary collapse

Methods inherited from Api

#get, #init_args, #post, #put, #request

Instance Method Details

#create(sld, tld, options = {}) ⇒ Object

Creates a new nameserver.



5
6
7
8
# File 'lib/namecheap/ns.rb', line 5

def create(sld, tld, options = {})
  options = {:SLD => sld, :TLD => tld}.merge(options)
  get 'domains.ns.create', options
end

#delete(sld, tld, options = {}) ⇒ Object

Deletes a nameserver associated with the requested domain.



12
13
14
15
# File 'lib/namecheap/ns.rb', line 12

def delete(sld, tld, options = {})
  options = {:SLD => sld, :TLD => tld}.merge(options)
  get 'domains.ns.delete', options
end

#get_info(sld, tld, options = {}) ⇒ Object

Retrieves information about a registered nameserver.



19
20
21
22
# File 'lib/namecheap/ns.rb', line 19

def get_info(sld, tld, options = {})
  options = {:SLD => sld, :TLD => tld}.merge(options)
  get 'domains.ns.getInfo', options
end

#update(sld, tld, options = {}) ⇒ Object

Updates the IP address of a registered nameserver.



26
27
28
29
# File 'lib/namecheap/ns.rb', line 26

def update(sld, tld, options = {})
  options = {:SLD => sld, :TLD => tld}.merge(options)
  get 'domains.ns.update', options
end