class Google::Apis::CivicinfoV2::Election
Information about the election that was queried.
Attributes
election_day[RW]
Day of the election in YYYY-MM-DD format. Corresponds to the JSON property `electionDay` @return [String]
id[RW]
The unique ID of this election. Corresponds to the JSON property `id` @return [String]
name[RW]
A displayable name for the election. Corresponds to the JSON property `name` @return [String]
ocd_division_id[RW]
The political division of the election. Represented as an OCD Division ID. Voters within these political jurisdictions are covered by this election. This is typically a state such as ocd-division/country:us/state:ca or for the midterms or general election the entire US (i.e. ocd-division/country:us). Corresponds to the JSON property `ocdDivisionId` @return [String]
Public Class Methods
new(**args)
click to toggle source
# File generated/google/apis/civicinfo_v2/classes.rb, line 526 def initialize(**args) update!(**args) end
Public Instance Methods
update!(**args)
click to toggle source
Update properties of this object
# File generated/google/apis/civicinfo_v2/classes.rb, line 531 def update!(**args) @election_day = args[:election_day] if args.key?(:election_day) @id = args[:id] if args.key?(:id) @name = args[:name] if args.key?(:name) @ocd_division_id = args[:ocd_division_id] if args.key?(:ocd_division_id) end