Class: GetStream::Generated::Models::BanInfoResponse
- Defined in:
- lib/getstream_ruby/generated/models/ban_info_response.rb
Overview
Ban information
Instance Attribute Summary collapse
-
#created_at ⇒ DateTime
When the ban was created.
- #created_by ⇒ UserResponse
-
#expires ⇒ DateTime
When the ban expires.
-
#reason ⇒ String
Reason for the ban.
-
#shadow ⇒ Boolean
Whether this is a shadow ban.
- #user ⇒ UserResponse
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
32 33 34 35 36 37 38 39 40 |
# File 'lib/getstream_ruby/generated/models/ban_info_response.rb', line 32 def initialize(attributes = {}) super(attributes) @created_at = attributes[:created_at] || attributes['created_at'] @expires = attributes[:expires] || attributes['expires'] || nil @reason = attributes[:reason] || attributes['reason'] || nil @shadow = attributes[:shadow] || attributes['shadow'] || nil @created_by = attributes[:created_by] || attributes['created_by'] || nil @user = attributes[:user] || attributes['user'] || nil end |
Instance Attribute Details
#created_at ⇒ DateTime
14 15 16 |
# File 'lib/getstream_ruby/generated/models/ban_info_response.rb', line 14 def created_at @created_at end |
#created_by ⇒ UserResponse
26 27 28 |
# File 'lib/getstream_ruby/generated/models/ban_info_response.rb', line 26 def created_by @created_by end |
#expires ⇒ DateTime
17 18 19 |
# File 'lib/getstream_ruby/generated/models/ban_info_response.rb', line 17 def expires @expires end |
#reason ⇒ String
20 21 22 |
# File 'lib/getstream_ruby/generated/models/ban_info_response.rb', line 20 def reason @reason end |
#shadow ⇒ Boolean
23 24 25 |
# File 'lib/getstream_ruby/generated/models/ban_info_response.rb', line 23 def shadow @shadow end |
#user ⇒ UserResponse
29 30 31 |
# File 'lib/getstream_ruby/generated/models/ban_info_response.rb', line 29 def user @user 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/ban_info_response.rb', line 43 def self.json_field_mappings { created_at: 'created_at', expires: 'expires', reason: 'reason', shadow: 'shadow', created_by: 'created_by', user: 'user' } end |