Class: GetStream::Generated::Models::RestoreActionRequestPayload

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

Overview

Configuration for restore action. State-aware: reverses whichever of a delete, a block, or a shadow block currently applies to the content (including both a delete and a block/shadow block at once).

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

Initialize with attributes



20
21
22
23
24
# File 'lib/getstream_ruby/generated/models/restore_action_request_payload.rb', line 20

def initialize(attributes = {})
  super(attributes)
  @decision_reason = attributes.fetch(:decision_reason) { attributes.fetch('decision_reason', nil) }
  @reason = attributes.fetch(:reason) { attributes.fetch('reason', nil) }
end

Instance Attribute Details

#decision_reason ⇒ String

Returns Reason for the appeal decision.

Returns:

  • (String) —

    Reason for the appeal decision



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

def decision_reason
  @decision_reason
end

#reason ⇒ String

Returns Internal moderator note, stored on the action log and returned by QueryModerationLogs. Not shown to the appealing user; use decision_reason for that.

Returns:

  • (String) —

    Internal moderator note, stored on the action log and returned by QueryModerationLogs. Not shown to the appealing user; use decision_reason for that



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

def reason
  @reason
end

Class Method Details

.json_field_mappings ⇒ Object

Override field mappings for JSON serialization



27
28
29
30
31
32
# File 'lib/getstream_ruby/generated/models/restore_action_request_payload.rb', line 27

def self.json_field_mappings
  {
    decision_reason: 'decision_reason',
    reason: 'reason'
  }
end