Class: Google::Apis::CivicinfoV2::ElectoralDistrict
- Inherits:
-
Object
- Object
- Google::Apis::CivicinfoV2::ElectoralDistrict
- Defined in:
- generated/google/apis/civicinfo_v2/classes.rb,
generated/google/apis/civicinfo_v2/representations.rb,
generated/google/apis/civicinfo_v2/representations.rb
Overview
Describes the geographic scope of a contest.
Instance Attribute Summary collapse
-
#id ⇒ String
An identifier for this district, relative to its scope.
-
#kg_foreign_key ⇒ String
Corresponds to the JSON property
kgForeignKey
. -
#name ⇒ String
The name of the district.
-
#scope ⇒ String
The geographic scope of this district.
Instance Method Summary collapse
-
#initialize(**args) ⇒ ElectoralDistrict
constructor
A new instance of ElectoralDistrict.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Google::Apis::Core::JsonObjectSupport
Methods included from Google::Apis::Core::Hashable
Constructor Details
#initialize(**args) ⇒ ElectoralDistrict
Returns a new instance of ElectoralDistrict
726 727 728 |
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 726 def initialize(**args) update!(**args) end |
Instance Attribute Details
#id ⇒ String
An identifier for this district, relative to its scope. For example, the 34th
State Senate district would have id "34" and a scope of stateUpper.
Corresponds to the JSON property id
706 707 708 |
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 706 def id @id end |
#kg_foreign_key ⇒ String
Corresponds to the JSON property kgForeignKey
711 712 713 |
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 711 def kg_foreign_key @kg_foreign_key end |
#name ⇒ String
The name of the district.
Corresponds to the JSON property name
716 717 718 |
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 716 def name @name end |
#scope ⇒ String
The geographic scope of this district. If unspecified the district's geography
is not known. One of: national, statewide, congressional, stateUpper,
stateLower, countywide, judicial, schoolBoard, cityWide, township,
countyCouncil, cityCouncil, ward, special
Corresponds to the JSON property scope
724 725 726 |
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 724 def scope @scope end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
731 732 733 734 735 736 |
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 731 def update!(**args) @id = args[:id] if args.key?(:id) @kg_foreign_key = args[:kg_foreign_key] if args.key?(:kg_foreign_key) @name = args[:name] if args.key?(:name) @scope = args[:scope] if args.key?(:scope) end |