class Google::Apis::CivicinfoV2::Contest
Information about a contest that appears on a voter's ballot.
Attributes
A number specifying the position of this contest on the voter's ballot. Corresponds to the JSON property `ballotPlacement` @return [Fixnum]
The official title on the ballot for this contest, only where available. Corresponds to the JSON property `ballotTitle` @return [String]
The candidate choices for this contest. Corresponds to the JSON property `candidates` @return [Array<Google::Apis::CivicinfoV2::Candidate>]
Describes the geographic scope of a contest. Corresponds to the JSON property `district` @return [Google::Apis::CivicinfoV2::ElectoralDistrict]
A description of any additional eligibility requirements for voting in this contest. Corresponds to the JSON property `electorateSpecifications` @return [String]
The levels of government of the office for this contest. There may be more than one in cases where a jurisdiction effectively acts at two different levels of government; for example, the mayor of the District of Columbia acts at “locality” level, but also effectively at both “administrative-area-2” and “ administrative-area-1”. Corresponds to the JSON property `level` @return [Array<String>]
The number of candidates that will be elected to office in this contest. Corresponds to the JSON property `numberElected` @return [Fixnum]
The number of candidates that a voter may vote for in this contest. Corresponds to the JSON property `numberVotingFor` @return [Fixnum]
The name of the office for this contest. Corresponds to the JSON property `office` @return [String]
If this is a partisan election, the name of the party/parties it is for. Corresponds to the JSON property `primaryParties` @return [Array<String>]
- DEPRECATED
-
If this is a partisan election, the name of the party it is for.
This field as deprecated in favor of the array “primaryParties”, as contests may contain more than one party. Corresponds to the JSON property `primaryParty` @return [String]
The set of ballot responses for the referendum. A ballot response represents a line on the ballot. Common examples might include “yes” or “no” for referenda. This field is only populated for contests of type 'Referendum'. Corresponds to the JSON property `referendumBallotResponses` @return [Array<String>]
Specifies a short summary of the referendum that is typically on the ballot below the title but above the text. This field is only populated for contests of type 'Referendum'. Corresponds to the JSON property `referendumBrief` @return [String]
A statement in opposition to the referendum. It does not necessarily appear on the ballot. This field is only populated for contests of type 'Referendum'. Corresponds to the JSON property `referendumConStatement` @return [String]
Specifies what effect abstaining (not voting) on the proposition will have (i.
-
whether abstaining is considered a vote against it). This field is only
populated for contests of type 'Referendum'. Corresponds to the JSON property `referendumEffectOfAbstain` @return [String]
The threshold of votes that the referendum needs in order to pass, e.g. “two- thirds”. This field is only populated for contests of type 'Referendum'. Corresponds to the JSON property `referendumPassageThreshold` @return [String]
A statement in favor of the referendum. It does not necessarily appear on the ballot. This field is only populated for contests of type 'Referendum'. Corresponds to the JSON property `referendumProStatement` @return [String]
A brief description of the referendum. This field is only populated for contests of type 'Referendum'. Corresponds to the JSON property `referendumSubtitle` @return [String]
The full text of the referendum. This field is only populated for contests of type 'Referendum'. Corresponds to the JSON property `referendumText` @return [String]
The title of the referendum (e.g. 'Proposition 42'). This field is only populated for contests of type 'Referendum'. Corresponds to the JSON property `referendumTitle` @return [String]
A link to the referendum. This field is only populated for contests of type ' Referendum'. Corresponds to the JSON property `referendumUrl` @return [String]
The roles which this office fulfills. Corresponds to the JSON property `roles` @return [Array<String>]
A list of sources for this contest. If multiple sources are listed, the data has been aggregated from those sources. Corresponds to the JSON property `sources` @return [Array<Google::Apis::CivicinfoV2::Source>]
“Yes” or “No” depending on whether this a contest being held outside the normal election cycle. Corresponds to the JSON property `special` @return [String]
The type of contest. Usually this will be 'General', 'Primary', or 'Run-off' for contests with candidates. For referenda this will be 'Referendum'. For Retention contests this will typically be 'Retention'. Corresponds to the JSON property `type` @return [String]
Public Class Methods
# File lib/google/apis/civicinfo_v2/classes.rb, line 418 def initialize(**args) update!(**args) end
Public Instance Methods
Update properties of this object
# File lib/google/apis/civicinfo_v2/classes.rb, line 423 def update!(**args) @ballot_placement = args[:ballot_placement] if args.key?(:ballot_placement) @ballot_title = args[:ballot_title] if args.key?(:ballot_title) @candidates = args[:candidates] if args.key?(:candidates) @district = args[:district] if args.key?(:district) @electorate_specifications = args[:electorate_specifications] if args.key?(:electorate_specifications) @level = args[:level] if args.key?(:level) @number_elected = args[:number_elected] if args.key?(:number_elected) @number_voting_for = args[:number_voting_for] if args.key?(:number_voting_for) @office = args[:office] if args.key?(:office) @primary_parties = args[:primary_parties] if args.key?(:primary_parties) @primary_party = args[:primary_party] if args.key?(:primary_party) @referendum_ballot_responses = args[:referendum_ballot_responses] if args.key?(:referendum_ballot_responses) @referendum_brief = args[:referendum_brief] if args.key?(:referendum_brief) @referendum_con_statement = args[:referendum_con_statement] if args.key?(:referendum_con_statement) @referendum_effect_of_abstain = args[:referendum_effect_of_abstain] if args.key?(:referendum_effect_of_abstain) @referendum_passage_threshold = args[:referendum_passage_threshold] if args.key?(:referendum_passage_threshold) @referendum_pro_statement = args[:referendum_pro_statement] if args.key?(:referendum_pro_statement) @referendum_subtitle = args[:referendum_subtitle] if args.key?(:referendum_subtitle) @referendum_text = args[:referendum_text] if args.key?(:referendum_text) @referendum_title = args[:referendum_title] if args.key?(:referendum_title) @referendum_url = args[:referendum_url] if args.key?(:referendum_url) @roles = args[:roles] if args.key?(:roles) @sources = args[:sources] if args.key?(:sources) @special = args[:special] if args.key?(:special) @type = args[:type] if args.key?(:type) end