Class: Whatsapp::MessageTemplates::Button::Otp::SupportedApp
- Inherits:
-
Object
- Object
- Whatsapp::MessageTemplates::Button::Otp::SupportedApp
- Includes:
- ValueObject
- Defined in:
- lib/ruby/whatsapp/message_templates/button/otp/supported_app.rb
Overview
An Android app permitted to receive an autofilled one-time passcode.
Required for the ONE_TAP and ZERO_TAP OTP types: Meta matches the delivering app against these entries before handing over the code. Source: https://developers.facebook.com/documentation/business-messaging/whatsapp/templates/authentication-templates/authentication-templates
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#initialize(package_name:, signature_hash:) ⇒ SupportedApp
constructor
A new instance of SupportedApp.
-
#serialize ⇒ Hash
The serialized supported app.
Methods included from ValueObject
Constructor Details
#initialize(package_name:, signature_hash:) ⇒ SupportedApp
Returns a new instance of SupportedApp.
29 30 31 32 33 34 |
# File 'lib/ruby/whatsapp/message_templates/button/otp/supported_app.rb', line 29 def initialize(package_name:, signature_hash:) @package_name = package_name @signature_hash = signature_hash validate! end |
Instance Attribute Details
#package_name ⇒ String
17 18 19 |
# File 'lib/ruby/whatsapp/message_templates/button/otp/supported_app.rb', line 17 def package_name @package_name end |
#signature_hash ⇒ String
21 22 23 |
# File 'lib/ruby/whatsapp/message_templates/button/otp/supported_app.rb', line 21 def signature_hash @signature_hash end |
Instance Method Details
#serialize ⇒ Hash
Returns The serialized supported app.
37 38 39 |
# File 'lib/ruby/whatsapp/message_templates/button/otp/supported_app.rb', line 37 def serialize { package_name:, signature_hash: } end |