Class: Whatsapp::Messages::Contacts::Org
- Inherits:
-
Object
- Object
- Whatsapp::Messages::Contacts::Org
- Defined in:
- lib/ruby/whatsapp/messages/contacts/org.rb
Overview
Represents the organization details of a contact message. All fields are optional.
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#initialize(company: nil, department: nil, title: nil) ⇒ Org
constructor
A new instance of Org.
-
#serialize ⇒ Hash
The serialized org payload.
Constructor Details
#initialize(company: nil, department: nil, title: nil) ⇒ Org
Returns a new instance of Org.
24 25 26 27 28 |
# File 'lib/ruby/whatsapp/messages/contacts/org.rb', line 24 def initialize(company: nil, department: nil, title: nil) @company = company @department = department @title = title end |
Instance Attribute Details
#company ⇒ String?
11 12 13 |
# File 'lib/ruby/whatsapp/messages/contacts/org.rb', line 11 def company @company end |
#department ⇒ String?
15 16 17 |
# File 'lib/ruby/whatsapp/messages/contacts/org.rb', line 15 def department @department end |
#title ⇒ String?
19 20 21 |
# File 'lib/ruby/whatsapp/messages/contacts/org.rb', line 19 def title @title end |
Instance Method Details
#serialize ⇒ Hash
Returns The serialized org payload.
31 32 33 34 35 36 37 |
# File 'lib/ruby/whatsapp/messages/contacts/org.rb', line 31 def serialize { company:, department:, title:, }.compact end |