Class: Whatsapp::Webhook::PartnerSolutions

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

Overview

Multi-Partner Solution status changes.

Best-effort schema: Meta's public docs describe this field in one line with no published JSON example. Validate against a real payload (App Dashboard "send test payload") before relying on these attribute names in production. 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(solution_id:, event:) ⇒ PartnerSolutions

Returns a new instance of PartnerSolutions.



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

def initialize(solution_id:, event:)
  @solution_id = solution_id
  @event = event
end

Instance Attribute Details

#eventString?

Returns:

  • (String, nil)


18
19
20
# File 'lib/ruby/whatsapp/webhook/partner_solutions.rb', line 18

def event
  @event
end

#solution_idString?

Returns:

  • (String, nil)


14
15
16
# File 'lib/ruby/whatsapp/webhook/partner_solutions.rb', line 14

def solution_id
  @solution_id
end

Class Method Details

.deserialize(data) ⇒ PartnerSolutions

Parameters:

  • data (Hash)

    The raw value hash.

Returns:



28
29
30
31
32
# File 'lib/ruby/whatsapp/webhook/partner_solutions.rb', line 28

def deserialize(data)
  data ||= {}

  new(solution_id: data["solution_id"], event: data["event"])
end