Class: WHMCS::Domain

Inherits:
Base
  • Object
show all
Defined in:
lib/whmcs/domain.rb

Overview

WHMCS:Domain class for domains management

Class Method Summary collapse

Methods inherited from Base

parse_response, send_request

Class Method Details

.get_domain_whois(params = {}) ⇒ Object

Get Domain WHOIS This command is used to obtain the WHOIS of a domain from the registrar

Parameters:

  • :domainid - ID of the domain in WHMCS

See:

docs.whmcs.com/API:Get_Domain_WHOIS



81
82
83
84
# File 'lib/whmcs/domain.rb', line 81

def self.get_domain_whois(params = {})
	params.merge!(:action => 'domaingetwhoisinfo')
	send_request(params)
end

.get_lockstatus(params = {}) ⇒ Object

Domain Locking Status This command is used to obtain the lock state of a domain

Parameters:

  • :domainid - ID of the domain in your WHMCS

See:

docs.whmcs.com/API:Domain_Locking_Status



95
96
97
98
# File 'lib/whmcs/domain.rb', line 95

def self.get_lockstatus(params = {})
	params.merge!(:action => 'domaingetlockingstatus')
	send_request(params)
end

.get_nameservers(params = {}) ⇒ Object

Domain Nameservers

This command is used to obtain the nameservers of a domain

Parameters:

  • :domainid - ID of the domain in WHMCS

See:

docs.whmcs.com/API:Domain_Nameservers



155
156
157
158
# File 'lib/whmcs/domain.rb', line 155

def self.get_nameservers(params = {})
	params.merge!(:action => 'domaingetnameservers')
	send_request(params)
end

.register(params = {}) ⇒ Object

Register Domain This command is used to send a Register command to the registrar

Parameters:

  • :domainid - Domain ID from WHMCS

  • :domain - The domain name (send domain id or domain)

See:

docs.whmcs.com/API:Register_Domain



15
16
17
18
# File 'lib/whmcs/domain.rb', line 15

def self.register(params = {})
	params.merge!(:action => 'domainregister')
	send_request(params)
end

.release(params = {}) ⇒ Object

Release Domain This command is used to send a Release command to the registrar

Parameters:

See:

docs.whmcs.com/API:Release_Domain



31
32
33
34
# File 'lib/whmcs/domain.rb', line 31

def self.release(params = {})
	params.merge!(:action => 'domainrelease')
	send_request(params)
end

.renew(params = {}) ⇒ Object

Renew Domain This command is used to send a Renew command to the registrar

Parameters:

  • :domainid - Domain ID from WHMCS

  • :domain - The domain name (send domain id or domain)

See:

docs.whmcs.com/API:Renew_Domain



47
48
49
50
# File 'lib/whmcs/domain.rb', line 47

def self.renew(params = {})
	params.merge!(:action => 'domainrenew')
	send_request(params)
end

.request_epp(params = {}) ⇒ Object

Domain EPP This command is used to obtain the EPP Code of a domain

Parameters:

  • :domainid - ID of the domain in WHMCS

See:

docs.whmcs.com/API:Domain_EPP



109
110
111
112
# File 'lib/whmcs/domain.rb', line 109

def self.request_epp(params = {})
	params.merge!(:action => 'domainrequestepp')
	send_request(params)
end

.toggle_idprotect(params = {}) ⇒ Object

Toggle ID Protect This command is used to toggle the ID Protection status of a domain assigned to certain registrars. For example all LogicBoxes modules.

Parameters:

  • :domainid - ID of the domain in WHMCS

  • :dprotect - true/false

See:

docs.whmcs.com/API:Toggle_ID_Protect



140
141
142
143
# File 'lib/whmcs/domain.rb', line 140

def self.toggle_idprotect(params = {})
	params.merge!(:action => 'domaintoggleidprotect')
	send_request(params)
end

.transfer(params = {}) ⇒ Object

Transfer Domain This command is used to send a Transfer command to the registrar

Parameters:

  • :domainid - Domain ID from WHMCS

  • :domain - The domain name (send domain id or domain)

Optional attributes:

  • :eppcode - The EPP code for the transfer

See:

docs.whmcs.com/API:Transfer_Domain



66
67
68
69
# File 'lib/whmcs/domain.rb', line 66

def self.transfer(params = {})
	params.merge!(:action => 'domaintransfer')
	send_request(params)
end

.update_domain_whois(params = {}) ⇒ Object

Domain Update WHOIS This command is used to update the contact information on a domain

Parameters:

See:

docs.whmcs.com/API:Domain_Update_WHOIS



209
210
211
212
# File 'lib/whmcs/domain.rb', line 209

def self.update_domain_whois(params = {})
	params.merge!(:action => 'domainupdatewhoisinfo')
	send_request(params)
end

.update_lockstatus(params = {}) ⇒ Object

Domain Update Lock This command is used to update the lock state of a domain

Parameters:

  • :domainid - ID of the domain in WHMCS

Optional attributes:

  • :lockstatus - set to 1 to lock the domain

See:

docs.whmcs.com/API:Domain_Update_Lock



194
195
196
197
# File 'lib/whmcs/domain.rb', line 194

def self.update_lockstatus(params = {})
	params.merge!(:action => 'domainupdatelockingstatus')
	send_request(params)
end

.update_nameservers(params = {}) ⇒ Object

Domain Update Nameservers This command is used to update the nameservers of a domain

Parameters:

  • :domainid - ID of the domain in WHMCS

  • :domain - domainname to update (use domainid OR domain)

  • :ns1 - nameserver1

  • :ns2 - nameserver2

Optional attributes:

  • :ns3 - nameserver3

  • :ns4 - nameserver4

  • :ns5 - nameserver5

See:

docs.whmcs.com/API:Domain_Update_Nameservers



177
178
179
180
# File 'lib/whmcs/domain.rb', line 177

def self.update_nameservers(params = {})
	params.merge!(:action => 'domainupdatenameservers')
	send_request(params)
end

.whois(params = {}) ⇒ Object

Domain WHOIS This command is used to perform a whois lookup on a specified domain.

Parameters:

  • :domain - the domain to check

See:

docs.whmcs.com/API:Domain_WHOIS



124
125
126
127
# File 'lib/whmcs/domain.rb', line 124

def self.whois(params = {})
	params.merge!(:action => 'domainwhois')
	send_request(params)
end