Class: Whatsapp::Webhook::Message::Contacts::Email
- Inherits:
-
Object
- Object
- Whatsapp::Webhook::Message::Contacts::Email
- Defined in:
- lib/ruby/whatsapp/webhook/message/contacts/email.rb
Overview
An email entry within an inbound contact card.
Instance Attribute Summary collapse
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(email:, type: nil) ⇒ Email
constructor
A new instance of Email.
Constructor Details
#initialize(email:, type: nil) ⇒ Email
Returns a new instance of Email.
17 18 19 20 |
# File 'lib/ruby/whatsapp/webhook/message/contacts/email.rb', line 17 def initialize(email:, type: nil) @email = email @type = type end |
Instance Attribute Details
#email ⇒ String?
11 12 13 |
# File 'lib/ruby/whatsapp/webhook/message/contacts/email.rb', line 11 def email @email end |
#type ⇒ String?
15 16 17 |
# File 'lib/ruby/whatsapp/webhook/message/contacts/email.rb', line 15 def type @type end |
Class Method Details
.deserialize(data) ⇒ Email
25 26 27 28 29 |
# File 'lib/ruby/whatsapp/webhook/message/contacts/email.rb', line 25 def deserialize(data) data ||= {} new(email: data["email"], type: data["type"]) end |