Class: WaCloudApi::Message::Reaction

Inherits:
Base
  • Object
show all
Defined in:
lib/wa_cloud_api/message/reaction.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#messaging_product, #recipient_type, #to, #type

Instance Method Summary collapse

Methods inherited from Base

#deliver

Constructor Details

#initialize(to:, message_id:, emoji:) ⇒ Reaction

Returns a new instance of Reaction.



10
11
12
13
14
# File 'lib/wa_cloud_api/message/reaction.rb', line 10

def initialize(to:, message_id:, emoji:)
  @message_id = message_id
  @emoji = JSON.parse("\"#{emoji}\"").encode('utf-8')
  super(to: to, type: 'reaction')
end

Instance Attribute Details

#emojiObject

Returns the value of attribute emoji.



8
9
10
# File 'lib/wa_cloud_api/message/reaction.rb', line 8

def emoji
  @emoji
end

#message_idObject

Returns the value of attribute message_id.



8
9
10
# File 'lib/wa_cloud_api/message/reaction.rb', line 8

def message_id
  @message_id
end