Module: NominetEPP::Operations::Unrenew
- Included in:
- Client
- Defined in:
- lib/nominet-epp/operations/unrenew.rb
Overview
EPP Unrenew Operation
Instance Method Summary collapse
-
#unrenew(*names) ⇒ false, Hash<String, Time>
Reverse a renewal request for one or more domain names.
Instance Method Details
#unrenew(*names) ⇒ false, Hash<String, Time>
Reverse a renewal request for one or more domain names.
Unrenew commands will only be processed if the renewal invoice has not yet been generated. If the operation is successful, an email will be sent to the registrant of the domain name notifying them of the renewal reversal.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/nominet-epp/operations/unrenew.rb', line 15 def unrenew(*names) @resp = @client.update do domain('unrenew') do |node, ns| names.each do |name| node << XML::Node.new('name', name, ns) end end end return false unless @resp.success? hash = {} @resp.data.find('//domain:renData', namespaces).each do |node| renName = node_value(node, 'domain:name') renExp = node_value(node, 'domain:exDate') hash[renName] = Time.parse(renExp) end hash end |