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

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/civicinfo_v2/classes.rb,
lib/google/apis/civicinfo_v2/representations.rb,
lib/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

Constructor Details

#initialize(**args) ⇒ PollingLocation

Returns a new instance of PollingLocation.



1019
1020
1021
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 1019

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



965
966
967
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 965

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)


971
972
973
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 971

def end_date
  @end_date
end

#latitudeFloat

Latitude of the location, in degrees north of the equator. Note this field may not be available for some locations. Corresponds to the JSON property latitude

Returns:

  • (Float)


977
978
979
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 977

def latitude
  @latitude
end

#longitudeFloat

Longitude of the location, in degrees east of the Prime Meridian. Note this field may not be available for some locations. Corresponds to the JSON property longitude

Returns:

  • (Float)


983
984
985
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 983

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)


989
990
991
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 989

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)


994
995
996
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 994

def notes
  @notes
end

#polling_hoursString

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

Returns:

  • (String)


999
1000
1001
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 999

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



1005
1006
1007
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 1005

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)


1011
1012
1013
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 1011

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)


1017
1018
1019
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 1017

def voter_services
  @voter_services
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 1024

def update!(**args)
  @address = args[:address] if args.key?(:address)
  @end_date = args[:end_date] if args.key?(:end_date)
  @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