Class: GetStream::Generated::Models::QuietHoursRuleResponse

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/getstream_ruby/generated/models/quiet_hours_rule_response.rb

Overview

One recurring quiet window, expressed in local wall-clock time in the schedule's timezone.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#==, #inspect, omit_empty_fields, #to_h, #to_json

Constructor Details

#initialize(attributes = {}) ⇒ QuietHoursRuleResponse

Initialize with attributes



23
24
25
26
27
28
# File 'lib/getstream_ruby/generated/models/quiet_hours_rule_response.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. 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. Omitted means every day.

Returns:

  • (Array<String>) —

    The days of the week the window opens on, any of mon, tue, wed, thu, fri, sat, sun. 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. Omitted means every day.



20
21
22
# File 'lib/getstream_ruby/generated/models/quiet_hours_rule_response.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. An end earlier than start wraps past midnight into the next day.

Returns:

  • (String) —

    When the window closes, as HH:MM local wall-clock time between 00:00 and 24:00. The end is exclusive. An end earlier than start wraps past midnight into the next day.



14
15
16
# File 'lib/getstream_ruby/generated/models/quiet_hours_rule_response.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.

Returns:

  • (String) —

    When the window opens, as HH:MM local wall-clock time between 00:00 and 23:59.



17
18
19
# File 'lib/getstream_ruby/generated/models/quiet_hours_rule_response.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_response.rb', line 31

def self.json_field_mappings
  {
    end: 'end',
    start: 'start',
    days: 'days'
  }
end