Class: Whatsapp::Messages::Video
- Defined in:
- lib/ruby/whatsapp/messages/video.rb
Overview
Video messages display a thumbnail preview of a video with an optional caption. Source: https://developers.facebook.com/documentation/business-messaging/whatsapp/messages/video-messages
Defined Under Namespace
Modules: Defaults
Instance Attribute Summary collapse
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(id: nil, link: nil, caption: nil) ⇒ Video
constructor
A new instance of Video.
-
#serialize ⇒ Hash
Serializes the video message to a hash format suitable for the WhatsApp API.
Constructor Details
#initialize(id: nil, link: nil, caption: nil) ⇒ Video
Returns a new instance of Video.
32 33 34 35 36 37 38 39 40 |
# File 'lib/ruby/whatsapp/messages/video.rb', line 32 def initialize(id: nil, link: nil, caption: nil, **) super(**) @id = id @link = link @caption = caption validate! end |
Instance Attribute Details
#caption ⇒ String?
22 23 24 |
# File 'lib/ruby/whatsapp/messages/video.rb', line 22 def caption @caption end |
#id ⇒ String?
14 15 16 |
# File 'lib/ruby/whatsapp/messages/video.rb', line 14 def id @id end |
#link ⇒ String?
18 19 20 |
# File 'lib/ruby/whatsapp/messages/video.rb', line 18 def link @link end |