Class: Facebook::Messenger::Incoming::PolicyEnforcement

Inherits:
Object
  • Object
show all
Includes:
Common
Defined in:
lib/facebook/messenger/incoming/policy_enforcement.rb

Overview

The PolicyEnforcement class represents an incoming webhook response from Facebook when they are notifying your app of a policy violation

developers.facebook.com/docs/messenger-platform/reference/webhook-events/messaging_policy_enforcement

Instance Attribute Summary

Attributes included from Common

#messaging

Instance Method Summary collapse

Methods included from Common

#access_token, #initialize, #mark_seen, #prior_message, #recipient, #reply, #sender, #sent_at, #typing_off, #typing_on

Instance Method Details

#actionObject



11
12
13
# File 'lib/facebook/messenger/incoming/policy_enforcement.rb', line 11

def action
  @messaging['policy_enforcement']['action']
end

#reasonObject



15
16
17
# File 'lib/facebook/messenger/incoming/policy_enforcement.rb', line 15

def reason
  @messaging['policy_enforcement']['reason']
end