Class: MessengerPlatform::Entities::PayloadButton

Inherits:
Message
  • Object
show all
Defined in:
lib/messenger_platform/entities/payload_button.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(text, button_template) ⇒ Object



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

def body_params(text, button_template)
  auth_params.merge(message_params(attachment: {
    type: :template,
    payload: {
      template_type: :button,
      text: text,
      buttons: button_template
    }
  }))
end