Class: Whatsapp::Webhook::PaymentConfigurationUpdate

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

Overview

Payment configuration changes (India/Brazil).

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(configuration_name:, provider_name:, provider_mid:, status:) ⇒ PaymentConfigurationUpdate

Returns a new instance of PaymentConfigurationUpdate.



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

def initialize(configuration_name:, provider_name:, provider_mid:, status:)
  @configuration_name = configuration_name
  @provider_name = provider_name
  @provider_mid = provider_mid
  @status = status
end

Instance Attribute Details

#configuration_nameString?

Returns:

  • (String, nil)


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

def configuration_name
  @configuration_name
end

#provider_midString?

Returns:

  • (String, nil)


22
23
24
# File 'lib/ruby/whatsapp/webhook/payment_configuration_update.rb', line 22

def provider_mid
  @provider_mid
end

#provider_nameString?

Returns:

  • (String, nil)


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

def provider_name
  @provider_name
end

#statusString?

Returns:

  • (String, nil)


26
27
28
# File 'lib/ruby/whatsapp/webhook/payment_configuration_update.rb', line 26

def status
  @status
end

Class Method Details

.deserialize(data) ⇒ PaymentConfigurationUpdate

Parameters:

  • data (Hash)

    The raw value hash.

Returns:



38
39
40
41
42
43
44
45
46
47
# File 'lib/ruby/whatsapp/webhook/payment_configuration_update.rb', line 38

def deserialize(data)
  data ||= {}

  new(
    configuration_name: data["configuration_name"],
    provider_name: data["provider_name"],
    provider_mid: data["provider_mid"],
    status: data["status"]
  )
end