Class: Whatsapp::Webhook::AccountReviewUpdate

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby/whatsapp/webhook/account_review_update.rb

Overview

Policy guideline review outcomes for WhatsApp Business Accounts. Source: https://developers.facebook.com/documentation/business-messaging/whatsapp/webhooks/overview

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(decision:) ⇒ AccountReviewUpdate

Returns a new instance of AccountReviewUpdate.



12
13
14
# File 'lib/ruby/whatsapp/webhook/account_review_update.rb', line 12

def initialize(decision:)
  @decision = decision
end

Instance Attribute Details

#decisionString?

Returns e.g. "APPROVED", "REJECTED".

Returns:

  • (String, nil)

    e.g. "APPROVED", "REJECTED".



10
11
12
# File 'lib/ruby/whatsapp/webhook/account_review_update.rb', line 10

def decision
  @decision
end

Class Method Details

.deserialize(data) ⇒ AccountReviewUpdate

Parameters:

  • data (Hash)

    The raw value hash.

Returns:



19
20
21
22
23
# File 'lib/ruby/whatsapp/webhook/account_review_update.rb', line 19

def deserialize(data)
  data ||= {}

  new(decision: data["decision"])
end