Class: Google::Apis::MybusinessV3::SpecialHourPeriod

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/mybusiness_v3/classes.rb,
generated/google/apis/mybusiness_v3/representations.rb,
generated/google/apis/mybusiness_v3/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

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ SpecialHourPeriod

Returns a new instance of SpecialHourPeriod.


762
763
764
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 762

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

Instance Attribute Details

#close_timeString

The wall time on end_date when a location closes, expressed in 24hr ISO 8601 extended format. (hh:mm) Valid values are 00:00-24:00, where 24:00 represents midnight at the end of the specified day field. Must be specified if is_closed is false. Corresponds to the JSON property closeTime

Returns:

  • (String)

752
753
754
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 752

def close_time
  @close_time
end

#end_dateGoogle::Apis::MybusinessV3::Date

Represents a whole calendar date, e.g. date of birth. The time of day and time zone are either specified elsewhere or are not significant. The date is relative to the Proleptic Gregorian Calendar. The day may be 0 to represent a year and month where the day is not significant, e.g. credit card expiration date. The year may be 0 to represent a month and day independent of year, e.g. anniversary date. Related types are google.type.TimeOfDay and google.protobuf.Timestamp. Corresponds to the JSON property endDate


744
745
746
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 744

def end_date
  @end_date
end

#is_closedBoolean Also known as: is_closed?

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 isClosed

Returns:

  • (Boolean)

759
760
761
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 759

def is_closed
  @is_closed
end

#open_timeString

The wall time on start_date when a location opens, expressed in 24hr ISO 8601 extended format. (hh:mm) Valid values are 00:00-24:00, where 24:00 represents midnight at the end of the specified day field. Must be specified if is_closed is false. Corresponds to the JSON property openTime

Returns:

  • (String)

733
734
735
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 733

def open_time
  @open_time
end

#start_dateGoogle::Apis::MybusinessV3::Date

Represents a whole calendar date, e.g. date of birth. The time of day and time zone are either specified elsewhere or are not significant. The date is relative to the Proleptic Gregorian Calendar. The day may be 0 to represent a year and month where the day is not significant, e.g. credit card expiration date. The year may be 0 to represent a month and day independent of year, e.g. anniversary date. Related types are google.type.TimeOfDay and google.protobuf.Timestamp. Corresponds to the JSON property startDate


725
726
727
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 725

def start_date
  @start_date
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


767
768
769
770
771
772
773
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 767

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