Class: GetStream::Generated::Models::CallRejectedEvent
- Defined in:
- lib/getstream_ruby/generated/models/call_rejected_event.rb
Overview
This event is sent when a user rejects a notification to join a call.
Instance Attribute Summary collapse
- #call ⇒ CallResponse
- #call_cid ⇒ String
- #created_at ⇒ DateTime
-
#reason ⇒ String
Provides information about why the call was rejected.
-
#type ⇒ String
The type of event: “call.rejected” in this case.
- #user ⇒ UserResponse
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ CallRejectedEvent
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ CallRejectedEvent
Initialize with attributes
32 33 34 35 36 37 38 39 40 |
# File 'lib/getstream_ruby/generated/models/call_rejected_event.rb', line 32 def initialize(attributes = {}) super(attributes) @call_cid = attributes[:call_cid] || attributes['call_cid'] @created_at = attributes[:created_at] || attributes['created_at'] @call = attributes[:call] || attributes['call'] @user = attributes[:user] || attributes['user'] @type = attributes[:type] || attributes['type'] || "call.rejected" @reason = attributes[:reason] || attributes['reason'] || nil end |
Instance Attribute Details
#call ⇒ CallResponse
20 21 22 |
# File 'lib/getstream_ruby/generated/models/call_rejected_event.rb', line 20 def call @call end |
#call_cid ⇒ String
14 15 16 |
# File 'lib/getstream_ruby/generated/models/call_rejected_event.rb', line 14 def call_cid @call_cid end |
#created_at ⇒ DateTime
17 18 19 |
# File 'lib/getstream_ruby/generated/models/call_rejected_event.rb', line 17 def created_at @created_at end |
#reason ⇒ String
Returns Provides information about why the call was rejected. You can provide any value, but the Stream API and SDKs use these default values: rejected, cancel, timeout and busy.
29 30 31 |
# File 'lib/getstream_ruby/generated/models/call_rejected_event.rb', line 29 def reason @reason end |
#type ⇒ String
Returns The type of event: “call.rejected” in this case.
26 27 28 |
# File 'lib/getstream_ruby/generated/models/call_rejected_event.rb', line 26 def type @type end |
#user ⇒ UserResponse
23 24 25 |
# File 'lib/getstream_ruby/generated/models/call_rejected_event.rb', line 23 def user @user end |
Class Method Details
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization
43 44 45 46 47 48 49 50 51 52 |
# File 'lib/getstream_ruby/generated/models/call_rejected_event.rb', line 43 def self.json_field_mappings { call_cid: 'call_cid', created_at: 'created_at', call: 'call', user: 'user', type: 'type', reason: 'reason' } end |