Class: Google::Apis::CivicinfoV2::VoterInfoResponse
- Inherits:
-
Object
- Object
- Google::Apis::CivicinfoV2::VoterInfoResponse
- Defined in:
- generated/google/apis/civicinfo_v2/classes.rb,
generated/google/apis/civicinfo_v2/representations.rb,
generated/google/apis/civicinfo_v2/representations.rb
Overview
The result of a voter info lookup query.
Instance Attribute Summary collapse
-
#contests ⇒ Array<Google::Apis::CivicinfoV2::Contest>
Contests that will appear on the voter's ballot.
-
#drop_off_locations ⇒ Array<Google::Apis::CivicinfoV2::PollingLocation>
Locations where a voter is eligible to drop off a completed ballot.
-
#early_vote_sites ⇒ Array<Google::Apis::CivicinfoV2::PollingLocation>
Locations where the voter is eligible to vote early, prior to election day.
-
#election ⇒ Google::Apis::CivicinfoV2::Election
Information about the election that was queried.
-
#kind ⇒ String
Identifies what kind of resource this is.
-
#mail_only ⇒ Boolean
(also: #mail_only?)
Specifies whether voters in the precinct vote only by mailing their ballots ( with the possible option of dropping off their ballots as well).
-
#normalized_input ⇒ Google::Apis::CivicinfoV2::SimpleAddressType
A simple representation of an address.
-
#other_elections ⇒ Array<Google::Apis::CivicinfoV2::Election>
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.
-
#polling_locations ⇒ Array<Google::Apis::CivicinfoV2::PollingLocation>
Locations where the voter is eligible to vote on election day.
-
#precinct_id ⇒ String
Corresponds to the JSON property
precinctId
. -
#state ⇒ Array<Google::Apis::CivicinfoV2::AdministrationRegion>
Local Election Information for the state that the voter votes in.
Instance Method Summary collapse
-
#initialize(**args) ⇒ VoterInfoResponse
constructor
A new instance of VoterInfoResponse.
-
#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) ⇒ VoterInfoResponse
Returns a new instance of VoterInfoResponse
1441 1442 1443 |
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 1441 def initialize(**args) update!(**args) end |
Instance Attribute Details
#contests ⇒ Array<Google::Apis::CivicinfoV2::Contest>
Contests that will appear on the voter's ballot.
Corresponds to the JSON property contests
1380 1381 1382 |
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 1380 def contests @contests end |
#drop_off_locations ⇒ Array<Google::Apis::CivicinfoV2::PollingLocation>
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
1388 1389 1390 |
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 1388 def drop_off_locations @drop_off_locations end |
#early_vote_sites ⇒ Array<Google::Apis::CivicinfoV2::PollingLocation>
Locations where the voter is eligible to vote early, prior to election day.
Corresponds to the JSON property earlyVoteSites
1393 1394 1395 |
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 1393 def early_vote_sites @early_vote_sites end |
#election ⇒ Google::Apis::CivicinfoV2::Election
Information about the election that was queried.
Corresponds to the JSON property election
1398 1399 1400 |
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 1398 def election @election end |
#kind ⇒ String
Identifies what kind of resource this is. Value: the fixed string "civicinfo#
voterInfoResponse".
Corresponds to the JSON property kind
1404 1405 1406 |
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 1404 def kind @kind end |
#mail_only ⇒ Boolean Also known as: mail_only?
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
1410 1411 1412 |
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 1410 def mail_only @mail_only end |
#normalized_input ⇒ Google::Apis::CivicinfoV2::SimpleAddressType
A simple representation of an address.
Corresponds to the JSON property normalizedInput
1416 1417 1418 |
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 1416 def normalized_input @normalized_input end |
#other_elections ⇒ Array<Google::Apis::CivicinfoV2::Election>
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
1423 1424 1425 |
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 1423 def other_elections @other_elections end |
#polling_locations ⇒ Array<Google::Apis::CivicinfoV2::PollingLocation>
Locations where the voter is eligible to vote on election day.
Corresponds to the JSON property pollingLocations
1428 1429 1430 |
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 1428 def polling_locations @polling_locations end |
#precinct_id ⇒ String
Corresponds to the JSON property precinctId
1433 1434 1435 |
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 1433 def precinct_id @precinct_id end |
#state ⇒ Array<Google::Apis::CivicinfoV2::AdministrationRegion>
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
1439 1440 1441 |
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 1439 def state @state end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 |
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 1446 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 |