Class: GetStream::Generated::Models::BanInfoResponse

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/getstream_ruby/generated/models/ban_info_response.rb

Overview

Ban information

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

#channelChannelMetadata

Returns:



29
30
31
# File 'lib/getstream_ruby/generated/models/ban_info_response.rb', line 29

def channel
  @channel
end

#channel_cidString

Returns The channel this ban applies to. Empty if this is an app-wide (global) ban rather than a per-channel ban.

Returns:

  • (String)

    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_atDateTime

Returns When the ban was created.

Returns:

  • (DateTime)

    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_byUserResponse

Returns User response object.

Returns:



32
33
34
# File 'lib/getstream_ruby/generated/models/ban_info_response.rb', line 32

def created_by
  @created_by
end

#expiresDateTime

Returns When the ban expires.

Returns:

  • (DateTime)

    When the ban expires



20
21
22
# File 'lib/getstream_ruby/generated/models/ban_info_response.rb', line 20

def expires
  @expires
end

#reasonString

Returns Reason for the ban.

Returns:

  • (String)

    Reason for the ban



23
24
25
# File 'lib/getstream_ruby/generated/models/ban_info_response.rb', line 23

def reason
  @reason
end

#shadowBoolean

Returns Whether this is a shadow ban.

Returns:

  • (Boolean)

    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

#userUserResponse

Returns User response object.

Returns:



35
36
37
# File 'lib/getstream_ruby/generated/models/ban_info_response.rb', line 35

def user
  @user
end

Class Method Details

.json_field_mappingsObject

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