Class: GetStream::Generated::Models::BanInfoResponse
- Defined in:
- lib/getstream_ruby/generated/models/ban_info_response.rb
Overview
Ban information
Instance Attribute Summary collapse
- #channel ⇒ ChannelMetadata
-
#channel_cid ⇒ String
The channel this ban applies to.
-
#created_at ⇒ DateTime
When the ban was created.
-
#created_by ⇒ UserResponse
User response object.
-
#expires ⇒ DateTime
When the ban expires.
-
#reason ⇒ String
Reason for the ban.
-
#shadow ⇒ Boolean
Whether this is a shadow ban.
-
#user ⇒ UserResponse
User response object.
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ BanInfoResponse
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ BanInfoResponse
Initialize with attributes
38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/getstream_ruby/generated/models/ban_info_response.rb', line 38 def initialize(attributes = {}) super(attributes) @created_at = attributes[:created_at] || attributes['created_at'] @channel_cid = attributes[:channel_cid] || attributes['channel_cid'] || nil @expires = attributes[:expires] || attributes['expires'] || nil @reason = attributes[:reason] || attributes['reason'] || nil @shadow = attributes[:shadow] || attributes['shadow'] || nil @channel = attributes[:channel] || attributes['channel'] || nil @created_by = attributes[:created_by] || attributes['created_by'] || nil @user = attributes[:user] || attributes['user'] || nil end |
Instance Attribute Details
#channel ⇒ ChannelMetadata
29 30 31 |
# File 'lib/getstream_ruby/generated/models/ban_info_response.rb', line 29 def channel @channel end |
#channel_cid ⇒ String
Returns The channel this ban applies to. Empty if this is an app-wide (global) ban rather than a per-channel ban.
17 18 19 |
# File 'lib/getstream_ruby/generated/models/ban_info_response.rb', line 17 def channel_cid @channel_cid end |
#created_at ⇒ DateTime
Returns When the ban was created.
14 15 16 |
# File 'lib/getstream_ruby/generated/models/ban_info_response.rb', line 14 def created_at @created_at end |
#created_by ⇒ UserResponse
Returns User response object.
32 33 34 |
# File 'lib/getstream_ruby/generated/models/ban_info_response.rb', line 32 def created_by @created_by end |
#expires ⇒ DateTime
Returns When the ban expires.
20 21 22 |
# File 'lib/getstream_ruby/generated/models/ban_info_response.rb', line 20 def expires @expires end |
#reason ⇒ String
Returns Reason for the ban.
23 24 25 |
# File 'lib/getstream_ruby/generated/models/ban_info_response.rb', line 23 def reason @reason end |
#shadow ⇒ Boolean
Returns Whether this is a shadow ban.
26 27 28 |
# File 'lib/getstream_ruby/generated/models/ban_info_response.rb', line 26 def shadow @shadow end |
#user ⇒ UserResponse
Returns User response object.
35 36 37 |
# File 'lib/getstream_ruby/generated/models/ban_info_response.rb', line 35 def user @user 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_info_response.rb', line 51 def self.json_field_mappings { created_at: 'created_at', channel_cid: 'channel_cid', expires: 'expires', reason: 'reason', shadow: 'shadow', channel: 'channel', created_by: 'created_by', user: 'user' } end |