Class: GetStream::Generated::Models::ChannelMemberPartialResponse

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

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 = {}) ⇒ ChannelMemberPartialResponse

Initialize with attributes



23
24
25
26
27
28
# File 'lib/getstream_ruby/generated/models/channel_member_partial_response.rb', line 23

def initialize(attributes = {})
  super(attributes)
  @channel_role = attributes.fetch(:channel_role) { attributes.fetch('channel_role', nil) }
  @notifications_muted = attributes.fetch(:notifications_muted) { attributes.fetch('notifications_muted', nil) }
  @custom = attributes.fetch(:custom) { attributes.fetch('custom', nil) }
end

Instance Attribute Details

#channel_role ⇒ String

Returns Role of the member in the channel.

Returns:

  • (String) —

    Role of the member in the channel



14
15
16
# File 'lib/getstream_ruby/generated/models/channel_member_partial_response.rb', line 14

def channel_role
  @channel_role
end

#custom ⇒ Object

Returns Channel-member custom fields projected via member_custom_include.

Returns:

  • (Object) —

    Channel-member custom fields projected via member_custom_include



20
21
22
# File 'lib/getstream_ruby/generated/models/channel_member_partial_response.rb', line 20

def custom
  @custom
end

#notifications_muted ⇒ Boolean

Returns Whether the user muted notifications for this channel.

Returns:

  • (Boolean) —

    Whether the user muted notifications for this channel



17
18
19
# File 'lib/getstream_ruby/generated/models/channel_member_partial_response.rb', line 17

def notifications_muted
  @notifications_muted
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/channel_member_partial_response.rb', line 31

def self.json_field_mappings
  {
    channel_role: 'channel_role',
    notifications_muted: 'notifications_muted',
    custom: 'custom'
  }
end