class Google::Apis::CivicinfoV2::VoterInfoResponse

The result of a voter info lookup query.

Attributes

contests[RW]

Contests that will appear on the voter's ballot. Corresponds to the JSON property `contests` @return [Array<Google::Apis::CivicinfoV2::Contest>]

drop_off_locations[RW]

Locations where a voter is eligible to drop off a completed ballot. The voter must have received and completed a ballot prior to arriving at the location. The location may not have ballots available on the premises. These locations could be open on or before election day as indicated in the pollingHours field. Corresponds to the JSON property `dropOffLocations` @return [Array<Google::Apis::CivicinfoV2::PollingLocation>]

early_vote_sites[RW]

Locations where the voter is eligible to vote early, prior to election day. Corresponds to the JSON property `earlyVoteSites` @return [Array<Google::Apis::CivicinfoV2::PollingLocation>]

election[RW]

Information about the election that was queried. Corresponds to the JSON property `election` @return [Google::Apis::CivicinfoV2::Election]

kind[RW]

Identifies what kind of resource this is. Value: the fixed string ā€œcivicinfo# voterInfoResponseā€. Corresponds to the JSON property `kind` @return [String]

mail_only[RW]

Specifies whether voters in the precinct vote only by mailing their ballots ( with the possible option of dropping off their ballots as well). Corresponds to the JSON property `mailOnly` @return [Boolean]

mail_only?[RW]

Specifies whether voters in the precinct vote only by mailing their ballots ( with the possible option of dropping off their ballots as well). Corresponds to the JSON property `mailOnly` @return [Boolean]

normalized_input[RW]

A simple representation of an address. Corresponds to the JSON property `normalizedInput` @return [Google::Apis::CivicinfoV2::SimpleAddressType]

other_elections[RW]

If no election ID was specified in the query, and there was more than one election with data for the given voter, this will contain information about the other elections that could apply. Corresponds to the JSON property `otherElections` @return [Array<Google::Apis::CivicinfoV2::Election>]

polling_locations[RW]

Locations where the voter is eligible to vote on election day. Corresponds to the JSON property `pollingLocations` @return [Array<Google::Apis::CivicinfoV2::PollingLocation>]

precinct_id[RW]

Corresponds to the JSON property `precinctId` @return [String]

state[RW]

Local Election Information for the state that the voter votes in. For the US, there will only be one element in this array. Corresponds to the JSON property `state` @return [Array<Google::Apis::CivicinfoV2::AdministrationRegion>]

Public Class Methods

new(**args) click to toggle source
# File generated/google/apis/civicinfo_v2/classes.rb, line 1106
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 1111
def update!(**args)
  @contests = args[:contests] if args.key?(:contests)
  @drop_off_locations = args[:drop_off_locations] if args.key?(:drop_off_locations)
  @early_vote_sites = args[:early_vote_sites] if args.key?(:early_vote_sites)
  @election = args[:election] if args.key?(:election)
  @kind = args[:kind] if args.key?(:kind)
  @mail_only = args[:mail_only] if args.key?(:mail_only)
  @normalized_input = args[:normalized_input] if args.key?(:normalized_input)
  @other_elections = args[:other_elections] if args.key?(:other_elections)
  @polling_locations = args[:polling_locations] if args.key?(:polling_locations)
  @precinct_id = args[:precinct_id] if args.key?(:precinct_id)
  @state = args[:state] if args.key?(:state)
end