Class: NominetEPP::Domain::Release

Inherits:
CustomRequest show all
Defined in:
lib/nominet-epp/requests/domain/release.rb

Constant Summary collapse

NAMESPACE =
'http://www.nominet.org.uk/epp/xml/std-release-1.0'

Instance Attribute Summary

Attributes inherited from Request

#command, #extension

Instance Method Summary collapse

Methods inherited from CustomRequest

#command, #namespaces, #schemaLocation, #schema_name, #set_namespaces, #x_namespace, #x_node, #x_schemaLocation

Methods inherited from Request

#namespaces, #xml_namespace, #xml_node

Constructor Details

#initialize(name, tag) ⇒ Release

Returns a new instance of Release.



6
7
8
9
# File 'lib/nominet-epp/requests/domain/release.rb', line 6

def initialize(name, tag)
  @name = name
  @tag  = tag
end

Instance Method Details

#command_nameObject



11
12
13
# File 'lib/nominet-epp/requests/domain/release.rb', line 11

def command_name
  'update'
end

#namespace_nameObject



14
15
16
# File 'lib/nominet-epp/requests/domain/release.rb', line 14

def namespace_name
  'r'
end

#namespace_uriObject



17
18
19
# File 'lib/nominet-epp/requests/domain/release.rb', line 17

def namespace_uri
  NAMESPACE
end

#to_xmlObject



21
22
23
24
25
26
27
28
29
30
# File 'lib/nominet-epp/requests/domain/release.rb', line 21

def to_xml
  @namespaces ||= {}
  node = x_node('release')
  x_schemaLocation(node)

  node << x_node('domainName', @name)
  node << x_node('registrarTag', @tag)

  node
end