Class: EPP::Contact::Create
- Defined in:
- lib/epp-client/contact/create.rb
Constant Summary
Constants inherited from Command
EPP::Contact::Command::DISCLOSE_ORDER, EPP::Contact::Command::MAX_STREETS
Instance Attribute Summary
Attributes inherited from Command
Instance Method Summary collapse
-
#initialize(id, options = {}) ⇒ Create
constructor
A new instance of Create.
- #name ⇒ Object
- #to_xml ⇒ Object
Methods inherited from Command
Methods included from XMLHelpers
#as_xml, #epp_namespace, #epp_node, #xml_document, #xml_namespace, #xml_node
Constructor Details
#initialize(id, options = {}) ⇒ Create
Returns a new instance of Create.
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/epp-client/contact/create.rb', line 6 def initialize(id, = {}) @id = id @postal_info = .delete(:postal_info) @voice = .delete(:voice) @fax = .delete(:fax) @email = .delete(:email) @auth_info = .delete(:auth_info) @disclose = .delete(:disclose) end |
Instance Method Details
#name ⇒ Object
17 18 19 |
# File 'lib/epp-client/contact/create.rb', line 17 def name 'create' end |
#to_xml ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/epp-client/contact/create.rb', line 21 def to_xml node = super node << contact_node('id', @id) node << postal_info_to_xml(@postal_info) node << contact_node('voice', @voice) if @voice node << contact_node('fax', @fax) if @fax node << contact_node('email', @email) node << auth_info_to_xml(@auth_info) node << disclose_to_xml(@disclose) if @disclose node end |