Class: MessengerPlatform::InboundMessage
- Inherits:
-
Object
- Object
- MessengerPlatform::InboundMessage
- Defined in:
- lib/messenger_platform/inbound_message.rb
Instance Attribute Summary collapse
-
#attachments ⇒ Object
Returns the value of attribute attachments.
-
#message_id ⇒ Object
Returns the value of attribute message_id.
-
#recipient ⇒ Object
Returns the value of attribute recipient.
-
#sender ⇒ Object
Returns the value of attribute sender.
-
#sequence ⇒ Object
Returns the value of attribute sequence.
-
#source_data ⇒ Object
Returns the value of attribute source_data.
-
#text ⇒ Object
Returns the value of attribute text.
-
#timestamp ⇒ Object
Returns the value of attribute timestamp.
Instance Method Summary collapse
- #attachments? ⇒ Boolean
-
#initialize(hash) ⇒ InboundMessage
constructor
A new instance of InboundMessage.
Constructor Details
#initialize(hash) ⇒ InboundMessage
Returns a new instance of InboundMessage.
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/messenger_platform/inbound_message.rb', line 6 def initialize(hash) @source_data = hash @sender = MessengerPlatform::Contact.new(hash[:sender]) @recipient = MessengerPlatform::Contact.new(hash[:recipient]) @timestamp = hash[:timestamp] @message_id = [:mid] @sequence = [:seq] @text = [:text] @attachments = end |
Instance Attribute Details
#attachments ⇒ Object
Returns the value of attribute attachments.
3 4 5 |
# File 'lib/messenger_platform/inbound_message.rb', line 3 def @attachments end |
#message_id ⇒ Object
Returns the value of attribute message_id.
3 4 5 |
# File 'lib/messenger_platform/inbound_message.rb', line 3 def @message_id end |
#recipient ⇒ Object
Returns the value of attribute recipient.
3 4 5 |
# File 'lib/messenger_platform/inbound_message.rb', line 3 def recipient @recipient end |
#sender ⇒ Object
Returns the value of attribute sender.
3 4 5 |
# File 'lib/messenger_platform/inbound_message.rb', line 3 def sender @sender end |
#sequence ⇒ Object
Returns the value of attribute sequence.
3 4 5 |
# File 'lib/messenger_platform/inbound_message.rb', line 3 def sequence @sequence end |
#source_data ⇒ Object
Returns the value of attribute source_data.
3 4 5 |
# File 'lib/messenger_platform/inbound_message.rb', line 3 def source_data @source_data end |
#text ⇒ Object
Returns the value of attribute text.
3 4 5 |
# File 'lib/messenger_platform/inbound_message.rb', line 3 def text @text end |
#timestamp ⇒ Object
Returns the value of attribute timestamp.
3 4 5 |
# File 'lib/messenger_platform/inbound_message.rb', line 3 def @timestamp end |
Instance Method Details
#attachments? ⇒ Boolean
18 19 20 |
# File 'lib/messenger_platform/inbound_message.rb', line 18 def .any? end |