class MessengerPlatform::Contact

Attributes

id[R]
phone_number[R]

Public Class Methods

new(hash) click to toggle source
# File lib/messenger_platform/contact.rb, line 5
def initialize(hash)
  @id = hash[:id]
  @phone_number = hash[:phone_number]
end

Public Instance Methods

serialize() click to toggle source
# File lib/messenger_platform/contact.rb, line 10
def serialize
  id.present? ? { id: id } : { phone_number: phone_number }
end