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



38
39
40
41
42
43
44
45
46
47
48
# File 'lib/getstream_ruby/generated/models/insert_action_log_request.rb', line 38

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
  @reporter_type = attributes[:reporter_type] || attributes['reporter_type'] || nil
  @reporter_user_id = attributes[:reporter_user_id] || attributes['reporter_user_id'] || 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



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

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

#reporter_typeString

Returns Type of reporter; ‘api_integration’ when the action was triggered by an API integration call with no authenticated user.

Returns:

  • (String)

    Type of reporter; ‘api_integration’ when the action was triggered by an API integration call with no authenticated user



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

def reporter_type
  @reporter_type
end

#reporter_user_idString

Returns ID of the user who triggered the action; empty for automated actions.

Returns:

  • (String)

    ID of the user who triggered the action; empty for automated actions



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

def reporter_user_id
  @reporter_user_id
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/insert_action_log_request.rb', line 51

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',
    reporter_type: 'reporter_type',
    reporter_user_id: 'reporter_user_id',
    custom: 'custom'
  }
end