Class: GetStream::Generated::Models::UnpinRequest

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

Overview

UnpinRequest is the payload for unpinning a message.

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

Initialize with attributes



20
21
22
23
24
# File 'lib/getstream_ruby/generated/models/unpin_request.rb', line 20

def initialize(attributes = {})
  super(attributes)
  @session_id = attributes[:session_id] || attributes['session_id']
  @user_id = attributes[:user_id] || attributes['user_id']
end

Instance Attribute Details

#session_idString

Returns the session ID of the user who pinned the message.

Returns:

  • (String)

    the session ID of the user who pinned the message



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

def session_id
  @session_id
end

#user_idString

Returns the user ID of the user who pinned the message.

Returns:

  • (String)

    the user ID of the user who pinned the message



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

def user_id
  @user_id
end

Class Method Details

.json_field_mappingsObject

Override field mappings for JSON serialization



27
28
29
30
31
32
# File 'lib/getstream_ruby/generated/models/unpin_request.rb', line 27

def self.json_field_mappings
  {
    session_id: 'session_id',
    user_id: 'user_id'
  }
end