Class: Google::Apis::CivicinfoV2::PollingLocation

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/civicinfo_v2/classes.rb,
generated/google/apis/civicinfo_v2/representations.rb,
generated/google/apis/civicinfo_v2/representations.rb

Overview

A location where a voter can vote. This may be an early vote site, an election day voting location, or a drop off location for a completed ballot.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ PollingLocation

Returns a new instance of PollingLocation.



1073
1074
1075
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 1073

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#addressGoogle::Apis::CivicinfoV2::SimpleAddressType

A simple representation of an address. Corresponds to the JSON property address



1008
1009
1010
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 1008

def address
  @address
end

#end_dateString

The last date that this early vote site or drop off location may be used. This field is not populated for polling locations. Corresponds to the JSON property endDate

Returns:

  • (String)


1014
1015
1016
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 1014

def end_date
  @end_date
end

#idString

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

Returns:

  • (String)


1021
1022
1023
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 1021

def id
  @id
end

#latitudeFloat

Latitude of the location, in degrees north of the equator. Only some locations -- generally, ballot drop boxes for vote-by-mail elections -- will have this set; for others, use a geocoding service like the Google Maps API to resolve the address to a geographic point. Corresponds to the JSON property latitude

Returns:

  • (Float)


1029
1030
1031
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 1029

def latitude
  @latitude
end

#longitudeFloat

Longitude of the location, in degrees east of the Prime Meridian. Only some locations -- generally, ballot drop boxes for vote-by-mail elections -- will have this set; for others, use a geocoding service like the Google Maps API to resolve the address to a geographic point. Corresponds to the JSON property longitude

Returns:

  • (Float)


1037
1038
1039
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 1037

def longitude
  @longitude
end

#nameString

The name of the early vote site or drop off location. This field is not populated for polling locations. Corresponds to the JSON property name

Returns:

  • (String)


1043
1044
1045
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 1043

def name
  @name
end

#notesString

Notes about this location (e.g. accessibility ramp or entrance to use). Corresponds to the JSON property notes

Returns:

  • (String)


1048
1049
1050
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 1048

def notes
  @notes
end

#polling_hoursString

A description of when this location is open. Corresponds to the JSON property pollingHours

Returns:

  • (String)


1053
1054
1055
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 1053

def polling_hours
  @polling_hours
end

#sourcesArray<Google::Apis::CivicinfoV2::Source>

A list of sources for this location. If multiple sources are listed the data has been aggregated from those sources. Corresponds to the JSON property sources



1059
1060
1061
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 1059

def sources
  @sources
end

#start_dateString

The first date that this early vote site or drop off location may be used. This field is not populated for polling locations. Corresponds to the JSON property startDate

Returns:

  • (String)


1065
1066
1067
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 1065

def start_date
  @start_date
end

#voter_servicesString

The services provided by this early vote site or drop off location. This field is not populated for polling locations. Corresponds to the JSON property voterServices

Returns:

  • (String)


1071
1072
1073
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 1071

def voter_services
  @voter_services
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 1078

def update!(**args)
  @address = args[:address] if args.key?(:address)
  @end_date = args[:end_date] if args.key?(:end_date)
  @id = args[:id] if args.key?(:id)
  @latitude = args[:latitude] if args.key?(:latitude)
  @longitude = args[:longitude] if args.key?(:longitude)
  @name = args[:name] if args.key?(:name)
  @notes = args[:notes] if args.key?(:notes)
  @polling_hours = args[:polling_hours] if args.key?(:polling_hours)
  @sources = args[:sources] if args.key?(:sources)
  @start_date = args[:start_date] if args.key?(:start_date)
  @voter_services = args[:voter_services] if args.key?(:voter_services)
end