class MessengerPlatform::ImageMessage
Public Class Methods
new(recipient, image_url, notification_type = :regular)
click to toggle source
Calls superclass method
MessengerPlatform::MessageBase::new
# File lib/messenger_platform/image_message.rb, line 3 def initialize(recipient, image_url, notification_type = :regular) super(recipient, notification_type) @image_url = image_url end
Public Instance Methods
serialize()
click to toggle source
Calls superclass method
MessengerPlatform::MessageBase#serialize
# File lib/messenger_platform/image_message.rb, line 8 def serialize super.merge({ message: { attachment: { type: "image", payload: { url: @image_url } } } }) end