Class: WhatsappSdk::Resource::Url

Inherits:
Object
  • Object
show all
Defined in:
lib/whatsapp_sdk/resource/url.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#typeObject

Returns the value of attribute type.



6
7
8
# File 'lib/whatsapp_sdk/resource/url.rb', line 6

def type
  @type
end

#urlObject

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_hObject



13
14
15
16
17
18
# File 'lib/whatsapp_sdk/resource/url.rb', line 13

def to_h
  {
    url: @url,
    type: @type
  }
end