Class: GetStream::Generated::Models::DeleteUserMessagesRequestPayload
- Inherits:
-
BaseModel
- Object
- BaseModel
- GetStream::Generated::Models::DeleteUserMessagesRequestPayload
- 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
-
#channel_cid ⇒ String
Optional: scope deletion to a single channel (alternative to app-wide deletion).
-
#delete_messages ⇒ DeleteMessages
Message deletion mode: soft, pruning, or hard.
-
#delete_reactions ⇒ Boolean
Whether to also delete the user's reactions on other users' messages.
-
#entity_id ⇒ String
ID of the user whose messages should be deleted (alternative to item_id).
-
#entity_type ⇒ String
Type of the entity.
-
#reason ⇒ String
Reason for the deletion.
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ DeleteUserMessagesRequestPayload
constructor
Initialize with attributes.
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.fetch(:delete_messages) { attributes.fetch('delete_messages', nil) } @channel_cid = attributes.fetch(:channel_cid) { attributes.fetch('channel_cid', nil) } @delete_reactions = attributes.fetch(:delete_reactions) { attributes.fetch('delete_reactions', nil) } @entity_id = attributes.fetch(:entity_id) { attributes.fetch('entity_id', nil) } @entity_type = attributes.fetch(:entity_type) { attributes.fetch('entity_type', nil) } @reason = attributes.fetch(:reason) { attributes.fetch('reason', nil) } end |
Instance Attribute Details
#channel_cid ⇒ String
Returns 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_messages ⇒ DeleteMessages
Returns 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 end |
#delete_reactions ⇒ Boolean
Returns 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_id ⇒ String
Returns 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_type ⇒ String
Returns 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 |
#reason ⇒ String
Returns 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_mappings ⇒ Object
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 |