Class: MessageQuickly::Messaging::QuickReply

Inherits:
Base
  • Object
show all
Defined in:
lib/message_quickly/messaging/quick_reply.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ QuickReply

Returns a new instance of QuickReply.



7
8
9
10
# File 'lib/message_quickly/messaging/quick_reply.rb', line 7

def initialize(params = {})
  params['content_type'] ||= 'text'
  super(params)
end

Instance Attribute Details

#content_typeObject

Returns the value of attribute content_type.



5
6
7
# File 'lib/message_quickly/messaging/quick_reply.rb', line 5

def content_type
  @content_type
end

#payloadObject

Returns the value of attribute payload.



5
6
7
# File 'lib/message_quickly/messaging/quick_reply.rb', line 5

def payload
  @payload
end

#titleObject

Returns the value of attribute title.



5
6
7
# File 'lib/message_quickly/messaging/quick_reply.rb', line 5

def title
  @title
end

Instance Method Details

#to_hashObject



12
13
14
# File 'lib/message_quickly/messaging/quick_reply.rb', line 12

def to_hash
  { content_type: content_type, title: title, payload: payload }
end