Class: MessengerPlatform::Entities::PayloadGeneric

Inherits:
Message
  • Object
show all
Defined in:
lib/messenger_platform/entities/payload_generic.rb

Instance Attribute Summary

Attributes inherited from Message

#recipient_id

Instance Method Summary collapse

Methods inherited from Message

#auth_params, #call, #initialize, #message_params

Constructor Details

This class inherits a constructor from MessengerPlatform::Entities::Message

Instance Method Details

#body_params(generic_template) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/messenger_platform/entities/payload_generic.rb', line 5

def body_params(generic_template)
  auth_params.merge(message: {
    attachment: {
      type: :template,
      payload: {
        template_type: :generic,
        elements: generic_template
      }
    }
  })
end