Class: Whatsapp::Webhook::Message::Sticker
- Defined in:
- lib/ruby/whatsapp/webhook/message/sticker.rb
Overview
An inbound sticker message.
Instance Attribute Summary collapse
Attributes inherited from Media
#caption, #media_id, #mime_type, #sha256
Attributes inherited from Base
#context, #from, #id, #referral, #timestamp, #type
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(animated: nil, **media_and_base_attributes) ⇒ Sticker
constructor
A new instance of Sticker.
Methods inherited from Media
Methods inherited from Base
Constructor Details
#initialize(animated: nil, **media_and_base_attributes) ⇒ Sticker
Returns a new instance of Sticker.
12 13 14 15 16 |
# File 'lib/ruby/whatsapp/webhook/message/sticker.rb', line 12 def initialize(animated: nil, **media_and_base_attributes) super(**media_and_base_attributes) @animated = animated end |
Instance Attribute Details
#animated ⇒ Boolean?
10 11 12 |
# File 'lib/ruby/whatsapp/webhook/message/sticker.rb', line 10 def animated @animated end |
Class Method Details
.deserialize(data) ⇒ Sticker
21 22 23 24 25 26 27 |
# File 'lib/ruby/whatsapp/webhook/message/sticker.rb', line 21 def deserialize(data) new( animated: data.dig("sticker", "animated"), **media_attributes(data, "sticker"), **common_attributes(data) ) end |