Class: GetStream::Generated::Models::PushScheduleResponse
- Defined in:
- lib/getstream_ruby/generated/models/push_schedule_response.rb
Overview
A recurring quiet-hours schedule: while any quiet window is active, push notifications for the user are suppressed. Suppressed notifications are dropped, not delayed.
Instance Attribute Summary collapse
-
#quiet_hours ⇒ Array<QuietHoursRuleResponse>
The quiet windows.
-
#timezone ⇒ String
IANA time zone name the quiet windows are evaluated in, for example Europe/Amsterdam.
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ PushScheduleResponse
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ PushScheduleResponse
Initialize with attributes
20 21 22 23 24 |
# File 'lib/getstream_ruby/generated/models/push_schedule_response.rb', line 20 def initialize(attributes = {}) super(attributes) @timezone = attributes.fetch(:timezone) { attributes.fetch('timezone', nil) } @quiet_hours = attributes.fetch(:quiet_hours) { attributes.fetch('quiet_hours', nil) } end |
Instance Attribute Details
#quiet_hours ⇒ Array<QuietHoursRuleResponse>
Returns The quiet windows. Push is suppressed while any rule is active.
17 18 19 |
# File 'lib/getstream_ruby/generated/models/push_schedule_response.rb', line 17 def quiet_hours @quiet_hours end |
#timezone ⇒ String
Returns IANA time zone name the quiet windows are evaluated in, for example Europe/Amsterdam.
14 15 16 |
# File 'lib/getstream_ruby/generated/models/push_schedule_response.rb', line 14 def timezone @timezone end |
Class Method Details
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization
27 28 29 30 31 32 |
# File 'lib/getstream_ruby/generated/models/push_schedule_response.rb', line 27 def self.json_field_mappings { timezone: 'timezone', quiet_hours: 'quiet_hours' } end |