Module: Twilio::Rails::Models::SMSConversation

Extended by:
ActiveSupport::Concern
Included in:
SMSConversation
Defined in:
lib/twilio/rails/models/sms_conversation.rb

Overview

A conversation via SMS. Has many Messages. Each message has a direction and can be unrolled into a full conversation.

Instance Method Summary collapse

Instance Method Details

#locationString

Returns A well formatted string with the city/state/country of the phone number if available.

Returns:

  • (String)

    A well formatted string with the city/state/country of the phone number if available.



23
24
25
# File 'lib/twilio/rails/models/sms_conversation.rb', line 23

def location
  Twilio::Rails::Formatter.location(city: from_city, country: from_country, province: from_province)
end

#phone_callerTwilio::Rails::Models::PhoneCaller

Returns The phone caller associated with this conversation.

Returns:



18
19
20
# File 'lib/twilio/rails/models/sms_conversation.rb', line 18

def phone_caller
  Twilio::Rails.config.phone_caller_class.for(from_number)
end