Class: NominetEPP::Domain::Create
- Defined in:
- lib/nominet-epp/requests/domain/create.rb
Instance Attribute Summary
Attributes inherited from Request
Instance Method Summary collapse
-
#initialize(name, options = {}) ⇒ Create
constructor
A new instance of Create.
Methods inherited from Request
#command_name, #namespaces, #xml_namespace, #xml_node
Constructor Details
#initialize(name, options = {}) ⇒ Create
Returns a new instance of Create.
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/nominet-epp/requests/domain/create.rb', line 4 def initialize(name, = {}) @name = name @options = @namespaces = {} @extensions = @options.dup @extensions.delete_if { |k,_| !CreateExtension::KEYS.include?(k) } @options.delete_if { |k,_| CreateExtension::KEYS.include?(k) } @options[:auth_info] ||= {:pw => SecureRandom.hex(8) } @domain_ext = CreateExtension.new(@extensions) rescue nil @secdns_ext = CreateSecDNSExtension.new(@options.delete(:ds)) rescue nil validate_period([:period]) @command = EPP::Domain::Create.new(@name, @options) @extension = EPP::Requests::Extension.new(@domain_ext, @secdns_ext) rescue nil end |