Class: Google::Apis::RetailV2::GoogleCloudRetailV2ConditionTimeRange

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

Overview

Used for time-dependent conditions. Example: Want to have rule applied for week long sale.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRetailV2ConditionTimeRange

Returns a new instance of GoogleCloudRetailV2ConditionTimeRange.



1428
1429
1430
# File 'lib/google/apis/retail_v2/classes.rb', line 1428

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

Instance Attribute Details

#end_timeString

End of time range. Range is inclusive. Corresponds to the JSON property endTime

Returns:

  • (String)


1421
1422
1423
# File 'lib/google/apis/retail_v2/classes.rb', line 1421

def end_time
  @end_time
end

#start_timeString

Start of time range. Range is inclusive. Corresponds to the JSON property startTime

Returns:

  • (String)


1426
1427
1428
# File 'lib/google/apis/retail_v2/classes.rb', line 1426

def start_time
  @start_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1433
1434
1435
1436
# File 'lib/google/apis/retail_v2/classes.rb', line 1433

def update!(**args)
  @end_time = args[:end_time] if args.key?(:end_time)
  @start_time = args[:start_time] if args.key?(:start_time)
end