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.



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

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



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

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)


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

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, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type. TimeOfDay * google.type.DateTime * google.protobuf.Timestamp Corresponds to the JSON property endDate



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

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



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

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, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type. TimeOfDay * google.type.DateTime * google.protobuf.Timestamp Corresponds to the JSON property startDate



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

def start_date
  @start_date
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



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

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