Class: Whatsapp::Webhook::Message::Image

Inherits:
Media
  • Object
show all
Defined in:
lib/ruby/whatsapp/webhook/message/image.rb

Overview

An inbound image message.

Constant Summary

Constants included from ResponseHandling

ResponseHandling::MAX_ERROR_BODY

Instance Attribute Summary

Attributes inherited from Media

#client

Class Method Summary collapse

Methods inherited from Media

#delete, #download, #get_url, #initialize, #upload

Constructor Details

This class inherits a constructor from Whatsapp::Media

Class Method Details

.deserialize(data) ⇒ Image

Parameters:

  • data (Hash)

    The raw message hash.

Returns:



11
12
13
# File 'lib/ruby/whatsapp/webhook/message/image.rb', line 11

def deserialize(data)
  new(**media_attributes(data, "image"), **common_attributes(data))
end