Sha256: ffb631713e0c756f1a12d4255b85ef5f929e95c2b9b5dd9db9526920f9150b2a
Contents?: true
Size: 566 Bytes
Versions: 19
Compression:
Stored size: 566 Bytes
Contents
module DNSimple module Commands class CreateContact # Execute the contact:create command. # # Args expected to be: # [name:value name:value ...] def execute(args, options={}) attributes = {} attributes['state_province_choice'] = 'S' args.each do |arg| name, value = arg.split(":") attributes[Contact.resolve(name)] = value end contact = Contact.create(attributes, options) puts "Created contact #{contact.name} (id: #{contact.id})" end end end end
Version data entries
19 entries across 19 versions & 2 rubygems