Class: Messaging::Channels::WhatsApp

Inherits:
Message
  • Object
show all
Defined in:
lib/vonage/messaging/channels/whats_app.rb

Constant Summary collapse

MESSAGE_TYPES =
['text', 'image', 'audio', 'video', 'file', 'template', 'sticker', 'custom']

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ WhatsApp

Returns a new instance of WhatsApp.



9
10
11
12
13
14
15
16
# File 'lib/vonage/messaging/channels/whats_app.rb', line 9

def initialize(attributes = {})
  @type = attributes.fetch(:type, nil)
  @message = attributes.fetch(:message, nil)
  @opts = attributes.fetch(:opts, {})
  @data = {}

  after_initialize!
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



7
8
9
# File 'lib/vonage/messaging/channels/whats_app.rb', line 7

def data
  @data
end