Class: GetStream::Generated::Models::DeleteCommentRequestPayload

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

Overview

Configuration for comment deletion action

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

Initialize with attributes



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

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

Instance Attribute Details

#entity_idString

Returns ID of the comment to delete (alternative to item_id).

Returns:

  • (String)

    ID of the comment to delete (alternative to item_id)



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

def entity_id
  @entity_id
end

#entity_typeString

Returns Type of the entity.

Returns:

  • (String)

    Type of the entity



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

def entity_type
  @entity_type
end

#hard_deleteBoolean

Returns Whether to permanently delete the comment.

Returns:

  • (Boolean)

    Whether to permanently delete the comment



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

def hard_delete
  @hard_delete
end

#reasonString

Returns Reason for deletion.

Returns:

  • (String)

    Reason for deletion



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

def reason
  @reason
end

Class Method Details

.json_field_mappingsObject

Override field mappings for JSON serialization



35
36
37
38
39
40
41
42
# File 'lib/getstream_ruby/generated/models/delete_comment_request_payload.rb', line 35

def self.json_field_mappings
  {
    entity_id: 'entity_id',
    entity_type: 'entity_type',
    hard_delete: 'hard_delete',
    reason: 'reason'
  }
end