Class: WhatsappSdk::Resource::InteractiveBody
- Inherits:
-
Object
- Object
- WhatsappSdk::Resource::InteractiveBody
- Defined in:
- lib/whatsapp_sdk/resource/interactive_body.rb
Constant Summary collapse
- MAXIMUM_LENGTH =
1024
Instance Attribute Summary collapse
-
#text ⇒ Object
Returns Text string if the parameter object type is text.
Instance Method Summary collapse
-
#initialize(text:) ⇒ InteractiveBody
constructor
A new instance of InteractiveBody.
- #to_json ⇒ Object
Constructor Details
#initialize(text:) ⇒ InteractiveBody
12 13 14 15 |
# File 'lib/whatsapp_sdk/resource/interactive_body.rb', line 12 def initialize(text:) @text = text validate end |
Instance Attribute Details
#text ⇒ Object
Returns Text string if the parameter object type is text. For the body interactive, the character limit is 1024 characters.
10 11 12 |
# File 'lib/whatsapp_sdk/resource/interactive_body.rb', line 10 def text @text end |
Instance Method Details
#to_json ⇒ Object
17 18 19 |
# File 'lib/whatsapp_sdk/resource/interactive_body.rb', line 17 def to_json { text: text } end |