Class: WhatsappSdk::Resource::PhoneNumberComponent

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(phone:, type:, wa_id:) ⇒ PhoneNumberComponent

Returns a new instance of PhoneNumberComponent.



10
11
12
13
14
# File 'lib/whatsapp_sdk/resource/phone_number_component.rb', line 10

def initialize(phone:, type:, wa_id:)
  @phone = phone
  @type = type
  @wa_id = wa_id
end

Instance Attribute Details

#phoneObject

Returns the value of attribute phone.



8
9
10
# File 'lib/whatsapp_sdk/resource/phone_number_component.rb', line 8

def phone
  @phone
end

#typeObject

Returns the value of attribute type.



8
9
10
# File 'lib/whatsapp_sdk/resource/phone_number_component.rb', line 8

def type
  @type
end

#wa_idObject

Returns the value of attribute wa_id.



8
9
10
# File 'lib/whatsapp_sdk/resource/phone_number_component.rb', line 8

def wa_id
  @wa_id
end

Instance Method Details

#to_hObject



16
17
18
19
20
21
22
# File 'lib/whatsapp_sdk/resource/phone_number_component.rb', line 16

def to_h
  {
    phone: @phone,
    type: @type,
    wa_id: @wa_id
  }
end