Class: MessageQuickly::Messaging::PostbackEvent
- Defined in:
- lib/message_quickly/messaging/postback_event.rb
Instance Attribute Summary collapse
-
#payload ⇒ Object
readonly
Returns the value of attribute payload.
Attributes inherited from Event
#entry, #recipient, #sender, #timestamp
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ PostbackEvent
constructor
A new instance of PostbackEvent.
- #webhook_name ⇒ Object
Constructor Details
#initialize(params = {}) ⇒ PostbackEvent
Returns a new instance of PostbackEvent.
9 10 11 12 13 14 15 |
# File 'lib/message_quickly/messaging/postback_event.rb', line 9 def initialize(params = {}) if params.include? :postback @payload = params[:postback][:payload] params.delete(:postback) end super(params) end |
Instance Attribute Details
#payload ⇒ Object (readonly)
Returns the value of attribute payload.
7 8 9 |
# File 'lib/message_quickly/messaging/postback_event.rb', line 7 def payload @payload end |
Instance Method Details
#webhook_name ⇒ Object
17 18 19 |
# File 'lib/message_quickly/messaging/postback_event.rb', line 17 def webhook_name :messaging_postbacks end |