Class: WhatsappSdk::Resource::InteractiveFooter

Inherits:
Object
  • Object
show all
Defined in:
lib/whatsapp_sdk/resource/interactive_footer.rb

Constant Summary collapse

MAXIMUM_LENGTH =
60

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(text:) ⇒ InteractiveFooter

Returns a new instance of InteractiveFooter.



12
13
14
15
# File 'lib/whatsapp_sdk/resource/interactive_footer.rb', line 12

def initialize(text:)
  @text = text
  validate
end

Instance Attribute Details

#textObject

Returns Text string if the parameter object type is text. For the body interactive, the character limit is 60 characters.



10
11
12
# File 'lib/whatsapp_sdk/resource/interactive_footer.rb', line 10

def text
  @text
end

Instance Method Details

#to_jsonObject



17
18
19
# File 'lib/whatsapp_sdk/resource/interactive_footer.rb', line 17

def to_json
  { text: text }
end