Class: PostProxy::QuickReply

Inherits:
Model
  • Object
show all
Defined in:
lib/postproxy/types.rb

Overview

A tappable chip above the participant's composer, gone once tapped. Facebook and Instagram only; up to 13 per send. content_type is optional on send (only "text" is accepted) and always present on responses.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**attrs) ⇒ QuickReply

Returns a new instance of QuickReply.



438
439
440
441
# File 'lib/postproxy/types.rb', line 438

def initialize(**attrs)
  @content_type = nil
  super
end

Instance Attribute Details

#content_typeObject

Returns the value of attribute content_type.



436
437
438
# File 'lib/postproxy/types.rb', line 436

def content_type
  @content_type
end

#payloadObject

Returns the value of attribute payload.



436
437
438
# File 'lib/postproxy/types.rb', line 436

def payload
  @payload
end

#titleObject

Returns the value of attribute title.



436
437
438
# File 'lib/postproxy/types.rb', line 436

def title
  @title
end

Instance Method Details

#to_hObject



443
444
445
# File 'lib/postproxy/types.rb', line 443

def to_h
  { content_type: @content_type, title: @title, payload: @payload }.compact
end