class MessengerPlatform::MessageBase

Attributes

notification_type[R]
recipient[R]

Public Class Methods

new(recipient, notification_type = :regular) click to toggle source
# File lib/messenger_platform/message_base.rb, line 5
def initialize(recipient, notification_type = :regular)
  @recipient = recipient
  @notification_type = notification_type
end

Public Instance Methods

deliver() click to toggle source
# File lib/messenger_platform/message_base.rb, line 17
def deliver
  MessengerPlatform::MessageSender.deliver(self)
end
serialize() click to toggle source
# File lib/messenger_platform/message_base.rb, line 10
def serialize
  {
    recipient: recipient.serialize,
    notification_type: notification_type.to_s.upcase
  }
end