class Twilio::REST::IpMessaging::V1::ServiceContext::UserContext::UserChannelInstance
Public Class Methods
new(version, payload, service_sid: nil, user_sid: nil)
click to toggle source
Initialize the UserChannelInstance
@param [Version] version Version
that contains the resource @param [Hash] payload payload that contains response from Twilio
@param [String] service_sid
The service_sid
@param [String] user_sid The sid @return [UserChannelInstance] UserChannelInstance
Calls superclass method
Twilio::REST::InstanceResource::new
# File lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb 159 def initialize(version, payload, service_sid: nil, user_sid: nil) 160 super(version) 161 162 # Marshaled Properties 163 @properties = { 164 'account_sid' => payload['account_sid'], 165 'service_sid' => payload['service_sid'], 166 'channel_sid' => payload['channel_sid'], 167 'member_sid' => payload['member_sid'], 168 'status' => payload['status'], 169 'last_consumed_message_index' => payload['last_consumed_message_index'] == nil ? payload['last_consumed_message_index'] : payload['last_consumed_message_index'].to_i, 170 'unread_messages_count' => payload['unread_messages_count'] == nil ? payload['unread_messages_count'] : payload['unread_messages_count'].to_i, 171 'links' => payload['links'], 172 } 173 end
Public Instance Methods
account_sid()
click to toggle source
@return [String] The account_sid
# File lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb 177 def account_sid 178 @properties['account_sid'] 179 end
channel_sid()
click to toggle source
@return [String] The channel_sid
# File lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb 189 def channel_sid 190 @properties['channel_sid'] 191 end
inspect()
click to toggle source
Provide a detailed, user friendly representation
# File lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb 231 def inspect 232 "<Twilio.IpMessaging.V1.UserChannelInstance>" 233 end
last_consumed_message_index()
click to toggle source
@return [String] The last_consumed_message_index
# File lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb 207 def last_consumed_message_index 208 @properties['last_consumed_message_index'] 209 end
links()
click to toggle source
@return [String] The links
# File lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb 219 def links 220 @properties['links'] 221 end
member_sid()
click to toggle source
@return [String] The member_sid
# File lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb 195 def member_sid 196 @properties['member_sid'] 197 end
service_sid()
click to toggle source
@return [String] The service_sid
# File lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb 183 def service_sid 184 @properties['service_sid'] 185 end
status()
click to toggle source
@return [user_channel.ChannelStatus] The status
# File lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb 201 def status 202 @properties['status'] 203 end
to_s()
click to toggle source
Provide a user friendly representation
# File lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb 225 def to_s 226 "<Twilio.IpMessaging.V1.UserChannelInstance>" 227 end
unread_messages_count()
click to toggle source
@return [String] The unread_messages_count
# File lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb 213 def unread_messages_count 214 @properties['unread_messages_count'] 215 end