Class: Google::Apis::CivicinfoV2::Official

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/civicinfo_v2/classes.rb,
lib/google/apis/civicinfo_v2/representations.rb,
lib/google/apis/civicinfo_v2/representations.rb

Overview

Information about a person holding an elected office.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Official

Returns a new instance of Official.



939
940
941
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 939

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#addressArray<Google::Apis::CivicinfoV2::SimpleAddressType>

Addresses at which to contact the official. Corresponds to the JSON property address



897
898
899
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 897

def address
  @address
end

#channelsArray<Google::Apis::CivicinfoV2::Channel>

A list of known (social) media channels for this official. Corresponds to the JSON property channels



902
903
904
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 902

def channels
  @channels
end

#emailsArray<String>

The direct email addresses for the official. Corresponds to the JSON property emails

Returns:

  • (Array<String>)


907
908
909
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 907

def emails
  @emails
end

#geocoding_summariesArray<Google::Apis::CivicinfoV2::GeocodingSummary>

Detailed summary about the official's address's geocoding Corresponds to the JSON property geocodingSummaries



912
913
914
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 912

def geocoding_summaries
  @geocoding_summaries
end

#nameString

The official's name. Corresponds to the JSON property name

Returns:

  • (String)


917
918
919
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 917

def name
  @name
end

#partyString

The full name of the party the official belongs to. Corresponds to the JSON property party

Returns:

  • (String)


922
923
924
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 922

def party
  @party
end

#phonesArray<String>

The official's public contact phone numbers. Corresponds to the JSON property phones

Returns:

  • (Array<String>)


927
928
929
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 927

def phones
  @phones
end

#photo_urlString

A URL for a photo of the official. Corresponds to the JSON property photoUrl

Returns:

  • (String)


932
933
934
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 932

def photo_url
  @photo_url
end

#urlsArray<String>

The official's public website URLs. Corresponds to the JSON property urls

Returns:

  • (Array<String>)


937
938
939
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 937

def urls
  @urls
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



944
945
946
947
948
949
950
951
952
953
954
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 944

def update!(**args)
  @address = args[:address] if args.key?(:address)
  @channels = args[:channels] if args.key?(:channels)
  @emails = args[:emails] if args.key?(:emails)
  @geocoding_summaries = args[:geocoding_summaries] if args.key?(:geocoding_summaries)
  @name = args[:name] if args.key?(:name)
  @party = args[:party] if args.key?(:party)
  @phones = args[:phones] if args.key?(:phones)
  @photo_url = args[:photo_url] if args.key?(:photo_url)
  @urls = args[:urls] if args.key?(:urls)
end