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

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

Overview

Information about a person holding an elected office.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Official

Returns a new instance of Official



1102
1103
1104
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 1102

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



1065
1066
1067
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 1065

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



1070
1071
1072
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 1070

def channels
  @channels
end

#emailsArray<String>

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

Returns:

  • (Array<String>)


1075
1076
1077
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 1075

def emails
  @emails
end

#nameString

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

Returns:

  • (String)


1080
1081
1082
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 1080

def name
  @name
end

#partyString

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

Returns:

  • (String)


1085
1086
1087
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 1085

def party
  @party
end

#phonesArray<String>

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

Returns:

  • (Array<String>)


1090
1091
1092
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 1090

def phones
  @phones
end

#photo_urlString

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

Returns:

  • (String)


1095
1096
1097
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 1095

def photo_url
  @photo_url
end

#urlsArray<String>

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

Returns:

  • (Array<String>)


1100
1101
1102
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 1100

def urls
  @urls
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 1107

def update!(**args)
  @address = args[:address] if args.key?(:address)
  @channels = args[:channels] if args.key?(:channels)
  @emails = args[:emails] if args.key?(:emails)
  @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