Class: GetStream::Generated::Models::TriggeredRuleResponse
- Defined in:
- lib/getstream_ruby/generated/models/triggered_rule_response.rb
Instance Attribute Summary collapse
-
#actions ⇒ Array<String>
Action types resolved from the rule's action sequence.
- #call_options ⇒ CallActionOptions
-
#rule_id ⇒ String
ID of the moderation rule that triggered.
-
#rule_name ⇒ String
Name of the moderation rule that triggered.
-
#type ⇒ String
Type of the moderation rule that triggered (content, user, or call).
-
#violation_number ⇒ Integer
Violation count for action sequence rules (1-based).
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ TriggeredRuleResponse
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ TriggeredRuleResponse
Initialize with attributes
32 33 34 35 36 37 38 39 40 |
# File 'lib/getstream_ruby/generated/models/triggered_rule_response.rb', line 32 def initialize(attributes = {}) super(attributes) @rule_id = attributes[:rule_id] || attributes['rule_id'] @actions = attributes[:actions] || attributes['actions'] @rule_name = attributes[:rule_name] || attributes['rule_name'] || nil @type = attributes[:type] || attributes['type'] || nil @violation_number = attributes[:violation_number] || attributes['violation_number'] || nil @call_options = attributes[:call_options] || attributes['call_options'] || nil end |
Instance Attribute Details
#actions ⇒ Array<String>
Returns Action types resolved from the rule's action sequence.
17 18 19 |
# File 'lib/getstream_ruby/generated/models/triggered_rule_response.rb', line 17 def actions @actions end |
#call_options ⇒ CallActionOptions
29 30 31 |
# File 'lib/getstream_ruby/generated/models/triggered_rule_response.rb', line 29 def @call_options end |
#rule_id ⇒ String
Returns ID of the moderation rule that triggered.
14 15 16 |
# File 'lib/getstream_ruby/generated/models/triggered_rule_response.rb', line 14 def rule_id @rule_id end |
#rule_name ⇒ String
Returns Name of the moderation rule that triggered.
20 21 22 |
# File 'lib/getstream_ruby/generated/models/triggered_rule_response.rb', line 20 def rule_name @rule_name end |
#type ⇒ String
Returns Type of the moderation rule that triggered (content, user, or call).
23 24 25 |
# File 'lib/getstream_ruby/generated/models/triggered_rule_response.rb', line 23 def type @type end |
#violation_number ⇒ Integer
Returns Violation count for action sequence rules (1-based).
26 27 28 |
# File 'lib/getstream_ruby/generated/models/triggered_rule_response.rb', line 26 def violation_number @violation_number 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/triggered_rule_response.rb', line 43 def self.json_field_mappings { rule_id: 'rule_id', actions: 'actions', rule_name: 'rule_name', type: 'type', violation_number: 'violation_number', call_options: 'call_options' } end |