Class: Google::Apis::CivicinfoV2::RepresentativeInfoData

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ RepresentativeInfoData

Returns a new instance of RepresentativeInfoData.



1019
1020
1021
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 1019

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

Instance Attribute Details

#divisionsHash<String,Google::Apis::CivicinfoV2::GeographicDivision>

A map of political geographic divisions that contain the requested address, keyed by the unique Open Civic Data identifier for this division. Corresponds to the JSON property divisions



1005
1006
1007
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 1005

def divisions
  @divisions
end

#officesArray<Google::Apis::CivicinfoV2::Office>

Elected offices referenced by the divisions listed above. Will only be present if includeOffices was true in the request. Corresponds to the JSON property offices



1011
1012
1013
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 1011

def offices
  @offices
end

#officialsArray<Google::Apis::CivicinfoV2::Official>

Officials holding the offices listed above. Will only be present if includeOffices was true in the request. Corresponds to the JSON property officials



1017
1018
1019
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 1017

def officials
  @officials
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1024
1025
1026
1027
1028
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 1024

def update!(**args)
  @divisions = args[:divisions] if args.key?(:divisions)
  @offices = args[:offices] if args.key?(:offices)
  @officials = args[:officials] if args.key?(:officials)
end