Class: DNSimple::Commands::DescribeContact

Inherits:
Object
  • Object
show all
Defined in:
lib/dnsimple/commands/describe_contact.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
19
20
21
22
# File 'lib/dnsimple/commands/describe_contact.rb', line 4

def execute(args, options={})
  id = args.shift
  contact = Contact.find(id)
  puts "Contact: #{contact.name}:"
  puts "\tID: #{contact.id}"
  puts "\tFirst Name: #{contact.first_name}"
  puts "\tLast Name: #{contact.last_name}"
  puts "\tOrganization Name: #{contact.organization_name}" if contact.organization_name
  puts "\tJob Title: #{contact.job_title}" if contact.job_title
  puts "\tAddress 1: #{contact.address1}"
  puts "\tAddress 2: #{contact.address2}"
  puts "\tCity: #{contact.city}"
  puts "\tState or Province: #{contact.state_province}"
  puts "\tPostal Code: #{contact.postal_code}"
  puts "\tCountry: #{contact.country}"
  puts "\tEmail: #{contact.email_address}"
  puts "\tPhone: #{contact.phone}"
  puts "\tPhone Ext: #{contact.phone_ext}" if contact.phone_ext
end