Class: MessageQuickly::Messaging::Event
- Defined in:
- lib/message_quickly/messaging/event.rb
Direct Known Subclasses
AccountLinkEvent, DeliveryEvent, MessageEvent, OptinEvent, PostbackEvent, ReadEvent
Instance Attribute Summary collapse
-
#entry ⇒ Object
readonly
Returns the value of attribute entry.
-
#recipient ⇒ Object
readonly
Returns the value of attribute recipient.
-
#sender ⇒ Object
readonly
Returns the value of attribute sender.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ Event
constructor
A new instance of Event.
Constructor Details
#initialize(params = {}) ⇒ Event
Returns a new instance of Event.
7 8 9 10 11 12 |
# File 'lib/message_quickly/messaging/event.rb', line 7 def initialize(params = {}) params.deep_symbolize_keys! @sender = Sender.new(params.delete(:sender)) if params.include?(:sender) @recipient = Recipient.new(params.delete(:recipient)) if params.include?(:recipient) super end |
Instance Attribute Details
#entry ⇒ Object (readonly)
Returns the value of attribute entry.
5 6 7 |
# File 'lib/message_quickly/messaging/event.rb', line 5 def entry @entry end |
#recipient ⇒ Object (readonly)
Returns the value of attribute recipient.
5 6 7 |
# File 'lib/message_quickly/messaging/event.rb', line 5 def recipient @recipient end |
#sender ⇒ Object (readonly)
Returns the value of attribute sender.
5 6 7 |
# File 'lib/message_quickly/messaging/event.rb', line 5 def sender @sender end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
5 6 7 |
# File 'lib/message_quickly/messaging/event.rb', line 5 def end |