module EPPClient::Domain

This module handles all the Domain interactions.!

See RFC 5731 for more informations

Public Instance Methods

domain_check(*domains) click to toggle source

Check the availability of domains

takes a list of domains as arguments

returns an array of hashes containing three fields :

:name

The domain name

:avail

Wether the domain is available or not.

:reason

The reason for non availability, if given.

# File lib/epp-client/domain.rb, line 29
def domain_check(*domains)
  domains.flatten!
  response = send_request(domain_check_xml(*domains))

  get_result(:xml => response, :callback => :domain_check_process)
end
domain_create(args) click to toggle source

Creates a domain

Takes a hash as an argument, containing the following keys :

:name

the domain name

:period

an optionnal hash containing the period for witch the domain is registered with the following keys :

:unit

the unit of time, either “m”onth or “y”ear.

:number

the number of unit of time.

:ns

an optional array containing nameservers informations, which can either be an array of strings containing the nameserver's hostname, or an array of hashes containing the following keys :

:hostName

the hostname of the nameserver.

:hostAddrv4

an optionnal array of ipv4 addresses.

:hostAddrv6

an optionnal array of ipv6 addresses.

:registrant

an optionnal registrant nic handle.

:contacts

an optionnal hash which keys are choosen between admin, billing and tech and which values are arrays of nic handles for the corresponding contact types.

:authInfo

the password associated with the domain.

Returns a hash with the following keys :

:name

the fully qualified name of the domain object.

:crDate

the date and time of domain object creation.

:exDate

the date and time identifying the end of the domain object's registration period.

# File lib/epp-client/domain.rb, line 269
def domain_create(args)
  response = send_request(domain_create_xml(args))

  get_result(:xml => response, :callback => :domain_create_process)
end
domain_delete(domain) click to toggle source

Deletes a domain

Takes a single fully qualified domain name for argument.

Returns true on success, or raises an exception.

# File lib/epp-client/domain.rb, line 300
def domain_delete(domain)
  response = send_request(domain_delete_xml(domain))

  get_result(response)
end
domain_info(args) click to toggle source

Returns the informations about a domain

Takes either a unique argument, a string, representing the domain, or a hash with : :name the domain name, and optionnaly :authInfo the authentication information and possibly :roid the contact the authInfo is about.

Returned is a hash mapping as closely as possible the result expected from the command as per Section 3.1.2 of RFC 5731 :

:name

The fully qualified name of the domain object.

:roid

The Repository Object IDentifier assigned to the domain object when the object was created.

:status

an optionnal array of elements that contain the current status descriptors associated with the domain.

:registrant

one optionnal registrant nic handle.

:contacts

an optionnal hash which keys are choosen between admin, billing and tech and which values are arrays of nic handles for the corresponding contact types.

:ns

an optional array containing nameservers informations, which can either be an array of strings containing the the fully qualified name of a host, or an array of hashes containing the following keys :

:hostName

the fully qualified name of a host.

:hostAddrv4

an optionnal array of ipv4 addresses to be associated with the host.

:hostAddrv6

an optionnal array of ipv6 addresses to be associated with the host.

:host

an optionnal array of fully qualified names of the subordinate host objects that exist under this superordinate domain object.

:clID

the identifier of the sponsoring client.

:crID

an optional identifier of the client that created the domain object.

:crDate

an optional date and time of domain object creation.

:exDate

the date and time identifying the end of the domain object's registration period.

:upID

the identifier of the client that last updated the domain object.

:upDate

the date and time of the most recent domain-object modification.

:trDate

the date and time of the most recent successful domain-object transfer.

:authInfo

authorization information associated with the domain object.

# File lib/epp-client/domain.rb, line 118
def domain_info(args)
  args = { :name => args } if args.is_a?(String)
  response = send_request(domain_info_xml(args))

  get_result(:xml => response, :callback => :domain_info_process)
end
domain_transfer(args) click to toggle source

Transfers a domain

Takes a hash with :

:name

The domain name

:op

An operation that can either be “query” or “request”.

:authInfo

The authentication information and possibly :roid the contact the authInfo is about. The :authInfo information is optional when the operation type is “query” and mandatory when it is “request”.

:period

An optionnal hash containing the period for witch the domain is registered with the following keys :

:unit

the unit of time, either “m”onth or “y”ear.

:number

the number of unit of time.

Returned is a hash mapping as closely as possible the result expected from the command as per Section 3.1.3 and 3.2.4 of RFC 5731 :

:name

The fully qualified name of the domain object.

:trStatus

The state of the most recent transfer request.

:reID

The identifier of the client that requested the object transfer.

:reDate

The date and time that the transfer was requested.

:acID

The identifier of the client that SHOULD act upon a PENDING transfer request. For all other status types, the value identifies the client that took the indicated action.

:acDate

The date and time of a required or completed response. For a PENDING request, the value identifies the date and time by which a response is required before an automated response action will be taken by the server. For all other status types, the value identifies the date and time when the request was completed.

:exDate

Optionnaly, the end of the domain object's validity period if the <transfer> command caused or causes a change in the validity period.

# File lib/epp-client/domain.rb, line 472
def domain_transfer(args)
  response = send_request(domain_transfer_xml(args))

  get_result(:xml => response, :callback => :domain_transfer_response)
end
domain_update(args) click to toggle source

Updates a domain

Takes a hash with the name, and at least one of the following keys :

:name

the fully qualified name of the domain object to be updated.

:add/:rem

adds / removes the following data to/from the domain object :

:ns

an optional array containing nameservers informations, which can either be an array of strings containing the nameserver's hostname, or an array of hashes containing the following keys :

:hostName

the hostname of the nameserver.

:hostAddrv4

an optionnal array of ipv4 addresses.

:hostAddrv6

an optionnal array of ipv6 addresses.

:contacts

an optionnal hash which keys are choosen between admin, billing and tech and which values are arrays of nic handles for the corresponding contact types.

:status

an optional hash with status values to be applied to or removed from the object. When specifying a value to be removed, only the attribute value is significant; element text is not required to match a value for removal.

:chg

changes the following in the domain object.

:registrant

an optionnal registrant nic handle.

:authInfo

an optional password associated with the domain.

Returns true on success, or raises an exception.

# File lib/epp-client/domain.rb, line 375
def domain_update(args)
  response = send_request(domain_update_xml(args))

  get_result(response)
end