Class: GetStream::Generated::Models::InsertActionLogRequest

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

Overview

Request to insert a moderation action log entry

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 = {}) ⇒ InsertActionLogRequest

Initialize with attributes



32
33
34
35
36
37
38
39
40
# File 'lib/getstream_ruby/generated/models/insert_action_log_request.rb', line 32

def initialize(attributes = {})
  super(attributes)
  @action_type = attributes[:action_type] || attributes['action_type']
  @entity_creator_id = attributes[:entity_creator_id] || attributes['entity_creator_id']
  @entity_id = attributes[:entity_id] || attributes['entity_id']
  @entity_type = attributes[:entity_type] || attributes['entity_type']
  @reason = attributes[:reason] || attributes['reason'] || nil
  @custom = attributes[:custom] || attributes['custom'] || nil
end

Instance Attribute Details

#action_typeString

Returns Type of moderation action taken.

Returns:

  • (String)

    Type of moderation action taken



14
15
16
# File 'lib/getstream_ruby/generated/models/insert_action_log_request.rb', line 14

def action_type
  @action_type
end

#customObject

Returns Custom metadata for the action log.

Returns:

  • (Object)

    Custom metadata for the action log



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

def custom
  @custom
end

#entity_creator_idString

Returns ID of the user who created the entity.

Returns:

  • (String)

    ID of the user who created the entity



17
18
19
# File 'lib/getstream_ruby/generated/models/insert_action_log_request.rb', line 17

def entity_creator_id
  @entity_creator_id
end

#entity_idString

Returns ID of the entity the action was taken on.

Returns:

  • (String)

    ID of the entity the action was taken on



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

def entity_id
  @entity_id
end

#entity_typeString

Returns Type of entity the action was taken on.

Returns:

  • (String)

    Type of entity the action was taken on



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

def entity_type
  @entity_type
end

#reasonString

Returns Reason for the action.

Returns:

  • (String)

    Reason for the action



26
27
28
# File 'lib/getstream_ruby/generated/models/insert_action_log_request.rb', line 26

def reason
  @reason
end

Class Method Details

.json_field_mappingsObject

Override field mappings for JSON serialization



43
44
45
46
47
48
49
50
51
52
# File 'lib/getstream_ruby/generated/models/insert_action_log_request.rb', line 43

def self.json_field_mappings
  {
    action_type: 'action_type',
    entity_creator_id: 'entity_creator_id',
    entity_id: 'entity_id',
    entity_type: 'entity_type',
    reason: 'reason',
    custom: 'custom'
  }
end