Class: WhatsappSdk::Resource::Url
- Inherits:
-
Object
- Object
- WhatsappSdk::Resource::Url
- Defined in:
- lib/whatsapp_sdk/resource/url.rb
Instance Attribute Summary collapse
-
#type ⇒ Object
Returns the value of attribute type.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(url:, type:) ⇒ Url
constructor
A new instance of Url.
- #to_h ⇒ Object
Constructor Details
#initialize(url:, type:) ⇒ Url
Returns a new instance of Url.
8 9 10 11 |
# File 'lib/whatsapp_sdk/resource/url.rb', line 8 def initialize(url:, type:) @url = url @type = type end |
Instance Attribute Details
#type ⇒ Object
Returns the value of attribute type.
6 7 8 |
# File 'lib/whatsapp_sdk/resource/url.rb', line 6 def type @type end |
#url ⇒ Object
Returns the value of attribute url.
6 7 8 |
# File 'lib/whatsapp_sdk/resource/url.rb', line 6 def url @url end |
Instance Method Details
#to_h ⇒ Object
13 14 15 16 17 18 |
# File 'lib/whatsapp_sdk/resource/url.rb', line 13 def to_h { url: @url, type: @type } end |