Class: DNSimple::Commands::TransferDomain

Inherits:
Object
  • Object
show all
Defined in:
lib/dnsimple/commands/transfer_domain.rb

Instance Method Summary collapse

Instance Method Details

#execute(args, options = {}) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/dnsimple/commands/transfer_domain.rb', line 4

def execute(args, options={})
  name = args.shift
  registrant = {:id => args.shift}
  authinfo = args.shift unless args.empty?
  authinfo ||= ''

  extended_attributes = {}
  args.each do |arg|
    n, v = arg.split(":")
    extended_attributes[n] = v
  end

  transfer_order = TransferOrder.create(name, authinfo, registrant, extended_attributes)
  puts "Transfer order issued for #{name}"
end