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
-
#open_now ⇒ Boolean
(also: #open_now?)
Output only.
-
#periods ⇒ Array<Google::Apis::PlacesV1::GoogleMapsPlacesV1PlaceOpeningHoursPeriod>
Output only.
-
#secondary_hours_type ⇒ String
Output only.
-
#special_days ⇒ Array<Google::Apis::PlacesV1::GoogleMapsPlacesV1PlaceOpeningHoursSpecialDay>
Output only.
-
#weekday_descriptions ⇒ Array<String>
Output only.
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.
545 546 547 |
# File 'lib/google/apis/places_v1/classes.rb', line 545 def initialize(**args) update!(**args) end |
Instance Attribute Details
#open_now ⇒ Boolean Also known as: open_now?
Output only. Is this place open right now? Always present unless we lack time-
of-day or timezone data for these opening hours.
Corresponds to the JSON property openNow
513 514 515 |
# File 'lib/google/apis/places_v1/classes.rb', line 513 def open_now @open_now end |
#periods ⇒ Array<Google::Apis::PlacesV1::GoogleMapsPlacesV1PlaceOpeningHoursPeriod>
Output only. The periods that this place is open during the week. The periods
are in chronological order, starting with Sunday 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.
Corresponds to the JSON property periods
522 523 524 |
# File 'lib/google/apis/places_v1/classes.rb', line 522 def periods @periods end |
#secondary_hours_type ⇒ String
Output only. A type string used to identify the type of secondary hours.
Corresponds to the JSON property secondaryHoursType
527 528 529 |
# File 'lib/google/apis/places_v1/classes.rb', line 527 def secondary_hours_type @secondary_hours_type end |
#special_days ⇒ Array<Google::Apis::PlacesV1::GoogleMapsPlacesV1PlaceOpeningHoursSpecialDay>
Output only. 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
536 537 538 |
# File 'lib/google/apis/places_v1/classes.rb', line 536 def special_days @special_days end |
#weekday_descriptions ⇒ Array<String>
Output only. Localized strings describing the opening hours of this place, one
string for each day of the week. 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
543 544 545 |
# File 'lib/google/apis/places_v1/classes.rb', line 543 def weekday_descriptions @weekday_descriptions end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
550 551 552 553 554 555 556 |
# File 'lib/google/apis/places_v1/classes.rb', line 550 def update!(**args) @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 |