Class: GetStream::Generated::Models::BanActionRequestPayload
- Defined in:
- lib/getstream_ruby/generated/models/ban_action_request_payload.rb
Overview
Configuration for ban moderation action
Instance Attribute Summary collapse
-
#channel_ban_only ⇒ Boolean
Ban only from specific channel.
- #channel_cid ⇒ String
-
#delete_messages ⇒ String
Message deletion mode: soft, pruning, or hard.
-
#ip_ban ⇒ Boolean
Whether to ban by IP address.
-
#reason ⇒ String
Reason for the ban.
-
#shadow ⇒ Boolean
Whether this is a shadow ban.
-
#target_user_id ⇒ String
Optional: ban user directly without review item.
-
#timeout ⇒ Integer
Duration of ban in minutes.
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ BanActionRequestPayload
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ BanActionRequestPayload
Initialize with attributes
38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/getstream_ruby/generated/models/ban_action_request_payload.rb', line 38 def initialize(attributes = {}) super(attributes) @channel_ban_only = attributes[:channel_ban_only] || attributes['channel_ban_only'] || nil @channel_cid = attributes[:channel_cid] || attributes['channel_cid'] || nil @delete_messages = attributes[:delete_messages] || attributes['delete_messages'] || nil @ip_ban = attributes[:ip_ban] || attributes['ip_ban'] || nil @reason = attributes[:reason] || attributes['reason'] || nil @shadow = attributes[:shadow] || attributes['shadow'] || nil @target_user_id = attributes[:target_user_id] || attributes['target_user_id'] || nil @timeout = attributes[:timeout] || attributes['timeout'] || nil end |
Instance Attribute Details
#channel_ban_only ⇒ Boolean
Returns Ban only from specific channel.
14 15 16 |
# File 'lib/getstream_ruby/generated/models/ban_action_request_payload.rb', line 14 def channel_ban_only @channel_ban_only end |
#channel_cid ⇒ String
17 18 19 |
# File 'lib/getstream_ruby/generated/models/ban_action_request_payload.rb', line 17 def channel_cid @channel_cid end |
#delete_messages ⇒ String
Returns Message deletion mode: soft, pruning, or hard.
20 21 22 |
# File 'lib/getstream_ruby/generated/models/ban_action_request_payload.rb', line 20 def @delete_messages end |
#ip_ban ⇒ Boolean
Returns Whether to ban by IP address.
23 24 25 |
# File 'lib/getstream_ruby/generated/models/ban_action_request_payload.rb', line 23 def ip_ban @ip_ban end |
#reason ⇒ String
Returns Reason for the ban.
26 27 28 |
# File 'lib/getstream_ruby/generated/models/ban_action_request_payload.rb', line 26 def reason @reason end |
#shadow ⇒ Boolean
Returns Whether this is a shadow ban.
29 30 31 |
# File 'lib/getstream_ruby/generated/models/ban_action_request_payload.rb', line 29 def shadow @shadow end |
#target_user_id ⇒ String
Returns Optional: ban user directly without review item.
32 33 34 |
# File 'lib/getstream_ruby/generated/models/ban_action_request_payload.rb', line 32 def target_user_id @target_user_id end |
#timeout ⇒ Integer
Returns Duration of ban in minutes.
35 36 37 |
# File 'lib/getstream_ruby/generated/models/ban_action_request_payload.rb', line 35 def timeout @timeout end |
Class Method Details
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization
51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/getstream_ruby/generated/models/ban_action_request_payload.rb', line 51 def self.json_field_mappings { channel_ban_only: 'channel_ban_only', channel_cid: 'channel_cid', delete_messages: 'delete_messages', ip_ban: 'ip_ban', reason: 'reason', shadow: 'shadow', target_user_id: 'target_user_id', timeout: 'timeout' } end |