Class: Google::Apis::MybusinessbusinessinformationV1::SpecialHourPeriod

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/mybusinessbusinessinformation_v1/classes.rb,
lib/google/apis/mybusinessbusinessinformation_v1/representations.rb,
lib/google/apis/mybusinessbusinessinformation_v1/representations.rb

Overview

Represents a single time period when a location's operational hours differ from its normal business hours. A special hour period must represent a range of less than 24 hours. The open_time and start_date must predate the close_time and end_date. The close_time and end_date can extend to 11: 59 a.m. on the day after the specified start_date. For example, the following inputs are valid: start_date=2015-11-23, open_time=08:00, close_time= 18:00 start_date=2015-11-23, end_date=2015-11-23, open_time=08:00, close_time= 18:00 start_date=2015-11-23, end_date=2015-11-24, open_time=13:00, close_time= 11:59 The following inputs are not valid: start_date=2015-11-23, open_time=13: 00, close_time=11:59 start_date=2015-11-23, end_date=2015-11-24, open_time=13: 00, close_time=12:00 start_date=2015-11-23, end_date=2015-11-25, open_time=08: 00, close_time=18:00

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ SpecialHourPeriod

Returns a new instance of SpecialHourPeriod.



1734
1735
1736
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 1734

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

Instance Attribute Details

#close_timeGoogle::Apis::MybusinessbusinessinformationV1::TimeOfDay

Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and google.protobuf.Timestamp. Corresponds to the JSON property closeTime



1693
1694
1695
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 1693

def close_time
  @close_time
end

#closedBoolean Also known as: closed?

Optional. If true, end_date, open_time, and close_time are ignored, and the date specified in start_date is treated as the location being closed for the entire day. Corresponds to the JSON property closed

Returns:

  • (Boolean)


1700
1701
1702
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 1700

def closed
  @closed
end

#end_dateGoogle::Apis::MybusinessbusinessinformationV1::Date

Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values * A month and day value, with a zero year, such as an anniversary * A year on its own, with zero month and day values * A year and month value, with a zero day, such as a credit card expiration date Related types are google.type.TimeOfDay and google.protobuf.Timestamp. Corresponds to the JSON property endDate



1713
1714
1715
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 1713

def end_date
  @end_date
end

#open_timeGoogle::Apis::MybusinessbusinessinformationV1::TimeOfDay

Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and google.protobuf.Timestamp. Corresponds to the JSON property openTime



1720
1721
1722
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 1720

def open_time
  @open_time
end

#start_dateGoogle::Apis::MybusinessbusinessinformationV1::Date

Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values * A month and day value, with a zero year, such as an anniversary * A year on its own, with zero month and day values * A year and month value, with a zero day, such as a credit card expiration date Related types are google.type.TimeOfDay and google.protobuf.Timestamp. Corresponds to the JSON property startDate



1732
1733
1734
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 1732

def start_date
  @start_date
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1739
1740
1741
1742
1743
1744
1745
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 1739

def update!(**args)
  @close_time = args[:close_time] if args.key?(:close_time)
  @closed = args[:closed] if args.key?(:closed)
  @end_date = args[:end_date] if args.key?(:end_date)
  @open_time = args[:open_time] if args.key?(:open_time)
  @start_date = args[:start_date] if args.key?(:start_date)
end