Class: GetStream::Generated::Models::BanRequest
- Defined in:
- lib/getstream_ruby/generated/models/ban_request.rb
Instance Attribute Summary collapse
- #banned_by ⇒ UserRequest
-
#banned_by_id ⇒ String
ID of the user performing the ban.
-
#channel_cid ⇒ String
Channel where the ban applies.
- #delete_messages ⇒ String
-
#ip_ban ⇒ Boolean
Whether to ban the user’s IP address.
-
#reason ⇒ String
Optional explanation for the ban.
-
#shadow ⇒ Boolean
Whether this is a shadow ban.
-
#target_user_id ⇒ String
ID of the user to ban.
-
#timeout ⇒ Integer
Duration of the ban in minutes.
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ BanRequest
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ BanRequest
Initialize with attributes
41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/getstream_ruby/generated/models/ban_request.rb', line 41 def initialize(attributes = {}) super(attributes) @target_user_id = attributes[:target_user_id] || attributes['target_user_id'] @banned_by_id = attributes[:banned_by_id] || attributes['banned_by_id'] || 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 @timeout = attributes[:timeout] || attributes['timeout'] || nil @banned_by = attributes[:banned_by] || attributes['banned_by'] || nil end |
Instance Attribute Details
#banned_by ⇒ UserRequest
38 39 40 |
# File 'lib/getstream_ruby/generated/models/ban_request.rb', line 38 def banned_by @banned_by end |
#banned_by_id ⇒ String
Returns ID of the user performing the ban.
17 18 19 |
# File 'lib/getstream_ruby/generated/models/ban_request.rb', line 17 def banned_by_id @banned_by_id end |
#channel_cid ⇒ String
Returns Channel where the ban applies.
20 21 22 |
# File 'lib/getstream_ruby/generated/models/ban_request.rb', line 20 def channel_cid @channel_cid end |
#delete_messages ⇒ String
23 24 25 |
# File 'lib/getstream_ruby/generated/models/ban_request.rb', line 23 def @delete_messages end |
#ip_ban ⇒ Boolean
Returns Whether to ban the user’s IP address.
26 27 28 |
# File 'lib/getstream_ruby/generated/models/ban_request.rb', line 26 def ip_ban @ip_ban end |
#reason ⇒ String
Returns Optional explanation for the ban.
29 30 31 |
# File 'lib/getstream_ruby/generated/models/ban_request.rb', line 29 def reason @reason end |
#shadow ⇒ Boolean
Returns Whether this is a shadow ban.
32 33 34 |
# File 'lib/getstream_ruby/generated/models/ban_request.rb', line 32 def shadow @shadow end |
#target_user_id ⇒ String
Returns ID of the user to ban.
14 15 16 |
# File 'lib/getstream_ruby/generated/models/ban_request.rb', line 14 def target_user_id @target_user_id end |
#timeout ⇒ Integer
Returns Duration of the ban in minutes.
35 36 37 |
# File 'lib/getstream_ruby/generated/models/ban_request.rb', line 35 def timeout @timeout end |
Class Method Details
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization
55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/getstream_ruby/generated/models/ban_request.rb', line 55 def self.json_field_mappings { target_user_id: 'target_user_id', banned_by_id: 'banned_by_id', channel_cid: 'channel_cid', delete_messages: 'delete_messages', ip_ban: 'ip_ban', reason: 'reason', shadow: 'shadow', timeout: 'timeout', banned_by: 'banned_by' } end |