Class: NominetEPP::Client

Overview

Front end interface Client to the NominetEPP Service

Constant Summary collapse

DEFAULT_SERVICES =

Default Nominet Service URNs

%w(http://www.nominet.org.uk/epp/xml/nom-domain-2.0
http://www.nominet.org.uk/epp/xml/nom-notifications-2.0
urn:ietf:params:xml:ns:host-1.0)

Instance Method Summary collapse

Methods included from Operations::Update

#update

Methods included from Operations::Unrenew

#unrenew

Methods included from Operations::Unlock

#unlock

Methods included from Operations::Transfer

#transfer

Methods included from Operations::Renew

#renew

Methods included from Operations::Poll

#ack, #poll

Methods included from Operations::Merge

#merge

Methods included from Operations::Lock

#lock

Methods included from Operations::List

#list, #tag_list

Methods included from Operations::Info

#info

Methods included from Operations::Hello

#hello

Methods included from Operations::Fork

#fork

Methods included from Operations::Delete

#delete

Methods included from Operations::Create

#create

Methods included from Operations::Check

#check

Methods included from Helpers

#account_contact_to_xml, #account_contacts_to_xml, #account_fields_xml, #addr_to_xml, #contact_to_xml, #domain_host_xml, #domain_ns_xml, #fixup_account_contacts, #generic_field_to_xml

Constructor Details

#initialize(tag, passwd, server = 'epp.nominet.org.uk') ⇒ Client

Create a new instance of NominetEPP::Client

Parameters:

  • tag (String)

    Nominet TAG

  • passwd (String)

    Nominet TAG EPP Password

  • server (String) (defaults to: 'epp.nominet.org.uk')

    Nominet EPP Server address



21
22
23
24
# File 'lib/nominet-epp.rb', line 21

def initialize(tag, passwd, server = 'epp.nominet.org.uk')
  @tag, @server = tag, server
  @client = EPP::Client.new(tag, passwd, server, :services => DEFAULT_SERVICES)
end

Instance Method Details

#inspectObject

See Also:

  • Object#inspect


27
28
29
# File 'lib/nominet-epp.rb', line 27

def inspect
  "#<#{self.class} #{@tag}@#{@server}>"
end

#last_error_infoHash

Note:

This is presently only set by certain method calls, so it may not always be present.

Returns the last Nominet failData response found

Returns:

  • (Hash)

    last failData found



51
52
53
# File 'lib/nominet-epp.rb', line 51

def last_error_info
  @error_info
end

#last_messageString

Returns the last EPP message received

Returns:

  • (String)

    last EPP message

See Also:



42
43
44
# File 'lib/nominet-epp.rb', line 42

def last_message
  last_response.message
end

#last_responseEPP::Response

Returns the last EPP::Response received

Returns:

  • (EPP::Response)

    last received response



34
35
36
# File 'lib/nominet-epp.rb', line 34

def last_response
  @resp
end

#namespacesHash

Returns Nominet Namespaces by prefixes.

Returns:

  • (Hash)

    Nominet Namespaces by prefixes



56
57
58
59
60
61
62
63
# File 'lib/nominet-epp.rb', line 56

def namespaces
  { :domain  => 'http://www.nominet.org.uk/epp/xml/nom-domain-2.0',
    :account => 'http://www.nominet.org.uk/epp/xml/nom-account-2.0',
    :contact => 'http://www.nominet.org.uk/epp/xml/nom-contact-2.0',
    :tag     => 'http://www.nominet.org.uk/epp/xml/nom-tag-1.0',
    :n       => 'http://www.nominet.org.uk/epp/xml/nom-notifications-2.0',
    :host    => 'urn:ietf:params:xml:ns:host-1.0' }
end

#schemaLocationsHash

Returns Nominet Schema Locations by prefix.

Returns:

  • (Hash)

    Nominet Schema Locations by prefix



66
67
68
69
70
71
72
# File 'lib/nominet-epp.rb', line 66

def schemaLocations
  { :domain  => 'http://www.nominet.org.uk/epp/xml/nom-domain-2.0 nom-domain-2.0.xsd',
    :account => 'http://www.nominet.org.uk/epp/xml/nom-account-2.0 nom-account-2.0.xsd',
    :contact => 'http://www.nominet.org.uk/epp/xml/nom-contact-2.0 nom-contact-1.0.xsd',
    :tag     => 'http://www.nominet.org.uk/epp/xml/nom-tag-1.0 nom-tag-1.0.xsd',
    :n       => 'http://www.nominet.org.uk/epp/xml/nom-notifications-2.0  nom-notifications-2.0.xsd' }
end