Class: GetStream::Generated::Models::DeleteUserMessagesRequestPayload

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

Overview

Configuration for deleting all of a user's chat messages without banning them or deleting their account

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

Initialize with attributes



32
33
34
35
36
37
38
39
40
# File 'lib/getstream_ruby/generated/models/delete_user_messages_request_payload.rb', line 32

def initialize(attributes = {})
  super(attributes)
  @delete_messages = attributes[:delete_messages] || attributes['delete_messages']
  @channel_cid = attributes[:channel_cid] || attributes['channel_cid'] || nil
  @delete_reactions = attributes[:delete_reactions] || attributes['delete_reactions'] || nil
  @entity_id = attributes[:entity_id] || attributes['entity_id'] || nil
  @entity_type = attributes[:entity_type] || attributes['entity_type'] || nil
  @reason = attributes[:reason] || attributes['reason'] || nil
end

Instance Attribute Details

#channel_cidString

Returns Optional: scope deletion to a single channel (alternative to app-wide deletion).

Returns:

  • (String)

    Optional: scope deletion to a single channel (alternative to app-wide deletion)



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

def channel_cid
  @channel_cid
end

#delete_messagesString

Returns Message deletion mode: soft, pruning, or hard.

Returns:

  • (String)

    Message deletion mode: soft, pruning, or hard



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

def delete_messages
  @delete_messages
end

#delete_reactionsBoolean

Returns Whether to also delete the user's reactions on other users' messages.

Returns:

  • (Boolean)

    Whether to also delete the user's reactions on other users' messages



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

def delete_reactions
  @delete_reactions
end

#entity_idString

Returns ID of the user whose messages should be deleted (alternative to item_id).

Returns:

  • (String)

    ID of the user whose messages should be deleted (alternative to item_id)



23
24
25
# File 'lib/getstream_ruby/generated/models/delete_user_messages_request_payload.rb', line 23

def entity_id
  @entity_id
end

#entity_typeString

Returns Type of the entity.

Returns:

  • (String)

    Type of the entity



26
27
28
# File 'lib/getstream_ruby/generated/models/delete_user_messages_request_payload.rb', line 26

def entity_type
  @entity_type
end

#reasonString

Returns Reason for the deletion.

Returns:

  • (String)

    Reason for the deletion



29
30
31
# File 'lib/getstream_ruby/generated/models/delete_user_messages_request_payload.rb', line 29

def reason
  @reason
end

Class Method Details

.json_field_mappingsObject

Override field mappings for JSON serialization



43
44
45
46
47
48
49
50
51
52
# File 'lib/getstream_ruby/generated/models/delete_user_messages_request_payload.rb', line 43

def self.json_field_mappings
  {
    delete_messages: 'delete_messages',
    channel_cid: 'channel_cid',
    delete_reactions: 'delete_reactions',
    entity_id: 'entity_id',
    entity_type: 'entity_type',
    reason: 'reason'
  }
end