class MessageQuickly::Messaging::ButtonTemplateAttachment
Attributes
text[RW]
Public Class Methods
new(params = {})
click to toggle source
Calls superclass method
# File lib/message_quickly/messaging/button_template_attachment.rb, line 7 def initialize(params = {}) self.buttons ||= [] params['template_type'] ||= 'button' super(params) end
Public Instance Methods
to_hash()
click to toggle source
# File lib/message_quickly/messaging/button_template_attachment.rb, line 25 def to_hash { type: type, payload: { template_type: template_type, text: text, buttons: buttons.collect { |button| button.to_hash } } } end