Class: Google::Apis::CivicinfoV2::PollingLocation
- Inherits:
-
Object
- Object
- Google::Apis::CivicinfoV2::PollingLocation
- 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
-
#address ⇒ Google::Apis::CivicinfoV2::SimpleAddressType
A simple representation of an address.
-
#end_date ⇒ String
The last date that this early vote site or drop off location may be used.
-
#latitude ⇒ Float
Latitude of the location, in degrees north of the equator.
-
#longitude ⇒ Float
Longitude of the location, in degrees east of the Prime Meridian.
-
#name ⇒ String
The name of the early vote site or drop off location.
-
#notes ⇒ String
Notes about this location (e.g. accessibility ramp or entrance to use).
-
#polling_hours ⇒ String
A description of when this location is open.
-
#sources ⇒ Array<Google::Apis::CivicinfoV2::Source>
A list of sources for this location.
-
#start_date ⇒ String
The first date that this early vote site or drop off location may be used.
-
#voter_services ⇒ String
The services provided by this early vote site or drop off location.
Instance Method Summary collapse
-
#initialize(**args) ⇒ PollingLocation
constructor
A new instance of PollingLocation.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ PollingLocation
Returns a new instance of PollingLocation.
901 902 903 |
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 901 def initialize(**args) update!(**args) end |
Instance Attribute Details
#address ⇒ Google::Apis::CivicinfoV2::SimpleAddressType
A simple representation of an address.
Corresponds to the JSON property address
847 848 849 |
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 847 def address @address end |
#end_date ⇒ String
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
853 854 855 |
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 853 def end_date @end_date end |
#latitude ⇒ Float
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
859 860 861 |
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 859 def latitude @latitude end |
#longitude ⇒ Float
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
865 866 867 |
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 865 def longitude @longitude end |
#name ⇒ String
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
871 872 873 |
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 871 def name @name end |
#notes ⇒ String
Notes about this location (e.g. accessibility ramp or entrance to use).
Corresponds to the JSON property notes
876 877 878 |
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 876 def notes @notes end |
#polling_hours ⇒ String
A description of when this location is open.
Corresponds to the JSON property pollingHours
881 882 883 |
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 881 def polling_hours @polling_hours end |
#sources ⇒ Array<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
887 888 889 |
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 887 def sources @sources end |
#start_date ⇒ String
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
893 894 895 |
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 893 def start_date @start_date end |
#voter_services ⇒ String
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
899 900 901 |
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 899 def voter_services @voter_services end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
906 907 908 909 910 911 912 913 914 915 916 917 |
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 906 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 |