Class: Google::Apis::PlacesV1::GoogleMapsPlacesV1PlaceOpeningHours
- Inherits:
-
Object
- Object
- Google::Apis::PlacesV1::GoogleMapsPlacesV1PlaceOpeningHours
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/places_v1/classes.rb,
lib/google/apis/places_v1/representations.rb,
lib/google/apis/places_v1/representations.rb
Overview
Information about business hour of the place.
Instance Attribute Summary collapse
-
#next_close_time ⇒ String
The next time the current opening hours period ends up to 7 days in the future.
-
#next_open_time ⇒ String
The next time the current opening hours period starts up to 7 days in the future.
-
#open_now ⇒ Boolean
(also: #open_now?)
Whether the opening hours period is currently active.
-
#periods ⇒ Array<Google::Apis::PlacesV1::GoogleMapsPlacesV1PlaceOpeningHoursPeriod>
The periods that this place is open during the week.
-
#secondary_hours_type ⇒ String
A type string used to identify the type of secondary hours.
-
#special_days ⇒ Array<Google::Apis::PlacesV1::GoogleMapsPlacesV1PlaceOpeningHoursSpecialDay>
Structured information for special days that fall within the period that the returned opening hours cover.
-
#weekday_descriptions ⇒ Array<String>
Localized strings describing the opening hours of this place, one string for each day of the week.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleMapsPlacesV1PlaceOpeningHours
constructor
A new instance of GoogleMapsPlacesV1PlaceOpeningHours.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleMapsPlacesV1PlaceOpeningHours
Returns a new instance of GoogleMapsPlacesV1PlaceOpeningHours.
2183 2184 2185 |
# File 'lib/google/apis/places_v1/classes.rb', line 2183 def initialize(**args) update!(**args) end |
Instance Attribute Details
#next_close_time ⇒ String
The next time the current opening hours period ends up to 7 days in the future.
This field is only populated if the opening hours period is active at the
time of serving the request.
Corresponds to the JSON property nextCloseTime
2127 2128 2129 |
# File 'lib/google/apis/places_v1/classes.rb', line 2127 def next_close_time @next_close_time end |
#next_open_time ⇒ String
The next time the current opening hours period starts up to 7 days in the
future. This field is only populated if the opening hours period is not active
at the time of serving the request.
Corresponds to the JSON property nextOpenTime
2134 2135 2136 |
# File 'lib/google/apis/places_v1/classes.rb', line 2134 def next_open_time @next_open_time end |
#open_now ⇒ Boolean Also known as: open_now?
Whether the opening hours period is currently active. For regular opening
hours and current opening hours, this field means whether the place is open.
For secondary opening hours and current secondary opening hours, this field
means whether the secondary hours of this place is active.
Corresponds to the JSON property openNow
2142 2143 2144 |
# File 'lib/google/apis/places_v1/classes.rb', line 2142 def open_now @open_now end |
#periods ⇒ Array<Google::Apis::PlacesV1::GoogleMapsPlacesV1PlaceOpeningHoursPeriod>
The periods that this place is open during the week. The periods are in
chronological order, in the place-local timezone. An empty (but not absent)
value indicates a place that is never open, e.g. because it is closed
temporarily for renovations. The starting day of periods is NOT fixed and
should not be assumed to be Sunday. The API determines the start day based on
a variety of factors. For example, for a 24/7 business, the first period may
begin on the day of the request. For other businesses, it might be the first
day of the week that they are open. NOTE: The ordering of the periods array
is independent of the ordering of the weekday_descriptions array. Do not
assume they will begin on the same day.
Corresponds to the JSON property periods
2157 2158 2159 |
# File 'lib/google/apis/places_v1/classes.rb', line 2157 def periods @periods end |
#secondary_hours_type ⇒ String
A type string used to identify the type of secondary hours.
Corresponds to the JSON property secondaryHoursType
2162 2163 2164 |
# File 'lib/google/apis/places_v1/classes.rb', line 2162 def secondary_hours_type @secondary_hours_type end |
#special_days ⇒ Array<Google::Apis::PlacesV1::GoogleMapsPlacesV1PlaceOpeningHoursSpecialDay>
Structured information for special days that fall within the period that the
returned opening hours cover. Special days are days that could impact the
business hours of a place, e.g. Christmas day. Set for current_opening_hours
and current_secondary_opening_hours if there are exceptional hours.
Corresponds to the JSON property specialDays
2170 2171 2172 |
# File 'lib/google/apis/places_v1/classes.rb', line 2170 def special_days @special_days end |
#weekday_descriptions ⇒ Array<String>
Localized strings describing the opening hours of this place, one string for
each day of the week. NOTE: The order of the days and the start of the week is
determined by the locale (language and region). The ordering of the periods
array is independent of the ordering of the weekday_descriptions array. Do
not assume they will begin on the same day. Will be empty if the hours are
unknown or could not be converted to localized text. Example: "Sun: 18:00–06:
00"
Corresponds to the JSON property weekdayDescriptions
2181 2182 2183 |
# File 'lib/google/apis/places_v1/classes.rb', line 2181 def weekday_descriptions @weekday_descriptions end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2188 2189 2190 2191 2192 2193 2194 2195 2196 |
# File 'lib/google/apis/places_v1/classes.rb', line 2188 def update!(**args) @next_close_time = args[:next_close_time] if args.key?(:next_close_time) @next_open_time = args[:next_open_time] if args.key?(:next_open_time) @open_now = args[:open_now] if args.key?(:open_now) @periods = args[:periods] if args.key?(:periods) @secondary_hours_type = args[:secondary_hours_type] if args.key?(:secondary_hours_type) @special_days = args[:special_days] if args.key?(:special_days) @weekday_descriptions = args[:weekday_descriptions] if args.key?(:weekday_descriptions) end |