Class: MessageQuickly::Messaging::PostbackButton
- Defined in:
- lib/message_quickly/messaging/postback_button.rb
Instance Attribute Summary collapse
-
#payload ⇒ Object
Returns the value of attribute payload.
Attributes inherited from Button
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ PostbackButton
constructor
A new instance of PostbackButton.
- #to_hash ⇒ Object
Constructor Details
#initialize(params = {}) ⇒ PostbackButton
Returns a new instance of PostbackButton.
7 8 9 10 |
# File 'lib/message_quickly/messaging/postback_button.rb', line 7 def initialize(params = {}) params['type'] ||= 'postback' super(params) end |
Instance Attribute Details
#payload ⇒ Object
Returns the value of attribute payload.
5 6 7 |
# File 'lib/message_quickly/messaging/postback_button.rb', line 5 def payload @payload end |
Instance Method Details
#to_hash ⇒ Object
12 13 14 |
# File 'lib/message_quickly/messaging/postback_button.rb', line 12 def to_hash { type: type, title: title, payload: payload } end |