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