Class: Namecheap::Domains
Constant Summary
Constants inherited from Api
Api::ENDPOINT, Api::ENVIRONMENT, Api::PRODUCTION, Api::SANDBOX
Instance Method Summary collapse
-
#check(domains = [], options = {}) ⇒ Object
Checks the availability of domains.
-
#create(domain, options = {}) ⇒ Object
Registers a domain.
-
#get_contacts(domain, options = {}) ⇒ Object
Gets contact information for the requested domain.
-
#get_info(domain, options = {}) ⇒ Object
Returns information about the requested domain.
-
#get_list(options = {}) ⇒ Object
Returns a list of domains for the particular user.
-
#get_registrar_lock(domain, options = {}) ⇒ Object
Gets the status of RegistrarLock for the requested domain.
-
#get_tld_list(options = {}) ⇒ Object
Returns a list of tlds.
-
#reactivate(domain, options = {}) ⇒ Object
Reactivates an expired domain.
-
#renew(domain, options = {}) ⇒ Object
Renews an expiring domain.
-
#set_contacts(domain, options = {}) ⇒ Object
Sets contact information for the requested domain.
-
#set_registrar_lock(domain, options = {}) ⇒ Object
Sets the RegistrarLock status for a domain.
Methods inherited from Api
#delete, #get, #init_args, #post, #put, #request
Instance Method Details
#check(domains = [], options = {}) ⇒ Object
Checks the availability of domains.
38 39 40 41 42 43 44 45 |
# File 'lib/namecheap/domains.rb', line 38 def check(domains = [], = {}) if domains.respond_to?(:join) domains = domains.join(",") end = {DomainList: domains}.merge() get "domains.check", end |
#create(domain, options = {}) ⇒ Object
Registers a domain.
18 19 20 21 |
# File 'lib/namecheap/domains.rb', line 18 def create(domain, = {}) = {DomainName: domain}.merge() get "domains.create", end |
#get_contacts(domain, options = {}) ⇒ Object
Gets contact information for the requested domain.
11 12 13 14 |
# File 'lib/namecheap/domains.rb', line 11 def get_contacts(domain, = {}) = {DomainName: domain}.merge() get "domains.getContacts", end |
#get_info(domain, options = {}) ⇒ Object
Returns information about the requested domain.
77 78 79 80 |
# File 'lib/namecheap/domains.rb', line 77 def get_info(domain, = {}) = {DomainName: domain}.merge() get "domains.getInfo", end |
#get_list(options = {}) ⇒ Object
Returns a list of domains for the particular user.
5 6 7 |
# File 'lib/namecheap/domains.rb', line 5 def get_list( = {}) get "domains.getList", end |
#get_registrar_lock(domain, options = {}) ⇒ Object
Gets the status of RegistrarLock for the requested domain.
63 64 65 66 |
# File 'lib/namecheap/domains.rb', line 63 def get_registrar_lock(domain, = {}) = {DomainName: domain}.merge() get "domains.getRegistrarLock", end |
#get_tld_list(options = {}) ⇒ Object
Returns a list of tlds.
25 26 27 |
# File 'lib/namecheap/domains.rb', line 25 def get_tld_list( = {}) get "domains.getTldList", end |
#reactivate(domain, options = {}) ⇒ Object
Reactivates an expired domain.
49 50 51 52 |
# File 'lib/namecheap/domains.rb', line 49 def reactivate(domain, = {}) = {DomainName: domain}.merge() get "domains.reactivate", end |
#renew(domain, options = {}) ⇒ Object
Renews an expiring domain. http://developer.namecheap.com/docs/doku.php?id=api-reference:domains:renew
56 57 58 59 |
# File 'lib/namecheap/domains.rb', line 56 def renew(domain, = {}) = {DomainName: domain}.merge() get "domains.renew", end |
#set_contacts(domain, options = {}) ⇒ Object
Sets contact information for the requested domain.
31 32 33 34 |
# File 'lib/namecheap/domains.rb', line 31 def set_contacts(domain, = {}) = {DomainName: domain}.merge() get "domains.setContacts", end |
#set_registrar_lock(domain, options = {}) ⇒ Object
Sets the RegistrarLock status for a domain.
70 71 72 73 |
# File 'lib/namecheap/domains.rb', line 70 def set_registrar_lock(domain, = {}) = {DomainName: domain}.merge() get "domains.setRegistrarLock", end |