Class: EPP::Domain::Transfer

Inherits:
Command
  • Object
show all
Defined in:
lib/epp-client/domain/transfer.rb

Instance Attribute Summary

Attributes inherited from Command

#namespaces

Instance Method Summary collapse

Methods inherited from Command

#set_namespaces

Methods included from XMLHelpers

#as_xml, #epp_namespace, #epp_node, #xml_document, #xml_namespace, #xml_node

Constructor Details

#initialize(name, period = nil, auth_info = {}) ⇒ Transfer

@auth_info should be an XML::Node with whatever is required



7
8
9
10
11
# File 'lib/epp-client/domain/transfer.rb', line 7

def initialize(name, period = nil, auth_info = {})
  @name = name
  @period = period
  @auth_info = auth_info
end

Instance Method Details

#nameObject



13
14
15
# File 'lib/epp-client/domain/transfer.rb', line 13

def name
  'transfer'
end

#to_xmlObject



17
18
19
20
21
22
23
24
# File 'lib/epp-client/domain/transfer.rb', line 17

def to_xml
  node = super
  node << domain_node('name', @name)
  node << period_to_xml(@period) if @period
  node << auth_info_to_xml(@auth_info) unless @auth_info.empty?

  node
end