class Google::Apis::CivicinfoV2::Contest

Information about a contest that appears on a voter's ballot.

Attributes

ballot_placement[RW]

A number specifying the position of this contest on the voter's ballot. Corresponds to the JSON property `ballotPlacement` @return [String]

candidates[RW]

The candidate choices for this contest. Corresponds to the JSON property `candidates` @return [Array<Google::Apis::CivicinfoV2::Candidate>]

district[RW]

Describes the geographic scope of a contest. Corresponds to the JSON property `district` @return [Google::Apis::CivicinfoV2::ElectoralDistrict]

electorate_specifications[RW]

A description of any additional eligibility requirements for voting in this contest. Corresponds to the JSON property `electorateSpecifications` @return [String]

id[RW]

An ID for this object. IDs may change in future requests and should not be cached. Access to this field requires special access that can be requested from the Request more link on the Quotas page. Corresponds to the JSON property `id` @return [String]

level[RW]

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>]

number_elected[RW]

The number of candidates that will be elected to office in this contest. Corresponds to the JSON property `numberElected` @return [String]

number_voting_for[RW]

The number of candidates that a voter may vote for in this contest. Corresponds to the JSON property `numberVotingFor` @return [String]

office[RW]

The name of the office for this contest. Corresponds to the JSON property `office` @return [String]

primary_party[RW]

If this is a partisan election, the name of the party it is for. Corresponds to the JSON property `primaryParty` @return [String]

referendum_ballot_responses[RW]

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, or a judge's name for a retention contest. This field is only populated for contests of type 'Referendum'. Corresponds to the JSON property `referendumBallotResponses` @return [Array<String>]

referendum_brief[RW]

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]

referendum_con_statement[RW]

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]

referendum_effect_of_abstain[RW]

Specifies what effect abstaining (not voting) on the proposition will have (i.

  1. 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]

referendum_passage_threshold[RW]

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]

referendum_pro_statement[RW]

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]

referendum_subtitle[RW]

A brief description of the referendum. This field is only populated for contests of type 'Referendum'. Corresponds to the JSON property `referendumSubtitle` @return [String]

referendum_text[RW]

The full text of the referendum. This field is only populated for contests of type 'Referendum'. Corresponds to the JSON property `referendumText` @return [String]

referendum_title[RW]

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]

referendum_url[RW]

A link to the referendum. This field is only populated for contests of type ' Referendum'. Corresponds to the JSON property `referendumUrl` @return [String]

roles[RW]

The roles which this office fulfills. Corresponds to the JSON property `roles` @return [Array<String>]

sources[RW]

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>]

special[RW]

“Yes” or “No” depending on whether this a contest being held outside the normal election cycle. Corresponds to the JSON property `special` @return [String]

type[RW]

The type of contest. Usually this will be 'General', 'Primary', or 'Run-off' for contests with candidates. For referenda this will be 'Referendum'. Corresponds to the JSON property `type` @return [String]

Public Class Methods

new(**args) click to toggle source
# File generated/google/apis/civicinfo_v2/classes.rb, line 405
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 410
def update!(**args)
  @ballot_placement = args[:ballot_placement] if args.key?(:ballot_placement)
  @candidates = args[:candidates] if args.key?(:candidates)
  @district = args[:district] if args.key?(:district)
  @electorate_specifications = args[:electorate_specifications] if args.key?(:electorate_specifications)
  @id = args[:id] if args.key?(:id)
  @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_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