Class: GetStream::Generated::Models::QuietHoursRuleInput
- Defined in:
- lib/getstream_ruby/generated/models/quiet_hours_rule_input.rb
Overview
One recurring quiet window, expressed in local wall-clock time in the schedule's timezone.
Instance Attribute Summary collapse
-
#days ⇒ Array<String>
The days of the week the window opens on, any of mon, tue, wed, thu, fri, sat, sun, each at most once.
-
#end ⇒ String
When the window closes, as HH:MM local wall-clock time between 00:00 and 24:00.
-
#start ⇒ String
When the window opens, as HH:MM local wall-clock time between 00:00 and 23:59.
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ QuietHoursRuleInput
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ QuietHoursRuleInput
Initialize with attributes
23 24 25 26 27 28 |
# File 'lib/getstream_ruby/generated/models/quiet_hours_rule_input.rb', line 23 def initialize(attributes = {}) super(attributes) @end = attributes.fetch(:end) { attributes.fetch('end', nil) } @start = attributes.fetch(:start) { attributes.fetch('start', nil) } @days = attributes.fetch(:days) { attributes.fetch('days', nil) } end |
Instance Attribute Details
#days ⇒ Array<String>
Returns The days of the week the window opens on, any of mon, tue, wed, thu, fri, sat, sun, each at most once. A window belongs to the day it opens: ["fri"] with 22:00 to 07:00 is quiet from Friday 22:00 until Saturday 07:00, and not on Saturday night. Empty or omitted means every day.
20 21 22 |
# File 'lib/getstream_ruby/generated/models/quiet_hours_rule_input.rb', line 20 def days @days end |
#end ⇒ String
Returns When the window closes, as HH:MM local wall-clock time between 00:00 and 24:00. The end is exclusive: a window ending at 07:00 is already over at 07:00. An end earlier than start wraps past midnight into the next day (start 22:00, end 07:00). 24:00 means the end of the day, so start 00:00 with end 24:00 covers the whole day.
14 15 16 |
# File 'lib/getstream_ruby/generated/models/quiet_hours_rule_input.rb', line 14 def end @end end |
#start ⇒ String
Returns When the window opens, as HH:MM local wall-clock time between 00:00 and 23:59. Must differ from end.
17 18 19 |
# File 'lib/getstream_ruby/generated/models/quiet_hours_rule_input.rb', line 17 def start @start end |
Class Method Details
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization
31 32 33 34 35 36 37 |
# File 'lib/getstream_ruby/generated/models/quiet_hours_rule_input.rb', line 31 def self.json_field_mappings { end: 'end', start: 'start', days: 'days' } end |