Class: GetStream::Generated::Models::AddCommentReactionResponse
- Inherits:
-
BaseModel
- Object
- BaseModel
- GetStream::Generated::Models::AddCommentReactionResponse
- Defined in:
- lib/getstream_ruby/generated/models/add_comment_reaction_response.rb
Instance Attribute Summary collapse
- #comment ⇒ CommentResponse
-
#counter_delta ⇒ Integer
The change this write made to the number of reactions the user holds on this target: 1 when outcome is 'created', 0 when it is 'replaced' or 'unchanged'.
-
#duration ⇒ String
Duration of the request.
-
#notification_accepted ⇒ Boolean
Whether notification creation was accepted for asynchronous processing.
-
#notification_created ⇒ Object
deprecated
Deprecated.
This field is deprecated. @return [Boolean] Deprecated. Mirrors notification_accepted; use notification_accepted for async enqueue status Deprecated: use notification_accepted
-
#notification_task_id ⇒ String
ID of the async notification-creation task; poll GET /tasks/id for its status.
-
#outcome ⇒ String
What this write did to the user's reaction on this target.
-
#previous_reaction_type ⇒ String
The reaction type this write replaced, or null when nothing was replaced.
- #reaction ⇒ FeedsReactionResponse
- #reference_activity ⇒ ActivityResponse
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ AddCommentReactionResponse
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ AddCommentReactionResponse
Initialize with attributes
45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/getstream_ruby/generated/models/add_comment_reaction_response.rb', line 45 def initialize(attributes = {}) super(attributes) @counter_delta = attributes.fetch(:counter_delta) { attributes.fetch('counter_delta', nil) } @duration = attributes.fetch(:duration) { attributes.fetch('duration', nil) } @outcome = attributes.fetch(:outcome) { attributes.fetch('outcome', nil) } @comment = attributes.fetch(:comment) { attributes.fetch('comment', nil) } @reaction = attributes.fetch(:reaction) { attributes.fetch('reaction', nil) } @notification_accepted = attributes.fetch(:notification_accepted) { attributes.fetch('notification_accepted', nil) } @notification_created = attributes.fetch(:notification_created) { attributes.fetch('notification_created', nil) } @notification_task_id = attributes.fetch(:notification_task_id) { attributes.fetch('notification_task_id', nil) } @previous_reaction_type = attributes.fetch(:previous_reaction_type) { attributes.fetch('previous_reaction_type', nil) } @reference_activity = attributes.fetch(:reference_activity) { attributes.fetch('reference_activity', nil) } end |
Instance Attribute Details
#comment ⇒ CommentResponse
23 24 25 |
# File 'lib/getstream_ruby/generated/models/add_comment_reaction_response.rb', line 23 def comment @comment end |
#counter_delta ⇒ Integer
Returns The change this write made to the number of reactions the user holds on this target: 1 when outcome is 'created', 0 when it is 'replaced' or 'unchanged'. These endpoints never return -1; a successful delete-reaction call is what decrements the count. With enforce_unique this is the delta of the user's reaction on the target; without it, the delta of reactions of this type.
14 15 16 |
# File 'lib/getstream_ruby/generated/models/add_comment_reaction_response.rb', line 14 def counter_delta @counter_delta end |
#duration ⇒ String
Returns Duration of the request.
17 18 19 |
# File 'lib/getstream_ruby/generated/models/add_comment_reaction_response.rb', line 17 def duration @duration end |
#notification_accepted ⇒ Boolean
Returns Whether notification creation was accepted for asynchronous processing.
29 30 31 |
# File 'lib/getstream_ruby/generated/models/add_comment_reaction_response.rb', line 29 def notification_accepted @notification_accepted end |
#notification_created ⇒ Object
This field is deprecated. @return [Boolean] Deprecated. Mirrors notification_accepted; use notification_accepted for async enqueue status Deprecated: use notification_accepted
33 34 35 |
# File 'lib/getstream_ruby/generated/models/add_comment_reaction_response.rb', line 33 def notification_created @notification_created end |
#notification_task_id ⇒ String
Returns ID of the async notification-creation task; poll GET /tasks/id for its status.
36 37 38 |
# File 'lib/getstream_ruby/generated/models/add_comment_reaction_response.rb', line 36 def notification_task_id @notification_task_id end |
#outcome ⇒ String
Returns What this write did to the user's reaction on this target. One of: created, replaced, unchanged. 'created' means a new reaction was written and nothing was replaced; 'replaced' means enforce_unique removed one or more of the user's other reaction types; 'unchanged' means the user already held this reaction type (its custom data may still have been updated). Without enforce_unique a user can hold several reaction types on one target, so 'created' then means 'this reaction type was newly added', not 'the user's first reaction on this target'.
20 21 22 |
# File 'lib/getstream_ruby/generated/models/add_comment_reaction_response.rb', line 20 def outcome @outcome end |
#previous_reaction_type ⇒ String
Returns The reaction type this write replaced, or null when nothing was replaced. Non-null exactly when outcome is 'replaced'. If enforce_unique removed several reactions — possible only for data created before enforce_unique was adopted — this is the most recently created one.
39 40 41 |
# File 'lib/getstream_ruby/generated/models/add_comment_reaction_response.rb', line 39 def previous_reaction_type @previous_reaction_type end |
#reaction ⇒ FeedsReactionResponse
26 27 28 |
# File 'lib/getstream_ruby/generated/models/add_comment_reaction_response.rb', line 26 def reaction @reaction end |
#reference_activity ⇒ ActivityResponse
42 43 44 |
# File 'lib/getstream_ruby/generated/models/add_comment_reaction_response.rb', line 42 def reference_activity @reference_activity end |
Class Method Details
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization
60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/getstream_ruby/generated/models/add_comment_reaction_response.rb', line 60 def self.json_field_mappings { counter_delta: 'counter_delta', duration: 'duration', outcome: 'outcome', comment: 'comment', reaction: 'reaction', notification_accepted: 'notification_accepted', notification_created: 'notification_created', notification_task_id: 'notification_task_id', previous_reaction_type: 'previous_reaction_type', reference_activity: 'reference_activity' } end |