Class: MessageQuickly::Messaging::Recipient

Inherits:
User
  • Object
show all
Defined in:
lib/message_quickly/messaging/recipient.rb

Instance Attribute Summary collapse

Attributes inherited from User

#first_name, #gender, #id, #last_name, #locale, #profile_pic, #timezone

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from MessageQuickly::Messaging::Base

Instance Attribute Details

#phone_numberObject

Returns the value of attribute phone_number.



5
6
7
# File 'lib/message_quickly/messaging/recipient.rb', line 5

def phone_number
  @phone_number
end

Instance Method Details

#to_hashObject



7
8
9
10
11
12
13
# File 'lib/message_quickly/messaging/recipient.rb', line 7

def to_hash
  if id.present?
    { id: id }
  else
    { phone_number: phone_number }
  end
end