Class: WhatsappSdk::Resource::Email

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(email:, type:) ⇒ Email

Returns a new instance of Email.



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

def initialize(email:, type:)
  @email = email
  @type = type
end

Instance Attribute Details

#emailObject

Returns the value of attribute email.



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

def email
  @email
end

#typeObject

Returns the value of attribute type.



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

def type
  @type
end

Instance Method Details

#to_hObject



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

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